From 5b30797592bf5f1619a093368038bf71f3f6fd1f Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 12 Nov 2019 16:16:40 +0000 Subject: [PATCH 01/64] Blazor WebAssembly move to netstandard2.1 (#16808) * Now works on ns2.1, but links too much * Now only link System.* assemblies * Clean up. Also link Microsoft.Extensions.* now too, since it works. * x-plat slash consistency * Change all Blazor.* projects to netstandard2.1 * Further TFM updates * Stop linking Microsoft.Extensions for now, since it requires a more detailed treatment to avoid breaking things --- .../ref/Microsoft.AspNetCore.Blazor.csproj | 6 +++--- ...rosoft.AspNetCore.Blazor.netstandard2.1.cs} | 0 .../src/Microsoft.AspNetCore.Blazor.csproj | 2 +- .../src/targets/Blazor.MonoRuntime.targets | 18 +++++++++++++++--- ...crosoft.AspNetCore.Blazor.HttpClient.csproj | 6 +++--- ...etCore.Blazor.HttpClient.netstandard2.1.cs} | 0 ...crosoft.AspNetCore.Blazor.HttpClient.csproj | 2 +- .../Client/BlazorWasm-CSharp.Client.csproj | 2 +- .../Shared/BlazorWasm-CSharp.Shared.csproj | 2 +- ...re.Blazor.DataAnnotations.Validation.csproj | 2 +- .../HostedInAspNet.Client.csproj | 2 +- ...oft.AspNetCore.Blazor.E2EPerformance.csproj | 2 +- .../MonoSanityClient/MonoSanityClient.csproj | 2 +- .../StandaloneApp/StandaloneApp.csproj | 2 +- .../BasicTestApp/BasicTestApp.csproj | 2 +- 15 files changed, 31 insertions(+), 19 deletions(-) rename src/Components/Blazor/Blazor/ref/{Microsoft.AspNetCore.Blazor.netstandard2.0.cs => Microsoft.AspNetCore.Blazor.netstandard2.1.cs} (100%) rename src/Components/Blazor/Http/ref/{Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs => Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs} (100%) diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj index d750edc189..88ca078caa 100644 --- a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj @@ -1,10 +1,10 @@ - netstandard2.0 + netstandard2.1 - - + + diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.0.cs b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs similarity index 100% rename from src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.0.cs rename to src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj index 0673c85b2d..be94e420a2 100644 --- a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 Build client-side single-page applications (SPAs) with Blazor running under WebAssembly. true diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 69976d519b..b2de5481db 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -421,11 +421,23 @@ has changed. 4) Add the file we just created to the list of file writes, to support incremental builds. --> + + <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)"> + $([System.String]::Copy('%(RelativeDir)').TrimEnd('\').TrimEnd('/')) + true + + <_MonoBaseClassLibraryFolder Include="$(MonoBaseClassLibraryPath);$(MonoBaseClassLibraryFacadesPath);$(MonoWasmFrameworkPath)" /> - <_BlazorAssembliesToLink Include="@(_BlazorDependencyInput->'-a "%(Identity)"')" /> - <_BlazorAssembliesToLink Include="@(IntermediateAssembly->'-a "%(FullPath)"')" /> + <_BlazorAssembliesToCopy Include="@(IntermediateAssembly->'-a "%(FullPath)"')" /> <_BlazorFolderLookupPaths Include="@(_MonoBaseClassLibraryFolder->'-d "%(Identity)"')" /> + + + <_BlazorFolderLookupPaths Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" Include="@(_BlazorDependencyAssembly->'-d "%(RelativeDirNoTrailingSlash)"')" /> + + + <_BlazorAssembliesToCopy Condition="'%(_BlazorDependencyAssembly.IsLinkable)' != 'true'" Include="@(_BlazorDependencyAssembly->'-a "%(FullPath)"')" /> + <_BlazorAssemblyDescriptorFiles Include="@(BlazorLinkerDescriptor->'-x "%(FullPath)"')" Condition="'@(BlazorLinkerDescriptor)' != ''" /> @@ -438,7 +450,7 @@ - + diff --git a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj index 8c5f6d9e13..6a3ca4305d 100644 --- a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj @@ -1,10 +1,10 @@ - netstandard2.0 + netstandard2.1 - - + + diff --git a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs similarity index 100% rename from src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs rename to src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs diff --git a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj index 18bdc5e1fe..be140d936e 100644 --- a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly. true diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj index c4eb65bded..c855c49821 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj +++ b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 3.0 diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj index 2a77f0c7cc..d849ca9036 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj +++ b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 7.3 diff --git a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj index a166d5f1f3..725b1f9811 100644 --- a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj +++ b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 Provides experimental support for validation using DataAnnotations. true false diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj index ef12ac3c4e..cb21b79a8c 100644 --- a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj +++ b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 Exe true 3.0 diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj index 9f796fdbcf..140762810f 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj +++ b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 true 3.0 diff --git a/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj b/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj index b186c39194..e01c600843 100644 --- a/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj +++ b/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 false false exe diff --git a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj index cddd429b6a..32156c56b8 100644 --- a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj +++ b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 true 3.0 diff --git a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj index 98357d0e88..9914ec4521 100644 --- a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj +++ b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 3.0 true From 23f9a9ea13d04ae165c3fd7a987a502c3e68fd64 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Wed, 13 Nov 2019 18:06:37 -0800 Subject: [PATCH 02/64] Revert "Keep Blazor at pre-release for 3.1" This reverts commit e7e29105ccb1ede074052b8460474b8836c0a27f. --- eng/Versions.props | 3 --- src/Components/Blazor/Directory.Build.props | 9 --------- 2 files changed, 12 deletions(-) delete mode 100644 src/Components/Blazor/Directory.Build.props diff --git a/eng/Versions.props b/eng/Versions.props index 09645f97c4..93c01fb584 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,9 +19,6 @@ false preview$(PreReleasePreviewNumber) Preview $(PreReleasePreviewNumber) - - 4 - preview$(BlazorClientPreReleasePreviewNumber) $(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion) false diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props deleted file mode 100644 index a90d83b4cc..0000000000 --- a/src/Components/Blazor/Directory.Build.props +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - $(BlazorClientPreReleaseVersionLabel) - - - From a53addc1fea197707a1a283868862c46bb2b95c0 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Wed, 13 Nov 2019 18:09:42 -0800 Subject: [PATCH 03/64] Revert dependency updates from 3.1 merge --- NuGet.config | 5 - eng/Version.Details.xml | 400 ++++++++++++++++++++-------------------- eng/Versions.props | 202 ++++++++++---------- 3 files changed, 301 insertions(+), 306 deletions(-) diff --git a/NuGet.config b/NuGet.config index 362df7f886..5d28b80a6f 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,12 +3,7 @@ - - - - - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1b253097c4..54509fa033 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,393 +9,393 @@ --> - + https://github.com/aspnet/Blazor - c8cc48b96c4ef3405dfc1678b089650aec2845ff + df77420cad90b1834fe43c952861dad11097d38f - + https://github.com/aspnet/AspNetCore-Tooling - d29aca1669a58a198445845c53a1e5792d6a6593 + 542a22f0b0242fc7247884b316c71e921d9711da - + https://github.com/aspnet/AspNetCore-Tooling - d29aca1669a58a198445845c53a1e5792d6a6593 + 542a22f0b0242fc7247884b316c71e921d9711da - + https://github.com/aspnet/AspNetCore-Tooling - d29aca1669a58a198445845c53a1e5792d6a6593 + 542a22f0b0242fc7247884b316c71e921d9711da - + https://github.com/aspnet/AspNetCore-Tooling - d29aca1669a58a198445845c53a1e5792d6a6593 + 542a22f0b0242fc7247884b316c71e921d9711da - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/EntityFrameworkCore - 593a3807085dab72170dba95f9283e244961f5db + 3442750627d3532f4e44f21df91f7fbe9315e59a - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/dotnet/core-setup - b7dc9ed2f7ec52c7c3df94a89c7c3b22431c9d33 + 13f35c3d86a40ff811bfde0b64cfb86431c19d15 - + https://github.com/dotnet/core-setup - b7dc9ed2f7ec52c7c3df94a89c7c3b22431c9d33 + 13f35c3d86a40ff811bfde0b64cfb86431c19d15 - + https://github.com/dotnet/core-setup - b7dc9ed2f7ec52c7c3df94a89c7c3b22431c9d33 + 13f35c3d86a40ff811bfde0b64cfb86431c19d15 https://github.com/dotnet/core-setup @@ -404,13 +404,13 @@ - + https://github.com/dotnet/corefx - 4703e4aefb6650500d00a2a529c7ad474ca89859 + 046765913dff824f9ed0f2d2fe0fb9b111906cf5 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 https://github.com/dotnet/arcade @@ -424,13 +424,13 @@ https://github.com/dotnet/arcade a42a124635ce1a218309ecb31ec59d559cacb886 - + https://github.com/aspnet/Extensions - c273f3c664433d1b6dd2c107adaf8270e9448c01 + 02e6d683074019728bfbda8e40e526606fd12875 - + https://github.com/dotnet/roslyn - 1cb14195ed43eefdf7f9de59140ff6db70eea76e + dd838b6fc2ed66913ad99a1a7d58b1b1c07530ed diff --git a/eng/Versions.props b/eng/Versions.props index 93c01fb584..fd988d11b4 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -13,7 +13,7 @@ - true + false release true false @@ -64,114 +64,114 @@ 1.0.0-beta.19517.3 - 3.4.0-beta4-19562-01 + 3.5.0-beta1-19551-03 - 3.1.0 - 3.1.0 - 3.1.0 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 2.1.0 - 1.1.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 1.8.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 - 4.7.0 + 1.1.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 1.8.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 + 4.7.0-preview3.19551.4 - 3.1.0 + 3.1.0-preview3.19551.4 - 3.1.0-preview4.19562.1 + 3.1.0-preview3.19531.1 - 3.1.0-preview3.19562.4 - 3.1.0-preview3.19562.4 - 3.1.0-preview3.19562.4 - 3.1.0-preview3.19562.4 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0-preview3.19562.4 - 3.1.0 - 3.1.0-preview3.19562.4 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 + 3.1.0-preview3.19553.2 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 + 3.1.0-preview3.19554.8 + 3.1.0-preview3.19554.8 + 3.1.0-preview3.19554.8 + 3.1.0-preview3.19554.8 + 3.1.0-preview3.19554.8 + 3.1.0-preview3.19554.8 + 3.1.0-preview3.19554.8 - 3.1.0 - 3.1.0 - 3.1.0 - 3.1.0 + 3.1.0-preview3.19553.1 + 3.1.0-preview3.19553.1 + 3.1.0-preview3.19553.1 + 3.1.0-preview3.19553.1 + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 54509fa033..e5f59d2cb6 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -29,373 +29,373 @@ https://github.com/aspnet/AspNetCore-Tooling 542a22f0b0242fc7247884b316c71e921d9711da - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/EntityFrameworkCore - 3442750627d3532f4e44f21df91f7fbe9315e59a + 988a8a13a524504ede374e2173651bd01f845c37 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/core-setup - 13f35c3d86a40ff811bfde0b64cfb86431c19d15 + 93ee64d467eeccd7006e370e78cf6dae31c1f3e2 - + https://github.com/dotnet/core-setup - 13f35c3d86a40ff811bfde0b64cfb86431c19d15 + 93ee64d467eeccd7006e370e78cf6dae31c1f3e2 - + https://github.com/dotnet/core-setup - 13f35c3d86a40ff811bfde0b64cfb86431c19d15 + 93ee64d467eeccd7006e370e78cf6dae31c1f3e2 https://github.com/dotnet/core-setup @@ -404,33 +404,33 @@ - + https://github.com/dotnet/corefx - 046765913dff824f9ed0f2d2fe0fb9b111906cf5 + 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/dotnet/arcade - a42a124635ce1a218309ecb31ec59d559cacb886 + e34d933e18ba1cd393bbafcb6018e0f858d3e89e - + https://github.com/dotnet/arcade - a42a124635ce1a218309ecb31ec59d559cacb886 + e34d933e18ba1cd393bbafcb6018e0f858d3e89e - + https://github.com/dotnet/arcade - a42a124635ce1a218309ecb31ec59d559cacb886 + e34d933e18ba1cd393bbafcb6018e0f858d3e89e - + https://github.com/aspnet/Extensions - 02e6d683074019728bfbda8e40e526606fd12875 + 4ebd75b961136c7ca331866eed3403becda75681 - + https://github.com/dotnet/roslyn - dd838b6fc2ed66913ad99a1a7d58b1b1c07530ed + 82f2e2541478e239dc4b04f231e90dc2b3dcb422 diff --git a/eng/Versions.props b/eng/Versions.props index fd988d11b4..4c61494afa 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -62,111 +62,111 @@ --> - 1.0.0-beta.19517.3 + 1.0.0-beta.19569.2 - 3.5.0-beta1-19551-03 + 3.4.0-beta4-19568-04 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 + 3.1.0 + 3.1.0 + 3.1.0 2.1.0 - 1.1.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 1.8.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 - 4.7.0-preview3.19551.4 + 1.1.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 1.8.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 + 4.7.0 - 3.1.0-preview3.19551.4 + 3.1.0 3.1.0-preview3.19531.1 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 - 3.1.0-preview3.19553.2 + 3.1.0-rtm.19568.3 + 3.1.0-rtm.19568.3 + 3.1.0-rtm.19568.3 + 3.1.0-rtm.19568.3 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0-rtm.19568.3 + 3.1.0 + 3.1.0-preview4.19568.3 - 3.1.0-preview3.19554.8 - 3.1.0-preview3.19554.8 - 3.1.0-preview3.19554.8 - 3.1.0-preview3.19554.8 - 3.1.0-preview3.19554.8 - 3.1.0-preview3.19554.8 - 3.1.0-preview3.19554.8 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 3.1.0-preview3.19553.1 3.1.0-preview3.19553.1 diff --git a/eng/common/post-build/setup-maestro-vars.ps1 b/eng/common/post-build/setup-maestro-vars.ps1 index 5668ef091a..d7f64dc63c 100644 --- a/eng/common/post-build/setup-maestro-vars.ps1 +++ b/eng/common/post-build/setup-maestro-vars.ps1 @@ -6,12 +6,12 @@ param( try { $Content = Get-Content $ReleaseConfigsPath - + $BarId = $Content | Select -Index 0 - + $Channels = "" $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," } - + $IsStableBuild = $Content | Select -Index 2 Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId @@ -23,4 +23,4 @@ catch { Write-Host $_.Exception Write-Host $_.ScriptStackTrace ExitWithExitCode 1 -} \ No newline at end of file +} diff --git a/eng/common/templates/job/execute-sdl.yml b/eng/common/templates/job/execute-sdl.yml index a7f9964195..52e2ff021d 100644 --- a/eng/common/templates/job/execute-sdl.yml +++ b/eng/common/templates/job/execute-sdl.yml @@ -6,6 +6,11 @@ parameters: # This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter sdlContinueOnError: false # optional: determines whether to continue the build if the step errors; dependsOn: '' # Optional: dependencies of the job + artifactNames: '' # Optional: patterns supplied to DownloadBuildArtifacts + # Usage: + # artifactNames: + # - 'BlobArtifacts' + # - 'Artifacts_Windows_NT_Release' jobs: - job: Run_SDL @@ -18,13 +23,22 @@ jobs: steps: - checkout: self clean: true - - task: DownloadBuildArtifacts@0 - displayName: Download Build Artifacts - inputs: - buildType: current - downloadType: specific files - matchingPattern: "**" - downloadPath: $(Build.SourcesDirectory)\artifacts + - ${{ if ne(parameters.artifactNames, '') }}: + - ${{ each artifactName in parameters.artifactNames }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + buildType: current + artifactName: ${{ artifactName }} + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts + - ${{ if eq(parameters.artifactNames, '') }}: + - task: DownloadBuildArtifacts@0 + displayName: Download Build Artifacts + inputs: + buildType: current + downloadType: specific files + itemPattern: "**" + downloadPath: $(Build.ArtifactStagingDirectory)\artifacts - powershell: eng/common/sdl/extract-artifact-packages.ps1 -InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts -ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts diff --git a/eng/common/templates/post-build/channels/netcore-internal-30.yml b/eng/common/templates/post-build/channels/generic-internal-channel.yml similarity index 85% rename from eng/common/templates/post-build/channels/netcore-internal-30.yml rename to eng/common/templates/post-build/channels/generic-internal-channel.yml index 177b38df35..68fdec0290 100644 --- a/eng/common/templates/post-build/channels/netcore-internal-30.yml +++ b/eng/common/templates/post-build/channels/generic-internal-channel.yml @@ -1,20 +1,26 @@ parameters: + publishInstallersAndChecksums: false symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' + stageName: '' + channelName: '' + channelId: '' + transportFeed: '' + shippingFeed: '' + symbolsFeed: '' stages: -- stage: NetCore_30_Internal_Servicing_Publishing +- stage: ${{ parameters.stageName }} dependsOn: validate variables: - template: ../common-variables.yml - displayName: .NET Core 3.0 Internal Servicing Publishing + displayName: ${{ parameters.channelName }} Publishing jobs: - template: ../setup-maestro-vars.yml - job: displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )) variables: - group: DotNet-Symbol-Server-Pats pool: @@ -55,7 +61,7 @@ stages: value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' steps: @@ -115,14 +121,15 @@ stages: /p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl) /p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey) /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json' + /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json' + /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' + /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' + /p:PublishToMSDL=false ${{ parameters.artifactsPublishingAdditionalParameters }} - template: ../../steps/promote-build.yml parameters: - ChannelId: ${{ variables.InternalServicing_30_Channel_Id }} + ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/channels/netcore-release-31.yml b/eng/common/templates/post-build/channels/generic-public-channel.yml similarity index 79% rename from eng/common/templates/post-build/channels/netcore-release-31.yml rename to eng/common/templates/post-build/channels/generic-public-channel.yml index 01d56410c7..c4bc1897d8 100644 --- a/eng/common/templates/post-build/channels/netcore-release-31.yml +++ b/eng/common/templates/post-build/channels/generic-public-channel.yml @@ -1,21 +1,27 @@ parameters: - symbolPublishingAdditionalParameters: '' artifactsPublishingAdditionalParameters: '' publishInstallersAndChecksums: false + symbolPublishingAdditionalParameters: '' + stageName: '' + channelName: '' + channelId: '' + transportFeed: '' + shippingFeed: '' + symbolsFeed: '' stages: -- stage: NetCore_Release31_Publish +- stage: ${{ parameters.stageName }} dependsOn: validate variables: - template: ../common-variables.yml - displayName: .NET Core 3.1 Release Publishing + displayName: ${{ parameters.channelName }} Publishing jobs: - template: ../setup-maestro-vars.yml - job: displayName: Symbol Publishing dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )) variables: - group: DotNet-Symbol-Server-Pats pool: @@ -33,6 +39,18 @@ stages: artifactName: 'PDBArtifacts' continueOnError: true + # This is necessary whenever we want to publish/restore to an AzDO private feed + # Since sdk-task.ps1 tries to restore packages we need to do this authentication here + # otherwise it'll complain about accessing a private feed. + - task: NuGetAuthenticate@0 + displayName: 'Authenticate to AzDO Feeds' + + - task: PowerShell@2 + displayName: Enable cross-org publishing + inputs: + filePath: eng\common\enable-cross-org-publishing.ps1 + arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) + - task: PowerShell@2 displayName: Publish inputs: @@ -50,13 +68,11 @@ stages: displayName: Publish Assets dependsOn: setupMaestroVars variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - name: BARBuildId value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - name: IsStableBuild value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id)) + condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }})) pool: vmImage: 'windows-2019' steps: @@ -65,12 +81,14 @@ stages: inputs: buildType: current artifactName: PackageArtifacts + continueOnError: true - task: DownloadBuildArtifacts@0 displayName: Download Blob Artifacts inputs: buildType: current artifactName: BlobArtifacts + continueOnError: true - task: DownloadBuildArtifacts@0 displayName: Download Asset Manifests @@ -117,14 +135,14 @@ stages: /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + /p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}' /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + /p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}' /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + /p:AzureDevOpsStaticSymbolsFeed='${{ parameters.symbolsFeed }}' /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' ${{ parameters.artifactsPublishingAdditionalParameters }} - template: ../../steps/promote-build.yml parameters: - ChannelId: ${{ variables.PublicRelease_31_Channel_Id }} + ChannelId: ${{ parameters.channelId }} diff --git a/eng/common/templates/post-build/channels/netcore-3-tools-validation.yml b/eng/common/templates/post-build/channels/netcore-3-tools-validation.yml deleted file mode 100644 index cdb74031fc..0000000000 --- a/eng/common/templates/post-build/channels/netcore-3-tools-validation.yml +++ /dev/null @@ -1,95 +0,0 @@ -parameters: - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_3_Tools_Validation_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET 3 Tools - Validation Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NETCore_3_Tools_Validation_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NETCore_3_Tools_Validation_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-3-tools.yml b/eng/common/templates/post-build/channels/netcore-3-tools.yml deleted file mode 100644 index 70eec773e7..0000000000 --- a/eng/common/templates/post-build/channels/netcore-3-tools.yml +++ /dev/null @@ -1,130 +0,0 @@ -parameters: - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_3_Tools_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET 3 Tools Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_3_Tools_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_3_Tools_Channel_Id }} \ No newline at end of file diff --git a/eng/common/templates/post-build/channels/netcore-dev-31.yml b/eng/common/templates/post-build/channels/netcore-dev-31.yml deleted file mode 100644 index db21254187..0000000000 --- a/eng/common/templates/post-build/channels/netcore-dev-31.yml +++ /dev/null @@ -1,130 +0,0 @@ -parameters: - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_Dev31_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET Core 3.1 Dev Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.PublicDevRelease_31_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-dev-5.yml b/eng/common/templates/post-build/channels/netcore-dev-5.yml deleted file mode 100644 index c4f5a16acb..0000000000 --- a/eng/common/templates/post-build/channels/netcore-dev-5.yml +++ /dev/null @@ -1,130 +0,0 @@ -parameters: - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_Dev5_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET Core 5 Dev Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_5_Dev_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-release-30.yml b/eng/common/templates/post-build/channels/netcore-release-30.yml deleted file mode 100644 index 16ade0db29..0000000000 --- a/eng/common/templates/post-build/channels/netcore-release-30.yml +++ /dev/null @@ -1,130 +0,0 @@ -parameters: - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_Release30_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET Core 3.0 Release Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.PublicRelease_30_Channel_Id }} diff --git a/eng/common/templates/post-build/channels/netcore-tools-latest.yml b/eng/common/templates/post-build/channels/netcore-tools-latest.yml deleted file mode 100644 index 157d2d4b97..0000000000 --- a/eng/common/templates/post-build/channels/netcore-tools-latest.yml +++ /dev/null @@ -1,130 +0,0 @@ -parameters: - symbolPublishingAdditionalParameters: '' - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: NetCore_Tools_Latest_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET Tools - Latest Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: - displayName: Symbol Publishing - dependsOn: setupMaestroVars - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id)) - variables: - - group: DotNet-Symbol-Server-Pats - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - artifactName: 'BlobArtifacts' - continueOnError: true - - - task: DownloadBuildArtifacts@0 - displayName: Download PDB Artifacts - inputs: - artifactName: 'PDBArtifacts' - continueOnError: true - - - task: PowerShell@2 - displayName: Publish - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet - /p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat) - /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - /p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt' - /p:Configuration=Release - ${{ parameters.symbolPublishingAdditionalParameters }} - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_Tools_Latest_Channel_Id }} \ No newline at end of file diff --git a/eng/common/templates/post-build/channels/netcore-tools-validation.yml b/eng/common/templates/post-build/channels/netcore-tools-validation.yml deleted file mode 100644 index d8447e49af..0000000000 --- a/eng/common/templates/post-build/channels/netcore-tools-validation.yml +++ /dev/null @@ -1,95 +0,0 @@ -parameters: - artifactsPublishingAdditionalParameters: '' - publishInstallersAndChecksums: false - -stages: -- stage: PVR_Publish - dependsOn: validate - variables: - - template: ../common-variables.yml - displayName: .NET Tools - Validation Publishing - jobs: - - template: ../setup-maestro-vars.yml - - - job: publish_assets - displayName: Publish Assets - dependsOn: setupMaestroVars - variables: - - group: DotNet-Blob-Feed - - group: AzureDevOps-Artifact-Feeds-Pats - - name: BARBuildId - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ] - - name: IsStableBuild - value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ] - condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Validation_Channel_Id)) - pool: - vmImage: 'windows-2019' - steps: - - task: DownloadBuildArtifacts@0 - displayName: Download Package Artifacts - inputs: - buildType: current - artifactName: PackageArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Blob Artifacts - inputs: - buildType: current - artifactName: BlobArtifacts - - - task: DownloadBuildArtifacts@0 - displayName: Download Asset Manifests - inputs: - buildType: current - artifactName: AssetManifests - - - task: NuGetToolInstaller@1 - displayName: 'Install NuGet.exe' - - # This is necessary whenever we want to publish/restore to an AzDO private feed - - task: NuGetAuthenticate@0 - displayName: 'Authenticate to AzDO Feeds' - - - task: PowerShell@2 - displayName: Enable cross-org publishing - inputs: - filePath: eng\common\enable-cross-org-publishing.ps1 - arguments: -token $(dn-bot-dnceng-artifact-feeds-rw) - - - task: PowerShell@2 - displayName: Publish Assets - inputs: - filePath: eng\common\sdk-task.ps1 - arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet - /p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory) - /p:IsStableBuild=$(IsStableBuild) - /p:IsInternalBuild=$(IsInternalBuild) - /p:RepositoryName=$(Build.Repository.Name) - /p:CommitSha=$(Build.SourceVersion) - /p:NugetPath=$(NuGetExeToolPath) - /p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)' - /p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)' - /p:BARBuildId=$(BARBuildId) - /p:MaestroApiEndpoint='$(MaestroApiEndPoint)' - /p:BuildAssetRegistryToken='$(MaestroApiAccessToken)' - /p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/' - /p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/' - /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/' - /p:Configuration=Release - /p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }} - /p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl) - /p:InstallersAzureAccountKey=$(dotnetcli-storage-key) - /p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl) - /p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key) - /p:PublishToAzureDevOpsNuGetFeeds=true - /p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' - /p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - /p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' - /p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)' - ${{ parameters.artifactsPublishingAdditionalParameters }} - - - template: ../../steps/promote-build.yml - parameters: - ChannelId: ${{ variables.NetCore_Tools_Validation_Channel_Id }} diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index b4eed6f186..0a2c40c103 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -1,7 +1,9 @@ variables: - - group: Publish-Build-Assets + - group: AzureDevOps-Artifact-Feeds-Pats + - group: DotNet-Blob-Feed - group: DotNet-DotNetCli-Storage - group: DotNet-MSRC-Storage + - group: Publish-Build-Assets # .NET Core 3.1 Dev - name: PublicDevRelease_31_Channel_Id @@ -39,6 +41,14 @@ variables: - name: PublicRelease_31_Channel_Id value: 129 + # General Testing + - name: GeneralTesting_Channel_Id + value: 529 + + # .NET Core 3.1 Blazor Features + - name: NetCore_31_Blazor_Features_Channel_Id + value: 531 + # Whether the build is internal or not - name: IsInternalBuild value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }} diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index 7ee82d9ff1..ec80c65a92 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -8,6 +8,7 @@ parameters: enable: false continueOnError: false params: '' + artifactNames: '' # These parameters let the user customize the call to sdk-task.ps1 for publishing # symbols & general artifacts as well as for signing validation @@ -94,54 +95,172 @@ stages: parameters: additionalParameters: ${{ parameters.SDLValidationParameters.params }} continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }} + artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }} -- template: \eng\common\templates\post-build\channels\netcore-dev-5.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Dev5_Publish' + channelName: '.NET Core 5 Dev' + channelId: 131 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-dev-31.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Dev31_Publish' + channelName: '.NET Core 3.1 Dev' + channelId: 128 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + stageName: 'NetCore_Tools_Latest_Publish' + channelName: '.NET Tools - Latest' + channelId: 2 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' -- template: \eng\common\templates\post-build\channels\netcore-tools-validation.yml +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-3-tools-validation.yml - parameters: - artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} - publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-3-tools.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'PVR_Publish' + channelName: '.NET Tools - Validation' + channelId: 9 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-release-30.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_3_Tools_Validation_Publish' + channelName: '.NET 3 Tools - Validation' + channelId: 390 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-release-31.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_3_Tools_Publish' + channelName: '.NET 3 Tools' + channelId: 344 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} - -- template: \eng\common\templates\post-build\channels\netcore-internal-30.yml - parameters: symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Release30_Publish' + channelName: '.NET Core 3.0 Release' + channelId: 19 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Release31_Publish' + channelName: '.NET Core 3.1 Release' + channelId: 129 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_Blazor31_Features_Publish' + channelName: '.NET Core 3.1 Blazor Features' + channelId: 531 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_30_Internal_Servicing_Publishing' + channelName: '.NET Core 3.0 Internal Servicing' + channelId: 184 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NetCore_31_Internal_Servicing_Publishing' + channelName: '.NET Core 3.1 Internal Servicing' + channelId: 550 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'General_Testing_Publish' + channelName: 'General Testing' + channelId: 529 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/general-testing-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Tooling_Dev_Publishing' + channelName: '.NET Core Tooling Dev' + channelId: 548 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_Tooling_Release_Publishing' + channelName: '.NET Core Tooling Release' + channelId: 549 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' diff --git a/global.json b/global.json index 17454ad1bf..5289c25502 100644 --- a/global.json +++ b/global.json @@ -25,7 +25,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.15.2", - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19517.3", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19517.3" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19569.2", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19569.2" } } From d6c88a36ffe89614be26bf846d64791b9958406b Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 22 Nov 2019 09:54:20 -0800 Subject: [PATCH 08/64] More cleaning up Blazor.Build package (#17157) * More cleaning up Blazor.Build package * Clean up MonoRuntime targets * Convert executables in to tasks * Add tests --- eng/Build.props | 1 + .../ResolveRuntimeDependenciesCommand.cs | 61 -- .../src/Cli/Commands/WriteBootJsonCommand.cs | 59 -- .../Blazor/Build/src/Cli/Program.cs | 33 - .../Blazor/Build/src/Core/BootJsonWriter.cs | 70 -- .../Microsoft.AspNetCore.Blazor.Build.csproj | 56 +- .../Microsoft.AspNetCore.Blazor.Build.nuspec | 4 +- .../src/ReferenceBlazorBuildFromSource.props | 25 + .../Build/src/ReferenceFromSource.props | 17 +- .../Build/src/Tasks/GenerateBlazorBootJson.cs | 74 ++ .../ResolveBlazorRuntimeDependencies.cs} | 38 +- .../Blazor/Build/src/targets/All.targets | 26 +- .../src/targets/Blazor.MonoRuntime.props | 20 +- .../src/targets/Blazor.MonoRuntime.targets | 629 +++--------- .../Blazor/Build/src/targets/Publish.targets | 5 +- .../Blazor/Build/test/BootJsonWriterTest.cs | 29 +- .../test/BuildIntegrationTests/Assert.cs | 950 ++++++++++++++++++ .../BuildIncrementalismTest.cs | 40 + .../BuildIntegrationTest.cs | 55 + .../BuildIntegrationTests/FileThumbPrint.cs | 74 ++ .../MSBuildProcessManager.cs | 282 ++++++ .../BuildIntegrationTests/MSBuildResult.cs | 28 + .../BuildIntegrationTests/ProjectDirectory.cs | 211 ++++ .../ProjectDirectoryTest.cs | 21 + .../PublishIntegrationTest.cs | 69 ++ ...osoft.AspNetCore.Blazor.Build.Tests.csproj | 25 +- .../test/RuntimeDependenciesResolverTest.cs | 4 +- .../Build/testassets/Directory.Build.props | 31 + .../Build/testassets/Directory.Build.targets | 2 + .../Build/testassets/standalone/App.razor | 8 + .../testassets/standalone/Pages/Index.razor | 5 + .../Build/testassets/standalone/Program.cs | 10 + .../testassets/standalone/_Imports.razor | 2 + .../testassets/standalone/standalone.csproj | 16 + .../testassets/standalone/wwwroot/index.html | 24 + src/Components/Web.JS/.gitignore | 1 - ...osoft.AspNetCore.Components.Web.JS.npmproj | 2 + .../Web.JS/dist/Release/blazor.server.js | 4 +- .../Web.JS/dist/Release/blazor.webassembly.js | 1 + 39 files changed, 2213 insertions(+), 799 deletions(-) delete mode 100644 src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs delete mode 100644 src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs delete mode 100644 src/Components/Blazor/Build/src/Cli/Program.cs delete mode 100644 src/Components/Blazor/Build/src/Core/BootJsonWriter.cs create mode 100644 src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props create mode 100644 src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs rename src/Components/Blazor/Build/src/{Core/RuntimeDependenciesResolver.cs => Tasks/ResolveBlazorRuntimeDependencies.cs} (86%) create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs create mode 100644 src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs create mode 100644 src/Components/Blazor/Build/testassets/Directory.Build.props create mode 100644 src/Components/Blazor/Build/testassets/Directory.Build.targets create mode 100644 src/Components/Blazor/Build/testassets/standalone/App.razor create mode 100644 src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor create mode 100644 src/Components/Blazor/Build/testassets/standalone/Program.cs create mode 100644 src/Components/Blazor/Build/testassets/standalone/_Imports.razor create mode 100644 src/Components/Blazor/Build/testassets/standalone/standalone.csproj create mode 100644 src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html create mode 100644 src/Components/Web.JS/dist/Release/blazor.webassembly.js diff --git a/eng/Build.props b/eng/Build.props index 2a045abf95..f8a3b7027a 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -34,6 +34,7 @@ $(RepoRoot)src\Installers\**\*.*proj; $(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj; $(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj; + $(RepoRoot)src\Components\Blazor\Build\testassets\**\*.*proj; $(RepoRoot)src\Components\Blazor\Templates\src\content\**\*.*proj; $(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.csproj; $(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.fsproj; diff --git a/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs b/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs deleted file mode 100644 index d5d37bb833..0000000000 --- a/src/Components/Blazor/Build/src/Cli/Commands/ResolveRuntimeDependenciesCommand.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.IO; -using Microsoft.Extensions.CommandLineUtils; - -namespace Microsoft.AspNetCore.Blazor.Build.DevServer.Commands -{ - class ResolveRuntimeDependenciesCommand - { - public static void Command(CommandLineApplication command) - { - var referencesFile = command.Option("--references", - "The path to a file that lists the paths to given referenced dll files", - CommandOptionType.SingleValue); - - var baseClassLibrary = command.Option("--base-class-library", - "Full path to a directory in which BCL assemblies can be found", - CommandOptionType.MultipleValue); - - var outputPath = command.Option("--output", - "Path to the output file that will contain the list with the full paths of the resolved assemblies", - CommandOptionType.SingleValue); - - var mainAssemblyPath = command.Argument("assembly", - "Path to the assembly containing the entry point of the application."); - - command.OnExecute(() => - { - if (string.IsNullOrEmpty(mainAssemblyPath.Value) || - !baseClassLibrary.HasValue() || !outputPath.HasValue()) - { - command.ShowHelp(command.Name); - return 1; - } - - try - { - var referencesSources = referencesFile.HasValue() - ? File.ReadAllLines(referencesFile.Value()) - : Array.Empty(); - - RuntimeDependenciesResolver.ResolveRuntimeDependencies( - mainAssemblyPath.Value, - referencesSources, - baseClassLibrary.Values.ToArray(), - outputPath.Value()); - - return 0; - } - catch (Exception ex) - { - Console.WriteLine($"ERROR: {ex.Message}"); - Console.WriteLine(ex.StackTrace); - return 1; - } - }); - } - } -} diff --git a/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs b/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs deleted file mode 100644 index 6924bd525c..0000000000 --- a/src/Components/Blazor/Build/src/Cli/Commands/WriteBootJsonCommand.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.Extensions.CommandLineUtils; -using System; -using System.IO; - -namespace Microsoft.AspNetCore.Blazor.Build.DevServer.Commands -{ - internal class WriteBootJsonCommand - { - public static void Command(CommandLineApplication command) - { - var referencesFile = command.Option("--references", - "The path to a file that lists the paths to given referenced dll files", - CommandOptionType.SingleValue); - - var outputPath = command.Option("--output", - "Path to the output file", - CommandOptionType.SingleValue); - - var mainAssemblyPath = command.Argument("assembly", - "Path to the assembly containing the entry point of the application."); - - var linkerEnabledFlag = command.Option("--linker-enabled", - "If set, specifies that the application is being built with linking enabled.", - CommandOptionType.NoValue); - - command.OnExecute(() => - { - if (string.IsNullOrEmpty(mainAssemblyPath.Value) || !outputPath.HasValue()) - { - command.ShowHelp(command.Name); - return 1; - } - - try - { - var referencesSources = referencesFile.HasValue() - ? File.ReadAllLines(referencesFile.Value()) - : Array.Empty(); - - BootJsonWriter.WriteFile( - mainAssemblyPath.Value, - referencesSources, - linkerEnabledFlag.HasValue(), - outputPath.Value()); - return 0; - } - catch (Exception ex) - { - Console.WriteLine($"ERROR: {ex.Message}"); - Console.WriteLine(ex.StackTrace); - return 1; - } - }); - } - } -} diff --git a/src/Components/Blazor/Build/src/Cli/Program.cs b/src/Components/Blazor/Build/src/Cli/Program.cs deleted file mode 100644 index 3bd530453f..0000000000 --- a/src/Components/Blazor/Build/src/Cli/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Blazor.Build.DevServer.Commands; -using Microsoft.Extensions.CommandLineUtils; - -namespace Microsoft.AspNetCore.Blazor.Build -{ - static class Program - { - static int Main(string[] args) - { - var app = new CommandLineApplication - { - Name = "Microsoft.AspNetCore.Blazor.Build" - }; - app.HelpOption("-?|-h|--help"); - - app.Command("resolve-dependencies", ResolveRuntimeDependenciesCommand.Command); - app.Command("write-boot-json", WriteBootJsonCommand.Command); - - if (args.Length > 0) - { - return app.Execute(args); - } - else - { - app.ShowHelp(); - return 0; - } - } - } -} diff --git a/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs b/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs deleted file mode 100644 index a98bbadb20..0000000000 --- a/src/Components/Blazor/Build/src/Core/BootJsonWriter.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Text.Json; -using Microsoft.AspNetCore.Components; - -namespace Microsoft.AspNetCore.Blazor.Build -{ - internal class BootJsonWriter - { - public static void WriteFile( - string assemblyPath, - string[] assemblyReferences, - bool linkerEnabled, - string outputPath) - { - var bootJsonText = GetBootJsonContent( - AssemblyName.GetAssemblyName(assemblyPath).Name, - assemblyReferences, - linkerEnabled); - var normalizedOutputPath = Path.GetFullPath(outputPath); - Console.WriteLine("Writing boot data to: " + normalizedOutputPath); - File.WriteAllText(normalizedOutputPath, bootJsonText); - } - - public static string GetBootJsonContent(string entryAssembly, string[] assemblyReferences, bool linkerEnabled) - { - var data = new BootJsonData( - entryAssembly, - assemblyReferences, - linkerEnabled); - return JsonSerializer.Serialize(data, JsonSerializerOptionsProvider.Options); - } - - /// - /// Defines the structure of a Blazor boot JSON file - /// - readonly struct BootJsonData - { - /// - /// Gets the name of the assembly with the application entry point - /// - public string EntryAssembly { get; } - - /// - /// Gets the closure of assemblies to be loaded by Blazor WASM. This includes the application entry assembly. - /// - public IEnumerable Assemblies { get; } - - /// - /// Gets a value that determines if the linker is enabled. - /// - public bool LinkerEnabled { get; } - - public BootJsonData( - string entryAssembly, - IEnumerable assemblies, - bool linkerEnabled) - { - EntryAssembly = entryAssembly; - Assemblies = assemblies; - LinkerEnabled = linkerEnabled; - } - } - } -} diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj index f3f2e76131..daee88af68 100644 --- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj @@ -1,37 +1,71 @@ - + - $(DefaultNetCoreTargetFramework) + $(DefaultNetCoreTargetFramework);net46 + Microsoft.AspNetCore.Blazor.Build.Tasks + Microsoft.AspNetCore.Blazor.Build Build mechanism for ASP.NET Core Blazor applications. - Exe true false + false false - $(GenerateNuspecDependsOn);Publish true Microsoft.AspNetCore.Blazor.Build.nuspec - + - - - + + + + + + + - - - + + + + + <_NetCoreFilesToCopy Include="$(OutputPath)$(DefaultNetCoreTargetFramework)\*" TargetPath="netcoreapp\" /> + <_DesktopFilesToCopy Include="$(OutputPath)net46\*" TargetPath="netfx\" /> + <_AllFilesToCopy Include="@(_NetCoreFilesToCopy);@(_DesktopFilesToCopy)" /> + + + + + + + + + + diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec index 26ca818d7f..b242d7cb1a 100644 --- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec @@ -11,7 +11,7 @@ - - + + diff --git a/src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props b/src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props new file mode 100644 index 0000000000..0bcebe22fa --- /dev/null +++ b/src/Components/Blazor/Build/src/ReferenceBlazorBuildFromSource.props @@ -0,0 +1,25 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\ + $(ComponentsRoot)Web.JS\dist\$(Configuration)\blazor.webassembly.js + $(ComponentsRoot)Web.JS\dist\$(Configuration)\blazor.webassembly.js.map + $(MSBuildThisFileDirectory)bin\$(Configuration)\tools\ + + + + + + + + + + diff --git a/src/Components/Blazor/Build/src/ReferenceFromSource.props b/src/Components/Blazor/Build/src/ReferenceFromSource.props index 8067cdc131..884ddbad7a 100644 --- a/src/Components/Blazor/Build/src/ReferenceFromSource.props +++ b/src/Components/Blazor/Build/src/ReferenceFromSource.props @@ -1,21 +1,6 @@ - - - - true - $(RepoRoot)src\Components\Web.JS\dist\$(Configuration)\blazor.*.js.* - - - - + true @@ -16,15 +18,25 @@ - + $(AssemblyName).blazor.config $(TargetDir)$(BlazorMetadataFileName) - - - - + + + <_BlazorConfigContent Include="$(MSBuildProjectFullPath)" /> + <_BlazorConfigContent Include="$(TargetPath)" /> + <_BlazorConfigContent Include="debug:true" Condition="'$(BlazorEnableDebugging)'=='true'" /> + + + + diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props index 03f70748ff..dc6926924b 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props @@ -1,22 +1,20 @@ - - $(MSBuildThisFileDirectory)../tools/blazor/blazor.*.js + + $(MSBuildThisFileDirectory)..\tools\blazor\blazor.webassembly.js none --disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true - dist/ - $(BaseBlazorDistPath)_content/ - $(BaseBlazorDistPath)_framework/ - $(BaseBlazorRuntimeOutputPath)_bin/ - $(BaseBlazorRuntimeOutputPath)wasm/ - $(BaseBlazorRuntimeOutputPath) - blazor/ - wwwroot/ + dist\ + $(BaseBlazorDistPath)_content\ + $(BaseBlazorDistPath)_framework\ + $(BaseBlazorRuntimeOutputPath)_bin\ + $(BaseBlazorRuntimeOutputPath)wasm\ + wwwroot\ blazor.boot.json - $(BaseBlazorRuntimeOutputPath)$(BlazorBootJsonName) + <_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 9b19e06bb5..26cd58d0c1 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -1,206 +1,85 @@ + + true + + + + + $(MonoBaseClassLibraryPath) + $(MonoBaseClassLibraryFacadesPath) + $(MonoWasmRuntimePath) + $(MonoWasmFrameworkPath) + + + + + $(DotNetWebAssemblyArtifactsRoot)\wasm-bcl\wasm\ + $(DotNetWebAssemblyBCLPath)\Facades\ + $(DotNetWebAssemblyArtifactsRoot)\builds\debug\ + $(DotNetWebAssemblyArtifactsRoot)\framework\ + + Condition="'@(BlazorOutputWithTargetPath)' != '' and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'"> - + - - - - - - <_BlazorResolveReferencesDidRun>true - - - - - <_BlazorStatisticsOutput Include="@(BlazorItemOutput->'%(TargetOutputPath)')" /> + <_BlazorStatisticsOutput Include="@(BlazorOutputWithTargetPath->'%(TargetOutputPath)')" /> - - <_BlazorStatisticsReportImportance Condition="'$(BlazorOutputStatistics)' == ''">normal - <_BlazorStatisticsReportImportance Condition="'$(BlazorOutputStatistics)' != ''">high - - - + - - - - - _PrepareBlazorOutputConfiguration; - _DefineBlazorCommonInputs; - _BlazorResolveOutputBinaries; - _GenerateBlazorBootJson; - - - - - - - - - - - - <_BlazorShouldLinkApplicationAssemblies Condition="$(BlazorLinkOnBuild) == 'false'"> - <_BlazorShouldLinkApplicationAssemblies Condition="$(BlazorLinkOnBuild) == 'true'">true - <_BlazorBuiltInBclLinkerDescriptor>$(MSBuildThisFileDirectory)BuiltInBclLinkerDescriptor.xml - - - - - - - $(TargetDir)$(BaseBlazorRuntimeWasmOutputPath)%(FileName)%(Extension) - WebAssembly - true - - - $(TargetDir)$(BaseBlazorJsOutputPath)%(FileName)%(Extension) - BlazorRuntime - true - + + $(BlazorRuntimeWasmOutputPath)%(FileName)%(Extension) + + + $(BaseBlazorRuntimeOutputPath)%(FileName)%(Extension) + - - <_BlazorPackageContentOutput Include="@(BlazorPackageContentFile)" Condition="%(SourcePackage) != ''"> - $(TargetDir)$(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension) - PreserveNewest + $(BaseBlazorPackageContentOutputPath)%(SourcePackage)\%(RecursiveDir)\%(Filename)%(Extension) - + + - - + + - $(IntermediateOutputPath)$(BaseBlazorIntermediateOutputPath) - $([MSBuild]::Escape($([System.IO.Path]::GetFullPath('$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(BlazorIntermediateOutputPath)'))')))) - - - - - $(BlazorIntermediateOutputPath)inputs.basic.cache - - - $(BlazorIntermediateOutputPath)inputs.copylocal.txt - - - $(BlazorIntermediateOutputPath)inputs.linkerswitch.cache - - - - - $(BlazorIntermediateOutputPath)inputs.linker.cache + $(IntermediateOutputPath)blazor\ $(BlazorIntermediateOutputPath)linker.descriptor.xml @@ -208,151 +87,58 @@ $(BlazorIntermediateOutputPath)linker/ - - $(BlazorIntermediateOutputPath)linked.assemblies.txt - - - - - $(BlazorIntermediateOutputPath)resolvedassemblies/ - - - $(BlazorIntermediateOutputPath)resolved.assemblies.txt - - - - - $(BlazorIntermediateOutputPath) - - $(BlazorBootJsonIntermediateOutputDir)$(BlazorBootJsonName) + $(BlazorIntermediateOutputPath)$(BlazorBootJsonName) - - $(BlazorIntermediateOutputPath)inputs.bootjson.cache - - - $(BlazorIntermediateOutputPath)resolve-dependencies.txt - - - $(BlazorIntermediateOutputPath)bootjson-references.txt - - - $(BlazorIntermediateOutputPath)embedded.resources.txt + <_BlazorLinkerOutputCache>$(BlazorIntermediateOutputPath)linker.output + <_BlazorApplicationAssembliesCacheFile>$(BlazorIntermediateOutputPath)unlinked.output - - $(TargetDir)$(BaseBlazorRuntimeBinOutputPath) - - - - - - - - - - - - - + <_BlazorDependencyInput Include="@(ReferenceCopyLocalPaths->WithMetadataValue('Extension','.dll')->'%(FullPath)')" /> - - <_BlazorCommonInput Include="@(IntermediateAssembly)" /> - <_BlazorCommonInput Include="@(_BlazorDependencyInput)" /> - <_BlazorCommonInput Include="$(_BlazorShouldLinkApplicationAssemblies)" /> - <_BlazorCommonInput Include="$(BlazorEnableDebugging)" /> - <_BlazorLinkingOption Condition="'$(_BlazorShouldLinkApplicationAssemblies)' == ''" Include="false" /> - <_BlazorLinkingOption Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''" Include="true" /> - - - - - - - - - - - - - - - - - - - + - + + + - - <_CollectLinkerOutputsDependsOn> - _GenerateLinkerDescriptor; - _CollectBlazorLinkerDescriptors; - _LinkBlazorApplication - - - - - - + Name="_ResolveBlazorOutputsWhenLinked" + Condition="'$(BlazorLinkOnBuild)' == 'true'" + DependsOnTargets="_GenerateLinkerDescriptor;_LinkBlazorApplication"> + + + + - + $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension) - Assembly - true - - - $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension) - Pdb - - + - + Condition="'@(BlazorLinkerDescriptor)' == ''"> + + <_PrepareLinkerDescriptorAssemblyLine Include="@(IntermediateAssembly->'%(FileName)')" /> @@ -367,60 +153,25 @@ Overwrite="true" WriteOnlyWhenDifferent="True" /> - - - - - - - + - <_BlazorLinkerInput Include="@(IntermediateAssembly)" /> - <_BlazorLinkerInput Include="@(_BlazorDependencyInput)" /> - <_BlazorLinkerInput Include="@(BlazorLinkerDescriptor)" /> - <_BlazorLinkerInput Include="$(AdditionalMonoLinkerOptions)" /> + + - - - - - - - - - - - - + @(BlazorLinkerDescriptor); + $(MSBuildAllProjects)" + Outputs="$(_BlazorLinkerOutputCache)"> + <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)"> $([System.String]::Copy('%(RelativeDir)').TrimEnd('\').TrimEnd('/')) @@ -428,9 +179,9 @@ - <_MonoBaseClassLibraryFolder Include="$(MonoBaseClassLibraryPath);$(MonoBaseClassLibraryFacadesPath);$(MonoWasmFrameworkPath)" /> + <_WebAssemblyBCLFolder Include="$(DotNetWebAssemblyBCLPath);$(DotNetWebAssemblyBCLFacadesPath);$(DotNetWebAssemblyFrameworkPath)" /> <_BlazorAssembliesToCopy Include="@(IntermediateAssembly->'-a "%(FullPath)"')" /> - <_BlazorFolderLookupPaths Include="@(_MonoBaseClassLibraryFolder->'-d "%(Identity)"')" /> + <_BlazorFolderLookupPaths Include="@(_WebAssemblyBCLFolder->'-d "%(Identity)"')" /> <_BlazorFolderLookupPaths Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" Include="@(_BlazorDependencyAssembly->'-d "%(RelativeDirNoTrailingSlash)"')" /> @@ -446,212 +197,92 @@ <_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions) - - + + + <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> + + + - - <_BlazorLinkerOutput Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> - <_BlazorLinkerOutput Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" /> + <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> - - + + + + + + + + + - - - - + + $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension) + - - - - <_CollectResolvedAssembliesDependsOn> - _ResolveBlazorApplicationAssemblies; - _ReadResolvedBlazorApplicationAssemblies; - _IntermediateCopyBlazorApplicationAssemblies; - _TouchBlazorApplicationAssemblies - - - + Name="_ResolveBlazorRuntimeDependencies" + Inputs="$(ProjectAssetsFile); + @(IntermediateAssembly); + @(_BlazorDependencyInput)" + Outputs="$(_BlazorApplicationAssembliesCacheFile)"> - - - - $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension) - Assembly - true - - - $(BlazorRuntimeBinOutputPath)%(FileName)%(Extension) - Pdb - - - - - - - - - <_ReferencesArg Condition="'@(_BlazorDependencyInput)' != ''">--references "$(BlazorResolveDependenciesFilePath)" - <_BclParameter>--base-class-library "$(MonoBaseClassLibraryPath)" --base-class-library "$(MonoBaseClassLibraryFacadesPath)" --base-class-library "$(MonoWasmFrameworkPath)" - - - - - - - - - - - - - - - - <_IntermediateResolvedRuntimeDependencies Include="@(_BlazorResolvedRuntimeDependencies->'$(BlazorIntermediateResolvedApplicationAssembliesOutputPath)%(FileName)%(Extension)')" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <_WebAssemblyBCLFolder Include="$(DotNetWebAssemblyBCLPath);$(DotNetWebAssemblyBCLFacadesPath);$(DotNetWebAssemblyFrameworkPath)" /> + <_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" /> - + + + + - + - + + - <_AppReferences Include="@(BlazorItemOutput->WithMetadataValue('Type','Assembly')->'%(FileName)%(Extension)')" /> - <_AppReferences Include="@(BlazorItemOutput->WithMetadataValue('Type','Pdb')->'%(FileName)%(Extension)')" Condition="'$(BlazorEnableDebugging)' == 'true'" /> + <_AppReferences Include="@(BlazorOutputWithTargetPath->WithMetadataValue('Extension','.dll'))" /> + <_AppReferences Include="@(BlazorOutputWithTargetPath->WithMetadataValue('Extension','.pdb'))" Condition="'$(BlazorEnableDebugging)' == 'true'" /> - - <_LinkerEnabledFlag Condition="'$(_BlazorShouldLinkApplicationAssemblies)' != ''">--linker-enabled - <_ReferencesArg Condition="'@(_AppReferences)' != ''">--references "$(BlazorBootJsonReferencesFilePath)" - - + - - - - <_BlazorBootJson Include="$(BlazorBootJsonIntermediateOutputPath)" /> - <_BlazorBootJsonEmbeddedContentFile Include="$(BlazorBootJsonIntermediateOutputDir)_content\**\*.*" /> - - $(TargetDir)$(BlazorBootJsonOutputPath) - BootJson - - - $(TargetDir)dist/_content/%(RecursiveDir)%(FileName)%(Extension) - + + - - diff --git a/src/Components/Blazor/Build/src/targets/Publish.targets b/src/Components/Blazor/Build/src/targets/Publish.targets index e431ad1272..75c0ed5feb 100644 --- a/src/Components/Blazor/Build/src/targets/Publish.targets +++ b/src/Components/Blazor/Build/src/targets/Publish.targets @@ -26,9 +26,8 @@ - <_BlazorGCTPDIDistFiles Include="@(BlazorItemOutput->'%(TargetOutputPath)')" /> - <_BlazorGCTPDI Include="@(_BlazorGCTPDIDistFiles)"> - $(BlazorPublishDistDir)$([MSBuild]::MakeRelative('$(TargetDir)dist\', %(Identity))) + <_BlazorGCTPDI Include="%(BlazorOutputWithTargetPath.Identity)"> + $(AssemblyName)\%(TargetOutputPath) diff --git a/src/Components/Blazor/Build/test/BootJsonWriterTest.cs b/src/Components/Blazor/Build/test/BootJsonWriterTest.cs index d917a40b06..1e2d89b573 100644 --- a/src/Components/Blazor/Build/test/BootJsonWriterTest.cs +++ b/src/Components/Blazor/Build/test/BootJsonWriterTest.cs @@ -1,28 +1,41 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using System.IO; +using System.Text.Json; +using System.Threading.Tasks; using Xunit; -namespace Microsoft.AspNetCore.Blazor.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build { public class BootJsonWriterTest { [Fact] - public void ProducesJsonReferencingAssemblyAndDependencies() + public async Task ProducesJsonReferencingAssemblyAndDependencies() { // Arrange/Act var assemblyReferences = new string[] { "MyApp.EntryPoint.dll", "System.Abc.dll", "MyApp.ClassLib.dll", }; - var content = BootJsonWriter.GetBootJsonContent( + using var stream = new MemoryStream(); + + // Act + GenerateBlazorBootJson.WriteBootJson( + stream, "MyApp.Entrypoint.dll", assemblyReferences, linkerEnabled: true); // Assert - var parsedContent = JsonConvert.DeserializeObject(content); - Assert.Equal("MyApp.Entrypoint.dll", parsedContent["entryAssembly"].Value()); - Assert.Equal(assemblyReferences, parsedContent["assemblies"].Values()); + stream.Position = 0; + using var parsedContent = await JsonDocument.ParseAsync(stream); + var rootElement = parsedContent.RootElement; + Assert.Equal("MyApp.Entrypoint.dll", rootElement.GetProperty("entryAssembly").GetString()); + var assembliesElement = rootElement.GetProperty("assemblies"); + Assert.Equal(assemblyReferences.Length, assembliesElement.GetArrayLength()); + for (var i = 0; i < assemblyReferences.Length; i++) + { + Assert.Equal(assemblyReferences[i], assembliesElement[i].GetString()); + } + Assert.True(rootElement.GetProperty("linkerEnabled").GetBoolean()); } } } diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs new file mode 100644 index 0000000000..8d0aa4b6da --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/Assert.cs @@ -0,0 +1,950 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Reflection.Metadata; +using System.Reflection.PortableExecutable; +using System.Text; +using System.Text.RegularExpressions; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + internal class Assert : Xunit.Assert + { + // Matches `{filename}: error {code}: {message} [{project}] + // See https://stackoverflow.com/questions/3441452/msbuild-and-ignorestandarderrorwarningformat/5180353#5180353 + private static readonly Regex ErrorRegex = new Regex(@"^(?'location'.+): error (?'errorcode'[A-Z0-9]+): (?'message'.+) \[(?'project'.+)\]$"); + private static readonly Regex WarningRegex = new Regex(@"^(?'location'.+): warning (?'errorcode'[A-Z0-9]+): (?'message'.+) \[(?'project'.+)\]$"); + private static readonly string[] AllowedBuildWarnings = new[] + { + "MSB3491" , // The process cannot access the file. As long as the build succeeds, we're ok. + "NETSDK1071", // "A PackageReference to 'Microsoft.NETCore.App' specified a Version ..." + }; + + public static void BuildPassed(MSBuildResult result, bool allowWarnings = false) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (result.ExitCode != 0) + { + throw new BuildFailedException(result); + } + + var buildWarnings = GetBuildWarnings(result) + .Where(m => !AllowedBuildWarnings.Contains(m.match.Groups["errorcode"].Value)) + .Select(m => m.line); + + if (!allowWarnings && buildWarnings.Any()) + { + throw new BuildWarningsException(result, buildWarnings); + } + } + + public static void BuildError(MSBuildResult result, string errorCode, string location = null) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug. + var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i]; + var match = ErrorRegex.Match(line); + if (match.Success) + { + if (match.Groups["errorcode"].Value != errorCode) + { + continue; + } + + if (location != null && match.Groups["location"].Value.Trim() != location) + { + continue; + } + + // This is a match + return; + } + } + + throw new BuildErrorMissingException(result, errorCode, location); + } + + public static void BuildWarning(MSBuildResult result, string errorCode, string location = null) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug. + foreach (var (_, match) in GetBuildWarnings(result)) + { + if (match.Groups["errorcode"].Value != errorCode) + { + continue; + } + + if (location != null && match.Groups["location"].Value.Trim() != location) + { + continue; + } + + // This is a match + return; + } + + throw new BuildErrorMissingException(result, errorCode, location); + } + + private static IEnumerable<(string line, Match match)> GetBuildWarnings(MSBuildResult result) + { + var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i]; + var match = WarningRegex.Match(line); + if (match.Success) + { + yield return (line, match); + } + } + } + + public static void BuildFailed(MSBuildResult result) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + }; + + if (result.ExitCode == 0) + { + throw new BuildPassedException(result); + } + } + + public static void BuildOutputContainsLine(MSBuildResult result, string match) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (match == null) + { + throw new ArgumentNullException(nameof(match)); + } + + // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug. + var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i].Trim(); + if (line == match) + { + return; + } + } + + throw new BuildOutputMissingException(result, match); + } + + public static void BuildOutputDoesNotContainLine(MSBuildResult result, string match) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (match == null) + { + throw new ArgumentNullException(nameof(match)); + } + + // We don't really need to search line by line, I'm doing this so that it's possible/easy to debug. + var lines = result.Output.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i].Trim(); + if (line == match) + { + throw new BuildOutputContainsLineException(result, match); + } + } + } + + public static void FileContains(MSBuildResult result, string filePath, string match) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + filePath = Path.Combine(result.Project.DirectoryPath, filePath); + FileExists(result, filePath); + + var text = File.ReadAllText(filePath); + if (text.Contains(match)) + { + return; + } + + throw new FileContentMissingException(result, filePath, File.ReadAllText(filePath), match); + } + + public static void FileDoesNotContain(MSBuildResult result, string filePath, string match) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + filePath = Path.Combine(result.Project.DirectoryPath, filePath); + FileExists(result, filePath); + + var text = File.ReadAllText(filePath); + if (text.Contains(match)) + { + throw new FileContentFoundException(result, filePath, File.ReadAllText(filePath), match); + } + } + + public static void FileContentEquals(MSBuildResult result, string filePath, string expected) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + filePath = Path.Combine(result.Project.DirectoryPath, filePath); + FileExists(result, filePath); + + var actual = File.ReadAllText(filePath); + if (!actual.Equals(expected, StringComparison.Ordinal)) + { + throw new FileContentNotEqualException(result, filePath, expected, actual); + } + } + + public static void FileEquals(MSBuildResult result, string expected, string actual) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + expected = Path.Combine(result.Project.DirectoryPath, expected); + actual = Path.Combine(result.Project.DirectoryPath, actual); + FileExists(result, expected); + FileExists(result, actual); + + if (!Enumerable.SequenceEqual(File.ReadAllBytes(expected), File.ReadAllBytes(actual))) + { + throw new FilesNotEqualException(result, expected, actual); + } + } + + public static void FileContainsLine(MSBuildResult result, string filePath, string match) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + filePath = Path.Combine(result.Project.DirectoryPath, filePath); + FileExists(result, filePath); + + var lines = File.ReadAllLines(filePath); + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i].Trim(); + if (line == match) + { + return; + } + } + + throw new FileContentMissingException(result, filePath, File.ReadAllText(filePath), match); + } + + public static void FileDoesNotContainLine(MSBuildResult result, string filePath, string match) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + filePath = Path.Combine(result.Project.DirectoryPath, filePath); + FileExists(result, filePath); + + var lines = File.ReadAllLines(filePath); + for (var i = 0; i < lines.Length; i++) + { + var line = lines[i].Trim(); + if (line == match) + { + throw new FileContentFoundException(result, filePath, File.ReadAllText(filePath), match); + } + } + } + + public static string FileExists(MSBuildResult result, params string[] paths) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths)); + if (!File.Exists(filePath)) + { + throw new FileMissingException(result, filePath); + } + + return filePath; + } + + public static void FileCountEquals(MSBuildResult result, int expected, string directoryPath, string searchPattern) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (directoryPath == null) + { + throw new ArgumentNullException(nameof(directoryPath)); + } + + if (searchPattern == null) + { + throw new ArgumentNullException(nameof(searchPattern)); + } + + directoryPath = Path.Combine(result.Project.DirectoryPath, directoryPath); + + if (Directory.Exists(directoryPath)) + { + var files = Directory.GetFiles(directoryPath, searchPattern, SearchOption.AllDirectories); + if (files.Length != expected) + { + throw new FileCountException(result, expected, directoryPath, searchPattern, files); + } + } + else if (expected > 0) + { + // directory doesn't exist, that's OK if we expected to find nothing. + throw new FileCountException(result, expected, directoryPath, searchPattern, Array.Empty()); + } + } + + public static void FileDoesNotExist(MSBuildResult result, params string[] paths) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + var filePath = Path.Combine(result.Project.DirectoryPath, Path.Combine(paths)); + if (File.Exists(filePath)) + { + throw new FileFoundException(result, filePath); + } + } + + public static void NuspecContains(MSBuildResult result, string nuspecPath, string expected) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (nuspecPath == null) + { + throw new ArgumentNullException(nameof(nuspecPath)); + } + + if (expected == null) + { + throw new ArgumentNullException(nameof(expected)); + } + + nuspecPath = Path.Combine(result.Project.DirectoryPath, nuspecPath); + FileExists(result, nuspecPath); + + var content = File.ReadAllText(nuspecPath); + if (!content.Contains(expected)) + { + throw new NuspecException(result, nuspecPath, content, expected); + } + } + + public static void NuspecDoesNotContain(MSBuildResult result, string nuspecPath, string expected) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (nuspecPath == null) + { + throw new ArgumentNullException(nameof(nuspecPath)); + } + + if (expected == null) + { + throw new ArgumentNullException(nameof(expected)); + } + + nuspecPath = Path.Combine(result.Project.DirectoryPath, nuspecPath); + FileExists(result, nuspecPath); + + var content = File.ReadAllText(nuspecPath); + if (content.Contains(expected)) + { + throw new NuspecFoundException(result, nuspecPath, content, expected); + } + } + + // This method extracts the nupkg to a fixed directory path. To avoid the extra work of + // cleaning up after each invocation, this method accepts multiple files. + public static void NupkgContains(MSBuildResult result, string nupkgPath, params string[] filePaths) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (nupkgPath == null) + { + throw new ArgumentNullException(nameof(nupkgPath)); + } + + if (filePaths == null) + { + throw new ArgumentNullException(nameof(filePaths)); + } + + nupkgPath = Path.Combine(result.Project.DirectoryPath, nupkgPath); + FileExists(result, nupkgPath); + + var unzipped = Path.Combine(result.Project.DirectoryPath, Path.GetFileNameWithoutExtension(nupkgPath)); + ZipFile.ExtractToDirectory(nupkgPath, unzipped); + + foreach (var filePath in filePaths) + { + if (!File.Exists(Path.Combine(unzipped, filePath))) + { + throw new NupkgFileMissingException(result, nupkgPath, filePath); + } + } + } + + // This method extracts the nupkg to a fixed directory path. To avoid the extra work of + // cleaning up after each invocation, this method accepts multiple files. + public static void NupkgDoesNotContain(MSBuildResult result, string nupkgPath, params string[] filePaths) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + if (nupkgPath == null) + { + throw new ArgumentNullException(nameof(nupkgPath)); + } + + if (filePaths == null) + { + throw new ArgumentNullException(nameof(filePaths)); + } + + nupkgPath = Path.Combine(result.Project.DirectoryPath, nupkgPath); + FileExists(result, nupkgPath); + + var unzipped = Path.Combine(result.Project.DirectoryPath, Path.GetFileNameWithoutExtension(nupkgPath)); + ZipFile.ExtractToDirectory(nupkgPath, unzipped); + + foreach (var filePath in filePaths) + { + if (File.Exists(Path.Combine(unzipped, filePath))) + { + throw new NupkgFileFoundException(result, nupkgPath, filePath); + } + } + } + + public static void AssemblyContainsType(MSBuildResult result, string assemblyPath, string fullTypeName) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath)); + + var typeNames = GetDeclaredTypeNames(assemblyPath); + Assert.Contains(fullTypeName, typeNames); + } + + public static void AssemblyDoesNotContainType(MSBuildResult result, string assemblyPath, string fullTypeName) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath)); + + var typeNames = GetDeclaredTypeNames(assemblyPath); + Assert.DoesNotContain(fullTypeName, typeNames); + } + + private static IEnumerable GetDeclaredTypeNames(string assemblyPath) + { + using (var file = File.OpenRead(assemblyPath)) + { + var peReader = new PEReader(file); + var metadataReader = peReader.GetMetadataReader(); + return metadataReader.TypeDefinitions.Where(t => !t.IsNil).Select(t => + { + var type = metadataReader.GetTypeDefinition(t); + return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name); + }).ToArray(); + } + } + + public static void AssemblyHasAttribute(MSBuildResult result, string assemblyPath, string fullTypeName) + { + if (result == null) + { + throw new ArgumentNullException(nameof(result)); + } + + assemblyPath = Path.Combine(result.Project.DirectoryPath, Path.Combine(assemblyPath)); + + var typeNames = GetAssemblyAttributes(assemblyPath); + Assert.Contains(fullTypeName, typeNames); + } + + private static IEnumerable GetAssemblyAttributes(string assemblyPath) + { + using (var file = File.OpenRead(assemblyPath)) + { + var peReader = new PEReader(file); + var metadataReader = peReader.GetMetadataReader(); + return metadataReader.CustomAttributes.Where(t => !t.IsNil).Select(t => + { + var attribute = metadataReader.GetCustomAttribute(t); + var constructor = metadataReader.GetMemberReference((MemberReferenceHandle)attribute.Constructor); + var type = metadataReader.GetTypeReference((TypeReferenceHandle)constructor.Parent); + + return metadataReader.GetString(type.Namespace) + "." + metadataReader.GetString(type.Name); + }).ToArray(); + } + } + + private abstract class MSBuildXunitException : Xunit.Sdk.XunitException + { + protected MSBuildXunitException(MSBuildResult result) + { + Result = result; + } + + protected abstract string Heading { get; } + + public MSBuildResult Result { get; } + + public override string Message + { + get + { + var message = new StringBuilder(); + message.AppendLine(Heading); + message.Append(Result.FileName); + message.Append(" "); + message.Append(Result.Arguments); + message.AppendLine(); + message.AppendLine(); + message.Append(Result.Output); + message.AppendLine(); + message.Append("Exit Code:"); + message.Append(Result.ExitCode); + return message.ToString(); + } + } + } + + private class BuildErrorMissingException : MSBuildXunitException + { + public BuildErrorMissingException(MSBuildResult result, string errorCode, string location) + : base(result) + { + ErrorCode = errorCode; + Location = location; + } + + public string ErrorCode { get; } + + public string Location { get; } + + protected override string Heading + { + get + { + return + $"Error code '{ErrorCode}' was not found." + Environment.NewLine + + $"Looking for '{Location ?? ".*"}: error {ErrorCode}: .*'"; + } + } + } + + private class BuildFailedException : MSBuildXunitException + { + public BuildFailedException(MSBuildResult result) + : base(result) + { + } + + protected override string Heading => "Build failed."; + } + + private class BuildWarningsException : MSBuildXunitException + { + public BuildWarningsException(MSBuildResult result, IEnumerable warnings) + : base(result) + { + Warnings = warnings.ToList(); + } + + public List Warnings { get; } + + protected override string Heading => "Build contains unexpected warnings: " + string.Join(Environment.NewLine, Warnings); + } + + private class BuildPassedException : MSBuildXunitException + { + public BuildPassedException(MSBuildResult result) + : base(result) + { + } + + protected override string Heading => "Build should have failed, but it passed."; + } + + private class BuildOutputMissingException : MSBuildXunitException + { + public BuildOutputMissingException(MSBuildResult result, string match) + : base(result) + { + Match = match; + } + + public string Match { get; } + + protected override string Heading => $"Build did not contain the line: '{Match}'."; + } + + private class BuildOutputContainsLineException : MSBuildXunitException + { + public BuildOutputContainsLineException(MSBuildResult result, string match) + : base(result) + { + Match = match; + } + + public string Match { get; } + + protected override string Heading => $"Build output contains the line: '{Match}'."; + } + + private class FileContentFoundException : MSBuildXunitException + { + public FileContentFoundException(MSBuildResult result, string filePath, string content, string match) + : base(result) + { + FilePath = filePath; + Content = content; + Match = match; + } + + public string Content { get; } + + public string FilePath { get; } + + public string Match { get; } + + protected override string Heading + { + get + { + var builder = new StringBuilder(); + builder.AppendFormat("File content of '{0}' should not contain line: '{1}'.", FilePath, Match); + builder.AppendLine(); + builder.AppendLine(); + builder.AppendLine(Content); + return builder.ToString(); + } + } + } + + private class FileContentMissingException : MSBuildXunitException + { + public FileContentMissingException(MSBuildResult result, string filePath, string content, string match) + : base(result) + { + FilePath = filePath; + Content = content; + Match = match; + } + + public string Content { get; } + + public string FilePath { get; } + + public string Match { get; } + + protected override string Heading + { + get + { + var builder = new StringBuilder(); + builder.AppendFormat("File content of '{0}' did not contain the line: '{1}'.", FilePath, Match); + builder.AppendLine(); + builder.AppendLine(); + builder.AppendLine(Content); + return builder.ToString(); + } + } + } + + private class FileContentNotEqualException : MSBuildXunitException + { + public FileContentNotEqualException(MSBuildResult result, string filePath, string expected, string actual) + : base(result) + { + FilePath = filePath; + Expected = expected; + Actual = actual; + } + + public string Actual { get; } + + public string FilePath { get; } + + public string Expected { get; } + + protected override string Heading + { + get + { + var builder = new StringBuilder(); + builder.AppendFormat("File content of '{0}' did not match the expected content: '{1}'.", FilePath, Expected); + builder.AppendLine(); + builder.AppendLine(); + builder.AppendLine(Actual); + return builder.ToString(); + } + } + } + + private class FilesNotEqualException : MSBuildXunitException + { + public FilesNotEqualException(MSBuildResult result, string expected, string actual) + : base(result) + { + Expected = expected; + Actual = actual; + } + + public string Actual { get; } + + public string Expected { get; } + + protected override string Heading + { + get + { + var builder = new StringBuilder(); + builder.AppendFormat("File content of '{0}' did not match the contents of '{1}'.", Expected, Actual); + builder.AppendLine(); + builder.AppendLine(); + builder.AppendLine(Actual); + return builder.ToString(); + } + } + } + + private class FileMissingException : MSBuildXunitException + { + public FileMissingException(MSBuildResult result, string filePath) + : base(result) + { + FilePath = filePath; + } + + public string FilePath { get; } + + protected override string Heading => $"File: '{FilePath}' was not found."; + } + + private class FileCountException : MSBuildXunitException + { + public FileCountException(MSBuildResult result, int expected, string directoryPath, string searchPattern, string[] files) + : base(result) + { + Expected = expected; + DirectoryPath = directoryPath; + SearchPattern = searchPattern; + Files = files; + } + + public string DirectoryPath { get; } + + public int Expected { get; } + + public string[] Files { get; } + + public string SearchPattern { get; } + + protected override string Heading + { + get + { + var heading = new StringBuilder(); + heading.AppendLine($"Expected {Expected} files matching {SearchPattern} in {DirectoryPath}, found {Files.Length}."); + + if (Files.Length > 0) + { + heading.AppendLine("Files:"); + + foreach (var file in Files) + { + heading.Append("\t"); + heading.Append(file); + } + + heading.AppendLine(); + } + + return heading.ToString(); + } + } + } + + private class FileFoundException : MSBuildXunitException + { + public FileFoundException(MSBuildResult result, string filePath) + : base(result) + { + FilePath = filePath; + } + + public string FilePath { get; } + + protected override string Heading => $"File: '{FilePath}' was found, but should not exist."; + } + + private class NuspecException : MSBuildXunitException + { + public NuspecException(MSBuildResult result, string filePath, string content, string expected) + : base(result) + { + FilePath = filePath; + Content = content; + Expected = expected; + } + + public string Content { get; } + + public string Expected { get; } + + public string FilePath { get; } + + protected override string Heading + { + get + { + return + $"nuspec: '{FilePath}' did not contain the expected content." + Environment.NewLine + + Environment.NewLine + + $"expected: {Expected}" + Environment.NewLine + + Environment.NewLine + + $"actual: {Content}"; + } + } + } + + private class NuspecFoundException : MSBuildXunitException + { + public NuspecFoundException(MSBuildResult result, string filePath, string content, string expected) + : base(result) + { + FilePath = filePath; + Content = content; + Expected = expected; + } + + public string Content { get; } + + public string Expected { get; } + + public string FilePath { get; } + + protected override string Heading + { + get + { + return + $"nuspec: '{FilePath}' should not contain the content {Expected}." + + Environment.NewLine + + $"actual content: {Content}"; + } + } + } + + private class NupkgFileMissingException : MSBuildXunitException + { + public NupkgFileMissingException(MSBuildResult result, string nupkgPath, string filePath) + : base(result) + { + NupkgPath = nupkgPath; + FilePath = filePath; + } + + public string FilePath { get; } + + public string NupkgPath { get; } + + protected override string Heading => $"File: '{FilePath}' was not found was not found in {NupkgPath}."; + } + + private class NupkgFileFoundException : MSBuildXunitException + { + public NupkgFileFoundException(MSBuildResult result, string nupkgPath, string filePath) + : base(result) + { + NupkgPath = nupkgPath; + FilePath = filePath; + } + + public string FilePath { get; } + + public string NupkgPath { get; } + + protected override string Heading => $"File: '{FilePath}' was found in {NupkgPath}."; + } + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs new file mode 100644 index 0000000000..73d8645029 --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIncrementalismTest.cs @@ -0,0 +1,40 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Threading.Tasks; +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + public class BuildIncrementalismTest + { + [Fact] + public async Task Build_WithLinker_IsIncremental() + { + // Arrange + using var project = ProjectDirectory.Create("standalone"); + var result = await MSBuildProcessManager.DotnetMSBuild(project); + + Assert.BuildPassed(result); + + var buildOutputDirectory = project.BuildOutputDirectory; + + // Act + var thumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory); + + // Assert + for (var i = 0; i < 3; i++) + { + result = await MSBuildProcessManager.DotnetMSBuild(project); + Assert.BuildPassed(result); + + var newThumbPrint = FileThumbPrint.CreateFolderThumbprint(project, project.BuildOutputDirectory); + Assert.Equal(thumbPrint.Count, newThumbPrint.Count); + for (var j = 0; j < thumbPrint.Count; j++) + { + Assert.Equal(thumbPrint[j], newThumbPrint[j]); + } + } + } + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs new file mode 100644 index 0000000000..ddd7fcb43b --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs @@ -0,0 +1,55 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using System.Threading.Tasks; +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + public class BuildIntegrationTest + { + [Fact] + public async Task Build_WithDefaultSettings_Works() + { + // Arrange + using var project = ProjectDirectory.Create("standalone"); + var result = await MSBuildProcessManager.DotnetMSBuild(project); + + Assert.BuildPassed(result); + + var buildOutputDirectory = project.BuildOutputDirectory; + + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + } + + [Fact] + public async Task Build_WithLinkOnBuildDisabled_Works() + { + // Arrange + using var project = ProjectDirectory.Create("standalone"); + project.AddProjectFileContent( +@" + false +"); + + var result = await MSBuildProcessManager.DotnetMSBuild(project); + + Assert.BuildPassed(result); + + var buildOutputDirectory = project.BuildOutputDirectory; + + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + } + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs new file mode 100644 index 0000000000..58b5499e8b --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/FileThumbPrint.cs @@ -0,0 +1,74 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Security.Cryptography; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + internal class FileThumbPrint : IEquatable + { + private FileThumbPrint(string path, DateTime lastWriteTimeUtc, string hash) + { + FilePath = path; + LastWriteTimeUtc = lastWriteTimeUtc; + Hash = hash; + } + + public string FilePath { get; } + + public DateTime LastWriteTimeUtc { get; } + + public string Hash { get; } + + public override string ToString() + { + return $"{Path.GetFileName(FilePath)}, {LastWriteTimeUtc.ToString("u")}, {Hash}"; + } + + /// + /// Returns a list of thumbprints for all files (recursive) in the specified directory, sorted by file paths. + /// + public static List CreateFolderThumbprint(ProjectDirectory project, string directoryPath, params string[] filesToIgnore) + { + directoryPath = Path.Combine(project.DirectoryPath, directoryPath); + var files = Directory.GetFiles(directoryPath).Where(p => !filesToIgnore.Contains(p)); + var thumbprintLookup = new List(); + foreach (var file in files) + { + var thumbprint = Create(file); + thumbprintLookup.Add(thumbprint); + } + + thumbprintLookup.Sort(Comparer.Create((a, b) => StringComparer.Ordinal.Compare(a.FilePath, b.FilePath))); + return thumbprintLookup; + } + + public static FileThumbPrint Create(string path) + { + byte[] hashBytes; + using (var sha1 = SHA1.Create()) + using (var fileStream = File.OpenRead(path)) + { + hashBytes = sha1.ComputeHash(fileStream); + } + + var hash = Convert.ToBase64String(hashBytes); + var lastWriteTimeUtc = File.GetLastWriteTimeUtc(path); + return new FileThumbPrint(path, lastWriteTimeUtc, hash); + } + + public bool Equals(FileThumbPrint other) + { + return + string.Equals(FilePath, other.FilePath, StringComparison.Ordinal) && + LastWriteTimeUtc == other.LastWriteTimeUtc && + string.Equals(Hash, other.Hash, StringComparison.Ordinal); + } + + public override int GetHashCode() => LastWriteTimeUtc.GetHashCode(); + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs new file mode 100644 index 0000000000..b7e16ca072 --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildProcessManager.cs @@ -0,0 +1,282 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.CommandLineUtils; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + internal static class MSBuildProcessManager + { + public static Task DotnetMSBuild( + ProjectDirectory project, + string target = "Build", + string args = null) + { + var buildArgumentList = new List + { + // Disable node-reuse. We don't want msbuild processes to stick around + // once the test is completed. + "/nr:false", + + // Always generate a bin log for debugging purposes + "/bl", + }; + + buildArgumentList.Add($"/t:{target}"); + buildArgumentList.Add($"/p:Configuration={project.Configuration}"); + buildArgumentList.Add(args); + + var buildArguments = string.Join(" ", buildArgumentList); + + return MSBuildProcessManager.RunProcessAsync(project, buildArguments); + } + + public static async Task RunProcessAsync( + ProjectDirectory project, + string arguments, + TimeSpan? timeout = null) + { + var processStartInfo = new ProcessStartInfo() + { + WorkingDirectory = project.DirectoryPath, + UseShellExecute = false, + RedirectStandardError = true, + RedirectStandardOutput = true, + }; + + processStartInfo.FileName = DotNetMuxer.MuxerPathOrDefault(); + processStartInfo.Arguments = $"msbuild {arguments}"; + + // Suppresses the 'Welcome to .NET Core!' output that times out tests and causes locked file issues. + // When using dotnet we're not guarunteed to run in an environment where the dotnet.exe has had its first run experience already invoked. + processStartInfo.EnvironmentVariables["DOTNET_SKIP_FIRST_TIME_EXPERIENCE"] = "true"; + + var processResult = await RunProcessCoreAsync(processStartInfo, timeout); + + return new MSBuildResult(project, processResult.FileName, processResult.Arguments, processResult.ExitCode, processResult.Output); + } + + internal static Task RunProcessCoreAsync( + ProcessStartInfo processStartInfo, + TimeSpan? timeout = null) + { + timeout = timeout ?? TimeSpan.FromSeconds(5 * 60); + + var process = new Process() + { + StartInfo = processStartInfo, + EnableRaisingEvents = true, + }; + + var output = new StringBuilder(); + var outputLock = new object(); + + var diagnostics = new StringBuilder(); + diagnostics.AppendLine("Process execution diagnostics:"); + + process.ErrorDataReceived += Process_ErrorDataReceived; + process.OutputDataReceived += Process_OutputDataReceived; + + process.Start(); + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + + var timeoutTask = GetTimeoutForProcess(process, timeout, diagnostics); + + var waitTask = Task.Run(() => + { + // We need to use two WaitForExit calls to ensure that all of the output/events are processed. Previously + // this code used Process.Exited, which could result in us missing some output due to the ordering of + // events. + // + // See the remarks here: https://msdn.microsoft.com/en-us/library/ty0d8k56(v=vs.110).aspx + if (!process.WaitForExit(Int32.MaxValue)) + { + // unreachable - the timeoutTask will kill the process before this happens. + throw new TimeoutException(); + } + + process.WaitForExit(); + + + string outputString; + lock (outputLock) + { + // This marks the end of the diagnostic info which we collect when something goes wrong. + diagnostics.AppendLine("Process output:"); + + // Expected output + // Process execution diagnostics: + // ... + // Process output: + outputString = diagnostics.ToString(); + outputString += output.ToString(); + } + + var result = new ProcessResult(process.StartInfo.FileName, process.StartInfo.Arguments, process.ExitCode, outputString); + return result; + }); + + return Task.WhenAny(waitTask, timeoutTask).Unwrap(); + + void Process_ErrorDataReceived(object sender, DataReceivedEventArgs e) + { + lock (outputLock) + { + output.AppendLine(e.Data); + } + } + + void Process_OutputDataReceived(object sender, DataReceivedEventArgs e) + { + lock (outputLock) + { + output.AppendLine(e.Data); + } + } + + async Task GetTimeoutForProcess(Process process, TimeSpan? timeout, StringBuilder diagnostics) + { + await Task.Delay(timeout.Value); + + // Don't timeout during debug sessions + while (Debugger.IsAttached) + { + Thread.Sleep(TimeSpan.FromSeconds(1)); + } + if (!process.HasExited) + { + await CollectDumps(process, timeout, diagnostics); + + // This is a timeout. + process.Kill(); + } + + throw new TimeoutException($"command '${process.StartInfo.FileName} {process.StartInfo.Arguments}' timed out after {timeout}. Output: {output.ToString()}"); + } + + static async Task CollectDumps(Process process, TimeSpan? timeout, StringBuilder diagnostics) + { + var procDumpProcess = await CaptureDump(process, timeout, diagnostics); + var allDotNetProcesses = Process.GetProcessesByName("dotnet"); + + var allDotNetChildProcessCandidates = allDotNetProcesses + .Where(p => p.StartTime >= process.StartTime && p.Id != process.Id); + + if (!allDotNetChildProcessCandidates.Any()) + { + diagnostics.AppendLine("Couldn't find any candidate child process."); + foreach (var dotnetProcess in allDotNetProcesses) + { + diagnostics.AppendLine($"Found dotnet process with PID {dotnetProcess.Id} and start time {dotnetProcess.StartTime}."); + } + } + + foreach (var childProcess in allDotNetChildProcessCandidates) + { + diagnostics.AppendLine($"Found child process candidate '{childProcess.Id}'."); + } + + var childrenProcessDumpProcesses = await Task.WhenAll(allDotNetChildProcessCandidates.Select(d => CaptureDump(d, timeout, diagnostics))); + foreach (var childProcess in childrenProcessDumpProcesses) + { + if (childProcess != null && childProcess.HasExited) + { + diagnostics.AppendLine($"ProcDump failed to run for child dotnet process candidate '{process.Id}'."); + childProcess.Kill(); + } + } + + if (procDumpProcess != null && procDumpProcess.HasExited) + { + diagnostics.AppendLine($"ProcDump failed to run for '{process.Id}'."); + procDumpProcess.Kill(); + } + } + + static async Task CaptureDump(Process process, TimeSpan? timeout, StringBuilder diagnostics) + { + var metadataAttributes = Assembly.GetExecutingAssembly() + .GetCustomAttributes(); + + var procDumpPath = metadataAttributes + .SingleOrDefault(ama => ama.Key == "ProcDumpToolPath")?.Value; + + if (string.IsNullOrEmpty(procDumpPath)) + { + diagnostics.AppendLine("ProcDumpPath not defined."); + return null; + } + var procDumpExePath = Path.Combine(procDumpPath, "procdump.exe"); + if (!File.Exists(procDumpExePath)) + { + diagnostics.AppendLine($"Can't find procdump.exe in '{procDumpPath}'."); + return null; + } + + var dumpDirectory = metadataAttributes + .SingleOrDefault(ama => ama.Key == "ArtifactsLogDir")?.Value; + + if (string.IsNullOrEmpty(dumpDirectory)) + { + diagnostics.AppendLine("ArtifactsLogDir not defined."); + return null; + } + + if (!Directory.Exists(dumpDirectory)) + { + diagnostics.AppendLine($"'{dumpDirectory}' does not exist."); + return null; + } + + var procDumpPattern = Path.Combine(dumpDirectory, "HangingProcess_PROCESSNAME_PID_YYMMDD_HHMMSS.dmp"); + var procDumpStartInfo = new ProcessStartInfo( + procDumpExePath, + $"-accepteula -ma {process.Id} {procDumpPattern}") + { + CreateNoWindow = true, + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true + }; + + var procDumpProcess = Process.Start(procDumpStartInfo); + var tcs = new TaskCompletionSource(); + + procDumpProcess.Exited += (s, a) => tcs.TrySetResult(null); + procDumpProcess.EnableRaisingEvents = true; + + await Task.WhenAny(tcs.Task, Task.Delay(timeout ?? TimeSpan.FromSeconds(30))); + return procDumpProcess; + } + } + + internal class ProcessResult + { + public ProcessResult(string fileName, string arguments, int exitCode, string output) + { + FileName = fileName; + Arguments = arguments; + ExitCode = exitCode; + Output = output; + } + + public string Arguments { get; } + + public string FileName { get; } + + public int ExitCode { get; } + + public string Output { get; } + } + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs new file mode 100644 index 0000000000..9a83df922b --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/MSBuildResult.cs @@ -0,0 +1,28 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.Blazor.Build +{ + internal class MSBuildResult + { + public MSBuildResult(ProjectDirectory project, string fileName, string arguments, int exitCode, string output) + { + Project = project; + FileName = fileName; + Arguments = arguments; + ExitCode = exitCode; + Output = output; + } + + public ProjectDirectory Project { get; } + + public string Arguments { get; } + + public string FileName { get; } + + public int ExitCode { get; } + + public string Output { get; } + } + +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs new file mode 100644 index 0000000000..e50b750ae4 --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectory.cs @@ -0,0 +1,211 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + internal class ProjectDirectory : IDisposable + { + public bool PreserveWorkingDirectory { get; set; } = false; + + private static readonly string RepoRoot = GetTestAttribute("Testing.RepoRoot"); + + public static ProjectDirectory Create(string projectName, string baseDirectory = "", string[] additionalProjects = null) + { + var destinationPath = Path.Combine(Path.GetTempPath(), "BlazorBuild", baseDirectory, Path.GetRandomFileName()); + Directory.CreateDirectory(destinationPath); + + try + { + if (Directory.EnumerateFiles(destinationPath).Any()) + { + throw new InvalidOperationException($"{destinationPath} should be empty"); + } + + if (string.IsNullOrEmpty(RepoRoot)) + { + throw new InvalidOperationException("RepoRoot was not specified."); + } + + var testAppsRoot = Path.Combine(RepoRoot, "src", "Components", "Blazor", "Build", "testassets"); + foreach (var project in new string[] { projectName, }.Concat(additionalProjects ?? Array.Empty())) + { + var projectRoot = Path.Combine(testAppsRoot, project); + if (!Directory.Exists(projectRoot)) + { + throw new InvalidOperationException($"Could not find project at '{projectRoot}'"); + } + + var projectDestination = Path.Combine(destinationPath, project); + var projectDestinationDir = Directory.CreateDirectory(projectDestination); + CopyDirectory(new DirectoryInfo(projectRoot), projectDestinationDir); + SetupDirectoryBuildFiles(RepoRoot, testAppsRoot, projectDestination); + } + + var directoryPath = Path.Combine(destinationPath, projectName); + var projectPath = Path.Combine(directoryPath, projectName + ".csproj"); + + CopyRepositoryAssets(destinationPath); + + return new ProjectDirectory( + destinationPath, + directoryPath, + projectPath); + } + catch + { + CleanupDirectory(destinationPath); + throw; + } + + static void CopyDirectory(DirectoryInfo source, DirectoryInfo destination, bool recursive = true) + { + foreach (var file in source.EnumerateFiles()) + { + file.CopyTo(Path.Combine(destination.FullName, file.Name)); + } + + if (!recursive) + { + return; + } + + foreach (var directory in source.EnumerateDirectories()) + { + if (directory.Name == "bin") + { + // Just in case someone has opened the project in an IDE or built it. We don't want to copy + // these folders. + continue; + } + + var created = destination.CreateSubdirectory(directory.Name); + if (directory.Name == "obj") + { + // Copy NuGet restore assets (viz all the files at the root of the obj directory, but stop there.) + CopyDirectory(directory, created, recursive: false); + } + else + { + CopyDirectory(directory, created); + } + } + } + + static void SetupDirectoryBuildFiles(string repoRoot, string testAppsRoot, string projectDestination) + { + var beforeDirectoryPropsContent = +$@" + + {repoRoot} + +"; + File.WriteAllText(Path.Combine(projectDestination, "Before.Directory.Build.props"), beforeDirectoryPropsContent); + + new List { "Directory.Build.props", "Directory.Build.targets", } + .ForEach(file => + { + var source = Path.Combine(testAppsRoot, file); + var destination = Path.Combine(projectDestination, file); + File.Copy(source, destination); + }); + } + + static void CopyRepositoryAssets(string projectRoot) + { + const string GlobalJsonFileName = "global.json"; + var globalJsonPath = Path.Combine(RepoRoot, GlobalJsonFileName); + + var destinationFile = Path.Combine(projectRoot, GlobalJsonFileName); + File.Copy(globalJsonPath, destinationFile); + } + } + + protected ProjectDirectory(string solutionPath, string directoryPath, string projectFilePath) + { + SolutionPath = solutionPath; + DirectoryPath = directoryPath; + ProjectFilePath = projectFilePath; + } + + public string DirectoryPath { get; } + + public string ProjectFilePath { get; } + + public string SolutionPath { get; } + + public string TargetFramework { get; set; } = "netstandard2.1"; + +#if DEBUG + public string Configuration => "Debug"; +#elif RELEASE + public string Configuration => "Release"; +#else +#error Configuration not supported +#endif + + public string IntermediateOutputDirectory => Path.Combine("obj", Configuration, TargetFramework); + + public string BuildOutputDirectory => Path.Combine("bin", Configuration, TargetFramework); + + public string PublishOutputDirectory => Path.Combine(BuildOutputDirectory, "publish"); + + internal void AddProjectFileContent(string content) + { + if (content == null) + { + throw new ArgumentNullException(nameof(content)); + } + + var existing = File.ReadAllText(ProjectFilePath); + var updated = existing.Replace("", content); + File.WriteAllText(ProjectFilePath, updated); + } + + public void Dispose() + { + if (PreserveWorkingDirectory) + { + Console.WriteLine($"Skipping deletion of working directory {SolutionPath}"); + } + else + { + CleanupDirectory(SolutionPath); + } + } + + internal static void CleanupDirectory(string filePath) + { + var tries = 5; + var sleep = TimeSpan.FromSeconds(3); + + for (var i = 0; i < tries; i++) + { + try + { + Directory.Delete(filePath, recursive: true); + return; + } + catch when (i < tries - 1) + { + Console.WriteLine($"Failed to delete directory {filePath}, trying again."); + Thread.Sleep(sleep); + } + } + } + + private static string GetTestAttribute(string key) + { + return typeof(ProjectDirectory).Assembly + .GetCustomAttributes() + .FirstOrDefault(f => f.Key == key) + ?.Value; + } + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs new file mode 100644 index 0000000000..23badb4296 --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/ProjectDirectoryTest.cs @@ -0,0 +1,21 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + public class ProjectDirectoryTest + { + [Fact] + public void ProjectDirectory_IsNotSetToBePreserved() + { + // Arrange + using var project = ProjectDirectory.Create("standalone"); + + // Act & Assert + // This flag is only meant for local debugging and should not be set when checking in. + Assert.False(project.PreserveWorkingDirectory); + } + } +} diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs new file mode 100644 index 0000000000..606fb88aba --- /dev/null +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs @@ -0,0 +1,69 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using System.Threading.Tasks; +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + public class PublishIntegrationTest + { + [Fact] + public async Task Publish_WithDefaultSettings_Works() + { + // Arrange + using var project = ProjectDirectory.Create("standalone"); + var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish"); + + Assert.BuildPassed(result); + + var publishDirectory = project.PublishOutputDirectory; + var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath)); + + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify web.config + Assert.FileExists(result, publishDirectory, "web.config"); + } + + [Fact] + public async Task Publish_WithLinkOnBuildDisabled_Works() + { + // Arrange + using var project = ProjectDirectory.Create("standalone"); + project.AddProjectFileContent( +@" + false +"); + + var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish"); + + Assert.BuildPassed(result); + + var publishDirectory = project.PublishOutputDirectory; + var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath)); + + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify web.config + Assert.FileExists(result, publishDirectory, "web.config"); + } + } +} diff --git a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj index 0dc2bf45eb..5b7c3827ca 100644 --- a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj +++ b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj @@ -25,16 +25,39 @@ + + + - + + + <_Parameter1>Testing.RepoRoot + <_Parameter2>$(RepoRoot) + + + + + + <_TestAsset Include="..\testassets\standalone\standalone.csproj" /> + + + + + diff --git a/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs index 5838d419d7..951b1a61df 100644 --- a/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs +++ b/src/Components/Blazor/Build/test/RuntimeDependenciesResolverTest.cs @@ -9,7 +9,7 @@ using System.Text; using Microsoft.AspNetCore.Testing; using Xunit; -namespace Microsoft.AspNetCore.Blazor.Build.Test +namespace Microsoft.AspNetCore.Blazor.Build { public class RuntimeDependenciesResolverTest { @@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test // Act - var paths = RuntimeDependenciesResolver + var paths = ResolveBlazorRuntimeDependencies .ResolveRuntimeDependenciesCore( mainAssemblyLocation, references, diff --git a/src/Components/Blazor/Build/testassets/Directory.Build.props b/src/Components/Blazor/Build/testassets/Directory.Build.props new file mode 100644 index 0000000000..cf4b11d0cf --- /dev/null +++ b/src/Components/Blazor/Build/testassets/Directory.Build.props @@ -0,0 +1,31 @@ + + + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), global.json))\ + $(RepoRoot)src\Components\ + $(ComponentsRoot)Blazor\Build\src\ + $(BlazorBuildRoot)ReferenceBlazorBuildFromSource.props + + + netcoreapp3.1 + + false + false + + + + + + + + + + + diff --git a/src/Components/Blazor/Build/testassets/Directory.Build.targets b/src/Components/Blazor/Build/testassets/Directory.Build.targets new file mode 100644 index 0000000000..8c119d5413 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/Directory.Build.targets @@ -0,0 +1,2 @@ + + diff --git a/src/Components/Blazor/Build/testassets/standalone/App.razor b/src/Components/Blazor/Build/testassets/standalone/App.razor new file mode 100644 index 0000000000..eba23da9b5 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/standalone/App.razor @@ -0,0 +1,8 @@ + + + + + +

Sorry, there's nothing at this address.

+
+
diff --git a/src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor b/src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor new file mode 100644 index 0000000000..16dac31925 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/standalone/Pages/Index.razor @@ -0,0 +1,5 @@ +@page "/" + +

Hello, world!

+ +Welcome to your new app. diff --git a/src/Components/Blazor/Build/testassets/standalone/Program.cs b/src/Components/Blazor/Build/testassets/standalone/Program.cs new file mode 100644 index 0000000000..16bfae7e43 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/standalone/Program.cs @@ -0,0 +1,10 @@ + +namespace standalone +{ + public class Program + { + public static void Main(string[] args) + { + } + } +} diff --git a/src/Components/Blazor/Build/testassets/standalone/_Imports.razor b/src/Components/Blazor/Build/testassets/standalone/_Imports.razor new file mode 100644 index 0000000000..129b440e86 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/standalone/_Imports.razor @@ -0,0 +1,2 @@ +@using Microsoft.AspNetCore.Components.Routing +@using standalone diff --git a/src/Components/Blazor/Build/testassets/standalone/standalone.csproj b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj new file mode 100644 index 0000000000..60302d4a0c --- /dev/null +++ b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj @@ -0,0 +1,16 @@ + + + + + netstandard2.1 + 3.0 + + + + + + + + + + diff --git a/src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html b/src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html new file mode 100644 index 0000000000..85994d6e89 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/standalone/wwwroot/index.html @@ -0,0 +1,24 @@ + + + + + + + standalone + + + + + + + Loading... + +
+ An unhandled error has occurred. + Reload + 🗙 +
+ + + + diff --git a/src/Components/Web.JS/.gitignore b/src/Components/Web.JS/.gitignore index 6adb603890..10999e0792 100644 --- a/src/Components/Web.JS/.gitignore +++ b/src/Components/Web.JS/.gitignore @@ -1,3 +1,2 @@ node_modules/ dist/Debug/ -dist/Release/blazor.webassembly.js \ No newline at end of file diff --git a/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj b/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj index 8e0a17ece0..4e64a10edb 100644 --- a/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj +++ b/src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj @@ -21,6 +21,8 @@ Private="false" />
+ + diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js index 77a2e1948d..e3ada49ef7 100644 --- a/src/Components/Web.JS/dist/Release/blazor.server.js +++ b/src/Components/Web.JS/dist/Release/blazor.server.js @@ -5,11 +5,11 @@ * @author Feross Aboukhadijeh * @license MIT */ -var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(15);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise(function(e,t){n[a]={resolve:e,reject:t}});try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):T(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(I,e):I(e))}function I(e){p("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(64)},f=n(38),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){ +var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(15);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise(function(e,t){n[a]={resolve:e,reject:t}});try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):T(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(I,e):I(e))}function I(e){p("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(64)},f=n(38),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(35).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;ai)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="3.1.0-dev"}]); \ No newline at end of file +function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(34).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;ai)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="0.0.0-DEV_BUILD"}]); \ No newline at end of file diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js new file mode 100644 index 0000000000..0ffca1d4e2 --- /dev/null +++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js @@ -0,0 +1 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u>2,r=Module.HEAPU32[n+1];if(r>g)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*y+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var E=document.createElement("a");function _(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file From 3c06726d77cc40580558eababbc45cb4f9e6daeb Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 22 Nov 2019 14:59:52 -0800 Subject: [PATCH 09/64] Move Mono.WebAssembly.Interop to blazor-wasm branch --- eng/ProjectReferences.props | 1 + eng/Version.Details.xml | 4 - eng/Versions.props | 1 - ...rosoft.AspNetCore.Blazor.HttpClient.csproj | 2 +- .../src/InternalCalls.cs | 25 +++ .../src/Mono.WebAssembly.Interop.csproj | 17 ++ .../src/MonoWebAssemblyJSRuntime.cs | 157 ++++++++++++++++++ src/Components/Components.sln | 18 ++ src/Components/ComponentsNoDeps.slnf | 1 + 9 files changed, 220 insertions(+), 6 deletions(-) create mode 100644 src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs create mode 100644 src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj create mode 100644 src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index 3ac3e8dbf6..d170c5aa24 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -15,6 +15,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e5f59d2cb6..92ed43ccfb 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -289,10 +289,6 @@ https://github.com/aspnet/Extensions 4ebd75b961136c7ca331866eed3403becda75681 - - https://github.com/aspnet/Extensions - 4ebd75b961136c7ca331866eed3403becda75681 - https://github.com/dotnet/corefx 0f7f38c4fd323b26da10cce95f857f77f0f09b48 diff --git a/eng/Versions.props b/eng/Versions.props index 4c61494afa..e2dd6a11fe 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -158,7 +158,6 @@ 3.1.0 3.1.0-rtm.19568.3 3.1.0 - 3.1.0-preview4.19568.3 3.1.0 3.1.0 diff --git a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj index be140d936e..18bdc5e1fe 100644 --- a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + netstandard2.0 Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly. true diff --git a/src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs b/src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs new file mode 100644 index 0000000000..60c0cdc429 --- /dev/null +++ b/src/Components/Blazor/Mono.WebAssembly.Interop/src/InternalCalls.cs @@ -0,0 +1,25 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Runtime.CompilerServices; + +namespace WebAssembly.JSInterop +{ + /// + /// Methods that map to the functions compiled into the Mono WebAssembly runtime, + /// as defined by 'mono_add_internal_call' calls in driver.c + /// + internal class InternalCalls + { + // The exact namespace, type, and method names must match the corresponding entries + // in driver.c in the Mono distribution + + // We're passing asyncHandle by ref not because we want it to be writable, but so it gets + // passed as a pointer (4 bytes). We can pass 4-byte values, but not 8-byte ones. + [MethodImpl(MethodImplOptions.InternalCall)] + public static extern string InvokeJSMarshalled(out string exception, ref long asyncHandle, string functionIdentifier, string argsJson); + + [MethodImpl(MethodImplOptions.InternalCall)] + public static extern TRes InvokeJSUnmarshalled(out string exception, string functionIdentifier, T0 arg0, T1 arg1, T2 arg2); + } +} diff --git a/src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj b/src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj new file mode 100644 index 0000000000..ea714b2d92 --- /dev/null +++ b/src/Components/Blazor/Mono.WebAssembly.Interop/src/Mono.WebAssembly.Interop.csproj @@ -0,0 +1,17 @@ + + + + netstandard2.1 + Abstractions and features for interop between Mono WebAssembly and JavaScript code. + wasm;javascript;interop + true + true + true + false + + + + + + + diff --git a/src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs b/src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs new file mode 100644 index 0000000000..654263a123 --- /dev/null +++ b/src/Components/Blazor/Mono.WebAssembly.Interop/src/MonoWebAssemblyJSRuntime.cs @@ -0,0 +1,157 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Text.Json; +using Microsoft.JSInterop; +using Microsoft.JSInterop.Infrastructure; +using WebAssembly.JSInterop; + +namespace Mono.WebAssembly.Interop +{ + /// + /// Provides methods for invoking JavaScript functions for applications running + /// on the Mono WebAssembly runtime. + /// + public class MonoWebAssemblyJSRuntime : JSInProcessRuntime + { + /// + /// Gets the used to perform operations using . + /// + private static MonoWebAssemblyJSRuntime Instance { get; set; } + + /// + /// Initializes the to be used to perform operations using . + /// + /// The instance. + protected static void Initialize(MonoWebAssemblyJSRuntime jsRuntime) + { + if (Instance != null) + { + throw new InvalidOperationException("MonoWebAssemblyJSRuntime has already been initialized."); + } + + Instance = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime)); + } + + /// + protected override string InvokeJS(string identifier, string argsJson) + { + var noAsyncHandle = default(long); + var result = InternalCalls.InvokeJSMarshalled(out var exception, ref noAsyncHandle, identifier, argsJson); + return exception != null + ? throw new JSException(exception) + : result; + } + + /// + protected override void BeginInvokeJS(long asyncHandle, string identifier, string argsJson) + { + InternalCalls.InvokeJSMarshalled(out _, ref asyncHandle, identifier, argsJson); + } + + // Invoked via Mono's JS interop mechanism (invoke_method) + private static string InvokeDotNet(string assemblyName, string methodIdentifier, string dotNetObjectId, string argsJson) + { + var callInfo = new DotNetInvocationInfo(assemblyName, methodIdentifier, dotNetObjectId == null ? default : long.Parse(dotNetObjectId), callId: null); + return DotNetDispatcher.Invoke(Instance, callInfo, argsJson); + } + + // Invoked via Mono's JS interop mechanism (invoke_method) + private static void EndInvokeJS(string argsJson) + => DotNetDispatcher.EndInvokeJS(Instance, argsJson); + + // Invoked via Mono's JS interop mechanism (invoke_method) + private static void BeginInvokeDotNet(string callId, string assemblyNameOrDotNetObjectId, string methodIdentifier, string argsJson) + { + // Figure out whether 'assemblyNameOrDotNetObjectId' is the assembly name or the instance ID + // We only need one for any given call. This helps to work around the limitation that we can + // only pass a maximum of 4 args in a call from JS to Mono WebAssembly. + string assemblyName; + long dotNetObjectId; + if (char.IsDigit(assemblyNameOrDotNetObjectId[0])) + { + dotNetObjectId = long.Parse(assemblyNameOrDotNetObjectId); + assemblyName = null; + } + else + { + dotNetObjectId = default; + assemblyName = assemblyNameOrDotNetObjectId; + } + + var callInfo = new DotNetInvocationInfo(assemblyName, methodIdentifier, dotNetObjectId, callId); + DotNetDispatcher.BeginInvokeDotNet(Instance, callInfo, argsJson); + } + + protected override void EndInvokeDotNet(DotNetInvocationInfo callInfo, in DotNetInvocationResult dispatchResult) + { + // For failures, the common case is to call EndInvokeDotNet with the Exception object. + // For these we'll serialize as something that's useful to receive on the JS side. + // If the value is not an Exception, we'll just rely on it being directly JSON-serializable. + var resultOrError = dispatchResult.Success ? dispatchResult.Result : dispatchResult.Exception.ToString(); + + // We pass 0 as the async handle because we don't want the JS-side code to + // send back any notification (we're just providing a result for an existing async call) + var args = JsonSerializer.Serialize(new[] { callInfo.CallId, dispatchResult.Success, resultOrError }, JsonSerializerOptions); + BeginInvokeJS(0, "DotNet.jsCallDispatcher.endInvokeDotNetFromJS", args); + } + + #region Custom MonoWebAssemblyJSRuntime methods + + /// + /// Invokes the JavaScript function registered with the specified identifier. + /// + /// The .NET type corresponding to the function's return value type. + /// The identifier used when registering the target function. + /// The result of the function invocation. + public TRes InvokeUnmarshalled(string identifier) + => InvokeUnmarshalled(identifier, null, null, null); + + /// + /// Invokes the JavaScript function registered with the specified identifier. + /// + /// The type of the first argument. + /// The .NET type corresponding to the function's return value type. + /// The identifier used when registering the target function. + /// The first argument. + /// The result of the function invocation. + public TRes InvokeUnmarshalled(string identifier, T0 arg0) + => InvokeUnmarshalled(identifier, arg0, null, null); + + /// + /// Invokes the JavaScript function registered with the specified identifier. + /// + /// The type of the first argument. + /// The type of the second argument. + /// The .NET type corresponding to the function's return value type. + /// The identifier used when registering the target function. + /// The first argument. + /// The second argument. + /// The result of the function invocation. + public TRes InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1) + => InvokeUnmarshalled(identifier, arg0, arg1, null); + + /// + /// Invokes the JavaScript function registered with the specified identifier. + /// + /// The type of the first argument. + /// The type of the second argument. + /// The type of the third argument. + /// The .NET type corresponding to the function's return value type. + /// The identifier used when registering the target function. + /// The first argument. + /// The second argument. + /// The third argument. + /// The result of the function invocation. + public TRes InvokeUnmarshalled(string identifier, T0 arg0, T1 arg1, T2 arg2) + { + var result = InternalCalls.InvokeJSUnmarshalled(out var exception, identifier, arg0, arg1, arg2); + return exception != null + ? throw new JSException(exception) + : result; + } + + #endregion + } +} diff --git a/src/Components/Components.sln b/src/Components/Components.sln index ba0b2476ff..36cde86285 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -246,6 +246,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests", "Blazor\Validation\test\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj", "{A5617A9D-C71E-44DE-936C-27611EB40A02}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mono.WebAssembly.Interop", "Mono.WebAssembly.Interop", "{21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.WebAssembly.Interop", "Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj", "{D141CFEE-D10A-406B-8963-F86FA13732E3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1516,6 +1520,18 @@ Global {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x64.Build.0 = Release|Any CPU {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x86.ActiveCfg = Release|Any CPU {A5617A9D-C71E-44DE-936C-27611EB40A02}.Release|x86.Build.0 = Release|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x64.Build.0 = Debug|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Debug|x86.Build.0 = Debug|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|Any CPU.Build.0 = Release|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.ActiveCfg = Release|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.Build.0 = Release|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.ActiveCfg = Release|Any CPU + {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1629,6 +1645,8 @@ Global {FD9BD646-9D50-42ED-A3E1-90558BA0C6B2} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {B70F90C7-2696-4050-B24E-BF0308F4E059} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A5617A9D-C71E-44DE-936C-27611EB40A02} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} + {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} + {D141CFEE-D10A-406B-8963-F86FA13732E3} = {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE} diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf index 09f6a0859f..61501c5101 100644 --- a/src/Components/ComponentsNoDeps.slnf +++ b/src/Components/ComponentsNoDeps.slnf @@ -17,6 +17,7 @@ "Blazor\\Templates\\src\\Microsoft.AspNetCore.Blazor.Templates.csproj", "Blazor\\Validation\\src\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj", "Blazor\\Validation\\test\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj", + "Blazor\\Mono.WebAssembly.Interop\\src\\Mono.WebAssembly.Interop.csproj", "Blazor\\testassets\\HostedInAspNet.Client\\HostedInAspNet.Client.csproj", "Blazor\\testassets\\HostedInAspNet.Server\\HostedInAspNet.Server.csproj", "Blazor\\testassets\\Microsoft.AspNetCore.Blazor.E2EPerformance\\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj", From e470aead3e842b2a9229d87bb1b097465bbfea73 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Fri, 22 Nov 2019 16:42:52 -0800 Subject: [PATCH 10/64] Remove reference assembly for Blazor.HttpClient --- eng/ProjectReferences.props | 2 +- ...crosoft.AspNetCore.Blazor.HttpClient.csproj | 10 ---------- ...NetCore.Blazor.HttpClient.netstandard2.1.cs | 18 ------------------ ...crosoft.AspNetCore.Blazor.HttpClient.csproj | 1 + 4 files changed, 2 insertions(+), 29 deletions(-) delete mode 100644 src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj delete mode 100644 src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index d170c5aa24..2d76a76785 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -15,6 +15,7 @@ + @@ -137,7 +138,6 @@ - diff --git a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj deleted file mode 100644 index 6a3ca4305d..0000000000 --- a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - netstandard2.1 - - - - - - diff --git a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs deleted file mode 100644 index f6caefbe3e..0000000000 --- a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.AspNetCore.Components -{ - public static partial class HttpClientJsonExtensions - { - [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task GetJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri) { throw null; } - public static System.Threading.Tasks.Task PostJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; } - public static System.Threading.Tasks.Task PostJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; } - public static System.Threading.Tasks.Task PutJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; } - public static System.Threading.Tasks.Task PutJsonAsync(this System.Net.Http.HttpClient httpClient, string requestUri, object content) { throw null; } - public static System.Threading.Tasks.Task SendJsonAsync(this System.Net.Http.HttpClient httpClient, System.Net.Http.HttpMethod method, string requestUri, object content) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task SendJsonAsync(this System.Net.Http.HttpClient httpClient, System.Net.Http.HttpMethod method, string requestUri, object content) { throw null; } - } -} diff --git a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj index 18bdc5e1fe..ae4ee9a8a8 100644 --- a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj @@ -4,6 +4,7 @@ netstandard2.0 Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly. true + false From e862ce7cee740dc4c1163b9629cfdffbabc34bcc Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 25 Nov 2019 10:09:06 -0800 Subject: [PATCH 11/64] Use a task to launch the linker (#17313) * Use a task to launch the linker Fixes https://github.com/aspnet/AspNetCore/issues/17264 --- .../Tasks/BlazorCreateRootDescriptorFile.cs | 56 ++++++ .../Blazor/Build/src/Tasks/BlazorILLink.cs | 189 ++++++++++++++++++ .../src/targets/Blazor.MonoRuntime.targets | 86 ++++---- .../BlazorCreateRootDescriptorFileTest.cs | 38 ++++ 4 files changed, 325 insertions(+), 44 deletions(-) create mode 100644 src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs create mode 100644 src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs create mode 100644 src/Components/Blazor/Build/test/BlazorCreateRootDescriptorFileTest.cs diff --git a/src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs b/src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs new file mode 100644 index 0000000000..1aa8536856 --- /dev/null +++ b/src/Components/Blazor/Build/src/Tasks/BlazorCreateRootDescriptorFile.cs @@ -0,0 +1,56 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Linq; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace Microsoft.AspNetCore.Blazor.Build +{ + // Based on https://github.com/mono/linker/blob/3b329b9481e300bcf4fb88a2eebf8cb5ef8b323b/src/ILLink.Tasks/CreateRootDescriptorFile.cs + public class BlazorCreateRootDescriptorFile : Task + { + [Required] + public ITaskItem[] AssemblyNames { get; set; } + + [Required] + public ITaskItem RootDescriptorFilePath { get; set; } + + public override bool Execute() + { + using var fileStream = File.Create(RootDescriptorFilePath.ItemSpec); + var assemblyNames = AssemblyNames.Select(a => a.ItemSpec); + + WriteRootDescriptor(fileStream, assemblyNames); + return true; + } + + internal static void WriteRootDescriptor(Stream stream, IEnumerable assemblyNames) + { + var roots = new XElement("linker"); + foreach (var assemblyName in assemblyNames) + { + roots.Add(new XElement("assembly", + new XAttribute("fullname", assemblyName), + new XElement("type", + new XAttribute("fullname", "*"), + new XAttribute("required", "true")))); + } + + var xmlWriterSettings = new XmlWriterSettings + { + Indent = true, + OmitXmlDeclaration = true + }; + + using var writer = XmlWriter.Create(stream, xmlWriterSettings); + var xDocument = new XDocument(roots); + + xDocument.Save(writer); + } + } +} diff --git a/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs new file mode 100644 index 0000000000..527f302a46 --- /dev/null +++ b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs @@ -0,0 +1,189 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace Microsoft.AspNetCore.Blazor.Build.Tasks +{ + // Based on https://github.com/mono/linker/blob/3b329b9481e300bcf4fb88a2eebf8cb5ef8b323b/src/ILLink.Tasks/LinkTask.cs + public class BlazorILLink : ToolTask + { + private const string DotNetHostPathEnvironmentName = "DOTNET_HOST_PATH"; + + [Required] + public string ILLinkPath { get; set; } + + [Required] + public ITaskItem[] AssemblyPaths { get; set; } + + public ITaskItem[] ReferenceAssemblyPaths { get; set; } + + [Required] + public ITaskItem[] RootAssemblyNames { get; set; } + + [Required] + public ITaskItem OutputDirectory { get; set; } + + public ITaskItem[] RootDescriptorFiles { get; set; } + + public bool ClearInitLocals { get; set; } + + public string ClearInitLocalsAssemblies { get; set; } + + public string ExtraArgs { get; set; } + + public bool DumpDependencies { get; set; } + + private string _dotnetPath; + + private string DotNetPath + { + get + { + if (!string.IsNullOrEmpty(_dotnetPath)) + { + return _dotnetPath; + } + + _dotnetPath = Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName); + if (string.IsNullOrEmpty(_dotnetPath)) + { + throw new InvalidOperationException($"{DotNetHostPathEnvironmentName} is not set"); + } + + return _dotnetPath; + } + } + + protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High; + + protected override string ToolName => Path.GetFileName(DotNetPath); + + protected override string GenerateFullPathToTool() => DotNetPath; + + protected override string GenerateCommandLineCommands() => ILLinkPath; + + private static string Quote(string path) + { + return $"\"{path.TrimEnd('\\')}\""; + } + + protected override string GenerateResponseFileCommands() + { + var args = new StringBuilder(); + + if (RootDescriptorFiles != null) + { + foreach (var rootFile in RootDescriptorFiles) + { + args.Append("-x ").AppendLine(Quote(rootFile.ItemSpec)); + } + } + + foreach (var assemblyItem in RootAssemblyNames) + { + args.Append("-a ").AppendLine(Quote(assemblyItem.ItemSpec)); + } + + var assemblyNames = new HashSet(StringComparer.OrdinalIgnoreCase); + foreach (var assembly in AssemblyPaths) + { + var assemblyPath = assembly.ItemSpec; + var assemblyName = Path.GetFileNameWithoutExtension(assemblyPath); + + // If there are multiple paths with the same assembly name, only use the first one. + if (!assemblyNames.Add(assemblyName)) + { + continue; + } + + args.Append("-reference ") + .AppendLine(Quote(assemblyPath)); + + var action = assembly.GetMetadata("action"); + if ((action != null) && (action.Length > 0)) + { + args.Append("-p "); + args.Append(action); + args.Append(" ").AppendLine(Quote(assemblyName)); + } + } + + if (ReferenceAssemblyPaths != null) + { + foreach (var assembly in ReferenceAssemblyPaths) + { + var assemblyPath = assembly.ItemSpec; + var assemblyName = Path.GetFileNameWithoutExtension(assemblyPath); + + // Don't process references for which we already have + // implementation assemblies. + if (assemblyNames.Contains(assemblyName)) + { + continue; + } + + args.Append("-reference ").AppendLine(Quote(assemblyPath)); + + // Treat reference assemblies as "skip". Ideally we + // would not even look at the IL, but only use them to + // resolve surface area. + args.Append("-p skip ").AppendLine(Quote(assemblyName)); + } + } + + if (OutputDirectory != null) + { + args.Append("-out ").AppendLine(Quote(OutputDirectory.ItemSpec)); + } + + if (ClearInitLocals) + { + args.AppendLine("--enable-opt clearinitlocals"); + if ((ClearInitLocalsAssemblies != null) && (ClearInitLocalsAssemblies.Length > 0)) + { + args.Append("-m ClearInitLocalsAssemblies "); + args.AppendLine(ClearInitLocalsAssemblies); + } + } + + if (ExtraArgs != null) + { + args.AppendLine(ExtraArgs); + } + + if (DumpDependencies) + { + args.AppendLine("--dump-dependencies"); + } + + return args.ToString(); + } + + protected override bool HandleTaskExecutionErrors() + { + // Show a slightly better error than the standard ToolTask message that says "dotnet" failed. + Log.LogError($"ILLink failed with exited code {ExitCode}."); + return false; + } + + protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) + { + if (!string.IsNullOrEmpty(singleLine) && singleLine.StartsWith("Unhandled exception.", StringComparison.Ordinal)) + { + // The Mono linker currently prints out an entire stack trace when the linker fails. + // We want to show something actionable in the VS Error window. + Log.LogError(singleLine); + } + else + { + base.LogEventsFromTextOutput(singleLine, messageImportance); + } + } + } +} diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 26cd58d0c1..beeb6cfccc 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -97,6 +97,13 @@ <_BlazorDependencyInput Include="@(ReferenceCopyLocalPaths->WithMetadataValue('Extension','.dll')->'%(FullPath)')" /> + + <_WebAssemblyBCLFolder Include=" + $(DotNetWebAssemblyBCLPath); + $(DotNetWebAssemblyBCLFacadesPath); + $(DotNetWebAssemblyFrameworkPath)" /> + + <_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" /> @@ -119,7 +126,7 @@ + DependsOnTargets="_GenerateBlazorLinkerDescriptor;_LinkBlazorApplication"> @@ -133,36 +140,27 @@ - + - - <_PrepareLinkerDescriptorAssemblyLine Include="@(IntermediateAssembly->'%(FileName)')" /> - <_GeneratedLinkerDescriptorLine Include="<linker>" /> - <_GeneratedLinkerDescriptorLine Include="@(_PrepareLinkerDescriptorAssemblyLine->'<assembly fullname="%(Identity)" />')" /> - <_GeneratedLinkerDescriptorLine Include="</linker>" /> - - - + - - - - + + + - <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)"> - $([System.String]::Copy('%(RelativeDir)').TrimEnd('\').TrimEnd('/')) - true - - - - <_WebAssemblyBCLFolder Include="$(DotNetWebAssemblyBCLPath);$(DotNetWebAssemblyBCLFacadesPath);$(DotNetWebAssemblyFrameworkPath)" /> - <_BlazorAssembliesToCopy Include="@(IntermediateAssembly->'-a "%(FullPath)"')" /> - <_BlazorFolderLookupPaths Include="@(_WebAssemblyBCLFolder->'-d "%(Identity)"')" /> + <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)" IsLinkable="$([System.String]::Copy('%(FileName)').StartsWith('System.'))" /> - - <_BlazorFolderLookupPaths Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" Include="@(_BlazorDependencyAssembly->'-d "%(RelativeDirNoTrailingSlash)"')" /> + <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" /> + <_BlazorAssemblyToLink Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" /> - - <_BlazorAssembliesToCopy Condition="'%(_BlazorDependencyAssembly.IsLinkable)' != 'true'" Include="@(_BlazorDependencyAssembly->'-a "%(FullPath)"')" /> - - <_BlazorAssemblyDescriptorFiles - Include="@(BlazorLinkerDescriptor->'-x "%(FullPath)"')" Condition="'@(BlazorLinkerDescriptor)' != ''" /> + <_BlazorLinkerRoot Include="@(IntermediateAssembly)" /> + <_BlazorLinkerRoot Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' != 'true'" /> <_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions) - <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> - - + + + <_DotNetHostDirectory>$(NetCoreRoot) + <_DotNetHostFileName>dotnet + <_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe + + + <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> @@ -214,6 +217,7 @@ + - - - <_WebAssemblyBCLFolder Include="$(DotNetWebAssemblyBCLPath);$(DotNetWebAssemblyBCLFacadesPath);$(DotNetWebAssemblyFrameworkPath)" /> - <_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" /> - - + --> Date: Mon, 25 Nov 2019 13:00:24 -0800 Subject: [PATCH 12/64] Enable WASM debugging (#17162) Changes needed so VS can connect to the Mono WebAssembly debugger via Chrome protocol --- ...lazorMonoDebugProxyAppBuilderExtensions.cs | 127 ++++++++++++++++-- 1 file changed, 113 insertions(+), 14 deletions(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs index 533cd99399..7ce7544c9b 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs @@ -9,9 +9,9 @@ using System.Linq; using System.Net; using System.Net.Http; using System.Runtime.InteropServices; +using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; -using Newtonsoft.Json; using WsProxy; namespace Microsoft.AspNetCore.Builder @@ -21,6 +21,15 @@ namespace Microsoft.AspNetCore.Builder /// public static class BlazorMonoDebugProxyAppBuilderExtensions { + private static JsonSerializerOptions JsonOptions = new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + PropertyNameCaseInsensitive = true, + IgnoreNullValues = true + }; + + private static string DefaultDebuggerHost = "http://localhost:9222"; + /// /// Adds middleware for needed for debugging Blazor applications /// inside Chromium dev tools. @@ -29,6 +38,8 @@ namespace Microsoft.AspNetCore.Builder { app.UseWebSockets(); + app.UseVisualStudioDebuggerConnectionRequestHandlers(); + app.Use((context, next) => { var requestPath = context.Request.Path; @@ -52,6 +63,85 @@ namespace Microsoft.AspNetCore.Builder }); } + private static string GetDebuggerHost() + { + var envVar = Environment.GetEnvironmentVariable("ASPNETCORE_WEBASSEMBLYDEBUGHOST"); + + if (string.IsNullOrEmpty(envVar)) + { + return DefaultDebuggerHost; + } + else + { + return envVar; + } + } + + private static int GetDebuggerPort() + { + var host = GetDebuggerHost(); + return new Uri(host).Port; + } + + private static void UseVisualStudioDebuggerConnectionRequestHandlers(this IApplicationBuilder app) + { + // Unfortunately VS doesn't send any deliberately distinguishing information so we know it's + // not a regular browser or API client. The closest we can do is look for the *absence* of a + // User-Agent header. In the future, we should try to get VS to send a special header to indicate + // this is a debugger metadata request. + app.Use(async (context, next) => + { + var request = context.Request; + var requestPath = request.Path; + if (requestPath.StartsWithSegments("/json") + && !request.Headers.ContainsKey("User-Agent")) + { + if (requestPath.Equals("/json", StringComparison.OrdinalIgnoreCase) || requestPath.Equals("/json/list", StringComparison.OrdinalIgnoreCase)) + { + var availableTabs = await GetOpenedBrowserTabs(); + + // Filter the list to only include tabs displaying the requested app, + // but only during the "choose application to debug" phase. We can't apply + // the same filter during the "connecting" phase (/json/list), nor do we need to. + if (requestPath.Equals("/json")) + { + availableTabs = availableTabs.Where(tab => tab.Url.StartsWith($"{request.Scheme}://{request.Host}{request.PathBase}/")); + } + + var proxiedTabInfos = availableTabs.Select(tab => + { + var underlyingV8Endpoint = tab.WebSocketDebuggerUrl; + var proxiedV8Endpoint = $"ws://{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}"; + return new + { + description = "", + devtoolsFrontendUrl = "", + id = tab.Id, + title = tab.Title, + type = tab.Type, + url = tab.Url, + webSocketDebuggerUrl = proxiedV8Endpoint + }; + }); + + context.Response.ContentType = "application/json"; + await context.Response.WriteAsync(JsonSerializer.Serialize(proxiedTabInfos)); + } + else if (requestPath.Equals("/json/version", StringComparison.OrdinalIgnoreCase)) + { + var browserVersionJson = await GetBrowserVersionInfoAsync(); + + context.Response.ContentType = "application/json"; + await context.Response.WriteAsync(browserVersionJson); + } + } + else + { + await next(); + } + }); + } + private static async Task DebugWebSocketProxyRequest(HttpContext context) { if (!context.WebSockets.IsWebSocketRequest) @@ -81,13 +171,13 @@ namespace Microsoft.AspNetCore.Builder // TODO: Allow overriding port (but not hostname, as we're connecting to the // local browser, not to the webserver serving the app) - var debuggerHost = "http://localhost:9222"; + var debuggerHost = GetDebuggerHost(); var debuggerTabsListUrl = $"{debuggerHost}/json"; IEnumerable availableTabs; try { - availableTabs = await GetOpenedBrowserTabs(debuggerHost); + availableTabs = await GetOpenedBrowserTabs(); } catch (Exception ex) { @@ -154,21 +244,22 @@ namespace Microsoft.AspNetCore.Builder private static string GetLaunchChromeInstructions(string appRootUrl) { var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug"); + var debuggerPort = GetDebuggerPort(); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return $@"

Press Win+R and enter the following:

-

chrome --remote-debugging-port=9222 --user-data-dir=""{profilePath}"" {appRootUrl}

"; +

chrome --remote-debugging-port={debuggerPort} --user-data-dir=""{profilePath}"" {appRootUrl}

"; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { return $@"

In a terminal window execute the following:

-

google-chrome --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}

"; +

google-chrome --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}

"; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return $@"

Execute the following:

-

open /Applications/Google\ Chrome.app --args --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}

"; +

open /Applications/Google\ Chrome.app --args --remote-debugging-port={debuggerPort} --user-data-dir={profilePath} {appRootUrl}

"; } else { @@ -179,16 +270,17 @@ namespace Microsoft.AspNetCore.Builder private static string GetLaunchEdgeInstructions(string appRootUrl) { var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug"); + var debugggerPort = GetDebuggerPort(); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return $@"

Press Win+R and enter the following:

-

msedge --remote-debugging-port=9222 --user-data-dir=""{profilePath}"" {appRootUrl}

"; +

msedge --remote-debugging-port={debugggerPort} --user-data-dir=""{profilePath}"" {appRootUrl}

"; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { return $@"

In a terminal window execute the following:

-

open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port=9222 --user-data-dir={profilePath} {appRootUrl}

"; +

open /Applications/Microsoft\ Edge\ Dev.app --args --remote-debugging-port={debugggerPort} --user-data-dir={profilePath} {appRootUrl}

"; } else { @@ -196,17 +288,24 @@ namespace Microsoft.AspNetCore.Builder } } - private static async Task> GetOpenedBrowserTabs(string debuggerHost) + private static async Task GetBrowserVersionInfoAsync() { - using (var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }) - { - var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json"); - return JsonConvert.DeserializeObject(jsonResponse); - } + using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }; + var debuggerHost = GetDebuggerHost(); + return await httpClient.GetStringAsync($"{debuggerHost}/json/version"); + } + + private static async Task> GetOpenedBrowserTabs() + { + using var httpClient = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }; + var debuggerHost = GetDebuggerHost(); + var jsonResponse = await httpClient.GetStringAsync($"{debuggerHost}/json"); + return JsonSerializer.Deserialize(jsonResponse, JsonOptions); } class BrowserTab { + public string Id { get; set; } public string Type { get; set; } public string Url { get; set; } public string Title { get; set; } From 4400467c15ccbf6df222e5d264afb7e3b850ea0d Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Mon, 25 Nov 2019 23:16:29 +0100 Subject: [PATCH 13/64] [Blazor] Fixes publishing for standalone blazor-wasm applications (#17353) * Updates the publish path on the static web assets to match the convention used by standalone blazor applications. --- .../Blazor/Build/src/targets/All.targets | 14 +------- .../Build/src/targets/StaticWebAssets.targets | 32 +++++++++++++++++++ .../PublishIntegrationTest.cs | 12 +++++-- .../RazorClassLibrary.csproj | 8 +++++ .../razorclasslibrary/wwwroot/styles.css | 1 + .../wwwroot/wwwroot/exampleJsInterop.js | 0 .../testassets/standalone/standalone.csproj | 4 +++ .../HostedInAspNet.Client.csproj | 13 -------- 8 files changed, 56 insertions(+), 28 deletions(-) create mode 100644 src/Components/Blazor/Build/src/targets/StaticWebAssets.targets create mode 100644 src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj create mode 100644 src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css create mode 100644 src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/wwwroot/exampleJsInterop.js diff --git a/src/Components/Blazor/Build/src/targets/All.targets b/src/Components/Blazor/Build/src/targets/All.targets index cff950dae7..6aa60e8227 100644 --- a/src/Components/Blazor/Build/src/targets/All.targets +++ b/src/Components/Blazor/Build/src/targets/All.targets @@ -17,6 +17,7 @@ + @@ -42,17 +43,4 @@ - - - $(GetCurrentProjectStaticWebAssetsDependsOn); - _ClearCurrentStaticWebAssetsForReferenceDiscovery - - - - - - - - - diff --git a/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets new file mode 100644 index 0000000000..02af2eec64 --- /dev/null +++ b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets @@ -0,0 +1,32 @@ + + + + + $(ResolveStaticWebAssetsInputsDependsOn); + _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets; + + + + + + + + + + + + + + + <_StandaloneExternalPublishStaticWebAsset Include="@(_ExternalPublishStaticWebAsset)" Condition="'%(RelativePath)' != ''"> + $([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$([MSBuild]::NormalizePath('$([System.Text.RegularExpressions.Regex]::Replace('%(RelativePath)','^wwwroot\\?\/?(.*)','$(BlazorPublishDistDir)$1'))'))')) + + + + + + + + + diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs index 606fb88aba..9748e10963 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Blazor.Build public async Task Publish_WithDefaultSettings_Works() { // Arrange - using var project = ProjectDirectory.Create("standalone"); + using var project = ProjectDirectory.Create("standalone", additionalProjects: new string[] { "razorclasslibrary" }); var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish"); Assert.BuildPassed(result); @@ -28,6 +28,10 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + // Verify referenced static web assets + Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css"); + // Verify static assets are in the publish directory Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); @@ -39,7 +43,7 @@ namespace Microsoft.AspNetCore.Blazor.Build public async Task Publish_WithLinkOnBuildDisabled_Works() { // Arrange - using var project = ProjectDirectory.Create("standalone"); + using var project = ProjectDirectory.Create("standalone", additionalProjects: new string[] { "razorclasslibrary" }); project.AddProjectFileContent( @" false @@ -62,6 +66,10 @@ namespace Microsoft.AspNetCore.Blazor.Build // Verify static assets are in the publish directory Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + // Verify referenced static web assets + Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css"); + // Verify web.config Assert.FileExists(result, publishDirectory, "web.config"); } diff --git a/src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj b/src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj new file mode 100644 index 0000000000..94e866815d --- /dev/null +++ b/src/Components/Blazor/Build/testassets/razorclasslibrary/RazorClassLibrary.csproj @@ -0,0 +1,8 @@ + + + + netstandard2.1 + 3.0 + + + diff --git a/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css b/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css new file mode 100644 index 0000000000..5f282702bb --- /dev/null +++ b/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/styles.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/wwwroot/exampleJsInterop.js b/src/Components/Blazor/Build/testassets/razorclasslibrary/wwwroot/wwwroot/exampleJsInterop.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Components/Blazor/Build/testassets/standalone/standalone.csproj b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj index 60302d4a0c..1b13eb3d53 100644 --- a/src/Components/Blazor/Build/testassets/standalone/standalone.csproj +++ b/src/Components/Blazor/Build/testassets/standalone/standalone.csproj @@ -13,4 +13,8 @@ + + + + diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj index cb21b79a8c..e27de695c1 100644 --- a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj +++ b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj @@ -11,17 +11,4 @@ - - - $(GetCurrentProjectStaticWebAssetsDependsOn); - _ClearCurrentStaticWebAssetsForReferenceDiscovery - - - - - - - - - From 6c961ae4e2585511cf37fe06ebc3b348b0e0008e Mon Sep 17 00:00:00 2001 From: John Luo Date: Mon, 25 Nov 2019 16:17:22 -0800 Subject: [PATCH 14/64] Update branding for Blazor packages and update baseline (#17346) * Disable baseline generation in CodeCheck --- eng/Baseline.Designer.props | 574 +++++++++--------- eng/Baseline.xml | 152 +++-- eng/Versions.props | 2 +- eng/scripts/CodeCheck.ps1 | 9 +- .../BaselineGenerator.csproj | 1 - src/Components/Blazor/Directory.Build.props | 10 + 6 files changed, 378 insertions(+), 370 deletions(-) create mode 100644 src/Components/Blazor/Directory.Build.props diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index 1e28129d00..b5c8196535 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,7 +2,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 3.0.0 + 3.1.0 @@ -16,132 +16,132 @@ - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - - - - + + + + - + - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - - - + + + + - - - + + + - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - + + @@ -186,510 +186,510 @@ - 3.0.0 + 3.1.0 - - - - + + + + - - - - + + + + - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - - - + + + - - + + - 3.0.0 + 3.1.0 - - + + - - + + - 3.0.0 + 3.1.0 - - - - - + + + + + - - - - + + + + - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - - - + + + - - - + + + - - + + - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - + - + - 3.0.0 + 3.1.0 - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - - + + + - - + + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - - + + + - - - + + + - 3.0.0 + 3.1.0 - - + + - - + + - 3.0.0 + 3.1.0 - - - + + + - - + + - 3.0.0 + 3.1.0 - - - + + + - - + + - 3.0.0 + 3.1.0 - - - - - + + + + + - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - - - + + + + - 3.0.0 + 3.1.0 - - - - + + + + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - + + - - + + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - - - - - + + + + + + - - - - - + + + + + - 3.0.0 + 3.1.0 - - - + + + - - - + + + - 3.0.0 + 3.1.0 - - + + - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - + - 3.0.0 + 3.1.0 - - - - - + + + + + - 3.0.0 + 3.1.0 - + - + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - - + + - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - - - 3.0.0 + + + 3.1.0 - - - 3.0.0 + + + 3.1.0 - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - 3.0.0 + 3.1.0 - - - + + + - 3.0.0 + 3.1.0 - - - - + + + + - - - + + + - 3.0.0 + 3.1.0 - - - + + + - - + + \ No newline at end of file diff --git a/eng/Baseline.xml b/eng/Baseline.xml index 52cbb358f4..9a5276d729 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -1,91 +1,89 @@  - - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Versions.props b/eng/Versions.props index e26ddfa77c..15e109fae6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -13,7 +13,7 @@ - false + true release true false diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index 0d9c9dfec8..007abebc8c 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -161,10 +161,11 @@ try { & $PSScriptRoot\GenerateReferenceAssemblies.ps1 -ci:$ci } - Write-Host "Re-generating package baselines" - Invoke-Block { - & dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/" - } + # Temporarily disable package baseline generation while we stage for publishing + # Write-Host "Re-generating package baselines" + # Invoke-Block { + # & dotnet run -p "$repoRoot/eng/tools/BaselineGenerator/" + # } Write-Host "Run git diff to check for pending changes" diff --git a/eng/tools/BaselineGenerator/BaselineGenerator.csproj b/eng/tools/BaselineGenerator/BaselineGenerator.csproj index df9cc7220a..775e7523c8 100644 --- a/eng/tools/BaselineGenerator/BaselineGenerator.csproj +++ b/eng/tools/BaselineGenerator/BaselineGenerator.csproj @@ -3,7 +3,6 @@ Exe $(DefaultNetCoreTargetFramework) - -s https://api.nuget.org/v3/index.json $(MSBuildThisFileDirectory)../../ diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props new file mode 100644 index 0000000000..f04afda6db --- /dev/null +++ b/src/Components/Blazor/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + + 3.1.0 + preview4 + + + \ No newline at end of file From 3c6dc1c516f2312178ceb440abebc958757316b5 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 26 Nov 2019 16:42:55 -0800 Subject: [PATCH 15/64] Try different MSBuild things to make build work (#17427) Fixes https://github.com/aspnet/AspNetCore/issues/17418 --- .../Blazor/Build/src/ReferenceFromSource.props | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Components/Blazor/Build/src/ReferenceFromSource.props b/src/Components/Blazor/Build/src/ReferenceFromSource.props index 884ddbad7a..37e2b60e16 100644 --- a/src/Components/Blazor/Build/src/ReferenceFromSource.props +++ b/src/Components/Blazor/Build/src/ReferenceFromSource.props @@ -20,6 +20,14 @@ + + + + + false - true - TargetFramework + TargetFramework=$(DefaultNetCoreTargetFramework) false From 0c381d2402d506048492aaf31908d244989da1ee Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 26 Nov 2019 16:45:42 -0800 Subject: [PATCH 16/64] Add some tests for hosted project building and publishing (#17398) * Add some tests for hosted project building and publishing --- .../Blazor/Build/src/targets/Publish.targets | 13 +- .../BuildIntegrationTest.cs | 19 +++ .../PublishIntegrationTest.cs | 120 +++++++++++++++++- ...osoft.AspNetCore.Blazor.Build.Tests.csproj | 1 + .../Build/testassets/blazorhosted/Program.cs | 15 +++ .../blazorhosted/blazorhosted.csproj | 11 ++ 6 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 src/Components/Blazor/Build/testassets/blazorhosted/Program.cs create mode 100644 src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj diff --git a/src/Components/Blazor/Build/src/targets/Publish.targets b/src/Components/Blazor/Build/src/targets/Publish.targets index 75c0ed5feb..718a02e073 100644 --- a/src/Components/Blazor/Build/src/targets/Publish.targets +++ b/src/Components/Blazor/Build/src/targets/Publish.targets @@ -40,8 +40,17 @@ <_BlazorConfigPath>$(OutDir)$(AssemblyName).blazor.config - - + + + <_BlazorPublishConfigContent Include="." /> + <_BlazorPublishConfigContent Include="$(AssemblyName)" /> + + + diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs index ddd7fcb43b..1cc39f0d6e 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs @@ -28,6 +28,25 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. } + [Fact] + public async Task Build_Hosted_Works() + { + // Arrange + using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", }); + project.TargetFramework = "netcoreapp3.1"; + var result = await MSBuildProcessManager.DotnetMSBuild(project); + + Assert.BuildPassed(result); + + var buildOutputDirectory = project.BuildOutputDirectory; + var blazorConfig = Path.Combine(buildOutputDirectory, "standalone.blazor.config"); + Assert.FileExists(result, blazorConfig); + + var path = Path.GetFullPath(Path.Combine(project.SolutionPath, "standalone", "bin", project.Configuration, "netstandard2.1", "standalone.dll")); + Assert.FileContains(result, blazorConfig, path); + Assert.FileDoesNotExist(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); + } + [Fact] public async Task Build_WithLinkOnBuildDisabled_Works() { diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs index 9748e10963..2c2ddd7e97 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Blazor.Build public async Task Publish_WithDefaultSettings_Works() { // Arrange - using var project = ProjectDirectory.Create("standalone", additionalProjects: new string[] { "razorclasslibrary" }); + using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" }); var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish"); Assert.BuildPassed(result); @@ -39,11 +39,49 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, publishDirectory, "web.config"); } + [Fact] + public async Task Publish_WithNoBuild_Works() + { + // Arrange + using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary" }); + var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build"); + + Assert.BuildPassed(result); + + result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true"); + + Assert.BuildPassed(result); + + var publishDirectory = project.PublishOutputDirectory; + var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath)); + + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify static web assets from referenced projects are copied. + // Uncomment once https://github.com/aspnet/AspNetCore/issues/17426 is resolved. + // Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js"); + // Assert.FileExists(result, blazorPublishDirectory, "dist", "_content", "RazorClassLibrary", "styles.css"); + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify web.config + Assert.FileExists(result, publishDirectory, "web.config"); + } + [Fact] public async Task Publish_WithLinkOnBuildDisabled_Works() { // Arrange - using var project = ProjectDirectory.Create("standalone", additionalProjects: new string[] { "razorclasslibrary" }); + using var project = ProjectDirectory.Create("standalone", additionalProjects: new [] { "razorclasslibrary" }); project.AddProjectFileContent( @" false @@ -73,5 +111,83 @@ namespace Microsoft.AspNetCore.Blazor.Build // Verify web.config Assert.FileExists(result, publishDirectory, "web.config"); } + + [Fact] + public async Task Publish_HostedApp_Works() + { + // Arrange + using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", }); + project.TargetFramework = "netcoreapp3.1"; + var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish"); + + Assert.BuildPassed(result); + + var publishDirectory = project.PublishOutputDirectory; + // Make sure the main project exists + Assert.FileExists(result, publishDirectory, "blazorhosted.dll"); + + var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify static web assets from referenced projects are copied. + Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js"); + Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css"); + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify web.config + Assert.FileExists(result, publishDirectory, "web.config"); + + var blazorConfig = Path.Combine(publishDirectory, "standalone.blazor.config"); + Assert.FileContains(result, blazorConfig, "."); + } + + [Fact] + public async Task Publish_HostedApp_WithNoBuild_Works() + { + // Arrange + using var project = ProjectDirectory.Create("blazorhosted", additionalProjects: new[] { "standalone", "razorclasslibrary", }); + project.TargetFramework = "netcoreapp3.1"; + var result = await MSBuildProcessManager.DotnetMSBuild(project, "Build"); + + Assert.BuildPassed(result); + + result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", "/p:NoBuild=true"); + + var publishDirectory = project.PublishOutputDirectory; + // Make sure the main project exists + Assert.FileExists(result, publishDirectory, "blazorhosted.dll"); + + var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify static web assets from referenced projects are copied. + // Uncomment once https://github.com/aspnet/AspNetCore/issues/17426 is resolved. + // Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "wwwroot", "exampleJsInterop.js"); + // Assert.FileExists(result, publishDirectory, "wwwroot", "_content", "RazorClassLibrary", "styles.css"); + + // Verify static assets are in the publish directory + Assert.FileExists(result, blazorPublishDirectory, "dist", "index.html"); + + // Verify web.config + Assert.FileExists(result, publishDirectory, "web.config"); + } } } diff --git a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj index 5b7c3827ca..652888d604 100644 --- a/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj +++ b/src/Components/Blazor/Build/test/Microsoft.AspNetCore.Blazor.Build.Tests.csproj @@ -47,6 +47,7 @@ <_TestAsset Include="..\testassets\standalone\standalone.csproj" /> + <_TestAsset Include="..\testassets\blazorhosted\blazorhosted.csproj" /> + + + netcoreapp3.1 + + + + + + + From fa010eed3246cb7e0c13035861aaf1ecacfa843e Mon Sep 17 00:00:00 2001 From: John Luo Date: Wed, 27 Nov 2019 02:39:30 -0800 Subject: [PATCH 17/64] Pin external dependencies (#17437) * Pin external dependencies --- eng/Version.Details.xml | 94 ++++++++++++++++++++--------------------- eng/Versions.props | 94 ++++++++++++++++++++--------------------- 2 files changed, 94 insertions(+), 94 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index a0a2f2c6e5..7178ef23c3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -69,19 +69,19 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -89,91 +89,91 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -181,11 +181,11 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -193,47 +193,47 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -241,23 +241,23 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -265,7 +265,7 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -277,7 +277,7 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 @@ -285,7 +285,7 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 diff --git a/eng/Versions.props b/eng/Versions.props index 15e109fae6..14b1124a01 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -103,61 +103,61 @@ 3.1.0-rtm.19572.8 3.1.0-rtm.19572.8 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 + 3.1.0 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 3.1.0-rtm.19572.8 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 3.1.0-rtm.19572.8 - 3.1.0-rtm.19572.8 + 3.1.0 3.1.0-preview4.19572.8 3.1.0-rtm.19573.1 From 46b95b25646a80ecbe38615d753e1af90bee07b6 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 26 Nov 2019 20:26:01 +0000 Subject: [PATCH 18/64] Fix wasm debugging when running on HTTPS. Fixes #17338 --- .../MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs index 7ce7544c9b..b2e18fe3ff 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs @@ -237,7 +237,8 @@ namespace Microsoft.AspNetCore.Builder var underlyingV8Endpoint = tabToDebug.WebSocketDebuggerUrl; var proxyEndpoint = $"{request.Host}{request.PathBase}/_framework/debug/ws-proxy?browser={WebUtility.UrlEncode(underlyingV8Endpoint)}"; var devToolsUrlAbsolute = new Uri(debuggerHost + tabToDebug.DevtoolsFrontendUrl); - var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?ws={proxyEndpoint}"; + var wsParamName = request.IsHttps ? "wss" : "ws"; + var devToolsUrlWithProxy = $"{devToolsUrlAbsolute.Scheme}://{devToolsUrlAbsolute.Authority}{devToolsUrlAbsolute.AbsolutePath}?{wsParamName}={proxyEndpoint}"; context.Response.Redirect(devToolsUrlWithProxy); } From 3579d8fca26f313146e28717ca7fabb1edec2d1d Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 26 Nov 2019 20:27:50 +0000 Subject: [PATCH 19/64] Fix swapped browser names. Fixes #16746 --- .../BlazorMonoDebugProxyAppBuilderExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs index b2e18fe3ff..405a7d12df 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs @@ -244,7 +244,7 @@ namespace Microsoft.AspNetCore.Builder private static string GetLaunchChromeInstructions(string appRootUrl) { - var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug"); + var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug"); var debuggerPort = GetDebuggerPort(); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -270,7 +270,7 @@ namespace Microsoft.AspNetCore.Builder private static string GetLaunchEdgeInstructions(string appRootUrl) { - var profilePath = Path.Combine(Path.GetTempPath(), "blazor-chrome-debug"); + var profilePath = Path.Combine(Path.GetTempPath(), "blazor-edge-debug"); var debugggerPort = GetDebuggerPort(); if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) From 99883719af5f694dcbec589530a3fa28364ece75 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 26 Nov 2019 20:34:19 +0000 Subject: [PATCH 20/64] Suppress msedge first run experience when debugging --- .../MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs index 405a7d12df..cbe0fe363a 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/BlazorMonoDebugProxyAppBuilderExtensions.cs @@ -276,7 +276,7 @@ namespace Microsoft.AspNetCore.Builder if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return $@"

Press Win+R and enter the following:

-

msedge --remote-debugging-port={debugggerPort} --user-data-dir=""{profilePath}"" {appRootUrl}

"; +

msedge --remote-debugging-port={debugggerPort} --user-data-dir=""{profilePath}"" --no-first-run {appRootUrl}

"; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { From 16195aaa3b81d6429dde0e80d97d95cf16673422 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Wed, 27 Nov 2019 13:08:54 +0000 Subject: [PATCH 21/64] Include .pdb files in blazor.boot.json to re-enable debugging --- .../Blazor/Build/src/targets/Blazor.MonoRuntime.targets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index beeb6cfccc..0a3ba70a23 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -186,6 +186,7 @@ <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> + <_OldLinkedFile Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" /> @@ -212,6 +213,7 @@ <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.dll" /> + <_LinkerResult Include="$(BlazorIntermediateLinkerOutputPath)*.pdb" Condition="'$(BlazorEnableDebugging)' == 'true'" /> From 1f15d60241b9c60ed783a263c2e5a1ea817252ed Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2019 18:51:32 +0000 Subject: [PATCH 22/64] [blazor-wasm] Update dependencies from dotnet/arcade aspnet/Blazor (#17307) * Update dependencies from https://github.com/aspnet/Blazor build 20191121.2 - Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19571.2 * Update dependencies from https://github.com/aspnet/Blazor build 20191126.1 - Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19576.1 * Update dependencies from https://github.com/aspnet/Blazor build 20191126.2 - Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19576.2 * Add missing extensions feed Seems like the feed with stable versions has been deleted in the updated. I've re-added it and that should fix the existing restore issues. * Pass an empty array to entry point Fixes https://github.com/aspnet/AspNetCore/issues/17419 --- NuGet.config | 5 +- eng/Version.Details.xml | 16 ++-- eng/Versions.props | 4 +- .../templates/post-build/common-variables.yml | 14 ++-- .../templates/post-build/post-build.yml | 80 ++++++++++++++++++- global.json | 4 +- .../Web.JS/dist/Release/blazor.webassembly.js | 2 +- .../Web.JS/src/Platform/Mono/MonoPlatform.ts | 6 +- 8 files changed, 103 insertions(+), 28 deletions(-) diff --git a/NuGet.config b/NuGet.config index 6a6cb16fd2..7003d991f5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,16 +3,14 @@ - - - + @@ -21,5 +19,6 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 7178ef23c3..1e00291e51 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,9 +9,9 @@ --> - + https://github.com/aspnet/Blazor - 29e997d9e23dccbd6d53fddc95972c8da95cfe75 + 062c73f28d43b3c92bd7f46fc9667d99ec5938dc https://github.com/aspnet/AspNetCore-Tooling @@ -412,17 +412,17 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/dotnet/arcade - e34d933e18ba1cd393bbafcb6018e0f858d3e89e + 0e0d227c57e69c03427d6e668716d62cf4ceb36e - + https://github.com/dotnet/arcade - e34d933e18ba1cd393bbafcb6018e0f858d3e89e + 0e0d227c57e69c03427d6e668716d62cf4ceb36e - + https://github.com/dotnet/arcade - e34d933e18ba1cd393bbafcb6018e0f858d3e89e + 0e0d227c57e69c03427d6e668716d62cf4ceb36e https://github.com/aspnet/Extensions diff --git a/eng/Versions.props b/eng/Versions.props index 14b1124a01..60c7906874 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -62,7 +62,7 @@ --> - 1.0.0-beta.19569.2 + 1.0.0-beta.19572.3 3.4.0-beta4-19569-03 @@ -96,7 +96,7 @@ 3.1.0 - 3.1.0-preview4.19572.1 + 3.1.0-preview4.19576.2 3.1.0-rtm.19572.8 3.1.0-rtm.19572.8 diff --git a/eng/common/templates/post-build/common-variables.yml b/eng/common/templates/post-build/common-variables.yml index 0a2c40c103..216d043e4e 100644 --- a/eng/common/templates/post-build/common-variables.yml +++ b/eng/common/templates/post-build/common-variables.yml @@ -13,19 +13,19 @@ variables: - name: NetCore_5_Dev_Channel_Id value: 131 - # .NET Tools - Validation - - name: NetCore_Tools_Validation_Channel_Id + # .NET Eng - Validation + - name: Net_Eng_Validation_Channel_Id value: 9 - # .NET Tools - Latest - - name: NetCore_Tools_Latest_Channel_Id + # .NET Eng - Latest + - name: Net_Eng_Latest_Channel_Id value: 2 - # .NET 3 Tools - Validation - - name: NETCore_3_Tools_Validation_Channel_Id + # .NET 3 Eng - Validation + - name: NET_3_Eng_Validation_Channel_Id value: 390 - # .NET 3 Tools - Latest + # .NET 3 Eng - name: NetCore_3_Tools_Channel_Id value: 344 diff --git a/eng/common/templates/post-build/post-build.yml b/eng/common/templates/post-build/post-build.yml index ec80c65a92..9921743bcd 100644 --- a/eng/common/templates/post-build/post-build.yml +++ b/eng/common/templates/post-build/post-build.yml @@ -126,8 +126,8 @@ stages: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'NetCore_Tools_Latest_Publish' - channelName: '.NET Tools - Latest' + stageName: 'Net_Eng_Latest_Publish' + channelName: '.NET Eng - Latest' channelId: 2 transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' @@ -138,8 +138,8 @@ stages: artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} - stageName: 'PVR_Publish' - channelName: '.NET Tools - Validation' + stageName: 'Net_Eng_Validation_Publish' + channelName: '.NET Eng - Validation' channelId: 9 transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' @@ -264,3 +264,75 @@ stages: transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json' symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_301xx_Publishing' + channelName: '.NET Core SDK 3.0.1xx' + channelId: 556 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_301xx_Internal_Publishing' + channelName: '.NET Core SDK 3.0.1xx Internal' + channelId: 555 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_311xx_Publishing' + channelName: '.NET Core SDK 3.1.1xx' + channelId: 560 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_311xx_Internal_Publishing' + channelName: '.NET Core SDK 3.1.1xx Internal' + channelId: 559 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-public-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_312xx_Publishing' + channelName: '.NET Core SDK 3.1.2xx' + channelId: 558 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json' + +- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml + parameters: + artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }} + publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }} + symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }} + stageName: 'NETCore_SDK_312xx_Internal_Publishing' + channelName: '.NET Core SDK 3.1.2xx Internal' + channelId: 557 + transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json' + shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json' + symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json' \ No newline at end of file diff --git a/global.json b/global.json index 5289c25502..1333ea9ce6 100644 --- a/global.json +++ b/global.json @@ -25,7 +25,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.15.2", - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19569.2", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19569.2" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19572.3", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19572.3" } } diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js index 0ffca1d4e2..d125cc352f 100644 --- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js +++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u>2,r=Module.HEAPU32[n+1];if(r>g)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*y+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var E=document.createElement("a");function _(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u>2,r=Module.HEAPU32[n+1];if(r>b)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*g+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var _=document.createElement("a");function I(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index 8858552747..31fee329d6 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -12,6 +12,7 @@ let find_class: (assemblyHandle: number, namespace: string, className: string) = let find_method: (typeHandle: number, methodName: string, unknownArg: number) => MethodHandle; let invoke_method: (method: MethodHandle, target: System_Object, argsArrayPtr: number, exceptionFlagIntPtr: number) => System_Object; let mono_call_assembly_entry_point: (assemblyName: string, args: System_Object[]) => System_Object; +let mono_obj_array_new: (length: number) => System_Object; let mono_string_get_utf8: (managedString: System_String) => Mono.Utf8Ptr; let mono_string: (jsString: string) => System_String; const appBinDirName = 'appBinDir'; @@ -41,7 +42,8 @@ export const monoPlatform: Platform = { findMethod: findMethod, callEntryPoint: function callEntryPoint(assemblyName: string): System_Object { - return mono_call_assembly_entry_point(assemblyName, []); + const empty_array = mono_obj_array_new(0); + return mono_call_assembly_entry_point(assemblyName, [empty_array]); }, callMethod: function callMethod(method: MethodHandle, target: System_Object, args: System_Object[]): System_Object { @@ -262,8 +264,10 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () ]); mono_call_assembly_entry_point = Module.mono_call_assembly_entry_point; + mono_string_get_utf8 = Module.cwrap('mono_wasm_string_get_utf8', 'number', ['number']); mono_string = Module.cwrap('mono_wasm_string_from_js', 'number', ['string']); + mono_obj_array_new = Module.cwrap ('mono_wasm_obj_array_new', 'number', ['number']); MONO.loaded_files = []; From 0c11c75641bad2382d8c8e99713efe579ca009be Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 27 Nov 2019 19:50:50 -0800 Subject: [PATCH 23/64] [Blazor] Fix Blazor.build package (#17463) --- .../Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec index b242d7cb1a..a3e099dee6 100644 --- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.nuspec @@ -11,7 +11,7 @@ - + From 548ae26e219b9c1740de45fd4a0db8b3294fcef6 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Thu, 28 Nov 2019 10:54:25 +0000 Subject: [PATCH 24/64] Fix Blazor WebAssembly hosted publishing --- src/Components/Blazor/Build/src/targets/Publish.targets | 2 +- .../test/BuildIntegrationTests/PublishIntegrationTest.cs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Components/Blazor/Build/src/targets/Publish.targets b/src/Components/Blazor/Build/src/targets/Publish.targets index 718a02e073..7cb7e0ad23 100644 --- a/src/Components/Blazor/Build/src/targets/Publish.targets +++ b/src/Components/Blazor/Build/src/targets/Publish.targets @@ -43,7 +43,7 @@ <_BlazorPublishConfigContent Include="." /> - <_BlazorPublishConfigContent Include="$(AssemblyName)" /> + <_BlazorPublishConfigContent Include="$(AssemblyName)/" /> Date: Thu, 28 Nov 2019 23:12:44 +0100 Subject: [PATCH 25/64] [Blazor] Pins the SDK version to 3.1 and forces Blazor projects to compile against it (#17479) --- NuGet.config | 1 + eng/ProjectReferences.props | 2 +- eng/Version.Details.xml | 40 +++++++++---------- eng/Versions.props | 20 +++++----- global.json | 4 +- .../blazorhosted/blazorhosted.csproj | 1 + ...crosoft.AspNetCore.Blazor.DevServer.csproj | 7 ++-- src/Components/Blazor/Directory.Build.props | 5 ++- src/Components/Blazor/Directory.Build.targets | 1 + .../Microsoft.AspNetCore.Blazor.Server.csproj | 16 -------- ...oft.AspNetCore.Blazor.Server.netcoreapp.cs | 22 ---------- .../Microsoft.AspNetCore.Blazor.Server.csproj | 8 ++-- .../HostedInAspNet.Server.csproj | 5 ++- .../testassets/MonoSanity/MonoSanity.csproj | 4 +- src/Components/Directory.Build.props | 4 ++ src/Components/Directory.Build.targets | 20 ++++++++++ ...soft.AspNetCore.Components.E2ETests.csproj | 3 ++ .../TestServer/Components.TestServer.csproj | 8 +--- .../Infrastructure/GenerateTestProps.targets | 5 ++- 19 files changed, 84 insertions(+), 92 deletions(-) delete mode 100644 src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj delete mode 100644 src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs diff --git a/NuGet.config b/NuGet.config index 7003d991f5..b6e782858b 100644 --- a/NuGet.config +++ b/NuGet.config @@ -13,6 +13,7 @@ + diff --git a/eng/ProjectReferences.props b/eng/ProjectReferences.props index 2d76a76785..350c026a7d 100644 --- a/eng/ProjectReferences.props +++ b/eng/ProjectReferences.props @@ -17,6 +17,7 @@ + @@ -138,7 +139,6 @@ - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 1e00291e51..4d4af8a44a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -29,33 +29,33 @@ https://github.com/aspnet/AspNetCore-Tooling abd3c17b317dbe455b18a4f5937c43e0fc7a2944 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 - + https://github.com/aspnet/EntityFrameworkCore - a2f33c7d5125c6f3b671e55eb1bc58489041ad01 + 82c6ea483d3a17393dad5986df9a8eef89ddcd07 https://github.com/aspnet/Extensions @@ -381,21 +381,21 @@ https://github.com/dotnet/corefx 0f7f38c4fd323b26da10cce95f857f77f0f09b48 - + https://github.com/dotnet/core-setup - 9541fa09c354ea9288db00b8c1b95a34a3abdcdc + 65f04fb6db7a5e198d05dbebd5c4ad21eb018f89 - + https://github.com/dotnet/core-setup - 9541fa09c354ea9288db00b8c1b95a34a3abdcdc + 65f04fb6db7a5e198d05dbebd5c4ad21eb018f89 - + https://github.com/dotnet/core-setup - 9541fa09c354ea9288db00b8c1b95a34a3abdcdc + 65f04fb6db7a5e198d05dbebd5c4ad21eb018f89 https://github.com/dotnet/core-setup diff --git a/eng/Versions.props b/eng/Versions.props index 60c7906874..57ce7893d7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -66,9 +66,9 @@ 3.4.0-beta4-19569-03 - 3.1.1-servicing.19572.8 - 3.1.1-servicing.19572.8 - 3.1.1-servicing.19572.8 + 3.1.0 + 3.1.0 + 3.1.0 2.1.0 1.1.0 @@ -160,13 +160,13 @@ 3.1.0 3.1.0-preview4.19572.8 - 3.1.0-rtm.19573.1 - 3.1.0-rtm.19573.1 - 3.1.0-rtm.19573.1 - 3.1.0-rtm.19573.1 - 3.1.0-rtm.19573.1 - 3.1.0-rtm.19573.1 - 3.1.0-rtm.19573.1 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 + 3.1.0 3.1.0-rtm.19573.1 3.1.0-rtm.19573.1 diff --git a/global.json b/global.json index 1333ea9ce6..f8f800baef 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "3.1.100-preview1-014400" + "version": "3.1.100" }, "tools": { - "dotnet": "3.1.100-preview1-014400", + "dotnet": "3.1.100", "runtimes": { "dotnet/x64": [ "$(MicrosoftNETCoreAppRuntimeVersion)" diff --git a/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj b/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj index 3b08400ff7..5a89588d8c 100644 --- a/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj +++ b/src/Components/Blazor/Build/testassets/blazorhosted/blazorhosted.csproj @@ -2,6 +2,7 @@ netcoreapp3.1 + true diff --git a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj index d18ab7c9e4..be0bd7f87b 100644 --- a/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj +++ b/src/Components/Blazor/DevServer/src/Microsoft.AspNetCore.Blazor.DevServer.csproj @@ -11,15 +11,14 @@ Development server for use when building Blazor applications. false + + + true
- - - - diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props index f04afda6db..9e35475c86 100644 --- a/src/Components/Blazor/Directory.Build.props +++ b/src/Components/Blazor/Directory.Build.props @@ -6,5 +6,8 @@ 3.1.0 preview4 + + 3.1.0
- \ No newline at end of file + diff --git a/src/Components/Blazor/Directory.Build.targets b/src/Components/Blazor/Directory.Build.targets index 178608d3e5..e1a17eb9ca 100644 --- a/src/Components/Blazor/Directory.Build.targets +++ b/src/Components/Blazor/Directory.Build.targets @@ -4,4 +4,5 @@ $(PackageVersion) + diff --git a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj deleted file mode 100644 index 9222fac02f..0000000000 --- a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - $(DefaultNetCoreTargetFramework) - - - - - - - - - - - - diff --git a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs b/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs deleted file mode 100644 index 74cf8a6a8b..0000000000 --- a/src/Components/Blazor/Server/ref/Microsoft.AspNetCore.Blazor.Server.netcoreapp.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.AspNetCore.Builder -{ - public static partial class BlazorHostingApplicationBuilderExtensions - { - public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClientSideBlazorFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string clientAssemblyFilePath) { throw null; } - public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseClientSideBlazorFiles(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) { throw null; } - } - public static partial class BlazorHostingEndpointRouteBuilderExtensions - { - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string clientAssemblyFilePath, string filePath) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string clientAssemblyFilePath, string pattern, string filePath) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string filePath) { throw null; } - public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToClientSideBlazor(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string filePath) { throw null; } - } - public static partial class BlazorMonoDebugProxyAppBuilderExtensions - { - public static void UseBlazorDebugging(this Microsoft.AspNetCore.Builder.IApplicationBuilder app) { } - } -} diff --git a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj index 2d7b2d8fb4..0ad19d5362 100644 --- a/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj +++ b/src/Components/Blazor/Server/src/Microsoft.AspNetCore.Blazor.Server.csproj @@ -4,6 +4,9 @@ $(DefaultNetCoreTargetFramework) Runtime server features for ASP.NET Core Blazor applications. true + false + + true @@ -11,11 +14,6 @@ - - - - - diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj index 224ada3963..389b41c63f 100644 --- a/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj +++ b/src/Components/Blazor/testassets/HostedInAspNet.Server/HostedInAspNet.Server.csproj @@ -2,6 +2,9 @@ $(DefaultNetCoreTargetFramework) + + true + @@ -10,8 +13,6 @@ - - diff --git a/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj b/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj index 5297f5bca6..464f63b57c 100644 --- a/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj +++ b/src/Components/Blazor/testassets/MonoSanity/MonoSanity.csproj @@ -2,6 +2,8 @@ $(DefaultNetCoreTargetFramework) + + true @@ -9,9 +11,7 @@ - - diff --git a/src/Components/Directory.Build.props b/src/Components/Directory.Build.props index 02d423b43e..ef310ac60d 100644 --- a/src/Components/Directory.Build.props +++ b/src/Components/Directory.Build.props @@ -12,6 +12,10 @@ aspnetcore;components + + 3.1.0 + $(MSBuildThisFileDirectory)Shared\ diff --git a/src/Components/Directory.Build.targets b/src/Components/Directory.Build.targets index b992960cc3..b6b1f773d9 100644 --- a/src/Components/Directory.Build.targets +++ b/src/Components/Directory.Build.targets @@ -3,6 +3,26 @@ true + + + + + + netcoreapp3.1 + Microsoft.AspNetCore.App + $(LatestAspNetCoreReferenceVersion) + $(LatestAspNetCoreReferenceVersion) + Microsoft.AspNetCore.App.Ref + $(LatestAspNetCoreReferenceVersion) + Microsoft.AspNetCore.App.Runtime.**RID** + linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86 + true + + + + diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index 78fc48dc82..ac69ac235a 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -7,6 +7,9 @@ $(DefaultNetCoreTargetFramework) Components.E2ETests + + true + false diff --git a/src/Components/test/testassets/TestServer/Components.TestServer.csproj b/src/Components/test/testassets/TestServer/Components.TestServer.csproj index 6c29275b2c..a627c1160f 100644 --- a/src/Components/test/testassets/TestServer/Components.TestServer.csproj +++ b/src/Components/test/testassets/TestServer/Components.TestServer.csproj @@ -2,18 +2,14 @@ $(DefaultNetCoreTargetFramework) + + true - - - - - - diff --git a/src/ProjectTemplates/test/Infrastructure/GenerateTestProps.targets b/src/ProjectTemplates/test/Infrastructure/GenerateTestProps.targets index 4fa7130601..ea67b88cfa 100644 --- a/src/ProjectTemplates/test/Infrastructure/GenerateTestProps.targets +++ b/src/ProjectTemplates/test/Infrastructure/GenerateTestProps.targets @@ -16,6 +16,9 @@ %(_TargetingPackVersionInfo.PackageVersion) $(AspNetCoreBaselineVersion) + + + $(AspNetCoreBaselineVersion) @@ -34,7 +37,7 @@ MicrosoftNETCorePlatformsPackageVersion=$(MicrosoftNETCorePlatformsPackageVersion); MicrosoftNETSdkRazorPackageVersion=$(MicrosoftNETSdkRazorPackageVersion); MicrosoftAspNetCoreAppRefPackageVersion=$(MicrosoftAspNetCoreAppRefPackageVersion); - MicrosoftAspNetCoreAppRuntimePackageVersion=@(_RuntimePackageVersionInfo->'%(PackageVersion)'); + MicrosoftAspNetCoreAppRuntimePackageVersion=$(MicrosoftAspNetCoreAppRuntimePackageVersion); SupportedRuntimeIdentifiers=$(SupportedRuntimeIdentifiers); DefaultNetCoreTargetFramework=$(DefaultNetCoreTargetFramework); From ca893e25a5f41e239a25465be54b38c685f114fd Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson Date: Fri, 29 Nov 2019 20:44:14 +0100 Subject: [PATCH 26/64] [Blazor] Fixes publish issue with static web assets on hosted scenarios (#17496) --- .../Blazor/Build/src/targets/StaticWebAssets.targets | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets index 02af2eec64..d547f500b1 100644 --- a/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets +++ b/src/Components/Blazor/Build/src/targets/StaticWebAssets.targets @@ -5,6 +5,11 @@ $(ResolveStaticWebAssetsInputsDependsOn); _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets; + + + $(GetCurrentProjectStaticWebAssetsDependsOn); + _RemoveBlazorCurrentProjectAssetsFromStaticWebAssets; + From 40a0173e9d9410cfdcd0c5afe33bec3e1165092f Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2019 21:46:00 +0000 Subject: [PATCH 27/64] [blazor-wasm] Update dependencies from dotnet/arcade aspnet/Blazor (#17471) * Update dependencies from https://github.com/dotnet/arcade build 20191127.5 - Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19577.5 - Microsoft.DotNet.GenAPI - 1.0.0-beta.19577.5 - Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19577.5 * Update dependencies from https://github.com/aspnet/Blazor build 20191127.1 - Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19577.1 * [Blazor] Fix Blazor.build package (#17463) * Update dependencies from https://github.com/aspnet/Blazor build 20191128.1 - Microsoft.AspNetCore.Blazor.Mono - 3.1.0-preview4.19578.1 * Fix Blazor WebAssembly hosted publishing * [Blazor] Pins the SDK version to 3.1 and forces Blazor projects to compile against it (#17479) * [Blazor] Fixes publish issue with static web assets on hosted scenarios (#17496) --- NuGet.config | 1 - eng/Version.Details.xml | 16 ++-- eng/Versions.props | 4 +- eng/common/SetupNugetSources.ps1 | 127 +++++++++++++++++++++++++++++++ eng/common/SetupNugetSources.sh | 117 ++++++++++++++++++++++++++++ global.json | 4 +- 6 files changed, 256 insertions(+), 13 deletions(-) create mode 100644 eng/common/SetupNugetSources.ps1 create mode 100644 eng/common/SetupNugetSources.sh diff --git a/NuGet.config b/NuGet.config index b6e782858b..1429800526 100644 --- a/NuGet.config +++ b/NuGet.config @@ -10,7 +10,6 @@ - diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4d4af8a44a..9995176df3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,9 +9,9 @@ --> - + https://github.com/aspnet/Blazor - 062c73f28d43b3c92bd7f46fc9667d99ec5938dc + 9ff01af4257317a90b64959fe1c87aef3da4a36f https://github.com/aspnet/AspNetCore-Tooling @@ -412,17 +412,17 @@ https://github.com/aspnet/Extensions 1c5c7777ea9a19d54ab67ec1521665c99460efc5 - + https://github.com/dotnet/arcade - 0e0d227c57e69c03427d6e668716d62cf4ceb36e + 99c6b59a8afff97fe891341b39abe985f1d3c565 - + https://github.com/dotnet/arcade - 0e0d227c57e69c03427d6e668716d62cf4ceb36e + 99c6b59a8afff97fe891341b39abe985f1d3c565 - + https://github.com/dotnet/arcade - 0e0d227c57e69c03427d6e668716d62cf4ceb36e + 99c6b59a8afff97fe891341b39abe985f1d3c565 https://github.com/aspnet/Extensions diff --git a/eng/Versions.props b/eng/Versions.props index 57ce7893d7..f0ed1e284f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -62,7 +62,7 @@ --> - 1.0.0-beta.19572.3 + 1.0.0-beta.19577.5 3.4.0-beta4-19569-03 @@ -96,7 +96,7 @@ 3.1.0 - 3.1.0-preview4.19576.2 + 3.1.0-preview4.19578.1 3.1.0-rtm.19572.8 3.1.0-rtm.19572.8 diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1 new file mode 100644 index 0000000000..2cb40c2947 --- /dev/null +++ b/eng/common/SetupNugetSources.ps1 @@ -0,0 +1,127 @@ +# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. +# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# +# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry +# under for each Maestro managed private feed. Two additional credential +# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. +# +# This script needs to be called in every job that will restore packages and which the base repo has +# private AzDO feeds in the NuGet.config. +# +# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` +# from the AzureDevOps-Artifact-Feeds-Pats variable group. +# +# - task: PowerShell@2 +# displayName: Setup Private Feeds Credentials +# condition: eq(variables['Agent.OS'], 'Windows_NT') +# inputs: +# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1 +# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token +# env: +# Token: $(dn-bot-dnceng-artifact-feeds-rw) + +[CmdletBinding()] +param ( + [Parameter(Mandatory = $true)][string]$ConfigFile, + [Parameter(Mandatory = $true)][string]$Password +) + +$ErrorActionPreference = "Stop" +Set-StrictMode -Version 2.0 +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +. $PSScriptRoot\tools.ps1 + +# Add source entry to PackageSources +function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) { + $packageSource = $sources.SelectSingleNode("add[@key='$SourceName']") + + if ($packageSource -eq $null) + { + $packageSource = $doc.CreateElement("add") + $packageSource.SetAttribute("key", $SourceName) + $packageSource.SetAttribute("value", $SourceEndPoint) + $sources.AppendChild($packageSource) | Out-Null + } + else { + Write-Host "Package source $SourceName already present." + } + + AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password +} + +# Add a credential node for the specified source +function AddCredential($creds, $source, $username, $password) { + # Looks for credential configuration for the given SourceName. Create it if none is found. + $sourceElement = $creds.SelectSingleNode($Source) + if ($sourceElement -eq $null) + { + $sourceElement = $doc.CreateElement($Source) + $creds.AppendChild($sourceElement) | Out-Null + } + + # Add the node to the credential if none is found. + $usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']") + if ($usernameElement -eq $null) + { + $usernameElement = $doc.CreateElement("add") + $usernameElement.SetAttribute("key", "Username") + $sourceElement.AppendChild($usernameElement) | Out-Null + } + $usernameElement.SetAttribute("value", $Username) + + # Add the to the credential if none is found. + # Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs. + # -> https://github.com/NuGet/Home/issues/5526 + $passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']") + if ($passwordElement -eq $null) + { + $passwordElement = $doc.CreateElement("add") + $passwordElement.SetAttribute("key", "ClearTextPassword") + $sourceElement.AppendChild($passwordElement) | Out-Null + } + $passwordElement.SetAttribute("value", $Password) +} + +function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) { + $maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]") + + Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds." + + ForEach ($PackageSource in $maestroPrivateSources) { + Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key + AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password + } +} + +if (!(Test-Path $ConfigFile -PathType Leaf)) { + Write-Host "Couldn't find the file NuGet config file: $ConfigFile" + ExitWithExitCode 1 +} + +# Load NuGet.config +$doc = New-Object System.Xml.XmlDocument +$filename = (Get-Item $ConfigFile).FullName +$doc.Load($filename) + +# Get reference to or create one if none exist already +$sources = $doc.DocumentElement.SelectSingleNode("packageSources") +if ($sources -eq $null) { + $sources = $doc.CreateElement("packageSources") + $doc.DocumentElement.AppendChild($sources) | Out-Null +} + +# Looks for a node. Create it if none is found. +$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials") +if ($creds -eq $null) { + $creds = $doc.CreateElement("packageSourceCredentials") + $doc.DocumentElement.AppendChild($creds) | Out-Null +} + +# Insert credential nodes for Maestro's private feeds +InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password + +AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password +AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password + +$doc.Save($filename) diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh new file mode 100644 index 0000000000..1264521317 --- /dev/null +++ b/eng/common/SetupNugetSources.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds. +# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080 +# +# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry +# under for each Maestro's managed private feed. Two additional credential +# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport. +# +# This script needs to be called in every job that will restore packages and which the base repo has +# private AzDO feeds in the NuGet.config. +# +# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)` +# from the AzureDevOps-Artifact-Feeds-Pats variable group. +# +# - task: Bash@3 +# displayName: Setup Private Feeds Credentials +# inputs: +# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh +# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token +# condition: ne(variables['Agent.OS'], 'Windows_NT') +# env: +# Token: $(dn-bot-dnceng-artifact-feeds-rw) + +ConfigFile=$1 +CredToken=$2 +NL='\n' +TB=' ' + +source="${BASH_SOURCE[0]}" + +# resolve $source until the file is no longer a symlink +while [[ -h "$source" ]]; do + scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + source="$(readlink "$source")" + # if $source was a relative symlink, we need to resolve it relative to the path where the + # symlink file was located + [[ $source != /* ]] && source="$scriptroot/$source" +done +scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" + +. "$scriptroot/tools.sh" + +if [ ! -f "$ConfigFile" ]; then + echo "Couldn't find the file NuGet config file: $ConfigFile" + ExitWithExitCode 1 +fi + +if [[ `uname -s` == "Darwin" ]]; then + NL=$'\\\n' + TB='' +fi + +# Ensure there is a ... section. +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding ... section." + ConfigNodeHeader="" + PackageSourcesTemplate="${TB}${NL}${TB}" + + sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config +fi + +# Ensure there is a ... section. +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding ... section." + + PackageSourcesNodeFooter="" + PackageSourceCredentialsTemplate="${TB}${NL}${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config +fi + +# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding dotnet3-internal to the packageSources." + + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config +fi + +# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources +grep -i "" $ConfigFile +if [ "$?" != "0" ]; then + echo "Adding dotnet3-internal-transport to the packageSources." + + PackageSourcesNodeFooter="" + PackageSourceTemplate="${TB}" + + sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config +fi + +# I want things split line by line +PrevIFS=$IFS +IFS=$'\n' +PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"') +IFS=$PrevIFS + +PackageSources+=('dotnet3-internal') +PackageSources+=('dotnet3-internal-transport') + +for FeedName in ${PackageSources[@]} ; do + # Check if there is no existing credential for this FeedName + grep -i "<$FeedName>" $ConfigFile + if [ "$?" != "0" ]; then + echo "Adding credentials for $FeedName." + + PackageSourceCredentialsNodeFooter="" + NewCredential="${TB}${TB}<$FeedName>${NL}${NL}${NL}" + + sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config + fi +done diff --git a/global.json b/global.json index f8f800baef..13a042781e 100644 --- a/global.json +++ b/global.json @@ -25,7 +25,7 @@ }, "msbuild-sdks": { "Yarn.MSBuild": "1.15.2", - "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19572.3", - "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19572.3" + "Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19577.5", + "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19577.5" } } From 76ae0a2e217a290677418838db90c9173d555d61 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 3 Dec 2019 13:47:33 -0800 Subject: [PATCH 28/64] Build fewer things in blazor-wasm (#17533) --- .azure/pipelines/ci.yml | 358 +----------------- eng/Build.props | 5 + .../test/BlazorServerTemplateTest.cs | 168 -------- .../test/EmptyWebTemplateTest.cs | 73 ---- src/ProjectTemplates/test/GrpcTemplateTest.cs | 89 ----- .../test/IdentityUIPackageTest.cs | 190 ---------- .../ItemTemplateTests/BlazorServerTests.cs | 36 -- src/ProjectTemplates/test/MvcTemplateTest.cs | 216 ----------- .../test/RazorClassLibraryTemplateTest.cs | 62 --- .../test/RazorPagesTemplateTest.cs | 222 ----------- .../SpaTemplateTest/AngularTemplateTest.cs | 30 -- .../SpaTemplateTest/ReactReduxTemplateTest.cs | 23 -- .../test/SpaTemplateTest/ReactTemplateTest.cs | 32 -- .../SpaTemplateTest/SpaTemplateTestBase.cs | 339 ----------------- .../test/WebApiTemplateTest.cs | 70 ---- .../test/WorkerTemplateTest.cs | 56 --- 16 files changed, 7 insertions(+), 1962 deletions(-) delete mode 100644 src/ProjectTemplates/test/BlazorServerTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/EmptyWebTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/GrpcTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/IdentityUIPackageTest.cs delete mode 100644 src/ProjectTemplates/test/ItemTemplateTests/BlazorServerTests.cs delete mode 100644 src/ProjectTemplates/test/MvcTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/RazorPagesTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/SpaTemplateTest/AngularTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/SpaTemplateTest/ReactReduxTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/SpaTemplateTest/ReactTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs delete mode 100644 src/ProjectTemplates/test/WebApiTemplateTest.cs delete mode 100644 src/ProjectTemplates/test/WorkerTemplateTest.cs diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 2d9fa95fb4..926e0b934a 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -69,26 +69,11 @@ variables: # used for post-build phases, internal builds only - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - group: DotNet-AspNet-SDLValidation-Params - + stages: - stage: build displayName: Build jobs: - # Code check - - template: jobs/default-build.yml - parameters: - jobName: Code_check - jobDisplayName: Code check - agentOs: Windows - steps: - - powershell: ./eng/scripts/CodeCheck.ps1 -ci - displayName: Run eng/scripts/CodeCheck.ps1 - artifacts: - - name: Code_Check_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - # Build Windows (x64/x86) - template: jobs/default-build.yml parameters: @@ -114,34 +99,11 @@ stages: -arch x64 -pack -all - -buildNative + -NoBuildNative /bl:artifacts/log/build.x64.binlog $(_BuildArgs) displayName: Build x64 - # Build the x86 shared framework - # TODO: make it possible to build for one Windows architecture at a time - # This is going to actually build x86 native assets. See https://github.com/aspnet/AspNetCore/issues/7196 - - script: ./build.cmd - -ci - -arch x86 - -pack - -all - -buildNative - -noBuildJava - /p:OnlyPackPlatformSpecificPackages=true - /bl:artifacts/log/build.x86.binlog - $(_BuildArgs) - displayName: Build x86 - - # This is in a separate build step with -forceCoreMsbuild to workaround MAX_PATH limitations - https://github.com/Microsoft/msbuild/issues/53 - - script: .\src\SiteExtensions\build.cmd - -ci - -pack - -noBuildDeps - $(_BuildArgs) - displayName: Build SiteExtension - # This runs code-signing on all packages, zips, and jar files as defined in build/CodeSign.targets. If https://github.com/dotnet/arcade/issues/1957 is resolved, # consider running code-signing inline with the other previous steps. # Sign check is disabled because it is run in a separate step below, after installers are built. @@ -155,29 +117,6 @@ stages: $(_BuildArgs) displayName: Code sign packages - # Windows installers bundle both x86 and x64 assets - - script: ./build.cmd - -ci - -sign - -buildInstallers - /bl:artifacts/log/installers.msbuild.binlog - /p:DotNetSignType=$(_SignType) - /p:AssetManifestFileName=aspnetcore-win-x64-x86.xml - $(_BuildArgs) - $(_PublishArgs) - /p:PublishInstallerBaseVersion=true - displayName: Build Installers - - # A few files must also go to the VS package feed. - - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - - task: NuGetCommand@2 - displayName: Push Visual Studio packages - inputs: - command: push - packagesToPush: 'artifacts/packages/**/VS.Redist.Common.AspNetCore.*.nupkg' - nuGetFeedType: external - publishFeedCredentials: 'DevDiv - VS package feed' - artifacts: - name: Windows_Logs path: artifacts/log/ @@ -186,251 +125,6 @@ stages: - name: Windows_Packages path: artifacts/packages/ - # Build Windows ARM - - template: jobs/default-build.yml - parameters: - codeSign: true - jobName: Windows_arm_build - jobDisplayName: "Build: Windows ARM" - agentOs: Windows - buildArgs: - -arch arm - -sign - -pack - -noBuildNodeJS - -noBuildJava - /bl:artifacts/log/build.win-arm.binlog - /p:DotNetSignType=$(_SignType) - /p:OnlyPackPlatformSpecificPackages=true - /p:AssetManifestFileName=aspnetcore-win-arm.xml - $(_BuildArgs) - $(_PublishArgs) - installNodeJs: false - installJdk: false - artifacts: - - name: Windows_arm_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Windows_arm_Packages - path: artifacts/packages/ - - # Build MacOS - - template: jobs/default-build.yml - parameters: - jobName: MacOs_x64_build - jobDisplayName: "Build: macOS" - agentOs: macOs - buildArgs: - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -bl:artifacts/log/build.macos.binlog - -p:AssetManifestFileName=aspnetcore-MacOS_x64.xml - $(_BuildArgs) - $(_PublishArgs) - installNodeJs: false - installJdk: false - artifacts: - - name: MacOS_x64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: MacOS_x64_Packages - path: artifacts/packages/ - - template: jobs/codesign-xplat.yml - parameters: - inputName: MacOS_x64 - - # Build Linux x64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_x64_build - jobDisplayName: "Build: Linux x64" - agentOs: Linux - steps: - - script: ./build.sh - --ci - --arch x64 - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -bl:artifacts/log/build.linux-x64.binlog - $(_BuildArgs) - displayName: Run build.sh - - script: | - git clean -xfd src/**/obj/ - ./dockerbuild.sh bionic \ - --ci \ - --arch x64 \ - --build-installers \ - --no-build-deps \ - --no-build-nodejs \ - -p:OnlyPackPlatformSpecificPackages=true \ - -p:BuildRuntimeArchive=false \ - -p:LinuxInstallerType=deb \ - -bl:artifacts/log/build.deb.binlog \ - $(_BuildArgs) - displayName: Build Debian installers - - script: | - git clean -xfd src/**/obj/ - ./dockerbuild.sh rhel \ - --ci \ - --arch x64 \ - --build-installers \ - --no-build-deps \ - --no-build-nodejs \ - -p:OnlyPackPlatformSpecificPackages=true \ - -p:BuildRuntimeArchive=false \ - -p:LinuxInstallerType=rpm \ - -bl:artifacts/log/build.rpm.binlog \ - -p:AssetManifestFileName=aspnetcore-Linux_x64.xml \ - $(_BuildArgs) \ - $(_PublishArgs) - displayName: Build RPM installers - installNodeJs: false - installJdk: false - artifacts: - - name: Linux_x64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_x64_Packages - path: artifacts/packages/ - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_x64 - - # Build Linux ARM - - template: jobs/default-build.yml - parameters: - jobName: Linux_arm_build - jobDisplayName: "Build: Linux ARM" - agentOs: Linux - buildArgs: - --arch arm - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -bl:artifacts/log/build.linux-arm.binlog - -p:AssetManifestFileName=aspnetcore-Linux_arm.xml - $(_BuildArgs) - $(_PublishArgs) - installNodeJs: false - installJdk: false - artifacts: - - name: Linux_arm_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm_Packages - path: artifacts/packages/ - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_arm - - # Build Linux ARM64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_arm64_build - jobDisplayName: "Build: Linux ARM64" - agentOs: Linux - buildArgs: - --arch arm64 - --all - --pack - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -bl:artifacts/log/build.arm64.binlog - -p:AssetManifestFileName=aspnetcore-Linux_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - installNodeJs: false - installJdk: false - artifacts: - - name: Linux_arm64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_arm64_Packages - path: artifacts/packages/ - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_arm64 - - # Build Linux Musl x64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_x64_build - jobDisplayName: "Build: Linux Musl x64" - agentOs: Linux - buildScript: ./dockerbuild.sh alpine - buildArgs: - --ci - --arch x64 - --os-name linux-musl - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -bl:artifacts/log/build.musl.binlog - -p:AssetManifestFileName=aspnetcore-Linux_musl_x64.xml - $(_BuildArgs) - $(_PublishArgs) - installNodeJs: false - installJdk: false - artifacts: - - name: Linux_musl_x64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_x64_Packages - path: artifacts/packages/ - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_musl_x64 - - # Build Linux Musl ARM64 - - template: jobs/default-build.yml - parameters: - jobName: Linux_musl_arm64_build - jobDisplayName: "Build: Linux Musl ARM64" - agentOs: Linux - buildScript: ./dockerbuild.sh ubuntu-alpine37 - buildArgs: - --ci - --arch arm64 - --os-name linux-musl - --pack - --all - --no-build-nodejs - --no-build-java - -p:OnlyPackPlatformSpecificPackages=true - -bl:artifacts/log/build.musl.binlog - -p:AssetManifestFileName=aspnetcore-Linux_musl_arm64.xml - $(_BuildArgs) - $(_PublishArgs) - installNodeJs: false - installJdk: false - artifacts: - - name: Linux_musl_arm64_Logs - path: artifacts/log/ - publishOnError: true - includeForks: true - - name: Linux_musl_arm64_Packages - path: artifacts/packages/ - - template: jobs/codesign-xplat.yml - parameters: - inputName: Linux_musl_arm64 - # Test jobs - template: jobs/default-build.yml parameters: @@ -567,63 +261,15 @@ stages: publishOnError: true includeForks: true - # Source build - - job: Source_Build - displayName: 'Test: Linux Source Build' - container: centos:7 - pool: - vmImage: 'ubuntu-16.04' - variables: - DotNetCoreSdkDir: $(Agent.ToolsDirectory)/dotnet - DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true - steps: - - script: | - source eng/common/native/common-library.sh - mkdir -p $HOME/bin - GetFile https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 $HOME/bin/jq - chmod +x $HOME/bin/jq - echo "##vso[task.prependpath]$HOME/bin" - displayName: Install jq - - script: ./eng/scripts/ci-source-build.sh --ci --configuration Release /p:BuildManaged=true /p:BuildNodeJs=false - displayName: Run ci-source-build.sh - - task: PublishBuildArtifacts@1 - displayName: Upload logs - condition: always() - continueOnError: true - inputs: - pathtoPublish: artifacts/log/ - artifactName: Source_Build_Logs - artifactType: Container - parallel: true - - task: PublishBuildArtifacts@1 - displayName: Upload package artifacts - # Only capture source build artifacts in PRs for the sake of inspecting - # changes that impact source-build. The artifacts from this build pipeline are never actually used. - condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) - inputs: - pathtoPublish: artifacts/packages/ - artifactName: Source_Build_Packages - artifactType: Container - parallel: true - # Publish to the BAR - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/common/templates/job/publish-build-assets.yml parameters: dependsOn: - Windows_build - - Windows_arm_build - - CodeSign_Xplat_MacOS_x64 - - CodeSign_Xplat_Linux_x64 - - CodeSign_Xplat_Linux_arm - - CodeSign_Xplat_Linux_arm64 - - CodeSign_Xplat_Linux_musl_x64 - - CodeSign_Xplat_Linux_musl_arm64 # In addition to the dependencies above, ensure the build was successful overall. - - Code_check - Linux_Test - MacOS_Test - - Source_Build - Windows_Templates_Test - Windows_Test pool: diff --git a/eng/Build.props b/eng/Build.props index f8a3b7027a..3378e22c39 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -50,6 +50,11 @@ " /> + + + $(RepoRoot)src\Components\**\*.csproj;$(RepoRoot)src\ProjectTemplates\**\*.csproj + + diff --git a/src/ProjectTemplates/test/BlazorServerTemplateTest.cs b/src/ProjectTemplates/test/BlazorServerTemplateTest.cs deleted file mode 100644 index 463b710ac3..0000000000 --- a/src/ProjectTemplates/test/BlazorServerTemplateTest.cs +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Net; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.AspNetCore.E2ETesting; -using Microsoft.AspNetCore.Testing; -using OpenQA.Selenium; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class BlazorServerTemplateTest : BrowserTestBase - { - public BlazorServerTemplateTest(ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output) - { - ProjectFactory = projectFactory; - } - - public ProjectFactoryFixture ProjectFactory { get; set; } - - public Project Project { get; private set; } - - [Fact] - public async Task BlazorServerTemplateWorks_NoAuth() - { - Project = await ProjectFactory.GetOrCreateProject("blazorservernoauth", Output); - - var createResult = await Project.RunDotNetNewAsync("blazorserver"); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - if (BrowserFixture.IsHostAutomationSupported()) - { - aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(); - } - else - { - BrowserFixture.EnforceSupportedConfigurations(); - } - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - if (BrowserFixture.IsHostAutomationSupported()) - { - aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(); - } - else - { - BrowserFixture.EnforceSupportedConfigurations(); - } - } - } - - [Theory] - [InlineData(true)] - [InlineData(false)] - public async Task BlazorServerTemplateWorks_IndividualAuth(bool useLocalDB) - { - Project = await ProjectFactory.GetOrCreateProject("blazorserverindividual" + (useLocalDB ? "uld" : ""), Output); - - var createResult = await Project.RunDotNetNewAsync("blazorserver", auth: "Individual", useLocalDB: useLocalDB); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - if (BrowserFixture.IsHostAutomationSupported()) - { - aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(); - } - else - { - BrowserFixture.EnforceSupportedConfigurations(); - } - } - - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - if (BrowserFixture.IsHostAutomationSupported()) - { - aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(); - } - } - } - - private void TestBasicNavigation() - { - // Give components.server enough time to load so that it can replace - // the prerendered content before we start making assertions. - Thread.Sleep(5000); - Browser.Exists(By.TagName("ul")); - // element gets project ID injected into it during template execution - Browser.Equal(Project.ProjectName.Trim(), () => Browser.Title.Trim()); - - // Initially displays the home page - Browser.Equal("Hello, world!", () => Browser.FindElement(By.TagName("h1")).Text); - - // Can navigate to the counter page - Browser.FindElement(By.PartialLinkText("Counter")).Click(); - Browser.Contains("counter", () => Browser.Url); - Browser.Equal("Counter", () => Browser.FindElement(By.TagName("h1")).Text); - - // Clicking the counter button works - Browser.Equal("Current count: 0", () => Browser.FindElement(By.CssSelector("h1 + p")).Text); - Browser.FindElement(By.CssSelector("p+button")).Click(); - Browser.Equal("Current count: 1", () => Browser.FindElement(By.CssSelector("h1 + p")).Text); - - // Can navigate to the 'fetch data' page - Browser.FindElement(By.PartialLinkText("Fetch data")).Click(); - Browser.Contains("fetchdata", () => Browser.Url); - Browser.Equal("Weather forecast", () => Browser.FindElement(By.TagName("h1")).Text); - - // Asynchronously loads and displays the table of weather forecasts - Browser.Exists(By.CssSelector("table>tbody>tr")); - Browser.Equal(5, () => Browser.FindElements(By.CssSelector("p+table>tbody>tr")).Count); - } - } -} diff --git a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs b/src/ProjectTemplates/test/EmptyWebTemplateTest.cs deleted file mode 100644 index 56e2e8c105..0000000000 --- a/src/ProjectTemplates/test/EmptyWebTemplateTest.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class EmptyWebTemplateTest - { - public EmptyWebTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; } - - public ITestOutputHelper Output { get; } - - [Fact] - public async Task EmptyWebTemplateCSharp() - { - await EmtpyTemplateCore(languageOverride: null); - } - - [Fact] - public async Task EmptyWebTemplateFSharp() - { - await EmtpyTemplateCore("F#"); - } - - private async Task EmtpyTemplateCore(string languageOverride) - { - Project = await ProjectFactory.GetOrCreateProject("empty" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output); - - var createResult = await Project.RunDotNetNewAsync("web", language: languageOverride); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertOk("/"); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertOk("/"); - } - } - } -} diff --git a/src/ProjectTemplates/test/GrpcTemplateTest.cs b/src/ProjectTemplates/test/GrpcTemplateTest.cs deleted file mode 100644 index 4713a7a9c4..0000000000 --- a/src/ProjectTemplates/test/GrpcTemplateTest.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Runtime.InteropServices; -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class GrpcTemplateTest - { - public GrpcTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; } - public ITestOutputHelper Output { get; } - - [Fact] - public async Task GrpcTemplate() - { - Project = await ProjectFactory.GetOrCreateProject("grpc", Output); - - var createResult = await Project.RunDotNetNewAsync("grpc"); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - using (var serverProcess = Project.StartBuiltProjectAsync()) - { - // These templates are HTTPS + HTTP/2 only which is not supported on Mac due to missing ALPN support. - // https://github.com/aspnet/AspNetCore/issues/11061 - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - Assert.True(serverProcess.Process.HasExited, "built"); - Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on macOS due to missing ALPN support.", - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built service", Project, serverProcess.Process)); - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version < new Version(6, 2)) - { - Assert.True(serverProcess.Process.HasExited, "built"); - Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on Windows 7 due to missing ALPN support.", - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built service", Project, serverProcess.Process)); - } - else - { - Assert.False( - serverProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built service", Project, serverProcess.Process)); - } - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - // These templates are HTTPS + HTTP/2 only which is not supported on Mac due to missing ALPN support. - // https://github.com/aspnet/AspNetCore/issues/11061 - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - Assert.True(aspNetProcess.Process.HasExited, "published"); - Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on macOS due to missing ALPN support.", - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published service", Project, aspNetProcess.Process)); - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version < new Version(6, 2)) - { - Assert.True(aspNetProcess.Process.HasExited, "published"); - Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on Windows 7 due to missing ALPN support.", - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published service", Project, aspNetProcess.Process)); - } - else - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published service", Project, aspNetProcess.Process)); - } - } - } - } -} diff --git a/src/ProjectTemplates/test/IdentityUIPackageTest.cs b/src/ProjectTemplates/test/IdentityUIPackageTest.cs deleted file mode 100644 index deede64521..0000000000 --- a/src/ProjectTemplates/test/IdentityUIPackageTest.cs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class IdentityUIPackageTest - { - public IdentityUIPackageTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; set; } - - public ITestOutputHelper Output { get; } - - public static TheoryData<IDictionary<string, string>, string, string[]> MSBuildIdentityUIPackageOptions - { - get - { - var data = new TheoryData<IDictionary<string, string>, string, string[]>(); - - data.Add(new Dictionary<string, string> - { - ["IdentityUIFrameworkVersion"] = "Bootstrap3" - }, - "Bootstrap v3.4.1", - Bootstrap3ContentFiles); - - data.Add(new Dictionary<string, string>(), "Bootstrap v4.3.1", Bootstrap4ContentFiles); - - return data; - } - } - - public static string[] Bootstrap3ContentFiles { get; } = new string[] - { - "Identity/css/site.css", - "Identity/js/site.js", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.css", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.min.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap.css", - "Identity/lib/bootstrap/dist/css/bootstrap.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap.min.css.map", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2", - "Identity/lib/bootstrap/dist/js/bootstrap.js", - "Identity/lib/bootstrap/dist/js/bootstrap.min.js", - "Identity/lib/bootstrap/dist/js/npm.js", - "Identity/lib/jquery/LICENSE.txt", - "Identity/lib/jquery/dist/jquery.js", - "Identity/lib/jquery/dist/jquery.min.js", - "Identity/lib/jquery/dist/jquery.min.map", - "Identity/lib/jquery-validation/LICENSE.md", - "Identity/lib/jquery-validation/dist/additional-methods.js", - "Identity/lib/jquery-validation/dist/additional-methods.min.js", - "Identity/lib/jquery-validation/dist/jquery.validate.js", - "Identity/lib/jquery-validation/dist/jquery.validate.min.js", - "Identity/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js", - "Identity/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js", - "Identity/lib/jquery-validation-unobtrusive/LICENSE.txt", - }; - - public static string[] Bootstrap4ContentFiles { get; } = new string[] - { - "Identity/favicon.ico", - "Identity/css/site.css", - "Identity/js/site.js", - "Identity/lib/bootstrap/dist/css/bootstrap-grid.css", - "Identity/lib/bootstrap/dist/css/bootstrap-grid.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap-grid.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap-grid.min.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap-reboot.css", - "Identity/lib/bootstrap/dist/css/bootstrap-reboot.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap-reboot.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap.css", - "Identity/lib/bootstrap/dist/css/bootstrap.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap.min.css.map", - "Identity/lib/bootstrap/dist/js/bootstrap.bundle.js", - "Identity/lib/bootstrap/dist/js/bootstrap.bundle.js.map", - "Identity/lib/bootstrap/dist/js/bootstrap.bundle.min.js", - "Identity/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map", - "Identity/lib/bootstrap/dist/js/bootstrap.js", - "Identity/lib/bootstrap/dist/js/bootstrap.js.map", - "Identity/lib/bootstrap/dist/js/bootstrap.min.js", - "Identity/lib/bootstrap/dist/js/bootstrap.min.js.map", - "Identity/lib/jquery/LICENSE.txt", - "Identity/lib/jquery/dist/jquery.js", - "Identity/lib/jquery/dist/jquery.min.js", - "Identity/lib/jquery/dist/jquery.min.map", - "Identity/lib/jquery-validation/LICENSE.md", - "Identity/lib/jquery-validation/dist/additional-methods.js", - "Identity/lib/jquery-validation/dist/additional-methods.min.js", - "Identity/lib/jquery-validation/dist/jquery.validate.js", - "Identity/lib/jquery-validation/dist/jquery.validate.min.js", - "Identity/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js", - "Identity/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js", - "Identity/lib/jquery-validation-unobtrusive/LICENSE.txt", - }; - - [Theory] - [MemberData(nameof(MSBuildIdentityUIPackageOptions))] - public async Task IdentityUIPackage_WorksWithDifferentOptions(IDictionary<string, string> packageOptions, string versionValidator, string[] expectedFiles) - { - Project = await ProjectFactory.GetOrCreateProject("identityuipackage" + string.Concat(packageOptions.Values), Output); - var useLocalDB = false; - - var createResult = await Project.RunDotNetNewAsync("razor", auth: "Individual", useLocalDB: useLocalDB, environmentVariables: packageOptions); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var projectFileContents = ReadFile(Project.TemplateOutputDir, $"{Project.ProjectName}.csproj"); - Assert.Contains(".db", projectFileContents); - - var publishResult = await Project.RunDotNetPublishAsync(packageOptions: packageOptions); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(packageOptions: packageOptions); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - var migrationsResult = await Project.RunDotNetEfCreateMigrationAsync("razorpages"); - Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", Project, migrationsResult)); - Project.AssertEmptyMigration("razorpages"); - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - var response = await aspNetProcess.SendRequest("/Identity/lib/bootstrap/dist/css/bootstrap.css"); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains(versionValidator, await response.Content.ReadAsStringAsync()); - await ValidatePublishedFiles(aspNetProcess, expectedFiles); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - var response = await aspNetProcess.SendRequest("/Identity/lib/bootstrap/dist/css/bootstrap.css"); - Assert.Equal(HttpStatusCode.OK, response.StatusCode); - Assert.Contains(versionValidator, await response.Content.ReadAsStringAsync()); - await ValidatePublishedFiles(aspNetProcess, expectedFiles); - } - } - - private async Task ValidatePublishedFiles(AspNetProcess aspNetProcess, string[] expectedContentFiles) - { - foreach (var file in expectedContentFiles) - { - var response = await aspNetProcess.SendRequest(file); - Assert.True(response?.StatusCode == HttpStatusCode.OK, $"Couldn't find file '{file}'"); - } - } - - private string ReadFile(string basePath, string path) - { - var fullPath = Path.Combine(basePath, path); - var doesExist = File.Exists(fullPath); - - Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}"); - return File.ReadAllText(Path.Combine(basePath, path)); - } - } -} diff --git a/src/ProjectTemplates/test/ItemTemplateTests/BlazorServerTests.cs b/src/ProjectTemplates/test/ItemTemplateTests/BlazorServerTests.cs deleted file mode 100644 index 842ce8a5d9..0000000000 --- a/src/ProjectTemplates/test/ItemTemplateTests/BlazorServerTests.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Items.Test -{ - public class BlazorServerTest - { - public BlazorServerTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; } - public ITestOutputHelper Output { get; } - - [Fact] - public async Task BlazorServerItemTemplate() - { - Project = await ProjectFactory.GetOrCreateProject("razorcomponentitem", Output); - - var createResult = await Project.RunDotNetNewAsync("razorcomponent --name Different"); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create", Project, createResult)); - - Project.AssertFileExists("Different.razor", shouldExist: true); - Assert.Contains("<h3>Different</h3>", Project.ReadFile("Different.razor")); - } - } -} diff --git a/src/ProjectTemplates/test/MvcTemplateTest.cs b/src/ProjectTemplates/test/MvcTemplateTest.cs deleted file mode 100644 index af43914ed2..0000000000 --- a/src/ProjectTemplates/test/MvcTemplateTest.cs +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; -using Templates.Test.Helpers; -using System.Linq; -using Xunit; -using Xunit.Abstractions; -using Microsoft.AspNetCore.Testing; - -namespace Templates.Test -{ - public class MvcTemplateTest - { - public MvcTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; } - public ITestOutputHelper Output { get; } - - [Fact] - public async Task MvcTemplate_NoAuthFSharp() => await MvcTemplateCore(languageOverride: "F#"); - - [Fact] - public async Task MvcTemplate_NoAuthCSharp() => await MvcTemplateCore(languageOverride: null); - - private async Task MvcTemplateCore(string languageOverride) - { - Project = await ProjectFactory.GetOrCreateProject("mvcnoauth" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output); - - var createResult = await Project.RunDotNetNewAsync("mvc", language: languageOverride); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var projectExtension = languageOverride == "F#" ? "fsproj" : "csproj"; - var projectFileContents = Project.ReadFile($"{Project.ProjectName}.{projectExtension}"); - Assert.DoesNotContain(".db", projectFileContents); - Assert.DoesNotContain("Microsoft.EntityFrameworkCore.Tools", projectFileContents); - Assert.DoesNotContain("Microsoft.VisualStudio.Web.CodeGeneration.Design", projectFileContents); - Assert.DoesNotContain("Microsoft.EntityFrameworkCore.Tools.DotNet", projectFileContents); - Assert.DoesNotContain("Microsoft.Extensions.SecretManager.Tools", projectFileContents); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - IEnumerable<string> menuLinks = new List<string> { - PageUrls.HomeUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyFullUrl - }; - - var footerLinks = new string[] { PageUrls.PrivacyFullUrl }; - - var pages = new List<Page> - { - new Page - { - Url = PageUrls.HomeUrl, - Links = menuLinks.Append(PageUrls.DocsUrl).Concat(footerLinks) - }, - new Page - { - Url = PageUrls.PrivacyFullUrl, - Links = menuLinks.Concat(footerLinks) - } - }; - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - } - - [Theory] - [InlineData(true)] - [InlineData(false)] - public async Task MvcTemplate_IndividualAuth(bool useLocalDB) - { - Project = await ProjectFactory.GetOrCreateProject("mvcindividual" + (useLocalDB ? "uld" : ""), Output); - - var createResult = await Project.RunDotNetNewAsync("mvc", auth: "Individual", useLocalDB: useLocalDB); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var projectFileContents = Project.ReadFile($"{Project.ProjectName}.csproj"); - if (!useLocalDB) - { - Assert.Contains(".db", projectFileContents); - } - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - var migrationsResult = await Project.RunDotNetEfCreateMigrationAsync("mvc"); - Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", Project, migrationsResult)); - Project.AssertEmptyMigration("mvc"); - - var pages = new List<Page> { - new Page - { - Url = PageUrls.ForgotPassword, - Links = new string [] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.HomeUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.DocsUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.PrivacyFullUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.LoginUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.ForgotPassword, - PageUrls.RegisterUrl, - PageUrls.ExternalArticle, - PageUrls.PrivacyUrl } - }, - new Page - { - Url = PageUrls.RegisterUrl, - Links = new string [] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.ExternalArticle, - PageUrls.PrivacyUrl - } - } - }; - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - } - } -} diff --git a/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs b/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs deleted file mode 100644 index 0d02a56f8f..0000000000 --- a/src/ProjectTemplates/test/RazorClassLibraryTemplateTest.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class RazorClassLibraryTemplateTest - { - public RazorClassLibraryTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; } - public ITestOutputHelper Output { get; } - - [Fact] - public async Task RazorClassLibraryTemplate_WithViews_Async() - { - Project = await ProjectFactory.GetOrCreateProject("razorclasslibwithviews", Output); - - var createResult = await Project.RunDotNetNewAsync("razorclasslib", args: new[] { "--support-pages-and-views", "true" }); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - } - - [Fact] - public async Task RazorClassLibraryTemplateAsync() - { - Project = await ProjectFactory.GetOrCreateProject("razorclasslib", Output); - - var createResult = await Project.RunDotNetNewAsync("razorclasslib"); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - } - } -} diff --git a/src/ProjectTemplates/test/RazorPagesTemplateTest.cs b/src/ProjectTemplates/test/RazorPagesTemplateTest.cs deleted file mode 100644 index 7cd41d56b2..0000000000 --- a/src/ProjectTemplates/test/RazorPagesTemplateTest.cs +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Testing; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class RazorPagesTemplateTest - { - public RazorPagesTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - - public ProjectFactoryFixture ProjectFactory { get; set; } - - public ITestOutputHelper Output { get; } - - [Fact] - public async Task RazorPagesTemplate_NoAuth() - { - Project = await ProjectFactory.GetOrCreateProject("razorpagesnoauth", Output); - - var createResult = await Project.RunDotNetNewAsync("razor"); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("razor", Project, createResult)); - - var projectFileContents = ReadFile(Project.TemplateOutputDir, $"{Project.ProjectName}.csproj"); - Assert.DoesNotContain(".db", projectFileContents); - Assert.DoesNotContain("Microsoft.EntityFrameworkCore.Tools", projectFileContents); - Assert.DoesNotContain("Microsoft.VisualStudio.Web.CodeGeneration.Design", projectFileContents); - Assert.DoesNotContain("Microsoft.EntityFrameworkCore.Tools.DotNet", projectFileContents); - Assert.DoesNotContain("Microsoft.Extensions.SecretManager.Tools", projectFileContents); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, createResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, createResult)); - - var pages = new List<Page> - { - new Page - { - Url = PageUrls.HomeUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.DocsUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.PrivacyUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.PrivacyUrl } - } - }; - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - } - - [Theory] - [InlineData(false)] - [InlineData(true)] - public async Task RazorPagesTemplate_IndividualAuth(bool useLocalDB) - { - Project = await ProjectFactory.GetOrCreateProject("razorpagesindividual" + (useLocalDB ? "uld" : ""), Output); - - var createResult = await Project.RunDotNetNewAsync("razor", auth: "Individual", useLocalDB: useLocalDB); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var projectFileContents = ReadFile(Project.TemplateOutputDir, $"{Project.ProjectName}.csproj"); - if (!useLocalDB) - { - Assert.Contains(".db", projectFileContents); - } - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - var migrationsResult = await Project.RunDotNetEfCreateMigrationAsync("razorpages"); - Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", Project, migrationsResult)); - Project.AssertEmptyMigration("razorpages"); - - var pages = new List<Page> { - new Page - { - Url = PageUrls.ForgotPassword, - Links = new string [] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.HomeUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.DocsUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.PrivacyUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.PrivacyUrl - } - }, - new Page - { - Url = PageUrls.LoginUrl, - Links = new string[] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.ForgotPassword, - PageUrls.RegisterUrl, - PageUrls.ExternalArticle, - PageUrls.PrivacyUrl } - }, - new Page - { - Url = PageUrls.RegisterUrl, - Links = new string [] { - PageUrls.HomeUrl, - PageUrls.RegisterUrl, - PageUrls.LoginUrl, - PageUrls.HomeUrl, - PageUrls.PrivacyUrl, - PageUrls.ExternalArticle, - PageUrls.PrivacyUrl - } - } - }; - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertPagesOk(pages); - } - } - - - private string ReadFile(string basePath, string path) - { - var fullPath = Path.Combine(basePath, path); - var doesExist = File.Exists(fullPath); - - Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}"); - return File.ReadAllText(Path.Combine(basePath, path)); - } - } -} diff --git a/src/ProjectTemplates/test/SpaTemplateTest/AngularTemplateTest.cs b/src/ProjectTemplates/test/SpaTemplateTest/AngularTemplateTest.cs deleted file mode 100644 index e1d5db1338..0000000000 --- a/src/ProjectTemplates/test/SpaTemplateTest/AngularTemplateTest.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.E2ETesting; -using Microsoft.AspNetCore.Testing; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test.SpaTemplateTest -{ - public class AngularTemplateTest : SpaTemplateTestBase - { - public AngularTemplateTest(ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) - : base(projectFactory, browserFixture, output) { } - - [Fact] - public Task AngularTemplate_Works() - => SpaTemplateImplAsync("angularnoauth", "angular", useLocalDb: false, usesAuth: false); - - [Fact] - public Task AngularTemplate_IndividualAuth_Works() - => SpaTemplateImplAsync("angularindividual", "angular", useLocalDb: false, usesAuth: true); - - [Fact] - public Task AngularTemplate_IndividualAuth_Works_LocalDb() - => SpaTemplateImplAsync("angularindividualuld", "angular", useLocalDb: true, usesAuth: true); - } -} diff --git a/src/ProjectTemplates/test/SpaTemplateTest/ReactReduxTemplateTest.cs b/src/ProjectTemplates/test/SpaTemplateTest/ReactReduxTemplateTest.cs deleted file mode 100644 index 44d6b67f32..0000000000 --- a/src/ProjectTemplates/test/SpaTemplateTest/ReactReduxTemplateTest.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.E2ETesting; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test.SpaTemplateTest -{ - public class ReactReduxTemplateTest : SpaTemplateTestBase - { - public ReactReduxTemplateTest(ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) - : base(projectFactory, browserFixture, output) - { - } - - [Fact] - public Task ReactReduxTemplate_Works_NetCore() - => SpaTemplateImplAsync("reactredux", "reactredux", useLocalDb: false, usesAuth: false); - } -} diff --git a/src/ProjectTemplates/test/SpaTemplateTest/ReactTemplateTest.cs b/src/ProjectTemplates/test/SpaTemplateTest/ReactTemplateTest.cs deleted file mode 100644 index 469e87acd5..0000000000 --- a/src/ProjectTemplates/test/SpaTemplateTest/ReactTemplateTest.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Microsoft.AspNetCore.E2ETesting; -using Microsoft.AspNetCore.Testing; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test.SpaTemplateTest -{ - public class ReactTemplateTest : SpaTemplateTestBase - { - public ReactTemplateTest(ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) - : base(projectFactory, browserFixture, output) - { - } - - [Fact] - public Task ReactTemplate_Works_NetCore() - => SpaTemplateImplAsync("reactnoauth", "react", useLocalDb: false, usesAuth: false); - - [Fact] - public Task ReactTemplate_IndividualAuth_NetCore() - => SpaTemplateImplAsync("reactindividual", "react", useLocalDb: false, usesAuth: true); - - [Fact] - public Task ReactTemplate_IndividualAuth_NetCore_LocalDb() - => SpaTemplateImplAsync("reactindividualuld", "react", useLocalDb: true, usesAuth: true); - } -} diff --git a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs b/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs deleted file mode 100644 index fa2c3fb9fa..0000000000 --- a/src/ProjectTemplates/test/SpaTemplateTest/SpaTemplateTestBase.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.IO; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Microsoft.AspNetCore.E2ETesting; -using Newtonsoft.Json.Linq; -using OpenQA.Selenium; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -// Turn off parallel test run for Edge as the driver does not support multiple Selenium tests at the same time -#if EDGE -[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)] -#endif -namespace Templates.Test.SpaTemplateTest -{ - public class SpaTemplateTestBase : BrowserTestBase - { - public SpaTemplateTestBase( - ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) : base(browserFixture, output) - { - ProjectFactory = projectFactory; - } - - public ProjectFactoryFixture ProjectFactory { get; set; } - - public Project Project { get; set; } - - // Rather than using [Theory] to pass each of the different values for 'template', - // it's important to distribute the SPA template tests over different test classes - // so they can be run in parallel. Xunit doesn't parallelize within a test class. - protected async Task SpaTemplateImplAsync( - string key, - string template, - bool useLocalDb = false, - bool usesAuth = false) - { - Project = await ProjectFactory.GetOrCreateProject(key, Output); - - using var createResult = await Project.RunDotNetNewAsync(template, auth: usesAuth ? "Individual" : null, language: null, useLocalDb); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - // We shouldn't have to do the NPM restore in tests because it should happen - // automatically at build time, but by doing it up front we can avoid having - // multiple NPM installs run concurrently which otherwise causes errors when - // tests run in parallel. - var clientAppSubdirPath = Path.Combine(Project.TemplateOutputDir, "ClientApp"); - ValidatePackageJson(clientAppSubdirPath); - - var projectFileContents = ReadFile(Project.TemplateOutputDir, $"{Project.ProjectName}.csproj"); - if (usesAuth && !useLocalDb) - { - Assert.Contains(".db", projectFileContents); - } - - using var npmRestoreResult = await Project.RestoreWithRetryAsync(Output, clientAppSubdirPath); - Assert.True(0 == npmRestoreResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm restore", Project, npmRestoreResult)); - - using var lintResult = ProcessEx.RunViaShell(Output, clientAppSubdirPath, "npm run lint"); - Assert.True(0 == lintResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run lint", Project, lintResult)); - - // The default behavior of angular tests is watch mode, which leaves the test process open after it finishes, which leads to delays/hangs. - var testcommand = "npm run test" + template == "angular" ? "-- --watch=false" : ""; - - using var testResult = ProcessEx.RunViaShell(Output, clientAppSubdirPath, testcommand); - Assert.True(0 == testResult.ExitCode, ErrorMessages.GetFailedProcessMessage("npm run test", Project, testResult)); - - using var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - using var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - // localdb is not installed on the CI machines, so skip it. - var shouldVisitFetchData = !(useLocalDb && Project.IsCIEnvironment); - - if (usesAuth) - { - using var migrationsResult = await Project.RunDotNetEfCreateMigrationAsync(template); - Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", Project, migrationsResult)); - Project.AssertEmptyMigration(template); - - if (shouldVisitFetchData) - { - using var dbUpdateResult = await Project.RunDotNetEfUpdateDatabaseAsync(); - Assert.True(0 == dbUpdateResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", Project, dbUpdateResult)); - } - } - - if (template == "react" || template == "reactredux") - { - await CleanupReactClientAppBuildFolder(clientAppSubdirPath); - } - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await WarmUpServer(aspNetProcess); - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - - if (BrowserFixture.IsHostAutomationSupported()) - { - var (browser, logs) = await BrowserFixture.GetOrCreateBrowserAsync(Output, $"{Project.ProjectName}.build"); - aspNetProcess.VisitInBrowser(browser); - TestBasicNavigation(visitFetchData: shouldVisitFetchData, usesAuth, browser, logs); - } - else - { - BrowserFixture.EnforceSupportedConfigurations(); - } - } - - if (usesAuth) - { - UpdatePublishedSettings(); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - await WarmUpServer(aspNetProcess); - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - - if (BrowserFixture.IsHostAutomationSupported()) - { - var (browser, logs) = await BrowserFixture.GetOrCreateBrowserAsync(Output, $"{Project.ProjectName}.publish"); - aspNetProcess.VisitInBrowser(browser); - TestBasicNavigation(visitFetchData: shouldVisitFetchData, usesAuth, browser, logs); - } - else - { - BrowserFixture.EnforceSupportedConfigurations(); - } - } - } - - private async Task CleanupReactClientAppBuildFolder(string clientAppSubdirPath) - { - ProcessEx testResult = null; - int? testResultExitCode = null; - for (int i = 0; i < 3; i++) - { - try - { - testResult = ProcessEx.RunViaShell(Output, clientAppSubdirPath, "npx rimraf ./build"); - testResultExitCode = testResult.ExitCode; - if (testResultExitCode == 0) - { - return; - } - } - catch - { - } - finally - { - testResult.Dispose(); - } - - await Task.Delay(3000); - } - - Assert.True(testResultExitCode == 0, ErrorMessages.GetFailedProcessMessage("npx rimraf ./build", Project, testResult)); - } - - private void ValidatePackageJson(string clientAppSubdirPath) - { - Assert.True(File.Exists(Path.Combine(clientAppSubdirPath, "package.json")), "Missing a package.json"); - var packageJson = JObject.Parse(ReadFile(clientAppSubdirPath, "package.json")); - - // NPM package names must match ^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$ - var packageName = (string)packageJson["name"]; - Regex regex = new Regex("^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"); - Assert.True(regex.IsMatch(packageName), "package.json name is invalid format"); - } - - private static async Task WarmUpServer(AspNetProcess aspNetProcess) - { - var attempt = 0; - var maxAttempts = 3; - do - { - try - { - attempt++; - var response = await aspNetProcess.SendRequest("/"); - if (response.StatusCode == HttpStatusCode.OK) - { - break; - } - } - catch (OperationCanceledException) - { - } - catch (HttpRequestException ex) when (ex.Message.StartsWith("The SSL connection could not be established")) - { - } - await Task.Delay(TimeSpan.FromSeconds(5 * attempt)); - } while (attempt < maxAttempts); - } - - private void UpdatePublishedSettings() - { - // Hijack here the config file to use the development key during publish. - var appSettings = JObject.Parse(File.ReadAllText(Path.Combine(Project.TemplateOutputDir, "appsettings.json"))); - var appSettingsDevelopment = JObject.Parse(File.ReadAllText(Path.Combine(Project.TemplateOutputDir, "appsettings.Development.json"))); - ((JObject)appSettings["IdentityServer"]).Merge(appSettingsDevelopment["IdentityServer"]); - ((JObject)appSettings["IdentityServer"]).Merge(new - { - IdentityServer = new - { - Key = new - { - FilePath = "./tempkey.json" - } - } - }); - var testAppSettings = appSettings.ToString(); - File.WriteAllText(Path.Combine(Project.TemplatePublishDir, "appsettings.json"), testAppSettings); - } - - private void TestBasicNavigation(bool visitFetchData, bool usesAuth, IWebDriver browser, ILogs logs) - { - browser.Exists(By.TagName("ul")); - // <title> element gets project ID injected into it during template execution - browser.Contains(Project.ProjectGuid.Replace(".", "._"), () => browser.Title); - - // Initially displays the home page - browser.Equal("Hello, world!", () => browser.FindElement(By.TagName("h1")).Text); - - // Can navigate to the counter page - browser.FindElement(By.PartialLinkText("Counter")).Click(); - browser.Contains("counter", () => browser.Url); - - browser.Equal("Counter", () => browser.FindElement(By.TagName("h1")).Text); - - // Clicking the counter button works - browser.Equal("0", () => browser.FindElement(By.CssSelector("p>strong")).Text); - browser.FindElement(By.CssSelector("p+button")).Click(); - browser.Equal("1", () => browser.FindElement(By.CssSelector("p>strong")).Text); - - if (visitFetchData) - { - browser.FindElement(By.PartialLinkText("Fetch data")).Click(); - - if (usesAuth) - { - // We will be redirected to the identity UI - browser.Contains("/Identity/Account/Login", () => browser.Url); - browser.FindElement(By.PartialLinkText("Register as a new user")).Click(); - - var userName = $"{Guid.NewGuid()}@example.com"; - var password = $"!Test.Password1$"; - browser.Exists(By.Name("Input.Email")); - browser.FindElement(By.Name("Input.Email")).SendKeys(userName); - browser.FindElement(By.Name("Input.Password")).SendKeys(password); - browser.FindElement(By.Name("Input.ConfirmPassword")).SendKeys(password); - browser.FindElement(By.Id("registerSubmit")).Click(); - - // We will be redirected to the RegisterConfirmation - browser.Contains("/Identity/Account/RegisterConfirmation", () => browser.Url); - browser.FindElement(By.PartialLinkText("Click here to confirm your account")).Click(); - - // We will be redirected to the ConfirmEmail - browser.Contains("/Identity/Account/ConfirmEmail", () => browser.Url); - - // Now we can login - browser.FindElement(By.PartialLinkText("Login")).Click(); - browser.Exists(By.Name("Input.Email")); - browser.FindElement(By.Name("Input.Email")).SendKeys(userName); - browser.FindElement(By.Name("Input.Password")).SendKeys(password); - browser.FindElement(By.Id("login-submit")).Click(); - - // Need to navigate to fetch page - browser.FindElement(By.PartialLinkText("Fetch data")).Click(); - } - - // Can navigate to the 'fetch data' page - browser.Contains("fetch-data", () => browser.Url); - browser.Equal("Weather forecast", () => browser.FindElement(By.TagName("h1")).Text); - - // Asynchronously loads and displays the table of weather forecasts - browser.Exists(By.CssSelector("table>tbody>tr")); - browser.Equal(5, () => browser.FindElements(By.CssSelector("p+table>tbody>tr")).Count); - } - - foreach (var logKind in logs.AvailableLogTypes) - { - var entries = logs.GetLog(logKind); - var badEntries = entries.Where(e => new LogLevel[] { LogLevel.Warning, LogLevel.Severe }.Contains(e.Level)); - - badEntries = badEntries.Where(e => - !e.Message.Contains("failed: WebSocket is closed before the connection is established.") - && !e.Message.Contains("[WDS] Disconnected!") - && !e.Message.Contains("Timed out connecting to Chrome, retrying")); - - Assert.True(badEntries.Count() == 0, "There were Warnings or Errors from the browser." + Environment.NewLine + string.Join(Environment.NewLine, badEntries)); - } - } - - private void AssertFileExists(string basePath, string path, bool shouldExist) - { - var fullPath = Path.Combine(basePath, path); - var doesExist = File.Exists(fullPath); - - if (shouldExist) - { - Assert.True(doesExist, "Expected file to exist, but it doesn't: " + path); - } - else - { - Assert.False(doesExist, "Expected file not to exist, but it does: " + path); - } - } - - private string ReadFile(string basePath, string path) - { - AssertFileExists(basePath, path, shouldExist: true); - return File.ReadAllText(Path.Combine(basePath, path)); - } - } -} diff --git a/src/ProjectTemplates/test/WebApiTemplateTest.cs b/src/ProjectTemplates/test/WebApiTemplateTest.cs deleted file mode 100644 index 89d047a06e..0000000000 --- a/src/ProjectTemplates/test/WebApiTemplateTest.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class WebApiTemplateTest - { - public WebApiTemplateTest(ProjectFactoryFixture factoryFixture, ITestOutputHelper output) - { - FactoryFixture = factoryFixture; - Output = output; - } - - public ProjectFactoryFixture FactoryFixture { get; } - - public ITestOutputHelper Output { get; } - - public Project Project { get; set; } - - [Fact] - public async Task WebApiTemplateFSharp() => await WebApiTemplateCore(languageOverride: "F#"); - - [Fact] - public async Task WebApiTemplateCSharp() => await WebApiTemplateCore(languageOverride: null); - - private async Task WebApiTemplateCore(string languageOverride) - { - Project = await FactoryFixture.GetOrCreateProject("webapi" + (languageOverride == "F#" ? "fsharp" : "csharp"), Output); - - var createResult = await Project.RunDotNetNewAsync("webapi", language: languageOverride); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - using (var aspNetProcess = Project.StartBuiltProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - - await aspNetProcess.AssertOk("weatherforecast"); - await aspNetProcess.AssertNotFound("/"); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync()) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - - - await aspNetProcess.AssertOk("weatherforecast"); - await aspNetProcess.AssertNotFound("/"); - } - } - } -} diff --git a/src/ProjectTemplates/test/WorkerTemplateTest.cs b/src/ProjectTemplates/test/WorkerTemplateTest.cs deleted file mode 100644 index 738eafc61d..0000000000 --- a/src/ProjectTemplates/test/WorkerTemplateTest.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; -using Templates.Test.Helpers; -using Xunit; -using Xunit.Abstractions; - -namespace Templates.Test -{ - public class WorkerTemplateTest - { - public WorkerTemplateTest(ProjectFactoryFixture projectFactory, ITestOutputHelper output) - { - ProjectFactory = projectFactory; - Output = output; - } - - public Project Project { get; set; } - public ProjectFactoryFixture ProjectFactory { get; } - public ITestOutputHelper Output { get; } - - [Fact] - public async Task WorkerTemplateAsync() - { - Project = await ProjectFactory.GetOrCreateProject("worker", Output); - - var createResult = await Project.RunDotNetNewAsync("worker"); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", Project, createResult)); - - var publishResult = await Project.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", Project, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await Project.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", Project, buildResult)); - - using (var aspNetProcess = Project.StartBuiltProjectAsync(hasListeningUri: false)) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", Project, aspNetProcess.Process)); - } - - using (var aspNetProcess = Project.StartPublishedProjectAsync(hasListeningUri: false)) - { - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", Project, aspNetProcess.Process)); - } - } - } -} From 7fc46862eafc386cedda04a0b20bd707e19cd3c8 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 3 Dec 2019 14:29:05 -0800 Subject: [PATCH 29/64] Run build and publish tests for Blazor templates (#17410) * Add build and publish tests for Blazor hosted * Add build tests for Blazor standalone * Cleanup project template Fixes https://github.com/aspnet/AspNetCore/issues/14866 Fixes https://github.com/aspnet/AspNetCore/issues/10269 Fixes https://github.com/aspnet/AspNetCore/issues/9168 --- eng/Build.props | 2 +- eng/common/tools.ps1 | 2 +- .../Templates/src/Directory.Build.props | 15 -- .../Templates/src/Directory.Build.targets | 17 -- ...crosoft.AspNetCore.Blazor.Templates.csproj | 64 -------- ...crosoft.AspNetCore.Blazor.Templates.nuspec | 16 -- src/Components/Components.sln | 17 +- .../BlazorWasm.ProjectTemplates/.gitignore | 3 + .../BlazorWasm-CSharp.Client.csproj.in} | 8 +- .../BlazorWasm-CSharp.Server.csproj.in} | 5 +- .../BlazorWasm-CSharp.Shared.csproj.in} | 1 - ...crosoft.AspNetCore.Blazor.Templates.csproj | 41 +++++ .../.template.config}/dotnetcli.host.json | 0 .../.template.config}/icon.png | Bin .../.template.config}/template.json | 20 +-- .../.template.config}/vs-2017.3.host.json | 2 +- .../BlazorWasm-CSharp/BlazorWasm-CSharp.sln | 0 .../BlazorWasm-CSharp/Client/App.razor | 0 .../Client/Pages/Counter.razor | 0 .../Client/Pages/FetchData.razor | 0 .../Client/Pages/Index.razor | 0 .../BlazorWasm-CSharp/Client/Program.cs | 0 .../Client/Shared/MainLayout.razor | 0 .../Client/Shared/NavMenu.razor | 0 .../Client/Shared/SurveyPrompt.razor | 0 .../BlazorWasm-CSharp/Client/Startup.cs | 0 .../BlazorWasm-CSharp/Client/_Imports.razor | 0 .../wwwroot/css/bootstrap/bootstrap.min.css | 0 .../css/bootstrap/bootstrap.min.css.map | 0 .../wwwroot/css/open-iconic/FONT-LICENSE | 0 .../wwwroot/css/open-iconic/ICON-LICENSE | 0 .../Client/wwwroot/css/open-iconic/README.md | 0 .../font/css/open-iconic-bootstrap.min.css | 0 .../open-iconic/font/fonts/open-iconic.eot | Bin .../open-iconic/font/fonts/open-iconic.otf | Bin .../open-iconic/font/fonts/open-iconic.svg | 0 .../open-iconic/font/fonts/open-iconic.ttf | Bin .../open-iconic/font/fonts/open-iconic.woff | Bin .../Client/wwwroot/css/site.css | 0 .../Client/wwwroot/index.html | 0 .../Client/wwwroot/sample-data/weather.json | 0 .../Controllers/WeatherForecastController.cs | 0 .../BlazorWasm-CSharp/Server/Program.cs | 0 .../BlazorWasm-CSharp/Server/Startup.cs | 0 .../Shared/WeatherForecast.cs | 0 .../content/Directory.Build.props | 0 .../content/Directory.Build.targets | 0 src/ProjectTemplates/ProjectTemplates.sln | 14 ++ .../test/BlazorWasmTemplateTest.cs | 155 ++++++++++++++++++ src/ProjectTemplates/test/Helpers/Project.cs | 10 +- .../test/Helpers/TemplatePackageInstaller.cs | 5 +- .../test/ProjectTemplates.Tests.csproj | 3 +- 52 files changed, 237 insertions(+), 163 deletions(-) delete mode 100644 src/Components/Blazor/Templates/src/Directory.Build.props delete mode 100644 src/Components/Blazor/Templates/src/Directory.Build.targets delete mode 100644 src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj delete mode 100644 src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/.gitignore rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj => ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in} (67%) rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj => ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in} (72%) rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj => ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Shared.csproj.in} (79%) create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src => ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config}/dotnetcli.host.json (100%) rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src => ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config}/icon.png (100%) rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src => ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config}/template.json (86%) rename src/{Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src => ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config}/vs-2017.3.host.json (92%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/BlazorWasm-CSharp.sln (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/App.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Pages/Counter.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Pages/Index.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Program.cs (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Shared/NavMenu.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/Startup.cs (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/_Imports.razor (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css.map (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/FONT-LICENSE (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/ICON-LICENSE (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/README.md (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/css/site.css (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/index.html (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Client/wwwroot/sample-data/weather.json (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Server/Program.cs (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Server/Startup.cs (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/BlazorWasm-CSharp/Shared/WeatherForecast.cs (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/Directory.Build.props (100%) rename src/{Components/Blazor/Templates/src => ProjectTemplates/BlazorWasm.ProjectTemplates}/content/Directory.Build.targets (100%) create mode 100644 src/ProjectTemplates/test/BlazorWasmTemplateTest.cs diff --git a/eng/Build.props b/eng/Build.props index 3378e22c39..17c9848f83 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -35,7 +35,7 @@ $(RepoRoot)src\SignalR\clients\ts\**\node_modules\**\*.*proj; $(RepoRoot)src\Components\Web.JS\node_modules\**\*.*proj; $(RepoRoot)src\Components\Blazor\Build\testassets\**\*.*proj; - $(RepoRoot)src\Components\Blazor\Templates\src\content\**\*.*proj; + $(RepoRoot)src\ProjectTemplates\BlazorWasm.ProjectTemplates\content\**\*.csproj; $(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.csproj; $(RepoRoot)src\ProjectTemplates\Web.ProjectTemplates\content\**\*.fsproj; $(RepoRoot)src\ProjectTemplates\Web.Spa.ProjectTemplates\content\**\*.csproj; diff --git a/eng/common/tools.ps1 b/eng/common/tools.ps1 index 91efea9405..617db167ce 100644 --- a/eng/common/tools.ps1 +++ b/eng/common/tools.ps1 @@ -228,7 +228,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements = if ($msbuildCmd -ne $null) { # Workaround for https://github.com/dotnet/roslyn/issues/35793 # Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+ - $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0]) + $msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0]) if ($msbuildVersion -ge $vsMinVersion) { return $global:_MSBuildExe = $msbuildCmd.Path diff --git a/src/Components/Blazor/Templates/src/Directory.Build.props b/src/Components/Blazor/Templates/src/Directory.Build.props deleted file mode 100644 index ed5e015014..0000000000 --- a/src/Components/Blazor/Templates/src/Directory.Build.props +++ /dev/null @@ -1,15 +0,0 @@ -<Project> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> - - <PropertyGroup> - <GenerateDocumentationFile>false</GenerateDocumentationFile> - <IncludeSymbols>false</IncludeSymbols> - </PropertyGroup> - - <PropertyGroup Label="Package Versions"> - <!-- Used only in development when running the template contents directly from source --> - <TemplateBlazorPackageVersion>0.8.0-preview-19064-0339</TemplateBlazorPackageVersion> - <TemplateComponentsPackageVersion>3.0.0-preview-19064-0339</TemplateComponentsPackageVersion> - </PropertyGroup> - -</Project> diff --git a/src/Components/Blazor/Templates/src/Directory.Build.targets b/src/Components/Blazor/Templates/src/Directory.Build.targets deleted file mode 100644 index 7c6f423add..0000000000 --- a/src/Components/Blazor/Templates/src/Directory.Build.targets +++ /dev/null @@ -1,17 +0,0 @@ -<Project> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.targets))\Directory.Build.targets" /> - - <Target Name="SetTemplateJsonSymbolReplacements"> - <PropertyGroup> - <!-- - Properties here will be injected into the template config *.json files - during the build, replacing tokens of the form ${PropertyName} - --> - <GeneratedContentProperties> - TemplateBlazorVersion=$(PackageVersion); - TemplateComponentsVersion=$(ComponentsPackageVersion); - RepositoryCommit=$(SourceRevisionId); - </GeneratedContentProperties> - </PropertyGroup> - </Target> -</Project> diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj deleted file mode 100644 index c91a32128d..0000000000 --- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.csproj +++ /dev/null @@ -1,64 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFramework>netstandard2.0</TargetFramework> - <NuspecFile>Microsoft.AspNetCore.Blazor.Templates.nuspec</NuspecFile> - <IsShippingPackage>true</IsShippingPackage> - <EnableDefaultItems>False</EnableDefaultItems> - <GenerateAssemblyInfo>False</GenerateAssemblyInfo> - <IncludeBuildOutput>False</IncludeBuildOutput> - <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory> - <DebugType>none</DebugType> - <GenerateDocumentationFile>false</GenerateDocumentationFile> - <NoWarn>$(NoWarn);2008</NoWarn> - <Description>Templates for ASP.NET Core Blazor projects.</Description> - <PackageTags>aspnet;templates;blazor;spa</PackageTags> - <IsProjectReferenceProvider>false</IsProjectReferenceProvider> - </PropertyGroup> - - <ItemGroup> - <UpToDateCheckInput Include="content\**\.template.config.src\**\*.*" /> - </ItemGroup> - - <Target Name="PrepareFileLists" AfterTargets="PrepareForBuild"> - <ItemGroup> - <_TemplateConfigMainFile Include="content\**\.template.config.src\template.json" /> - <_TemplateConfigDir Include="@(_TemplateConfigMainFile->'$([System.IO.Path]::GetDirectoryName('%(_TemplateConfigMainFile.FullPath)'))')" /> - <_TemplateConfigFileToCopy Include="%(_TemplateConfigDir.Identity)\**\*.*"> - <DestDir>$([System.IO.Path]::GetDirectoryName('%(_TemplateConfigDir.Identity)'))\.template.config\</DestDir> - </_TemplateConfigFileToCopy> - </ItemGroup> - </Target> - - <Target - Name="TransformTemplateConfigs" - BeforeTargets="CoreBuild" - DependsOnTargets="SetTemplateJsonSymbolReplacements" - Inputs="@(_TemplateConfigFileToCopy)" - Outputs="@(_TemplateConfigFileToCopy->'%(DestDir)%(FileName)%(Extension)')"> - - <!-- - For each template, copy its '.template.config.src' directory to '.template.config', - removing any earlier output at that location - --> - <RemoveDir Directories="%(_TemplateConfigFileToCopy.DestDir)" /> - <Copy SourceFiles="%(_TemplateConfigFileToCopy.Identity)" DestinationFolder="%(_TemplateConfigFileToCopy.DestDir)" /> - - <!-- - Modify the .json files in the .template.config dirs to stamp MSBuild properties into them - --> - <ItemGroup> - <GeneratedContent Include="@(_TemplateConfigFileToCopy->WithMetadataValue('Extension','.json'))"> - <OutputPath>%(DestDir)%(RecursiveDir)%(Filename)%(Extension)</OutputPath> - <Properties>$(GeneratedContentProperties)</Properties> - </GeneratedContent> - </ItemGroup> - <GenerateFileFromTemplate - TemplateFile="%(GeneratedContent.Identity)" - Properties="%(GeneratedContent.Properties)" - OutputPath="%(GeneratedContent.OutputPath)"> - - <Output TaskParameter="OutputPath" ItemName="FileWrites" /> - <Output TaskParameter="OutputPath" ItemName="Content" /> - </GenerateFileFromTemplate> - </Target> -</Project> diff --git a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec b/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec deleted file mode 100644 index fd19750231..0000000000 --- a/src/Components/Blazor/Templates/src/Microsoft.AspNetCore.Blazor.Templates.nuspec +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> - <metadata> - $CommonMetadataElements$ - <packageTypes> - <packageType name="Template" /> - </packageTypes> - </metadata> - <files> - $CommonFileElements$ - <file - src="content/**" - exclude="**/bin/**;**/obj/**;**/.template.config.src/**;content/Directory.Build.props;content/Directory.Build.targets;" - target="Content" /> - </files> -</package> diff --git a/src/Components/Components.sln b/src/Components/Components.sln index 36cde86285..b4d1840025 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -25,8 +25,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Server", "Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj", "{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Templates", "Blazor\Templates\src\Microsoft.AspNetCore.Blazor.Templates.csproj", "{66036B70-6C93-4E45-A1A1-819F15CA757A}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{A7ABAC29-F73F-456D-AE54-46842CFC2E10}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostedInAspNet.Client", "Blazor\testassets\HostedInAspNet.Client\HostedInAspNet.Client.csproj", "{FD37F740-A654-4117-BFB6-9112CE4C1D3B}" @@ -248,7 +246,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mono.WebAssembly.Interop", "Mono.WebAssembly.Interop", "{21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.WebAssembly.Interop", "Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj", "{D141CFEE-D10A-406B-8963-F86FA13732E3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.WebAssembly.Interop", "Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj", "{D141CFEE-D10A-406B-8963-F86FA13732E3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -368,18 +366,6 @@ Global {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Release|x64.Build.0 = Release|Any CPU {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Release|x86.ActiveCfg = Release|Any CPU {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Release|x86.Build.0 = Release|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x64.ActiveCfg = Debug|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x64.Build.0 = Debug|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x86.ActiveCfg = Debug|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Debug|x86.Build.0 = Debug|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|Any CPU.Build.0 = Release|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x64.ActiveCfg = Release|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x64.Build.0 = Release|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x86.ActiveCfg = Release|Any CPU - {66036B70-6C93-4E45-A1A1-819F15CA757A}.Release|x86.Build.0 = Release|Any CPU {FD37F740-A654-4117-BFB6-9112CE4C1D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD37F740-A654-4117-BFB6-9112CE4C1D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD37F740-A654-4117-BFB6-9112CE4C1D3B}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1546,7 +1532,6 @@ Global {A6C8050D-7C18-4585-ADCF-833AC1765847} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} - {66036B70-6C93-4E45-A1A1-819F15CA757A} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A7ABAC29-F73F-456D-AE54-46842CFC2E10} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {FD37F740-A654-4117-BFB6-9112CE4C1D3B} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10} {C1E2C117-BE47-4E29-94B3-753262D97A5C} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/.gitignore b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/.gitignore new file mode 100644 index 0000000000..9310b1ea52 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/.gitignore @@ -0,0 +1,3 @@ +# This file is generated by the build +content/*/*.*proj +content/*/*/*.*proj diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in similarity index 67% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in index c855c49821..70927b08e3 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in @@ -6,10 +6,10 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.AspNetCore.Blazor" Version="$(TemplateBlazorPackageVersion)" /> - <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" /> - <PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="$(TemplateBlazorPackageVersion)" /> - <PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="$(TemplateBlazorPackageVersion)" PrivateAssets="all" /> + <PackageReference Include="Microsoft.AspNetCore.Blazor" Version="${MicrosoftAspNetCoreBlazorPackageVersion}" /> + <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="${MicrosoftAspNetCoreBlazorBuildPackageVersion}" PrivateAssets="all" /> + <PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="${MicrosoftAspNetCoreBlazorDevServerPackageVersion}" PrivateAssets="all" /> + <PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="${MicrosoftAspNetCoreBlazorHttpClientPackageVersion}" /> </ItemGroup> <!--#if Hosted --> <ItemGroup> diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in similarity index 72% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in index 2742595431..5fe7473679 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in @@ -1,12 +1,11 @@ <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> - <TargetFramework>netcoreapp3.1</TargetFramework> - <LangVersion>7.3</LangVersion> + <TargetFramework>${DefaultNetCoreTargetFramework}</TargetFramework> </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="$(TemplateBlazorPackageVersion)" /> + <PackageReference Include="Microsoft.AspNetCore.Blazor.Server" Version="${MicrosoftAspNetCoreBlazorServerPackageVersion}" /> </ItemGroup> <ItemGroup> diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Shared.csproj.in similarity index 79% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Shared.csproj.in index d849ca9036..d4c395e8cb 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Shared.csproj.in @@ -2,7 +2,6 @@ <PropertyGroup> <TargetFramework>netstandard2.1</TargetFramework> - <LangVersion>7.3</LangVersion> </PropertyGroup> </Project> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj new file mode 100644 index 0000000000..32c3197d04 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj @@ -0,0 +1,41 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> + <IsShippingPackage>true</IsShippingPackage> + <Description>Templates for ASP.NET Core Blazor projects.</Description> + <PackageTags>$(PackageTags);blazor;spa</PackageTags> + </PropertyGroup> + + <PropertyGroup> + <!-- Lists the versions of dependencies not built in this repo. Packages produced from this repo should be listed as a PackageVersionVariableReference. --> + <GeneratedContentProperties> + DefaultNetCoreTargetFramework=$(DefaultNetCoreTargetFramework); + MicrosoftAspNetCoreBlazorPackageVersion=$(MicrosoftAspNetCoreBlazorPackageVersion); + MicrosoftAspNetCoreBlazorBuildPackageVersion=$(MicrosoftAspNetCoreBlazorBuildPackageVersion); + MicrosoftAspNetCoreBlazorDevServerPackageVersion=$(MicrosoftAspNetCoreBlazorDevServerPackageVersion); + MicrosoftAspNetCoreBlazorHttpClientPackageVersion=$(MicrosoftAspNetCoreBlazorHttpClientPackageVersion); + MonoWebAssemblyInteropPackageVersion=$(MonoWebAssemblyInteropPackageVersion); + MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); + MicrosoftAspNetCoreBlazorServerPackageVersion=$(MicrosoftAspNetCoreBlazorServerPackageVersion); + </GeneratedContentProperties> + + <BlazorProjectsRoot>$(RepoRoot)src\Components\Blazor\</BlazorProjectsRoot> + </PropertyGroup> + + <ItemGroup> + <!-- These projects product packages that the templates depend on. See GenerateContent.targets --> + <PackageVersionVariableReference Include="$(BlazorProjectsRoot)Blazor\src\Microsoft.AspNetCore.Blazor.csproj" /> + <PackageVersionVariableReference Include="$(BlazorProjectsRoot)Build\src\Microsoft.AspNetCore.Blazor.Build.csproj" /> + <PackageVersionVariableReference Include="$(BlazorProjectsRoot)DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj" /> + <PackageVersionVariableReference Include="$(BlazorProjectsRoot)Http\src\Microsoft.AspNetCore.Blazor.HttpClient.csproj" /> + <PackageVersionVariableReference Include="$(BlazorProjectsRoot)Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj" /> + <PackageVersionVariableReference Include="$(BlazorProjectsRoot)Server\src\Microsoft.AspNetCore.Blazor.Server.csproj" /> + </ItemGroup> + + <ItemGroup> + <GeneratedContent Include="BlazorWasm-CSharp.Client.csproj.in" OutputPath="content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj" /> + <GeneratedContent Include="BlazorWasm-CSharp.Shared.csproj.in" OutputPath="content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj" /> + <GeneratedContent Include="BlazorWasm-CSharp.Server.csproj.in" OutputPath="content/BlazorWasm-CSharp/Server/BlazorWasm-CSharp.Server.csproj" /> + </ItemGroup> + +</Project> diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/dotnetcli.host.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/dotnetcli.host.json rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/icon.png b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/icon.png similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/icon.png rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/icon.png diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json similarity index 86% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json index 33e094e356..b6cb64fcec 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/template.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json @@ -1,13 +1,16 @@ { + "$schema": "http://json.schemastore.org/template", "author": "Microsoft", "classifications": [ "Web", "Blazor", "WebAssembly" ], + "name": "Blazor WebAssembly App", "defaultName": "WebApplication", "description": "A project template for creating a Blazor app that runs on WebAssembly and is optionally hosted by an ASP.NET Core app. This template can be used for web apps with rich dynamic user interfaces (UIs).", "groupIdentity": "Microsoft.Web.Blazor.Wasm", + "precedence": "6001", "guids": [ "4C26868E-5E7C-458D-82E3-040509D0C71F", "5990939C-7E7B-4CFA-86FF-44CA5756498A", @@ -15,7 +18,6 @@ "0AFFA7FD-4E37-4636-AB91-3753E746DB98" ], "identity": "Microsoft.Web.Blazor.Wasm.CSharp", - "name": "Blazor WebAssembly App", "preferNameDirectory": true, "primaryOutputs": [ { @@ -94,20 +96,6 @@ "type": "bind", "binding": "HostIdentifier" }, - "TemplateBlazorVersionSymbol": { - "type": "parameter", - "datatype": "string", - "description": "Specifies which version of Blazor packages to use.", - "replaces": "$(TemplateBlazorPackageVersion)", - "defaultValue": "${TemplateBlazorVersion}" - }, - "TemplateComponentsVersionSymbol": { - "type": "parameter", - "datatype": "string", - "description": "Specifies which version of Components packages to use.", - "replaces": "$(TemplateComponentsPackageVersion)", - "defaultValue": "${TemplateComponentsVersion}" - }, "skipRestore": { "type": "parameter", "datatype": "bool", @@ -146,7 +134,7 @@ } ], "args": { - "files": [ "BlazorWasm-CSharp.Client.csproj" ] + "files": ["BlazorWasm-CSharp.Client.csproj"] }, "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", "continueOnError": true diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/vs-2017.3.host.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json similarity index 92% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/vs-2017.3.host.json rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json index 4d0b04c1b3..5cb50d10a5 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/.template.config.src/vs-2017.3.host.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json @@ -11,7 +11,7 @@ }, "order": 610, "icon": "icon.png", - "learnMoreLink": "https://github.com/aspnet/blazor", + "learnMoreLink": "https://github.com/aspnet/AspNetCore", "uiFilters": [ "oneaspnet" ], diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/BlazorWasm-CSharp.sln b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/BlazorWasm-CSharp.sln similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/BlazorWasm-CSharp.sln rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/BlazorWasm-CSharp.sln diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/App.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/App.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/Counter.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/Counter.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/Counter.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/Counter.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/Index.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/Index.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Pages/Index.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/Index.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Program.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Program.cs rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Shared/NavMenu.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/NavMenu.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Shared/NavMenu.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/NavMenu.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/Startup.cs rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/_Imports.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/_Imports.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css.map b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css.map rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/bootstrap/bootstrap.min.css.map diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/FONT-LICENSE b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/FONT-LICENSE similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/FONT-LICENSE rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/FONT-LICENSE diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/ICON-LICENSE b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/ICON-LICENSE similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/ICON-LICENSE rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/ICON-LICENSE diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/README.md b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/README.md similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/README.md rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/README.md diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.eot diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.otf diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.svg diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/open-iconic/font/fonts/open-iconic.woff diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/site.css b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/site.css similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/css/site.css rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/css/site.css diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/index.html b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/index.html similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/index.html rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/index.html diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/sample-data/weather.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/sample-data/weather.json similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/wwwroot/sample-data/weather.json rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/sample-data/weather.json diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/Program.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Program.cs similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/Program.cs rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Program.cs diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Server/Startup.cs rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/WeatherForecast.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/WeatherForecast.cs similarity index 100% rename from src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/WeatherForecast.cs rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/WeatherForecast.cs diff --git a/src/Components/Blazor/Templates/src/content/Directory.Build.props b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/Directory.Build.props similarity index 100% rename from src/Components/Blazor/Templates/src/content/Directory.Build.props rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/Directory.Build.props diff --git a/src/Components/Blazor/Templates/src/content/Directory.Build.targets b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/Directory.Build.targets similarity index 100% rename from src/Components/Blazor/Templates/src/content/Directory.Build.targets rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/Directory.Build.targets diff --git a/src/ProjectTemplates/ProjectTemplates.sln b/src/ProjectTemplates/ProjectTemplates.sln index da18f3a2e5..7628d8233d 100644 --- a/src/ProjectTemplates/ProjectTemplates.sln +++ b/src/ProjectTemplates/ProjectTemplates.sln @@ -177,6 +177,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.ApiAut EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions", "..\Middleware\SpaServices.Extensions\src\Microsoft.AspNetCore.SpaServices.Extensions.csproj", "{06D0D7B2-EDA3-45A2-A060-AB791ED1DB80}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNetCore.Blazor.Templates", "BlazorWasm.ProjectTemplates\Microsoft.AspNetCore.Blazor.Templates.csproj", "{C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1231,6 +1233,18 @@ Global {06D0D7B2-EDA3-45A2-A060-AB791ED1DB80}.Release|x64.Build.0 = Release|Any CPU {06D0D7B2-EDA3-45A2-A060-AB791ED1DB80}.Release|x86.ActiveCfg = Release|Any CPU {06D0D7B2-EDA3-45A2-A060-AB791ED1DB80}.Release|x86.Build.0 = Release|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Debug|x64.ActiveCfg = Debug|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Debug|x64.Build.0 = Debug|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Debug|x86.ActiveCfg = Debug|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Debug|x86.Build.0 = Debug|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Release|Any CPU.Build.0 = Release|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Release|x64.ActiveCfg = Release|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Release|x64.Build.0 = Release|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Release|x86.ActiveCfg = Release|Any CPU + {C6D371A8-D8EA-4CF4-844E-8C6DFDF61642}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs new file mode 100644 index 0000000000..579d5b11bf --- /dev/null +++ b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs @@ -0,0 +1,155 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using System.Net; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.E2ETesting; +using Microsoft.AspNetCore.Testing; +using OpenQA.Selenium; +using Templates.Test.Helpers; +using Xunit; +using Xunit.Abstractions; + +namespace Templates.Test +{ + public class BlazorWasmTemplateTest : BrowserTestBase + { + public BlazorWasmTemplateTest(ProjectFactoryFixture projectFactory, BrowserFixture browserFixture, ITestOutputHelper output) + : base(browserFixture, output) + { + ProjectFactory = projectFactory; + } + + public ProjectFactoryFixture ProjectFactory { get; set; } + + [Fact] + public async Task BlazorWasmStandaloneTemplate_Works() + { + var project = await ProjectFactory.GetOrCreateProject("blazorstandalone", Output); + + var createResult = await project.RunDotNetNewAsync("blazorwasm"); + Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", project, createResult)); + + // We can't run a published standalone app, but let's just make sure it publishes fine + var publishResult = await project.RunDotNetPublishAsync(); + Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", project, publishResult)); + + var buildResult = await project.RunDotNetBuildAsync(); + Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", project, buildResult)); + + await BuildAndRunTest(project.ProjectName, project); + } + + [Fact] + public async Task BlazorWasmHostedTemplate_Works() + { + var project = await ProjectFactory.GetOrCreateProject("blazorhosted", Output); + + var createResult = await project.RunDotNetNewAsync("blazorwasm", args: new[] { "--hosted" }); + Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", project, createResult)); + + var serverProject = GetSubProject(project, "Server", $"{project.ProjectName}.Server"); + + var publishResult = await serverProject.RunDotNetPublishAsync(); + Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", serverProject, publishResult)); + + var buildResult = await serverProject.RunDotNetBuildAsync(); + Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", serverProject, buildResult)); + + await BuildAndRunTest(project.ProjectName, serverProject); + + using var aspNetProcess = serverProject.StartPublishedProjectAsync(); + + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", serverProject, aspNetProcess.Process)); + + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + if (BrowserFixture.IsHostAutomationSupported()) + { + aspNetProcess.VisitInBrowser(Browser); + TestBasicNavigation(project.ProjectName, serverProject); + } + else + { + BrowserFixture.EnforceSupportedConfigurations(); + } + } + + protected async Task BuildAndRunTest(string appName, Project project) + { + using var aspNetProcess = project.StartBuiltProjectAsync(); + + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run built project", project, aspNetProcess.Process)); + + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + if (BrowserFixture.IsHostAutomationSupported()) + { + aspNetProcess.VisitInBrowser(Browser); + TestBasicNavigation(appName, project); + } + else + { + BrowserFixture.EnforceSupportedConfigurations(); + } + } + + private void TestBasicNavigation(string appName, Project project) + { + // Give components.server enough time to load so that it can replace + // the prerendered content before we start making assertions. + Thread.Sleep(5000); + Browser.Exists(By.TagName("ul")); + + // <title> element gets project ID injected into it during template execution + Browser.Equal(appName.Trim(), () => Browser.Title.Trim()); + + // Initially displays the home page + Browser.Equal("Hello, world!", () => Browser.FindElement(By.TagName("h1")).Text); + + // Can navigate to the counter page + Browser.FindElement(By.PartialLinkText("Counter")).Click(); + Browser.Contains("counter", () => Browser.Url); + Browser.Equal("Counter", () => Browser.FindElement(By.TagName("h1")).Text); + + // Clicking the counter button works + Browser.Equal("Current count: 0", () => Browser.FindElement(By.CssSelector("h1 + p")).Text); + Browser.FindElement(By.CssSelector("p+button")).Click(); + Browser.Equal("Current count: 1", () => Browser.FindElement(By.CssSelector("h1 + p")).Text); + + // Can navigate to the 'fetch data' page + Browser.FindElement(By.PartialLinkText("Fetch data")).Click(); + Browser.Contains("fetchdata", () => Browser.Url); + Browser.Equal("Weather forecast", () => Browser.FindElement(By.TagName("h1")).Text); + + // Asynchronously loads and displays the table of weather forecasts + Browser.Exists(By.CssSelector("table>tbody>tr")); + Browser.Equal(5, () => Browser.FindElements(By.CssSelector("p+table>tbody>tr")).Count); + } + + private Project GetSubProject(Project project, string projectDirectory, string projectName) + { + var subProjectDirectory = Path.Combine(project.TemplateOutputDir, projectDirectory); + if (!Directory.Exists(subProjectDirectory)) + { + throw new DirectoryNotFoundException($"Directory {subProjectDirectory} was not found."); + } + + var subProject = new Project + { + DotNetNewLock = project.DotNetNewLock, + NodeLock = project.NodeLock, + Output = project.Output, + DiagnosticsMessageSink = project.DiagnosticsMessageSink, + ProjectName = projectName, + TemplateOutputDir = subProjectDirectory, + }; + + return subProject; + } + } +} diff --git a/src/ProjectTemplates/test/Helpers/Project.cs b/src/ProjectTemplates/test/Helpers/Project.cs index fc6923ae5c..8eb59d86f6 100644 --- a/src/ProjectTemplates/test/Helpers/Project.cs +++ b/src/ProjectTemplates/test/Helpers/Project.cs @@ -110,7 +110,7 @@ namespace Templates.Test.Helpers } } - internal async Task<ProcessEx> RunDotNetPublishAsync(bool takeNodeLock = false, IDictionary<string,string> packageOptions = null) + internal async Task<ProcessEx> RunDotNetPublishAsync(bool takeNodeLock = false, IDictionary<string,string> packageOptions = null, string additionalArgs = null) { Output.WriteLine("Publishing ASP.NET application..."); @@ -121,7 +121,7 @@ namespace Templates.Test.Helpers await effectiveLock.WaitAsync(); try { - var result = ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), $"publish -c Release /bl", packageOptions); + var result = ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), $"publish -c Release /bl /nr:false {additionalArgs}", packageOptions); await result.Exited; CaptureBinLogOnFailure(result); return result; @@ -132,7 +132,7 @@ namespace Templates.Test.Helpers } } - internal async Task<ProcessEx> RunDotNetBuildAsync(bool takeNodeLock = false, IDictionary<string,string> packageOptions = null) + internal async Task<ProcessEx> RunDotNetBuildAsync(bool takeNodeLock = false, IDictionary<string,string> packageOptions = null, string additionalArgs = null) { Output.WriteLine("Building ASP.NET application..."); @@ -143,7 +143,7 @@ namespace Templates.Test.Helpers await effectiveLock.WaitAsync(); try { - var result = ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), "build -c Debug /bl", packageOptions); + var result = ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), $"build -c Debug /bl /nr:false {additionalArgs}", packageOptions); await result.Exited; CaptureBinLogOnFailure(result); return result; @@ -211,7 +211,7 @@ namespace Templates.Test.Helpers }; var projectDll = Path.Combine(TemplateBuildDir, $"{ProjectName}.dll"); - return new AspNetProcess(Output, TemplateOutputDir, projectDll, environment, hasListeningUri: hasListeningUri); + return new AspNetProcess(Output, TemplateOutputDir, projectDll, environment, published: false, hasListeningUri: hasListeningUri); } internal AspNetProcess StartPublishedProjectAsync(bool hasListeningUri = true) diff --git a/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs b/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs index 2c34259592..5d6985f691 100644 --- a/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs +++ b/src/ProjectTemplates/test/Helpers/TemplatePackageInstaller.cs @@ -36,7 +36,8 @@ namespace Templates.Test.Helpers "Microsoft.DotNet.Web.Spa.ProjectTemplates.2.2", "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.0", "Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1", - "Microsoft.DotNet.Web.Spa.ProjectTemplates" + "Microsoft.DotNet.Web.Spa.ProjectTemplates", + "Microsoft.AspNetCore.Blazor.Templates", }; public static string CustomHivePath { get; } = typeof(TemplatePackageInstaller) @@ -86,7 +87,7 @@ namespace Templates.Test.Helpers .Where(p => _templatePackages.Any(t => Path.GetFileName(p).StartsWith(t, StringComparison.OrdinalIgnoreCase))) .ToArray(); - Assert.Equal(4, builtPackages.Length); + Assert.Equal(5, builtPackages.Length); /* * The templates are indexed by path, for example: diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj index b8797c1345..492f337109 100644 --- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj +++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj @@ -46,6 +46,7 @@ <ProjectReference Include="../Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj" ReferenceOutputAssembly="false" /> <ProjectReference Include="../Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj" ReferenceOutputAssembly="false" /> <ProjectReference Include="../Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj" ReferenceOutputAssembly="false" /> + <ProjectReference Include="../BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj" ReferenceOutputAssembly="false" /> </ItemGroup> <ItemGroup> @@ -79,7 +80,7 @@ <_Parameter1>ArtifactsLogDir</_Parameter1> <_Parameter2>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'log'))</_Parameter2> </AssemblyAttribute> - + <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute"> <_Parameter1>ArtifactsNonShippingPackagesDir</_Parameter1> <_Parameter2>$(ArtifactsNonShippingPackagesDir)</_Parameter2> From 0a73b55d4164bda06a5c8f8e8f90fac8d9d52774 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Wed, 4 Dec 2019 14:52:31 -0800 Subject: [PATCH 30/64] Rollback to 3.1.0 RTM versions --- eng/Versions.props | 92 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index ded3d6ce38..67fb31b526 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -103,61 +103,61 @@ <MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreBenchmarkRunnerSourcesPackageVersion> <MicrosoftAspNetCoreTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreTestingPackageVersion> <MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsActivatorUtilitiesSourcesPackageVersion> - <MicrosoftExtensionsCachingAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsCachingAbstractionsPackageVersion> - <MicrosoftExtensionsCachingMemoryPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsCachingMemoryPackageVersion> - <MicrosoftExtensionsCachingSqlServerPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsCachingSqlServerPackageVersion> - <MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion> + <MicrosoftExtensionsCachingAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsCachingAbstractionsPackageVersion> + <MicrosoftExtensionsCachingMemoryPackageVersion>3.1.0</MicrosoftExtensionsCachingMemoryPackageVersion> + <MicrosoftExtensionsCachingSqlServerPackageVersion>3.1.0</MicrosoftExtensionsCachingSqlServerPackageVersion> + <MicrosoftExtensionsCachingStackExchangeRedisPackageVersion>3.1.0</MicrosoftExtensionsCachingStackExchangeRedisPackageVersion> <MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion> - <MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationAbstractionsPackageVersion> - <MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion> - <MicrosoftExtensionsConfigurationBinderPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationBinderPackageVersion> - <MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationCommandLinePackageVersion> - <MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion> - <MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion> - <MicrosoftExtensionsConfigurationIniPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationIniPackageVersion> - <MicrosoftExtensionsConfigurationJsonPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationJsonPackageVersion> - <MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion> - <MicrosoftExtensionsConfigurationPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationPackageVersion> - <MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationUserSecretsPackageVersion> - <MicrosoftExtensionsConfigurationXmlPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsConfigurationXmlPackageVersion> - <MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion> - <MicrosoftExtensionsDependencyInjectionPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsDependencyInjectionPackageVersion> - <MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsDiagnosticAdapterPackageVersion> - <MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion> - <MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion> - <MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion> - <MicrosoftExtensionsFileProvidersCompositePackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsFileProvidersCompositePackageVersion> - <MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion> - <MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsFileProvidersPhysicalPackageVersion> - <MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsFileSystemGlobbingPackageVersion> + <MicrosoftExtensionsConfigurationAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsConfigurationAbstractionsPackageVersion> + <MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion>3.1.0</MicrosoftExtensionsConfigurationAzureKeyVaultPackageVersion> + <MicrosoftExtensionsConfigurationBinderPackageVersion>3.1.0</MicrosoftExtensionsConfigurationBinderPackageVersion> + <MicrosoftExtensionsConfigurationCommandLinePackageVersion>3.1.0</MicrosoftExtensionsConfigurationCommandLinePackageVersion> + <MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion>3.1.0</MicrosoftExtensionsConfigurationEnvironmentVariablesPackageVersion> + <MicrosoftExtensionsConfigurationFileExtensionsPackageVersion>3.1.0</MicrosoftExtensionsConfigurationFileExtensionsPackageVersion> + <MicrosoftExtensionsConfigurationIniPackageVersion>3.1.0</MicrosoftExtensionsConfigurationIniPackageVersion> + <MicrosoftExtensionsConfigurationJsonPackageVersion>3.1.0</MicrosoftExtensionsConfigurationJsonPackageVersion> + <MicrosoftExtensionsConfigurationKeyPerFilePackageVersion>3.1.0</MicrosoftExtensionsConfigurationKeyPerFilePackageVersion> + <MicrosoftExtensionsConfigurationPackageVersion>3.1.0</MicrosoftExtensionsConfigurationPackageVersion> + <MicrosoftExtensionsConfigurationUserSecretsPackageVersion>3.1.0</MicrosoftExtensionsConfigurationUserSecretsPackageVersion> + <MicrosoftExtensionsConfigurationXmlPackageVersion>3.1.0</MicrosoftExtensionsConfigurationXmlPackageVersion> + <MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion> + <MicrosoftExtensionsDependencyInjectionPackageVersion>3.1.0</MicrosoftExtensionsDependencyInjectionPackageVersion> + <MicrosoftExtensionsDiagnosticAdapterPackageVersion>3.1.0</MicrosoftExtensionsDiagnosticAdapterPackageVersion> + <MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsDiagnosticsHealthChecksAbstractionsPackageVersion> + <MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion>3.1.0</MicrosoftExtensionsDiagnosticsHealthChecksPackageVersion> + <MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion> + <MicrosoftExtensionsFileProvidersCompositePackageVersion>3.1.0</MicrosoftExtensionsFileProvidersCompositePackageVersion> + <MicrosoftExtensionsFileProvidersEmbeddedPackageVersion>3.1.0</MicrosoftExtensionsFileProvidersEmbeddedPackageVersion> + <MicrosoftExtensionsFileProvidersPhysicalPackageVersion>3.1.0</MicrosoftExtensionsFileProvidersPhysicalPackageVersion> + <MicrosoftExtensionsFileSystemGlobbingPackageVersion>3.1.0</MicrosoftExtensionsFileSystemGlobbingPackageVersion> <MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHashCodeCombinerSourcesPackageVersion> - <MicrosoftExtensionsHostingAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHostingAbstractionsPackageVersion> - <MicrosoftExtensionsHostingPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHostingPackageVersion> + <MicrosoftExtensionsHostingAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsHostingAbstractionsPackageVersion> + <MicrosoftExtensionsHostingPackageVersion>3.1.0</MicrosoftExtensionsHostingPackageVersion> <MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHostFactoryResolverSourcesPackageVersion> - <MicrosoftExtensionsHttpPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsHttpPackageVersion> - <MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLocalizationAbstractionsPackageVersion> - <MicrosoftExtensionsLocalizationPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLocalizationPackageVersion> - <MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingAbstractionsPackageVersion> - <MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion> - <MicrosoftExtensionsLoggingConfigurationPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingConfigurationPackageVersion> - <MicrosoftExtensionsLoggingConsolePackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingConsolePackageVersion> - <MicrosoftExtensionsLoggingDebugPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingDebugPackageVersion> - <MicrosoftExtensionsLoggingEventSourcePackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingEventSourcePackageVersion> - <MicrosoftExtensionsLoggingEventLogPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingEventLogPackageVersion> - <MicrosoftExtensionsLoggingPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingPackageVersion> + <MicrosoftExtensionsHttpPackageVersion>3.1.0</MicrosoftExtensionsHttpPackageVersion> + <MicrosoftExtensionsLocalizationAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsLocalizationAbstractionsPackageVersion> + <MicrosoftExtensionsLocalizationPackageVersion>3.1.0</MicrosoftExtensionsLocalizationPackageVersion> + <MicrosoftExtensionsLoggingAbstractionsPackageVersion>3.1.0</MicrosoftExtensionsLoggingAbstractionsPackageVersion> + <MicrosoftExtensionsLoggingAzureAppServicesPackageVersion>3.1.0</MicrosoftExtensionsLoggingAzureAppServicesPackageVersion> + <MicrosoftExtensionsLoggingConfigurationPackageVersion>3.1.0</MicrosoftExtensionsLoggingConfigurationPackageVersion> + <MicrosoftExtensionsLoggingConsolePackageVersion>3.1.0</MicrosoftExtensionsLoggingConsolePackageVersion> + <MicrosoftExtensionsLoggingDebugPackageVersion>3.1.0</MicrosoftExtensionsLoggingDebugPackageVersion> + <MicrosoftExtensionsLoggingEventSourcePackageVersion>3.1.0</MicrosoftExtensionsLoggingEventSourcePackageVersion> + <MicrosoftExtensionsLoggingEventLogPackageVersion>3.1.0</MicrosoftExtensionsLoggingEventLogPackageVersion> + <MicrosoftExtensionsLoggingPackageVersion>3.1.0</MicrosoftExtensionsLoggingPackageVersion> <MicrosoftExtensionsLoggingTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingTestingPackageVersion> - <MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsLoggingTraceSourcePackageVersion> - <MicrosoftExtensionsObjectPoolPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsObjectPoolPackageVersion> - <MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion> - <MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion> - <MicrosoftExtensionsOptionsPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsOptionsPackageVersion> + <MicrosoftExtensionsLoggingTraceSourcePackageVersion>3.1.0</MicrosoftExtensionsLoggingTraceSourcePackageVersion> + <MicrosoftExtensionsObjectPoolPackageVersion>3.1.0</MicrosoftExtensionsObjectPoolPackageVersion> + <MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion>3.1.0</MicrosoftExtensionsOptionsConfigurationExtensionsPackageVersion> + <MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.1.0</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion> + <MicrosoftExtensionsOptionsPackageVersion>3.1.0</MicrosoftExtensionsOptionsPackageVersion> <MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion> <MicrosoftExtensionsPrimitivesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsPrimitivesPackageVersion> <MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion> <MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsValueStopwatchSourcesPackageVersion> - <MicrosoftExtensionsWebEncodersPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsWebEncodersPackageVersion> + <MicrosoftExtensionsWebEncodersPackageVersion>3.1.0</MicrosoftExtensionsWebEncodersPackageVersion> <MicrosoftInternalExtensionsRefsPackageVersion>3.1.0-rtm.19565.4</MicrosoftInternalExtensionsRefsPackageVersion> - <MicrosoftJSInteropPackageVersion>3.1.0-rtm.19575.5</MicrosoftJSInteropPackageVersion> + <MicrosoftJSInteropPackageVersion>3.1.0</MicrosoftJSInteropPackageVersion> <MonoWebAssemblyInteropPackageVersion>3.1.0-preview4.19575.5</MonoWebAssemblyInteropPackageVersion> <!-- Packages from aspnet/EntityFrameworkCore --> <dotnetefPackageVersion>3.1.0</dotnetefPackageVersion> From ce5065509b8412421ccc4d0b141dbe0526d8d371 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Wed, 4 Dec 2019 15:06:50 -0800 Subject: [PATCH 31/64] Fixup missed version --- eng/Versions.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/Versions.props b/eng/Versions.props index 67fb31b526..06986905cc 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,7 +152,7 @@ <MicrosoftExtensionsOptionsDataAnnotationsPackageVersion>3.1.0</MicrosoftExtensionsOptionsDataAnnotationsPackageVersion> <MicrosoftExtensionsOptionsPackageVersion>3.1.0</MicrosoftExtensionsOptionsPackageVersion> <MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsParameterDefaultValueSourcesPackageVersion> - <MicrosoftExtensionsPrimitivesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsPrimitivesPackageVersion> + <MicrosoftExtensionsPrimitivesPackageVersion>3.1.0</MicrosoftExtensionsPrimitivesPackageVersion> <MicrosoftExtensionsTypeNameHelperSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsTypeNameHelperSourcesPackageVersion> <MicrosoftExtensionsValueStopwatchSourcesPackageVersion>3.1.0-rtm.19575.5</MicrosoftExtensionsValueStopwatchSourcesPackageVersion> <MicrosoftExtensionsWebEncodersPackageVersion>3.1.0</MicrosoftExtensionsWebEncodersPackageVersion> From 3fba107522a817ab681fbeefb8b67087f7020407 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 10 Dec 2019 11:30:13 -0800 Subject: [PATCH 32/64] Fix typo in error message (#17741) --- src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs index 527f302a46..5e0a86d384 100644 --- a/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs +++ b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs @@ -168,7 +168,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Tasks protected override bool HandleTaskExecutionErrors() { // Show a slightly better error than the standard ToolTask message that says "dotnet" failed. - Log.LogError($"ILLink failed with exited code {ExitCode}."); + Log.LogError($"ILLink failed with exit code {ExitCode}."); return false; } From 3a93704737cceb38c4d51ae03075cf4eaad81b23 Mon Sep 17 00:00:00 2001 From: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Date: Thu, 12 Dec 2019 15:05:12 +0000 Subject: [PATCH 33/64] Support async main (#17673) --- .../Blazor/src/Hosting/EntrypointInvoker.cs | 89 ++++++++++ .../test/Hosting/EntrypointInvokerTest.cs | 153 ++++++++++++++++++ .../Microsoft.AspNetCore.Blazor.Tests.csproj | 3 +- .../StandaloneApp/wwwroot/index.html | 8 +- src/Components/Components.sln | 15 ++ src/Components/Web.JS/src/Boot.WebAssembly.ts | 4 +- .../Web.JS/src/Platform/Mono/MonoPlatform.ts | 22 ++- .../Web.JS/src/Platform/Platform.ts | 2 +- .../ServerErrorNotificationTest.cs} | 5 +- ...ntSideTest.cs => ErrorNotificationTest.cs} | 4 +- .../Tests/StartupErrorNotificationTest.cs | 40 +++++ .../test/testassets/BasicTestApp/Index.razor | 6 - .../test/testassets/BasicTestApp/Program.cs | 24 ++- .../BasicTestApp/wwwroot/index.html | 11 ++ .../testassets/BasicTestApp/wwwroot/style.css | 14 +- .../TestServer/Pages/_ServerHost.cshtml | 6 + 16 files changed, 381 insertions(+), 25 deletions(-) create mode 100644 src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs create mode 100644 src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs rename src/Components/test/E2ETest/{Tests/ErrorNotificationServerSideTest.cs => ServerExecutionTests/ServerErrorNotificationTest.cs} (85%) rename src/Components/test/E2ETest/Tests/{ErrorNotificationClientSideTest.cs => ErrorNotificationTest.cs} (94%) create mode 100644 src/Components/test/E2ETest/Tests/StartupErrorNotificationTest.cs diff --git a/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs b/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs new file mode 100644 index 0000000000..bce063bcf5 --- /dev/null +++ b/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs @@ -0,0 +1,89 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + internal static class EntrypointInvoker + { + // This method returns void because currently the JS side is not listening to any result, + // nor will it handle any exceptions. We handle all exceptions internally to this method. + // In the future we may want Blazor.start to return something that exposes the possibly-async + // entrypoint result to the JS caller. There's no requirement to do that today, and if we + // do change this it will be non-breaking. + public static void InvokeEntrypoint(string assemblyName, string[] args) + { + object entrypointResult; + try + { + var assembly = Assembly.Load(assemblyName); + var entrypoint = FindUnderlyingEntrypoint(assembly); + var @params = entrypoint.GetParameters().Length == 1 ? new object[] { args } : new object[] { }; + entrypointResult = entrypoint.Invoke(null, @params); + } + catch (Exception syncException) + { + HandleStartupException(syncException); + return; + } + + // If the entrypoint is async, handle async exceptions in the same way that we would + // have handled sync ones + if (entrypointResult is Task entrypointTask) + { + entrypointTask.ContinueWith(task => + { + if (task.Exception != null) + { + HandleStartupException(task.Exception); + } + }); + } + } + + private static MethodBase FindUnderlyingEntrypoint(Assembly assembly) + { + // This is the entrypoint declared in .NET metadata. In the case of async main, it's the + // compiler-generated wrapper method. Otherwise it's the developer-defined method. + var metadataEntrypointMethodBase = assembly.EntryPoint; + + // For "async Task Main", the C# compiler generates a method called "<Main>" + // that is marked as the assembly entrypoint. Detect this case, and instead of + // calling "<Whatever>", call the sibling "Whatever". + if (metadataEntrypointMethodBase.IsSpecialName) + { + var origName = metadataEntrypointMethodBase.Name; + var origNameLength = origName.Length; + if (origNameLength > 2) + { + var candidateMethodName = origName.Substring(1, origNameLength - 2); + var candidateMethod = metadataEntrypointMethodBase.DeclaringType.GetMethod( + candidateMethodName, + BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, + null, + metadataEntrypointMethodBase.GetParameters().Select(p => p.ParameterType).ToArray(), + null); + + if (candidateMethod != null) + { + return candidateMethod; + } + } + } + + // Either it's not async main, or for some reason we couldn't locate the underlying entrypoint, + // so use the one from assembly metadata. + return metadataEntrypointMethodBase; + } + + private static void HandleStartupException(Exception exception) + { + // Logs to console, and causes the error UI to appear + Console.Error.WriteLine(exception); + } + } +} diff --git a/src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs b/src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs new file mode 100644 index 0000000000..60a3d1638b --- /dev/null +++ b/src/Components/Blazor/Blazor/test/Hosting/EntrypointInvokerTest.cs @@ -0,0 +1,153 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.IO; +using System.Reflection; +using System.Runtime.Loader; +using System.Threading.Tasks; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + public class EntrypointInvokerTest + { + [Theory] + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public void InvokesEntrypoint_Sync_Success(bool hasReturnValue, bool hasParams) + { + // Arrange + var returnType = hasReturnValue ? "int" : "void"; + var paramsDecl = hasParams ? "string[] args" : string.Empty; + var returnStatement = hasReturnValue ? "return 123;" : "return;"; + var assembly = CompileToAssembly(@" +static " + returnType + @" Main(" + paramsDecl + @") +{ + DidMainExecute = true; + " + returnStatement + @" +}", out var didMainExecute); + + // Act + EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { }); + + // Assert + Assert.True(didMainExecute()); + } + + [Theory] + [InlineData(false, false)] + [InlineData(false, true)] + [InlineData(true, false)] + [InlineData(true, true)] + public void InvokesEntrypoint_Async_Success(bool hasReturnValue, bool hasParams) + { + // Arrange + var returnTypeGenericParam = hasReturnValue ? "<int>" : string.Empty; + var paramsDecl = hasParams ? "string[] args" : string.Empty; + var returnStatement = hasReturnValue ? "return 123;" : "return;"; + var assembly = CompileToAssembly(@" +public static TaskCompletionSource<object> ContinueTcs { get; } = new TaskCompletionSource<object>(); + +static async Task" + returnTypeGenericParam + @" Main(" + paramsDecl + @") +{ + await ContinueTcs.Task; + DidMainExecute = true; + " + returnStatement + @" +}", out var didMainExecute); + + // Act/Assert 1: Waits for task + // The fact that we're not blocking here proves that we're not executing the + // metadata-declared entrypoint, as that would block + EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { }); + Assert.False(didMainExecute()); + + // Act/Assert 2: Continues + var tcs = (TaskCompletionSource<object>)assembly.GetType("SomeApp.Program").GetProperty("ContinueTcs").GetValue(null); + tcs.SetResult(null); + Assert.True(didMainExecute()); + } + + [Fact] + public void InvokesEntrypoint_Sync_Exception() + { + // Arrange + var assembly = CompileToAssembly(@" +public static void Main() +{ + DidMainExecute = true; + throw new InvalidTimeZoneException(""Test message""); +}", out var didMainExecute); + + // Act/Assert + // The fact that this doesn't throw shows that EntrypointInvoker is doing something + // to handle the exception. We can't assert about what it does here, because that + // would involve capturing console output, which isn't safe in unit tests. Instead + // we'll check this in E2E tests. + EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { }); + Assert.True(didMainExecute()); + } + + [Fact] + public void InvokesEntrypoint_Async_Exception() + { + // Arrange + var assembly = CompileToAssembly(@" +public static TaskCompletionSource<object> ContinueTcs { get; } = new TaskCompletionSource<object>(); + +public static async Task Main() +{ + await ContinueTcs.Task; + DidMainExecute = true; + throw new InvalidTimeZoneException(""Test message""); +}", out var didMainExecute); + + // Act/Assert 1: Waits for task + EntrypointInvoker.InvokeEntrypoint(assembly.FullName, new string[] { }); + Assert.False(didMainExecute()); + + // Act/Assert 2: Continues + // As above, we can't directly observe the exception handling behavior here, + // so this is covered in E2E tests instead. + var tcs = (TaskCompletionSource<object>)assembly.GetType("SomeApp.Program").GetProperty("ContinueTcs").GetValue(null); + tcs.SetResult(null); + Assert.True(didMainExecute()); + } + + private static Assembly CompileToAssembly(string mainMethod, out Func<bool> didMainExecute) + { + var syntaxTree = CSharpSyntaxTree.ParseText(@" +using System; +using System.Threading.Tasks; + +namespace SomeApp +{ + public static class Program + { + public static bool DidMainExecute { get; private set; } + + " + mainMethod + @" + } +}"); + + var compilation = CSharpCompilation.Create( + $"TestAssembly-{Guid.NewGuid().ToString("D")}", + new[] { syntaxTree }, + new[] { MetadataReference.CreateFromFile(typeof(object).GetTypeInfo().Assembly.Location) }, + new CSharpCompilationOptions(OutputKind.ConsoleApplication)); + using var ms = new MemoryStream(); + var compilationResult = compilation.Emit(ms); + ms.Seek(0, SeekOrigin.Begin); + var assembly = AssemblyLoadContext.Default.LoadFromStream(ms); + + var didMainExecuteProp = assembly.GetType("SomeApp.Program").GetProperty("DidMainExecute"); + didMainExecute = () => (bool)didMainExecuteProp.GetValue(null); + + return assembly; + } + } +} diff --git a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj index a0acf4173e..be1cb3f836 100644 --- a/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj +++ b/src/Components/Blazor/Blazor/test/Microsoft.AspNetCore.Blazor.Tests.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> @@ -6,6 +6,7 @@ <ItemGroup> <Reference Include="Microsoft.AspNetCore.Blazor" /> + <Reference Include="Microsoft.CodeAnalysis.CSharp" /> </ItemGroup> </Project> diff --git a/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html b/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html index 5da6ba26b3..fde34bd639 100644 --- a/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html +++ b/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> @@ -11,6 +11,12 @@ <body> <app>Loading...</app> + <div id="blazor-error-ui"> + An unhandled exception has occurred. See browser dev tools for details. + <a href="" class="reload">Reload</a> + <a class="dismiss">🗙</a> + </div> + <script src="_framework/blazor.webassembly.js"></script> </body> </html> diff --git a/src/Components/Components.sln b/src/Components/Components.sln index b4d1840025..91278955cf 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -248,6 +248,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mono.WebAssembly.Interop", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.WebAssembly.Interop", "Blazor\Mono.WebAssembly.Interop\src\Mono.WebAssembly.Interop.csproj", "{D141CFEE-D10A-406B-8963-F86FA13732E3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.Server", "test\testassets\ComponentsApp.Server\ComponentsApp.Server.csproj", "{F2E27E1C-2E47-42C1-9AC7-36265A381717}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1518,6 +1520,18 @@ Global {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x64.Build.0 = Release|Any CPU {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.ActiveCfg = Release|Any CPU {D141CFEE-D10A-406B-8963-F86FA13732E3}.Release|x86.Build.0 = Release|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x64.ActiveCfg = Debug|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x64.Build.0 = Debug|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x86.ActiveCfg = Debug|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Debug|x86.Build.0 = Debug|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|Any CPU.Build.0 = Release|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x64.ActiveCfg = Release|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x64.Build.0 = Release|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x86.ActiveCfg = Release|Any CPU + {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1632,6 +1646,7 @@ Global {A5617A9D-C71E-44DE-936C-27611EB40A02} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {D141CFEE-D10A-406B-8963-F86FA13732E3} = {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} + {F2E27E1C-2E47-42C1-9AC7-36265A381717} = {44E0D4F3-4430-4175-B482-0D1AEE4BB699} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE} diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.ts b/src/Components/Web.JS/src/Boot.WebAssembly.ts index efecd016e9..1a80098301 100644 --- a/src/Components/Web.JS/src/Boot.WebAssembly.ts +++ b/src/Components/Web.JS/src/Boot.WebAssembly.ts @@ -73,5 +73,7 @@ interface BootJsonData { window['Blazor'].start = boot; if (shouldAutoStart()) { - boot(); + boot().catch(error => { + Module.printErr(error); // Logs it, and causes the error UI to appear + }); } diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index 31fee329d6..527dcd5ab8 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -11,8 +11,7 @@ let assembly_load: (assemblyName: string) => number; let find_class: (assemblyHandle: number, namespace: string, className: string) => number; let find_method: (typeHandle: number, methodName: string, unknownArg: number) => MethodHandle; let invoke_method: (method: MethodHandle, target: System_Object, argsArrayPtr: number, exceptionFlagIntPtr: number) => System_Object; -let mono_call_assembly_entry_point: (assemblyName: string, args: System_Object[]) => System_Object; -let mono_obj_array_new: (length: number) => System_Object; +let mono_string_array_new: (length: number) => System_Array<System_String>; let mono_string_get_utf8: (managedString: System_String) => Mono.Utf8Ptr; let mono_string: (jsString: string) => System_String; const appBinDirName = 'appBinDir'; @@ -41,9 +40,18 @@ export const monoPlatform: Platform = { findMethod: findMethod, - callEntryPoint: function callEntryPoint(assemblyName: string): System_Object { - const empty_array = mono_obj_array_new(0); - return mono_call_assembly_entry_point(assemblyName, [empty_array]); + callEntryPoint: function callEntryPoint(assemblyName: string) { + // Instead of using Module.mono_call_assembly_entry_point, we have our own logic for invoking + // the entrypoint which adds support for async main. + // Currently we disregard the return value from the entrypoint, whether it's sync or async. + // In the future, we might want Blazor.start to return a Promise<Promise<value>>, where the + // outer promise reflects the startup process, and the inner one reflects the possibly-async + // .NET entrypoint method. + const invokeEntrypoint = findMethod('Microsoft.AspNetCore.Blazor', 'Microsoft.AspNetCore.Blazor.Hosting', 'EntrypointInvoker', 'InvokeEntrypoint'); + this.callMethod(invokeEntrypoint, null, [ + this.toDotNetString(assemblyName), + mono_string_array_new(0) // In the future, we may have a way of supplying arg strings. For now, we always supply an empty string[]. + ]); }, callMethod: function callMethod(method: MethodHandle, target: System_Object, args: System_Object[]): System_Object { @@ -263,11 +271,9 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () 'number', ]); - mono_call_assembly_entry_point = Module.mono_call_assembly_entry_point; - mono_string_get_utf8 = Module.cwrap('mono_wasm_string_get_utf8', 'number', ['number']); mono_string = Module.cwrap('mono_wasm_string_from_js', 'number', ['string']); - mono_obj_array_new = Module.cwrap ('mono_wasm_obj_array_new', 'number', ['number']); + mono_string_array_new = Module.cwrap('mono_wasm_string_array_new', 'number', ['number']); MONO.loaded_files = []; diff --git a/src/Components/Web.JS/src/Platform/Platform.ts b/src/Components/Web.JS/src/Platform/Platform.ts index 84587f943a..29eb04609e 100644 --- a/src/Components/Web.JS/src/Platform/Platform.ts +++ b/src/Components/Web.JS/src/Platform/Platform.ts @@ -1,7 +1,7 @@ export interface Platform { start(loadAssemblyUrls: string[]): Promise<void>; - callEntryPoint(assemblyName: string): System_Object; + callEntryPoint(assemblyName: string): void; findMethod(assemblyName: string, namespace: string, className: string, methodName: string): MethodHandle; callMethod(method: MethodHandle, target: System_Object | null, args: (System_Object | null)[]): System_Object; diff --git a/src/Components/test/E2ETest/Tests/ErrorNotificationServerSideTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/ServerErrorNotificationTest.cs similarity index 85% rename from src/Components/test/E2ETest/Tests/ErrorNotificationServerSideTest.cs rename to src/Components/test/E2ETest/ServerExecutionTests/ServerErrorNotificationTest.cs index 6d2e860573..77b7da75d6 100644 --- a/src/Components/test/E2ETest/Tests/ErrorNotificationServerSideTest.cs +++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerErrorNotificationTest.cs @@ -5,16 +5,15 @@ using BasicTestApp; using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; using Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests; using Microsoft.AspNetCore.E2ETesting; -using OpenQA.Selenium; using Xunit; using Xunit.Abstractions; namespace Microsoft.AspNetCore.Components.E2ETest.Tests { [Collection("ErrorNotification")] // When the clientside and serverside tests run together it seems to cause failures, possibly due to connection lose on exception. - public class ErrorNotificationServerSideTest : ErrorNotificationClientSideTest + public class ServerErrorNotificationTest : ErrorNotificationTest { - public ErrorNotificationServerSideTest( + public ServerErrorNotificationTest( BrowserFixture browserFixture, ToggleExecutionModeServerFixture<Program> serverFixture, ITestOutputHelper output) diff --git a/src/Components/test/E2ETest/Tests/ErrorNotificationClientSideTest.cs b/src/Components/test/E2ETest/Tests/ErrorNotificationTest.cs similarity index 94% rename from src/Components/test/E2ETest/Tests/ErrorNotificationClientSideTest.cs rename to src/Components/test/E2ETest/Tests/ErrorNotificationTest.cs index 7c0705acde..883d1bc5ab 100644 --- a/src/Components/test/E2ETest/Tests/ErrorNotificationClientSideTest.cs +++ b/src/Components/test/E2ETest/Tests/ErrorNotificationTest.cs @@ -13,9 +13,9 @@ using Xunit.Abstractions; namespace Microsoft.AspNetCore.Components.E2ETest.Tests { [Collection("ErrorNotification")] // When the clientside and serverside tests run together it seems to cause failures, possibly due to connection lose on exception. - public class ErrorNotificationClientSideTest : ServerTestBase<ToggleExecutionModeServerFixture<Program>> + public class ErrorNotificationTest : ServerTestBase<ToggleExecutionModeServerFixture<Program>> { - public ErrorNotificationClientSideTest( + public ErrorNotificationTest( BrowserFixture browserFixture, ToggleExecutionModeServerFixture<Program> serverFixture, ITestOutputHelper output) diff --git a/src/Components/test/E2ETest/Tests/StartupErrorNotificationTest.cs b/src/Components/test/E2ETest/Tests/StartupErrorNotificationTest.cs new file mode 100644 index 0000000000..75359253c0 --- /dev/null +++ b/src/Components/test/E2ETest/Tests/StartupErrorNotificationTest.cs @@ -0,0 +1,40 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using BasicTestApp; +using Microsoft.AspNetCore.E2ETesting; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure; +using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures; +using OpenQA.Selenium; +using Xunit.Abstractions; +using Xunit; + +namespace Microsoft.AspNetCore.Components.E2ETest.Tests +{ + public class StartupErrorNotificationTest : ServerTestBase<DevHostServerFixture<Program>> + { + public StartupErrorNotificationTest( + BrowserFixture browserFixture, + DevHostServerFixture<Program> serverFixture, + ITestOutputHelper output) + : base(browserFixture, serverFixture, output) + { + _serverFixture.PathBase = ServerPathBase; + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void DisplaysNotificationForStartupException(bool errorIsAsync) + { + var url = $"{ServerPathBase}?error={(errorIsAsync ? "async" : "sync")}"; + + Navigate(url, noReload: true); + var errorUiElem = Browser.Exists(By.Id("blazor-error-ui"), TimeSpan.FromSeconds(10)); + Assert.NotNull(errorUiElem); + + Browser.Equal("block", () => errorUiElem.GetCssValue("display")); + } + } +} diff --git a/src/Components/test/testassets/BasicTestApp/Index.razor b/src/Components/test/testassets/BasicTestApp/Index.razor index 0548f382a8..eff29276a4 100644 --- a/src/Components/test/testassets/BasicTestApp/Index.razor +++ b/src/Components/test/testassets/BasicTestApp/Index.razor @@ -87,12 +87,6 @@ @((RenderFragment)RenderSelectedComponent) </app> -<div id="blazor-error-ui"> - An unhandled error has occurred. - <a href class='reload'>Reload</a> - <a class='dismiss' style="cursor: pointer;">🗙</a> -</div> - @code { string SelectedComponentTypeName { get; set; } = "none"; diff --git a/src/Components/test/testassets/BasicTestApp/Program.cs b/src/Components/test/testassets/BasicTestApp/Program.cs index cebb226e7c..2be7d81b4e 100644 --- a/src/Components/test/testassets/BasicTestApp/Program.cs +++ b/src/Components/test/testassets/BasicTestApp/Program.cs @@ -1,15 +1,20 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.Globalization; +using System.Threading.Tasks; using Microsoft.AspNetCore.Blazor.Hosting; +using Mono.WebAssembly.Interop; namespace BasicTestApp { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { + await SimulateErrorsIfNeededForTest(); + // We want the culture to be en-US so that the tests for bind can work consistently. CultureInfo.CurrentCulture = new CultureInfo("en-US"); @@ -19,5 +24,22 @@ namespace BasicTestApp public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => BlazorWebAssemblyHost.CreateDefaultBuilder() .UseBlazorStartup<Startup>(); + + // Supports E2E tests in StartupErrorNotificationTest + private static async Task SimulateErrorsIfNeededForTest() + { + var currentUrl = new MonoWebAssemblyJSRuntime().Invoke<string>("getCurrentUrl"); + if (currentUrl.Contains("error=sync")) + { + throw new InvalidTimeZoneException("This is a synchronous startup exception"); + } + + await Task.Yield(); + + if (currentUrl.Contains("error=async")) + { + throw new InvalidTimeZoneException("This is an asynchronous startup exception"); + } + } } } diff --git a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html index 517d9d6fcc..a37c08a7d1 100644 --- a/src/Components/test/testassets/BasicTestApp/wwwroot/index.html +++ b/src/Components/test/testassets/BasicTestApp/wwwroot/index.html @@ -14,6 +14,13 @@ <body> <root>Loading...</root> + <!-- Explicit display:none required so StartupErrorNotificationTest can observe it change --> + <div id="blazor-error-ui" style="display: none;"> + An unhandled error has occurred. + <a href class='reload'>Reload</a> + <a class='dismiss' style="cursor: pointer;">🗙</a> + </div> + <!-- Used for testing interop scenarios between JS and .NET --> <script src="js/jsinteroptests.js"></script> @@ -27,6 +34,10 @@ function navigationManagerNavigate() { Blazor.navigateTo('/subdir/some-path'); } + + function getCurrentUrl() { + return location.href; + } </script> <script src="_framework/blazor.webassembly.js"></script> diff --git a/src/Components/test/testassets/BasicTestApp/wwwroot/style.css b/src/Components/test/testassets/BasicTestApp/wwwroot/style.css index 777375d9e0..ea9900430b 100644 --- a/src/Components/test/testassets/BasicTestApp/wwwroot/style.css +++ b/src/Components/test/testassets/BasicTestApp/wwwroot/style.css @@ -7,11 +7,23 @@ } #blazor-error-ui { + background: lightyellow; + bottom: 0; + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); display: none; + left: 0; + padding: 0.6rem 1.25rem 0.7rem 1.25rem; + position: fixed; + width: 100%; + z-index: 1000; + box-sizing: border-box; } - #blazor-error-ui dismiss { + #blazor-error-ui .dismiss { cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; } .validation-message { diff --git a/src/Components/test/testassets/TestServer/Pages/_ServerHost.cshtml b/src/Components/test/testassets/TestServer/Pages/_ServerHost.cshtml index af2f28f658..b0ba837af2 100644 --- a/src/Components/test/testassets/TestServer/Pages/_ServerHost.cshtml +++ b/src/Components/test/testassets/TestServer/Pages/_ServerHost.cshtml @@ -17,6 +17,12 @@ <!-- Used for testing interop scenarios between JS and .NET --> <script src="js/jsinteroptests.js"></script> + <div id="blazor-error-ui"> + An unhandled error has occurred. + <a href class='reload'>Reload</a> + <a class='dismiss' style="cursor: pointer;">🗙</a> + </div> + <script> // Used by ElementRefComponent function setElementValue(element, newValue) { From e4c0ec3ca6128dd6161a53bb55c66ea8396cac42 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson <jacalvar@microsoft.com> Date: Fri, 13 Dec 2019 14:36:52 +0100 Subject: [PATCH 34/64] [Blazor] Update branding for the next release (#17852) --- src/Components/Blazor/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props index 9e35475c86..59beb90ee9 100644 --- a/src/Components/Blazor/Directory.Build.props +++ b/src/Components/Blazor/Directory.Build.props @@ -3,8 +3,8 @@ <PropertyGroup> <!-- Override version labels --> - <VersionPrefix>3.1.0</VersionPrefix> - <PreReleaseVersionLabel>preview4</PreReleaseVersionLabel> + <VersionPrefix>3.2.0</VersionPrefix> + <PreReleaseVersionLabel>preview1</PreReleaseVersionLabel> <DotNetFinalVersionKind /> <!-- This property points to the latest released Microsoft.AspNetCore.App version it needs to be updated to target the latest patch before a preview release. --> From b0568d5c28a22875e2452e7e52f5eae64b53aeeb Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 17 Dec 2019 11:48:08 -0800 Subject: [PATCH 35/64] Revive build installers step (#17914) * Revive build installers step --- .azure/pipelines/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 926e0b934a..064ad0327b 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -117,6 +117,19 @@ stages: $(_BuildArgs) displayName: Code sign packages + # Windows installers bundle both x86 and x64 assets + - script: ./build.cmd + -ci + -sign + -buildInstallers + /bl:artifacts/log/installers.msbuild.binlog + /p:DotNetSignType=$(_SignType) + /p:AssetManifestFileName=aspnetcore-win-x64-x86.xml + $(_BuildArgs) + $(_PublishArgs) + /p:PublishInstallerBaseVersion=true + displayName: Build Installers + artifacts: - name: Windows_Logs path: artifacts/log/ From 62e2fb22e5eef6ba4be0919a2f0d9435293eac82 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Wed, 18 Dec 2019 12:18:18 -0800 Subject: [PATCH 36/64] Use mono_bind_static_method for invoking JS methods (#17942) * Use mono_bind_static_method for invoking JS methods --- .../Blazor/src/Hosting/EntrypointInvoker.cs | 2 +- .../Web.JS/dist/Release/blazor.server.js | 2 +- .../Web.JS/dist/Release/blazor.webassembly.js | 2 +- .../Web.JS/src/Platform/Mono/MonoPlatform.ts | 156 +++--------------- .../Web.JS/src/Platform/Mono/MonoTypes.d.ts | 6 +- .../Web.JS/src/Platform/Platform.ts | 4 - 6 files changed, 35 insertions(+), 137 deletions(-) diff --git a/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs b/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs index bce063bcf5..40a5d07de4 100644 --- a/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs +++ b/src/Components/Blazor/Blazor/src/Hosting/EntrypointInvoker.cs @@ -22,7 +22,7 @@ namespace Microsoft.AspNetCore.Blazor.Hosting { var assembly = Assembly.Load(assemblyName); var entrypoint = FindUnderlyingEntrypoint(assembly); - var @params = entrypoint.GetParameters().Length == 1 ? new object[] { args } : new object[] { }; + var @params = entrypoint.GetParameters().Length == 1 ? new object[] { args ?? Array.Empty<string>() } : new object[] { }; entrypointResult = entrypoint.Invoke(null, @params); } catch (Exception syncException) diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js index e3ada49ef7..36050055b1 100644 --- a/src/Components/Web.JS/dist/Release/blazor.server.js +++ b/src/Components/Web.JS/dist/Release/blazor.server.js @@ -12,4 +12,4 @@ var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647 * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var i=n(34),a=Object.prototype.hasOwnProperty,s=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(i.isFunction(e)){if(c)return e.name;var t=e.toString().match(h);return t&&t[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!i.isFunction(e))return i.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,n,r,o){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function v(e,t){e||y(e,!0,t,"==",f.ok)}function b(e,t,n,a){if(e===t)return!0;if(o(e)&&o(t))return 0===r(e,t);if(i.isDate(e)&&i.isDate(t))return e.getTime()===t.getTime();if(i.isRegExp(e)&&i.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var c=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==c&&c===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(i.isPrimitive(e)||i.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=m(e),a=m(t);if(o&&!a||!o&&a)return!1;if(o)return e=s.call(e),t=s.call(t),b(e,t,n);var c,u,l=S(e),f=S(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),u=l.length-1;u>=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},h.clearImmediate=p}function p(e){delete u[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(20))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(9))},function(e,t,n){"use strict";var r=n(66).Transform,o=n(15),i=n(22);function a(e){(e=e||{}).objectMode=!0,e.highWaterMark=16,r.call(this,e),this._msgpack=e.msgpack}function s(e){if(!(this instanceof s))return(e=e||{}).msgpack=this,new s(e);a.call(this,e)}function c(e){if(!(this instanceof c))return(e=e||{}).msgpack=this,new c(e);a.call(this,e),this._chunks=i()}o(a,r),o(s,a),s.prototype._transform=function(e,t,n){var r=null;try{r=this._msgpack.encode(e).slice(0)}catch(e){return this.emit("error",e),n()}this.push(r),n()},o(c,a),c.prototype._transform=function(e,t,n){e&&this._chunks.append(e);try{var r=this._msgpack.decode(this._chunks);this.push(r)}catch(e){return void(e instanceof this._msgpack.IncompleteBufferError?n():this.emit("error",e))}this._chunks.length>0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(34).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t<n)}(h,o))return null;switch(h){case 192:return n(null,1);case 194:return n(!1,1);case 195:return n(!0,1);case 204:return n(p=e.readUInt8(r+1),2);case 205:return n(p=e.readUInt16BE(r+1),3);case 206:return n(p=e.readUInt32BE(r+1),5);case 207:for(f=7;f>=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;a<r;a++){var u=i(e,t);if(!u)return null;s.push(u.value),t+=u.bytesConsumed,c+=u.bytesConsumed}return n(s,o+c)}function s(e,t,r,o){var a,s={},c=0;for(t+=o,a=0;a<r;a++){var u=i(e,t);if(!u)return null;var l=i(e,t+=u.bytesConsumed);if(!l)return null;s[u.value]=l.value,t+=l.bytesConsumed,c+=u.bytesConsumed+l.bytesConsumed}return n(s,o+c)}function c(e,t,n){var r=e.readInt8(t+1);return u(e,t,r,n,2)}function u(t,r,o,i,a){var s,c;if(r+=a,o<0)switch(o){case-1:return function(e,t,r){var o,i;switch(i=0,t){case 4:o=e.readUInt32BE(0);break;case 8:var a=e.readUInt32BE(0),s=e.readUInt32BE(4);i=a/4,o=(3&a)*Math.pow(2,32)+s;break;case 12:throw new Error("timestamp 96 is not yet implemented")}var c=1e3*o+Math.round(i/1e6);return n(new Date(c),t+r)}(c=t.slice(r,r+i),i,a)}for(s=0;s<e.length;s++){if(o===e[s].type)return c=t.slice(r,r+i),n(e[s].decode(c),a+i)}throw new Error("unable to find ext type "+o)}},e.exports.IncompleteBufferError=o},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(22),i=.1;function a(e,t){var n;return(n=r.allocUnsafe(5))[0]=202,n.writeFloatBE(e,1),(t||Math.abs(e-n.readFloatBE(1))>i)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n<e.length;n++)if(e[n].check(t)){i=e[n].encode(t);break}if(!i)return null;1==(a=i.length-1)?s.push(212):2===a?s.push(213):4===a?s.push(214):8===a?s.push(215):16===a?s.push(216):a<256?(s.push(199),s.push(a)):a<65536?(s.push(200),s.push(a>>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),a=n(71),s=n(16),c=function(){function e(e,t){this.nextBatchId=2,this.browserRendererId=e,this.logger=t}return e.getOrCreate=function(t){return e.instance||(e.instance=new e(0,t)),this.instance},e.prototype.processBatch=function(e,t,n){return r(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:return e<this.nextBatchId?[4,this.completeBatch(n,e)]:[3,2];case 1:return o.sent(),this.logger.log(s.LogLevel.Debug,"Batch "+e+" already processed. Waiting for batch "+this.nextBatchId+"."),[2];case 2:return e>this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<<r,i<128)break;r+=7}return n}(this.batchDataUint8,n),i=n+((t=o)<128?1:t<16384?2:t<2097152?3:4),a=new Uint8Array(this.batchDataUint8.buffer,this.batchDataUint8.byteOffset+i,o);return r.decodeUtf8(a)},e}(),f=function(){function e(e){this.batchDataUint8=e}return e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}(),h=function(){function e(e){this.batchDataUint8=e}return e.prototype.offset=function(e){return 0},e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}();function p(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function d(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t<n;){var i=e[t++];if(0===i)break;if(0==(128&i))r.push(i);else if(192==(224&i)){var a=63&e[t++];r.push((31&i)<<6|a)}else if(224==(240&i)){var a=63&e[t++],s=63&e[t++];r.push((31&i)<<12|a<<6|s)}else if(240==(248&i)){var a=63&e[t++],s=63&e[t++],c=63&e[t++],u=(7&i)<<18|a<<12|s<<6|c;u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),a=n(13),s=function(){function e(e){this.circuitId=void 0,this.components=e}return e.prototype.reconnect=function(e){if(!this.circuitId)throw new Error("Circuit host not initialized.");return e.invoke("ConnectCircuit",this.circuitId)},e.prototype.initialize=function(e){if(this.circuitId)throw new Error("Circuit host '"+this.circuitId+"' already initialized.");this.circuitId=e},e.prototype.startCircuit=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,e.invoke("StartCircuit",i.internalFunctions.getBaseURI(),i.internalFunctions.getLocationHref(),JSON.stringify(this.components.map(function(e){return e.toRecord()})))];case 1:return(t=n.sent())?(this.initialize(t),[2,!0]):[2,!1]}})})},e.prototype.resolveElement=function(e){var t=Number.parseInt(e);if(Number.isNaN(t))throw new Error("Invalid sequence number '"+e+"'.");return a.toLogicalRootCommentElement(this.components[t].start,this.components[t].end)},e}();t.CircuitDescriptor=s;var c=function(){function e(e,t,n,r,o){this.type=e,this.start=t,this.end=n,this.sequence=r,this.descriptor=o}return e.prototype.toRecord=function(){return{type:this.type,sequence:this.sequence,descriptor:this.descriptor}},e}();t.ComponentDescriptor=c,t.discoverComponents=function(e){for(var t=function e(t){if(!t.hasChildNodes())return[];for(var n=[],r=new h(t.childNodes);r.next()&&r.currentElement;){var o=l(r);if(o)n.push(o);else for(var i=e(r.currentElement),a=0;a<i.length;a++){var s=i[a];n.push(s)}}return n}(e),n=[],r=0;r<t.length;r++){var o=t[r],i=new c(o.type,o.start,o.end,o.sequence,o.descriptor);n.push(i)}return n.sort(function(e,t){return e.sequence-t.sequence})};var u=/\W*Blazor:[^{]*(.*)$/;function l(e){var t=e.currentElement;if(t&&t.nodeType===Node.COMMENT_NODE&&t.textContent){var n=new RegExp(u).exec(t.textContent),r=n&&n[1];if(!r)return;try{return function(e,t,n){var r=JSON.parse(e),o=r.type,i=r.sequence,a=r.descriptor,s=r.prerenderId;if("server"!==o)throw new Error("Invalid component type '"+o+"'.");if(!a)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===i)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(i))throw new Error("Error parsing the sequence '"+i+"' for component '"+e+"'");if(s){var c=function(e,t){for(;t.next()&&t.currentElement;){var n=t.currentElement;if(n.nodeType===Node.COMMENT_NODE&&n.textContent){var r=new RegExp(u).exec(n.textContent),o=r&&r[1];if(o)return f(o,e),n}}return}(s,n);if(!c)throw new Error("Could not find an end component comment for '"+t+"'");return{type:o,sequence:i,descriptor:a,start:t,prerenderId:s,end:c}}return{type:o,sequence:i,descriptor:a,start:t}}(r,t,e)}catch(e){throw new Error("Found malformed component comment at "+t.textContent)}}}function f(e,t){var n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error("Invalid end of component comment: '"+e+"'");var r=n.prerenderId;if(!r)throw new Error("End of component comment must have a value for the prerendered property: '"+e+"'");if(r!==t)throw new Error("End of component comment prerendered property must match the start comment prerender id: '"+t+"', '"+r+"'")}var h=function(){function e(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}return e.prototype.next=function(){return this.currentIndex++,this.currentIndex<this.length?(this.currentElement=this.childNodes[this.currentIndex],!0):(this.currentElement=void 0,!1)},e}()},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16);t.resolveOptions=function(e){var t=r({},i,e);return e&&e.reconnectionOptions&&(t.reconnectionOptions=r({},i.reconnectionOptions,e.reconnectionOptions)),t};var i={configureSignalR:function(e){},logLevel:o.LogLevel.Warning,reconnectionOptions:{maxRetries:5,retryIntervalMilliseconds:3e3,dialogId:"components-reconnect-modal"}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(77),a=n(78),s=n(16),c=function(){function e(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||function(){return window.Blazor.reconnect()}}return e.prototype.onConnectionDown=function(e,t){if(!this._reconnectionDisplay){var n=document.getElementById(e.dialogId);this._reconnectionDisplay=n?new a.UserSpecifiedDisplay(n):new i.DefaultReconnectDisplay(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new u(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))},e.prototype.onConnectionUp=function(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)},e}();t.DefaultReconnectionHandler=c;var u=function(){function e(e,t,n,r){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=r,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}return e.prototype.dispose=function(){this.isDisposed=!0,this.reconnectDisplay.hide()},e.prototype.attemptPeriodicReconnection=function(e){return r(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.maxRetries?[4,this.delay(e.retryIntervalMilliseconds)]:[3,7];case 2:if(r.sent(),this.isDisposed)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.reconnectCallback()];case 4:return r.sent()?[2]:(this.reconnectDisplay.rejected(),[2]);case 5:return n=r.sent(),this.logger.log(s.LogLevel.Error,n),[3,6];case 6:return t++,[3,1];case 7:return this.reconnectDisplay.failed(),[2]}})})},e.prototype.delay=function(e){return new Promise(function(t){return setTimeout(t,e)})},e}()},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(16),a=function(){function e(e,t,n){var a=this;this.document=t,this.logger=n,this.addedToDom=!1,this.modal=this.document.createElement("div"),this.modal.id=e;this.modal.style.cssText=["position: fixed","top: 0","right: 0","bottom: 0","left: 0","z-index: 1000","display: none","overflow: hidden","background-color: #fff","opacity: 0.8","text-align: center","font-weight: bold"].join(";"),this.modal.innerHTML='<h5 style="margin-top: 20px"></h5><button style="margin:5px auto 5px">Retry</button><p>Alternatively, <a href>reload</a></p>',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(a,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try <a href>reloading</a> the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. <a href>Reload</a> the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o<e.byteLength;){var i=0,a=0,s=void 0;do{a|=(127&(s=n[o+i]))<<r[i],i++}while(i<Math.min(5,e.byteLength-o)&&0!=(128&s));if(0!=(128&s)&&i<5)throw new Error("Cannot read message size.");if(5===i&&s>7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s<c.length;s++){var u=c[s],l=this.parseMessage(u,t);l&&o.push(l)}return o},e.prototype.writeMessage=function(e){switch(e.type){case i.MessageType.Invocation:return this.writeInvocation(e);case i.MessageType.StreamInvocation:return this.writeStreamInvocation(e);case i.MessageType.StreamItem:return this.writeStreamItem(e);case i.MessageType.Completion:return this.writeCompletion(e);case i.MessageType.Ping:return a.write(s);case i.MessageType.CancelInvocation:return this.writeCancelInvocation(e);default:throw new Error("Invalid message type.")}},e.prototype.parseMessage=function(e,t){if(0===e.length)throw new Error("Invalid payload.");var n=o().decode(r.Buffer.from(e));if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");var a=n[0];switch(a){case i.MessageType.Invocation:return this.createInvocationMessage(this.readHeaders(n),n);case i.MessageType.StreamItem:return this.createStreamItemMessage(this.readHeaders(n),n);case i.MessageType.Completion:return this.createCompletionMessage(this.readHeaders(n),n);case i.MessageType.Ping:return this.createPingMessage(n);case i.MessageType.Close:return this.createCloseMessage(n);default:return t.log(i.LogLevel.Information,"Unknown message type '"+a+"' ignored."),null}},e.prototype.createCloseMessage=function(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="0.0.0-DEV_BUILD"}]); \ No newline at end of file +function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var i=n(34),a=Object.prototype.hasOwnProperty,s=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(i.isFunction(e)){if(c)return e.name;var t=e.toString().match(h);return t&&t[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!i.isFunction(e))return i.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,n,r,o){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function v(e,t){e||y(e,!0,t,"==",f.ok)}function b(e,t,n,a){if(e===t)return!0;if(o(e)&&o(t))return 0===r(e,t);if(i.isDate(e)&&i.isDate(t))return e.getTime()===t.getTime();if(i.isRegExp(e)&&i.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var c=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==c&&c===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(i.isPrimitive(e)||i.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=m(e),a=m(t);if(o&&!a||!o&&a)return!1;if(o)return e=s.call(e),t=s.call(t),b(e,t,n);var c,u,l=S(e),f=S(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),u=l.length-1;u>=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},h.clearImmediate=p}function p(e){delete u[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(20))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(9))},function(e,t,n){"use strict";var r=n(66).Transform,o=n(15),i=n(22);function a(e){(e=e||{}).objectMode=!0,e.highWaterMark=16,r.call(this,e),this._msgpack=e.msgpack}function s(e){if(!(this instanceof s))return(e=e||{}).msgpack=this,new s(e);a.call(this,e)}function c(e){if(!(this instanceof c))return(e=e||{}).msgpack=this,new c(e);a.call(this,e),this._chunks=i()}o(a,r),o(s,a),s.prototype._transform=function(e,t,n){var r=null;try{r=this._msgpack.encode(e).slice(0)}catch(e){return this.emit("error",e),n()}this.push(r),n()},o(c,a),c.prototype._transform=function(e,t,n){e&&this._chunks.append(e);try{var r=this._msgpack.decode(this._chunks);this.push(r)}catch(e){return void(e instanceof this._msgpack.IncompleteBufferError?n():this.emit("error",e))}this._chunks.length>0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(34).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t<n)}(h,o))return null;switch(h){case 192:return n(null,1);case 194:return n(!1,1);case 195:return n(!0,1);case 204:return n(p=e.readUInt8(r+1),2);case 205:return n(p=e.readUInt16BE(r+1),3);case 206:return n(p=e.readUInt32BE(r+1),5);case 207:for(f=7;f>=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;a<r;a++){var u=i(e,t);if(!u)return null;s.push(u.value),t+=u.bytesConsumed,c+=u.bytesConsumed}return n(s,o+c)}function s(e,t,r,o){var a,s={},c=0;for(t+=o,a=0;a<r;a++){var u=i(e,t);if(!u)return null;var l=i(e,t+=u.bytesConsumed);if(!l)return null;s[u.value]=l.value,t+=l.bytesConsumed,c+=u.bytesConsumed+l.bytesConsumed}return n(s,o+c)}function c(e,t,n){var r=e.readInt8(t+1);return u(e,t,r,n,2)}function u(t,r,o,i,a){var s,c;if(r+=a,o<0)switch(o){case-1:return function(e,t,r){var o,i;switch(i=0,t){case 4:o=e.readUInt32BE(0);break;case 8:var a=e.readUInt32BE(0),s=e.readUInt32BE(4);i=a/4,o=(3&a)*Math.pow(2,32)+s;break;case 12:throw new Error("timestamp 96 is not yet implemented")}var c=1e3*o+Math.round(i/1e6);return n(new Date(c),t+r)}(c=t.slice(r,r+i),i,a)}for(s=0;s<e.length;s++){if(o===e[s].type)return c=t.slice(r,r+i),n(e[s].decode(c),a+i)}throw new Error("unable to find ext type "+o)}},e.exports.IncompleteBufferError=o},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(22),i=.1;function a(e,t){var n;return(n=r.allocUnsafe(5))[0]=202,n.writeFloatBE(e,1),(t||Math.abs(e-n.readFloatBE(1))>i)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n<e.length;n++)if(e[n].check(t)){i=e[n].encode(t);break}if(!i)return null;1==(a=i.length-1)?s.push(212):2===a?s.push(213):4===a?s.push(214):8===a?s.push(215):16===a?s.push(216):a<256?(s.push(199),s.push(a)):a<65536?(s.push(200),s.push(a>>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),a=n(71),s=n(16),c=function(){function e(e,t){this.nextBatchId=2,this.browserRendererId=e,this.logger=t}return e.getOrCreate=function(t){return e.instance||(e.instance=new e(0,t)),this.instance},e.prototype.processBatch=function(e,t,n){return r(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:return e<this.nextBatchId?[4,this.completeBatch(n,e)]:[3,2];case 1:return o.sent(),this.logger.log(s.LogLevel.Debug,"Batch "+e+" already processed. Waiting for batch "+this.nextBatchId+"."),[2];case 2:return e>this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<<r,i<128)break;r+=7}return n}(this.batchDataUint8,n),i=n+((t=o)<128?1:t<16384?2:t<2097152?3:4),a=new Uint8Array(this.batchDataUint8.buffer,this.batchDataUint8.byteOffset+i,o);return r.decodeUtf8(a)},e}(),f=function(){function e(e){this.batchDataUint8=e}return e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}(),h=function(){function e(e){this.batchDataUint8=e}return e.prototype.offset=function(e){return 0},e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}();function p(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function d(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t<n;){var i=e[t++];if(0===i)break;if(0==(128&i))r.push(i);else if(192==(224&i)){var a=63&e[t++];r.push((31&i)<<6|a)}else if(224==(240&i)){var a=63&e[t++],s=63&e[t++];r.push((31&i)<<12|a<<6|s)}else if(240==(248&i)){var a=63&e[t++],s=63&e[t++],c=63&e[t++],u=(7&i)<<18|a<<12|s<<6|c;u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),a=n(13),s=function(){function e(e){this.circuitId=void 0,this.components=e}return e.prototype.reconnect=function(e){if(!this.circuitId)throw new Error("Circuit host not initialized.");return e.invoke("ConnectCircuit",this.circuitId)},e.prototype.initialize=function(e){if(this.circuitId)throw new Error("Circuit host '"+this.circuitId+"' already initialized.");this.circuitId=e},e.prototype.startCircuit=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,e.invoke("StartCircuit",i.internalFunctions.getBaseURI(),i.internalFunctions.getLocationHref(),JSON.stringify(this.components.map(function(e){return e.toRecord()})))];case 1:return(t=n.sent())?(this.initialize(t),[2,!0]):[2,!1]}})})},e.prototype.resolveElement=function(e){var t=Number.parseInt(e);if(Number.isNaN(t))throw new Error("Invalid sequence number '"+e+"'.");return a.toLogicalRootCommentElement(this.components[t].start,this.components[t].end)},e}();t.CircuitDescriptor=s;var c=function(){function e(e,t,n,r,o){this.type=e,this.start=t,this.end=n,this.sequence=r,this.descriptor=o}return e.prototype.toRecord=function(){return{type:this.type,sequence:this.sequence,descriptor:this.descriptor}},e}();t.ComponentDescriptor=c,t.discoverComponents=function(e){for(var t=function e(t){if(!t.hasChildNodes())return[];for(var n=[],r=new h(t.childNodes);r.next()&&r.currentElement;){var o=l(r);if(o)n.push(o);else for(var i=e(r.currentElement),a=0;a<i.length;a++){var s=i[a];n.push(s)}}return n}(e),n=[],r=0;r<t.length;r++){var o=t[r],i=new c(o.type,o.start,o.end,o.sequence,o.descriptor);n.push(i)}return n.sort(function(e,t){return e.sequence-t.sequence})};var u=/\W*Blazor:[^{]*(.*)$/;function l(e){var t=e.currentElement;if(t&&t.nodeType===Node.COMMENT_NODE&&t.textContent){var n=new RegExp(u).exec(t.textContent),r=n&&n[1];if(!r)return;try{return function(e,t,n){var r=JSON.parse(e),o=r.type,i=r.sequence,a=r.descriptor,s=r.prerenderId;if("server"!==o)throw new Error("Invalid component type '"+o+"'.");if(!a)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===i)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(i))throw new Error("Error parsing the sequence '"+i+"' for component '"+e+"'");if(s){var c=function(e,t){for(;t.next()&&t.currentElement;){var n=t.currentElement;if(n.nodeType===Node.COMMENT_NODE&&n.textContent){var r=new RegExp(u).exec(n.textContent),o=r&&r[1];if(o)return f(o,e),n}}return}(s,n);if(!c)throw new Error("Could not find an end component comment for '"+t+"'");return{type:o,sequence:i,descriptor:a,start:t,prerenderId:s,end:c}}return{type:o,sequence:i,descriptor:a,start:t}}(r,t,e)}catch(e){throw new Error("Found malformed component comment at "+t.textContent)}}}function f(e,t){var n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error("Invalid end of component comment: '"+e+"'");var r=n.prerenderId;if(!r)throw new Error("End of component comment must have a value for the prerendered property: '"+e+"'");if(r!==t)throw new Error("End of component comment prerendered property must match the start comment prerender id: '"+t+"', '"+r+"'")}var h=function(){function e(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}return e.prototype.next=function(){return this.currentIndex++,this.currentIndex<this.length?(this.currentElement=this.childNodes[this.currentIndex],!0):(this.currentElement=void 0,!1)},e}()},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16);t.resolveOptions=function(e){var t=r({},i,e);return e&&e.reconnectionOptions&&(t.reconnectionOptions=r({},i.reconnectionOptions,e.reconnectionOptions)),t};var i={configureSignalR:function(e){},logLevel:o.LogLevel.Warning,reconnectionOptions:{maxRetries:5,retryIntervalMilliseconds:3e3,dialogId:"components-reconnect-modal"}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(77),a=n(78),s=n(16),c=function(){function e(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||function(){return window.Blazor.reconnect()}}return e.prototype.onConnectionDown=function(e,t){if(!this._reconnectionDisplay){var n=document.getElementById(e.dialogId);this._reconnectionDisplay=n?new a.UserSpecifiedDisplay(n):new i.DefaultReconnectDisplay(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new u(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))},e.prototype.onConnectionUp=function(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)},e}();t.DefaultReconnectionHandler=c;var u=function(){function e(e,t,n,r){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=r,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}return e.prototype.dispose=function(){this.isDisposed=!0,this.reconnectDisplay.hide()},e.prototype.attemptPeriodicReconnection=function(e){return r(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.maxRetries?[4,this.delay(e.retryIntervalMilliseconds)]:[3,7];case 2:if(r.sent(),this.isDisposed)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.reconnectCallback()];case 4:return r.sent()?[2]:(this.reconnectDisplay.rejected(),[2]);case 5:return n=r.sent(),this.logger.log(s.LogLevel.Error,n),[3,6];case 6:return t++,[3,1];case 7:return this.reconnectDisplay.failed(),[2]}})})},e.prototype.delay=function(e){return new Promise(function(t){return setTimeout(t,e)})},e}()},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(16),a=function(){function e(e,t,n){var a=this;this.document=t,this.logger=n,this.addedToDom=!1,this.modal=this.document.createElement("div"),this.modal.id=e;this.modal.style.cssText=["position: fixed","top: 0","right: 0","bottom: 0","left: 0","z-index: 1000","display: none","overflow: hidden","background-color: #fff","opacity: 0.8","text-align: center","font-weight: bold"].join(";"),this.modal.innerHTML='<h5 style="margin-top: 20px"></h5><button style="margin:5px auto 5px">Retry</button><p>Alternatively, <a href>reload</a></p>',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(a,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try <a href>reloading</a> the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. <a href>Reload</a> the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o<e.byteLength;){var i=0,a=0,s=void 0;do{a|=(127&(s=n[o+i]))<<r[i],i++}while(i<Math.min(5,e.byteLength-o)&&0!=(128&s));if(0!=(128&s)&&i<5)throw new Error("Cannot read message size.");if(5===i&&s>7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s<c.length;s++){var u=c[s],l=this.parseMessage(u,t);l&&o.push(l)}return o},e.prototype.writeMessage=function(e){switch(e.type){case i.MessageType.Invocation:return this.writeInvocation(e);case i.MessageType.StreamInvocation:return this.writeStreamInvocation(e);case i.MessageType.StreamItem:return this.writeStreamItem(e);case i.MessageType.Completion:return this.writeCompletion(e);case i.MessageType.Ping:return a.write(s);case i.MessageType.CancelInvocation:return this.writeCancelInvocation(e);default:throw new Error("Invalid message type.")}},e.prototype.parseMessage=function(e,t){if(0===e.length)throw new Error("Invalid payload.");var n=o().decode(r.Buffer.from(e));if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");var a=n[0];switch(a){case i.MessageType.Invocation:return this.createInvocationMessage(this.readHeaders(n),n);case i.MessageType.StreamItem:return this.createStreamItemMessage(this.readHeaders(n),n);case i.MessageType.Completion:return this.createCompletionMessage(this.readHeaders(n),n);case i.MessageType.Ping:return this.createPingMessage(n);case i.MessageType.Close:return this.createCloseMessage(n);default:return t.log(i.LogLevel.Information,"Unknown message type '"+a+"' ignored."),null}},e.prototype.createCloseMessage=function(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="3.1.0"}]); \ No newline at end of file diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js index d125cc352f..9f9d6b369d 100644 --- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js +++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f<u;f++){var p=t.updatedComponentsEntry(l,f),m=d.componentId(p),h=d.edits(p);n.updateComponent(t,m,h,c)}var v=t.disposedComponentIds(),y=r.values(v),g=r.count(v);for(f=0;f<g;f++)m=t.disposedComponentIdsEntry(y,f),n.disposeComponent(m);var b=t.disposedEventHandlerIds(),w=r.values(b),E=r.count(b);for(f=0;f<E;f++){var _=t.disposedEventHandlerIdsEntry(w,f);n.disposeEventHandler(_)}i&&(i=!1,window.scrollTo&&window.scrollTo(0,0))},t.resetScrollAfterNextBatch=function(){i=!0}},,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17);var a,i=n(5),l=!1,u=!1,s=null;function c(e,t){var n=p(e);if(!t&&m(n))d(n,!1);else if(t&&location.href===e){var r=e+"?";history.replaceState(null,"",r),location.replace(e)}else location.href=e}function d(e,t){i.resetScrollAfterNextBatch(),history.pushState(null,"",e),f(t)}function f(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return s?[4,s(location.href,e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function p(e){return(a=a||document.createElement("a")).href=e,a.href}function m(e){var t,n=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1);return e.startsWith(n)}t.internalFunctions={listenForNavigationEvents:function(e){if(s=e,u)return;u=!0,window.addEventListener("popstate",function(){return f(!1)})},enableNavigationInterception:function(){l=!0},navigateTo:c,getBaseURI:function(){return document.baseURI},getLocationHref:function(){return location.href}},t.attachToEventDelegator=function(e){e.notifyAfterClick(function(e){if(l&&0===e.button&&!function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&!e.defaultPrevented){var t=function e(t,n){return t?t.tagName===n?t:e(t.parentElement,n):null}(e.target,"A");if(t&&t.hasAttribute("href")){var n=t.getAttribute("target");if(n&&"_self"!==n)return;var r=p(t.getAttribute("href"));m(r)&&(e.preventDefault(),d(r,!0))}}})},t.navigateTo=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),a=p("_blazorLogicalEnd");function i(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n<i.length){var l=i[n];l.parentNode.insertBefore(e,l),i.splice(n,0,a)}else f(e,t),i.push(a);a[o]=t,r in a||(a[r]=[])}function u(e){return e[o]||null}function s(e){return e[r]}function c(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function d(e){var t=s(u(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function f(e,t){if(t instanceof Element)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: "+t);var n=d(t);n?n.parentNode.insertBefore(e,n):f(e,u(t))}}function p(e){return"function"==typeof Symbol?Symbol():e}t.toLogicalRootCommentElement=function(e,t){if(!e.parentNode)throw new Error("Comment not connected to the DOM "+e.textContent);var n=e.parentNode,r=i(n,!0),l=s(r);return Array.from(n.childNodes).forEach(function(e){return l.push(e)}),e[o]=r,t&&(e[a]=t,i(t,!0)),i(e,!0)},t.toLogicalElement=i,t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return l(n,e,t),n},t.insertLogicalChild=l,t.removeLogicalChild=function e(t,n){var r=s(t).splice(n,1)[0];if(r instanceof Comment)for(var o=s(r);o.length>0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return l(e,t,null,n)},e.invokeMethodAsync=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return u(e,t,null,n)},e.jsCallDispatcher={findJSFunction:p,invokeJSFromDotNet:function(e,t){var n=p(e).apply(null,d(t));return null==n?null:JSON.stringify(n,h)},beginInvokeJSFromDotNet:function(e,t,n){var r=new Promise(function(e){e(p(t).apply(null,d(n)))});e&&r.then(function(t){return s().endInvokeJSFromDotNet(e,!0,JSON.stringify([e,!0,t],h))},function(t){return s().endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,f(t)]))})},endInvokeDotNetFromJS:function(e,t,n){var r=t?n:new Error(n);c(parseInt(e),t,r)}};var m=function(){function e(e){this._id=e}return e.prototype.invokeMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return l(null,e,this._id,t)},e.prototype.invokeMethodAsync=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u(null,e,this._id,t)},e.prototype.dispose=function(){u(null,"__Dispose",this._id,null).catch(function(e){return console.error(e)})},e.prototype.serializeAsArg=function(){return{__dotNetObject:this._id}},e}();function h(e,t){return t instanceof m?t.serializeAsArg():t}i(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__dotNetObject")?new m(t.__dotNetObject):t})}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPlatform=function(e){return t.platform=e,t.platform}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=function(e,t){if(!r)throw new Error("eventDispatcher not initialized. Call 'setEventDispatcher' to configure it.");return r(e,t)},t.setEventDispatcher=function(e){r=e}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(5);window.Blazor={navigateTo:r.navigateTo,_internal:{attachRootComponentToElement:o.attachRootComponentToElement,navigationManager:r.internalFunctions}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),o=n(28),a=n(13),i=n(31),l=n(19),u=n(12),s=document.createElement("template"),c=document.createElementNS("http://www.w3.org/2000/svg","g"),d={submit:!0},f={},p=function(){function e(e){var t=this;this.childComponentLocations={},this.browserRendererId=e,this.eventDelegator=new o.EventDelegator(function(e,n,r,o){!function(e,t,n,r,o){d[e.type]&&e.preventDefault();var a={browserRendererId:t,eventHandlerId:n,eventArgsType:r.type,eventFieldInfo:o};l.dispatchEvent(a,r.data)}(e,t.browserRendererId,n,r,o)}),u.attachToEventDelegator(this.eventDelegator)}return e.prototype.attachRootComponentToLogicalElement=function(e,t){this.attachComponentToElement(e,t),f[e]=t},e.prototype.updateComponent=function(e,t,n,r){var o=this.childComponentLocations[t];if(!o)throw new Error("No element is currently associated with component "+t);var i=f[t];if(i){var l=a.getLogicalSiblingEnd(i);delete f[t],l?function(e,t){var n=a.getLogicalParent(e);if(!n)throw new Error("Can't clear between nodes. The start node does not have a logical parent.");for(var r=a.getLogicalChildrenArray(n),o=r.indexOf(e)+1,i=r.indexOf(t),l=o;l<=i;l++)a.removeLogicalChild(n,o);e.textContent="!"}(i,l):function(e){var t;for(;t=e.firstChild;)e.removeChild(t)}(i)}var u=a.getClosestDomElement(o).ownerDocument,s=u&&u.activeElement;this.applyEdits(e,t,o,0,n,r),s instanceof HTMLElement&&u&&u.activeElement!==s&&s.focus()},e.prototype.disposeComponent=function(e){delete this.childComponentLocations[e]},e.prototype.disposeEventHandler=function(e){this.eventDelegator.removeListener(e)},e.prototype.attachComponentToElement=function(e,t){this.childComponentLocations[e]=t},e.prototype.applyEdits=function(e,t,n,o,i,l){for(var u,s=0,c=o,d=e.arrayBuilderSegmentReader,f=e.editReader,p=e.frameReader,m=d.values(i),h=d.offset(i),v=h+d.count(i),y=h;y<v;y++){var g=e.diffReader.editsEntry(m,y),b=f.editType(g);switch(b){case r.EditType.prependFrame:var w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);this.insertFrame(e,t,n,c+_,l,E,w);break;case r.EditType.removeFrame:_=f.siblingIndex(g);a.removeLogicalChild(n,c+_);break;case r.EditType.setAttribute:w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof Element))throw new Error("Cannot set attribute on non-element child");this.applyAttribute(e,t,I,E);break;case r.EditType.removeAttribute:var I;_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof HTMLElement))throw new Error("Cannot remove attribute from non-element child");var S=f.removedAttributeName(g);this.tryApplySpecialProperty(e,I,S,null)||I.removeAttribute(S);break;case r.EditType.updateText:w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);var C=a.getLogicalChild(n,c+_);if(!(C instanceof Text))throw new Error("Cannot set text content on non-text child");C.textContent=p.textContent(E);break;case r.EditType.updateMarkup:w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);a.removeLogicalChild(n,c+_),this.insertMarkup(e,n,c+_,E);break;case r.EditType.stepIn:_=f.siblingIndex(g);n=a.getLogicalChild(n,c+_),s++,c=0;break;case r.EditType.stepOut:n=a.getLogicalParent(n),c=0===--s?o:0;break;case r.EditType.permutationListEntry:(u=u||[]).push({fromSiblingIndex:c+f.siblingIndex(g),toSiblingIndex:c+f.moveToSiblingIndex(g)});break;case r.EditType.permutationListEnd:a.permuteLogicalChildren(n,u),u=void 0;break;default:throw new Error("Unknown edit type: "+b)}}},e.prototype.insertFrame=function(e,t,n,o,a,l,u){var s=e.frameReader,c=s.frameType(l);switch(c){case r.FrameType.element:return this.insertElement(e,t,n,o,a,l,u),1;case r.FrameType.text:return this.insertText(e,n,o,l),1;case r.FrameType.attribute:throw new Error("Attribute frames should only be present as leading children of element frames.");case r.FrameType.component:return this.insertComponent(e,n,o,l),1;case r.FrameType.region:return this.insertFrameRange(e,t,n,o,a,u+1,u+s.subtreeLength(l));case r.FrameType.elementReferenceCapture:if(n instanceof Element)return i.applyCaptureIdToElement(n,s.elementReferenceCaptureId(l)),0;throw new Error("Reference capture frames can only be children of element frames.");case r.FrameType.markup:return this.insertMarkup(e,n,o,l),1;default:throw new Error("Unknown frame type: "+c)}},e.prototype.insertElement=function(e,t,n,o,i,l,u){var s=e.frameReader,c=s.elementName(l),d="svg"===c||a.isSvgElement(n)?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c),f=a.toLogicalElement(d);a.insertLogicalChild(d,n,o);for(var p=u+s.subtreeLength(l),m=u+1;m<p;m++){var h=e.referenceFramesEntry(i,m);if(s.frameType(h)!==r.FrameType.attribute){this.insertFrameRange(e,t,f,0,i,m,p);break}this.applyAttribute(e,t,d,h)}if(d instanceof HTMLSelectElement&&"_blazorSelectValue"in d){var v=d._blazorSelectValue;d.value=v,delete d._blazorSelectValue}},e.prototype.insertComponent=function(e,t,n,r){var o=a.createAndInsertLogicalContainer(t,n),i=e.frameReader.componentId(r);this.attachComponentToElement(i,o)},e.prototype.insertText=function(e,t,n,r){var o=e.frameReader.textContent(r),i=document.createTextNode(o);a.insertLogicalChild(i,t,n)},e.prototype.insertMarkup=function(e,t,n,r){for(var o,i=a.createAndInsertLogicalContainer(t,n),l=e.frameReader.markupContent(r),u=(o=l,a.isSvgElement(t)?(c.innerHTML=o||" ",c):(s.innerHTML=o||" ",s.content)),d=0;u.firstChild;)a.insertLogicalChild(u.firstChild,i,d++)},e.prototype.applyAttribute=function(e,t,n,r){var o=e.frameReader,a=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){var l=h(a);this.eventDelegator.setListener(n,l,i,t)}else this.tryApplySpecialProperty(e,n,a,r)||n.setAttribute(a,o.attributeValue(r))},e.prototype.tryApplySpecialProperty=function(e,t,n,r){switch(n){case"value":return this.tryApplyValueProperty(e,t,r);case"checked":return this.tryApplyCheckedProperty(e,t,r);default:return!!n.startsWith("__internal_")&&(this.applyInternalAttribute(e,t,n.substring("__internal_".length),r),!0)}},e.prototype.applyInternalAttribute=function(e,t,n,r){var o=r?e.frameReader.attributeValue(r):null;if(n.startsWith("stopPropagation_")){var a=h(n.substring("stopPropagation_".length));this.eventDelegator.setStopPropagation(t,a,null!==o)}else{if(!n.startsWith("preventDefault_"))throw new Error("Unsupported internal attribute '"+n+"'");a=h(n.substring("preventDefault_".length));this.eventDelegator.setPreventDefault(t,a,null!==o)}},e.prototype.tryApplyValueProperty=function(e,t,n){var r=e.frameReader;if("INPUT"===t.tagName&&"time"===t.getAttribute("type")&&!t.getAttribute("step")){var o=n?r.attributeValue(n):null;if(o)return t.value=o.substring(0,5),!0}switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":var a=n?r.attributeValue(n):null;return t.value=a,"SELECT"===t.tagName&&(t._blazorSelectValue=a),!0;case"OPTION":(a=n?r.attributeValue(n):null)?t.setAttribute("value",a):t.removeAttribute("value");var i=this.findClosestAncestorSelectElement(t);return i&&"_blazorSelectValue"in i&&i._blazorSelectValue===a&&(this.tryApplyValueProperty(e,i,n),delete i._blazorSelectValue),!0;default:return!1}},e.prototype.tryApplyCheckedProperty=function(e,t,n){if("INPUT"===t.tagName){var r=n?e.frameReader.attributeValue(n):null;return t.checked=null!==r,!0}return!1},e.prototype.findClosestAncestorSelectElement=function(e){for(;e;){if(e instanceof HTMLSelectElement)return e;e=e.parentElement}return null},e.prototype.insertFrameRange=function(e,t,n,r,o,a,i){for(var l=r,u=a;u<i;u++){var s=e.referenceFramesEntry(o,u);r+=this.insertFrame(e,t,n,r,o,s,u),u+=m(e,s)}return r-l},e}();function m(e,t){var n=e.frameReader;switch(n.frameType(t)){case r.FrameType.component:case r.FrameType.element:case r.FrameType.region:return n.subtreeLength(t)-1;default:return 0}}function h(e){if(e.startsWith("on"))return e.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '"+e+"'")}t.BrowserRenderer=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t.EditType||(t.EditType={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup"}(t.FrameType||(t.FrameType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(30),a=c(["abort","blur","change","error","focus","load","loadend","loadstart","mouseenter","mouseleave","progress","reset","scroll","submit","unload","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),i=c(["click","dblclick","mousedown","mousemove","mouseup"]),l=function(){function e(t){this.onEvent=t,this.afterClickCallbacks=[];var n=++e.nextEventDelegatorId;this.eventsCollectionKey="_blazorEvents_"+n,this.eventInfoStore=new u(this.onGlobalEvent.bind(this))}return e.prototype.setListener=function(e,t,n,r){var o=this.getEventHandlerInfosForElement(e,!0),a=o.getHandler(t);if(a)this.eventInfoStore.update(a.eventHandlerId,n);else{var i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(i),o.setHandler(t,i)}},e.prototype.removeListener=function(e){var t=this.eventInfoStore.remove(e);if(t){var n=t.element,r=this.getEventHandlerInfosForElement(n,!1);r&&r.removeHandler(t.eventName)}},e.prototype.notifyAfterClick=function(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")},e.prototype.setStopPropagation=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)},e.prototype.setPreventDefault=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)},e.prototype.onGlobalEvent=function(e){if(e.target instanceof Element){for(var t,n,l=e.target,u=null,s=a.hasOwnProperty(e.type),c=!1;l;){var d=this.getEventHandlerInfosForElement(l,!1);if(d){var f=d.getHandler(e.type);if(f&&(t=l,n=e.type,!((t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&i.hasOwnProperty(n)&&t.disabled))){u||(u=r.EventForDotNet.fromDOMEvent(e));var p=o.EventFieldInfo.fromEvent(f.renderingComponentId,e);this.onEvent(e,f.eventHandlerId,u,p)}d.stopPropagation(e.type)&&(c=!0),d.preventDefault(e.type)&&e.preventDefault()}l=s||c?null:l.parentElement}"click"===e.type&&this.afterClickCallbacks.forEach(function(t){return t(e)})}},e.prototype.getEventHandlerInfosForElement=function(e,t){return e.hasOwnProperty(this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new s:null},e.nextEventDelegatorId=0,e}();t.EventDelegator=l;var u=function(){function e(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={}}return e.prototype.add=function(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error("Event "+e.eventHandlerId+" is already tracked");this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)},e.prototype.addGlobalListener=function(e){if(this.countByEventName.hasOwnProperty(e))this.countByEventName[e]++;else{this.countByEventName[e]=1;var t=a.hasOwnProperty(e);document.addEventListener(e,this.globalListener,t)}},e.prototype.update=function(e,t){if(this.infosByEventHandlerId.hasOwnProperty(t))throw new Error("Event "+t+" is already tracked");var n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n},e.prototype.remove=function(e){var t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];var n=t.eventName;0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t},e}(),s=function(){function e(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}return e.prototype.getHandler=function(e){return this.handlers.hasOwnProperty(e)?this.handlers[e]:null},e.prototype.setHandler=function(e,t){this.handlers[e]=t},e.prototype.removeHandler=function(e){delete this.handlers[e]},e.prototype.preventDefault=function(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]},e.prototype.stopPropagation=function(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]},e}();function c(e){var t={};return e.forEach(function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.type=e,this.data=t}return e.fromDOMEvent=function(t){var n=t.target;switch(t.type){case"input":case"change":if(function(e){return-1!==i.indexOf(e.getAttribute("type"))}(n)){var o=function(e){var t=e.value,n=e.type;switch(n){case"date":case"datetime-local":case"month":return t;case"time":return 5===t.length?t+":00":t;case"week":return t}throw new Error("Invalid element type '"+n+"'.")}(n);return new e("change",{type:t.type,value:o})}var l=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(n)?!!n.checked:n.value;return new e("change",{type:t.type,value:l});case"copy":case"cut":case"paste":return new e("clipboard",{type:t.type});case"drag":case"dragend":case"dragenter":case"dragleave":case"dragover":case"dragstart":case"drop":return new e("drag",function(e){return r({},a(e),{dataTransfer:e.dataTransfer})}(t));case"focus":case"blur":case"focusin":case"focusout":return new e("focus",{type:t.type});case"keydown":case"keyup":case"keypress":return new e("keyboard",function(e){return{type:e.type,key:e.key,code:e.code,location:e.location,repeat:e.repeat,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"contextmenu":case"click":case"mouseover":case"mouseout":case"mousemove":case"mousedown":case"mouseup":case"dblclick":return new e("mouse",a(t));case"error":return new e("error",function(e){return{type:e.type,message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno}}(t));case"loadstart":case"timeout":case"abort":case"load":case"loadend":case"progress":return new e("progress",function(e){return{type:e.type,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}}(t));case"touchcancel":case"touchend":case"touchmove":case"touchenter":case"touchleave":case"touchstart":return new e("touch",function(e){function t(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push({identifier:r.identifier,clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY})}return t}return{type:e.type,detail:e.detail,touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointerenter":case"pointerleave":case"pointermove":case"pointerout":case"pointerover":case"pointerup":return new e("pointer",function(e){return r({},a(e),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}(t));case"wheel":case"mousewheel":return new e("wheel",function(e){return r({},a(e),{deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ,deltaMode:e.deltaMode})}(t));default:return new e("unknown",{type:t.type})}},e}();function a(e){return{type:e.type,detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}t.EventForDotNet=o;var i=["date","datetime-local","month","time","week"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.componentId=e,this.fieldValue=t}return e.fromEvent=function(t,n){var r=n.target;if(r instanceof Element){var o=function(e){if(e instanceof HTMLInputElement)return e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value};if(e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return{value:e.value};return null}(r);if(o)return new e(t,o.value)}return null},e}();t.EventFieldInfo=r},function(e,t,n){"use strict";function r(e){return"_bl_"+e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCaptureIdToElement=function(e,t){e.setAttribute(r(t),"")};DotNet.attachReviver(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__internalId")&&"string"==typeof t.__internalId?(n=t.__internalId,o="["+r(n)+"]",document.querySelector(o)):t;var n,o})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=!1;t.showErrorNotification=function(){return r(this,void 0,void 0,function(){var e;return o(this,function(t){return(e=document.querySelector("#blazor-error-ui"))&&(e.style.display="block"),a||(a=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(e){e.onclick=function(e){location.reload(),e.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(e){e.onclick=function(e){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})),[2]})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},,function(e,t,n){"use strict";function r(e){var t=e.substring(e.lastIndexOf("/")+1),n=t.indexOf("?");return n<0?t:t.substring(0,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getFileNameFromUrl=r,t.getAssemblyNameFromUrl=function(e){return r(e).replace(/\.dll$/,"")}},,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17),n(24);var a=n(18),i=n(46),l=n(5),u=n(48),s=n(33),c=n(19),d=!1;function f(e){return r(this,void 0,void 0,function(){var e,t,n,s,f=this;return o(this,function(m){switch(m.label){case 0:if(d)throw new Error("Blazor has already started.");return d=!0,c.setEventDispatcher(function(e,t){return DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","DispatchEvent",e,JSON.stringify(t))}),e=a.setPlatform(i.monoPlatform),window.Blazor.platform=e,window.Blazor._internal.renderBatch=function(e,t){l.renderBatch(e,new u.SharedMemoryRenderBatch(t))},window.Blazor._internal.navigationManager.listenForNavigationEvents(function(e,t){return r(f,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","NotifyLocationChanged",e,t)];case 1:return n.sent(),[2]}})})}),[4,p()];case 1:(t=m.sent()).linkerEnabled||console.info("Blazor is running in dev mode without IL stripping. To make the bundle size significantly smaller, publish the application or see https://go.microsoft.com/fwlink/?linkid=870414"),n=t.assemblies.map(function(e){return"_framework/_bin/"+e}),m.label=2;case 2:return m.trys.push([2,4,,5]),[4,e.start(n)];case 3:return m.sent(),[3,5];case 4:throw s=m.sent(),new Error("Failed to start platform. Reason: "+s);case 5:return e.callEntryPoint(t.entryAssembly),[2]}})})}function p(){return r(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,fetch("_framework/blazor.boot.json",{method:"Get",credentials:"include"})];case 1:return[2,e.sent().json()]}})})}window.Blazor.start=f,s.shouldAutoStart()&&f()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,a,i,l,u,s,c,d=n(35),f=n(47),p=n(32),m={},h={},v={},y="appBinDir",g=Math.pow(2,32),b=Math.pow(2,21)-1;function w(e,t,n){var a="["+e+"]"+t+"."+n,i=h[a];if(!i){if(!(i=o(function(e){var t=m[e];if(!t){if(!(t=r(e)))throw new Error('Could not find assembly "'+e+'"');m[e]=t}return t}(e),t,n)))throw new Error('Could not find type "'+n+'" in namespace "'+t+'" in assembly "'+e+'"');h[a]=i}return i}function E(e,t,n,r){var o="["+e+"]"+t+"."+n+"::"+r,i=v[o];if(!i){if(!(i=a(w(e,t,n),r,-1)))throw new Error('Could not find method "'+r+'" on type "'+t+"."+n+'"');v[o]=i}return i}t.monoPlatform={start:function(e){return new Promise(function(n,m){var h,v;f.attachDebuggerHotkey(e),window.Browser={init:function(){}},h=function(){window.Module=function(e,n,m){var h={},v=["DEBUGGING ENABLED"];return h.print=function(e){return v.indexOf(e)<0&&console.log("WASM: "+e)},h.printErr=function(e){console.error("WASM: "+e),p.showErrorNotification()},h.preRun=[],h.postRun=[],h.preloadPlugins=[],h.locateFile=function(e){switch(e){case"mono.wasm":return"_framework/wasm/mono.wasm";default:return e}},h.preRun.push(function(){var t=Module.cwrap("mono_wasm_add_assembly",null,["string","number","number"]);r=Module.cwrap("mono_wasm_assembly_load","number",["string"]),o=Module.cwrap("mono_wasm_assembly_find_class","number",["number","string","string"]),a=Module.cwrap("mono_wasm_assembly_find_method","number",["number","string","number"]),i=Module.cwrap("mono_wasm_invoke_method","number",["number","number","number"]),l=Module.mono_call_assembly_entry_point,s=Module.cwrap("mono_wasm_string_get_utf8","number",["number"]),c=Module.cwrap("mono_wasm_string_from_js","number",["string"]),u=Module.cwrap("mono_wasm_obj_array_new","number",["number"]),MONO.loaded_files=[],e.forEach(function(e){var n=d.getFileNameFromUrl(e),r="blazor:"+n;addRunDependency(r),function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response){var e=new Uint8Array(r.response);t(e)}else n(r)},r.onerror=n,r.send(void 0)})}(e).then(function(o){var a,i=Module._malloc(o.length);new Uint8Array(Module.HEAPU8.buffer,i,o.length).set(o),t(n,i,o.length),MONO.loaded_files.push((a=e,_.href=a,_.href)),removeRunDependency(r)},function(e){e instanceof XMLHttpRequest&&404===e.status&&n.match(/\.pdb$/)||m(e),removeRunDependency(r)})})}),h.postRun.push(function(){var e,r,o;MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE","true"),Module.cwrap("mono_wasm_load_runtime",null,["string","number"])(y,f.hasDebuggingEnabled()?1:0),MONO.mono_wasm_runtime_is_ready=!0,e=E("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop","MonoWebAssemblyJSRuntime","InvokeDotNet"),r=E("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop","MonoWebAssemblyJSRuntime","BeginInvokeDotNet"),o=E("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop","MonoWebAssemblyJSRuntime","EndInvokeJS"),DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(e,n,o,a,i){if(!a&&!n)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");var l=a?a.toString():n;t.monoPlatform.callMethod(r,null,[e?t.monoPlatform.toDotNetString(e.toString()):null,t.monoPlatform.toDotNetString(l),t.monoPlatform.toDotNetString(o),t.monoPlatform.toDotNetString(i)])},endInvokeJSFromDotNet:function(e,n,r){t.monoPlatform.callMethod(o,null,[t.monoPlatform.toDotNetString(r)])},invokeDotNetFromJS:function(n,r,o,a){var i=t.monoPlatform.callMethod(e,null,[n?t.monoPlatform.toDotNetString(n):null,t.monoPlatform.toDotNetString(r),o?t.monoPlatform.toDotNetString(o.toString()):null,t.monoPlatform.toDotNetString(a)]);return i?t.monoPlatform.toJavaScriptString(i):null}}),n()}),h}(e,n,m),function(){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");var e=document.createElement("script");e.src="_framework/wasm/mono.js",e.defer=!0,document.body.appendChild(e)}()},v=document.createElement("script"),window.__wasmmodulecallback__=h,v.type="text/javascript",v.text="var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;",document.body.appendChild(v)})},findMethod:E,callEntryPoint:function(e){var t=u(0);return l(e,[t])},callMethod:function(e,n,r){if(r.length>4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u<r.length;++u)Module.setValue(a+4*u,r[u],"i32");Module.setValue(l,0,"i32");var s=i(e,n,a,l);if(0!==Module.getValue(l,"i32"))throw new Error(t.monoPlatform.toJavaScriptString(s));return s}finally{Module.stackRestore(o)}},toJavaScriptString:function(e){var t=s(e),n=Module.UTF8ToString(t);return Module._free(t),n},toDotNetString:function(e){return c(e)},toUint8Array:function(e){var t=I(e),n=Module.getValue(t,"i32");return new Uint8Array(Module.HEAPU8.buffer,t+4,n)},getArrayLength:function(e){return Module.getValue(I(e),"i32")},getArrayEntryPtr:function(e,t,n){return I(e)+4+t*n},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return Module.getValue(e+(t||0),"i16")},readInt32Field:function(e,t){return Module.getValue(e+(t||0),"i32")},readUint64Field:function(e,t){var n=e+(t||0)>>2,r=Module.HEAPU32[n+1];if(r>b)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*g+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var _=document.createElement("a");function I(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),l=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f<l;f++){var p=t.updatedComponentsEntry(u,f),m=d.componentId(p),h=d.edits(p);n.updateComponent(t,m,h,c)}var v=t.disposedComponentIds(),y=r.values(v),g=r.count(v);for(f=0;f<g;f++)m=t.disposedComponentIdsEntry(y,f),n.disposeComponent(m);var b=t.disposedEventHandlerIds(),w=r.values(b),E=r.count(b);for(f=0;f<E;f++){var _=t.disposedEventHandlerIdsEntry(w,f);n.disposeEventHandler(_)}i&&(i=!1,window.scrollTo&&window.scrollTo(0,0))},t.resetScrollAfterNextBatch=function(){i=!0}},,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function u(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17);var a,i=n(5),u=!1,l=!1,s=null;function c(e,t){var n=p(e);if(!t&&m(n))d(n,!1);else if(t&&location.href===e){var r=e+"?";history.replaceState(null,"",r),location.replace(e)}else location.href=e}function d(e,t){i.resetScrollAfterNextBatch(),history.pushState(null,"",e),f(t)}function f(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return s?[4,s(location.href,e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function p(e){return(a=a||document.createElement("a")).href=e,a.href}function m(e){var t,n=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1);return e.startsWith(n)}t.internalFunctions={listenForNavigationEvents:function(e){if(s=e,l)return;l=!0,window.addEventListener("popstate",function(){return f(!1)})},enableNavigationInterception:function(){u=!0},navigateTo:c,getBaseURI:function(){return document.baseURI},getLocationHref:function(){return location.href}},t.attachToEventDelegator=function(e){e.notifyAfterClick(function(e){if(u&&0===e.button&&!function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&!e.defaultPrevented){var t=function e(t,n){return t?t.tagName===n?t:e(t.parentElement,n):null}(e.target,"A");if(t&&t.hasAttribute("href")){var n=t.getAttribute("target");if(n&&"_self"!==n)return;var r=p(t.getAttribute("href"));m(r)&&(e.preventDefault(),d(r,!0))}}})},t.navigateTo=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),a=p("_blazorLogicalEnd");function i(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function u(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(l(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n<i.length){var u=i[n];u.parentNode.insertBefore(e,u),i.splice(n,0,a)}else f(e,t),i.push(a);a[o]=t,r in a||(a[r]=[])}function l(e){return e[o]||null}function s(e){return e[r]}function c(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function d(e){var t=s(l(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function f(e,t){if(t instanceof Element)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: "+t);var n=d(t);n?n.parentNode.insertBefore(e,n):f(e,l(t))}}function p(e){return"function"==typeof Symbol?Symbol():e}t.toLogicalRootCommentElement=function(e,t){if(!e.parentNode)throw new Error("Comment not connected to the DOM "+e.textContent);var n=e.parentNode,r=i(n,!0),u=s(r);return Array.from(n.childNodes).forEach(function(e){return u.push(e)}),e[o]=r,t&&(e[a]=t,i(t,!0)),i(e,!0)},t.toLogicalElement=i,t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return u(n,e,t),n},t.insertLogicalChild=u,t.removeLogicalChild=function e(t,n){var r=s(t).splice(n,1)[0];if(r instanceof Comment)for(var o=s(r);o.length>0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=l,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=l(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function l(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var l=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,l)}catch(e){c(i,!1,e)}return u}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return u(e,t,null,n)},e.invokeMethodAsync=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return l(e,t,null,n)},e.jsCallDispatcher={findJSFunction:p,invokeJSFromDotNet:function(e,t){var n=p(e).apply(null,d(t));return null==n?null:JSON.stringify(n,h)},beginInvokeJSFromDotNet:function(e,t,n){var r=new Promise(function(e){e(p(t).apply(null,d(n)))});e&&r.then(function(t){return s().endInvokeJSFromDotNet(e,!0,JSON.stringify([e,!0,t],h))},function(t){return s().endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,f(t)]))})},endInvokeDotNetFromJS:function(e,t,n){var r=t?n:new Error(n);c(parseInt(e),t,r)}};var m=function(){function e(e){this._id=e}return e.prototype.invokeMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u(null,e,this._id,t)},e.prototype.invokeMethodAsync=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return l(null,e,this._id,t)},e.prototype.dispose=function(){l(null,"__Dispose",this._id,null).catch(function(e){return console.error(e)})},e.prototype.serializeAsArg=function(){return{__dotNetObject:this._id}},e}();function h(e,t){return t instanceof m?t.serializeAsArg():t}i(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__dotNetObject")?new m(t.__dotNetObject):t})}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPlatform=function(e){return t.platform=e,t.platform}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=function(e,t){if(!r)throw new Error("eventDispatcher not initialized. Call 'setEventDispatcher' to configure it.");return r(e,t)},t.setEventDispatcher=function(e){r=e}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(5);window.Blazor={navigateTo:r.navigateTo,_internal:{attachRootComponentToElement:o.attachRootComponentToElement,navigationManager:r.internalFunctions}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),o=n(28),a=n(13),i=n(31),u=n(19),l=n(12),s=document.createElement("template"),c=document.createElementNS("http://www.w3.org/2000/svg","g"),d={submit:!0},f={},p=function(){function e(e){var t=this;this.childComponentLocations={},this.browserRendererId=e,this.eventDelegator=new o.EventDelegator(function(e,n,r,o){!function(e,t,n,r,o){d[e.type]&&e.preventDefault();var a={browserRendererId:t,eventHandlerId:n,eventArgsType:r.type,eventFieldInfo:o};u.dispatchEvent(a,r.data)}(e,t.browserRendererId,n,r,o)}),l.attachToEventDelegator(this.eventDelegator)}return e.prototype.attachRootComponentToLogicalElement=function(e,t){this.attachComponentToElement(e,t),f[e]=t},e.prototype.updateComponent=function(e,t,n,r){var o=this.childComponentLocations[t];if(!o)throw new Error("No element is currently associated with component "+t);var i=f[t];if(i){var u=a.getLogicalSiblingEnd(i);delete f[t],u?function(e,t){var n=a.getLogicalParent(e);if(!n)throw new Error("Can't clear between nodes. The start node does not have a logical parent.");for(var r=a.getLogicalChildrenArray(n),o=r.indexOf(e)+1,i=r.indexOf(t),u=o;u<=i;u++)a.removeLogicalChild(n,o);e.textContent="!"}(i,u):function(e){var t;for(;t=e.firstChild;)e.removeChild(t)}(i)}var l=a.getClosestDomElement(o).ownerDocument,s=l&&l.activeElement;this.applyEdits(e,t,o,0,n,r),s instanceof HTMLElement&&l&&l.activeElement!==s&&s.focus()},e.prototype.disposeComponent=function(e){delete this.childComponentLocations[e]},e.prototype.disposeEventHandler=function(e){this.eventDelegator.removeListener(e)},e.prototype.attachComponentToElement=function(e,t){this.childComponentLocations[e]=t},e.prototype.applyEdits=function(e,t,n,o,i,u){for(var l,s=0,c=o,d=e.arrayBuilderSegmentReader,f=e.editReader,p=e.frameReader,m=d.values(i),h=d.offset(i),v=h+d.count(i),y=h;y<v;y++){var g=e.diffReader.editsEntry(m,y),b=f.editType(g);switch(b){case r.EditType.prependFrame:var w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);this.insertFrame(e,t,n,c+_,u,E,w);break;case r.EditType.removeFrame:_=f.siblingIndex(g);a.removeLogicalChild(n,c+_);break;case r.EditType.setAttribute:w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof Element))throw new Error("Cannot set attribute on non-element child");this.applyAttribute(e,t,I,E);break;case r.EditType.removeAttribute:var I;_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof HTMLElement))throw new Error("Cannot remove attribute from non-element child");var C=f.removedAttributeName(g);this.tryApplySpecialProperty(e,I,C,null)||I.removeAttribute(C);break;case r.EditType.updateText:w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);var S=a.getLogicalChild(n,c+_);if(!(S instanceof Text))throw new Error("Cannot set text content on non-text child");S.textContent=p.textContent(E);break;case r.EditType.updateMarkup:w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);a.removeLogicalChild(n,c+_),this.insertMarkup(e,n,c+_,E);break;case r.EditType.stepIn:_=f.siblingIndex(g);n=a.getLogicalChild(n,c+_),s++,c=0;break;case r.EditType.stepOut:n=a.getLogicalParent(n),c=0===--s?o:0;break;case r.EditType.permutationListEntry:(l=l||[]).push({fromSiblingIndex:c+f.siblingIndex(g),toSiblingIndex:c+f.moveToSiblingIndex(g)});break;case r.EditType.permutationListEnd:a.permuteLogicalChildren(n,l),l=void 0;break;default:throw new Error("Unknown edit type: "+b)}}},e.prototype.insertFrame=function(e,t,n,o,a,u,l){var s=e.frameReader,c=s.frameType(u);switch(c){case r.FrameType.element:return this.insertElement(e,t,n,o,a,u,l),1;case r.FrameType.text:return this.insertText(e,n,o,u),1;case r.FrameType.attribute:throw new Error("Attribute frames should only be present as leading children of element frames.");case r.FrameType.component:return this.insertComponent(e,n,o,u),1;case r.FrameType.region:return this.insertFrameRange(e,t,n,o,a,l+1,l+s.subtreeLength(u));case r.FrameType.elementReferenceCapture:if(n instanceof Element)return i.applyCaptureIdToElement(n,s.elementReferenceCaptureId(u)),0;throw new Error("Reference capture frames can only be children of element frames.");case r.FrameType.markup:return this.insertMarkup(e,n,o,u),1;default:throw new Error("Unknown frame type: "+c)}},e.prototype.insertElement=function(e,t,n,o,i,u,l){var s=e.frameReader,c=s.elementName(u),d="svg"===c||a.isSvgElement(n)?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c),f=a.toLogicalElement(d);a.insertLogicalChild(d,n,o);for(var p=l+s.subtreeLength(u),m=l+1;m<p;m++){var h=e.referenceFramesEntry(i,m);if(s.frameType(h)!==r.FrameType.attribute){this.insertFrameRange(e,t,f,0,i,m,p);break}this.applyAttribute(e,t,d,h)}if(d instanceof HTMLSelectElement&&"_blazorSelectValue"in d){var v=d._blazorSelectValue;d.value=v,delete d._blazorSelectValue}},e.prototype.insertComponent=function(e,t,n,r){var o=a.createAndInsertLogicalContainer(t,n),i=e.frameReader.componentId(r);this.attachComponentToElement(i,o)},e.prototype.insertText=function(e,t,n,r){var o=e.frameReader.textContent(r),i=document.createTextNode(o);a.insertLogicalChild(i,t,n)},e.prototype.insertMarkup=function(e,t,n,r){for(var o,i=a.createAndInsertLogicalContainer(t,n),u=e.frameReader.markupContent(r),l=(o=u,a.isSvgElement(t)?(c.innerHTML=o||" ",c):(s.innerHTML=o||" ",s.content)),d=0;l.firstChild;)a.insertLogicalChild(l.firstChild,i,d++)},e.prototype.applyAttribute=function(e,t,n,r){var o=e.frameReader,a=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){var u=h(a);this.eventDelegator.setListener(n,u,i,t)}else this.tryApplySpecialProperty(e,n,a,r)||n.setAttribute(a,o.attributeValue(r))},e.prototype.tryApplySpecialProperty=function(e,t,n,r){switch(n){case"value":return this.tryApplyValueProperty(e,t,r);case"checked":return this.tryApplyCheckedProperty(e,t,r);default:return!!n.startsWith("__internal_")&&(this.applyInternalAttribute(e,t,n.substring("__internal_".length),r),!0)}},e.prototype.applyInternalAttribute=function(e,t,n,r){var o=r?e.frameReader.attributeValue(r):null;if(n.startsWith("stopPropagation_")){var a=h(n.substring("stopPropagation_".length));this.eventDelegator.setStopPropagation(t,a,null!==o)}else{if(!n.startsWith("preventDefault_"))throw new Error("Unsupported internal attribute '"+n+"'");a=h(n.substring("preventDefault_".length));this.eventDelegator.setPreventDefault(t,a,null!==o)}},e.prototype.tryApplyValueProperty=function(e,t,n){var r=e.frameReader;if("INPUT"===t.tagName&&"time"===t.getAttribute("type")&&!t.getAttribute("step")){var o=n?r.attributeValue(n):null;if(o)return t.value=o.substring(0,5),!0}switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":var a=n?r.attributeValue(n):null;return t.value=a,"SELECT"===t.tagName&&(t._blazorSelectValue=a),!0;case"OPTION":(a=n?r.attributeValue(n):null)?t.setAttribute("value",a):t.removeAttribute("value");var i=this.findClosestAncestorSelectElement(t);return i&&"_blazorSelectValue"in i&&i._blazorSelectValue===a&&(this.tryApplyValueProperty(e,i,n),delete i._blazorSelectValue),!0;default:return!1}},e.prototype.tryApplyCheckedProperty=function(e,t,n){if("INPUT"===t.tagName){var r=n?e.frameReader.attributeValue(n):null;return t.checked=null!==r,!0}return!1},e.prototype.findClosestAncestorSelectElement=function(e){for(;e;){if(e instanceof HTMLSelectElement)return e;e=e.parentElement}return null},e.prototype.insertFrameRange=function(e,t,n,r,o,a,i){for(var u=r,l=a;l<i;l++){var s=e.referenceFramesEntry(o,l);r+=this.insertFrame(e,t,n,r,o,s,l),l+=m(e,s)}return r-u},e}();function m(e,t){var n=e.frameReader;switch(n.frameType(t)){case r.FrameType.component:case r.FrameType.element:case r.FrameType.region:return n.subtreeLength(t)-1;default:return 0}}function h(e){if(e.startsWith("on"))return e.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '"+e+"'")}t.BrowserRenderer=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t.EditType||(t.EditType={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup"}(t.FrameType||(t.FrameType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(30),a=c(["abort","blur","change","error","focus","load","loadend","loadstart","mouseenter","mouseleave","progress","reset","scroll","submit","unload","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),i=c(["click","dblclick","mousedown","mousemove","mouseup"]),u=function(){function e(t){this.onEvent=t,this.afterClickCallbacks=[];var n=++e.nextEventDelegatorId;this.eventsCollectionKey="_blazorEvents_"+n,this.eventInfoStore=new l(this.onGlobalEvent.bind(this))}return e.prototype.setListener=function(e,t,n,r){var o=this.getEventHandlerInfosForElement(e,!0),a=o.getHandler(t);if(a)this.eventInfoStore.update(a.eventHandlerId,n);else{var i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(i),o.setHandler(t,i)}},e.prototype.removeListener=function(e){var t=this.eventInfoStore.remove(e);if(t){var n=t.element,r=this.getEventHandlerInfosForElement(n,!1);r&&r.removeHandler(t.eventName)}},e.prototype.notifyAfterClick=function(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")},e.prototype.setStopPropagation=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)},e.prototype.setPreventDefault=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)},e.prototype.onGlobalEvent=function(e){if(e.target instanceof Element){for(var t,n,u=e.target,l=null,s=a.hasOwnProperty(e.type),c=!1;u;){var d=this.getEventHandlerInfosForElement(u,!1);if(d){var f=d.getHandler(e.type);if(f&&(t=u,n=e.type,!((t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&i.hasOwnProperty(n)&&t.disabled))){l||(l=r.EventForDotNet.fromDOMEvent(e));var p=o.EventFieldInfo.fromEvent(f.renderingComponentId,e);this.onEvent(e,f.eventHandlerId,l,p)}d.stopPropagation(e.type)&&(c=!0),d.preventDefault(e.type)&&e.preventDefault()}u=s||c?null:u.parentElement}"click"===e.type&&this.afterClickCallbacks.forEach(function(t){return t(e)})}},e.prototype.getEventHandlerInfosForElement=function(e,t){return e.hasOwnProperty(this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new s:null},e.nextEventDelegatorId=0,e}();t.EventDelegator=u;var l=function(){function e(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={}}return e.prototype.add=function(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error("Event "+e.eventHandlerId+" is already tracked");this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)},e.prototype.addGlobalListener=function(e){if(this.countByEventName.hasOwnProperty(e))this.countByEventName[e]++;else{this.countByEventName[e]=1;var t=a.hasOwnProperty(e);document.addEventListener(e,this.globalListener,t)}},e.prototype.update=function(e,t){if(this.infosByEventHandlerId.hasOwnProperty(t))throw new Error("Event "+t+" is already tracked");var n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n},e.prototype.remove=function(e){var t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];var n=t.eventName;0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t},e}(),s=function(){function e(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}return e.prototype.getHandler=function(e){return this.handlers.hasOwnProperty(e)?this.handlers[e]:null},e.prototype.setHandler=function(e,t){this.handlers[e]=t},e.prototype.removeHandler=function(e){delete this.handlers[e]},e.prototype.preventDefault=function(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]},e.prototype.stopPropagation=function(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]},e}();function c(e){var t={};return e.forEach(function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.type=e,this.data=t}return e.fromDOMEvent=function(t){var n=t.target;switch(t.type){case"input":case"change":if(function(e){return-1!==i.indexOf(e.getAttribute("type"))}(n)){var o=function(e){var t=e.value,n=e.type;switch(n){case"date":case"datetime-local":case"month":return t;case"time":return 5===t.length?t+":00":t;case"week":return t}throw new Error("Invalid element type '"+n+"'.")}(n);return new e("change",{type:t.type,value:o})}var u=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(n)?!!n.checked:n.value;return new e("change",{type:t.type,value:u});case"copy":case"cut":case"paste":return new e("clipboard",{type:t.type});case"drag":case"dragend":case"dragenter":case"dragleave":case"dragover":case"dragstart":case"drop":return new e("drag",function(e){return r({},a(e),{dataTransfer:e.dataTransfer})}(t));case"focus":case"blur":case"focusin":case"focusout":return new e("focus",{type:t.type});case"keydown":case"keyup":case"keypress":return new e("keyboard",function(e){return{type:e.type,key:e.key,code:e.code,location:e.location,repeat:e.repeat,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"contextmenu":case"click":case"mouseover":case"mouseout":case"mousemove":case"mousedown":case"mouseup":case"dblclick":return new e("mouse",a(t));case"error":return new e("error",function(e){return{type:e.type,message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno}}(t));case"loadstart":case"timeout":case"abort":case"load":case"loadend":case"progress":return new e("progress",function(e){return{type:e.type,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}}(t));case"touchcancel":case"touchend":case"touchmove":case"touchenter":case"touchleave":case"touchstart":return new e("touch",function(e){function t(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push({identifier:r.identifier,clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY})}return t}return{type:e.type,detail:e.detail,touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointerenter":case"pointerleave":case"pointermove":case"pointerout":case"pointerover":case"pointerup":return new e("pointer",function(e){return r({},a(e),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}(t));case"wheel":case"mousewheel":return new e("wheel",function(e){return r({},a(e),{deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ,deltaMode:e.deltaMode})}(t));default:return new e("unknown",{type:t.type})}},e}();function a(e){return{type:e.type,detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}t.EventForDotNet=o;var i=["date","datetime-local","month","time","week"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.componentId=e,this.fieldValue=t}return e.fromEvent=function(t,n){var r=n.target;if(r instanceof Element){var o=function(e){if(e instanceof HTMLInputElement)return e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value};if(e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return{value:e.value};return null}(r);if(o)return new e(t,o.value)}return null},e}();t.EventFieldInfo=r},function(e,t,n){"use strict";function r(e){return"_bl_"+e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCaptureIdToElement=function(e,t){e.setAttribute(r(t),"")};DotNet.attachReviver(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__internalId")&&"string"==typeof t.__internalId?(n=t.__internalId,o="["+r(n)+"]",document.querySelector(o)):t;var n,o})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function u(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=!1;t.showErrorNotification=function(){return r(this,void 0,void 0,function(){var e;return o(this,function(t){return(e=document.querySelector("#blazor-error-ui"))&&(e.style.display="block"),a||(a=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(e){e.onclick=function(e){location.reload(),e.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(e){e.onclick=function(e){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})),[2]})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},,function(e,t,n){"use strict";function r(e){var t=e.substring(e.lastIndexOf("/")+1),n=t.indexOf("?");return n<0?t:t.substring(0,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getFileNameFromUrl=r,t.getAssemblyNameFromUrl=function(e){return r(e).replace(/\.dll$/,"")}},,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function u(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17),n(24);var a=n(18),i=n(46),u=n(5),l=n(48),s=n(33),c=n(19),d=!1;function f(e){return r(this,void 0,void 0,function(){var e,t,n,s,f=this;return o(this,function(m){switch(m.label){case 0:if(d)throw new Error("Blazor has already started.");return d=!0,c.setEventDispatcher(function(e,t){return DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","DispatchEvent",e,JSON.stringify(t))}),e=a.setPlatform(i.monoPlatform),window.Blazor.platform=e,window.Blazor._internal.renderBatch=function(e,t){u.renderBatch(e,new l.SharedMemoryRenderBatch(t))},window.Blazor._internal.navigationManager.listenForNavigationEvents(function(e,t){return r(f,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","NotifyLocationChanged",e,t)];case 1:return n.sent(),[2]}})})}),[4,p()];case 1:(t=m.sent()).linkerEnabled||console.info("Blazor is running in dev mode without IL stripping. To make the bundle size significantly smaller, publish the application or see https://go.microsoft.com/fwlink/?linkid=870414"),n=t.assemblies.map(function(e){return"_framework/_bin/"+e}),m.label=2;case 2:return m.trys.push([2,4,,5]),[4,e.start(n)];case 3:return m.sent(),[3,5];case 4:throw s=m.sent(),new Error("Failed to start platform. Reason: "+s);case 5:return e.callEntryPoint(t.entryAssembly),[2]}})})}function p(){return r(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,fetch("_framework/blazor.boot.json",{method:"Get",credentials:"include"})];case 1:return[2,e.sent().json()]}})})}window.Blazor.start=f,s.shouldAutoStart()&&f().catch(function(e){Module.printErr(e)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(35),a=n(47),i=n(32),u="appBinDir",l=Math.pow(2,32),s=Math.pow(2,21)-1;t.monoPlatform={start:function(e){return new Promise(function(t,n){var l,s;a.attachDebuggerHotkey(e),window.Browser={init:function(){}},l=function(){window.Module=function(e,t,n){var l={},s=["DEBUGGING ENABLED"];return l.print=function(e){return s.indexOf(e)<0&&console.log("WASM: "+e)},l.printErr=function(e){console.error("WASM: "+e),i.showErrorNotification()},l.preRun=[],l.postRun=[],l.preloadPlugins=[],l.locateFile=function(e){switch(e){case"mono.wasm":return"_framework/wasm/mono.wasm";default:return e}},l.preRun.push(function(){var t=Module.cwrap("mono_wasm_add_assembly",null,["string","number","number"]);r=Module.cwrap("mono_wasm_string_get_utf8","number",["number"]),MONO.loaded_files=[],e.forEach(function(e){var r=o.getFileNameFromUrl(e),a="blazor:"+r;addRunDependency(a),function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response){var e=new Uint8Array(r.response);t(e)}else n(r)},r.onerror=n,r.send(void 0)})}(e).then(function(n){var o,i=Module._malloc(n.length);new Uint8Array(Module.HEAPU8.buffer,i,n.length).set(n),t(r,i,n.length),MONO.loaded_files.push((o=e,c.href=o,c.href)),removeRunDependency(a)},function(e){e instanceof XMLHttpRequest&&404===e.status&&r.match(/\.pdb$/)||n(e),removeRunDependency(a)})})}),l.postRun.push(function(){var e,n,r;MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE","true"),Module.cwrap("mono_wasm_load_runtime",null,["string","number"])(u,a.hasDebuggingEnabled()?1:0),MONO.mono_wasm_runtime_is_ready=!0,e=f("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime","InvokeDotNet"),n=f("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime","BeginInvokeDotNet"),r=f("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime","EndInvokeJS"),DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(e,t,r,o,a){if(!o&&!t)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");var i=o?o.toString():t;n(e?e.toString():null,i,r,a)},endInvokeJSFromDotNet:function(e,t,n){r(n)},invokeDotNetFromJS:function(t,n,r,o){return e(t||null,n,r?r.toString():null,o)}}),t()}),l}(e,t,n),function(){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");var e=document.createElement("script");e.src="_framework/wasm/mono.js",e.defer=!0,document.body.appendChild(e)}()},s=document.createElement("script"),window.__wasmmodulecallback__=l,s.type="text/javascript",s.text="var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;",document.body.appendChild(s)})},callEntryPoint:function(e){f("Microsoft.AspNetCore.Blazor","Microsoft.AspNetCore.Blazor.Hosting.EntrypointInvoker","InvokeEntrypoint")(e,null)},toJavaScriptString:function(e){var t=r(e),n=Module.UTF8ToString(t);return Module._free(t),n},toUint8Array:function(e){var t=d(e),n=Module.getValue(t,"i32");return new Uint8Array(Module.HEAPU8.buffer,t+4,n)},getArrayLength:function(e){return Module.getValue(d(e),"i32")},getArrayEntryPtr:function(e,t,n){return d(e)+4+t*n},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return Module.getValue(e+(t||0),"i16")},readInt32Field:function(e,t){return Module.getValue(e+(t||0),"i32")},readUint64Field:function(e,t){var n=e+(t||0)>>2,r=Module.HEAPU32[n+1];if(r>s)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*l+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var c=document.createElement("a");function d(e){return e+12}function f(e,t,n){var r="["+e+"] "+t+":"+n;return Module.mono_bind_static_method(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=u,this.editReader=l,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,u.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},u={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,l.structLength)}},l={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index 527dcd5ab8..cf637d8444 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -1,19 +1,9 @@ -import { MethodHandle, System_Object, System_String, System_Array, Pointer, Platform } from '../Platform'; +import { System_Object, System_String, System_Array, Pointer, Platform } from '../Platform'; import { getFileNameFromUrl } from '../Url'; import { attachDebuggerHotkey, hasDebuggingEnabled } from './MonoDebugger'; import { showErrorNotification } from '../../BootErrors'; -const assemblyHandleCache: { [assemblyName: string]: number } = {}; -const typeHandleCache: { [fullyQualifiedTypeName: string]: number } = {}; -const methodHandleCache: { [fullyQualifiedMethodName: string]: MethodHandle } = {}; - -let assembly_load: (assemblyName: string) => number; -let find_class: (assemblyHandle: number, namespace: string, className: string) => number; -let find_method: (typeHandle: number, methodName: string, unknownArg: number) => MethodHandle; -let invoke_method: (method: MethodHandle, target: System_Object, argsArrayPtr: number, exceptionFlagIntPtr: number) => System_Object; -let mono_string_array_new: (length: number) => System_Array<System_String>; let mono_string_get_utf8: (managedString: System_String) => Mono.Utf8Ptr; -let mono_string: (jsString: string) => System_String; const appBinDirName = 'appBinDir'; const uint64HighOrderShift = Math.pow(2, 32); const maxSafeNumberHighPart = Math.pow(2, 21) - 1; // The high-order int32 from Number.MAX_SAFE_INTEGER @@ -38,8 +28,6 @@ export const monoPlatform: Platform = { }); }, - findMethod: findMethod, - callEntryPoint: function callEntryPoint(assemblyName: string) { // Instead of using Module.mono_call_assembly_entry_point, we have our own logic for invoking // the entrypoint which adds support for async main. @@ -47,40 +35,9 @@ export const monoPlatform: Platform = { // In the future, we might want Blazor.start to return a Promise<Promise<value>>, where the // outer promise reflects the startup process, and the inner one reflects the possibly-async // .NET entrypoint method. - const invokeEntrypoint = findMethod('Microsoft.AspNetCore.Blazor', 'Microsoft.AspNetCore.Blazor.Hosting', 'EntrypointInvoker', 'InvokeEntrypoint'); - this.callMethod(invokeEntrypoint, null, [ - this.toDotNetString(assemblyName), - mono_string_array_new(0) // In the future, we may have a way of supplying arg strings. For now, we always supply an empty string[]. - ]); - }, - - callMethod: function callMethod(method: MethodHandle, target: System_Object, args: System_Object[]): System_Object { - if (args.length > 4) { - // Hopefully this restriction can be eased soon, but for now make it clear what's going on - throw new Error(`Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass ${args.length}.`); - } - - const stack = Module.stackSave(); - - try { - const argsBuffer = Module.stackAlloc(args.length); - const exceptionFlagManagedInt = Module.stackAlloc(4); - for (let i = 0; i < args.length; ++i) { - Module.setValue(argsBuffer + i * 4, args[i], 'i32'); - } - Module.setValue(exceptionFlagManagedInt, 0, 'i32'); - - const res = invoke_method(method, target, argsBuffer, exceptionFlagManagedInt); - - if (Module.getValue(exceptionFlagManagedInt, 'i32') !== 0) { - // If the exception flag is set, the returned value is exception.ToString() - throw new Error(monoPlatform.toJavaScriptString(<System_String>res)); - } - - return res; - } finally { - Module.stackRestore(stack); - } + const invokeEntrypoint = bindStaticMethod('Microsoft.AspNetCore.Blazor', 'Microsoft.AspNetCore.Blazor.Hosting.EntrypointInvoker', 'InvokeEntrypoint'); + // Note we're passing in null because passing arrays is problematic until https://github.com/mono/mono/issues/18245 is resolved. + invokeEntrypoint(assemblyName, null); }, toJavaScriptString: function toJavaScriptString(managedString: System_String) { @@ -94,10 +51,6 @@ export const monoPlatform: Platform = { return res; }, - toDotNetString: function toDotNetString(jsString: string): System_String { - return mono_string(jsString); - }, - toUint8Array: function toUint8Array(array: System_Array<any>): Uint8Array { const dataPtr = getArrayDataPointer(array); const length = Module.getValue(dataPtr, 'i32'); @@ -158,44 +111,6 @@ export const monoPlatform: Platform = { }, }; -function findAssembly(assemblyName: string): number { - let assemblyHandle = assemblyHandleCache[assemblyName]; - if (!assemblyHandle) { - assemblyHandle = assembly_load(assemblyName); - if (!assemblyHandle) { - throw new Error(`Could not find assembly "${assemblyName}"`); - } - assemblyHandleCache[assemblyName] = assemblyHandle; - } - return assemblyHandle; -} - -function findType(assemblyName: string, namespace: string, className: string): number { - const fullyQualifiedTypeName = `[${assemblyName}]${namespace}.${className}`; - let typeHandle = typeHandleCache[fullyQualifiedTypeName]; - if (!typeHandle) { - typeHandle = find_class(findAssembly(assemblyName), namespace, className); - if (!typeHandle) { - throw new Error(`Could not find type "${className}" in namespace "${namespace}" in assembly "${assemblyName}"`); - } - typeHandleCache[fullyQualifiedTypeName] = typeHandle; - } - return typeHandle; -} - -function findMethod(assemblyName: string, namespace: string, className: string, methodName: string): MethodHandle { - const fullyQualifiedMethodName = `[${assemblyName}]${namespace}.${className}::${methodName}`; - let methodHandle = methodHandleCache[fullyQualifiedMethodName]; - if (!methodHandle) { - methodHandle = find_method(findType(assemblyName, namespace, className), methodName, -1); - if (!methodHandle) { - throw new Error(`Could not find method "${methodName}" on type "${namespace}.${className}"`); - } - methodHandleCache[fullyQualifiedMethodName] = methodHandle; - } - return methodHandle; -} - function addScriptTagsToDocument() { const browserSupportsNativeWebAssembly = typeof WebAssembly !== 'undefined' && WebAssembly.validate; if (!browserSupportsNativeWebAssembly) { @@ -254,26 +169,8 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () 'number', 'number', ]); - assembly_load = Module.cwrap('mono_wasm_assembly_load', 'number', ['string']); - find_class = Module.cwrap('mono_wasm_assembly_find_class', 'number', [ - 'number', - 'string', - 'string', - ]); - find_method = Module.cwrap('mono_wasm_assembly_find_method', 'number', [ - 'number', - 'string', - 'number', - ]); - invoke_method = Module.cwrap('mono_wasm_invoke_method', 'number', [ - 'number', - 'number', - 'number', - ]); mono_string_get_utf8 = Module.cwrap('mono_wasm_string_get_utf8', 'number', ['number']); - mono_string = Module.cwrap('mono_wasm_string_from_js', 'number', ['string']); - mono_string_array_new = Module.cwrap('mono_wasm_string_array_new', 'number', ['number']); MONO.loaded_files = []; @@ -346,10 +243,16 @@ function getArrayDataPointer<T>(array: System_Array<T>): number { return <number><any>array + 12; // First byte from here is length, then following bytes are entries } +function bindStaticMethod(assembly: string, typeName: string, method: string) : (...args: any[]) => any { + // Fully qualified name looks like this: "[debugger-test] Math:IntAdd" + const fqn = `[${assembly}] ${typeName}:${method}`; + return Module.mono_bind_static_method(fqn); +} + function attachInteropInvoker(): void { - const dotNetDispatcherInvokeMethodHandle = findMethod('Mono.WebAssembly.Interop', 'Mono.WebAssembly.Interop', 'MonoWebAssemblyJSRuntime', 'InvokeDotNet'); - const dotNetDispatcherBeginInvokeMethodHandle = findMethod('Mono.WebAssembly.Interop', 'Mono.WebAssembly.Interop', 'MonoWebAssemblyJSRuntime', 'BeginInvokeDotNet'); - const dotNetDispatcherEndInvokeJSMethodHandle = findMethod('Mono.WebAssembly.Interop', 'Mono.WebAssembly.Interop', 'MonoWebAssemblyJSRuntime', 'EndInvokeJS'); + const dotNetDispatcherInvokeMethodHandle = bindStaticMethod('Mono.WebAssembly.Interop', 'Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime', 'InvokeDotNet'); + const dotNetDispatcherBeginInvokeMethodHandle = bindStaticMethod('Mono.WebAssembly.Interop', 'Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime', 'BeginInvokeDotNet'); + const dotNetDispatcherEndInvokeJSMethodHandle = bindStaticMethod('Mono.WebAssembly.Interop', 'Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime', 'EndInvokeJS'); DotNet.attachDispatcher({ beginInvokeDotNetFromJS: (callId: number, assemblyName: string | null, methodIdentifier: string, dotNetObjectId: any | null, argsJson: string): void => { @@ -362,30 +265,25 @@ function attachInteropInvoker(): void { ? dotNetObjectId.toString() : assemblyName; - monoPlatform.callMethod(dotNetDispatcherBeginInvokeMethodHandle, null, [ - callId ? monoPlatform.toDotNetString(callId.toString()) : null, - monoPlatform.toDotNetString(assemblyNameOrDotNetObjectId), - monoPlatform.toDotNetString(methodIdentifier), - monoPlatform.toDotNetString(argsJson), - ]); + dotNetDispatcherBeginInvokeMethodHandle( + callId ? callId.toString() : null, + assemblyNameOrDotNetObjectId, + methodIdentifier, + argsJson, + ); }, endInvokeJSFromDotNet: (asyncHandle, succeeded, serializedArgs): void => { - monoPlatform.callMethod( - dotNetDispatcherEndInvokeJSMethodHandle, - null, - [monoPlatform.toDotNetString(serializedArgs)] + dotNetDispatcherEndInvokeJSMethodHandle( + serializedArgs ); }, invokeDotNetFromJS: (assemblyName, methodIdentifier, dotNetObjectId, argsJson) => { - const resultJsonStringPtr = monoPlatform.callMethod(dotNetDispatcherInvokeMethodHandle, null, [ - assemblyName ? monoPlatform.toDotNetString(assemblyName) : null, - monoPlatform.toDotNetString(methodIdentifier), - dotNetObjectId ? monoPlatform.toDotNetString(dotNetObjectId.toString()) : null, - monoPlatform.toDotNetString(argsJson), - ]) as System_String; - return resultJsonStringPtr - ? monoPlatform.toJavaScriptString(resultJsonStringPtr) - : null; + return dotNetDispatcherInvokeMethodHandle( + assemblyName ? assemblyName : null, + methodIdentifier, + dotNetObjectId ? dotNetObjectId.toString() : null, + argsJson, + ) as string; }, }); } diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoTypes.d.ts b/src/Components/Web.JS/src/Platform/Mono/MonoTypes.d.ts index 0fc613915b..7d2f5c23bf 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoTypes.d.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoTypes.d.ts @@ -10,7 +10,7 @@ declare namespace Module { function FS_createPath(parent, path, canRead, canWrite); function FS_createDataFile(parent, name, data, canRead, canWrite, canOwn); - function mono_call_assembly_entry_point(assemblyName: string, args: any[]): any; + function mono_bind_static_method(fqn: string): BoundStaticMethod; } // Emscripten declares these globals @@ -28,3 +28,7 @@ declare namespace MONO { var mono_wasm_runtime_is_ready: boolean; function mono_wasm_setenv (name: string, value: string): void; } + +// mono_bind_static_method allows arbitrary JS data types to be sent over the wire. However we are +// artifically limiting it to a subset of types that we actually use. +declare type BoundStaticMethod = (...args: (string | number | null)[]) => (string | number | null); diff --git a/src/Components/Web.JS/src/Platform/Platform.ts b/src/Components/Web.JS/src/Platform/Platform.ts index 29eb04609e..8d5daf454a 100644 --- a/src/Components/Web.JS/src/Platform/Platform.ts +++ b/src/Components/Web.JS/src/Platform/Platform.ts @@ -2,12 +2,8 @@ export interface Platform { start(loadAssemblyUrls: string[]): Promise<void>; callEntryPoint(assemblyName: string): void; - findMethod(assemblyName: string, namespace: string, className: string, methodName: string): MethodHandle; - callMethod(method: MethodHandle, target: System_Object | null, args: (System_Object | null)[]): System_Object; toJavaScriptString(dotNetString: System_String): string; - toDotNetString(javaScriptString: string): System_String; - toUint8Array(array: System_Array<any>): Uint8Array; getArrayLength(array: System_Array<any>): number; From 1c3ae1549e3f3137ccfafc0de4753dc358b4e441 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 3 Dec 2019 14:41:28 -0800 Subject: [PATCH 37/64] Add publish test for BlazorStandalone --- .config/dotnet-tools.json | 12 +++++++ .../test/BlazorWasmTemplateTest.cs | 22 +++++++++--- .../test/Helpers/AspNetProcess.cs | 9 +++-- src/ProjectTemplates/test/Helpers/Project.cs | 34 +++++++++++++------ .../test/ProjectTemplates.Tests.csproj | 4 +++ 5 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 .config/dotnet-tools.json diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json new file mode 100644 index 0000000000..be95a01fc5 --- /dev/null +++ b/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-serve": { + "version": "1.5.0", + "commands": [ + "dotnet-serve" + ] + } + } +} \ No newline at end of file diff --git a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs index 579d5b11bf..41cb82ac21 100644 --- a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs @@ -6,7 +6,7 @@ using System.Net; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.E2ETesting; -using Microsoft.AspNetCore.Testing; +using Microsoft.Extensions.CommandLineUtils; using OpenQA.Selenium; using Templates.Test.Helpers; using Xunit; @@ -28,11 +28,11 @@ namespace Templates.Test public async Task BlazorWasmStandaloneTemplate_Works() { var project = await ProjectFactory.GetOrCreateProject("blazorstandalone", Output); + project.TargetFramework = "netstandard2.1"; var createResult = await project.RunDotNetNewAsync("blazorwasm"); Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", project, createResult)); - // We can't run a published standalone app, but let's just make sure it publishes fine var publishResult = await project.RunDotNetPublishAsync(); Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", project, publishResult)); @@ -40,6 +40,18 @@ namespace Templates.Test Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", project, buildResult)); await BuildAndRunTest(project.ProjectName, project); + + var publishDir = Path.Combine(project.TemplatePublishDir, project.ProjectName, "dist"); + AspNetProcess.EnsureDevelopmentCertificates(); + + Output.WriteLine("Running dotnet serve on published output..."); + using var serveProcess = ProcessEx.Run(Output, publishDir, DotNetMuxer.MuxerPathOrDefault(), "serve -S"); + + // Todo: Use dynamic port assignment: https://github.com/natemcmaster/dotnet-serve/pull/40/files + var listeningUri = "https://localhost:8080"; + Output.WriteLine($"Opening browser at {listeningUri}..."); + Browser.Navigate().GoToUrl(listeningUri); + TestBasicNavigation(project.ProjectName); } [Fact] @@ -70,7 +82,7 @@ namespace Templates.Test if (BrowserFixture.IsHostAutomationSupported()) { aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(project.ProjectName, serverProject); + TestBasicNavigation(project.ProjectName); } else { @@ -90,7 +102,7 @@ namespace Templates.Test if (BrowserFixture.IsHostAutomationSupported()) { aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(appName, project); + TestBasicNavigation(appName); } else { @@ -98,7 +110,7 @@ namespace Templates.Test } } - private void TestBasicNavigation(string appName, Project project) + private void TestBasicNavigation(string appName) { // Give components.server enough time to load so that it can replace // the prerendered content before we start making assertions. diff --git a/src/ProjectTemplates/test/Helpers/AspNetProcess.cs b/src/ProjectTemplates/test/Helpers/AspNetProcess.cs index c4415bf55f..753eb1258a 100644 --- a/src/ProjectTemplates/test/Helpers/AspNetProcess.cs +++ b/src/ProjectTemplates/test/Helpers/AspNetProcess.cs @@ -51,8 +51,7 @@ namespace Templates.Test.Helpers Timeout = TimeSpan.FromMinutes(2) }; - var now = DateTimeOffset.Now; - new CertificateManager().EnsureAspNetCoreHttpsDevelopmentCertificate(now, now.AddYears(1)); + EnsureDevelopmentCertificates(); output.WriteLine("Running ASP.NET application..."); @@ -64,6 +63,12 @@ namespace Templates.Test.Helpers } } + internal static void EnsureDevelopmentCertificates() + { + var now = DateTimeOffset.Now; + new CertificateManager().EnsureAspNetCoreHttpsDevelopmentCertificate(now, now.AddYears(1)); + } + public void VisitInBrowser(IWebDriver driver) { _output.WriteLine($"Opening browser at {ListeningUri}..."); diff --git a/src/ProjectTemplates/test/Helpers/Project.cs b/src/ProjectTemplates/test/Helpers/Project.cs index 8eb59d86f6..19f1d46b7f 100644 --- a/src/ProjectTemplates/test/Helpers/Project.cs +++ b/src/ProjectTemplates/test/Helpers/Project.cs @@ -21,13 +21,10 @@ namespace Templates.Test.Helpers { private const string _urls = "http://127.0.0.1:0;https://127.0.0.1:0"; - public const string DefaultFramework = "netcoreapp3.1"; - public static bool IsCIEnvironment => typeof(Project).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>() .Any(a => a.Key == "ContinuousIntegrationBuild"); - public static string ArtifactsLogDir => typeof(Project).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>() - .Single(a => a.Key == "ArtifactsLogDir")?.Value; + public static string ArtifactsLogDir => GetAssemblyMetadata("ArtifactsLogDir"); public SemaphoreSlim DotNetNewLock { get; set; } public SemaphoreSlim NodeLock { get; set; } @@ -35,14 +32,16 @@ namespace Templates.Test.Helpers public string ProjectArguments { get; set; } public string ProjectGuid { get; set; } public string TemplateOutputDir { get; set; } - public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", DefaultFramework); - public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", DefaultFramework, "publish"); + public string TargetFramework { get; set; } = GetAssemblyMetadata("Test.DefaultTargetFramework"); + + public string TemplateBuildDir => Path.Combine(TemplateOutputDir, "bin", "Debug", TargetFramework); + public string TemplatePublishDir => Path.Combine(TemplateOutputDir, "bin", "Release", TargetFramework, "publish"); private string TemplateServerDir => Path.Combine(TemplateOutputDir, $"{ProjectName}.Server"); private string TemplateClientDir => Path.Combine(TemplateOutputDir, $"{ProjectName}.Client"); - public string TemplateClientDebugDir => Path.Combine(TemplateClientDir, "bin", "Debug", DefaultFramework); - public string TemplateClientReleaseDir => Path.Combine(TemplateClientDir, "bin", "Release", DefaultFramework, "publish"); - public string TemplateServerReleaseDir => Path.Combine(TemplateServerDir, "bin", "Release", DefaultFramework, "publish"); + public string TemplateClientDebugDir => Path.Combine(TemplateClientDir, "bin", "Debug", TargetFramework); + public string TemplateClientReleaseDir => Path.Combine(TemplateClientDir, "bin", "Release", TargetFramework, "publish"); + public string TemplateServerReleaseDir => Path.Combine(TemplateServerDir, "bin", "Release", TargetFramework, "publish"); public ITestOutputHelper Output { get; set; } public IMessageSink DiagnosticsMessageSink { get; set; } @@ -110,7 +109,7 @@ namespace Templates.Test.Helpers } } - internal async Task<ProcessEx> RunDotNetPublishAsync(bool takeNodeLock = false, IDictionary<string,string> packageOptions = null, string additionalArgs = null) + internal async Task<ProcessEx> RunDotNetPublishAsync(bool takeNodeLock = false, IDictionary<string, string> packageOptions = null, string additionalArgs = null) { Output.WriteLine("Publishing ASP.NET application..."); @@ -132,7 +131,7 @@ namespace Templates.Test.Helpers } } - internal async Task<ProcessEx> RunDotNetBuildAsync(bool takeNodeLock = false, IDictionary<string,string> packageOptions = null, string additionalArgs = null) + internal async Task<ProcessEx> RunDotNetBuildAsync(bool takeNodeLock = false, IDictionary<string, string> packageOptions = null, string additionalArgs = null) { Output.WriteLine("Building ASP.NET application..."); @@ -524,5 +523,18 @@ namespace Templates.Test.Helpers } public override string ToString() => $"{ProjectName}: {TemplateOutputDir}"; + + private static string GetAssemblyMetadata(string key) + { + var attribute = typeof(Project).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>() + .FirstOrDefault(a => a.Key == key); + + if (attribute is null) + { + throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found."); + } + + return attribute.Value; + } } } diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj index 492f337109..6eb7d6c454 100644 --- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj +++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj @@ -58,6 +58,10 @@ <_Parameter1>TestPackageRestorePath</_Parameter1> <_Parameter2>$(TestPackageRestorePath)</_Parameter2> </AssemblyAttribute> + <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute"> + <_Parameter1>Test.DefaultTargetFramework</_Parameter1> + <_Parameter2>$(DefaultNetCoreTargetFramework)</_Parameter2> + </AssemblyAttribute> <AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(ContinuousIntegrationBuild)' == 'true'"> <_Parameter1>ContinuousIntegrationBuild</_Parameter1> <_Parameter2>true</_Parameter2> From baf72c73c53156d19a0c82d104ec0021c245f971 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Fri, 3 Jan 2020 14:34:03 -0800 Subject: [PATCH 38/64] Avoid copying the shared fx in blazor-wasm --- src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj index 4c4298a92d..66680a95a5 100644 --- a/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj +++ b/src/Framework/src/Microsoft.AspNetCore.App.Runtime.csproj @@ -167,7 +167,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant _BatchCopyToRedistLayout; _CreateInternalSharedFxArchive; _CreateRedistSharedFxArchive; - _InstallFrameworkIntoLocalDotNet; </CoreBuildDependsOn> <CrossGenDependsOn> ResolveReferences; From 66ecdab542054fc96f102963332e317007d4c437 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Mon, 6 Jan 2020 08:39:56 -0800 Subject: [PATCH 39/64] Ensure $(Configuration) is evaluated prior to using it (#18113) Fixes https://github.com/aspnet/AspNetCore/issues/12779 --- src/Components/Blazor/Build/src/targets/All.props | 6 ------ src/Components/Blazor/Build/src/targets/All.targets | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Components/Blazor/Build/src/targets/All.props b/src/Components/Blazor/Build/src/targets/All.props index 690a29fbab..d1d242f4d9 100644 --- a/src/Components/Blazor/Build/src/targets/All.props +++ b/src/Components/Blazor/Build/src/targets/All.props @@ -4,12 +4,6 @@ <PropertyGroup> <DefaultWebContentItemExcludes>$(DefaultWebContentItemExcludes);wwwroot\**</DefaultWebContentItemExcludes> - <!-- By default, enable auto rebuilds for debug builds. Note that the server will not enable it in production environments regardless. --> - <BlazorRebuildOnFileChange Condition="'$(Configuration)' == 'Debug' AND '$(BlazorRebuildOnFileChange)' == ''">true</BlazorRebuildOnFileChange> - - <!-- By default, enable debugging for debug builds. --> - <BlazorEnableDebugging Condition="'$(Configuration)' == 'Debug' AND '$(BlazorEnableDebugging)' == ''">true</BlazorEnableDebugging> - <!-- When using IISExpress with a standalone app, there's no point restarting IISExpress after build. It slows things unnecessarily and breaks in-flight HTTP requests. --> <NoRestartServerOnBuild>true</NoRestartServerOnBuild> </PropertyGroup> diff --git a/src/Components/Blazor/Build/src/targets/All.targets b/src/Components/Blazor/Build/src/targets/All.targets index 6aa60e8227..6c69e85a40 100644 --- a/src/Components/Blazor/Build/src/targets/All.targets +++ b/src/Components/Blazor/Build/src/targets/All.targets @@ -13,6 +13,9 @@ <!-- The Blazor build code can only find your referenced assemblies if they are in the output directory --> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> + + <!-- By default, enable debugging for debug builds. --> + <BlazorEnableDebugging Condition="'$(Configuration)' == 'Debug' AND '$(BlazorEnableDebugging)' == ''">true</BlazorEnableDebugging> </PropertyGroup> <Import Project="Blazor.MonoRuntime.targets" /> From d4ada348fba375f3f77ed8ed65d834155ae746f6 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 7 Jan 2020 13:42:25 -0800 Subject: [PATCH 40/64] Use Blazor version for WASM templates (#18174) --- src/Components/Blazor/Blazor.Version.props | 8 ++++++++ src/Components/Blazor/Directory.Build.props | 5 +---- .../Microsoft.AspNetCore.Blazor.Templates.csproj | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/Components/Blazor/Blazor.Version.props diff --git a/src/Components/Blazor/Blazor.Version.props b/src/Components/Blazor/Blazor.Version.props new file mode 100644 index 0000000000..123a94c1d7 --- /dev/null +++ b/src/Components/Blazor/Blazor.Version.props @@ -0,0 +1,8 @@ +<Project> + <PropertyGroup> + <!-- Override version labels --> + <VersionPrefix>3.2.0</VersionPrefix> + <PreReleaseVersionLabel>preview1</PreReleaseVersionLabel> + <DotNetFinalVersionKind /> + </PropertyGroup> +</Project> \ No newline at end of file diff --git a/src/Components/Blazor/Directory.Build.props b/src/Components/Blazor/Directory.Build.props index 59beb90ee9..8df2e791dd 100644 --- a/src/Components/Blazor/Directory.Build.props +++ b/src/Components/Blazor/Directory.Build.props @@ -1,11 +1,8 @@ <Project> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" /> + <Import Project="Blazor.Version.props" /> <PropertyGroup> - <!-- Override version labels --> - <VersionPrefix>3.2.0</VersionPrefix> - <PreReleaseVersionLabel>preview1</PreReleaseVersionLabel> - <DotNetFinalVersionKind /> <!-- This property points to the latest released Microsoft.AspNetCore.App version it needs to be updated to target the latest patch before a preview release. --> <LatestAspNetCoreReferenceVersion>3.1.0</LatestAspNetCoreReferenceVersion> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj index 32c3197d04..65457a000d 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj @@ -1,4 +1,10 @@ <Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <BlazorProjectsRoot>$(RepoRoot)src\Components\Blazor\</BlazorProjectsRoot> + </PropertyGroup> + + <Import Project="$(BlazorProjectsRoot)Blazor.Version.props" /> + <PropertyGroup> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework> <IsShippingPackage>true</IsShippingPackage> @@ -18,8 +24,6 @@ MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); MicrosoftAspNetCoreBlazorServerPackageVersion=$(MicrosoftAspNetCoreBlazorServerPackageVersion); </GeneratedContentProperties> - - <BlazorProjectsRoot>$(RepoRoot)src\Components\Blazor\</BlazorProjectsRoot> </PropertyGroup> <ItemGroup> From a181fd52326e383d33bd36be6e799f31720a823d Mon Sep 17 00:00:00 2001 From: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Date: Fri, 10 Jan 2020 11:30:55 +0000 Subject: [PATCH 41/64] Link more assemblies (type granularity linking for real this time) (#18165) --- .../Blazor/src/Hosting/WebAssemblyHost.cs | 5 ++ .../GenerateTypeGranularityLinkingConfig.cs | 48 +++++++++++++++++++ .../src/targets/Blazor.MonoRuntime.targets | 15 +++++- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs index 3a2ccfbaae..b90878fdde 100644 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs +++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs @@ -19,6 +19,11 @@ namespace Microsoft.AspNetCore.Blazor.Hosting public WebAssemblyHost(IServiceProvider services, IJSRuntime runtime) { + // To ensure JS-invoked methods don't get linked out, have a reference to their enclosing types + GC.KeepAlive(typeof(EntrypointInvoker)); + GC.KeepAlive(typeof(JSInteropMethods)); + GC.KeepAlive(typeof(WebAssemblyEventDispatcher)); + Services = services ?? throw new ArgumentNullException(nameof(services)); _runtime = runtime ?? throw new ArgumentNullException(nameof(runtime)); } diff --git a/src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs b/src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs new file mode 100644 index 0000000000..8a56b7fc3d --- /dev/null +++ b/src/Components/Blazor/Build/src/Tasks/GenerateTypeGranularityLinkingConfig.cs @@ -0,0 +1,48 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.IO; +using System.Xml.Linq; +using Microsoft.Build.Framework; +using Microsoft.Build.Utilities; + +namespace Microsoft.AspNetCore.Blazor.Build.Tasks +{ + public class GenerateTypeGranularityLinkingConfig : Task + { + [Required] + public ITaskItem[] Assemblies { get; set; } + + [Required] + public string OutputPath { get; set; } + + public override bool Execute() + { + var linkerElement = new XElement("linker", + new XComment(" THIS IS A GENERATED FILE - DO NOT EDIT MANUALLY ")); + + foreach (var assembly in Assemblies) + { + var assemblyElement = CreateTypeGranularityConfig(assembly); + linkerElement.Add(assemblyElement); + } + + using var fileStream = File.Open(OutputPath, FileMode.Create); + new XDocument(linkerElement).Save(fileStream); + + return true; + } + + private XElement CreateTypeGranularityConfig(ITaskItem assembly) + { + // We match all types in the assembly, and for each one, tell the linker to preserve all + // its members (preserve=all) but only if there's some reference to the type (required=false) + return new XElement("assembly", + new XAttribute("fullname", Path.GetFileNameWithoutExtension(assembly.ItemSpec)), + new XElement("type", + new XAttribute("fullname", "*"), + new XAttribute("preserve", "all"), + new XAttribute("required", "false"))); + } + } +} diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 0a3ba70a23..4bdb2f4311 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -160,6 +160,7 @@ </Target> <UsingTask TaskName="BlazorILLink" AssemblyFile="$(BlazorTasksPath)" /> + <UsingTask TaskName="GenerateTypeGranularityLinkingConfig" AssemblyFile="$(BlazorTasksPath)" /> <Target Name="_LinkBlazorApplication" @@ -171,7 +172,10 @@ Outputs="$(_BlazorLinkerOutputCache)"> <ItemGroup> - <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)" IsLinkable="$([System.String]::Copy('%(FileName)').StartsWith('System.'))" /> + <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)" /> + <_BlazorDependencyAssembly IsLinkable="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('System.'))" /> + <_BlazorDependencyAssembly IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.'))" /> + <_BlazorDependencyAssembly IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))" /> <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" /> <_BlazorAssemblyToLink Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" /> @@ -201,6 +205,15 @@ <_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe</_DotNetHostFileName> </PropertyGroup> + <PropertyGroup> + <_TypeGranularityLinkingConfig>$(BlazorIntermediateOutputPath)linker.typegranularityconfig.xml</_TypeGranularityLinkingConfig> + </PropertyGroup> + <GenerateTypeGranularityLinkingConfig Assemblies="@(_BlazorAssemblyToLink->WithMetadataValue('TypeGranularity', 'true'))" OutputPath="$(_TypeGranularityLinkingConfig)" /> + <ItemGroup> + <BlazorLinkerDescriptor Include="$(_TypeGranularityLinkingConfig)" /> + <FileWrites Include="$(_TypeGranularityLinkingConfig)" /> + </ItemGroup> + <BlazorILLink ILLinkPath="$(MonoLinkerPath)" AssemblyPaths="@(_BlazorAssemblyToLink)" From cb092258c38dc1d3afac804cce88e54e644883d0 Mon Sep 17 00:00:00 2001 From: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Date: Thu, 9 Jan 2020 15:46:25 +0000 Subject: [PATCH 42/64] Allow overwriting outputs with older inputs. Fixes #18192 --- .../Blazor/Build/src/targets/Blazor.MonoRuntime.targets | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 4bdb2f4311..24378975a0 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -22,8 +22,6 @@ <Target Name="_BlazorCopyFilesToOutputDirectory" DependsOnTargets="PrepareBlazorOutputs" - Inputs="@(BlazorOutputWithTargetPath)" - Outputs="@(BlazorOutputWithTargetPath->'$(TargetDir)%(TargetOutputPath)')" AfterTargets="CopyFilesToOutputDirectory" Condition="'$(OutputType.ToLowerInvariant())'=='exe'"> From 2e2d0625e14d20c4f222affa5bfc20d761c89c54 Mon Sep 17 00:00:00 2001 From: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Date: Thu, 9 Jan 2020 15:46:51 +0000 Subject: [PATCH 43/64] Write unlinked.output to disk --- .../Blazor/Build/src/targets/Blazor.MonoRuntime.targets | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 24378975a0..cdbe7169a0 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -268,6 +268,8 @@ <Output TaskParameter="Dependencies" ItemName="_BlazorResolvedRuntimeDependencies" /> </ResolveBlazorRuntimeDependencies> + <WriteLinesToFile File="$(_BlazorApplicationAssembliesCacheFile)" Lines="@(_BlazorResolvedRuntimeDependencies)" Overwrite="true" /> + <ItemGroup> <FileWrites Include="$(_BlazorApplicationAssembliesCacheFile)" /> </ItemGroup> From 3fb171e282aa461e054a9969ee023713d92ea04a Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Wed, 8 Jan 2020 13:35:33 -0800 Subject: [PATCH 44/64] Handle satellite assemblies in the Blazor build targets * Pass the same closure of assemblies that is used by the SDK's linker to Blazor's linker and ResolveBlazorRuntimeDependencies task * Quote the mono linker path Fixes https://github.com/dotnet/aspnetcore/issues/17644 Fixes https://github.com/dotnet/aspnetcore/issues/17754 --- .../Blazor/Build/src/Tasks/BlazorILLink.cs | 7 +- .../Build/src/Tasks/GenerateBlazorBootJson.cs | 14 +++- .../src/targets/Blazor.MonoRuntime.targets | 81 ++++++++++++------- .../BuildIntegrationTest.cs | 61 ++++++++++++++ .../PublishIntegrationTest.cs | 29 +++++++ .../Class1.cs | 12 +++ ...classlibrarywithsatelliteassemblies.csproj | 13 +++ .../Build/testassets/standalone/Program.cs | 6 +- 8 files changed, 191 insertions(+), 32 deletions(-) create mode 100644 src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs create mode 100644 src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj diff --git a/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs index 5e0a86d384..d5dc22cde0 100644 --- a/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs +++ b/src/Components/Blazor/Build/src/Tasks/BlazorILLink.cs @@ -66,7 +66,12 @@ namespace Microsoft.AspNetCore.Blazor.Build.Tasks protected override string GenerateFullPathToTool() => DotNetPath; - protected override string GenerateCommandLineCommands() => ILLinkPath; + protected override string GenerateCommandLineCommands() + { + var args = new StringBuilder(); + args.Append(Quote(ILLinkPath)); + return args.ToString(); + } private static string Quote(string path) { diff --git a/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs b/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs index b383d183e4..1984de0a57 100644 --- a/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs +++ b/src/Components/Blazor/Build/src/Tasks/GenerateBlazorBootJson.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; using System.Linq; using System.Reflection; @@ -27,12 +28,23 @@ namespace Microsoft.AspNetCore.Blazor.Build public override bool Execute() { var entryAssemblyName = AssemblyName.GetAssemblyName(AssemblyPath).Name; - var assemblies = References.Select(c => Path.GetFileName(c.ItemSpec)).ToArray(); + var assemblies = References.Select(GetUriPath).OrderBy(c => c, StringComparer.Ordinal).ToArray(); using var fileStream = File.Create(OutputPath); WriteBootJson(fileStream, entryAssemblyName, assemblies, LinkerEnabled); return true; + + static string GetUriPath(ITaskItem item) + { + var outputPath = item.GetMetadata("RelativeOutputPath"); + if (string.IsNullOrEmpty(outputPath)) + { + outputPath = Path.GetFileName(item.ItemSpec); + } + + return outputPath.Replace('\\', '/'); + } } internal static void WriteBootJson(Stream stream, string entryAssemblyName, string[] assemblies, bool linkerEnabled) diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index cdbe7169a0..915ec80391 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -74,7 +74,7 @@ </ItemGroup> </Target> - <Target Name="_ResolveBlazorInputs"> + <Target Name="_ResolveBlazorInputs" DependsOnTargets="ResolveReferences;ResolveRuntimePackAssets"> <PropertyGroup> <!-- /obj/<<configuration>>/<<targetframework>>/blazor --> <BlazorIntermediateOutputPath>$(IntermediateOutputPath)blazor\</BlazorIntermediateOutputPath> @@ -94,8 +94,6 @@ </PropertyGroup> <ItemGroup> - <_BlazorDependencyInput Include="@(ReferenceCopyLocalPaths->WithMetadataValue('Extension','.dll')->'%(FullPath)')" /> - <_WebAssemblyBCLFolder Include=" $(DotNetWebAssemblyBCLPath); $(DotNetWebAssemblyBCLFacadesPath); @@ -104,6 +102,22 @@ <_WebAssemblyBCLAssembly Include="%(_WebAssemblyBCLFolder.Identity)*.dll" /> </ItemGroup> + <!-- + Calculate the assemblies that act as inputs to calculate assembly closure. Based on _ComputeAssembliesToPostprocessOnPublish which is used as input to SDK's linker + https://github.com/dotnet/sdk/blob/d597e7b09d7657ba4e326d6734e14fcbf8473564/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets#L864-L873 + --> + <ItemGroup> + <!-- Assemblies from packages --> + <_BlazorManagedRuntimeAssemby Include="@(RuntimeCopyLocalItems)" /> + + <!-- Assemblies from other references --> + <_BlazorUserRuntimeAssembly Include="@(ReferencePath->WithMetadataValue('CopyLocal', 'true'))" /> + <_BlazorUserRuntimeAssembly Include="@(ReferenceDependencyPaths->WithMetadataValue('CopyLocal', 'true'))" /> + + <_BlazorManagedRuntimeAssemby Include="@(_BlazorUserRuntimeAssembly)" /> + <_BlazorManagedRuntimeAssemby Include="@(IntermediateAssembly)" /> + </ItemGroup> + <MakeDir Directories="$(BlazorIntermediateOutputPath)" /> </Target> @@ -111,6 +125,27 @@ <Error Message="Unrecongnized value for BlazorLinkOnBuild: '$(BlazorLinkOnBuild)'. Valid values are 'true' or 'false'." Condition="'$(BlazorLinkOnBuild)' != 'true' AND '$(BlazorLinkOnBuild)' != 'false'" /> + + <ItemGroup> + <!-- + ReferenceCopyLocalPaths includes all files that are part of the build out with CopyLocalLockFileAssemblies on. + Remove assemblies that are inputs to calculating the assembly closure. Instead use the resolved outputs, since it is the minimal set. + --> + <_BlazorCopyLocalPaths Include="@(ReferenceCopyLocalPaths)" /> + <_BlazorCopyLocalPaths Remove="@(_BlazorManagedRuntimeAssemby)" /> + + <BlazorOutputWithTargetPath Include="@(_BlazorCopyLocalPaths)"> + <BlazorRuntimeFile>true</BlazorRuntimeFile> + <TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</TargetOutputPath> + <RelativeOutputPath>%(_BlazorCopyLocalPaths.DestinationSubDirectory)%(FileName)%(Extension)</RelativeOutputPath> + </BlazorOutputWithTargetPath> + + <BlazorOutputWithTargetPath Include="@(_BlazorResolvedAssembly)"> + <BlazorRuntimeFile>true</BlazorRuntimeFile> + <TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath> + <RelativeOutputPath>%(FileName)%(Extension)</RelativeOutputPath> + </BlazorOutputWithTargetPath> + </ItemGroup> </Target> <!-- @@ -128,14 +163,8 @@ <!-- _BlazorLinkerOutputCache records files linked during the last incremental build of the target. Read the contents and assign linked files to be copied to the output. --> <ReadLinesFromFile File="$(_BlazorLinkerOutputCache)"> - <Output TaskParameter="Lines" ItemName="_BlazorLinkedFile"/> + <Output TaskParameter="Lines" ItemName="_BlazorResolvedAssembly"/> </ReadLinesFromFile> - - <ItemGroup> - <BlazorOutputWithTargetPath Include="%(_BlazorLinkedFile.Identity)"> - <TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath> - </BlazorOutputWithTargetPath> - </ItemGroup> </Target> <UsingTask TaskName="BlazorCreateRootDescriptorFile" AssemblyFile="$(BlazorTasksPath)" /> @@ -163,8 +192,7 @@ <Target Name="_LinkBlazorApplication" Inputs="$(ProjectAssetsFile); - @(IntermediateAssembly); - @(_BlazorDependencyInput); + @(_BlazorManagedRuntimeAssemby); @(BlazorLinkerDescriptor); $(MSBuildAllProjects)" Outputs="$(_BlazorLinkerOutputCache)"> @@ -174,12 +202,15 @@ <_BlazorDependencyAssembly IsLinkable="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('System.'))" /> <_BlazorDependencyAssembly IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.'))" /> <_BlazorDependencyAssembly IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))" /> + <!-- Any assembly from a package reference that starts with System. file name is allowed to be linked --> + <_BlazorRuntimeCopyLocalItems Include="@(RuntimeCopyLocalItems)" IsLinkable="$([System.String]::Copy('%(FileName)').StartsWith('System.'))" /> <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" /> - <_BlazorAssemblyToLink Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" /> + <_BlazorAssemblyToLink Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' == 'true'" /> <_BlazorLinkerRoot Include="@(IntermediateAssembly)" /> - <_BlazorLinkerRoot Include="@(_BlazorDependencyAssembly)" Condition="'%(_BlazorDependencyAssembly.IsLinkable)' != 'true'" /> + <_BlazorLinkerRoot Include="@(_BlazorUserRuntimeAssembly)" /> + <_BlazorLinkerRoot Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' != 'true'" /> </ItemGroup> <PropertyGroup> @@ -230,29 +261,22 @@ <WriteLinesToFile File="$(_BlazorLinkerOutputCache)" Lines="@(_LinkerResult)" Overwrite="true" /> </Target> - <UsingTask TaskName="ResolveBlazorRuntimeDependencies" AssemblyFile="$(BlazorTasksPath)" /> <Target Name="_ResolveBlazorOutputsWhenNotLinked" DependsOnTargets="_ResolveBlazorRuntimeDependencies" Condition="'$(BlazorLinkOnBuild)' != 'true'"> - <ReadLinesFromFile File="$(_BlazorApplicationAssembliesCacheFile)" Condition="'@(_BlazorResolvedRuntimeDependencies->Count())' == '0'"> - <Output TaskParameter="Lines" ItemName="_BlazorResolvedRuntimeDependencies"/> + <ReadLinesFromFile File="$(_BlazorApplicationAssembliesCacheFile)" Condition="'@(_BlazorResolvedAssembly->Count())' == '0'"> + <Output TaskParameter="Lines" ItemName="_BlazorResolvedAssembly"/> </ReadLinesFromFile> - - <ItemGroup> - <BlazorOutputWithTargetPath Include="@(_BlazorResolvedRuntimeDependencies)"> - <TargetOutputPath>$(BlazorRuntimeBinOutputPath)%(FileName)%(Extension)</TargetOutputPath> - </BlazorOutputWithTargetPath> - </ItemGroup> </Target> <Target Name="_ResolveBlazorRuntimeDependencies" Inputs="$(ProjectAssetsFile); @(IntermediateAssembly); - @(_BlazorDependencyInput)" + @(_BlazorManagedRuntimeAssemby)" Outputs="$(_BlazorApplicationAssembliesCacheFile)"> <!-- @@ -262,10 +286,10 @@ --> <ResolveBlazorRuntimeDependencies EntryPoint="@(IntermediateAssembly)" - ApplicationDependencies="@(_BlazorDependencyInput)" + ApplicationDependencies="@(_BlazorManagedRuntimeAssemby)" WebAssemblyBCLAssemblies="@(_WebAssemblyBCLAssembly)"> - <Output TaskParameter="Dependencies" ItemName="_BlazorResolvedRuntimeDependencies" /> + <Output TaskParameter="Dependencies" ItemName="_BlazorResolvedAssembly" /> </ResolveBlazorRuntimeDependencies> <WriteLinesToFile File="$(_BlazorApplicationAssembliesCacheFile)" Lines="@(_BlazorResolvedRuntimeDependencies)" Overwrite="true" /> @@ -282,13 +306,12 @@ Inputs="@(BlazorOutputWithTargetPath)" Outputs="$(BlazorBootJsonIntermediateOutputPath)"> <ItemGroup> - <_AppReferences Include="@(BlazorOutputWithTargetPath->WithMetadataValue('Extension','.dll'))" /> - <_AppReferences Include="@(BlazorOutputWithTargetPath->WithMetadataValue('Extension','.pdb'))" Condition="'$(BlazorEnableDebugging)' == 'true'" /> + <_BlazorRuntimeFile Include="@(BlazorOutputWithTargetPath->WithMetadataValue('BlazorRuntimeFile', 'true'))" /> </ItemGroup> <GenerateBlazorBootJson AssemblyPath="@(IntermediateAssembly)" - References="@(_AppReferences)" + References="@(_BlazorRuntimeFile)" LinkerEnabled="$(BlazorLinkOnBuild)" OutputPath="$(BlazorBootJsonIntermediateOutputPath)" /> diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs index 1cc39f0d6e..027fe59990 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs @@ -70,5 +70,66 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. } + + [Fact] + public async Task Build_SatelliteAssembliesAreCopiedToBuildOutput() + { + // Arrange + using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" }); + project.AddProjectFileContent( +@" +<PropertyGroup> + <DefineConstants>$(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies</DefineConstants> +</PropertyGroup> +<ItemGroup> + <ProjectReference Include=""..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"" /> +</ItemGroup>"); + + var result = await MSBuildProcessManager.DotnetMSBuild(project, args: "/restore"); + + Assert.BuildPassed(result); + + var buildOutputDirectory = project.BuildOutputDirectory; + + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "classlibrarywithsatelliteassemblies.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output. + + var bootJsonPath = Path.Combine(buildOutputDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\""); + Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\""); + } + + [Fact] + public async Task Build_WithBlazorLinkOnBuildFalse_SatelliteAssembliesAreCopiedToBuildOutput() + { + // Arrange + using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" }); + project.AddProjectFileContent( +@" +<PropertyGroup> + <BlazorLinkOnBuild>false</BlazorLinkOnBuild> + <DefineConstants>$(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies</DefineConstants> +</PropertyGroup> +<ItemGroup> + <ProjectReference Include=""..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"" /> +</ItemGroup>"); + + var result = await MSBuildProcessManager.DotnetMSBuild(project, args: "/restore"); + + Assert.BuildPassed(result); + + var buildOutputDirectory = project.BuildOutputDirectory; + + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "classlibrarywithsatelliteassemblies.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output. + + var bootJsonPath = Path.Combine(buildOutputDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\""); + Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\""); + } } } diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs index 6995ffde4d..f1f554d3b9 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs @@ -112,6 +112,35 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, publishDirectory, "web.config"); } + [Fact] + public async Task Publish_SatelliteAssemblies_AreCopiedToBuildOutput() + { + // Arrange + using var project = ProjectDirectory.Create("standalone", additionalProjects: new[] { "razorclasslibrary", "classlibrarywithsatelliteassemblies" }); + project.AddProjectFileContent( +@" +<PropertyGroup> + <DefineConstants>$(DefineConstants);REFERENCE_classlibrarywithsatelliteassemblies</DefineConstants> +</PropertyGroup> +<ItemGroup> + <ProjectReference Include=""..\classlibrarywithsatelliteassemblies\classlibrarywithsatelliteassemblies.csproj"" /> +</ItemGroup>"); + + var result = await MSBuildProcessManager.DotnetMSBuild(project, "Publish", args: "/restore"); + + Assert.BuildPassed(result); + + var publishDirectory = project.PublishOutputDirectory; + var blazorPublishDirectory = Path.Combine(publishDirectory, Path.GetFileNameWithoutExtension(project.ProjectFilePath)); + + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.CodeAnalysis.CSharp.dll"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "fr", "Microsoft.CodeAnalysis.CSharp.resources.dll"); // Verify satellite assemblies are present in the build output. + + var bootJsonPath = Path.Combine(blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); + Assert.FileContains(result, bootJsonPath, "\"Microsoft.CodeAnalysis.CSharp.dll\""); + Assert.FileContains(result, bootJsonPath, "\"fr\\/Microsoft.CodeAnalysis.CSharp.resources.dll\""); + } + [Fact] public async Task Publish_HostedApp_Works() { diff --git a/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs new file mode 100644 index 0000000000..944699cdb3 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/Class1.cs @@ -0,0 +1,12 @@ +using System; + +namespace classlibrarywithsatelliteassemblies +{ + public class Class1 + { + public static void Test() + { + GC.KeepAlive(typeof(Microsoft.CodeAnalysis.CSharp.CSharpCompilation)); + } + } +} \ No newline at end of file diff --git a/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj new file mode 100644 index 0000000000..7081842748 --- /dev/null +++ b/src/Components/Blazor/Build/testassets/classlibrarywithsatelliteassemblies/classlibrarywithsatelliteassemblies.csproj @@ -0,0 +1,13 @@ +<Project Sdk="Microsoft.NET.Sdk.Razor"> + + <PropertyGroup> + <TargetFramework>netstandard2.1</TargetFramework> + <RazorLangVersion>3.0</RazorLangVersion> + </PropertyGroup> + + <ItemGroup> + <!-- The compiler package contains quite a few satellite assemblies --> + <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.4.0" /> + </ItemGroup> + +</Project> diff --git a/src/Components/Blazor/Build/testassets/standalone/Program.cs b/src/Components/Blazor/Build/testassets/standalone/Program.cs index 16bfae7e43..3e46e63316 100644 --- a/src/Components/Blazor/Build/testassets/standalone/Program.cs +++ b/src/Components/Blazor/Build/testassets/standalone/Program.cs @@ -1,10 +1,14 @@ - +using System; + namespace standalone { public class Program { public static void Main(string[] args) { +#if REFERENCE_classlibrarywithsatelliteassemblies + GC.KeepAlive(typeof(classlibrarywithsatelliteassemblies.Class1)); +#endif } } } From 80a67874c678753e2ba1ee2d19ddb1158da2599e Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Fri, 10 Jan 2020 10:43:25 -0800 Subject: [PATCH 45/64] Resolve merge conflicts --- .../src/targets/Blazor.MonoRuntime.targets | 66 +++++++++++-------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 915ec80391..3c7d126561 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -82,6 +82,8 @@ <!-- /obj/<<configuration>>/<<targetframework>>/blazor/linker.descriptor.xml --> <GeneratedBlazorLinkerDescriptor>$(BlazorIntermediateOutputPath)linker.descriptor.xml</GeneratedBlazorLinkerDescriptor> + <_TypeGranularityLinkerDescriptor>$(BlazorIntermediateOutputPath)linker.typegranularityconfig.xml</_TypeGranularityLinkerDescriptor> + <!-- /obj/<<configuration>>/<<targetframework>>/blazor/linker/ --> <BlazorIntermediateLinkerOutputPath>$(BlazorIntermediateOutputPath)linker/</BlazorIntermediateLinkerOutputPath> @@ -159,7 +161,7 @@ <Target Name="_ResolveBlazorOutputsWhenLinked" Condition="'$(BlazorLinkOnBuild)' == 'true'" - DependsOnTargets="_GenerateBlazorLinkerDescriptor;_LinkBlazorApplication"> + DependsOnTargets="_PrepareBlazorLinkerInputs;_GenerateBlazorLinkerDescriptor;_GenerateTypeGranularLinkerDescriptor;_LinkBlazorApplication"> <!-- _BlazorLinkerOutputCache records files linked during the last incremental build of the target. Read the contents and assign linked files to be copied to the output. --> <ReadLinesFromFile File="$(_BlazorLinkerOutputCache)"> @@ -167,6 +169,28 @@ </ReadLinesFromFile> </Target> + <Target Name="_PrepareBlazorLinkerInputs"> + <ItemGroup> + <_BlazorRuntimeCopyLocalItems Include="@(RuntimeCopyLocalItems)" /> + + <!-- + Any assembly from a package reference that starts with System. file name is allowed to be linked. + Assemblies from Microsoft.AspNetCore and Microsoft.Extensions, are also linked but with TypeGranularity. + --> + <_BlazorRuntimeCopyLocalItems IsLinkable="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('System.'))" /> + <_BlazorRuntimeCopyLocalItems IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.'))" /> + <_BlazorRuntimeCopyLocalItems IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))" /> + + <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" /> + <_BlazorAssemblyToLink Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' == 'true'" /> + + <_BlazorLinkerRoot Include="@(IntermediateAssembly)" /> + <_BlazorLinkerRoot Include="@(_BlazorUserRuntimeAssembly)" /> + <_BlazorLinkerRoot Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' != 'true'" /> + </ItemGroup> + + </Target> + <UsingTask TaskName="BlazorCreateRootDescriptorFile" AssemblyFile="$(BlazorTasksPath)" /> <Target Name="_GenerateBlazorLinkerDescriptor" Inputs="@(IntermediateAssembly)" @@ -186,9 +210,22 @@ </ItemGroup> </Target> - <UsingTask TaskName="BlazorILLink" AssemblyFile="$(BlazorTasksPath)" /> <UsingTask TaskName="GenerateTypeGranularityLinkingConfig" AssemblyFile="$(BlazorTasksPath)" /> + <Target Name="_GenerateTypeGranularLinkerDescriptor" + Inputs="@(_BlazorAssemblyToLink->WithMetadataValue('TypeGranularity', 'true'))" + Outputs="$(_TypeGranularityLinkerDescriptor)"> + <GenerateTypeGranularityLinkingConfig + Assemblies="@(_BlazorAssemblyToLink->WithMetadataValue('TypeGranularity', 'true'))" + OutputPath="$(_TypeGranularityLinkerDescriptor)" /> + + <ItemGroup> + <BlazorLinkerDescriptor Include="$(_TypeGranularityLinkerDescriptor)" /> + <FileWrites Include="$(_TypeGranularityLinkerDescriptor)" /> + </ItemGroup> + </Target> + + <UsingTask TaskName="BlazorILLink" AssemblyFile="$(BlazorTasksPath)" /> <Target Name="_LinkBlazorApplication" Inputs="$(ProjectAssetsFile); @@ -197,22 +234,6 @@ $(MSBuildAllProjects)" Outputs="$(_BlazorLinkerOutputCache)"> - <ItemGroup> - <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)" /> - <_BlazorDependencyAssembly IsLinkable="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('System.'))" /> - <_BlazorDependencyAssembly IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.'))" /> - <_BlazorDependencyAssembly IsLinkable="true" TypeGranularity="true" Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))" /> - <!-- Any assembly from a package reference that starts with System. file name is allowed to be linked --> - <_BlazorRuntimeCopyLocalItems Include="@(RuntimeCopyLocalItems)" IsLinkable="$([System.String]::Copy('%(FileName)').StartsWith('System.'))" /> - - <_BlazorAssemblyToLink Include="@(_WebAssemblyBCLAssembly)" /> - <_BlazorAssemblyToLink Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' == 'true'" /> - - <_BlazorLinkerRoot Include="@(IntermediateAssembly)" /> - <_BlazorLinkerRoot Include="@(_BlazorUserRuntimeAssembly)" /> - <_BlazorLinkerRoot Include="@(_BlazorRuntimeCopyLocalItems)" Condition="'%(_BlazorRuntimeCopyLocalItems.IsLinkable)' != 'true'" /> - </ItemGroup> - <PropertyGroup> <_BlazorLinkerAdditionalOptions>-l $(MonoLinkerI18NAssemblies) $(AdditionalMonoLinkerOptions)</_BlazorLinkerAdditionalOptions> </PropertyGroup> @@ -234,15 +255,6 @@ <_DotNetHostFileName Condition=" '$(OS)' == 'Windows_NT' ">dotnet.exe</_DotNetHostFileName> </PropertyGroup> - <PropertyGroup> - <_TypeGranularityLinkingConfig>$(BlazorIntermediateOutputPath)linker.typegranularityconfig.xml</_TypeGranularityLinkingConfig> - </PropertyGroup> - <GenerateTypeGranularityLinkingConfig Assemblies="@(_BlazorAssemblyToLink->WithMetadataValue('TypeGranularity', 'true'))" OutputPath="$(_TypeGranularityLinkingConfig)" /> - <ItemGroup> - <BlazorLinkerDescriptor Include="$(_TypeGranularityLinkingConfig)" /> - <FileWrites Include="$(_TypeGranularityLinkingConfig)" /> - </ItemGroup> - <BlazorILLink ILLinkPath="$(MonoLinkerPath)" AssemblyPaths="@(_BlazorAssemblyToLink)" From 17b1dc9841961850db8c938a5ac09f9f97f73c8e Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 10 Dec 2019 15:33:45 -0800 Subject: [PATCH 46/64] Add a benchmarking app for Blazor Wasm --- .../wwwroot/benchmarks/index.js | 6 - src/Components/Components.sln | 53 +++-- src/Components/ComponentsNoDeps.slnf | 6 +- .../Directory.Build.props | 0 .../Directory.Build.targets | 0 .../{ => BlazingPizza.Server}/NuGet.config | 0 .../Driver/BenchmarkMeasurement.cs | 14 ++ .../Driver/BenchmarkMetadata.cs | 14 ++ .../Driver/BenchmarkOutput.cs | 14 ++ .../Driver/BenchmarkResult.cs | 13 ++ .../Driver/BenchmarkResultsStartup.cs | 35 +++ .../Wasm.Performance/Driver/Program.cs | 210 +++++++++++++++++ .../Wasm.Performance/Driver/Selenium.cs | 99 ++++++++ .../Driver/Wasm.Performance.Driver.csproj | 23 ++ .../Wasm.Performance/Driver/appsettings.json | 8 + .../benchmarkapps/Wasm.Performance/README.md | 18 ++ .../Wasm.Performance/TestApp}/App.razor | 0 .../TestApp}/BenchmarkEvent.cs | 2 +- .../TestApp}/Pages/Index.razor | 0 .../TestApp}/Pages/Json.razor | 0 .../TestApp}/Pages/RenderList.razor | 0 .../TestApp}/Pages/_Imports.razor | 0 .../Wasm.Performance/TestApp}/Program.cs | 2 +- .../TestApp}/Shared/MainLayout.razor | 0 .../Wasm.Performance/TestApp}/Startup.cs | 2 +- .../TestApp/Wasm.Performance.TestApp.csproj} | 2 +- .../Wasm.Performance/TestApp}/_Imports.razor | 4 +- .../TestApp}/wwwroot/benchmarks/appStartup.js | 0 .../TestApp/wwwroot/benchmarks/index.js | 38 ++++ .../wwwroot/benchmarks/jsonHandling.js | 0 .../wwwroot/benchmarks/jsonHandlingData.js | 0 .../wwwroot/benchmarks/lib/bootstrap.min.css | 0 .../benchmarks/lib/minibench/README.md | 0 .../benchmarks/lib/minibench/minibench.js | 215 ++++-------------- .../benchmarks/lib/minibench/minibench.ui.js | 191 ++++++++++++++++ .../benchmarks/lib/minibench/style.css | 0 .../TestApp}/wwwroot/benchmarks/renderList.js | 0 .../benchmarks/util/BenchmarkEvents.js | 0 .../wwwroot/benchmarks/util/BlazorApp.js | 0 .../TestApp}/wwwroot/benchmarks/util/DOM.js | 0 .../TestApp}/wwwroot/blazor-frame.html | 0 .../TestApp}/wwwroot/index.html | 0 .../Wasm.Performance/benchmarks.compose.json | 15 ++ .../benchmarkapps/Wasm.Performance/dockerfile | 32 +++ .../benchmarkapps/Wasm.Performance/exec.sh | 5 + .../Wasm.Performance/local.dockerfile | 7 + ...soft.AspNetCore.Components.E2ETests.csproj | 2 +- .../test/E2ETest/Tests/PerformanceTest.cs | 4 +- 48 files changed, 821 insertions(+), 213 deletions(-) delete mode 100644 src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js rename src/Components/benchmarkapps/{ => BlazingPizza.Server}/Directory.Build.props (100%) rename src/Components/benchmarkapps/{ => BlazingPizza.Server}/Directory.Build.targets (100%) rename src/Components/benchmarkapps/{ => BlazingPizza.Server}/NuGet.config (100%) create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMeasurement.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMetadata.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkOutput.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj create mode 100644 src/Components/benchmarkapps/Wasm.Performance/Driver/appsettings.json create mode 100644 src/Components/benchmarkapps/Wasm.Performance/README.md rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/App.razor (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/BenchmarkEvent.cs (89%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Pages/Index.razor (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Pages/Json.razor (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Pages/RenderList.razor (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Pages/_Imports.razor (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Program.cs (91%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Shared/MainLayout.razor (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/Startup.cs (90%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj => benchmarkapps/Wasm.Performance/TestApp/Wasm.Performance.TestApp.csproj} (88%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/_Imports.razor (56%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/appStartup.js (100%) create mode 100644 src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/jsonHandling.js (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/jsonHandlingData.js (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/lib/bootstrap.min.css (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/lib/minibench/README.md (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/lib/minibench/minibench.js (58%) create mode 100644 src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.ui.js rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/lib/minibench/style.css (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/renderList.js (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/util/BenchmarkEvents.js (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/util/BlazorApp.js (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/benchmarks/util/DOM.js (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/blazor-frame.html (100%) rename src/Components/{Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance => benchmarkapps/Wasm.Performance/TestApp}/wwwroot/index.html (100%) create mode 100644 src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json create mode 100644 src/Components/benchmarkapps/Wasm.Performance/dockerfile create mode 100644 src/Components/benchmarkapps/Wasm.Performance/exec.sh create mode 100644 src/Components/benchmarkapps/Wasm.Performance/local.dockerfile diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js deleted file mode 100644 index 4600066f38..0000000000 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import { HtmlUI } from './lib/minibench/minibench.js'; -import './appStartup.js'; -import './renderList.js'; -import './jsonHandling.js'; - -new HtmlUI('E2E Performance', '#display'); diff --git a/src/Components/Components.sln b/src/Components/Components.sln index 91278955cf..c88695cf66 100644 --- a/src/Components/Components.sln +++ b/src/Components/Components.sln @@ -21,8 +21,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DevServer", "Blazor\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj", "{A6C8050D-7C18-4585-ADCF-833AC1765847}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.E2EPerformance", "Blazor\testassets\Microsoft.AspNetCore.Blazor.E2EPerformance\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj", "{08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.Server", "Blazor\Server\src\Microsoft.AspNetCore.Blazor.Server.csproj", "{A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testassets", "testassets", "{A7ABAC29-F73F-456D-AE54-46842CFC2E10}" @@ -238,8 +236,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor", "Ignitor\src\Igni EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ignitor.Test", "Ignitor\test\Ignitor.Test.csproj", "{F31E8118-014E-4CCE-8A48-5282F7B9BB3E}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation", "{FD9BD646-9D50-42ED-A3E1-90558BA0C6B2}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation", "Blazor\Validation\src\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj", "{B70F90C7-2696-4050-B24E-BF0308F4E059}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests", "Blazor\Validation\test\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj", "{A5617A9D-C71E-44DE-936C-27611EB40A02}" @@ -250,6 +246,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.WebAssembly.Interop", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComponentsApp.Server", "test\testassets\ComponentsApp.Server\ComponentsApp.Server.csproj", "{F2E27E1C-2E47-42C1-9AC7-36265A381717}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarkapps", "benchmarkapps", "{CCC82E97-7B58-43E2-BBBD-23D82F926367}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wasm.Performance", "Wasm.Performance", "{F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wasm.Performance.Driver", "benchmarkapps\Wasm.Performance\Driver\Wasm.Performance.Driver.csproj", "{CA9948CA-B3FA-4C2E-A726-5E47BAD19457}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wasm.Performance.TestApp", "benchmarkapps\Wasm.Performance\TestApp\Wasm.Performance.TestApp.csproj", "{97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -344,18 +348,6 @@ Global {A6C8050D-7C18-4585-ADCF-833AC1765847}.Release|x64.Build.0 = Release|Any CPU {A6C8050D-7C18-4585-ADCF-833AC1765847}.Release|x86.ActiveCfg = Release|Any CPU {A6C8050D-7C18-4585-ADCF-833AC1765847}.Release|x86.Build.0 = Release|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x64.ActiveCfg = Debug|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x64.Build.0 = Debug|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x86.ActiveCfg = Debug|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Debug|x86.Build.0 = Debug|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|Any CPU.Build.0 = Release|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x64.ActiveCfg = Release|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x64.Build.0 = Release|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x86.ActiveCfg = Release|Any CPU - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB}.Release|x86.Build.0 = Release|Any CPU {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Debug|Any CPU.Build.0 = Debug|Any CPU {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -1532,6 +1524,30 @@ Global {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x64.Build.0 = Release|Any CPU {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x86.ActiveCfg = Release|Any CPU {F2E27E1C-2E47-42C1-9AC7-36265A381717}.Release|x86.Build.0 = Release|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x64.ActiveCfg = Debug|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x64.Build.0 = Debug|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x86.ActiveCfg = Debug|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Debug|x86.Build.0 = Debug|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|Any CPU.Build.0 = Release|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x64.ActiveCfg = Release|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x64.Build.0 = Release|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x86.ActiveCfg = Release|Any CPU + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457}.Release|x86.Build.0 = Release|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x64.ActiveCfg = Debug|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x64.Build.0 = Debug|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x86.ActiveCfg = Debug|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Debug|x86.Build.0 = Debug|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|Any CPU.Build.0 = Release|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x64.ActiveCfg = Release|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x64.Build.0 = Release|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x86.ActiveCfg = Release|Any CPU + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1544,7 +1560,6 @@ Global {E8AD67A4-77D3-4B85-AE19-4711388B62B1} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {E38FDBB0-08C1-444E-A449-69C8A59D721B} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A6C8050D-7C18-4585-ADCF-833AC1765847} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} - {08773DD6-6FED-4BF2-BD9F-C19D2CF919BB} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A4859630-F9F7-4F5C-9FF3-6C013D7C58FA} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A7ABAC29-F73F-456D-AE54-46842CFC2E10} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {FD37F740-A654-4117-BFB6-9112CE4C1D3B} = {A7ABAC29-F73F-456D-AE54-46842CFC2E10} @@ -1641,12 +1656,14 @@ Global {BBF37AF9-8290-4B70-8BA8-0F6017B3B620} = {46E4300C-5726-4108-B9A2-18BB94EB26ED} {CD0EF85C-4187-4515-A355-E5A0D4485F40} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926} {F31E8118-014E-4CCE-8A48-5282F7B9BB3E} = {BDE2397D-C53A-4783-8B3A-1F54F48A6926} - {FD9BD646-9D50-42ED-A3E1-90558BA0C6B2} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {B70F90C7-2696-4050-B24E-BF0308F4E059} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {A5617A9D-C71E-44DE-936C-27611EB40A02} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} = {7260DED9-22A9-4E9D-92F4-5E8A4404DEAF} {D141CFEE-D10A-406B-8963-F86FA13732E3} = {21BB9C13-20C1-4F2B-80E4-D7C64AA3BD05} {F2E27E1C-2E47-42C1-9AC7-36265A381717} = {44E0D4F3-4430-4175-B482-0D1AEE4BB699} + {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A} = {CCC82E97-7B58-43E2-BBBD-23D82F926367} + {CA9948CA-B3FA-4C2E-A726-5E47BAD19457} = {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A} + {97EA0A7D-FE5E-47D1-ADDC-4BFD702F55AB} = {F65EFF0F-ACF3-46BD-9A8F-CDA94AF1885A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {CC3C47E1-AD1A-4619-9CD3-E08A0148E5CE} diff --git a/src/Components/ComponentsNoDeps.slnf b/src/Components/ComponentsNoDeps.slnf index 61501c5101..7e09eeea25 100644 --- a/src/Components/ComponentsNoDeps.slnf +++ b/src/Components/ComponentsNoDeps.slnf @@ -13,14 +13,12 @@ "Blazor\\DevServer\\src\\Microsoft.AspNetCore.Blazor.DevServer.csproj", "Blazor\\Http\\src\\Microsoft.AspNetCore.Blazor.HttpClient.csproj", "Blazor\\Http\\test\\Microsoft.AspNetCore.Blazor.HttpClient.Tests.csproj", + "Blazor\\Mono.WebAssembly.Interop\\src\\Mono.WebAssembly.Interop.csproj", "Blazor\\Server\\src\\Microsoft.AspNetCore.Blazor.Server.csproj", - "Blazor\\Templates\\src\\Microsoft.AspNetCore.Blazor.Templates.csproj", "Blazor\\Validation\\src\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj", "Blazor\\Validation\\test\\Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.Tests.csproj", - "Blazor\\Mono.WebAssembly.Interop\\src\\Mono.WebAssembly.Interop.csproj", "Blazor\\testassets\\HostedInAspNet.Client\\HostedInAspNet.Client.csproj", "Blazor\\testassets\\HostedInAspNet.Server\\HostedInAspNet.Server.csproj", - "Blazor\\testassets\\Microsoft.AspNetCore.Blazor.E2EPerformance\\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj", "Blazor\\testassets\\MonoSanityClient\\MonoSanityClient.csproj", "Blazor\\testassets\\MonoSanity\\MonoSanity.csproj", "Blazor\\testassets\\StandaloneApp\\StandaloneApp.csproj", @@ -36,6 +34,8 @@ "Server\\test\\Microsoft.AspNetCore.Components.Server.Tests.csproj", "Web\\src\\Microsoft.AspNetCore.Components.Web.csproj", "Web\\test\\Microsoft.AspNetCore.Components.Web.Tests.csproj", + "benchmarkapps\\Wasm.Performance\\Driver\\Wasm.Performance.Driver.csproj", + "benchmarkapps\\Wasm.Performance\\TestApp\\Wasm.Performance.TestApp.csproj", "test\\E2ETest\\Microsoft.AspNetCore.Components.E2ETests.csproj", "test\\testassets\\BasicTestApp\\BasicTestApp.csproj", "test\\testassets\\TestContentPackage\\TestContentPackage.csproj", diff --git a/src/Components/benchmarkapps/Directory.Build.props b/src/Components/benchmarkapps/BlazingPizza.Server/Directory.Build.props similarity index 100% rename from src/Components/benchmarkapps/Directory.Build.props rename to src/Components/benchmarkapps/BlazingPizza.Server/Directory.Build.props diff --git a/src/Components/benchmarkapps/Directory.Build.targets b/src/Components/benchmarkapps/BlazingPizza.Server/Directory.Build.targets similarity index 100% rename from src/Components/benchmarkapps/Directory.Build.targets rename to src/Components/benchmarkapps/BlazingPizza.Server/Directory.Build.targets diff --git a/src/Components/benchmarkapps/NuGet.config b/src/Components/benchmarkapps/BlazingPizza.Server/NuGet.config similarity index 100% rename from src/Components/benchmarkapps/NuGet.config rename to src/Components/benchmarkapps/BlazingPizza.Server/NuGet.config diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMeasurement.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMeasurement.cs new file mode 100644 index 0000000000..62016cf630 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMeasurement.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; + +namespace Wasm.Performance.Driver +{ + internal class BenchmarkMeasurement + { + public DateTime Timestamp { get; internal set; } + public string Name { get; internal set; } + public double Value { get; internal set; } + } +} \ No newline at end of file diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMetadata.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMetadata.cs new file mode 100644 index 0000000000..ab98fef891 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkMetadata.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Wasm.Performance.Driver +{ + internal class BenchmarkMetadata + { + public string Source { get; set; } + public string Name { get; set; } + public string ShortDescription { get; set; } + public string LongDescription { get; set; } + public string Format { get; set; } + } +} diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkOutput.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkOutput.cs new file mode 100644 index 0000000000..7a32ce146d --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkOutput.cs @@ -0,0 +1,14 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace Wasm.Performance.Driver +{ + internal class BenchmarkOutput + { + public List<BenchmarkMetadata> Metadata { get; } = new List<BenchmarkMetadata>(); + + public List<BenchmarkMeasurement> Measurements { get; } = new List<BenchmarkMeasurement>(); + } +} diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs new file mode 100644 index 0000000000..3173341e4b --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs @@ -0,0 +1,13 @@ +namespace Wasm.Performance.Driver +{ + class BenchmarkResult + { + public string Name { get; set; } + + public bool Success { get; set; } + + public int NumExecutions { get; set; } + + public double Duration { get; set; } + } +} \ No newline at end of file diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs new file mode 100644 index 0000000000..1fa1f067a0 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs @@ -0,0 +1,35 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System.Collections.Generic; +using System.Text.Json; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +namespace Wasm.Performance.Driver +{ + public class BenchmarkDriverStartup + { + + public void ConfigureServices(IServiceCollection services) + { + services.AddCors(c => c.AddDefaultPolicy(builder => builder.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin())); + } + + public void Configure(IApplicationBuilder app) + { + app.UseCors(); + + app.Run(async request => + { + var result = await JsonSerializer.DeserializeAsync<List<BenchmarkResult>>(request.Request.Body, new JsonSerializerOptions + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, + }); + Program.SetBenchmarkResult(result); + }); + } + } +} diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs new file mode 100644 index 0000000000..8075d83bdd --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -0,0 +1,210 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.ExceptionServices; +using System.Text.Encodings.Web; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Hosting.Server; +using Microsoft.AspNetCore.Hosting.Server.Features; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using DevHostServerProgram = Microsoft.AspNetCore.Blazor.DevServer.Server.Program; + +namespace Wasm.Performance.Driver +{ + public class Program + { + static readonly TimeSpan Timeout = TimeSpan.FromMinutes(3); + static TaskCompletionSource<List<BenchmarkResult>> benchmarkResult = new TaskCompletionSource<List<BenchmarkResult>>(); + + public static async Task<int> Main(string[] args) + { + var seleniumPort = 4444; + if (args.Length > 0) + { + if (!int.TryParse(args[0], out seleniumPort)) + { + Console.Error.WriteLine("Usage Driver <selenium-port>"); + return 1; + } + } + + using var browser = await Selenium.CreateBrowser(seleniumPort); + + using var testApp = StartTestApp(); + using var benchmarkReceiver = StartBenchmarkResultReceiver(); + + var testAppUrl = GetListeningUrl(testApp); + var receiverUrl = GetListeningUrl(benchmarkReceiver); + + Console.WriteLine($"Test app listening at {testAppUrl}."); + + var launchUrl = $"{testAppUrl}?resultsUrl={UrlEncoder.Default.Encode(receiverUrl)}#automated"; + browser.Url = launchUrl; + browser.Navigate(); + + var cancellationToken = new CancellationTokenSource(Timeout); + cancellationToken.Token.Register(() => benchmarkResult.TrySetException(new TimeoutException($"Timed out after {Timeout}"))); + + var results = await benchmarkResult.Task; + FormatAsBenchmarksOutput(results); + + Console.WriteLine("Done executing benchmark"); + return 0; + } + + internal static void SetBenchmarkResult(List<BenchmarkResult> result) + { + benchmarkResult.TrySetResult(result); + } + + private static void FormatAsBenchmarksOutput(List<BenchmarkResult> results) + { + // Sample of the the format: https://github.com/aspnet/Benchmarks/blob/e55f9e0312a7dd019d1268c1a547d1863f0c7237/src/Benchmarks/Program.cs#L51-L67 + var output = new BenchmarkOutput(); + foreach (var result in results) + { + output.Metadata.Add(new BenchmarkMetadata + { + Source = "BlazorWasm", + Name = result.Name, + ShortDescription = $"{result.Name} Duration", + LongDescription = $"{result.Name} Duration", + Format = "n2" + }); + + output.Measurements.Add(new BenchmarkMeasurement + { + Timestamp = DateTime.UtcNow, + Name = result.Name, + Value = result.Duration, + }); + } + + // Statistics about publish sizes + output.Metadata.Add(new BenchmarkMetadata + { + Source = "BlazorWasm", + Name = "Publish size (linked)", + ShortDescription = "Publish size - linked app (MB)", + LongDescription = "Publish size - linked app (MB)", + Format = "n2", + }); + + var testAssembly = typeof(TestApp.Startup).Assembly; + var testApp = new DirectoryInfo(Path.Combine( + Path.GetDirectoryName(testAssembly.Location), + testAssembly.GetName().Name)); + + output.Measurements.Add(new BenchmarkMeasurement + { + Timestamp = DateTime.UtcNow, + Name = "Publish size (linked)", + Value = GetDirectorySize(testApp) / 1024, + }); + + Console.WriteLine("#StartJobStatistics"); + Console.WriteLine(JsonSerializer.Serialize(output)); + Console.WriteLine("#EndJobStatistics"); + } + + static IHost StartTestApp() + { + var args = new[] + { + "--urls", "http://127.0.0.1:0", + "--applicationpath", typeof(TestApp.Startup).Assembly.Location, + }; + + var host = DevHostServerProgram.BuildWebHost(args); + RunInBackgroundThread(host.Start); + return host; + } + + static IHost StartBenchmarkResultReceiver() + { + var args = new[] + { + "--urls", "http://127.0.0.1:0", + }; + + var host = Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(builder => builder.UseStartup<BenchmarkDriverStartup>()) + .Build(); + + RunInBackgroundThread(host.Start); + return host; + } + + static void RunInBackgroundThread(Action action) + { + var isDone = new ManualResetEvent(false); + + ExceptionDispatchInfo edi = null; + Task.Run(() => + { + try + { + action(); + } + catch (Exception ex) + { + edi = ExceptionDispatchInfo.Capture(ex); + } + + isDone.Set(); + }); + + if (!isDone.WaitOne(Timeout)) + { + throw new TimeoutException("Timed out waiting for: " + action); + } + + if (edi != null) + { + throw edi.SourceException; + } + } + + static string GetListeningUrl(IHost testApp) + { + return testApp.Services.GetRequiredService<IServer>() + .Features + .Get<IServerAddressesFeature>() + .Addresses + .First(); + } + + static long GetDirectorySize(DirectoryInfo directory) + { + // This can happen if you run the app without publishing it. + if (!directory.Exists) + { + return 0; + } + + long size = 0; + foreach (var item in directory.EnumerateFileSystemInfos()) + { + if (item is FileInfo fileInfo) + { + size += fileInfo.Length; + } + else if (item is DirectoryInfo directoryInfo) + { + size += GetDirectorySize(directoryInfo); + } + } + + return size; + } + } +} diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs new file mode 100644 index 0000000000..169d3735a1 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs @@ -0,0 +1,99 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using OpenQA.Selenium; +using OpenQA.Selenium.Chrome; +using OpenQA.Selenium.Remote; + +namespace Wasm.Performance.Driver +{ + class Selenium + { + static bool RunHeadlessBrowser = true; + + private static async ValueTask<Uri> WaitForServerAsync(int port) + { + var uri = new UriBuilder("http", "localhost", port, "/wd/hub/").Uri; + var httpClient = new HttpClient + { + BaseAddress = uri, + Timeout = TimeSpan.FromSeconds(1), + }; + + Console.WriteLine($"Attempting to connect to Selenium Server running at {uri}"); + + const int MaxRetries = 30; + var retries = 0; + + while (retries < MaxRetries) + { + retries++; + try + { + var response = (await httpClient.GetAsync("status")).EnsureSuccessStatusCode(); + Console.WriteLine("Connected to Selenium"); + return uri; + } + catch + { + if (retries == 1) + { + Console.WriteLine("Could not connect to selenium-server. Has it been started as yet?"); + } + } + + await Task.Delay(1000); + } + + throw new Exception($"Unable to connect to selenium-server at {uri}"); + } + + public static async Task<RemoteWebDriver> CreateBrowser(int port) + { + var uri = await WaitForServerAsync(port); + + var options = new ChromeOptions(); + + if (RunHeadlessBrowser) + { + options.AddArgument("--headless"); + } + + options.SetLoggingPreference(LogType.Browser, LogLevel.All); + + var attempt = 0; + const int MaxAttempts = 3; + do + { + try + { + // The driver opens the browser window and tries to connect to it on the constructor. + // Under heavy load, this can cause issues + // To prevent this we let the client attempt several times to connect to the server, increasing + // the max allowed timeout for a command on each attempt linearly. + var driver = new RemoteWebDriver( + uri, + options.ToCapabilities(), + TimeSpan.FromSeconds(60).Add(TimeSpan.FromSeconds(attempt * 60))); + + driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1); + + return driver; + } + catch (Exception ex) + { + Console.WriteLine($"Error initializing RemoteWebDriver: {ex.Message}"); + } + + attempt++; + + } while (attempt < MaxAttempts); + + throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive"); + } + } +} diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj new file mode 100644 index 0000000000..cf35be4e00 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj @@ -0,0 +1,23 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <!-- Intentionally pinned this to .NET Core 3.1 since that's the supported version in the docker image --> + <TargetFramework>netcoreapp3.1</TargetFramework> + + <UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference> + <OutputType>exe</OutputType> + + <!-- WebDriver is not strong-named, so this test project cannot be strong named either. --> + <SignAssembly>false</SignAssembly> + </PropertyGroup> + + <ItemGroup> + <Reference Include="Selenium.Support" /> + <Reference Include="Selenium.WebDriver" /> + <ProjectReference Include="..\..\..\Blazor\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj" /> + <ProjectReference Include="..\TestApp\Wasm.Performance.TestApp.csproj" /> + + <Content Include="appsettings.json" CopyToPublishDirectory="PreserveNewest" /> + </ItemGroup> + +</Project> diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/appsettings.json b/src/Components/benchmarkapps/Wasm.Performance/Driver/appsettings.json new file mode 100644 index 0000000000..bed61b254f --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "IncludeScopes": false, + "LogLevel": { + "Default": "Warning" + } + } +} \ No newline at end of file diff --git a/src/Components/benchmarkapps/Wasm.Performance/README.md b/src/Components/benchmarkapps/Wasm.Performance/README.md new file mode 100644 index 0000000000..ac0f59e570 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/README.md @@ -0,0 +1,18 @@ +## Blazor WASM benchmarks + +These projects assist in Benchmarking Components. +See https://github.com/aspnet/Benchmarks#benchmarks for usage guidance on using the Benchmarking tool with your application + +### Running the benchmarks + +The TestApp is a regular BlazorWASM project and can be run using `dotnet run`. The Driver is an app that speaks the Benchmark protocol. You generally do not need to run the Driver locally, but if you were to do so, you require docker. Here are the commands you would need to run it locally: + +1. `dotnet publish -c Release -r linux-x64 Driver/Wasm.Performance.Driver.csproj` +2. `docker build -t blazor-local -f ./local.dockerfile . ` +3. `docker run -it blazor-local` + +To run the benchmark app in the Benchmark server, run + +``` +dotnet run -- --config aspnetcore/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json --services.blazorwasmbenchmark.endpoints <BenchmarkServerUri> +``` \ No newline at end of file diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/App.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/App.razor similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/App.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/App.razor diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/BenchmarkEvent.cs b/src/Components/benchmarkapps/Wasm.Performance/TestApp/BenchmarkEvent.cs similarity index 89% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/BenchmarkEvent.cs rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/BenchmarkEvent.cs index bdf98fd388..81cd361dce 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/BenchmarkEvent.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/BenchmarkEvent.cs @@ -3,7 +3,7 @@ using Microsoft.JSInterop; -namespace Microsoft.AspNetCore.Blazor.E2EPerformance +namespace Wasm.Performance.TestApp { public static class BenchmarkEvent { diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Index.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/Index.razor similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Index.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/Index.razor diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Json.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/Json.razor similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/Json.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/Json.razor diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/RenderList.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/RenderList.razor similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/RenderList.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/RenderList.razor diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/_Imports.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/_Imports.razor similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Pages/_Imports.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Pages/_Imports.razor diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs similarity index 91% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs index f498eb0222..403bc37c9c 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Blazor.Hosting; -namespace Microsoft.AspNetCore.Blazor.E2EPerformance +namespace Wasm.Performance.TestApp { public class Program { diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Shared/MainLayout.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Shared/MainLayout.razor similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Shared/MainLayout.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Shared/MainLayout.razor diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Startup.cs b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs similarity index 90% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Startup.cs rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs index 7422cd806c..c79b0efb8c 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Startup.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Components.Builder; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Blazor.E2EPerformance +namespace Wasm.Performance.TestApp { public class Startup { diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Wasm.Performance.TestApp.csproj similarity index 88% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/Wasm.Performance.TestApp.csproj index 140762810f..3fb5a922a3 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Wasm.Performance.TestApp.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk.Web"> +<Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>netstandard2.1</TargetFramework> diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/_Imports.razor b/src/Components/benchmarkapps/Wasm.Performance/TestApp/_Imports.razor similarity index 56% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/_Imports.razor rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/_Imports.razor index dc263c9383..fef56339a9 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/_Imports.razor +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/_Imports.razor @@ -2,5 +2,5 @@ @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web @using Microsoft.JSInterop -@using Microsoft.AspNetCore.Blazor.E2EPerformance -@using Microsoft.AspNetCore.Blazor.E2EPerformance.Shared +@using Wasm.Performance.TestApp +@using Wasm.Performance.TestApp.Shared diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/appStartup.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/appStartup.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/appStartup.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/appStartup.js diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js new file mode 100644 index 0000000000..6a1ba57f82 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js @@ -0,0 +1,38 @@ +import { groups, BenchmarkEvent, onBenchmarkEvent } from './lib/minibench/minibench.js'; +import { HtmlUI } from './lib/minibench/minibench.ui.js'; +// import './appStartup.js'; +// import './renderList.js'; +import './jsonHandling.js'; + +new HtmlUI('E2E Performance', '#display'); + +if (location.href.indexOf('#automated') !== -1) { + const query = new URLSearchParams(window.location.search); + const group = query.get('group'); + const resultsUrl = query.get('resultsUrl'); + + groups.filter(g => !group || g.name === group).forEach(g => g.runAll()); + + const benchmarksResults = []; + onBenchmarkEvent(async (status, args) => { + switch (status) { + case BenchmarkEvent.runStarted: + benchmarksResults.length = 0; + break; + case BenchmarkEvent.benchmarkCompleted: + case BenchmarkEvent.benchmarkError: + benchmarksResults.push(args); + break; + case BenchmarkEvent.runCompleted: + if (resultsUrl) { + await fetch(resultsUrl, { + method: 'post', + body: JSON.stringify(benchmarksResults) + }); + } + break; + default: + throw new Error(`Unknown status: ${status}`); + } + }) +} diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/jsonHandling.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandling.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/jsonHandling.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandling.js diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/jsonHandlingData.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandlingData.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/jsonHandlingData.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandlingData.js diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/bootstrap.min.css b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/bootstrap.min.css similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/bootstrap.min.css rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/bootstrap.min.css diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/README.md b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/README.md similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/README.md rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/README.md diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/minibench.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js similarity index 58% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/minibench.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js index 8214419982..6d13c56577 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/minibench.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js @@ -66,7 +66,7 @@ window.addEventListener('message', evt => { To work around browsers' current nonsupport for high-resolution timers (since Spectre etc.), the approach used here is to group executions into blocks of roughly fixed duration. - + - In each block, we execute the test code as many times as we can until the end of the block duration, without even yielding the thread if it's a synchronous call. We count how many executions completed. It @@ -82,7 +82,7 @@ window.addEventListener('message', evt => { during which there was no unrelated GC cycle or other background contention. - We keep running blocks until some larger timeout occurs *and* we've done at least some minimum number of executions. - + Note that this approach does *not* allow for per-execution setup/teardown logic whose timing is separated from the code under test. Because of the low timer precision, there would be no way to separate the setup duration @@ -174,10 +174,23 @@ class Benchmark extends EventEmitter { } run(runOptions) { + if (reportBenchmarkEvent) { + const areAllIdle = groups.reduce( + (prev, next) => prev && next.status === BenchmarkStatus.idle, + true + ); + + if (areAllIdle) { + // This is the first test being run from the idle state + reportBenchmarkEvent(BenchmarkEvent.runStarted); + } + } + this._currentRunWasAborted = false; if (this._state.status === BenchmarkStatus.idle) { this._updateState({ status: BenchmarkStatus.queued }); this.workQueueCancelHandle = addToWorkQueue(async () => { + try { if (!(runOptions && runOptions.skipGroupSetup)) { await this._group.runSetup(); @@ -192,10 +205,13 @@ class Benchmark extends EventEmitter { await this._group.runTeardown(); } + reportBenchmarkEvent(BenchmarkEvent.benchmarkCompleted, { 'name': this.name, success: true, numExecutions: this._state.numExecutions, duration: this._state.estimatedExecutionDurationMs }); + this._updateState({ status: BenchmarkStatus.idle }); } catch (ex) { this._updateState({ status: BenchmarkStatus.error }); console.error(ex); + reportBenchmarkEvent(BenchmarkEvent.benchmarkError, { 'name': this.name, success: false }); } }); } @@ -237,6 +253,13 @@ const BenchmarkStatus = { error: 3, }; +const BenchmarkEvent = { + runStarted: 0, + benchmarkCompleted : 1, + benchmarkError: 2, + runCompleted: 3, +} + class Group extends EventEmitter { constructor(name) { super(); @@ -279,6 +302,7 @@ class Group extends EventEmitter { } const groups = []; +let reportBenchmarkEvent; function group(name, configure) { groups.push(new Group(name)); @@ -298,184 +322,21 @@ function teardown(fn) { groups[groups.length - 1].teardown = fn; } -class BenchmarkDisplay { - constructor(htmlUi, benchmark) { - this.benchmark = benchmark; - this.elem = document.createElement('tr'); - - const headerCol = this.elem.appendChild(document.createElement('th')); - headerCol.className = 'pl-4'; - headerCol.textContent = benchmark.name; - headerCol.setAttribute('scope', 'row'); +function onBenchmarkEvent(fn) { + reportBenchmarkEvent = fn; - const progressCol = this.elem.appendChild(document.createElement('td')); - this.numExecutionsText = progressCol.appendChild(document.createTextNode('')); + groups.forEach(group$$1 => { + group$$1.on('changed', () => { + const areAllIdle = groups.reduce( + (prev, next) => prev && next.status === BenchmarkStatus.idle, + true + ); - const timingCol = this.elem.appendChild(document.createElement('td')); - this.executionDurationText = timingCol.appendChild(document.createElement('span')); - - const runCol = this.elem.appendChild(document.createElement('td')); - runCol.className = 'pr-4'; - runCol.setAttribute('align', 'right'); - this.runButton = document.createElement('a'); - this.runButton.className = 'run-button'; - runCol.appendChild(this.runButton); - this.runButton.textContent = 'Run'; - this.runButton.onclick = evt => { - evt.preventDefault(); - this.benchmark.run(htmlUi.globalRunOptions); - }; - - benchmark.on('changed', state => this.updateDisplay(state)); - this.updateDisplay(this.benchmark.state); - } - - updateDisplay(state) { - const benchmark = this.benchmark; - this.elem.className = rowClass(state.status); - this.runButton.textContent = runButtonText(state.status); - this.numExecutionsText.textContent = state.numExecutions - ? `Executions: ${state.numExecutions}` : ''; - this.executionDurationText.innerHTML = state.estimatedExecutionDurationMs - ? `Duration: <b>${parseFloat(state.estimatedExecutionDurationMs.toPrecision(3))}ms</b>` : ''; - if (state.status === BenchmarkStatus.idle) { - this.runButton.setAttribute('href', ''); - } else { - this.runButton.removeAttribute('href'); - if (state.status === BenchmarkStatus.error) { - this.numExecutionsText.textContent = 'Error - see console'; + if (areAllIdle) { + fn(BenchmarkEvent.runCompleted); } - } - } -} - -function runButtonText(status) { - switch (status) { - case BenchmarkStatus.idle: - case BenchmarkStatus.error: - return 'Run'; - case BenchmarkStatus.queued: - return 'Waiting...'; - case BenchmarkStatus.running: - return 'Running...'; - default: - throw new Error(`Unknown status: ${status}`); - } -} - -function rowClass(status) { - switch (status) { - case BenchmarkStatus.idle: - return 'benchmark-idle'; - case BenchmarkStatus.queued: - return 'benchmark-waiting'; - case BenchmarkStatus.running: - return 'benchmark-running'; - case BenchmarkStatus.error: - return 'benchmark-error'; - default: - throw new Error(`Unknown status: ${status}`); - } -} - -class GroupDisplay { - constructor(htmlUi, group) { - this.group = group; - - this.elem = document.createElement('div'); - this.elem.className = 'my-3 py-2 bg-white rounded shadow-sm'; - - const headerContainer = this.elem.appendChild(document.createElement('div')); - headerContainer.className = 'd-flex align-items-baseline px-4'; - const header = headerContainer.appendChild(document.createElement('h5')); - header.className = 'py-2'; - header.textContent = group.name; - - this.runButton = document.createElement('a'); - this.runButton.className = 'ml-auto run-button'; - this.runButton.setAttribute('href', ''); - headerContainer.appendChild(this.runButton); - this.runButton.textContent = 'Run all'; - this.runButton.onclick = evt => { - evt.preventDefault(); - group.runAll(htmlUi.globalRunOptions); - }; - - const table = this.elem.appendChild(document.createElement('table')); - table.className = 'table mb-0 benchmarks'; - const tbody = table.appendChild(document.createElement('tbody')); - - group.benchmarks.forEach(benchmark => { - const benchmarkDisplay = new BenchmarkDisplay(htmlUi, benchmark); - tbody.appendChild(benchmarkDisplay.elem); }); - - group.on('changed', () => this.updateDisplay()); - this.updateDisplay(); - } - - updateDisplay() { - const canRun = this.group.status === BenchmarkStatus.idle; - this.runButton.style.display = canRun ? 'block' : 'none'; - } -} - -class HtmlUI { - constructor(title, selector) { - this.containerElement = document.querySelector(selector); - - const headerDiv = this.containerElement.appendChild(document.createElement('div')); - headerDiv.className = 'd-flex align-items-center'; - - const header = headerDiv.appendChild(document.createElement('h2')); - header.className = 'mx-3 flex-grow-1'; - header.textContent = title; - - const verifyCheckboxLabel = document.createElement('label'); - verifyCheckboxLabel.className = 'ml-auto mr-5'; - headerDiv.appendChild(verifyCheckboxLabel); - this.verifyCheckbox = verifyCheckboxLabel.appendChild(document.createElement('input')); - this.verifyCheckbox.type = 'checkbox'; - this.verifyCheckbox.className = 'mr-2'; - verifyCheckboxLabel.appendChild(document.createTextNode('Verify only')); - - this.runButton = document.createElement('button'); - this.runButton.className = 'btn btn-success ml-auto px-4 run-button'; - headerDiv.appendChild(this.runButton); - this.runButton.textContent = 'Run all'; - this.runButton.onclick = () => { - groups.forEach(g => g.runAll(this.globalRunOptions)); - }; - - this.stopButton = document.createElement('button'); - this.stopButton.className = 'btn btn-danger ml-auto px-4 stop-button'; - headerDiv.appendChild(this.stopButton); - this.stopButton.textContent = 'Stop'; - this.stopButton.onclick = () => { - groups.forEach(g => g.stopAll()); - }; - - groups.forEach(group$$1 => { - const groupDisplay = new GroupDisplay(this, group$$1); - this.containerElement.appendChild(groupDisplay.elem); - group$$1.on('changed', () => this.updateDisplay()); - }); - - this.updateDisplay(); - } - - updateDisplay() { - const areAllIdle = groups.reduce( - (prev, next) => prev && next.status === BenchmarkStatus.idle, - true - ); - this.runButton.style.display = areAllIdle ? 'block' : 'none'; - this.stopButton.style.display = areAllIdle ? 'none' : 'block'; - } - - get globalRunOptions() { - return { verifyOnly: this.verifyCheckbox.checked }; - } + }); } /** @@ -483,4 +344,4 @@ class HtmlUI { * https://github.com/SteveSanderson/minibench */ -export { group, benchmark, setup, teardown, HtmlUI }; +export { groups, group, benchmark, setup, teardown, onBenchmarkEvent, BenchmarkEvent, BenchmarkStatus }; diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.ui.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.ui.js new file mode 100644 index 0000000000..4384b7660b --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.ui.js @@ -0,0 +1,191 @@ +/** minibench - https://github.com/SteveSanderson/minibench */ + +import { groups, BenchmarkStatus } from './minibench.js'; + +class BenchmarkDisplay { + constructor(htmlUi, benchmark) { + this.benchmark = benchmark; + this.elem = document.createElement('tr'); + + const headerCol = this.elem.appendChild(document.createElement('th')); + headerCol.className = 'pl-4'; + headerCol.textContent = benchmark.name; + headerCol.setAttribute('scope', 'row'); + + const progressCol = this.elem.appendChild(document.createElement('td')); + this.numExecutionsText = progressCol.appendChild(document.createTextNode('')); + + const timingCol = this.elem.appendChild(document.createElement('td')); + this.executionDurationText = timingCol.appendChild(document.createElement('span')); + + const runCol = this.elem.appendChild(document.createElement('td')); + runCol.className = 'pr-4'; + runCol.setAttribute('align', 'right'); + this.runButton = document.createElement('a'); + this.runButton.className = 'run-button'; + runCol.appendChild(this.runButton); + this.runButton.textContent = 'Run'; + this.runButton.onclick = evt => { + evt.preventDefault(); + this.benchmark.run(htmlUi.globalRunOptions); + }; + + benchmark.on('changed', state => this.updateDisplay(state)); + this.updateDisplay(this.benchmark.state); + } + + updateDisplay(state) { + const benchmark = this.benchmark; + this.elem.className = rowClass(state.status); + this.runButton.textContent = runButtonText(state.status); + this.numExecutionsText.textContent = state.numExecutions + ? `Executions: ${state.numExecutions}` : ''; + this.executionDurationText.innerHTML = state.estimatedExecutionDurationMs + ? `Duration: <b>${parseFloat(state.estimatedExecutionDurationMs.toPrecision(3))}ms</b>` : ''; + if (state.status === BenchmarkStatus.idle) { + this.runButton.setAttribute('href', ''); + } else { + this.runButton.removeAttribute('href'); + if (state.status === BenchmarkStatus.error) { + this.numExecutionsText.textContent = 'Error - see console'; + } + } + } +} + +function runButtonText(status) { + switch (status) { + case BenchmarkStatus.idle: + case BenchmarkStatus.error: + return 'Run'; + case BenchmarkStatus.queued: + return 'Waiting...'; + case BenchmarkStatus.running: + return 'Running...'; + default: + throw new Error(`Unknown status: ${status}`); + } +} + +function rowClass(status) { + switch (status) { + case BenchmarkStatus.idle: + return 'benchmark-idle'; + case BenchmarkStatus.queued: + return 'benchmark-waiting'; + case BenchmarkStatus.running: + return 'benchmark-running'; + case BenchmarkStatus.error: + return 'benchmark-error'; + default: + throw new Error(`Unknown status: ${status}`); + } +} + +class GroupDisplay { + constructor(htmlUi, group) { + this.group = group; + + this.elem = document.createElement('div'); + this.elem.className = 'my-3 py-2 bg-white rounded shadow-sm'; + + const headerContainer = this.elem.appendChild(document.createElement('div')); + headerContainer.className = 'd-flex align-items-baseline px-4'; + const header = headerContainer.appendChild(document.createElement('h5')); + header.className = 'py-2'; + header.textContent = group.name; + + this.runButton = document.createElement('a'); + this.runButton.className = 'ml-auto run-button'; + this.runButton.setAttribute('href', ''); + headerContainer.appendChild(this.runButton); + this.runButton.textContent = 'Run all'; + this.runButton.onclick = evt => { + evt.preventDefault(); + group.runAll(htmlUi.globalRunOptions); + }; + + const table = this.elem.appendChild(document.createElement('table')); + table.className = 'table mb-0 benchmarks'; + const tbody = table.appendChild(document.createElement('tbody')); + + group.benchmarks.forEach(benchmark => { + const benchmarkDisplay = new BenchmarkDisplay(htmlUi, benchmark); + tbody.appendChild(benchmarkDisplay.elem); + }); + + group.on('changed', () => this.updateDisplay()); + this.updateDisplay(); + } + + updateDisplay() { + const canRun = this.group.status === BenchmarkStatus.idle; + this.runButton.style.display = canRun ? 'block' : 'none'; + } +} + +class HtmlUI { + constructor(title, selector) { + this.containerElement = document.querySelector(selector); + + const headerDiv = this.containerElement.appendChild(document.createElement('div')); + headerDiv.className = 'd-flex align-items-center'; + + const header = headerDiv.appendChild(document.createElement('h2')); + header.className = 'mx-3 flex-grow-1'; + header.textContent = title; + + const verifyCheckboxLabel = document.createElement('label'); + verifyCheckboxLabel.className = 'ml-auto mr-5'; + headerDiv.appendChild(verifyCheckboxLabel); + this.verifyCheckbox = verifyCheckboxLabel.appendChild(document.createElement('input')); + this.verifyCheckbox.type = 'checkbox'; + this.verifyCheckbox.className = 'mr-2'; + verifyCheckboxLabel.appendChild(document.createTextNode('Verify only')); + + this.runButton = document.createElement('button'); + this.runButton.className = 'btn btn-success ml-auto px-4 run-button'; + headerDiv.appendChild(this.runButton); + this.runButton.textContent = 'Run all'; + this.runButton.setAttribute('id', 'runAll'); + this.runButton.onclick = () => { + groups.forEach(g => g.runAll(this.globalRunOptions)); + }; + + this.stopButton = document.createElement('button'); + this.stopButton.className = 'btn btn-danger ml-auto px-4 stop-button'; + headerDiv.appendChild(this.stopButton); + this.stopButton.textContent = 'Stop'; + this.stopButton.onclick = () => { + groups.forEach(g => g.stopAll()); + }; + + groups.forEach(group$$1 => { + const groupDisplay = new GroupDisplay(this, group$$1); + this.containerElement.appendChild(groupDisplay.elem); + group$$1.on('changed', () => this.updateDisplay()); + }); + + this.updateDisplay(); + } + + updateDisplay() { + const areAllIdle = groups.reduce( + (prev, next) => prev && next.status === BenchmarkStatus.idle, + true + ); + this.runButton.style.display = areAllIdle ? 'block' : 'none'; + this.stopButton.style.display = areAllIdle ? 'none' : 'block';; + } + + get globalRunOptions() { + return { verifyOnly: this.verifyCheckbox.checked }; + } +} + +/** + * minibench + * https://github.com/SteveSanderson/minibench + */ + +export { HtmlUI }; diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/style.css b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/style.css similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/lib/minibench/style.css rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/style.css diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/renderList.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/renderList.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/renderList.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/renderList.js diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/util/BenchmarkEvents.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/util/BenchmarkEvents.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/util/BenchmarkEvents.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/util/BenchmarkEvents.js diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/util/BlazorApp.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/util/BlazorApp.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/util/BlazorApp.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/util/BlazorApp.js diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/util/DOM.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/util/DOM.js similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/benchmarks/util/DOM.js rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/util/DOM.js diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/blazor-frame.html b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/blazor-frame.html similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/blazor-frame.html rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/blazor-frame.html diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/index.html b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/index.html similarity index 100% rename from src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/wwwroot/index.html rename to src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/index.html diff --git a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json new file mode 100644 index 0000000000..c2e89394ac --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json @@ -0,0 +1,15 @@ +{ + "dependencies": [ + "blazorwasmbenchmark" + ], + "services": { + "blazorwasmbenchmark": { + "source": { + "repository": "https://github.com/aspnet/AspNetCore.git", + "branchOrCommit": "prkrishn/blazor-benchmarking", + "dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile" + }, + "waitForExit": true + } + } +} \ No newline at end of file diff --git a/src/Components/benchmarkapps/Wasm.Performance/dockerfile b/src/Components/benchmarkapps/Wasm.Performance/dockerfile new file mode 100644 index 0000000000..126c172b9a --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/dockerfile @@ -0,0 +1,32 @@ +FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build + +ARG DEBIAN_FRONTEND=noninteractive + +# Setup for nodejs +RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libunwind-dev \ + nodejs \ + git + +ARG gitBranch=prkrishn/blazor-benchmarking + +WORKDIR /src +ADD https://api.github.com/repos/dotnet/aspnetcore/git/ref/heads/${gitBranch} /aspnetcore.commit + +RUN git init \ + && git fetch https://github.com/aspnet/aspnetcore ${gitBranch} \ + && git reset --hard FETCH_HEAD \ + && git submodule update --init + +RUN dotnet publish -c Release -r linux-x64 -o /app ./src/Components/benchmarkapps/Wasm.Performance/Driver/Wasm.Performance.Driver.csproj +RUN chmod +x /app/Wasm.Performance.Driver + +WORKDIR /app +FROM selenium/standalone-chrome:3.141.59-mercury as final +COPY --from=build ./app ./ +COPY ./exec.sh ./ + +ENTRYPOINT [ "bash", "./exec.sh" ] \ No newline at end of file diff --git a/src/Components/benchmarkapps/Wasm.Performance/exec.sh b/src/Components/benchmarkapps/Wasm.Performance/exec.sh new file mode 100644 index 0000000000..bae38ae1e1 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/exec.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +/opt/bin/start-selenium-standalone.sh& +./Wasm.Performance.Driver + diff --git a/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile b/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile new file mode 100644 index 0000000000..b5c7578be8 --- /dev/null +++ b/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile @@ -0,0 +1,7 @@ +FROM selenium/standalone-chrome:3.141.59-mercury as final + +WORKDIR /app +COPY ./Driver/bin/Release/netcoreapp3.1/linux-x64/publish ./ +COPY ./exec.sh ./exec.sh + +ENTRYPOINT [ "bash", "./exec.sh" ] \ No newline at end of file diff --git a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj index ac69ac235a..95b621f8ed 100644 --- a/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj +++ b/src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj @@ -38,7 +38,7 @@ </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Blazor\testassets\Microsoft.AspNetCore.Blazor.E2EPerformance\Microsoft.AspNetCore.Blazor.E2EPerformance.csproj" /> + <ProjectReference Include="..\..\benchmarkapps\Wasm.Performance\TestApp\Wasm.Performance.TestApp.csproj" /> <ProjectReference Include="..\..\Blazor\testassets\HostedInAspNet.Client\HostedInAspNet.Client.csproj" /> <ProjectReference Include="..\..\Blazor\testassets\HostedInAspNet.Server\HostedInAspNet.Server.csproj" /> <ProjectReference Include="..\..\Blazor\testassets\MonoSanityClient\MonoSanityClient.csproj" /> diff --git a/src/Components/test/E2ETest/Tests/PerformanceTest.cs b/src/Components/test/E2ETest/Tests/PerformanceTest.cs index 652226bf26..d5cb01b77c 100644 --- a/src/Components/test/E2ETest/Tests/PerformanceTest.cs +++ b/src/Components/test/E2ETest/Tests/PerformanceTest.cs @@ -13,11 +13,11 @@ using Xunit.Abstractions; namespace Microsoft.AspNetCore.Components.E2ETest.Tests { public class PerformanceTest - : ServerTestBase<DevHostServerFixture<Blazor.E2EPerformance.Program>> + : ServerTestBase<DevHostServerFixture<Wasm.Performance.TestApp.Program>> { public PerformanceTest( BrowserFixture browserFixture, - DevHostServerFixture<Blazor.E2EPerformance.Program> serverFixture, + DevHostServerFixture<Wasm.Performance.TestApp.Program> serverFixture, ITestOutputHelper output) : base(browserFixture, serverFixture, output) { From dd524df6bbf0addee919f9192fa34df8e0547b2b Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Thu, 9 Jan 2020 18:51:21 -0800 Subject: [PATCH 47/64] Application started --- .../Wasm.Performance/Driver/Program.cs | 3 +++ .../Wasm.Performance/benchmarks.compose.json | 25 ++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index 8075d83bdd..99ddc97420 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -37,6 +37,9 @@ namespace Wasm.Performance.Driver } } + // This write is required for the benchmarking infrastructure. + Console.WriteLine("Application started."); + using var browser = await Selenium.CreateBrowser(seleniumPort); using var testApp = StartTestApp(); diff --git a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json index c2e89394ac..9c1aceac94 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json +++ b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json @@ -1,15 +1,16 @@ { - "dependencies": [ - "blazorwasmbenchmark" - ], - "services": { - "blazorwasmbenchmark": { - "source": { - "repository": "https://github.com/aspnet/AspNetCore.git", - "branchOrCommit": "prkrishn/blazor-benchmarking", - "dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile" - }, - "waitForExit": true - } + "dependencies": [ + "blazorwasmbenchmark" + ], + "services": { + "blazorwasmbenchmark": { + "source": { + "repository": "https://github.com/dotnet/AspNetCore.git", + "branchOrCommit": "prkrishn/blazor-benchmarking", + "dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile" + }, + "waitForExit": true, + "readyStateText": "Application started." } + } } \ No newline at end of file From 1e62df1a2da79792092eba5dfa2f3a86a87e3c5e Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Thu, 9 Jan 2020 19:02:28 -0800 Subject: [PATCH 48/64] Try self-contained --- .../Driver/BenchmarkResultsStartup.cs | 6 ++- .../Wasm.Performance/Driver/Program.cs | 39 ++++++++++++++----- .../Wasm.Performance/Driver/Selenium.cs | 30 ++++++++++++-- .../benchmarkapps/Wasm.Performance/README.md | 8 ++-- .../TestApp/wwwroot/benchmarks/index.js | 5 ++- .../benchmarks/lib/minibench/minibench.js | 2 +- .../Wasm.Performance/benchmarks.compose.json | 17 +++++--- .../benchmarkapps/Wasm.Performance/dockerfile | 4 +- .../Wasm.Performance/local.dockerfile | 4 +- .../test/E2ETest/Tests/PerformanceTest.cs | 6 +-- 10 files changed, 85 insertions(+), 36 deletions(-) diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs index 1fa1f067a0..7a4af028df 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResultsStartup.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Text.Json; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -22,12 +23,13 @@ namespace Wasm.Performance.Driver { app.UseCors(); - app.Run(async request => + app.Run(async context => { - var result = await JsonSerializer.DeserializeAsync<List<BenchmarkResult>>(request.Request.Body, new JsonSerializerOptions + var result = await JsonSerializer.DeserializeAsync<List<BenchmarkResult>>(context.Request.Body, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, }); + await context.Response.WriteAsync("OK"); Program.SetBenchmarkResult(result); }); } diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index 99ddc97420..cfaa9cef0f 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.ExceptionServices; @@ -40,8 +39,10 @@ namespace Wasm.Performance.Driver // This write is required for the benchmarking infrastructure. Console.WriteLine("Application started."); - using var browser = await Selenium.CreateBrowser(seleniumPort); + var cancellationToken = new CancellationTokenSource(Timeout); + cancellationToken.Token.Register(() => benchmarkResult.TrySetException(new TimeoutException($"Timed out after {Timeout}"))); + using var browser = await Selenium.CreateBrowser(seleniumPort, cancellationToken.Token); using var testApp = StartTestApp(); using var benchmarkReceiver = StartBenchmarkResultReceiver(); @@ -54,9 +55,6 @@ namespace Wasm.Performance.Driver browser.Url = launchUrl; browser.Navigate(); - var cancellationToken = new CancellationTokenSource(Timeout); - cancellationToken.Token.Register(() => benchmarkResult.TrySetException(new TimeoutException($"Timed out after {Timeout}"))); - var results = await benchmarkResult.Task; FormatAsBenchmarksOutput(results); @@ -96,24 +94,45 @@ namespace Wasm.Performance.Driver output.Metadata.Add(new BenchmarkMetadata { Source = "BlazorWasm", - Name = "Publish size (linked)", - ShortDescription = "Publish size - linked app (MB)", - LongDescription = "Publish size - linked app (MB)", + Name = "Publish size", + ShortDescription = "Publish size (KB)", + LongDescription = "Publish size (KB)", Format = "n2", }); var testAssembly = typeof(TestApp.Startup).Assembly; + var testAssemblyLocation = new FileInfo(testAssembly.Location); var testApp = new DirectoryInfo(Path.Combine( - Path.GetDirectoryName(testAssembly.Location), + testAssemblyLocation.Directory.FullName, testAssembly.GetName().Name)); output.Measurements.Add(new BenchmarkMeasurement { Timestamp = DateTime.UtcNow, - Name = "Publish size (linked)", + Name = "Publish size", Value = GetDirectorySize(testApp) / 1024, }); + output.Metadata.Add(new BenchmarkMetadata + { + Source = "BlazorWasm", + Name = "Publish size (compressed)", + ShortDescription = "Publish size compressed app (KB)", + LongDescription = "Publish size - compressed app (KB)", + Format = "n2", + }); + + var gzip = new FileInfo(Path.Combine( + testAssemblyLocation.Directory.FullName, + $"{testAssembly.GetName().Name}.gzip")); + + output.Measurements.Add(new BenchmarkMeasurement + { + Timestamp = DateTime.UtcNow, + Name = "Publish size (compressed)", + Value = (gzip.Exists ? gzip.Length : 0) / 1024, + }); + Console.WriteLine("#StartJobStatistics"); Console.WriteLine(JsonSerializer.Serialize(output)); Console.WriteLine("#EndJobStatistics"); diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs index 169d3735a1..1c30e69e20 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Selenium.cs @@ -2,8 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Linq; using System.Net; using System.Net.Http; +using System.Threading; using System.Threading.Tasks; using OpenQA.Selenium; using OpenQA.Selenium.Chrome; @@ -14,8 +16,9 @@ namespace Wasm.Performance.Driver class Selenium { static bool RunHeadlessBrowser = true; + static bool PoolForBrowserLogs = true; - private static async ValueTask<Uri> WaitForServerAsync(int port) + private static async ValueTask<Uri> WaitForServerAsync(int port, CancellationToken cancellationToken) { var uri = new UriBuilder("http", "localhost", port, "/wd/hub/").Uri; var httpClient = new HttpClient @@ -34,7 +37,7 @@ namespace Wasm.Performance.Driver retries++; try { - var response = (await httpClient.GetAsync("status")).EnsureSuccessStatusCode(); + var response = (await httpClient.GetAsync("status", cancellationToken)).EnsureSuccessStatusCode(); Console.WriteLine("Connected to Selenium"); return uri; } @@ -52,9 +55,9 @@ namespace Wasm.Performance.Driver throw new Exception($"Unable to connect to selenium-server at {uri}"); } - public static async Task<RemoteWebDriver> CreateBrowser(int port) + public static async Task<RemoteWebDriver> CreateBrowser(int port, CancellationToken cancellationToken) { - var uri = await WaitForServerAsync(port); + var uri = await WaitForServerAsync(port, cancellationToken); var options = new ChromeOptions(); @@ -82,6 +85,25 @@ namespace Wasm.Performance.Driver driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1); + if (PoolForBrowserLogs) + { + // Run in background. + var logs = new RemoteLogs(driver); + _ = Task.Run(async () => + { + while (!cancellationToken.IsCancellationRequested) + { + await Task.Delay(TimeSpan.FromSeconds(3)); + + var consoleLogs = logs.GetLog(LogType.Browser); + foreach (var entry in consoleLogs) + { + Console.WriteLine($"[Browser Log]: {entry.Timestamp}: {entry.Message}"); + } + } + }); + } + return driver; } catch (Exception ex) diff --git a/src/Components/benchmarkapps/Wasm.Performance/README.md b/src/Components/benchmarkapps/Wasm.Performance/README.md index ac0f59e570..9522ecc502 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/README.md +++ b/src/Components/benchmarkapps/Wasm.Performance/README.md @@ -5,7 +5,9 @@ See https://github.com/aspnet/Benchmarks#benchmarks for usage guidance on using ### Running the benchmarks -The TestApp is a regular BlazorWASM project and can be run using `dotnet run`. The Driver is an app that speaks the Benchmark protocol. You generally do not need to run the Driver locally, but if you were to do so, you require docker. Here are the commands you would need to run it locally: +The TestApp is a regular BlazorWASM project and can be run using `dotnet run`. The Driver is an app that connects against an existing Selenium server, and speaks the Benchmark protocol. You generally do not need to run the Driver locally, but if you were to do so, you can either start a selenium-server instance and run using `dotnet run [<selenium-server-port>]` or run it inside a Linux-based docker container. + +Here are the commands you would need to run it locally inside docker: 1. `dotnet publish -c Release -r linux-x64 Driver/Wasm.Performance.Driver.csproj` 2. `docker build -t blazor-local -f ./local.dockerfile . ` @@ -14,5 +16,5 @@ The TestApp is a regular BlazorWASM project and can be run using `dotnet run`. T To run the benchmark app in the Benchmark server, run ``` -dotnet run -- --config aspnetcore/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json --services.blazorwasmbenchmark.endpoints <BenchmarkServerUri> -``` \ No newline at end of file +dotnet run -- --config aspnetcore/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json application.endpoints <BenchmarkServerUri> --scenario blazorwasmbenchmark +``` diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js index 6a1ba57f82..c1690cfac8 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/index.js @@ -1,7 +1,7 @@ import { groups, BenchmarkEvent, onBenchmarkEvent } from './lib/minibench/minibench.js'; import { HtmlUI } from './lib/minibench/minibench.ui.js'; -// import './appStartup.js'; -// import './renderList.js'; +import './appStartup.js'; +import './renderList.js'; import './jsonHandling.js'; new HtmlUI('E2E Performance', '#display'); @@ -21,6 +21,7 @@ if (location.href.indexOf('#automated') !== -1) { break; case BenchmarkEvent.benchmarkCompleted: case BenchmarkEvent.benchmarkError: + console.log(`Completed benchmark ${args.name}`); benchmarksResults.push(args); break; case BenchmarkEvent.runCompleted: diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js index 6d13c56577..241721ceeb 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js @@ -302,7 +302,7 @@ class Group extends EventEmitter { } const groups = []; -let reportBenchmarkEvent; +let reportBenchmarkEvent = () => {}; function group(name, configure) { groups.push(new Group(name)); diff --git a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json index 9c1aceac94..81607364dc 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json +++ b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json @@ -1,16 +1,21 @@ { - "dependencies": [ - "blazorwasmbenchmark" - ], - "services": { + "$schema": "https://raw.githubusercontent.com/aspnet/Benchmarks/master/src/BenchmarksDriver2/benchmarks.schema.json", + "scenarios": { + "blazorwasmbenchmark": { + "application": { + "job": "blazorwasmbenchmark" + } + } + }, + "jobs": { "blazorwasmbenchmark": { "source": { "repository": "https://github.com/dotnet/AspNetCore.git", - "branchOrCommit": "prkrishn/blazor-benchmarking", + "branchOrCommit": "blazor-wasm", "dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile" }, "waitForExit": true, "readyStateText": "Application started." } } -} \ No newline at end of file +} diff --git a/src/Components/benchmarkapps/Wasm.Performance/dockerfile b/src/Components/benchmarkapps/Wasm.Performance/dockerfile index 126c172b9a..69f27a9212 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/dockerfile +++ b/src/Components/benchmarkapps/Wasm.Performance/dockerfile @@ -11,7 +11,7 @@ RUN apt-get update \ nodejs \ git -ARG gitBranch=prkrishn/blazor-benchmarking +ARG gitBranch=blazor-wasm WORKDIR /src ADD https://api.github.com/repos/dotnet/aspnetcore/git/ref/heads/${gitBranch} /aspnetcore.commit @@ -29,4 +29,4 @@ FROM selenium/standalone-chrome:3.141.59-mercury as final COPY --from=build ./app ./ COPY ./exec.sh ./ -ENTRYPOINT [ "bash", "./exec.sh" ] \ No newline at end of file +ENTRYPOINT [ "bash", "./exec.sh" ] diff --git a/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile b/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile index b5c7578be8..188bc5dc5a 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile +++ b/src/Components/benchmarkapps/Wasm.Performance/local.dockerfile @@ -2,6 +2,6 @@ FROM selenium/standalone-chrome:3.141.59-mercury as final WORKDIR /app COPY ./Driver/bin/Release/netcoreapp3.1/linux-x64/publish ./ -COPY ./exec.sh ./exec.sh +COPY ./exec.sh ./ -ENTRYPOINT [ "bash", "./exec.sh" ] \ No newline at end of file +ENTRYPOINT [ "bash", "./exec.sh" ] diff --git a/src/Components/test/E2ETest/Tests/PerformanceTest.cs b/src/Components/test/E2ETest/Tests/PerformanceTest.cs index d5cb01b77c..f7187a4557 100644 --- a/src/Components/test/E2ETest/Tests/PerformanceTest.cs +++ b/src/Components/test/E2ETest/Tests/PerformanceTest.cs @@ -52,10 +52,8 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests () => runAllButton.Displayed || Browser.FindElements(By.CssSelector(".benchmark-error")).Any(), TimeSpan.FromSeconds(60)); - var finishedBenchmarks = Browser.FindElements(By.CssSelector(".benchmark-idle")); - var failedBenchmarks = Browser.FindElements(By.CssSelector(".benchmark-error")); - Assert.NotEmpty(finishedBenchmarks); - Assert.Empty(failedBenchmarks); + Browser.DoesNotExist(By.CssSelector(".benchmark-error")); // no failures + Browser.Exists(By.CssSelector(".benchmark-idle")); // everything's done } } } From e64b8a91ad1a5acea64f7d2a51ac00618ad96876 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson <jacalvar@microsoft.com> Date: Fri, 17 Jan 2020 12:44:30 -0800 Subject: [PATCH 49/64] [Fixes #17014] Add an auth-enabled template for Blazor WASM projects (#18354) * [Fixes #17014] Add an auth-enabled template for Blazor WASM projects * The template enables auth using cookies. * Includes a UserController to return the user claims/data to the user * Includes an IdentityAuthenticationStateProvider that fetches the claims data from the application. * It requires a hosted project. --- eng/Versions.props | 4 + .../BlazorWasm-CSharp.Client.csproj.in | 1 + .../BlazorWasm-CSharp.Server.csproj.in | 17 ++ ...crosoft.AspNetCore.Blazor.Templates.csproj | 10 +- .../.template.config/dotnetcli.host.json | 28 +- .../.template.config/template.json | 181 ++++++++++++ .../.template.config/vs-2017.3.host.json | 24 ++ .../BlazorWasm-CSharp/Client/App.razor | 17 +- .../Client/Pages/FetchData.razor | 6 + .../HostAuthenticationStateProvider.cs | 56 ++++ .../LoginDisplay.IndividualLocalAuth.razor | 12 + .../Client/Shared/MainLayout.Auth.razor | 16 + ...inLayout.razor => MainLayout.NoAuth.razor} | 0 .../BlazorWasm-CSharp/Client/Startup.cs | 7 + .../BlazorWasm-CSharp/Client/_Imports.razor | 3 + .../Client/wwwroot/favicon.ico | Bin 0 -> 32038 bytes .../Identity/Pages/Account/LogOut.cshtml | 15 + .../Pages/Shared/_LoginPartial.cshtml | 27 ++ .../Server/Controllers/UserController.cs | 61 ++++ .../Controllers/WeatherForecastController.cs | 6 + .../Server/Data/ApplicationDbContext.cs | 16 + ...000000000_CreateIdentitySchema.Designer.cs | 270 +++++++++++++++++ .../00000000000000_CreateIdentitySchema.cs | 217 ++++++++++++++ .../ApplicationDbContextModelSnapshot.cs | 268 +++++++++++++++++ ...000000000_CreateIdentitySchema.Designer.cs | 277 ++++++++++++++++++ .../00000000000000_CreateIdentitySchema.cs | 220 ++++++++++++++ .../ApplicationDbContextModelSnapshot.cs | 275 +++++++++++++++++ .../BlazorWasm-CSharp/Server/Startup.cs | 61 +++- .../content/BlazorWasm-CSharp/Server/app.db | Bin 0 -> 106496 bytes .../Server/appsettings.Development.json | 9 + .../BlazorWasm-CSharp/Server/appsettings.json | 19 ++ .../Shared/Authorization/ClaimValue.cs | 18 ++ .../Shared/Authorization/UserInfo.cs | 19 ++ .../test/BlazorWasmTemplateTest.cs | 107 ++++++- 34 files changed, 2256 insertions(+), 11 deletions(-) create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor rename src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/{MainLayout.razor => MainLayout.NoAuth.razor} (100%) create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/favicon.ico create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/app.db create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs diff --git a/eng/Versions.props b/eng/Versions.props index d2e01e6ef5..e1dab327ee 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -204,6 +204,10 @@ <SystemThreadingTasksExtensionsPackageVersion>4.5.2</SystemThreadingTasksExtensionsPackageVersion> <!-- Packages developed by @aspnet, but manually updated as necessary. --> <LibuvPackageVersion>1.10.0</LibuvPackageVersion> + <MicrosoftAspNetCoreIdentityUIPackageVersion>3.1.0</MicrosoftAspNetCoreIdentityUIPackageVersion> + <MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>3.1.0</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion> + <MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>3.1.0</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion> + <MicrosoftAspNetCoreComponentsAuthorizationPackageVersion>3.1.0</MicrosoftAspNetCoreComponentsAuthorizationPackageVersion> <MicrosoftAspNetWebApiClientPackageVersion>5.2.6</MicrosoftAspNetWebApiClientPackageVersion> <!-- Partner teams --> <MicrosoftAzureKeyVaultPackageVersion>2.3.2</MicrosoftAzureKeyVaultPackageVersion> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in index 70927b08e3..3ef13b2f33 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in @@ -10,6 +10,7 @@ <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="${MicrosoftAspNetCoreBlazorBuildPackageVersion}" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="${MicrosoftAspNetCoreBlazorDevServerPackageVersion}" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="${MicrosoftAspNetCoreBlazorHttpClientPackageVersion}" /> + <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="${MicrosoftAspNetCoreComponentsAuthorizationPackageVersion}" Condition="'$(IndividualLocalAuth)' == 'true'" /> </ItemGroup> <!--#if Hosted --> <ItemGroup> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in index 5fe7473679..dd9965626c 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in @@ -13,4 +13,21 @@ <ProjectReference Include="..\Shared\BlazorWasm-CSharp.Shared.csproj" /> </ItemGroup> + <!--#if (IndividualLocalAuth && !UseLocalDB) --> + <ItemGroup> + <None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" /> + </ItemGroup> + + <!--#endif --> + <!--#if (IndividualLocalAuth) --> + <ItemGroup> + <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="${MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion}" /> + <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="${MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion}" /> + <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="${MicrosoftAspNetCoreIdentityUIPackageVersion}" /> + <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerPackageVersion}" Condition="'$(UseLocalDB)' == 'True'" /> + <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition="'$(UseLocalDB)' != 'True'" /> + <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" /> + </ItemGroup> + + <!--#endif --> </Project> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj index 65457a000d..5ae2bfe6ca 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj @@ -20,9 +20,15 @@ MicrosoftAspNetCoreBlazorBuildPackageVersion=$(MicrosoftAspNetCoreBlazorBuildPackageVersion); MicrosoftAspNetCoreBlazorDevServerPackageVersion=$(MicrosoftAspNetCoreBlazorDevServerPackageVersion); MicrosoftAspNetCoreBlazorHttpClientPackageVersion=$(MicrosoftAspNetCoreBlazorHttpClientPackageVersion); - MonoWebAssemblyInteropPackageVersion=$(MonoWebAssemblyInteropPackageVersion); - MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); MicrosoftAspNetCoreBlazorServerPackageVersion=$(MicrosoftAspNetCoreBlazorServerPackageVersion); + MicrosoftAspNetCoreComponentsAuthorizationPackageVersion=$(MicrosoftAspNetCoreComponentsAuthorizationPackageVersion); + MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion); + MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion); + MicrosoftAspNetCoreIdentityUIPackageVersion=$(MicrosoftAspNetCoreIdentityUIPackageVersion); + MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); + MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion); + MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion); + MonoWebAssemblyInteropPackageVersion=$(MonoWebAssemblyInteropPackageVersion); </GeneratedContentProperties> </PropertyGroup> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json index 4e89e1d2dc..38651820f2 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json @@ -5,11 +5,31 @@ "longName": "no-restore", "shortName": "" }, - "Hosted": { - "longName": "hosted" - }, + "Hosted": { + "longName": "hosted" + }, "Framework": { "longName": "framework" + }, + "UseLocalDB": { + "longName": "use-local-db" + }, + "HttpPort": { + "isHidden": true + }, + "HttpsPort": { + "isHidden": true + }, + "ExcludeLaunchSettings": { + "longName": "exclude-launch-settings", + "shortName": "" + }, + "UserSecretsId": { + "isHidden": true + }, + "NoHttps": { + "longName": "no-https", + "shortName": "" } } -} \ No newline at end of file +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json index b6cb64fcec..d2e1735f7e 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json @@ -74,6 +74,82 @@ "exclude": [ "*.sln" ] + }, + { + "condition": "(!IndividualLocalAuth || UseLocalDB)", + "exclude": [ + "Server/app.db" + ] + }, + { + "condition": "(!IndividualLocalAuth)", + "exclude": [ + "Server/Data/SqlLite/**", + "Server/Data/SqlServer/**", + "Server/Data/ApplicationDbContext.cs", + "Server/Areas/**" + ] + }, + { + "condition": "(IndividualLocalAuth && UseLocalDB)", + "rename": { + "Server/Data/SqlServer/": "Server/Data/Migrations/" + }, + "exclude": [ + "Server/Data/SqlLite/**" + ] + }, + { + "condition": "(IndividualLocalAuth && !UseLocalDB)", + "rename": { + "Server/Data/SqlLite/": "Server/Data/Migrations/" + }, + "exclude": [ + "Server/Data/SqlServer/**" + ] + }, + { + "condition": "(NoAuth && Hosted)", + "rename": { + "Client/Shared/MainLayout.NoAuth.razor": "Client/Shared/MainLayout.razor" + }, + "exclude": [ + "Client/Shared/LoginDisplay.*.razor", + "Client/Shared/MainLayout.Auth.razor" + ] + }, + { + "condition": "(!Hosted)", + "rename": { + "Client/Shared/MainLayout.NoAuth.razor": "Shared/MainLayout.razor" + }, + "exclude": [ + "Client/Shared/LoginDisplay.*.razor", + "Client/Shared/MainLayout.Auth.razor" + ] + }, + { + "condition": "(!NoAuth && Hosted)", + "rename": { + "Client/Shared/MainLayout.Auth.razor": "Client/Shared/MainLayout.razor" + }, + "exclude": [ + "Client/Shared/MainLayout.NoAuth.razor" + ] + }, + { + "condition": "(IndividualLocalAuth)", + "rename": { + "Client/Shared/LoginDisplay.IndividualLocalAuth.razor": "Client/Shared/LoginDisplay.razor" + } + }, + { + "condition": "(NoAuth)", + "exclude": [ + "Client/Services/HostAuthenticationStateProvider.cs", + "Server/Controllers/UserController.cs", + "Shared/Authorization/*" + ] } ] } @@ -107,6 +183,111 @@ "datatype": "bool", "defaultValue": "false", "description": "If specified, includes an ASP.NET Core host for the Blazor app." + }, + "auth": { + "type": "parameter", + "datatype": "choice", + "choices": [ + { + "choice": "None", + "description": "No authentication" + }, + { + "choice": "Individual", + "description": "Individual authentication" + } + ], + "defaultValue": "None", + "description": "The type of authentication to use" + }, + "UserSecretsId": { + "type": "parameter", + "datatype": "string", + "replaces": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502", + "defaultValue": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502", + "description": "The ID to use for secrets (use with OrgReadAccess or Individual auth)." + }, + "ExcludeLaunchSettings": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether to exclude launchSettings.json from the generated template." + }, + "HttpPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTP endpoint in launchSettings.json." + }, + "HttpPortGenerated": { + "type": "generated", + "generator": "port" + }, + "HttpPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "HttpPort", + "fallbackVariableName": "HttpPortGenerated" + }, + "replaces": "8080" + }, + "HttpsPort": { + "type": "parameter", + "datatype": "integer", + "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)." + }, + "HttpsPortGenerated": { + "type": "generated", + "generator": "port", + "parameters": { + "low": 44300, + "high": 44399 + } + }, + "HttpsPortReplacer": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "HttpsPort", + "fallbackVariableName": "HttpsPortGenerated" + }, + "replaces": "44300" + }, + "IndividualLocalAuth": { + "type": "computed", + "value": "(auth == \"Individual\")" + }, + "NoAuth": { + "type": "computed", + "value": "(!(IndividualAuth))" + }, + "IndividualAuth": { + "type": "computed", + "value": "(IndividualLocalAuth)" + }, + "RequiresHttps": { + "type": "computed", + "value": "(IndividualAuth || !NoHttps)" + }, + "NoHttps": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth." + }, + "UseLocalDB": { + "type": "parameter", + "datatype": "bool", + "defaultValue": "false", + "description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified." + }, + "copyrightYear": { + "type": "generated", + "generator": "now", + "replaces": "copyrightYear", + "parameters": { + "format": "yyyy" + } } }, "tags": { diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json index 5cb50d10a5..cbed84838b 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json @@ -18,6 +18,30 @@ "additionalWizardParameters": { "$isMultiProjectTemplate$": "true" }, + "supportedAuthentications": [ + { + "auth": "None", + "authenticationType": "NoAuth", + "allowUnsecured": true + }, + { + "auth": "Individual", + "authenticationType": "IndividualAuth", + "b2cAuthenticationOptions": "Local" + } + ], + "ports": [ + { + "name": "HttpPort", + "useHttps": false + }, + { + "name": "HttpsPort", + "useHttps": true + } + ], + "excludeLaunchSettings": false, + "disableHttpsSymbol": "NoHttps", "symbolInfo": [ { "id": "Hosted", diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor index 1c360b7121..7b58ea096f 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor @@ -1,4 +1,5 @@ -<Router AppAssembly="@typeof(Program).Assembly"> +@*#if (NoAuth) +<Router AppAssembly="@typeof(Program).Assembly"> <Found Context="routeData"> <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> </Found> @@ -8,3 +9,17 @@ </LayoutView> </NotFound> </Router> +#else +<CascadingAuthenticationState> + <Router AppAssembly="@typeof(Program).Assembly"> + <Found Context="routeData"> + <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> + </Found> + <NotFound> + <LayoutView Layout="@typeof(MainLayout)"> + <p>Sorry, there's nothing at this address.</p> + </LayoutView> + </NotFound> + </Router> +</CascadingAuthenticationState> +#endif*@ diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor index 0faf18fefd..99cda40a53 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor @@ -1,7 +1,13 @@ @page "/fetchdata" +@*#if (!NoAuth) +@using Microsoft.AspNetCore.Authorization +#endif*@ @*#if (Hosted) @using BlazorWasm_CSharp.Shared #endif*@ +@*#if (!NoAuth) +@attribute [Authorize] +#endif*@ @inject HttpClient Http <h1>Weather forecast</h1> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs new file mode 100644 index 0000000000..efb2cd636d --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs @@ -0,0 +1,56 @@ +using BlazorWasm_CSharp.Shared.Authorization; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Authorization; +using System.Net.Http; +using System.Security.Claims; +using System.Threading.Tasks; + +namespace BlazorWasm_CSharp.Client +{ + public class HostAuthenticationStateProvider : AuthenticationStateProvider + { + private readonly HttpClient _client; + private ClaimsPrincipal _currentUser; + + public HostAuthenticationStateProvider(HttpClient client) + { + _client = client; + } + + public override async Task<AuthenticationState> GetAuthenticationStateAsync() + { + if (_currentUser == null) + { + await FetchUser(); + } + + return new AuthenticationState(_currentUser); + } + + private async Task FetchUser() + { + var user = await _client.GetJsonAsync<UserInfo>("User"); + + if (!user.IsAuthenticated) + { + _currentUser = new ClaimsPrincipal(new ClaimsIdentity()); + return; + } + + var identity = new ClaimsIdentity( + nameof(HostAuthenticationStateProvider), + user.NameClaimType, + user.RoleClaimType); + + if (user.Claims != null) + { + foreach (var claim in user.Claims) + { + identity.AddClaim(new Claim(claim.Type, claim.Value)); + } + } + + _currentUser = new ClaimsPrincipal(identity); + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor new file mode 100644 index 0000000000..25f9db264b --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor @@ -0,0 +1,12 @@ +<AuthorizeView> + <Authorized> + <a href="Identity/Account/Manage">Hello, @context.User.Identity.Name!</a> + <form method="post" action="Identity/Account/LogOut"> + <button type="submit" class="nav-link btn btn-link">Log out</button> + </form> + </Authorized> + <NotAuthorized> + <a href="Identity/Account/Register">Register</a> + <a href="Identity/Account/Login">Log in</a> + </NotAuthorized> +</AuthorizeView> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor new file mode 100644 index 0000000000..fafa2f55f1 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor @@ -0,0 +1,16 @@ +@inherits LayoutComponentBase + +<div class="sidebar"> + <NavMenu /> +</div> + +<div class="main"> + <div class="top-row px-4 auth"> + <LoginDisplay /> + <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> + </div> + + <div class="content px-4"> + @Body + </div> +</div> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.NoAuth.razor similarity index 100% rename from src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.NoAuth.razor diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs index b30f14ae06..38fd10a30e 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs @@ -1,3 +1,6 @@ +#if (!NoAuth) +using Microsoft.AspNetCore.Components.Authorization; +#endif using Microsoft.AspNetCore.Components.Builder; using Microsoft.Extensions.DependencyInjection; @@ -11,6 +14,10 @@ namespace BlazorWasm_CSharp { public void ConfigureServices(IServiceCollection services) { +#if (IndividualLocalAuth) + services.AddAuthorizationCore(); + services.AddSingleton<AuthenticationStateProvider, HostAuthenticationStateProvider>(); +#endif } public void Configure(IComponentsApplicationBuilder app) diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor index 912a5070c2..fa501010b9 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor @@ -1,4 +1,7 @@ @using System.Net.Http +@*#if (!NoAuth) +@using Microsoft.AspNetCore.Components.Authorization +#endif*@ @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/favicon.ico b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a3a799985c43bc7309d701b2cad129023377dc71 GIT binary patch literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85<eW@6XRp%jD>=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$Q<HOixSl<aTM__jl4#^thzg zR%8kDj}7!lG~6zIy}i=c(}UmYmfr3z>Fr9nP<Q2WYG!6yx=!tqj{N(it>g(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadTLUpCk;$ZPRRJ^sMOch;rlbvUGc1R9=u;dr9YANbQ<4Z z#P|Cp9BP$FXNPolgyr1XGt$^lFPF}rmBF5rj1Kh5%dforrP<k8>8W}_qJ<Ai`=Ou7 z`ue&ogWfUli9DMc8&O<H4|y`$*Ck6>L$2qMBS-#%-|s#BPZBSETsn_EBYcr(W5dq( z@f%}<eeQ3J;Ww5b2VCRhCywj)`%eE_;>C|iN7)YN`^)<MX{;gTi@1yp^{2@b;(+g` zAt&imr^?OutN&RNC7A!n)B63jwKbWao5ecJ%hKY!EZ~|jkF}#Ltw6^3x5~;&{eFM- zi;^sTLgE!Ky7P}i#{58fMnFeDcsGT0=<Dl~`uh4mC;g*M#nOM~MM+)Qlk@xhE}^NZ zQ9_}Rw6?bH#)oeiA0L;6g#`s(=X#N*<>h7R?Cg}Do*w-!zwZb9=BMp%Wsh@nb22hA zA{`wa8Q;yz6S)zfo%sl08^GF`9csI9BlGnEy#0^Y3b);M+n<(}6jziM7nhe57a1rj zC@(2ISYBL^UtWChKzVWgf%4LW2Tqg_^7jMw`C$KvU+mcakFjV(BGAW9g%CzSyM;Df z143=mq0oxaK-H;o>F<Rt1N8OKCQyfy(wj_3Pa+10N>3~zJ<(3-j&?|QBn)WJfP#JR zRuA;`N?L83wQt78QIA$(Z)lGQY9r^SFal;LB^qi`8%8@y+mwcGsf~nv)bBy2S7z~9 z=;X@Gglk)^jpbNz?1;`!J3QUfAOp4U$Uxm5>92iT`mek#$>s`)M>;e4<M8Hm<td$i zo%63^{uMj_JZyl2H|=@`4jvvW(-Ts0+?#)(Zm%@H_UF>{#%HAAcb^8_Ax%ersk|}# z0bd;ZPu|2}18KtvmIo8`1@H~@2ejwo(5rFS`Z4&O{$$+ch2hC0=06Jh`@p+p8LZzY z&2M~8T6X^*X?yQ$3N5EzRv$(FtSxhW>>ABUyp!{<Wz0W0IwJGaQ;Ngf)HrbH_i%t+ zRbG%E4pf{tRz1*<`LTY34f{a*UrA^`{Keb<8-DNe(tP~azWFT<h7USFe1h^|)$m|) zY*glF%>484f8(%C1_y)3D%Qgfl_!sz`LTXOjR&L!zPA0qH_iNS!tY{!^2WfD%uT}P zI<~&?@&))5&hPPHVRl9);TPO>@UI2d!^ksb!$9T96V(F){puTsn(}qt_WXNw4VvHj zf;6A_XCvE`Z@}E-IOaG0rs>K>^=Sr&OgT_p;F@v0VCN0Y$r|Lw1?Wjt`AKK~RT*kJ z2>QPuVgLNcF+XKn<s0*3P3iB*gT^a0vIzTZU|trn2Uv9c3Hh)9f3g4{&h?nbULpvN z96n^`Pp`^wOQE#w`Lc8replMCXK8)sOVV=kx5^vt9Vp{-(Alv;%nuxzF#i;MKYb4U zzQV*feDk<Wj*l6DJWwXMCX~$yAMpLrvcuJb0|Uy(;g%w4-TgPxaq!#HhPhjz2Q4Rm zgZUv_3Y>o;WBv$yj@d_WFJbl*#*V_Cwzo@%3n5%z4g21G*PVZ)wM5$A{klYozmGlB zT@u2+s}=f}25%IA!yNcXUr!!1)z(Nqbhojg0lv@7@0UlvUMT)*r;M$d0-t)Z?<y`V ztR5U35HLVSIse|TN~8$;o%g;jAzZhXzwF3Z8snPGVLi>B1@qQk()o!4fqvfr_I0r7 zy1(NdkHEj#Yu{K>T#We#b#FD=c1XhS{hdTh9+8gy-vkcdkk*QS@y(xxEMb1w6z<^~ zYcETGfB#ibR#ql0EiD;PR$L&Vrh2uRv5t_$;NxC;>7_S5_OXxsi8udY3BUUdi55Sk zcyKM+PQ9YMA%D1kH1q48OFG(Gbl=FmV;yk8o>k%0$rJ8%-IYsHclnYuTskka<HNc) zw7%ikv18A{=YN3n^EKXnL?Q>iCGkUlkMY~mx&K}XRlKIW;odWIeuKjtbc^8bBOTqK zjj(ot`_j?A6y_h%vxE9o*ntx#PGrnK7AljD_r58ylE<WT-@UlL8}x(!oZA8J5zU^H z^A9LLlqc{rSK**`!q^J#O?mF{`>*oy@{IY%+mA^!|2vW_`>`aC{#3`#3;D_$^S^cM zRcF+uTO2sICledvFgNMU@A%M)%8JbSLq{dD|2|2Sg8vvh_uV6*Q?F&rKaV{v_qz&y z`f;stIb?Cb2!Cg7CG91Bhu@D@RaIrq-+o+T2fwFu#|j>lD6ZS9-t^5cx>p|?flqUA z;Cgs#V)O#`Aw4$Kr)L5?|7f4izl!;n0jux}tEW$&&YB<mKXAV!4?lsqzpK~nm2X@% zznz;rn1?^*{QmQRy*7FZTn2bH>Xz9o{+~HhoiYDJ`w5BVTl&ARya=M7zdy$FE<n#M zl!>e}iGBur8XE>rhLj&_yDk5D4n2GJZ07u7%zyAfNtOLn;)M?h*Py-Xtql5a<V_m; zgjM+PrKKg|+4S7GbD8ri{bv3|(WAftcJSQ3j463m3!*jX9@l3SwsIJ9$n(_<d<V}- zdM?8m`TY6woc|B3{h0`#lz73zk}Uaq<w4i6rzBQ)?7HUX-1c18+m(<moCSvAXLye5 zh5c`8YLaL)x*b1$i#PuXiRV8kiNc2^j&+D1gdfb}|5oTH&30~%=gw3MWL>JOtL4<G zQ+geX#i}{CfBuEhxKIYkhY836$5h(|e8hWgX@2-7&O3^caOQNC+RsJA9=Z|lz!|j~ zzv!M%E&bjs-ql8b^FEb%#q+R*m6a8_c=4j1p}V@eu9_R)yao8k1Y%7=kV>U8e|!t? z((sc6&OJXrPdVef^wZV&x=Z&~uA7^ix8rly^rEj?#d&~pQ{HN8Yq|fZ#*bXn-26P^ z5!)xRzYO9{u6vx5@q_{FE4#7BipS#{&J7*>y}lTyV94}dfE%Yk>@@pDe&F7J09<pd zBG-35{NWG(mj@qs;K5x_@BH1ar=NZmqYF>(-0|wuI|$of-MRfK51#t@t2+U|*s=W; z!Y&t{dS%!4VEEi$efA!#<<7&04?kB}Soprd8*jYv;-Qj~h~4v>{XX~kjF+@Z7<<HU zYqNw~nxvi3+#u~u4m8wBdt;r18fqQ5f-wkc<;fra!=7j)qI)jCZL`;m=MLi>t?^|i z#>_ag2i-CRAM8Ret^rZt*^K?`G|o>1o(mLkewxyA)38k93`<~4VFI?5VB!kBh%NNU zxb8K(^-MU1ImWQxG~nFB-Un;6n{lQz_FfsW9^H$Xcn{;+W^ZcG$0qLM#eNV=vGE@# z1~k&!h4@T|IiI<47@pS|i?Qcl=XZJL#$JKve;booMqDUYY{(xcdj6STDE=n?;fsS1 ze`h~Q{CT$K{+{t+#*I1=&&-UU8M&}AwAxD-rMa=e!{0gQXP@6azBq9(ji11uJF%@5 zCvV`#*?;ZguQ7o|nH%bm*s&jLej#@B35gy32Z<i}p+w67N1l-O`bz9E2Q&Prl{J&c zFtWxN6yt(CUz#|WFBayHKRA5RSe_Guv1?%CbBu>AE0`Pz@#j6R&kN5w{O4~1rhDoU zEBdU)%Nl?8zi|DR((u|gg~r$aLYmGMyK%FO*qLvwxK5+cn*`;O`16c!&&XT{$j~5k zXb^fbh<puUpgSc4h;a^JPcx88NIwB_wZ3>1GT-CI*Nj{-?r7HNg=e3E{6rxuluPXY z5Nm8ktc$o4-^SO0|Es_sp!A$8GVwOX+%)cH<;=u#R#nz;7QsHl;J@a{5NUAmAHq4D zIU5@jT!h?kUp|g~iN*!>jM6K!W5ar0v~fWrSHK@})@6Lh#h<Y-#lOkKs1PG-dHahJ zM$9B!@NH=agbTkTEj7nH{j+*#V~1D+#UC`_oFZ}Me`Xv{@kczB_^%*-rLiN#^HvZC zW(<sHDV`^1p=WbA*Ya%3^OlV(W{)pCXZUY^cUfk7fj?qhj5jjg$(WPI9Nz{#c;9@! z)Zp*vi`o)@{L|5U;-82?ew;X@(E~@0um(f0$%}}ESvgw3SzYA_xsriy$PoeZL|V8W z{@A2<JtHqX_pFg0#+X+jKYhgiuT=-g|90fanqL15WCybU=I0>)C6F6@)&-+C3(zO! z8+kV|B7LctM3DpI*~EYo>vCj>_?x&H;>y0*vKwE<xtH<PVcLDjlozY_*>0?vi$CLt zfSJB##P|M2dEUDBPKW=9cY-F;L;h3Fs4E<eJzSD0o_jT(!I%bYf7s+A4F4S&vU&{u zGbX8LWQ`N}<B$_Fk65OWB{ME!ZERdNV}zY};koB_$6`_N2)YHB>2ERdN#NSL7ctAC z?-}_a{*L@GA7JHJudx<WJi9vaTgF5Z9j)pgxL;;`&B{@bE%JPV^=rl!1jcq@Z#B+K zI|2CR^UoXk0q$!Sf5ta~Z|k1Fh3?+3@pjdRw-9@${9~P5058{|`@~;!oxq)E`a}o( z8TJsw+Xa=SEL)22TOOnx8*XCLjxTj%)P9=0>tDVA{K5Y<t}S3@pcVZ8Th-w<@*n!! z{5Iw1^Pc<=f6hypBmP*AsZr+1oqVnGKO_xxS8yg@lnLzHXK^lHLXLT2Y)od6$6zjW z9C6|q#F-b7CmbIcmKp4m7BvnvBs0jtGR{3Vggi9%Ow@12rlw(+%(c0Xy{wTRCzd-q z*e0R(?n0dVtJ1#zZi$pWqOotrym_zr!eLj|ROWD&A`Mex27eRR=>h*k(%#x4W7w+^ zcb-+ofbT5ieG+@QG2lx&7!MyE2JWDP@$k`M;0`*d+oQmJ2A^de!3c53HFcfW_Wtv< zKghQ;*FifmI}kE4dc@1y-u<d{7CivIL!OYgVGO<b{2`UIHP{i#n~qoq@_&@^AO(Z} z#dBx%d`SP8OeFNo#JyrN5tr_+l*A&Pl8ncsJC&4ZX9w(URJxP6hTSsP33H9_bi)@% zu_vKVG}rhHu7CFAlP>;@qs|V75Z^|Q0l0?teobTE8t<n*L#~=H98x(W?vyu^e<1&d zVCNt|KKw6VydWvylS1AzNdOH7;z|Q?cL6+10ul;Q-^lCSu>Gl@EB?k#q_wUjypJ*R zyEI=DJ^Z+d*&}B_xoWvs27LtH7972qqMxVFcX9}c&JbeNCXUZM0`nQIkf&C}&skSt z^9fw@b^Hb)!^hE2IJq~~GktG#ZWwWG<`@V&ckVR&r=JAO4YniJewVcG`HF;59}=bf zLyz0uxf6MhuSyH#-^!ZbHxYl<XIQZKGrvIGxelxgp{*E!yiZR}IrSkt->^mmBVrx) zyrb8sQ*qBd_WXm9c~Of$&ZP$b^)<~0%nt#7<SN=BJIqx?5B)&%HI%7#(A9E*{D)1a zzF<__h-;n;xMv$>y$1Jg$e}WCK>TeUB{P>|b1FAB?%K7>;XiOfd}JQ`|IP#Vf%kVy zXa4;XFZ+>n;F>uX&3|4zqWK2u3c<>q;tzjsb1;d{u;L$-hq3qe@82(ob<3qom#%`+ z;vzYAs7TIMl_O75BXu|r`Qhc4UT*vN$3Oo0kAC!{f2#HexDy|qUpgTF;k{o6|L>7l z=?`=*LXaow1o;o<tE{OE(?2=<A4MF}#OA>NNLXsGTrvC)$R&{m=94Tf+2iTT3Y_Or z-!;^0a{kyWtO4vksG_3cyc7HQ0~detf0+2+qxq(e1NS251N}w5iTSrM)`0p8rem!j zZ<hbA{CN2H;rvl^?u=Z#a9)8m2_BTo>56hGD=pHI*B+dd)2B`%|9f0goozCSeXPw3 z+58k~sI02Yz#lOneJzYcG)EB0|F+ggC6D|B`6}d0khAK<z1EteZqA7EX64Ap4|63J zj4Um~{}W6Oi8&OL<FvV6o6oW%_Z}v%WpZ1@U(esz>-gz7U3EGT|M_9$ZINqZjwf>P zJCZ=ogSoE`=yV5YXrcTQZx@Un(64*AlLiyxWnCJ9I<5Nc*eK6eV1Mk}ci0*NrJ=t| zCXuJG`#7GBbPceFtFEpl{(lTm`LX=B_!H+&<jfTRckhNg0e{@1{I9PYT{krFIt@FQ zg+FwG^sp{Y@uzMp4aUaWbr@wX&jIfL%sQAoAlG7w_&aAJ|2mvGb0(1gMt;7hdCnN> z>$*<vlz7PxQ0w-nB#-=5Lba8aRA*erxDLBLmXZInYq6sEvo_D#CSM*dTb3*>Hf}}y zkt@nLXFG9%v**s{z&{H4e?aq<G31K6PCl)5elgO3{9)UrlZrQaZ(c^0v}TWI7z^P2 zsLTIFwM(SQ+9#ebDO2=!Tnny)T?^fZ19!?2&qc&PopnY%cm7<U{45MZe<3%K{ohhL zm~)LF=iB)n^a1x;FCKO9wu8Z+e$vIAGyqou>p%&l#oU8lxUxk2o%K+?aAe6jLojA& z_|J0<-%u^<;NT*%4)n2-OdqfctSl6iCHE?W_Q2zpJken#_xUJlidzs249H=b#g z?}L4-Tnp6)t_5X?_$v)vz`s9@^BME2X@w<>sKZ3=B{%*B$T5Nj%6!-Hr;I!Scj`lH z&2dHFlOISwWJ&S2vf~@I4i~(0*T%OFiuX|eD*nd2utS4$1_JM?zmp>a#CsVy6Er^z zeNNZZDE?R3pM?>~e?H_N`C`hy%m4jb;6L#8=a7l>3eJS2LGgEUxsau-Yh9l~o7=Yh z2mYg3`m5*3Ik|lKQf~euzZlCWzaN&=vHuHtOwK!2@W6)hqq$Zm|7`Nmu%9^F6UH?+ z@2ii+=iJ;ZzhiUKu$QB()nKk3FooI>Jr_IjzY6=qxYy;&mvi7BlQ?t4kRjIhb|2q? zd^K~{-^cxjVSj?<hi6;nFqt>!Xs=Da5IHmFzRj!Kzh~b!?`P7c&T9s77VLYB?8_?F zauM^)p;qFG!9PHLfIsnt43UnmV?Wn?Ki7aXSosgq;f?MYUuSIYwOn(5vWhb{f%$pn z4ySN-z}_%7|B);A@PA5k*7kkdr4xZ@s{e9j+9w<CJ?O>;*RFm;XPDQwx%~;8i<oa^ zexLQs#C;Swe&jxL;2)Pn5quSD44CilIrSXYU_0#4b{VXBL&8lp8{)5e>BzSKTIGKO z{53ZZU*OLr@S5=k;?CM^i#zkxs3Sj%z0U`L%q`qM+t<Pf&d|V}H3F<zNPq^dnLw>P zX$aL;*^g$7<Ue(mJhn9?_FDN)+hp<2y0&!%%(W5co>UyM2Go+_4A+f)IQcy^G$h2E zb?nT$<GLCMXx=#+f8x!0hdAV2X~A_&-#?U7{;x-VC^O92Wb?eSzE+S6RX|=;&pC$< z9g@=0Qq9>XlgTEFJI8GN6NQf%-eVn9mPilRqUbT$pN-|;FEjq@Ao&TxpZg=mEgBHB zU@grU;&sfmqlO=6|G3sU;7t8rbK$?X0y_v9$^{X`m4jZ_BR|B|@?ZCLSPPEzz`w1n zP5nA;4(kQFKm%$enjkkBxM%Y}2si&d|62L)U(dCzCGn56HN+i#6|nV-TGIo0;W;`( zW-y=1KF4dp$$mC_|6}pbb>IHoKQeZajXQB>jVR?u`R>%l1o54?6NnS*arpVopdEF; zeC5J3*M0p`*8lif;!irrcjC?(uExejsi~>4wKYwstGY^N@KY}TujLx`S=Cu+T=!dx zKWlPm->I**E{A*q-Z^FFT5$G%7Ij0_*Mo4-y6~RmyTzUB&l<K=Dpmb{^4-!94u`ca zdNVoO>fae(WZfO>um}mnsDXPEbau-!13!!xd!qh*{C)6&bz0j1I{>y$D-S)b*)J<Y zxc^5t3qJV45B`taZ@>MCPk!=~KL&6Ngin0p6MCOxF2L_R9t8N!$2Wpced<#`y!F;w zKTi5V_kX&X09wAIJ#anfg9Dhn0s7(C6Nj3S-mVn(i|C6ZAV<aixb6h<Sg0H6jw4qU zV~?Bz5!)*lmM-iqJqY1C7nsj&+qP{N{V-~a1^op#4Sw~jUm=fL>q0$hE)874co};g z^hR7pe4lU$P;*ggYc4o&UTQC%liCXooIfkI3TNaBV%t~FRr}yHu7kjQ2J*3;e%;iW zvDVCh8=G80KAeyhCuY2LjrC!Od1rvF7h}zszxGV)&!)6ChP5WAjv-zQAMNJIG!JHS zwl?pLxC-V5II#(hQ`<T9_no>l)ZAp&M0xd4%cxmco*MIk?{BD=BK`1vpc}D39|XlV z{c&0oGdDa~TL2FT4lh=~1NL5O-P~0?V2#ie`v^CnANfGUM!b4F=JkCwd7Q`c8Na2q zJGQQk^?6w}Vg9-{|2047((lAV84uN%sK!N2?V(!_1{{<Jh_kyRt}|;t96pc-^Er3` zo}iC2gMPObPU{|m=x2|p6X&-wXJt%zkSPP3@xa!}dGs%8Jc%(S1BMS)CX6g%9UNV- z>v6rdgZl56f0zDMQ+q)jKzzu^ztsVken;=DjAh6G`Cw`Q4G+BjS+n*=KI~^K{W=%t zbD-rN)O4|*Q~@<#@1Vx$E!0W9`B~IZeFn87sHMXD>$M%|Bh93rdGf1lKo<R02YmTL zqhr<%m_BFM7Fa&y947^SQ}y4{ZAaF|G`@C+sh521)5?cN^cOe0_9@gH-Y$)(pJd(P z_1X@lpSgXfMnLNXGU%rcETRu24v0w?{GLKAA}IoVUkW|qDfm7YI>X3K651t&nhsl= zXxG|%@8}Bbrlp_u#t*DZX<}_0Yb{A9*1Pd_)LtqNwy6xT4pZrOY{s?N4)pPwT(i#y zT%`lRi8U#Ken4fw>H+N`{f#FF<O6FlgJ{<Kj?Q@Wliwb+>?ZxFlLZg7z7#cr4X>id z{9kUD`d2=w_Zlb{^c`5IOxWCZ1k<0T1D1Z31IU0Q2edsZ1K0xv$pQVYq2KEp&#v#Z z?{m@Lin;*S<!No<o1d3X^w>tr(C2sfF^L>{R3cjY`~#)m>Wm$Y|1fzeS0-$(Q^z@} zEO*vlb-<?wRtMA$a{Uv^+e}~R^M`&pP`_w=4t2sW50+lDC-HjPUHYxxaYn6a!kV+c zpX(pPb74a0@ugg}?EV6381FQ7Pgs9Tw;k1Ys~vUZ0Q%wWr;HEDO@F2gSo*u52fF@{ z0q%z~Y=K`6U=z3xA^l!GtVgeR&-iJVe)8J~tTk;$y|}FzXPtY??k~a~!Uo`(3(c&V z#ovwmXW9;9NBlZr@{{g90y1FeXN>^XK9>w&Ef^=Zzo-1AFSP#9zb~X5_+){$(eB4K z8gtW+nl{q+CTh+>v(gWrsP^DB*ge(~Q$AGxJ-eYc1isti%$%nM<_&Ev?%|??PK`$p z{f-PM{Ym8k<$$)(F9)tqz<CJIAM$L1BM%w-GTk@RUOM3L%cGxlX&$hqjP-p4?g8S* zf2wthE%1v3ttI8(g6O9&p&r4WTH3u4^(Uy`C@Z$~Z!QCFO|beXXOCj#AWIfZKZ&zf zwlZ<mX#YOv`9G~&1pUsa&k{hbqt<3(t(AT}<AbzwZ(!($j*x!R8U(=C*57b6bs&@n z(qG`LzmNXS_5(h-GP;nxKcZc<fIT|*=|N!k@%Sua0Na&@Ec*Fei5AudgZ5_Zb=dRL zy5~!dP56w~t?J)Mzt3*i+F{ENmwwIvn;HPhLRoR4kA5Ey0`~*<Tu44!-QpM^3mNiY zd69ec=!ec>FJ?h&Dk<xHrU>@D?Dt{4CHKJWLs8$zy6+(R)pr@0ur)xY{=uXFFzH_> z-F^tN1y(2hG8V)GpDg%wW0Px_ep~nIjD~*HCSxDi0y`H!`V*~RHs^uQsb1*bK<T$Q z`bO#l_@MP@_8AMlIwG!r58^)LK@V~`<U<c)KlBAULJoQm1LD58CzVp$)XfpU%erPW z8sA`jr0x}Uuf#ng_s;N@pg(vtd+S{Ehw)4s))#8cIdmaez5{i`_h`*|+aA>1qGpmd zB1m`Cjw0`nLBF2|umz+a#2X$c?Lj;M?Lj;MUp*d>7j~ayNAyj@SLpeH`)BgRH}byy zyQSat!;U{@O(<<2fp&oQkIy$z`_CQ-)O@RN;QD9T4y|wIJ^%U#(BF%=`i49}j!D-) zkOwPSJaG03SMkE~BzW}b_v>LA&y)EEYO6sbdnTX*$>UF|JhZ&^MSb4}Tgbne_4n+C zwI8<r-Iaf>U4i~PI>7a3{kVa8<kbN6eyGEHKpnx06E+}DNbur?yk^WW2oOhPEHMzw z=X22?2K^zfKk0w-3x<B|f7Kqq?vehsJ&ym&vK>|))*%C0|K+bIbmV~a`|G#+`TU#g zXW;bWIcWsQi9c4X*RUDpIfyoPY)2bI-r9)xulm1CJDkQd6u+f)_N=w1ElgEBjprPF z3o?Ly0RVeY_{<?)|7`m4UeEKeU77W{UX5;9iATSc1JZBhfY1KP&`I@+zH<_On{%uq zN9diKefHP4moxi1V~=fpz8!PYj~a2-Rue*yfn@o1>3~fPVckRMxe2lM8hj!B8F)JO z!`AP6>u>5Y&3o9t0QxBpN<VbL&~J6p@r$}YA`b%i;P8Su%#HYA>E=lJx#NyIbp1gD zzUYBIPYHIv9ngk-Zt~<)62^1Zs1LLYMh@_tP^I7EX-9)Ed0^@y{k65Gp0KRcTmMWw zU|+)qx{#q0SL+4q?Q`i0>COIIF8a0Cf&C`hbMj?LmG9K&iW-?PJt*u)38tTXAP>@R zZL6uH^!RYNq$p>PKz7f-zvg>OKXcZ8h!%Vo@{VUZp|+iUD_xb(N~G|6c#oQK^nHZU zKg#F6<)+`rf~k*Xjjye<Hud7yLjT^qdxgMfvTOvezVxCTF3Oif0G_WIV`7|<P~nWc ze(AR_33^2C!`bid4}IuE|D80@5BovapS?PO_T6`4{db`M<z8uj=gZLlJGJM6&pb2V z_4I~1<lonN^!s_xCx=V%oYNfrBiZ*!d-lDc_piSEqKx(?Wdva3^UN8rzr^2Ta=Q97 zbMnl0{t<JZx`tWn&mJE>+syV{bwU2glMMMs-^ss4`bYaVroXzn`YQUd__UlZL_mLs z(vO}k!~(mi|L+(5&;>r<;|OHnbXBE78LruP;{yBxZ6y7K3)nMo-{6PCI7gQi6+rF_ zkPod!Z8n}q46ykrlQS|hVB<q)&YlUNAEf(Uu_DAf!GkDzUD%_;=Nj{#_Uqt1dtf5y z;SZ7>(}(2Kf7BCZ>Vc;V>ccbk2~NGaf6wGQH@W9&?Zt3v(h*P4xDrN>ex7+jH*+Qg z%^jH$&+*!v{sQ!xkWN4+>|b}qGvEd6ANzgqoVy5Qfws}ef2QqF{iiR5{pT}PS&yjo z>lron#va-p=v;m>WB+XVz|o;UJFdjo5_!RRD|6W{4}A2a#bZ<YY5zOXFUQ`X@ZP(W z{s{U%j85F8y<6<33tE5Ak68a_c;MC|yL{ktG|gVY^ADbn^!84m*MEMxiVt3lk+CKA zNb%h3<?@Xjs4RdF=h6F?ZU20tua_~bKYP8{-xA*Y4e7!9EB(0Udp_^a`hUOO;5Gl# z5jHhr?F00{?z@eCP$vBJ+iSab%;E!Oz$Xi%DibEYrm<#?yF0OWCss@zphsqN`q5Lu zz8>v)gS_`b|KsSH)Sd_JIr%<%n06TX&t{&!H#{)?4W9hlJ`R1>FyugOh3=D_{einr zu(Wf`qTkvED+gEULO0I*Hs%f;&=`=X4;N8Ovf28x$A*11`dmfy2=$+PNqX>XcG`h% zJY&A6@&)*WT^rC(Caj}2+|X|6cICm5h0OK0cGB_!wEKFZJU)OQ+TZ1q2bTx9hxnq& z$9ee|f9|0M^)#E&Pr4)f?o&DMM4w>Ksb{hF(0|wh+5_{vPow{V%TFzU2za&gjttNi zIyR9qA56dX52Qbv2aY^g`U7R43-p`#sO1A=K<Q;83+yZ2l>S2aKgfR+Yu^bQ*i-qu z%0mP;Ap)B~zZgO9lG^`325gOf?iUHF{~7jyGC)3L(eL(SQ70VzR~wLN18tnx(Cz2~ zctBl1kI)wAe+cxWHw*NW-d;=pd+>+wd$a@GBju*wFvabSaP<Ja6qEsn*3Id6d4Rqr z^l|y<AEzB~*WX9~0M>tHiT!o#QFC+wBVwYo3s=y;z1jM+M=Fj!FZM>UzpL-eZzOT( zhmZmEfWa=%KE#V3-ZK5#v!Hz<pvTgWaXk$=0q8wlZ_?`kYW{7!0CX>d{zc^{ctF~- z>DT-U`}5!fk$aj24`#uGdB7r`>oX5tU|d*b|N3V1lXmv%MGrvE(dXG)^-J*LA>$LE z7kut4`zE)v{@Op|(|@i#c>tM!12FQh?}PfA0`Bp%=%*RiXVzLDXnXtE@4B)5uR}a> zbNU}q+712pIrM`k^odG8dKtG$zwHmQI^c}tfjx5?egx3!e%JRm_64e+>`Ra1IRfLb z1KQ`SxmH{cZfyVS5m(&`{V}Y4j6J{b17`h6KWqZ&hfc(<m44z)dfXB6&vU2slR>oR zxM%w!$F(mKy05kY&lco3%zvLCxBW+t*rxO+i=qGMvobx0-<7`VUu)ka`){=ew+Ovt zg%52_{&UbkUA8aJPWsk)gYWV4`dnxI%s?7^fGpq{ZQuu=VH{-t7w~K%_E<8`zS;V- zKTho*>;UQQul^1GT^HCt@I-q?)&4!QDgBndn?3sNKYKCQFU4LGKJ$n@Je$&w9@E$X z^p@iJ(v<nWs((bE+M|w5L=Us_;lY2i^s{%yg6)%J4-lXC#CZGW^gpJ(s_ajV?!O=O z|C7?MHi32l&s(N{*pmI<M2@dV_Wj@S_qE!d#UR?*C(6D*_Cak*KlNXGMIrBy1N}FN z@XUh*`bF7$*>&`1(tq~1zc>0Vow-KR&vm!GUzT?Eqgnc)leZ9p)-Z*C!zqb=-$XG0 z^!8RfuQs5s>Q~qcz92(a_Q+KH?C*vCTr~UdTiR`JGuNH8v(J|FTiSEcPrBpmHRtmd zI2Jng0J=bXK);YY^rM?jzn?~X-Pe`GbAy{D)Y6D&1GY-EBcy%Bq?bKh?A>DD9DD!p z?{q02wno2sraGUkZv5dx+J8)&K$)No43Zr(*S`FEdL!4C)}WE}vJd%{S6-3VUw>Wp z?Aasv`T0^%P$2vE?L+Qhj~qB~K%eW)xH(=b_jU}TLD&BP*Pc9hz@Z=e0nkpLkWl}> z_5J^i(9Z7$(XG9~I3sY)`OGZ#_L06+Dy4E>UstcP-rU@xJ$&rxvo!n1Ao`P~KLU-8 z{zDgN4-&A6N!kPSYbQ&7sLufi`YtE2uN$S?e&5n>Y4(q#|KP!cc1j)T^QrUXMPFaP z_SoYO8S8G}Z$?AL4`;pE?7J5K8yWqy23>cCT2<b;m*$JK^VtIU_Y$NB`p^DNyaH+G z{mp3Lmvg;t<h!|kGyA^37d!i!w9>{=-)+A$X^-I9=e!@J@A&-;Ufc)`H}c(VI&;0x zrrGv()5mjP%jXzS{^|29?bLNXS0bC%p!YXI!;O457rjCEEzMkGf~B3$T}dXBO23tP z+Ci>;5UoM?C@bU@f9G1^X3=ly&ZeFH<@|RnOG--A&)fd)AUgjw?%izq{p(KJ`EP0v z2mU)P!+3t@X14DA=E2RR-|p${GZ9ETX=d+kJRZL$nSa0daI@&oUUxnZg0xd_xu>Vz lzF#z5%kSKX?YLH3ll^(hI(_`L*t#Iva2Ede*Z;>H_<!%{oZJ8a literal 0 HcmV?d00001 diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml new file mode 100644 index 0000000000..21b7fe2734 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml @@ -0,0 +1,15 @@ +@page +@using Microsoft.AspNetCore.Identity +@attribute [IgnoreAntiforgeryToken] +@inject SignInManager<IdentityUser> SignInManager +@functions { + public async Task<IActionResult> OnPost() + { + if (SignInManager.IsSignedIn(User)) + { + await SignInManager.SignOutAsync(); + } + + return Redirect("~/"); + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml new file mode 100644 index 0000000000..a4f854aac3 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml @@ -0,0 +1,27 @@ +@using Microsoft.AspNetCore.Identity +@inject SignInManager<IdentityUser> SignInManager +@inject UserManager<IdentityUser> UserManager +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers + +<ul class="navbar-nav"> +@if (SignInManager.IsSignedIn(User)) +{ + <li class="nav-item"> + <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</a> + </li> + <li class="nav-item"> + <form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post"> + <button type="submit" class="nav-link btn btn-link text-dark">Logout</button> + </form> + </li> +} +else +{ + <li class="nav-item"> + <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a> + </li> + <li class="nav-item"> + <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a> + </li> +} +</ul> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs new file mode 100644 index 0000000000..6c27a4ad7c --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using BlazorWasm_CSharp.Shared.Authorization; + +namespace BlazorWasm_CSharp.Server.Controllers +{ + [ApiController] + public class UserController : ControllerBase + { + [HttpGet("/User")] + [Authorize] + [AllowAnonymous] + public IActionResult GetCurrentUser() => + Ok(User.Identity.IsAuthenticated ? CreateUserInfo(User) : UserInfo.Anonymous); + + private UserInfo CreateUserInfo(ClaimsPrincipal claimsPrincipal) + { + if (!claimsPrincipal.Identity.IsAuthenticated) + { + return UserInfo.Anonymous; + } + + var userInfo = new UserInfo(); + userInfo.IsAuthenticated = true; + + if (claimsPrincipal.Identity is ClaimsIdentity claimsIdentity) + { + userInfo.NameClaimType = claimsIdentity.NameClaimType; + userInfo.RoleClaimType = claimsIdentity.RoleClaimType; + } + else + { + userInfo.NameClaimType = "name"; + userInfo.RoleClaimType = "roles"; + } + + if (claimsPrincipal.Claims.Any()) + { + var claims = new List<ClaimValue>(); + var nameClaims = claimsPrincipal.FindAll(userInfo.NameClaimType); + foreach (var claim in nameClaims) + { + claims.Add(new ClaimValue(userInfo.NameClaimType, claim.Value)); + } + + // Uncomment this code if you want to send additional claims to the client. + //foreach (var claim in claimsPrincipal.Claims.Except(nameClaims)) + //{ + // claims.Add(new ClaimValue(claim.Type, claim.Value)); + //} + + userInfo.Claims = claims; + } + + return userInfo; + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs index 6862c16a71..c6f2eb0ece 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs @@ -3,11 +3,17 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +#if (!NoAuth) +using Microsoft.AspNetCore.Authorization; +#endif using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; namespace BlazorWasm_CSharp.Server.Controllers { +#if (!NoAuth) + [Authorize] +#endif [ApiController] [Route("[controller]")] public class WeatherForecastController : ControllerBase diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs new file mode 100644 index 0000000000..81390814c5 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; + +namespace BlazorWasm_CSharp.Server.Data +{ + public class ApplicationDbContext : IdentityDbContext + { + public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) + : base(options) + { + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs new file mode 100644 index 0000000000..7bea3b5b34 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs @@ -0,0 +1,270 @@ +// <auto-generated /> +using System; +using BlazorWasm_CSharp.Server.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace BlazorWasm_CSharp.Server.Data.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("00000000000000_CreateIdentitySchema")] + partial class CreateIdentitySchema + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.0.0"); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property<string>("Id") + .HasColumnType("TEXT"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("TEXT"); + + b.Property<string>("Name") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<string>("NormalizedName") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property<string>("ClaimType") + .HasColumnType("TEXT"); + + b.Property<string>("ClaimValue") + .HasColumnType("TEXT"); + + b.Property<string>("RoleId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property<string>("Id") + .HasColumnType("TEXT"); + + b.Property<int>("AccessFailedCount") + .HasColumnType("INTEGER"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("TEXT"); + + b.Property<string>("Email") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<bool>("EmailConfirmed") + .HasColumnType("INTEGER"); + + b.Property<bool>("LockoutEnabled") + .HasColumnType("INTEGER"); + + b.Property<DateTimeOffset?>("LockoutEnd") + .HasColumnType("TEXT"); + + b.Property<string>("NormalizedEmail") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<string>("NormalizedUserName") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<string>("PasswordHash") + .HasColumnType("TEXT"); + + b.Property<string>("PhoneNumber") + .HasColumnType("TEXT"); + + b.Property<bool>("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); + + b.Property<string>("SecurityStamp") + .HasColumnType("TEXT"); + + b.Property<bool>("TwoFactorEnabled") + .HasColumnType("INTEGER"); + + b.Property<string>("UserName") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property<string>("ClaimType") + .HasColumnType("TEXT"); + + b.Property<string>("ClaimValue") + .HasColumnType("TEXT"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.Property<string>("LoginProvider") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("ProviderKey") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("ProviderDisplayName") + .HasColumnType("TEXT"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("TEXT"); + + b.Property<string>("RoleId") + .HasColumnType("TEXT"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("TEXT"); + + b.Property<string>("LoginProvider") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("Name") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("Value") + .HasColumnType("TEXT"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs new file mode 100644 index 0000000000..1df0c12752 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs @@ -0,0 +1,217 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace BlazorWasm_CSharp.Server.Data.Migrations +{ + public partial class CreateIdentitySchema : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column<string>(nullable: false), + Name = table.Column<string>(maxLength: 256, nullable: true), + NormalizedName = table.Column<string>(maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetUsers", + columns: table => new + { + Id = table.Column<string>(nullable: false), + UserName = table.Column<string>(maxLength: 256, nullable: true), + NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true), + Email = table.Column<string>(maxLength: 256, nullable: true), + NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), + EmailConfirmed = table.Column<bool>(nullable: false), + PasswordHash = table.Column<string>(nullable: true), + SecurityStamp = table.Column<string>(nullable: true), + ConcurrencyStamp = table.Column<string>(nullable: true), + PhoneNumber = table.Column<string>(nullable: true), + PhoneNumberConfirmed = table.Column<bool>(nullable: false), + TwoFactorEnabled = table.Column<bool>(nullable: false), + LockoutEnd = table.Column<DateTimeOffset>(nullable: true), + LockoutEnabled = table.Column<bool>(nullable: false), + AccessFailedCount = table.Column<int>(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column<int>(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + RoleId = table.Column<string>(nullable: false), + ClaimType = table.Column<string>(nullable: true), + ClaimValue = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column<int>(nullable: false) + .Annotation("Sqlite:Autoincrement", true), + UserId = table.Column<string>(nullable: false), + ClaimType = table.Column<string>(nullable: true), + ClaimValue = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column<string>(maxLength: 128, nullable: false), + ProviderKey = table.Column<string>(maxLength: 128, nullable: false), + ProviderDisplayName = table.Column<string>(nullable: true), + UserId = table.Column<string>(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column<string>(nullable: false), + RoleId = table.Column<string>(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column<string>(nullable: false), + LoginProvider = table.Column<string>(maxLength: 128, nullable: false), + Name = table.Column<string>(maxLength: 128, nullable: false), + Value = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "AspNetUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AspNetRoleClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserLogins"); + + migrationBuilder.DropTable( + name: "AspNetUserRoles"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropTable( + name: "AspNetRoles"); + + migrationBuilder.DropTable( + name: "AspNetUsers"); + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs new file mode 100644 index 0000000000..01098a9b9f --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs @@ -0,0 +1,268 @@ +// <auto-generated /> +using System; +using BlazorWasm_CSharp.Server.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace BlazorWasm_CSharp.Server.Data.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + partial class ApplicationDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.0.0"); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property<string>("Id") + .HasColumnType("TEXT"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("TEXT"); + + b.Property<string>("Name") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<string>("NormalizedName") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property<string>("ClaimType") + .HasColumnType("TEXT"); + + b.Property<string>("ClaimValue") + .HasColumnType("TEXT"); + + b.Property<string>("RoleId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property<string>("Id") + .HasColumnType("TEXT"); + + b.Property<int>("AccessFailedCount") + .HasColumnType("INTEGER"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("TEXT"); + + b.Property<string>("Email") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<bool>("EmailConfirmed") + .HasColumnType("INTEGER"); + + b.Property<bool>("LockoutEnabled") + .HasColumnType("INTEGER"); + + b.Property<DateTimeOffset?>("LockoutEnd") + .HasColumnType("TEXT"); + + b.Property<string>("NormalizedEmail") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<string>("NormalizedUserName") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.Property<string>("PasswordHash") + .HasColumnType("TEXT"); + + b.Property<string>("PhoneNumber") + .HasColumnType("TEXT"); + + b.Property<bool>("PhoneNumberConfirmed") + .HasColumnType("INTEGER"); + + b.Property<string>("SecurityStamp") + .HasColumnType("TEXT"); + + b.Property<bool>("TwoFactorEnabled") + .HasColumnType("INTEGER"); + + b.Property<string>("UserName") + .HasColumnType("TEXT") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property<string>("ClaimType") + .HasColumnType("TEXT"); + + b.Property<string>("ClaimValue") + .HasColumnType("TEXT"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.Property<string>("LoginProvider") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("ProviderKey") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("ProviderDisplayName") + .HasColumnType("TEXT"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("TEXT"); + + b.Property<string>("RoleId") + .HasColumnType("TEXT"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("TEXT"); + + b.Property<string>("LoginProvider") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("Name") + .HasColumnType("TEXT") + .HasMaxLength(128); + + b.Property<string>("Value") + .HasColumnType("TEXT"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs new file mode 100644 index 0000000000..f1d1fc3f8c --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs @@ -0,0 +1,277 @@ +// <auto-generated /> +using System; +using BlazorWasm_CSharp.Server.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace BlazorWasm_CSharp.Server.Data.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + [Migration("00000000000000_CreateIdentitySchema")] + partial class CreateIdentitySchema + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property<string>("Id") + .HasColumnType("nvarchar(450)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property<string>("Name") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<string>("NormalizedName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property<string>("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property<string>("Id") + .HasColumnType("nvarchar(450)"); + + b.Property<int>("AccessFailedCount") + .HasColumnType("int"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property<string>("Email") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<bool>("EmailConfirmed") + .HasColumnType("bit"); + + b.Property<bool>("LockoutEnabled") + .HasColumnType("bit"); + + b.Property<DateTimeOffset?>("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property<string>("NormalizedEmail") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<string>("NormalizedUserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<string>("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property<bool>("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property<string>("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property<bool>("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property<string>("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property<string>("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.Property<string>("LoginProvider") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("ProviderKey") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property<string>("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property<string>("LoginProvider") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("Name") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs new file mode 100644 index 0000000000..eb6f88d7cb --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs @@ -0,0 +1,220 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace BlazorWasm_CSharp.Server.Data.Migrations +{ + public partial class CreateIdentitySchema : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "AspNetRoles", + columns: table => new + { + Id = table.Column<string>(nullable: false), + Name = table.Column<string>(maxLength: 256, nullable: true), + NormalizedName = table.Column<string>(maxLength: 256, nullable: true), + ConcurrencyStamp = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoles", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetUsers", + columns: table => new + { + Id = table.Column<string>(nullable: false), + UserName = table.Column<string>(maxLength: 256, nullable: true), + NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true), + Email = table.Column<string>(maxLength: 256, nullable: true), + NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), + EmailConfirmed = table.Column<bool>(nullable: false), + PasswordHash = table.Column<string>(nullable: true), + SecurityStamp = table.Column<string>(nullable: true), + ConcurrencyStamp = table.Column<string>(nullable: true), + PhoneNumber = table.Column<string>(nullable: true), + PhoneNumberConfirmed = table.Column<bool>(nullable: false), + TwoFactorEnabled = table.Column<bool>(nullable: false), + LockoutEnd = table.Column<DateTimeOffset>(nullable: true), + LockoutEnabled = table.Column<bool>(nullable: false), + AccessFailedCount = table.Column<int>(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUsers", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "AspNetRoleClaims", + columns: table => new + { + Id = table.Column<int>(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + RoleId = table.Column<string>(nullable: false), + ClaimType = table.Column<string>(nullable: true), + ClaimValue = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserClaims", + columns: table => new + { + Id = table.Column<int>(nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + UserId = table.Column<string>(nullable: false), + ClaimType = table.Column<string>(nullable: true), + ClaimValue = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); + table.ForeignKey( + name: "FK_AspNetUserClaims_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserLogins", + columns: table => new + { + LoginProvider = table.Column<string>(maxLength: 128, nullable: false), + ProviderKey = table.Column<string>(maxLength: 128, nullable: false), + ProviderDisplayName = table.Column<string>(nullable: true), + UserId = table.Column<string>(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); + table.ForeignKey( + name: "FK_AspNetUserLogins_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserRoles", + columns: table => new + { + UserId = table.Column<string>(nullable: false), + RoleId = table.Column<string>(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetRoles_RoleId", + column: x => x.RoleId, + principalTable: "AspNetRoles", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_AspNetUserRoles_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column<string>(nullable: false), + LoginProvider = table.Column<string>(maxLength: 128, nullable: false), + Name = table.Column<string>(maxLength: 128, nullable: false), + Value = table.Column<string>(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_AspNetRoleClaims_RoleId", + table: "AspNetRoleClaims", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true, + filter: "[NormalizedName] IS NOT NULL"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserClaims_UserId", + table: "AspNetUserClaims", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserLogins_UserId", + table: "AspNetUserLogins", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_AspNetUserRoles_RoleId", + table: "AspNetUserRoles", + column: "RoleId"); + + migrationBuilder.CreateIndex( + name: "EmailIndex", + table: "AspNetUsers", + column: "NormalizedEmail"); + + migrationBuilder.CreateIndex( + name: "UserNameIndex", + table: "AspNetUsers", + column: "NormalizedUserName", + unique: true, + filter: "[NormalizedUserName] IS NOT NULL"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "AspNetRoleClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserClaims"); + + migrationBuilder.DropTable( + name: "AspNetUserLogins"); + + migrationBuilder.DropTable( + name: "AspNetUserRoles"); + + migrationBuilder.DropTable( + name: "AspNetUserTokens"); + + migrationBuilder.DropTable( + name: "AspNetRoles"); + + migrationBuilder.DropTable( + name: "AspNetUsers"); + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs new file mode 100644 index 0000000000..07026c1264 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs @@ -0,0 +1,275 @@ +// <auto-generated /> +using System; +using BlazorWasm_CSharp.Server.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +namespace BlazorWasm_CSharp.Server.Data.Migrations +{ + [DbContext(typeof(ApplicationDbContext))] + partial class ApplicationDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property<string>("Id") + .HasColumnType("nvarchar(450)"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property<string>("Name") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<string>("NormalizedName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property<string>("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => + { + b.Property<string>("Id") + .HasColumnType("nvarchar(450)"); + + b.Property<int>("AccessFailedCount") + .HasColumnType("int"); + + b.Property<string>("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property<string>("Email") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<bool>("EmailConfirmed") + .HasColumnType("bit"); + + b.Property<bool>("LockoutEnabled") + .HasColumnType("bit"); + + b.Property<DateTimeOffset?>("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property<string>("NormalizedEmail") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<string>("NormalizedUserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.Property<string>("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("PhoneNumber") + .HasColumnType("nvarchar(max)"); + + b.Property<bool>("PhoneNumberConfirmed") + .HasColumnType("bit"); + + b.Property<string>("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property<bool>("TwoFactorEnabled") + .HasColumnType("bit"); + + b.Property<string>("UserName") + .HasColumnType("nvarchar(256)") + .HasMaxLength(256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.Property<int>("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + b.Property<string>("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.Property<string>("LoginProvider") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("ProviderKey") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property<string>("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property<string>("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.Property<string>("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property<string>("LoginProvider") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("Name") + .HasColumnType("nvarchar(128)") + .HasMaxLength(128); + + b.Property<string>("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs index fc9fe04212..fd1767bd47 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs @@ -1,18 +1,53 @@ using Microsoft.AspNetCore.Builder; +#if (IndividualLocalAuth) +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Identity.UI; +#endif +#if (RequiresHttps) +using Microsoft.AspNetCore.HttpsPolicy; +#endif using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.ResponseCompression; +#if (IndividualLocalAuth) +using Microsoft.EntityFrameworkCore; +#endif +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System.Linq; +#if (IndividualLocalAuth) +using BlazorWasm_CSharp.Server.Data; +#endif namespace BlazorWasm_CSharp.Server { public class Startup { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + // This method gets called by the runtime. Use this method to add services to the container. // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { +#if (IndividualLocalAuth) + services.AddDbContext<ApplicationDbContext>(options => +#if (UseLocalDB) + options.UseSqlServer( + Configuration.GetConnectionString("DefaultConnection"))); +#else + options.UseSqlite( + Configuration.GetConnectionString("DefaultConnection"))); +#endif + services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true) + .AddEntityFrameworkStores<ApplicationDbContext>(); + +#endif services.AddMvc(); services.AddResponseCompression(opts => { @@ -29,17 +64,41 @@ namespace BlazorWasm_CSharp.Server if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); +#if (IndividualLocalAuth) + app.UseDatabaseErrorPage(); +#endif app.UseBlazorDebugging(); } + else + { + app.UseExceptionHandler("/Error"); +#if (RequiresHttps) + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); + } + app.UseHttpsRedirection(); +#else + } + +#endif app.UseStaticFiles(); app.UseClientSideBlazorFiles<Client.Startup>(); app.UseRouting(); +#if (IndividualLocalAuth) + app.UseAuthentication(); + app.UseAuthorization(); + +#endif app.UseEndpoints(endpoints => { - endpoints.MapDefaultControllerRoute(); +#if (IndividualLocalAuth) + endpoints.MapRazorPages(); +#endif + endpoints.MapControllers(); + endpoints.MapFallbackToClientSideBlazor<Client.Startup>("index.html"); }); } diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/app.db b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/app.db new file mode 100644 index 0000000000000000000000000000000000000000..ec163057f1f5433ac77fa2fea05aa4a544e6ded0 GIT binary patch literal 106496 zcmeI)UvJyi83$m|b|g!-Eay+dt-w&02G$6+i)2IL6<Ft~GL;aPDMyk68%3cp5|a>- zL`S5Yx<CuaZh{m8cDb8=g8>5y<hpn5%`UgAeTrQ+Los0I@Q@-8MOhBo42$p+;zZ;j z4_`j-dk!U&NbPpnbPVa9)$8bv^y|cOLJ$(am!w1@F++adBtQOZnY@|v7s$Ut=>532 zGl}(oKf6FT&iz2Q`C0CVrLPtbvtOpaUwnW5^ZB*p^SN)6y_v7)p3JDicS0fY&A6^& z)(?csDY39F4Bj@oE#nh)zfrIcHN)Anjb7QhZ+7hleXF*jtFIKRN};Yus<x%<OY-;~ zWvQY`a&&iDx+b%Z<@`XnG&Y7}TQ@tSF|gH_&xnEBF&YDF<YTxP8$;D<8(vrRt?v-5 zzBDF=V2cLZF&snCNMrEY^Tu*Yd}l=%WZhKIwVK{BRGJsYM_1Vw`2%vBMUP?A?loGN zZSzy3MZ1&pr`4sDxVkDl{m9Ypwv8Y&ZugPJoOiT(;lr{LPNTaq={}p0$ji^AR9E)v zl2#!<d*$+)*GRWjTXJk;v7*)L)q<+kC3$x{RDIq7cB|@6p?V-~D+fWztVu&O?-=23 zN+aEP-MU>4(^0Ba74@d(_3Xu%m#RuhsVZ7gsrjetMRH9h=a8q>yrq;CQu@V0tytJn zUM2!s@_seT5+8v-9AYAHccZzCk06`Le~?Rxw^xOPTRQfmHkpwcdf&0!<)~`oMkLG2 zr>l!8aeZBQnvT>2n*)N)*>ZMVRj}ruEZpVYo^@olj9z>J$bR#-aXev*Ez>@1>&I>x zyT#-em`C?=1?I=fR~R2LDYS5S`ANBEeTKYWNwPPyNwKy*IoVz`p=`4?OD9JQZn~em z6-hUn>VkB$<;8L79?qlQK&OM8jAZ4eQXNhLQg~=`Bi!FRoPfe!y`pO5csq(#_tWcc zSU)~ASbcD-@96D*Wc_)oftx2-Ft0juyO|`NdJkN7Z<yM~qrTB?8j-~X4n5L%txKlz zHL_>^<S0FwN;+e)6Jn_hmNQ(h-eoyx4o2?zQyJd-r%om9n?@3MSqazGFqJ_tuXN5Q zGwv6gsg$^~B0N(fW5^DMk3Ap9?a$_+LBpNj_z^>{=OJN#92A<Qc<hpHwvATN>UW*d zLFjK<w7SiHuSd%5xaR1cLw-Oh9nwe4Dzeu-v)3_VMz`N_*=jzt`i|12A1ThWotIR9 z|KLMPOb|gMr5m08cXiu-Z1q~Vbo&7x{_X>-YiRw>UH|IiA1~B!j<c&7M9p;K%<7M= zlHPQz-o#VqV<#2#-h5J2S0+#6cKCX2r%$e4a7X-UBT{&E>!HyNRUcbUjw?ad9E|w0 zrcIf@EXIyUIY`WK^7pw%XX)_h<*o{TSfN7aKKSvGkPEbX*gWyvOrGzu$c_+3WouFc zZPp#qC(V#7ol!hg_w8Jqr`r-xj!aqcL)zObbf&)7+2b^T_O}m4NYF+rY;JOexk30C z?!tw^zK{|(HiVOk>(FQ@r5*ErPj^hKYu_?$QtijFD`$9{*lhx(VV@JZ#&i?|M?S5! z`c3B!`It?Dja)d0h&q!LKi(KO=3<Z2xDmU0mVKMPx{xJrgxo(8<PTmDfB*y_009U< z00Izz00bZa0SLT40;|GoO}x&%8pWQWJLH$qM%SUg32Z(vI{J-wufO}N3^^|$_s<0R zgBJuK009U<00Izz00bZa0SG_<0<W9EFK26M?sov!V}A)i@BfpB{_%nU1Rwwb2tWV= z5P$##AOHafKwydm=>30u|DWOn<J2Gk0SG_<0uX=z1Rwwb2tWV=L;&~yQ3eoz00bZa z0SG_<0uX=z1Rwx`=@-EL|LM;$&JY3+fB*y_009U<00Izz00ba_`~Ro`2tWV=5P$## zAOHafKmY;|fWY(%;Qs&g=NM-Q0SG_<0uX=z1Rwwb2tWV=5WxL^)Bpq^009U<00Izz z00bZa0SG`~`UUX)fBJKbGlT#HAOHafKmY;|fB*y_009W#`#)*`0uX=z1Rwwb2tWV= z5P$##ATa#``2IirImQ`600Izz00bZa0SG_<0uX=z1n~d=p#~rT0SG_<0uX=z1Rwwb z2tWV=(=UMg|I?pioFN1t009U<00Izz00bZa0SG_<_y17?5P$##AOHafKmY;|fB*y_ z0D<Wj!1w>@&oRyr0uX=z1Rwwb2tWV=5P$##Ab{`xr~wE-00Izz00bZa0SG_<0uX?} z^b6qo|Mce=X9xiZKmY;|fB*y_009U<00I!e_kYv?1Rwwb2tWV=5P$##AOHafKw$a> z@cn=KbBr^D00bZa0SG_<0uX=z1Rwwb2xN0F5(~-aiKV~i{+j*U(pQUz*)P-IFTOwj z`TSb)`P{e3-pto?Pi9o%JE4&HCh<F7?6WH=adTA|{KD+Ej8D}4M!`PR3}??adR41! z*bVx(+KQ}wqgYi6bwyIOEoEPl$L=Oe6-|;OJIm5Fne{5?2g2o)SXdVZZ;u|oY~44z zc7uiz4uGw`az+H)j?oZUBaMM|Ok=n-HilwbH#?&-u+^8(h=JQN8Ut(OW4IU_19kGc z3MV31eQ8V#!4_Ty!!ZPn;anKYDe;{ZVUTrGLATNLj-k@JU>T&V?2G&Xxy_=-uxa<2 z)$8bO^HZZmyOZ;|7jv`X>Z<VcBS*j6HX_9lS<HDys~0{jD{+;S%}C_s=TfRG`*lgH zke|JBdChC2F{&*&wy{{zYV~SC)#{SGyB)25S=z0tJB8|jw5=QjC9@_C3)nkGxSP^Q zH(s}{-!L7eN>x#BYF^J?jCrZ5l$5HX6_uKQy6$dNlAJ@H4yY}qtdPN1EYymHE#+k* zpe65Dvn=ru_`@M40(ZCZ5o9y@4{}NI_NtI@OUHiHHXWm(_Z`b!j;c0pM6$e`dm;Qw zTwfQSrXw}MMr*J+Th5NFis9h)GVd<$_N*hbW%S|;K=zxrjpGShY?=09TR(Qo*exc% zz&yH_D=<G+zQXv3Nuh<q%TLNR>oes2N|L>qO^UVk$;tMj31yqDSvomdNYQjZc`K4` zHq`~`X3LA?(mk9<y>!z-PDZkFQ>hLo0VzB*xe@N~9Zo=DuU=6#a=aZytNZD7H>@8Y z8mvCJ)pzuEKeGP3)xgaYESOiFx!p{XPQ3>%yEja2<5Az}HjT*Q0*4-Hyw)XC`5M_X ze{z%_O(mVN*a@*z2Fn?)SMQTS&`jo-mriAP@1HuAwD0p=IfkhWf_bHLKACa9*i5Cw zl@;Nc5*b5wFnsL!IBtJ74@q;E&G93KT+c(o{x~Q!N%7bv-E14JqSfy@ql3`jv}kpk z{a%lh+i}g&JBR#$QaYrMm{nx2duFd=#Efpg<FeI!X!RYXOFvSaXFKoXfWLq6Atfe= zppnvzPXD{QZ9lepty{YNfDeE7fz>s%e&?=#_3@7vYB<N))eNF$I&o(8$5u&iI#zGu zsq?Xu3VLroDXJ@zr*S)cy|&XQS1-6D{<IM(yt?(!=!U9~Ehop7AZrdr{8`hc%wHB` zFSK%ynBnB_bC1r_W3LK+SfN7aKKSvGkPEbX*gWyvOrGzu$c_+3WouFcZPp#qC(V#7 zol!hg_w8Jqr`r-xj!aqcL)zObbf&)7+2b^T_O}m4NYF+rY;JOexk30C?!tw^zK{|( zHiVOk>(FQ@r5*ErPj^hKYu_?$QtijFD`$9{*lhx(VV@JZ#&i?|M?S5!`c3B!`It?D zWs||M8i|NHlN3MR7&qo(kJGpjyLy&<kDsUC<#GR?|BVKgAOHafKmY;|fB*y_009U< z00Pq}kR>OzIRBf(Qg!L#;%^uJv+(DIOPN1qGU-327w7*%8t{Su1Rwwb2tWV=p1`5V z9`{;tpV9H}4u&50qO0sTy;~}KntFS0_`n~xb@-_-cOP<#CG^ynzpb4A!_}1dHhI7- z?H<v+(HcG6&%MKW4;BX7OgIR;Yn%V<jR{XP(qO_56S_B?ME;;LPcyRJqA_^)&w?ij z@h~MGresfy<o`zxQ~t>3?oO*qDLjiAeG-z6YjRKcb$u4|M?ao-y1M8-;en?yM;`Y0 zKYSV!_y6&c4gwH>00bZa0SG_<0uX=z1RyZ|0{H$v{W-=NLI45~fB*y_009U<00Izz H00jOE{cSD9 literal 0 HcmV?d00001 diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json new file mode 100644 index 0000000000..8983e0fc1c --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json new file mode 100644 index 0000000000..fbfae3faee --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json @@ -0,0 +1,19 @@ +{ +////#if (IndividualLocalAuth) +// "ConnectionStrings": { +////#if (UseLocalDB) +// "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true" +////#else +// "DefaultConnection": "DataSource=app.db" +////#endif +// }, +////#endif + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs new file mode 100644 index 0000000000..de28f359b4 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs @@ -0,0 +1,18 @@ +namespace BlazorWasm_CSharp.Shared.Authorization +{ + public class ClaimValue + { + public ClaimValue() + { + } + + public ClaimValue(string type, string value) + { + Type = type; + Value = value; + } + + public string Type { get; set; } + public string Value { get; set; } + } +} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs new file mode 100644 index 0000000000..c21d8b50d6 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; + +namespace BlazorWasm_CSharp.Shared.Authorization +{ + public class UserInfo + { + public static readonly UserInfo Anonymous = new UserInfo(); + + public bool IsAuthenticated { get; set; } + + public string NameClaimType { get; set; } + + public string RoleClaimType { get; set; } + + public ICollection<ClaimValue> Claims { get; set; } + } +} diff --git a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs index 41cb82ac21..238385bf17 100644 --- a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System; using System.IO; using System.Net; using System.Threading; @@ -90,7 +91,64 @@ namespace Templates.Test } } - protected async Task BuildAndRunTest(string appName, Project project) + [Theory] + [InlineData(true)] + [InlineData(false)] + public async Task BlazorWasmHostedTemplate_IndividualAuth_Works(bool useLocalDb) + { + var project = await ProjectFactory.GetOrCreateProject("blazorhostedindividual" + (useLocalDb ? "uld" : ""), Output); + + var createResult = await project.RunDotNetNewAsync("blazorwasm", args: new[] { "--hosted", "-au", "Individual", useLocalDb ? "-uld" : "" }); + Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", project, createResult)); + + var serverProject = GetSubProject(project, "Server", $"{project.ProjectName}.Server"); + + var serverProjectFileContents = ReadFile(serverProject.TemplateOutputDir, $"{serverProject.ProjectName}.csproj"); + if (!useLocalDb) + { + Assert.Contains(".db", serverProjectFileContents); + } + var publishResult = await serverProject.RunDotNetPublishAsync(); + Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", serverProject, publishResult)); + + // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release + // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build + // later, while the opposite is not true. + + var buildResult = await serverProject.RunDotNetBuildAsync(); + Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", serverProject, buildResult)); + + var migrationsResult = await serverProject.RunDotNetEfCreateMigrationAsync("blazorwasm"); + Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", serverProject, migrationsResult)); + serverProject.AssertEmptyMigration("blazorwasm"); + + if (useLocalDb) + { + using var dbUpdateResult = await serverProject.RunDotNetEfUpdateDatabaseAsync(); + Assert.True(0 == dbUpdateResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", serverProject, dbUpdateResult)); + } + + await BuildAndRunTest(project.ProjectName, serverProject, usesAuth: true); + + using var aspNetProcess = serverProject.StartPublishedProjectAsync(); + + Assert.False( + aspNetProcess.Process.HasExited, + ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", serverProject, aspNetProcess.Process)); + + await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); + if (BrowserFixture.IsHostAutomationSupported()) + { + aspNetProcess.VisitInBrowser(Browser); + TestBasicNavigation(project.ProjectName, usesAuth: true); + } + else + { + BrowserFixture.EnforceSupportedConfigurations(); + } + } + + protected async Task BuildAndRunTest(string appName, Project project, bool usesAuth = false) { using var aspNetProcess = project.StartBuiltProjectAsync(); @@ -102,7 +160,7 @@ namespace Templates.Test if (BrowserFixture.IsHostAutomationSupported()) { aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(appName); + TestBasicNavigation(appName, usesAuth); } else { @@ -110,7 +168,7 @@ namespace Templates.Test } } - private void TestBasicNavigation(string appName) + private void TestBasicNavigation(string appName, bool usesAuth = false) { // Give components.server enough time to load so that it can replace // the prerendered content before we start making assertions. @@ -133,6 +191,40 @@ namespace Templates.Test Browser.FindElement(By.CssSelector("p+button")).Click(); Browser.Equal("Current count: 1", () => Browser.FindElement(By.CssSelector("h1 + p")).Text); + if (usesAuth) + { + Browser.FindElement(By.PartialLinkText("Log in")).Click(); + Browser.Contains("/Identity/Account/Login", () => Browser.Url); + + Browser.FindElement(By.PartialLinkText("Register as a new user")).Click(); + + var userName = $"{Guid.NewGuid()}@example.com"; + var password = $"!Test.Password1$"; + Browser.Exists(By.Name("Input.Email")); + Browser.FindElement(By.Name("Input.Email")).SendKeys(userName); + Browser.FindElement(By.Name("Input.Password")).SendKeys(password); + Browser.FindElement(By.Name("Input.ConfirmPassword")).SendKeys(password); + Browser.FindElement(By.Id("registerSubmit")).Click(); + + // We will be redirected to the RegisterConfirmation + Browser.Contains("/Identity/Account/RegisterConfirmation", () => Browser.Url); + Browser.FindElement(By.PartialLinkText("Click here to confirm your account")).Click(); + + // We will be redirected to the ConfirmEmail + Browser.Contains("/Identity/Account/ConfirmEmail", () => Browser.Url); + + // Now we can login + Browser.FindElement(By.PartialLinkText("Login")).Click(); + Browser.Exists(By.Name("Input.Email")); + Browser.FindElement(By.Name("Input.Email")).SendKeys(userName); + Browser.FindElement(By.Name("Input.Password")).SendKeys(password); + Browser.FindElement(By.Id("login-submit")).Click(); + + // Need to navigate to fetch page + Browser.Navigate().GoToUrl(new Uri(Browser.Url).GetLeftPart(UriPartial.Authority)); + Browser.Equal(appName.Trim(), () => Browser.Title.Trim()); + } + // Can navigate to the 'fetch data' page Browser.FindElement(By.PartialLinkText("Fetch data")).Click(); Browser.Contains("fetchdata", () => Browser.Url); @@ -143,6 +235,15 @@ namespace Templates.Test Browser.Equal(5, () => Browser.FindElements(By.CssSelector("p+table>tbody>tr")).Count); } + private string ReadFile(string basePath, string path) + { + var fullPath = Path.Combine(basePath, path); + var doesExist = File.Exists(fullPath); + + Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}"); + return File.ReadAllText(Path.Combine(basePath, path)); + } + private Project GetSubProject(Project project, string projectDirectory, string projectName) { var subProjectDirectory = Path.Combine(project.TemplateOutputDir, projectDirectory); From 1f61fc6cb148dd3657c8d9f432c1f9423563ce7d Mon Sep 17 00:00:00 2001 From: William Godbe <wigodbe@microsoft.com> Date: Fri, 17 Jan 2020 15:56:08 -0800 Subject: [PATCH 50/64] Update dependencies from dotnet/blazor (#18424) * Update dependencies from dotnet/blazor * Update version of blazor package used * Removed obsolete WipedMethod invocation test * react to mono.wasm to dotnet.wasm rename * Leftover code cleanup --- eng/Version.Details.xml | 8 ++------ eng/Versions.props | 2 +- .../src/targets/Blazor.MonoRuntime.props | 2 +- .../BuildIntegrationTest.cs | 8 ++++---- .../PublishIntegrationTest.cs | 20 +++++++++---------- .../testassets/MonoSanity/wwwroot/index.html | 18 ----------------- .../testassets/MonoSanity/wwwroot/loader.js | 4 ++-- .../testassets/MonoSanityClient/Examples.cs | 5 ----- .../Web.JS/dist/Release/blazor.server.js | 13 +++++++++--- .../Web.JS/dist/Release/blazor.webassembly.js | 2 +- .../Web.JS/src/Platform/Mono/MonoPlatform.ts | 8 ++++---- .../test/E2ETest/Tests/MonoSanityTest.cs | 8 -------- 12 files changed, 35 insertions(+), 63 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e93f24e28b..f5b17af05a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -9,9 +9,9 @@ --> <Dependencies> <ProductDependencies> - <Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.1.0-preview4.19578.1"> + <Dependency Name="Microsoft.AspNetCore.Blazor.Mono" Version="3.2.0-preview1.20067.1"> <Uri>https://github.com/aspnet/Blazor</Uri> - <Sha>9ff01af4257317a90b64959fe1c87aef3da4a36f</Sha> + <Sha>dd7fb4d3931d556458f62642c2edfc59f6295bfb</Sha> </Dependency> <Dependency Name="Microsoft.AspNetCore.Razor.Language" Version="3.1.0-rtm.19573.1"> <Uri>https://github.com/aspnet/AspNetCore-Tooling</Uri> @@ -281,10 +281,6 @@ <Uri>https://github.com/aspnet/Extensions</Uri> <Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha> </Dependency> - <Dependency Name="Microsoft.Internal.Extensions.Refs" Version="3.1.0-rtm.19572.8" CoherentParentDependency="Microsoft.EntityFrameworkCore"> - <Uri>https://github.com/aspnet/Extensions</Uri> - <Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha> - </Dependency> <Dependency Name="Microsoft.JSInterop" Version="3.1.0" CoherentParentDependency="Microsoft.EntityFrameworkCore" Pinned="true"> <Uri>https://github.com/aspnet/Extensions</Uri> <Sha>1c5c7777ea9a19d54ab67ec1521665c99460efc5</Sha> diff --git a/eng/Versions.props b/eng/Versions.props index e1dab327ee..5f4be96aee 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -97,7 +97,7 @@ <!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 --> <MicrosoftNETCorePlatformsPackageVersion>3.1.0</MicrosoftNETCorePlatformsPackageVersion> <!-- Packages from aspnet/Blazor --> - <MicrosoftAspNetCoreBlazorMonoPackageVersion>3.1.0-preview4.19578.1</MicrosoftAspNetCoreBlazorMonoPackageVersion> + <MicrosoftAspNetCoreBlazorMonoPackageVersion>3.2.0-preview1.20067.1</MicrosoftAspNetCoreBlazorMonoPackageVersion> <!-- Packages from aspnet/Extensions --> <InternalAspNetCoreAnalyzersPackageVersion>3.1.0-rtm.19575.5</InternalAspNetCoreAnalyzersPackageVersion> <MicrosoftAspNetCoreAnalyzerTestingPackageVersion>3.1.0-rtm.19575.5</MicrosoftAspNetCoreAnalyzerTestingPackageVersion> diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props index dc6926924b..f49c1f8f2f 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.props @@ -6,7 +6,7 @@ <PropertyGroup Label="Blazor build outputs"> <MonoLinkerI18NAssemblies>none</MonoLinkerI18NAssemblies> <!-- See Mono linker docs - allows comma-separated values from: none,all,cjk,mideast,other,rare,west --> - <AdditionalMonoLinkerOptions>--disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com --exclude-feature sre -v false -c link -u link -b true</AdditionalMonoLinkerOptions> + <AdditionalMonoLinkerOptions>--disable-opt unreachablebodies --verbose --strip-security true --exclude-feature com -v false -c link -u link -b true</AdditionalMonoLinkerOptions> <BaseBlazorDistPath>dist\</BaseBlazorDistPath> <BaseBlazorPackageContentOutputPath>$(BaseBlazorDistPath)_content\</BaseBlazorPackageContentOutputPath> <BaseBlazorRuntimeOutputPath>$(BaseBlazorDistPath)_framework\</BaseBlazorRuntimeOutputPath> diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs index 027fe59990..f3148b1a0b 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/BuildIntegrationTest.cs @@ -22,8 +22,8 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. } @@ -65,8 +65,8 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, buildOutputDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. } diff --git a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs index f1f554d3b9..3556f119f4 100644 --- a/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs +++ b/src/Components/Blazor/Build/test/BuildIntegrationTests/PublishIntegrationTest.cs @@ -23,8 +23,8 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. @@ -57,8 +57,8 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. @@ -96,8 +96,8 @@ namespace Microsoft.AspNetCore.Blazor.Build Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. @@ -158,8 +158,8 @@ namespace Microsoft.AspNetCore.Blazor.Build var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. @@ -201,8 +201,8 @@ namespace Microsoft.AspNetCore.Blazor.Build var blazorPublishDirectory = Path.Combine(publishDirectory, "standalone"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.boot.json"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "blazor.webassembly.js"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.wasm"); - Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "mono.js"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.wasm"); + Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "wasm", "dotnet.js"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "standalone.dll"); Assert.FileExists(result, blazorPublishDirectory, "dist", "_framework", "_bin", "Microsoft.Extensions.Logging.Abstractions.dll"); // Verify dependencies are part of the output. diff --git a/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html b/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html index c4d1ab60e2..8a42e8e5d1 100644 --- a/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html +++ b/src/Components/Blazor/testassets/MonoSanity/wwwroot/index.html @@ -36,14 +36,6 @@ </form> </fieldset> - <fieldset> - <legend>Invoke wiped method</legend> - <form id="invokeWipedMethod"> - <button type="submit" disabled>Go</button> - <div><textarea rows="5" cols="80" readonly id="invokeWipedMethodStackTrace"></textarea></div> - </form> - </fieldset> - <fieldset> <legend>Call JS from .NET</legend> <form id="callJs"> @@ -111,16 +103,6 @@ } }; - el('invokeWipedMethod').onsubmit = function (evt) { - evt.preventDefault(); - try { - invokeMonoMethod('MonoSanityClient', 'MonoSanityClient', 'Examples', 'InvokeWipedMethod', []); - el('invokeWipedMethodStackTrace').value = 'WARNING: No exception occurred'; - } catch (ex) { - el('invokeWipedMethodStackTrace').value = ex.toString(); - } - }; - el('callJs').onsubmit = function (evt) { evt.preventDefault(); var expression = el('callJsEvalExpression').value; diff --git a/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js b/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js index 48d4530d3e..328acacdff 100644 --- a/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js +++ b/src/Components/Blazor/testassets/MonoSanity/wwwroot/loader.js @@ -12,7 +12,7 @@ window.initMono = function initMono(loadAssemblyUrls, onReadyCallback) { window.Module = { locateFile: function (fileName) { - return fileName === 'mono.wasm' ? '/_framework/wasm/mono.wasm' : fileName; + return fileName === 'dotnet.wasm' ? '/_framework/wasm/dotnet.wasm' : fileName; }, onRuntimeInitialized: function () { var allAssemblyUrls = loadAssemblyUrls.concat([ @@ -117,7 +117,7 @@ } var scriptElem = document.createElement('script'); - scriptElem.src = '/_framework/wasm/mono.js'; + scriptElem.src = '/_framework/wasm/dotnet.js'; document.body.appendChild(scriptElem); } diff --git a/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs b/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs index 8023ded4d9..1d56128e35 100644 --- a/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs +++ b/src/Components/Blazor/testassets/MonoSanityClient/Examples.cs @@ -31,11 +31,6 @@ namespace MonoSanityClient throw new InvalidOperationException(message); } - public static void InvokeWipedMethod() - { - new HttpClientHandler().Dispose(); - } - public static string EvaluateJavaScript(string expression) { var result = InternalCalls.InvokeJSUnmarshalled<string, string, object, object>(out var exceptionMessage, "evaluateJsExpression", expression, null, null); diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js index 36050055b1..400db6164b 100644 --- a/src/Components/Web.JS/dist/Release/blazor.server.js +++ b/src/Components/Web.JS/dist/Release/blazor.server.js @@ -1,15 +1,22 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=49)}([function(e,t,n){"use strict";var r;n.d(t,"a",function(){return r}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return s}),n.d(t,"c",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return l}),n.d(t,"h",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return p}),n.d(t,"b",function(){return d});var r=n(0),o=n(7),i=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},a=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},s=function(){function e(){}return e.isRequired=function(e,t){if(null==e)throw new Error("The '"+t+"' argument is required.")},e.isIn=function(e,t,n){if(!(e in t))throw new Error("Unknown "+n+" value: "+e+".")},e}(),c=function(){function e(){}return Object.defineProperty(e,"isBrowser",{get:function(){return"object"==typeof window},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isWebWorker",{get:function(){return"object"==typeof self&&"importScripts"in self},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isNode",{get:function(){return!this.isBrowser&&!this.isWebWorker},enumerable:!0,configurable:!0}),e}();function u(e,t){var n="";return l(e)?(n="Binary data of length "+e.byteLength,t&&(n+=". Content: '"+function(e){var t=new Uint8Array(e),n="";return t.forEach(function(e){n+="0x"+(e<16?"0":"")+e.toString(16)+" "}),n.substr(0,n.length-1)}(e)+"'")):"string"==typeof e&&(n="String data of length "+e.length,t&&(n+=". Content: '"+e+"'")),n}function l(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function f(e,t,n,o,s,c,f){return i(this,void 0,void 0,function(){var i,h,p,d,g;return a(this,function(a){switch(a.label){case 0:return s?[4,s()]:[3,2];case 1:(p=a.sent())&&((i={}).Authorization="Bearer "+p,h=i),a.label=2;case 2:return e.log(r.a.Trace,"("+t+" transport) sending data. "+u(c,f)+"."),d=l(c)?"arraybuffer":"text",[4,n.post(o,{content:c,headers:h,responseType:d})];case 3:return g=a.sent(),e.log(r.a.Trace,"("+t+" transport) request complete. Response status: "+g.statusCode+"."),[2]}})})}function h(e){return void 0===e?new d(r.a.Information):null===e?o.a.instance:e.log?e:new d(e)}var p=function(){function e(e,t){this.subject=e,this.observer=t}return e.prototype.dispose=function(){var e=this.subject.observers.indexOf(this.observer);e>-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t);var r,o,i=n(3),a=n(4),s=n(43),c=n(0),u=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return u(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise(function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var s=e.headers;s&&Object.keys(s).forEach(function(e){o.setRequestHeader(e,s[e])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new a.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(c.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(c.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(a.a),f=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new s.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(a.a),p=n(44);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t<n.length;t++){n[t].next(e)}},e.prototype.error=function(e){for(var t=0,n=this.observers;t<n.length;t++){var r=n[t];r.error&&r.error(e)}},e.prototype.complete=function(){for(var e=0,t=this.observers;e<t.length;e++){var n=t[e];n.complete&&n.complete()}},e.prototype.subscribe=function(e){return this.observers.push(e),new g.d(this,e)},e}(),v=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},b=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},m=3e4,w=15e3;!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(d||(d={}));var E,S,C=function(){function e(e,t,n,r){var i=this;g.a.isRequired(e,"connection"),g.a.isRequired(t,"logger"),g.a.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=m,this.keepAliveIntervalInMilliseconds=w,this.logger=t,this.protocol=n,this.connection=e,this.reconnectPolicy=r,this.handshakeProtocol=new p.a,this.connection.onreceive=function(e){return i.processIncomingData(e)},this.connection.onclose=function(e){return i.connectionClosed(e)},this.callbacks={},this.methods={},this.closedCallbacks=[],this.reconnectingCallbacks=[],this.reconnectedCallbacks=[],this.invocationId=0,this.receivedHandshakeResponse=!1,this.connectionState=d.Disconnected,this.connectionStarted=!1,this.cachedPingMessage=this.protocol.writeMessage({type:o.Ping})}return e.create=function(t,n,r,o){return new e(t,n,r,o)},Object.defineProperty(e.prototype,"state",{get:function(){return this.connectionState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connectionId",{get:function(){return this.connection&&this.connection.connectionId||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){return this.connection.baseUrl||""},set:function(e){if(this.connectionState!==d.Disconnected&&this.connectionState!==d.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e},enumerable:!0,configurable:!0}),e.prototype.start=function(){return this.startPromise=this.startWithStateTransitions(),this.startPromise},e.prototype.startWithStateTransitions=function(){return v(this,void 0,void 0,function(){var e;return b(this,function(t){switch(t.label){case 0:if(this.connectionState!==d.Disconnected)return[2,Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."))];this.connectionState=d.Connecting,this.logger.log(c.a.Debug,"Starting HubConnection."),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.startInternal()];case 2:return t.sent(),this.connectionState=d.Connected,this.connectionStarted=!0,this.logger.log(c.a.Debug,"HubConnection connected successfully."),[3,4];case 3:return e=t.sent(),this.connectionState=d.Disconnected,this.logger.log(c.a.Debug,"HubConnection failed to start successfully because of error '"+e+"'."),[2,Promise.reject(e)];case 4:return[2]}})})},e.prototype.startInternal=function(){return v(this,void 0,void 0,function(){var e,t,n,r=this;return b(this,function(o){switch(o.label){case 0:return this.stopDuringStartError=void 0,this.receivedHandshakeResponse=!1,e=new Promise(function(e,t){r.handshakeResolver=e,r.handshakeRejecter=t}),[4,this.connection.start(this.protocol.transferFormat)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,5,,7]),t={protocol:this.protocol.name,version:this.protocol.version},this.logger.log(c.a.Debug,"Sending handshake request."),[4,this.sendMessage(this.handshakeProtocol.writeHandshakeRequest(t))];case 3:return o.sent(),this.logger.log(c.a.Information,"Using HubProtocol '"+this.protocol.name+"'."),this.cleanupTimeout(),this.resetTimeoutPeriod(),this.resetKeepAliveInterval(),[4,e];case 4:if(o.sent(),this.stopDuringStartError)throw this.stopDuringStartError;return[3,7];case 5:return n=o.sent(),this.logger.log(c.a.Debug,"Hub handshake failed with error '"+n+"' during start(). Stopping HubConnection."),this.cleanupTimeout(),this.cleanupPingTimer(),[4,this.connection.stop(n)];case 6:throw o.sent(),n;case 7:return[2]}})})},e.prototype.stop=function(){return v(this,void 0,void 0,function(){var e;return b(this,function(t){switch(t.label){case 0:return e=this.startPromise,this.stopPromise=this.stopInternal(),[4,this.stopPromise];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,e];case 3:return t.sent(),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}})})},e.prototype.stopInternal=function(e){return this.connectionState===d.Disconnected?(this.logger.log(c.a.Debug,"Call to HubConnection.stop("+e+") ignored because it is already in the disconnected state."),Promise.resolve()):this.connectionState===d.Disconnecting?(this.logger.log(c.a.Debug,"Call to HttpConnection.stop("+e+") ignored because the connection is already in the disconnecting state."),this.stopPromise):(this.connectionState=d.Disconnecting,this.logger.log(c.a.Debug,"Stopping HubConnection."),this.reconnectDelayHandle?(this.logger.log(c.a.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this.reconnectDelayHandle),this.reconnectDelayHandle=void 0,this.completeClose(),Promise.resolve()):(this.cleanupTimeout(),this.cleanupPingTimer(),this.stopDuringStartError=e||new Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(e)))},e.prototype.stream=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i,a=this.replaceStreamingParams(n),s=a[0],c=a[1],u=this.createStreamInvocation(e,n,c),l=new y;return l.cancelCallback=function(){var e=t.createCancelInvocation(u.invocationId);return delete t.callbacks[u.invocationId],i.then(function(){return t.sendWithProtocol(e)})},this.callbacks[u.invocationId]=function(e,t){t?l.error(t):e&&(e.type===o.Completion?e.error?l.error(new Error(e.error)):l.complete():l.next(e.item))},i=this.sendWithProtocol(u).catch(function(e){l.error(e),delete t.callbacks[u.invocationId]}),this.launchStreams(s,i),l},e.prototype.sendMessage=function(e){return this.resetKeepAliveInterval(),this.connection.send(e)},e.prototype.sendWithProtocol=function(e){return this.sendMessage(this.protocol.writeMessage(e))},e.prototype.send=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.replaceStreamingParams(t),o=r[0],i=r[1],a=this.sendWithProtocol(this.createInvocation(e,t,!0,i));return this.launchStreams(o,a),a},e.prototype.invoke=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.replaceStreamingParams(n),a=i[0],s=i[1],c=this.createInvocation(e,n,!1,s);return new Promise(function(e,n){t.callbacks[c.invocationId]=function(t,r){r?n(r):t&&(t.type===o.Completion?t.error?n(new Error(t.error)):e(t.result):n(new Error("Unexpected message type: "+t.type)))};var r=t.sendWithProtocol(c).catch(function(e){n(e),delete t.callbacks[c.invocationId]});t.launchStreams(a,r)})},e.prototype.on=function(e,t){e&&t&&(e=e.toLowerCase(),this.methods[e]||(this.methods[e]=[]),-1===this.methods[e].indexOf(t)&&this.methods[e].push(t))},e.prototype.off=function(e,t){if(e){e=e.toLowerCase();var n=this.methods[e];if(n)if(t){var r=n.indexOf(t);-1!==r&&(n.splice(r,1),0===n.length&&delete this.methods[e])}else delete this.methods[e]}},e.prototype.onclose=function(e){e&&this.closedCallbacks.push(e)},e.prototype.onreconnecting=function(e){e&&this.reconnectingCallbacks.push(e)},e.prototype.onreconnected=function(e){e&&this.reconnectedCallbacks.push(e)},e.prototype.processIncomingData=function(e){if(this.cleanupTimeout(),this.receivedHandshakeResponse||(e=this.processHandshakeResponse(e),this.receivedHandshakeResponse=!0),e)for(var t=0,n=this.protocol.parseMessages(e,this.logger);t<n.length;t++){var r=n[t];switch(r.type){case o.Invocation:this.invokeClientMethod(r);break;case o.StreamItem:case o.Completion:var i=this.callbacks[r.invocationId];i&&(r.type===o.Completion&&delete this.callbacks[r.invocationId],i(r));break;case o.Ping:break;case o.Close:this.logger.log(c.a.Information,"Close message received from server.");var a=r.error?new Error("Server returned an error on close: "+r.error):void 0;!0===r.allowReconnect?this.connection.stop(a):this.stopPromise=this.stopInternal(a);break;default:this.logger.log(c.a.Warning,"Invalid message type: "+r.type+".")}}this.resetTimeoutPeriod()},e.prototype.processHandshakeResponse=function(e){var t,n,r;try{r=(t=this.handshakeProtocol.parseHandshakeResponse(e))[0],n=t[1]}catch(e){var o="Error parsing handshake response: "+e;this.logger.log(c.a.Error,o);var i=new Error(o);throw this.handshakeRejecter(i),i}if(n.error){o="Server returned handshake error: "+n.error;this.logger.log(c.a.Error,o);i=new Error(o);throw this.handshakeRejecter(i),i}return this.logger.log(c.a.Debug,"Server handshake complete."),this.handshakeResolver(),r},e.prototype.resetKeepAliveInterval=function(){var e=this;this.cleanupPingTimer(),this.pingServerHandle=setTimeout(function(){return v(e,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(this.connectionState!==d.Connected)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.sendMessage(this.cachedPingMessage)];case 2:return e.sent(),[3,4];case 3:return e.sent(),this.cleanupPingTimer(),[3,4];case 4:return[2]}})})},this.keepAliveIntervalInMilliseconds)},e.prototype.resetTimeoutPeriod=function(){var e=this;this.connection.features&&this.connection.features.inherentKeepAlive||(this.timeoutHandle=setTimeout(function(){return e.serverTimeout()},this.serverTimeoutInMilliseconds))},e.prototype.serverTimeout=function(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))},e.prototype.invokeClientMethod=function(e){var t=this,n=this.methods[e.target.toLowerCase()];if(n){try{n.forEach(function(n){return n.apply(t,e.arguments)})}catch(t){this.logger.log(c.a.Error,"A callback for the method "+e.target.toLowerCase()+" threw error '"+t+"'.")}if(e.invocationId){var r="Server requested a response, which is not supported in this version of the client.";this.logger.log(c.a.Error,r),this.stopPromise=this.stopInternal(new Error(r))}}else this.logger.log(c.a.Warning,"No client method with the name '"+e.target+"' found.")},e.prototype.connectionClosed=function(e){this.logger.log(c.a.Debug,"HubConnection.connectionClosed("+e+") called while in state "+this.connectionState+"."),this.stopDuringStartError=this.stopDuringStartError||e||new Error("The underlying connection was closed before the hub handshake could complete."),this.handshakeResolver&&this.handshakeResolver(),this.cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this.cleanupTimeout(),this.cleanupPingTimer(),this.connectionState===d.Disconnecting?this.completeClose(e):this.connectionState===d.Connected&&this.reconnectPolicy?this.reconnect(e):this.connectionState===d.Connected&&this.completeClose(e)},e.prototype.completeClose=function(e){var t=this;if(this.connectionStarted){this.connectionState=d.Disconnected,this.connectionStarted=!1;try{this.closedCallbacks.forEach(function(n){return n.apply(t,[e])})}catch(t){this.logger.log(c.a.Error,"An onclose callback called with error '"+e+"' threw error '"+t+"'.")}}},e.prototype.reconnect=function(e){return v(this,void 0,void 0,function(){var t,n,r,o,i,a=this;return b(this,function(s){switch(s.label){case 0:if(t=Date.now(),n=0,r=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),null===(o=this.getNextRetryDelay(n++,0,r)))return this.logger.log(c.a.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this.completeClose(e),[2];if(this.connectionState=d.Reconnecting,e?this.logger.log(c.a.Information,"Connection reconnecting because of error '"+e+"'."):this.logger.log(c.a.Information,"Connection reconnecting."),this.onreconnecting){try{this.reconnectingCallbacks.forEach(function(t){return t.apply(a,[e])})}catch(t){this.logger.log(c.a.Error,"An onreconnecting callback called with error '"+e+"' threw error '"+t+"'.")}if(this.connectionState!==d.Reconnecting)return this.logger.log(c.a.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting."),[2]}s.label=1;case 1:return null===o?[3,7]:(this.logger.log(c.a.Information,"Reconnect attempt number "+n+" will start in "+o+" ms."),[4,new Promise(function(e){a.reconnectDelayHandle=setTimeout(e,o)})]);case 2:if(s.sent(),this.reconnectDelayHandle=void 0,this.connectionState!==d.Reconnecting)return this.logger.log(c.a.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting."),[2];s.label=3;case 3:return s.trys.push([3,5,,6]),[4,this.startInternal()];case 4:if(s.sent(),this.connectionState=d.Connected,this.logger.log(c.a.Information,"HubConnection reconnected successfully."),this.onreconnected)try{this.reconnectedCallbacks.forEach(function(e){return e.apply(a,[a.connection.connectionId])})}catch(e){this.logger.log(c.a.Error,"An onreconnected callback called with connectionId '"+this.connection.connectionId+"; threw error '"+e+"'.")}return[2];case 5:return i=s.sent(),this.logger.log(c.a.Information,"Reconnect attempt failed because of error '"+i+"'."),this.connectionState!==d.Reconnecting?(this.logger.log(c.a.Debug,"Connection left the reconnecting state during reconnect attempt. Done reconnecting."),[2]):(r=i instanceof Error?i:new Error(i.toString()),o=this.getNextRetryDelay(n++,Date.now()-t,r),[3,6]);case 6:return[3,1];case 7:return this.logger.log(c.a.Information,"Reconnect retries have been exhausted after "+(Date.now()-t)+" ms and "+n+" failed attempts. Connection disconnecting."),this.completeClose(),[2]}})})},e.prototype.getNextRetryDelay=function(e,t,n){try{return this.reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this.logger.log(c.a.Error,"IRetryPolicy.nextRetryDelayInMilliseconds("+e+", "+t+") threw error '"+n+"'."),null}},e.prototype.cancelCallbacksWithError=function(e){var t=this.callbacks;this.callbacks={},Object.keys(t).forEach(function(n){(0,t[n])(null,e)})},e.prototype.cleanupPingTimer=function(){this.pingServerHandle&&clearTimeout(this.pingServerHandle)},e.prototype.cleanupTimeout=function(){this.timeoutHandle&&clearTimeout(this.timeoutHandle)},e.prototype.createInvocation=function(e,t,n,r){if(n)return{arguments:t,streamIds:r,target:e,type:o.Invocation};var i=this.invocationId;return this.invocationId++,{arguments:t,invocationId:i.toString(),streamIds:r,target:e,type:o.Invocation}},e.prototype.launchStreams=function(e,t){var n=this;if(0!==e.length){t||(t=Promise.resolve());var r=function(r){e[r].subscribe({complete:function(){t=t.then(function(){return n.sendWithProtocol(n.createCompletionMessage(r))})},error:function(e){var o;o=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then(function(){return n.sendWithProtocol(n.createCompletionMessage(r,o))})},next:function(e){t=t.then(function(){return n.sendWithProtocol(n.createStreamItemMessage(r,e))})}})};for(var o in e)r(o)}},e.prototype.replaceStreamingParams=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var o=e[r];if(this.isObservable(o)){var i=this.invocationId;this.invocationId++,t[i]=o,n.push(i.toString()),e.splice(r,1)}}return[t,n]},e.prototype.isObservable=function(e){return e&&e.subscribe&&"function"==typeof e.subscribe},e.prototype.createStreamInvocation=function(e,t,n){var r=this.invocationId;return this.invocationId++,{arguments:t,invocationId:r.toString(),streamIds:n,target:e,type:o.StreamInvocation}},e.prototype.createCancelInvocation=function(e){return{invocationId:e,type:o.CancelInvocation}},e.prototype.createStreamItemMessage=function(e,t){return{invocationId:e,item:t,type:o.StreamItem}},e.prototype.createCompletionMessage=function(e,t,n){return t?{error:t,invocationId:e,type:o.Completion}:{invocationId:e,result:n,type:o.Completion}},e}(),_=[0,2e3,1e4,3e4,null],I=function(){function e(e){this.retryDelays=void 0!==e?e.concat([null]):_}return e.prototype.nextRetryDelayInMilliseconds=function(e){return this.retryDelays[e.previousRetryCount]},e}();!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(E||(E={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(S||(S={}));var T=function(){function e(){this.isAborted=!1,this.onabort=null}return e.prototype.abort=function(){this.isAborted||(this.isAborted=!0,this.onabort&&this.onabort())},Object.defineProperty(e.prototype,"signal",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aborted",{get:function(){return this.isAborted},enumerable:!0,configurable:!0}),e}(),k=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},P=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},x=function(){function e(e,t,n,r){this.httpClient=e,this.accessTokenFactory=t,this.logger=n,this.pollAbort=new T,this.logMessageContent=r,this.running=!1,this.onreceive=null,this.onclose=null}return Object.defineProperty(e.prototype,"pollAborted",{get:function(){return this.pollAbort.aborted},enumerable:!0,configurable:!0}),e.prototype.connect=function(e,t){return k(this,void 0,void 0,function(){var n,r,o,a;return P(this,function(s){switch(s.label){case 0:if(g.a.isRequired(e,"url"),g.a.isRequired(t,"transferFormat"),g.a.isIn(t,S,"transferFormat"),this.url=e,this.logger.log(c.a.Trace,"(LongPolling transport) Connecting."),t===S.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");return n={abortSignal:this.pollAbort.signal,headers:{},timeout:1e5},t===S.Binary&&(n.responseType="arraybuffer"),[4,this.getAccessToken()];case 1:return r=s.sent(),this.updateHeaderToken(n,r),o=e+"&_="+Date.now(),this.logger.log(c.a.Trace,"(LongPolling transport) polling: "+o+"."),[4,this.httpClient.get(o,n)];case 2:return 200!==(a=s.sent()).statusCode?(this.logger.log(c.a.Error,"(LongPolling transport) Unexpected response code: "+a.statusCode+"."),this.closeError=new i.b(a.statusText||"",a.statusCode),this.running=!1):this.running=!0,this.receiving=this.poll(this.url,n),[2]}})})},e.prototype.getAccessToken=function(){return k(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:return this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:return[2,e.sent()];case 2:return[2,null]}})})},e.prototype.updateHeaderToken=function(e,t){e.headers||(e.headers={}),t?e.headers.Authorization="Bearer "+t:e.headers.Authorization&&delete e.headers.Authorization},e.prototype.poll=function(e,t){return k(this,void 0,void 0,function(){var n,r,o,a;return P(this,function(s){switch(s.label){case 0:s.trys.push([0,,8,9]),s.label=1;case 1:return this.running?[4,this.getAccessToken()]:[3,7];case 2:n=s.sent(),this.updateHeaderToken(t,n),s.label=3;case 3:return s.trys.push([3,5,,6]),r=e+"&_="+Date.now(),this.logger.log(c.a.Trace,"(LongPolling transport) polling: "+r+"."),[4,this.httpClient.get(r,t)];case 4:return 204===(o=s.sent()).statusCode?(this.logger.log(c.a.Information,"(LongPolling transport) Poll terminated by server."),this.running=!1):200!==o.statusCode?(this.logger.log(c.a.Error,"(LongPolling transport) Unexpected response code: "+o.statusCode+"."),this.closeError=new i.b(o.statusText||"",o.statusCode),this.running=!1):o.content?(this.logger.log(c.a.Trace,"(LongPolling transport) data received. "+Object(g.f)(o.content,this.logMessageContent)+"."),this.onreceive&&this.onreceive(o.content)):this.logger.log(c.a.Trace,"(LongPolling transport) Poll timed out, reissuing."),[3,6];case 5:return a=s.sent(),this.running?a instanceof i.c?this.logger.log(c.a.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this.closeError=a,this.running=!1):this.logger.log(c.a.Trace,"(LongPolling transport) Poll errored after shutdown: "+a.message),[3,6];case 6:return[3,1];case 7:return[3,9];case 8:return this.logger.log(c.a.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this.raiseOnClose(),[7];case 9:return[2]}})})},e.prototype.send=function(e){return k(this,void 0,void 0,function(){return P(this,function(t){return this.running?[2,Object(g.h)(this.logger,"LongPolling",this.httpClient,this.url,this.accessTokenFactory,e,this.logMessageContent)]:[2,Promise.reject(new Error("Cannot send until the transport is connected"))]})})},e.prototype.stop=function(){return k(this,void 0,void 0,function(){var e,t;return P(this,function(n){switch(n.label){case 0:this.logger.log(c.a.Trace,"(LongPolling transport) Stopping polling."),this.running=!1,this.pollAbort.abort(),n.label=1;case 1:return n.trys.push([1,,5,6]),[4,this.receiving];case 2:return n.sent(),this.logger.log(c.a.Trace,"(LongPolling transport) sending DELETE request to "+this.url+"."),e={headers:{}},[4,this.getAccessToken()];case 3:return t=n.sent(),this.updateHeaderToken(e,t),[4,this.httpClient.delete(this.url,e)];case 4:return n.sent(),this.logger.log(c.a.Trace,"(LongPolling transport) DELETE request sent."),[3,6];case 5:return this.logger.log(c.a.Trace,"(LongPolling transport) Stop finished."),this.raiseOnClose(),[7];case 6:return[2]}})})},e.prototype.raiseOnClose=function(){if(this.onclose){var e="(LongPolling transport) Firing onclose event.";this.closeError&&(e+=" Error: "+this.closeError),this.logger.log(c.a.Trace,e),this.onclose(this.closeError)}},e}(),R=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},D=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},O=function(){function e(e,t,n,r,o){this.httpClient=e,this.accessTokenFactory=t,this.logger=n,this.logMessageContent=r,this.eventSourceConstructor=o,this.onreceive=null,this.onclose=null}return e.prototype.connect=function(e,t){return R(this,void 0,void 0,function(){var n,r=this;return D(this,function(o){switch(o.label){case 0:return g.a.isRequired(e,"url"),g.a.isRequired(t,"transferFormat"),g.a.isIn(t,S,"transferFormat"),this.logger.log(c.a.Trace,"(SSE transport) Connecting."),this.url=e,this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:(n=o.sent())&&(e+=(e.indexOf("?")<0?"?":"&")+"access_token="+encodeURIComponent(n)),o.label=2;case 2:return[2,new Promise(function(n,o){var i=!1;if(t===S.Text){var a;if(g.c.isBrowser||g.c.isWebWorker)a=new r.eventSourceConstructor(e,{withCredentials:!0});else{var s=r.httpClient.getCookieString(e);a=new r.eventSourceConstructor(e,{withCredentials:!0,headers:{Cookie:s}})}try{a.onmessage=function(e){if(r.onreceive)try{r.logger.log(c.a.Trace,"(SSE transport) data received. "+Object(g.f)(e.data,r.logMessageContent)+"."),r.onreceive(e.data)}catch(e){return void r.close(e)}},a.onerror=function(e){var t=new Error(e.data||"Error occurred");i?r.close(t):o(t)},a.onopen=function(){r.logger.log(c.a.Information,"SSE connected to "+r.url),r.eventSource=a,i=!0,n()}}catch(e){return void o(e)}}else o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})]}})})},e.prototype.send=function(e){return R(this,void 0,void 0,function(){return D(this,function(t){return this.eventSource?[2,Object(g.h)(this.logger,"SSE",this.httpClient,this.url,this.accessTokenFactory,e,this.logMessageContent)]:[2,Promise.reject(new Error("Cannot send until the transport is connected"))]})})},e.prototype.stop=function(){return this.close(),Promise.resolve()},e.prototype.close=function(e){this.eventSource&&(this.eventSource.close(),this.eventSource=void 0,this.onclose&&this.onclose(e))},e}(),L=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},M=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},A=function(){function e(e,t,n,r,o){this.logger=n,this.accessTokenFactory=t,this.logMessageContent=r,this.webSocketConstructor=o,this.httpClient=e,this.onreceive=null,this.onclose=null}return e.prototype.connect=function(e,t){return L(this,void 0,void 0,function(){var n,r=this;return M(this,function(o){switch(o.label){case 0:return g.a.isRequired(e,"url"),g.a.isRequired(t,"transferFormat"),g.a.isIn(t,S,"transferFormat"),this.logger.log(c.a.Trace,"(WebSockets transport) Connecting."),this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:(n=o.sent())&&(e+=(e.indexOf("?")<0?"?":"&")+"access_token="+encodeURIComponent(n)),o.label=2;case 2:return[2,new Promise(function(n,o){var i;e=e.replace(/^http/,"ws");var a=r.httpClient.getCookieString(e),s=!1;g.c.isNode&&a&&(i=new r.webSocketConstructor(e,void 0,{headers:{Cookie:""+a}})),i||(i=new r.webSocketConstructor(e)),t===S.Binary&&(i.binaryType="arraybuffer"),i.onopen=function(t){r.logger.log(c.a.Information,"WebSocket connected to "+e+"."),r.webSocket=i,s=!0,n()},i.onerror=function(e){var t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:new Error("There was an error with the transport."),o(t)},i.onmessage=function(e){r.logger.log(c.a.Trace,"(WebSockets transport) data received. "+Object(g.f)(e.data,r.logMessageContent)+"."),r.onreceive&&r.onreceive(e.data)},i.onclose=function(e){if(s)r.close(e);else{var t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:new Error("There was an error with the transport."),o(t)}}})]}})})},e.prototype.send=function(e){return this.webSocket&&this.webSocket.readyState===this.webSocketConstructor.OPEN?(this.logger.log(c.a.Trace,"(WebSockets transport) sending data. "+Object(g.f)(e,this.logMessageContent)+"."),this.webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")},e.prototype.stop=function(){return this.webSocket&&(this.webSocket.onclose=function(){},this.webSocket.onmessage=function(){},this.webSocket.onerror=function(){},this.webSocket.close(),this.webSocket=void 0,this.close(void 0)),Promise.resolve()},e.prototype.close=function(e){this.logger.log(c.a.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!e||!1!==e.wasClean&&1e3===e.code?this.onclose():this.onclose(new Error("WebSocket closed with status code: "+e.code+" ("+e.reason+").")))},e}(),B=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},j=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},U=null,N=null;if(g.c.isNode){var F=require;U=F("ws"),N=F("eventsource")}var H=function(){function e(e,t){void 0===t&&(t={}),this.features={},this.negotiateVersion=1,g.a.isRequired(e,"url"),this.logger=Object(g.e)(t.logger),this.baseUrl=this.resolveUrl(e),(t=t||{}).logMessageContent=t.logMessageContent||!1,g.c.isNode||"undefined"==typeof WebSocket||t.WebSocket?g.c.isNode&&!t.WebSocket&&U&&(t.WebSocket=U):t.WebSocket=WebSocket,g.c.isNode||"undefined"==typeof EventSource||t.EventSource?g.c.isNode&&!t.EventSource&&void 0!==N&&(t.EventSource=N):t.EventSource=EventSource,this.httpClient=t.httpClient||new h(this.logger),this.connectionState="Disconnected",this.connectionStarted=!1,this.options=t,this.onreceive=null,this.onclose=null}return e.prototype.start=function(e){return B(this,void 0,void 0,function(){var t;return j(this,function(n){switch(n.label){case 0:return e=e||S.Binary,g.a.isIn(e,S,"transferFormat"),this.logger.log(c.a.Debug,"Starting connection with transfer format '"+S[e]+"'."),"Disconnected"!==this.connectionState?[2,Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."))]:(this.connectionState="Connecting ",this.startInternalPromise=this.startInternal(e),[4,this.startInternalPromise]);case 1:return n.sent(),"Disconnecting"!==this.connectionState?[3,3]:(t="Failed to start the HttpConnection before stop() was called.",this.logger.log(c.a.Error,t),[4,this.stopPromise]);case 2:return n.sent(),[2,Promise.reject(new Error(t))];case 3:if("Connected"!==this.connectionState)return t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!",this.logger.log(c.a.Error,t),[2,Promise.reject(new Error(t))];n.label=4;case 4:return this.connectionStarted=!0,[2]}})})},e.prototype.send=function(e){return"Connected"!==this.connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this.sendQueue||(this.sendQueue=new q(this.transport)),this.sendQueue.send(e))},e.prototype.stop=function(e){return B(this,void 0,void 0,function(){var t=this;return j(this,function(n){switch(n.label){case 0:return"Disconnected"===this.connectionState?(this.logger.log(c.a.Debug,"Call to HttpConnection.stop("+e+") ignored because the connection is already in the disconnected state."),[2,Promise.resolve()]):"Disconnecting"===this.connectionState?(this.logger.log(c.a.Debug,"Call to HttpConnection.stop("+e+") ignored because the connection is already in the disconnecting state."),[2,this.stopPromise]):(this.connectionState="Disconnecting",this.stopPromise=new Promise(function(e){t.stopPromiseResolver=e}),[4,this.stopInternal(e)]);case 1:return n.sent(),[4,this.stopPromise];case 2:return n.sent(),[2]}})})},e.prototype.stopInternal=function(e){return B(this,void 0,void 0,function(){var t,n;return j(this,function(r){switch(r.label){case 0:this.stopError=e,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.startInternalPromise];case 2:return r.sent(),[3,4];case 3:return r.sent(),[3,4];case 4:if(!this.sendQueue)return[3,9];r.label=5;case 5:return r.trys.push([5,7,,8]),[4,this.sendQueue.stop()];case 6:return r.sent(),[3,8];case 7:return t=r.sent(),this.logger.log(c.a.Error,"TransportSendQueue.stop() threw error '"+t+"'."),[3,8];case 8:this.sendQueue=void 0,r.label=9;case 9:if(!this.transport)return[3,14];r.label=10;case 10:return r.trys.push([10,12,,13]),[4,this.transport.stop()];case 11:return r.sent(),[3,13];case 12:return n=r.sent(),this.logger.log(c.a.Error,"HttpConnection.transport.stop() threw error '"+n+"'."),this.stopConnection(),[3,13];case 13:return this.transport=void 0,[3,15];case 14:this.logger.log(c.a.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed."),this.stopConnection(),r.label=15;case 15:return[2]}})})},e.prototype.startInternal=function(e){return B(this,void 0,void 0,function(){var t,n,r,o,i,a;return j(this,function(s){switch(s.label){case 0:t=this.baseUrl,this.accessTokenFactory=this.options.accessTokenFactory,s.label=1;case 1:return s.trys.push([1,12,,13]),this.options.skipNegotiation?this.options.transport!==E.WebSockets?[3,3]:(this.transport=this.constructTransport(E.WebSockets),[4,this.startTransport(t,e)]):[3,5];case 2:return s.sent(),[3,4];case 3:throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");case 4:return[3,11];case 5:n=null,r=0,o=function(){var e;return j(this,function(o){switch(o.label){case 0:return[4,i.getNegotiationResponse(t)];case 1:if(n=o.sent(),"Disconnecting"===i.connectionState||"Disconnected"===i.connectionState)throw new Error("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");return n.url&&(t=n.url),n.accessToken&&(e=n.accessToken,i.accessTokenFactory=function(){return e}),r++,[2]}})},i=this,s.label=6;case 6:return[5,o()];case 7:s.sent(),s.label=8;case 8:if(n.url&&r<100)return[3,6];s.label=9;case 9:if(100===r&&n.url)throw new Error("Negotiate redirection limit exceeded.");return[4,this.createTransport(t,this.options.transport,n,e)];case 10:s.sent(),s.label=11;case 11:return this.transport instanceof x&&(this.features.inherentKeepAlive=!0),"Connecting "===this.connectionState&&(this.logger.log(c.a.Debug,"The HttpConnection connected successfully."),this.connectionState="Connected"),[3,13];case 12:return a=s.sent(),this.logger.log(c.a.Error,"Failed to start the connection: "+a),this.connectionState="Disconnected",this.transport=void 0,[2,Promise.reject(a)];case 13:return[2]}})})},e.prototype.getNegotiationResponse=function(e){return B(this,void 0,void 0,function(){var t,n,r,o,i,a,s;return j(this,function(u){switch(u.label){case 0:return this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:(r=u.sent())&&((t={}).Authorization="Bearer "+r,n=t),u.label=2;case 2:o=this.resolveNegotiateUrl(e),this.logger.log(c.a.Debug,"Sending negotiation request: "+o+"."),u.label=3;case 3:return u.trys.push([3,5,,6]),[4,this.httpClient.post(o,{content:"",headers:n})];case 4:return 200!==(i=u.sent()).statusCode?[2,Promise.reject(new Error("Unexpected status code returned from negotiate "+i.statusCode))]:((!(a=JSON.parse(i.content)).negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),[2,a]);case 5:return s=u.sent(),this.logger.log(c.a.Error,"Failed to complete negotiation with the server: "+s),[2,Promise.reject(s)];case 6:return[2]}})})},e.prototype.createConnectUrl=function(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+"id="+t:e},e.prototype.createTransport=function(e,t,n,r){return B(this,void 0,void 0,function(){var o,i,a,s,u,l,f,h,p,d,g;return j(this,function(y){switch(y.label){case 0:return o=this.createConnectUrl(e,n.connectionToken),this.isITransport(t)?(this.logger.log(c.a.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,[4,this.startTransport(o,r)]):[3,2];case 1:return y.sent(),this.connectionId=n.connectionId,[2];case 2:i=[],a=n.availableTransports||[],s=n,u=0,l=a,y.label=3;case 3:return u<l.length?(f=l[u],(h=this.resolveTransportOrError(f,t,r))instanceof Error?(i.push(f.transport+" failed: "+h),[3,12]):[3,4]):[3,13];case 4:if(!this.isITransport(h))return[3,12];if(this.transport=h,s)return[3,9];y.label=5;case 5:return y.trys.push([5,7,,8]),[4,this.getNegotiationResponse(e)];case 6:return s=y.sent(),[3,8];case 7:return p=y.sent(),[2,Promise.reject(p)];case 8:o=this.createConnectUrl(e,s.connectionToken),y.label=9;case 9:return y.trys.push([9,11,,12]),[4,this.startTransport(o,r)];case 10:return y.sent(),this.connectionId=s.connectionId,[2];case 11:return d=y.sent(),this.logger.log(c.a.Error,"Failed to start the transport '"+f.transport+"': "+d),s=void 0,i.push(f.transport+" failed: "+d),"Connecting "!==this.connectionState?(g="Failed to select transport before stop() was called.",this.logger.log(c.a.Debug,g),[2,Promise.reject(new Error(g))]):[3,12];case 12:return u++,[3,3];case 13:return i.length>0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case E.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new A(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case E.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new O(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case E.LongPolling:return new x(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=E[e.transport];if(null==r)return this.logger.log(c.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it was disabled by the client."),new Error("'"+E[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return S[e]}).indexOf(n)>=0))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it does not support the requested transfer format '"+S[n]+"'."),new Error("'"+E[r]+"' does not support "+S[n]+".");if(r===E.WebSockets&&!this.options.WebSocket||r===E.ServerSentEvents&&!this.options.EventSource)return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it is not supported in your environment.'"),new Error("'"+E[r]+"' is not supported in your environment.");this.logger.log(c.a.Debug,"Selecting transport '"+E[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(c.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(c.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(c.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(c.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(c.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(c.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(c.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var q=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new W,this.transportResult=new W,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new W),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return B(this,void 0,void 0,function(){var t,n,r;return j(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new W,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o<i.length;o++){var a=i[o];n.set(new Uint8Array(a),r),r+=a.byteLength}return n},e}(),W=function(){function e(){var e=this;this.promise=new Promise(function(t,n){var r;return r=[t,n],e.resolver=r[0],e.rejecter=r[1],r})}return e.prototype.resolve=function(){this.resolver()},e.prototype.reject=function(e){this.rejecter(e)},e}(),z=n(7),Y=n(8),J="json",K=function(){function e(){this.name=J,this.version=1,this.transferFormat=S.Text}return e.prototype.parseMessages=function(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=z.a.instance);for(var n=[],r=0,i=Y.a.parse(e);r<i.length;r++){var a=i[r],s=JSON.parse(a);if("number"!=typeof s.type)throw new Error("Invalid payload.");switch(s.type){case o.Invocation:this.isInvocationMessage(s);break;case o.StreamItem:this.isStreamItemMessage(s);break;case o.Completion:this.isCompletionMessage(s);break;case o.Ping:case o.Close:break;default:t.log(c.a.Information,"Unknown message type '"+s.type+"' ignored.");continue}n.push(s)}return n},e.prototype.writeMessage=function(e){return Y.a.write(JSON.stringify(e))},e.prototype.isInvocationMessage=function(e){this.assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this.assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")},e.prototype.isStreamItemMessage=function(e){if(this.assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")},e.prototype.isCompletionMessage=function(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this.assertNotEmptyString(e.error,"Invalid payload for Completion message."),this.assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")},e.prototype.assertNotEmptyString=function(e,t){if("string"!=typeof e||""===e)throw new Error(t)},e}(),V=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X={trace:c.a.Trace,debug:c.a.Debug,info:c.a.Information,information:c.a.Information,warn:c.a.Warning,warning:c.a.Warning,error:c.a.Error,critical:c.a.Critical,none:c.a.None};var G=function(){function e(){}return e.prototype.configureLogging=function(e){if(g.a.isRequired(e,"logging"),void 0!==e.log)this.logger=e;else if("string"==typeof e){var t=function(e){var t=X[e.toLowerCase()];if(void 0!==t)return t;throw new Error("Unknown log level: "+e)}(e);this.logger=new g.b(t)}else this.logger=new g.b(e);return this},e.prototype.withUrl=function(e,t){return g.a.isRequired(e,"url"),this.url=e,this.httpConnectionOptions=V({},this.httpConnectionOptions,"object"==typeof t?t:{transport:t}),this},e.prototype.withHubProtocol=function(e){return g.a.isRequired(e,"protocol"),this.protocol=e,this},e.prototype.withAutomaticReconnect=function(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new I(e):this.reconnectPolicy=e:this.reconnectPolicy=new I,this},e.prototype.build=function(){var e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");var t=new H(this.url,e);return C.create(t,this.logger||z.a.instance,this.protocol||new K,this.reconnectPolicy)},e}();n.d(t,"VERSION",function(){return Q}),n.d(t,"AbortError",function(){return i.a}),n.d(t,"HttpError",function(){return i.b}),n.d(t,"TimeoutError",function(){return i.c}),n.d(t,"HttpClient",function(){return a.a}),n.d(t,"HttpResponse",function(){return a.b}),n.d(t,"DefaultHttpClient",function(){return h}),n.d(t,"HubConnection",function(){return C}),n.d(t,"HubConnectionState",function(){return d}),n.d(t,"HubConnectionBuilder",function(){return G}),n.d(t,"MessageType",function(){return o}),n.d(t,"LogLevel",function(){return c.a}),n.d(t,"HttpTransportType",function(){return E}),n.d(t,"TransferFormat",function(){return S}),n.d(t,"NullLogger",function(){return z.a}),n.d(t,"JsonHubProtocol",function(){return K}),n.d(t,"Subject",function(){return y});var Q="0.0.0-DEV_BUILD"},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"a",function(){return s});var r,o=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){function t(t,n){var r=this,o=this.constructor.prototype;return(r=e.call(this,t)||this).statusCode=n,r.__proto__=o,r}return o(t,e),t}(Error),a=function(e){function t(t){void 0===t&&(t="A timeout occurred.");var n=this,r=this.constructor.prototype;return(n=e.call(this,t)||this).__proto__=r,n}return o(t,e),t}(Error),s=function(e){function t(t){void 0===t&&(t="An abort occurred.");var n=this,r=this.constructor.prototype;return(n=e.call(this,t)||this).__proto__=r,n}return o(t,e),t}(Error)},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o=function(){return function(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}}(),i=function(){function e(){}return e.prototype.get=function(e,t){return this.send(r({},t,{method:"GET",url:e}))},e.prototype.post=function(e,t){return this.send(r({},t,{method:"POST",url:e}))},e.prototype.delete=function(e,t){return this.send(r({},t,{method:"DELETE",url:e}))},e.prototype.getCookieString=function(e){return""},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),i={},a=!1;function s(e,t,n){var o=i[e];o||(o=i[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=s,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");s(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=i[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),s=r.values(o),c=r.count(o),u=t.referenceFrames(),l=r.values(u),f=t.diffReader,h=0;h<c;h++){var p=t.updatedComponentsEntry(s,h),d=f.componentId(p),g=f.edits(p);n.updateComponent(t,d,g,l)}var y=t.disposedComponentIds(),v=r.values(y),b=r.count(y);for(h=0;h<b;h++)d=t.disposedComponentIdsEntry(v,h),n.disposeComponent(d);var m=t.disposedEventHandlerIds(),w=r.values(m),E=r.count(m);for(h=0;h<E;h++){var S=t.disposedEventHandlerIdsEntry(w,h);n.disposeEventHandler(S)}a&&(a=!1,window.scrollTo&&window.scrollTo(0,0))},t.resetScrollAfterNextBatch=function(){a=!0}},function(e,t,n){"use strict";(function(e){ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=51)}([function(e,t,n){"use strict";var r;n.d(t,"a",function(){return r}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"c",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"g",function(){return l}),n.d(t,"h",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return p}),n.d(t,"b",function(){return d});var r=n(0),o=n(6),i=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},s=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},a=function(){function e(){}return e.isRequired=function(e,t){if(null==e)throw new Error("The '"+t+"' argument is required.")},e.isIn=function(e,t,n){if(!(e in t))throw new Error("Unknown "+n+" value: "+e+".")},e}(),u=function(){function e(){}return Object.defineProperty(e,"isBrowser",{get:function(){return"object"==typeof window},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isWebWorker",{get:function(){return"object"==typeof self&&"importScripts"in self},enumerable:!0,configurable:!0}),Object.defineProperty(e,"isNode",{get:function(){return!this.isBrowser&&!this.isWebWorker},enumerable:!0,configurable:!0}),e}();function c(e,t){var n="";return l(e)?(n="Binary data of length "+e.byteLength,t&&(n+=". Content: '"+function(e){var t=new Uint8Array(e),n="";return t.forEach(function(e){n+="0x"+(e<16?"0":"")+e.toString(16)+" "}),n.substr(0,n.length-1)}(e)+"'")):"string"==typeof e&&(n="String data of length "+e.length,t&&(n+=". Content: '"+e+"'")),n}function l(e){return e&&"undefined"!=typeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function f(e,t,n,o,a,u,f){return i(this,void 0,void 0,function(){var i,h,p,d,g;return s(this,function(s){switch(s.label){case 0:return a?[4,a()]:[3,2];case 1:(p=s.sent())&&((i={}).Authorization="Bearer "+p,h=i),s.label=2;case 2:return e.log(r.a.Trace,"("+t+" transport) sending data. "+c(u,f)+"."),d=l(u)?"arraybuffer":"text",[4,n.post(o,{content:u,headers:h,responseType:d})];case 3:return g=s.sent(),e.log(r.a.Trace,"("+t+" transport) request complete. Response status: "+g.statusCode+"."),[2]}})})}function h(e){return void 0===e?new d(r.a.Information):null===e?o.a.instance:e.log?e:new d(e)}var p=function(){function e(e,t){this.subject=e,this.observer=t}return e.prototype.dispose=function(){var e=this.subject.observers.indexOf(this.observer);e>-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t);var r,o,i=n(3),s=n(4),a=n(45),u=n(0),c=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return c(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise(function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var a=e.headers;a&&Object.keys(a).forEach(function(e){o.setRequestHeader(e,a[e])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new s.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(u.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(u.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(s.a),f=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new a.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(s.a),p=n(46);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t<n.length;t++){n[t].next(e)}},e.prototype.error=function(e){for(var t=0,n=this.observers;t<n.length;t++){var r=n[t];r.error&&r.error(e)}},e.prototype.complete=function(){for(var e=0,t=this.observers;e<t.length;e++){var n=t[e];n.complete&&n.complete()}},e.prototype.subscribe=function(e){return this.observers.push(e),new g.d(this,e)},e}(),v=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},b=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},m=3e4,w=15e3;!function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"}(d||(d={}));var E,S,_=function(){function e(e,t,n,r){var i=this;g.a.isRequired(e,"connection"),g.a.isRequired(t,"logger"),g.a.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=m,this.keepAliveIntervalInMilliseconds=w,this.logger=t,this.protocol=n,this.connection=e,this.reconnectPolicy=r,this.handshakeProtocol=new p.a,this.connection.onreceive=function(e){return i.processIncomingData(e)},this.connection.onclose=function(e){return i.connectionClosed(e)},this.callbacks={},this.methods={},this.closedCallbacks=[],this.reconnectingCallbacks=[],this.reconnectedCallbacks=[],this.invocationId=0,this.receivedHandshakeResponse=!1,this.connectionState=d.Disconnected,this.connectionStarted=!1,this.cachedPingMessage=this.protocol.writeMessage({type:o.Ping})}return e.create=function(t,n,r,o){return new e(t,n,r,o)},Object.defineProperty(e.prototype,"state",{get:function(){return this.connectionState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"connectionId",{get:function(){return this.connection&&this.connection.connectionId||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseUrl",{get:function(){return this.connection.baseUrl||""},set:function(e){if(this.connectionState!==d.Disconnected&&this.connectionState!==d.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e},enumerable:!0,configurable:!0}),e.prototype.start=function(){return this.startPromise=this.startWithStateTransitions(),this.startPromise},e.prototype.startWithStateTransitions=function(){return v(this,void 0,void 0,function(){var e;return b(this,function(t){switch(t.label){case 0:if(this.connectionState!==d.Disconnected)return[2,Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."))];this.connectionState=d.Connecting,this.logger.log(u.a.Debug,"Starting HubConnection."),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.startInternal()];case 2:return t.sent(),this.connectionState=d.Connected,this.connectionStarted=!0,this.logger.log(u.a.Debug,"HubConnection connected successfully."),[3,4];case 3:return e=t.sent(),this.connectionState=d.Disconnected,this.logger.log(u.a.Debug,"HubConnection failed to start successfully because of error '"+e+"'."),[2,Promise.reject(e)];case 4:return[2]}})})},e.prototype.startInternal=function(){return v(this,void 0,void 0,function(){var e,t,n,r=this;return b(this,function(o){switch(o.label){case 0:return this.stopDuringStartError=void 0,this.receivedHandshakeResponse=!1,e=new Promise(function(e,t){r.handshakeResolver=e,r.handshakeRejecter=t}),[4,this.connection.start(this.protocol.transferFormat)];case 1:o.sent(),o.label=2;case 2:return o.trys.push([2,5,,7]),t={protocol:this.protocol.name,version:this.protocol.version},this.logger.log(u.a.Debug,"Sending handshake request."),[4,this.sendMessage(this.handshakeProtocol.writeHandshakeRequest(t))];case 3:return o.sent(),this.logger.log(u.a.Information,"Using HubProtocol '"+this.protocol.name+"'."),this.cleanupTimeout(),this.resetTimeoutPeriod(),this.resetKeepAliveInterval(),[4,e];case 4:if(o.sent(),this.stopDuringStartError)throw this.stopDuringStartError;return[3,7];case 5:return n=o.sent(),this.logger.log(u.a.Debug,"Hub handshake failed with error '"+n+"' during start(). Stopping HubConnection."),this.cleanupTimeout(),this.cleanupPingTimer(),[4,this.connection.stop(n)];case 6:throw o.sent(),n;case 7:return[2]}})})},e.prototype.stop=function(){return v(this,void 0,void 0,function(){var e;return b(this,function(t){switch(t.label){case 0:return e=this.startPromise,this.stopPromise=this.stopInternal(),[4,this.stopPromise];case 1:t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),[4,e];case 3:return t.sent(),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}})})},e.prototype.stopInternal=function(e){return this.connectionState===d.Disconnected?(this.logger.log(u.a.Debug,"Call to HubConnection.stop("+e+") ignored because it is already in the disconnected state."),Promise.resolve()):this.connectionState===d.Disconnecting?(this.logger.log(u.a.Debug,"Call to HttpConnection.stop("+e+") ignored because the connection is already in the disconnecting state."),this.stopPromise):(this.connectionState=d.Disconnecting,this.logger.log(u.a.Debug,"Stopping HubConnection."),this.reconnectDelayHandle?(this.logger.log(u.a.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this.reconnectDelayHandle),this.reconnectDelayHandle=void 0,this.completeClose(),Promise.resolve()):(this.cleanupTimeout(),this.cleanupPingTimer(),this.stopDuringStartError=e||new Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(e)))},e.prototype.stream=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i,s=this.replaceStreamingParams(n),a=s[0],u=s[1],c=this.createStreamInvocation(e,n,u),l=new y;return l.cancelCallback=function(){var e=t.createCancelInvocation(c.invocationId);return delete t.callbacks[c.invocationId],i.then(function(){return t.sendWithProtocol(e)})},this.callbacks[c.invocationId]=function(e,t){t?l.error(t):e&&(e.type===o.Completion?e.error?l.error(new Error(e.error)):l.complete():l.next(e.item))},i=this.sendWithProtocol(c).catch(function(e){l.error(e),delete t.callbacks[c.invocationId]}),this.launchStreams(a,i),l},e.prototype.sendMessage=function(e){return this.resetKeepAliveInterval(),this.connection.send(e)},e.prototype.sendWithProtocol=function(e){return this.sendMessage(this.protocol.writeMessage(e))},e.prototype.send=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.replaceStreamingParams(t),o=r[0],i=r[1],s=this.sendWithProtocol(this.createInvocation(e,t,!0,i));return this.launchStreams(o,s),s},e.prototype.invoke=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.replaceStreamingParams(n),s=i[0],a=i[1],u=this.createInvocation(e,n,!1,a);return new Promise(function(e,n){t.callbacks[u.invocationId]=function(t,r){r?n(r):t&&(t.type===o.Completion?t.error?n(new Error(t.error)):e(t.result):n(new Error("Unexpected message type: "+t.type)))};var r=t.sendWithProtocol(u).catch(function(e){n(e),delete t.callbacks[u.invocationId]});t.launchStreams(s,r)})},e.prototype.on=function(e,t){e&&t&&(e=e.toLowerCase(),this.methods[e]||(this.methods[e]=[]),-1===this.methods[e].indexOf(t)&&this.methods[e].push(t))},e.prototype.off=function(e,t){if(e){e=e.toLowerCase();var n=this.methods[e];if(n)if(t){var r=n.indexOf(t);-1!==r&&(n.splice(r,1),0===n.length&&delete this.methods[e])}else delete this.methods[e]}},e.prototype.onclose=function(e){e&&this.closedCallbacks.push(e)},e.prototype.onreconnecting=function(e){e&&this.reconnectingCallbacks.push(e)},e.prototype.onreconnected=function(e){e&&this.reconnectedCallbacks.push(e)},e.prototype.processIncomingData=function(e){if(this.cleanupTimeout(),this.receivedHandshakeResponse||(e=this.processHandshakeResponse(e),this.receivedHandshakeResponse=!0),e)for(var t=0,n=this.protocol.parseMessages(e,this.logger);t<n.length;t++){var r=n[t];switch(r.type){case o.Invocation:this.invokeClientMethod(r);break;case o.StreamItem:case o.Completion:var i=this.callbacks[r.invocationId];i&&(r.type===o.Completion&&delete this.callbacks[r.invocationId],i(r));break;case o.Ping:break;case o.Close:this.logger.log(u.a.Information,"Close message received from server.");var s=r.error?new Error("Server returned an error on close: "+r.error):void 0;!0===r.allowReconnect?this.connection.stop(s):this.stopPromise=this.stopInternal(s);break;default:this.logger.log(u.a.Warning,"Invalid message type: "+r.type+".")}}this.resetTimeoutPeriod()},e.prototype.processHandshakeResponse=function(e){var t,n,r;try{r=(t=this.handshakeProtocol.parseHandshakeResponse(e))[0],n=t[1]}catch(e){var o="Error parsing handshake response: "+e;this.logger.log(u.a.Error,o);var i=new Error(o);throw this.handshakeRejecter(i),i}if(n.error){o="Server returned handshake error: "+n.error;this.logger.log(u.a.Error,o);i=new Error(o);throw this.handshakeRejecter(i),i}return this.logger.log(u.a.Debug,"Server handshake complete."),this.handshakeResolver(),r},e.prototype.resetKeepAliveInterval=function(){var e=this;this.cleanupPingTimer(),this.pingServerHandle=setTimeout(function(){return v(e,void 0,void 0,function(){return b(this,function(e){switch(e.label){case 0:if(this.connectionState!==d.Connected)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.sendMessage(this.cachedPingMessage)];case 2:return e.sent(),[3,4];case 3:return e.sent(),this.cleanupPingTimer(),[3,4];case 4:return[2]}})})},this.keepAliveIntervalInMilliseconds)},e.prototype.resetTimeoutPeriod=function(){var e=this;this.connection.features&&this.connection.features.inherentKeepAlive||(this.timeoutHandle=setTimeout(function(){return e.serverTimeout()},this.serverTimeoutInMilliseconds))},e.prototype.serverTimeout=function(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))},e.prototype.invokeClientMethod=function(e){var t=this,n=this.methods[e.target.toLowerCase()];if(n){try{n.forEach(function(n){return n.apply(t,e.arguments)})}catch(t){this.logger.log(u.a.Error,"A callback for the method "+e.target.toLowerCase()+" threw error '"+t+"'.")}if(e.invocationId){var r="Server requested a response, which is not supported in this version of the client.";this.logger.log(u.a.Error,r),this.stopPromise=this.stopInternal(new Error(r))}}else this.logger.log(u.a.Warning,"No client method with the name '"+e.target+"' found.")},e.prototype.connectionClosed=function(e){this.logger.log(u.a.Debug,"HubConnection.connectionClosed("+e+") called while in state "+this.connectionState+"."),this.stopDuringStartError=this.stopDuringStartError||e||new Error("The underlying connection was closed before the hub handshake could complete."),this.handshakeResolver&&this.handshakeResolver(),this.cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this.cleanupTimeout(),this.cleanupPingTimer(),this.connectionState===d.Disconnecting?this.completeClose(e):this.connectionState===d.Connected&&this.reconnectPolicy?this.reconnect(e):this.connectionState===d.Connected&&this.completeClose(e)},e.prototype.completeClose=function(e){var t=this;if(this.connectionStarted){this.connectionState=d.Disconnected,this.connectionStarted=!1;try{this.closedCallbacks.forEach(function(n){return n.apply(t,[e])})}catch(t){this.logger.log(u.a.Error,"An onclose callback called with error '"+e+"' threw error '"+t+"'.")}}},e.prototype.reconnect=function(e){return v(this,void 0,void 0,function(){var t,n,r,o,i,s=this;return b(this,function(a){switch(a.label){case 0:if(t=Date.now(),n=0,r=void 0!==e?e:new Error("Attempting to reconnect due to a unknown error."),null===(o=this.getNextRetryDelay(n++,0,r)))return this.logger.log(u.a.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this.completeClose(e),[2];if(this.connectionState=d.Reconnecting,e?this.logger.log(u.a.Information,"Connection reconnecting because of error '"+e+"'."):this.logger.log(u.a.Information,"Connection reconnecting."),this.onreconnecting){try{this.reconnectingCallbacks.forEach(function(t){return t.apply(s,[e])})}catch(t){this.logger.log(u.a.Error,"An onreconnecting callback called with error '"+e+"' threw error '"+t+"'.")}if(this.connectionState!==d.Reconnecting)return this.logger.log(u.a.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting."),[2]}a.label=1;case 1:return null===o?[3,7]:(this.logger.log(u.a.Information,"Reconnect attempt number "+n+" will start in "+o+" ms."),[4,new Promise(function(e){s.reconnectDelayHandle=setTimeout(e,o)})]);case 2:if(a.sent(),this.reconnectDelayHandle=void 0,this.connectionState!==d.Reconnecting)return this.logger.log(u.a.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting."),[2];a.label=3;case 3:return a.trys.push([3,5,,6]),[4,this.startInternal()];case 4:if(a.sent(),this.connectionState=d.Connected,this.logger.log(u.a.Information,"HubConnection reconnected successfully."),this.onreconnected)try{this.reconnectedCallbacks.forEach(function(e){return e.apply(s,[s.connection.connectionId])})}catch(e){this.logger.log(u.a.Error,"An onreconnected callback called with connectionId '"+this.connection.connectionId+"; threw error '"+e+"'.")}return[2];case 5:return i=a.sent(),this.logger.log(u.a.Information,"Reconnect attempt failed because of error '"+i+"'."),this.connectionState!==d.Reconnecting?(this.logger.log(u.a.Debug,"Connection left the reconnecting state during reconnect attempt. Done reconnecting."),[2]):(r=i instanceof Error?i:new Error(i.toString()),o=this.getNextRetryDelay(n++,Date.now()-t,r),[3,6]);case 6:return[3,1];case 7:return this.logger.log(u.a.Information,"Reconnect retries have been exhausted after "+(Date.now()-t)+" ms and "+n+" failed attempts. Connection disconnecting."),this.completeClose(),[2]}})})},e.prototype.getNextRetryDelay=function(e,t,n){try{return this.reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(n){return this.logger.log(u.a.Error,"IRetryPolicy.nextRetryDelayInMilliseconds("+e+", "+t+") threw error '"+n+"'."),null}},e.prototype.cancelCallbacksWithError=function(e){var t=this.callbacks;this.callbacks={},Object.keys(t).forEach(function(n){(0,t[n])(null,e)})},e.prototype.cleanupPingTimer=function(){this.pingServerHandle&&clearTimeout(this.pingServerHandle)},e.prototype.cleanupTimeout=function(){this.timeoutHandle&&clearTimeout(this.timeoutHandle)},e.prototype.createInvocation=function(e,t,n,r){if(n)return{arguments:t,streamIds:r,target:e,type:o.Invocation};var i=this.invocationId;return this.invocationId++,{arguments:t,invocationId:i.toString(),streamIds:r,target:e,type:o.Invocation}},e.prototype.launchStreams=function(e,t){var n=this;if(0!==e.length){t||(t=Promise.resolve());var r=function(r){e[r].subscribe({complete:function(){t=t.then(function(){return n.sendWithProtocol(n.createCompletionMessage(r))})},error:function(e){var o;o=e instanceof Error?e.message:e&&e.toString?e.toString():"Unknown error",t=t.then(function(){return n.sendWithProtocol(n.createCompletionMessage(r,o))})},next:function(e){t=t.then(function(){return n.sendWithProtocol(n.createStreamItemMessage(r,e))})}})};for(var o in e)r(o)}},e.prototype.replaceStreamingParams=function(e){for(var t=[],n=[],r=0;r<e.length;r++){var o=e[r];if(this.isObservable(o)){var i=this.invocationId;this.invocationId++,t[i]=o,n.push(i.toString()),e.splice(r,1)}}return[t,n]},e.prototype.isObservable=function(e){return e&&e.subscribe&&"function"==typeof e.subscribe},e.prototype.createStreamInvocation=function(e,t,n){var r=this.invocationId;return this.invocationId++,{arguments:t,invocationId:r.toString(),streamIds:n,target:e,type:o.StreamInvocation}},e.prototype.createCancelInvocation=function(e){return{invocationId:e,type:o.CancelInvocation}},e.prototype.createStreamItemMessage=function(e,t){return{invocationId:e,item:t,type:o.StreamItem}},e.prototype.createCompletionMessage=function(e,t,n){return t?{error:t,invocationId:e,type:o.Completion}:{invocationId:e,result:n,type:o.Completion}},e}(),T=[0,2e3,1e4,3e4,null],C=function(){function e(e){this.retryDelays=void 0!==e?e.concat([null]):T}return e.prototype.nextRetryDelayInMilliseconds=function(e){return this.retryDelays[e.previousRetryCount]},e}();!function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"}(E||(E={})),function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"}(S||(S={}));var I=function(){function e(){this.isAborted=!1,this.onabort=null}return e.prototype.abort=function(){this.isAborted||(this.isAborted=!0,this.onabort&&this.onabort())},Object.defineProperty(e.prototype,"signal",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"aborted",{get:function(){return this.isAborted},enumerable:!0,configurable:!0}),e}(),k=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},P=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},R=function(){function e(e,t,n,r){this.httpClient=e,this.accessTokenFactory=t,this.logger=n,this.pollAbort=new I,this.logMessageContent=r,this.running=!1,this.onreceive=null,this.onclose=null}return Object.defineProperty(e.prototype,"pollAborted",{get:function(){return this.pollAbort.aborted},enumerable:!0,configurable:!0}),e.prototype.connect=function(e,t){return k(this,void 0,void 0,function(){var n,r,o,s;return P(this,function(a){switch(a.label){case 0:if(g.a.isRequired(e,"url"),g.a.isRequired(t,"transferFormat"),g.a.isIn(t,S,"transferFormat"),this.url=e,this.logger.log(u.a.Trace,"(LongPolling transport) Connecting."),t===S.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");return n={abortSignal:this.pollAbort.signal,headers:{},timeout:1e5},t===S.Binary&&(n.responseType="arraybuffer"),[4,this.getAccessToken()];case 1:return r=a.sent(),this.updateHeaderToken(n,r),o=e+"&_="+Date.now(),this.logger.log(u.a.Trace,"(LongPolling transport) polling: "+o+"."),[4,this.httpClient.get(o,n)];case 2:return 200!==(s=a.sent()).statusCode?(this.logger.log(u.a.Error,"(LongPolling transport) Unexpected response code: "+s.statusCode+"."),this.closeError=new i.b(s.statusText||"",s.statusCode),this.running=!1):this.running=!0,this.receiving=this.poll(this.url,n),[2]}})})},e.prototype.getAccessToken=function(){return k(this,void 0,void 0,function(){return P(this,function(e){switch(e.label){case 0:return this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:return[2,e.sent()];case 2:return[2,null]}})})},e.prototype.updateHeaderToken=function(e,t){e.headers||(e.headers={}),t?e.headers.Authorization="Bearer "+t:e.headers.Authorization&&delete e.headers.Authorization},e.prototype.poll=function(e,t){return k(this,void 0,void 0,function(){var n,r,o,s;return P(this,function(a){switch(a.label){case 0:a.trys.push([0,,8,9]),a.label=1;case 1:return this.running?[4,this.getAccessToken()]:[3,7];case 2:n=a.sent(),this.updateHeaderToken(t,n),a.label=3;case 3:return a.trys.push([3,5,,6]),r=e+"&_="+Date.now(),this.logger.log(u.a.Trace,"(LongPolling transport) polling: "+r+"."),[4,this.httpClient.get(r,t)];case 4:return 204===(o=a.sent()).statusCode?(this.logger.log(u.a.Information,"(LongPolling transport) Poll terminated by server."),this.running=!1):200!==o.statusCode?(this.logger.log(u.a.Error,"(LongPolling transport) Unexpected response code: "+o.statusCode+"."),this.closeError=new i.b(o.statusText||"",o.statusCode),this.running=!1):o.content?(this.logger.log(u.a.Trace,"(LongPolling transport) data received. "+Object(g.f)(o.content,this.logMessageContent)+"."),this.onreceive&&this.onreceive(o.content)):this.logger.log(u.a.Trace,"(LongPolling transport) Poll timed out, reissuing."),[3,6];case 5:return s=a.sent(),this.running?s instanceof i.c?this.logger.log(u.a.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this.closeError=s,this.running=!1):this.logger.log(u.a.Trace,"(LongPolling transport) Poll errored after shutdown: "+s.message),[3,6];case 6:return[3,1];case 7:return[3,9];case 8:return this.logger.log(u.a.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this.raiseOnClose(),[7];case 9:return[2]}})})},e.prototype.send=function(e){return k(this,void 0,void 0,function(){return P(this,function(t){return this.running?[2,Object(g.h)(this.logger,"LongPolling",this.httpClient,this.url,this.accessTokenFactory,e,this.logMessageContent)]:[2,Promise.reject(new Error("Cannot send until the transport is connected"))]})})},e.prototype.stop=function(){return k(this,void 0,void 0,function(){var e,t;return P(this,function(n){switch(n.label){case 0:this.logger.log(u.a.Trace,"(LongPolling transport) Stopping polling."),this.running=!1,this.pollAbort.abort(),n.label=1;case 1:return n.trys.push([1,,5,6]),[4,this.receiving];case 2:return n.sent(),this.logger.log(u.a.Trace,"(LongPolling transport) sending DELETE request to "+this.url+"."),e={headers:{}},[4,this.getAccessToken()];case 3:return t=n.sent(),this.updateHeaderToken(e,t),[4,this.httpClient.delete(this.url,e)];case 4:return n.sent(),this.logger.log(u.a.Trace,"(LongPolling transport) DELETE request sent."),[3,6];case 5:return this.logger.log(u.a.Trace,"(LongPolling transport) Stop finished."),this.raiseOnClose(),[7];case 6:return[2]}})})},e.prototype.raiseOnClose=function(){if(this.onclose){var e="(LongPolling transport) Firing onclose event.";this.closeError&&(e+=" Error: "+this.closeError),this.logger.log(u.a.Trace,e),this.onclose(this.closeError)}},e}(),x=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},A=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},D=function(){function e(e,t,n,r,o){this.httpClient=e,this.accessTokenFactory=t,this.logger=n,this.logMessageContent=r,this.eventSourceConstructor=o,this.onreceive=null,this.onclose=null}return e.prototype.connect=function(e,t){return x(this,void 0,void 0,function(){var n,r=this;return A(this,function(o){switch(o.label){case 0:return g.a.isRequired(e,"url"),g.a.isRequired(t,"transferFormat"),g.a.isIn(t,S,"transferFormat"),this.logger.log(u.a.Trace,"(SSE transport) Connecting."),this.url=e,this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:(n=o.sent())&&(e+=(e.indexOf("?")<0?"?":"&")+"access_token="+encodeURIComponent(n)),o.label=2;case 2:return[2,new Promise(function(n,o){var i=!1;if(t===S.Text){var s;if(g.c.isBrowser||g.c.isWebWorker)s=new r.eventSourceConstructor(e,{withCredentials:!0});else{var a=r.httpClient.getCookieString(e);s=new r.eventSourceConstructor(e,{withCredentials:!0,headers:{Cookie:a}})}try{s.onmessage=function(e){if(r.onreceive)try{r.logger.log(u.a.Trace,"(SSE transport) data received. "+Object(g.f)(e.data,r.logMessageContent)+"."),r.onreceive(e.data)}catch(e){return void r.close(e)}},s.onerror=function(e){var t=new Error(e.data||"Error occurred");i?r.close(t):o(t)},s.onopen=function(){r.logger.log(u.a.Information,"SSE connected to "+r.url),r.eventSource=s,i=!0,n()}}catch(e){return void o(e)}}else o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})]}})})},e.prototype.send=function(e){return x(this,void 0,void 0,function(){return A(this,function(t){return this.eventSource?[2,Object(g.h)(this.logger,"SSE",this.httpClient,this.url,this.accessTokenFactory,e,this.logMessageContent)]:[2,Promise.reject(new Error("Cannot send until the transport is connected"))]})})},e.prototype.stop=function(){return this.close(),Promise.resolve()},e.prototype.close=function(e){this.eventSource&&(this.eventSource.close(),this.eventSource=void 0,this.onclose&&this.onclose(e))},e}(),O=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},L=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},M=function(){function e(e,t,n,r,o){this.logger=n,this.accessTokenFactory=t,this.logMessageContent=r,this.webSocketConstructor=o,this.httpClient=e,this.onreceive=null,this.onclose=null}return e.prototype.connect=function(e,t){return O(this,void 0,void 0,function(){var n,r=this;return L(this,function(o){switch(o.label){case 0:return g.a.isRequired(e,"url"),g.a.isRequired(t,"transferFormat"),g.a.isIn(t,S,"transferFormat"),this.logger.log(u.a.Trace,"(WebSockets transport) Connecting."),this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:(n=o.sent())&&(e+=(e.indexOf("?")<0?"?":"&")+"access_token="+encodeURIComponent(n)),o.label=2;case 2:return[2,new Promise(function(n,o){var i;e=e.replace(/^http/,"ws");var s=r.httpClient.getCookieString(e),a=!1;g.c.isNode&&s&&(i=new r.webSocketConstructor(e,void 0,{headers:{Cookie:""+s}})),i||(i=new r.webSocketConstructor(e)),t===S.Binary&&(i.binaryType="arraybuffer"),i.onopen=function(t){r.logger.log(u.a.Information,"WebSocket connected to "+e+"."),r.webSocket=i,a=!0,n()},i.onerror=function(e){var t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:new Error("There was an error with the transport."),o(t)},i.onmessage=function(e){r.logger.log(u.a.Trace,"(WebSockets transport) data received. "+Object(g.f)(e.data,r.logMessageContent)+"."),r.onreceive&&r.onreceive(e.data)},i.onclose=function(e){if(a)r.close(e);else{var t=null;t="undefined"!=typeof ErrorEvent&&e instanceof ErrorEvent?e.error:new Error("There was an error with the transport."),o(t)}}})]}})})},e.prototype.send=function(e){return this.webSocket&&this.webSocket.readyState===this.webSocketConstructor.OPEN?(this.logger.log(u.a.Trace,"(WebSockets transport) sending data. "+Object(g.f)(e,this.logMessageContent)+"."),this.webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")},e.prototype.stop=function(){return this.webSocket&&(this.webSocket.onclose=function(){},this.webSocket.onmessage=function(){},this.webSocket.onerror=function(){},this.webSocket.close(),this.webSocket=void 0,this.close(void 0)),Promise.resolve()},e.prototype.close=function(e){this.logger.log(u.a.Trace,"(WebSockets transport) socket closed."),this.onclose&&(!e||!1!==e.wasClean&&1e3===e.code?this.onclose():this.onclose(new Error("WebSocket closed with status code: "+e.code+" ("+e.reason+").")))},e}(),B=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},U=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},j=null,N=null;if(g.c.isNode){var F=require;j=F("ws"),N=F("eventsource")}var H=function(){function e(e,t){void 0===t&&(t={}),this.features={},this.negotiateVersion=1,g.a.isRequired(e,"url"),this.logger=Object(g.e)(t.logger),this.baseUrl=this.resolveUrl(e),(t=t||{}).logMessageContent=t.logMessageContent||!1,g.c.isNode||"undefined"==typeof WebSocket||t.WebSocket?g.c.isNode&&!t.WebSocket&&j&&(t.WebSocket=j):t.WebSocket=WebSocket,g.c.isNode||"undefined"==typeof EventSource||t.EventSource?g.c.isNode&&!t.EventSource&&void 0!==N&&(t.EventSource=N):t.EventSource=EventSource,this.httpClient=t.httpClient||new h(this.logger),this.connectionState="Disconnected",this.connectionStarted=!1,this.options=t,this.onreceive=null,this.onclose=null}return e.prototype.start=function(e){return B(this,void 0,void 0,function(){var t;return U(this,function(n){switch(n.label){case 0:return e=e||S.Binary,g.a.isIn(e,S,"transferFormat"),this.logger.log(u.a.Debug,"Starting connection with transfer format '"+S[e]+"'."),"Disconnected"!==this.connectionState?[2,Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."))]:(this.connectionState="Connecting ",this.startInternalPromise=this.startInternal(e),[4,this.startInternalPromise]);case 1:return n.sent(),"Disconnecting"!==this.connectionState?[3,3]:(t="Failed to start the HttpConnection before stop() was called.",this.logger.log(u.a.Error,t),[4,this.stopPromise]);case 2:return n.sent(),[2,Promise.reject(new Error(t))];case 3:if("Connected"!==this.connectionState)return t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!",this.logger.log(u.a.Error,t),[2,Promise.reject(new Error(t))];n.label=4;case 4:return this.connectionStarted=!0,[2]}})})},e.prototype.send=function(e){return"Connected"!==this.connectionState?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this.sendQueue||(this.sendQueue=new q(this.transport)),this.sendQueue.send(e))},e.prototype.stop=function(e){return B(this,void 0,void 0,function(){var t=this;return U(this,function(n){switch(n.label){case 0:return"Disconnected"===this.connectionState?(this.logger.log(u.a.Debug,"Call to HttpConnection.stop("+e+") ignored because the connection is already in the disconnected state."),[2,Promise.resolve()]):"Disconnecting"===this.connectionState?(this.logger.log(u.a.Debug,"Call to HttpConnection.stop("+e+") ignored because the connection is already in the disconnecting state."),[2,this.stopPromise]):(this.connectionState="Disconnecting",this.stopPromise=new Promise(function(e){t.stopPromiseResolver=e}),[4,this.stopInternal(e)]);case 1:return n.sent(),[4,this.stopPromise];case 2:return n.sent(),[2]}})})},e.prototype.stopInternal=function(e){return B(this,void 0,void 0,function(){var t,n;return U(this,function(r){switch(r.label){case 0:this.stopError=e,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.startInternalPromise];case 2:return r.sent(),[3,4];case 3:return r.sent(),[3,4];case 4:if(!this.sendQueue)return[3,9];r.label=5;case 5:return r.trys.push([5,7,,8]),[4,this.sendQueue.stop()];case 6:return r.sent(),[3,8];case 7:return t=r.sent(),this.logger.log(u.a.Error,"TransportSendQueue.stop() threw error '"+t+"'."),[3,8];case 8:this.sendQueue=void 0,r.label=9;case 9:if(!this.transport)return[3,14];r.label=10;case 10:return r.trys.push([10,12,,13]),[4,this.transport.stop()];case 11:return r.sent(),[3,13];case 12:return n=r.sent(),this.logger.log(u.a.Error,"HttpConnection.transport.stop() threw error '"+n+"'."),this.stopConnection(),[3,13];case 13:return this.transport=void 0,[3,15];case 14:this.logger.log(u.a.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed."),this.stopConnection(),r.label=15;case 15:return[2]}})})},e.prototype.startInternal=function(e){return B(this,void 0,void 0,function(){var t,n,r,o,i,s;return U(this,function(a){switch(a.label){case 0:t=this.baseUrl,this.accessTokenFactory=this.options.accessTokenFactory,a.label=1;case 1:return a.trys.push([1,12,,13]),this.options.skipNegotiation?this.options.transport!==E.WebSockets?[3,3]:(this.transport=this.constructTransport(E.WebSockets),[4,this.startTransport(t,e)]):[3,5];case 2:return a.sent(),[3,4];case 3:throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");case 4:return[3,11];case 5:n=null,r=0,o=function(){var e;return U(this,function(o){switch(o.label){case 0:return[4,i.getNegotiationResponse(t)];case 1:if(n=o.sent(),"Disconnecting"===i.connectionState||"Disconnected"===i.connectionState)throw new Error("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");return n.url&&(t=n.url),n.accessToken&&(e=n.accessToken,i.accessTokenFactory=function(){return e}),r++,[2]}})},i=this,a.label=6;case 6:return[5,o()];case 7:a.sent(),a.label=8;case 8:if(n.url&&r<100)return[3,6];a.label=9;case 9:if(100===r&&n.url)throw new Error("Negotiate redirection limit exceeded.");return[4,this.createTransport(t,this.options.transport,n,e)];case 10:a.sent(),a.label=11;case 11:return this.transport instanceof R&&(this.features.inherentKeepAlive=!0),"Connecting "===this.connectionState&&(this.logger.log(u.a.Debug,"The HttpConnection connected successfully."),this.connectionState="Connected"),[3,13];case 12:return s=a.sent(),this.logger.log(u.a.Error,"Failed to start the connection: "+s),this.connectionState="Disconnected",this.transport=void 0,[2,Promise.reject(s)];case 13:return[2]}})})},e.prototype.getNegotiationResponse=function(e){return B(this,void 0,void 0,function(){var t,n,r,o,i,s,a;return U(this,function(c){switch(c.label){case 0:return this.accessTokenFactory?[4,this.accessTokenFactory()]:[3,2];case 1:(r=c.sent())&&((t={}).Authorization="Bearer "+r,n=t),c.label=2;case 2:o=this.resolveNegotiateUrl(e),this.logger.log(u.a.Debug,"Sending negotiation request: "+o+"."),c.label=3;case 3:return c.trys.push([3,5,,6]),[4,this.httpClient.post(o,{content:"",headers:n})];case 4:return 200!==(i=c.sent()).statusCode?[2,Promise.reject(new Error("Unexpected status code returned from negotiate "+i.statusCode))]:((!(s=JSON.parse(i.content)).negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),[2,s]);case 5:return a=c.sent(),this.logger.log(u.a.Error,"Failed to complete negotiation with the server: "+a),[2,Promise.reject(a)];case 6:return[2]}})})},e.prototype.createConnectUrl=function(e,t){return t?e+(-1===e.indexOf("?")?"?":"&")+"id="+t:e},e.prototype.createTransport=function(e,t,n,r){return B(this,void 0,void 0,function(){var o,i,s,a,c,l,f,h,p,d,g;return U(this,function(y){switch(y.label){case 0:return o=this.createConnectUrl(e,n.connectionToken),this.isITransport(t)?(this.logger.log(u.a.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,[4,this.startTransport(o,r)]):[3,2];case 1:return y.sent(),this.connectionId=n.connectionId,[2];case 2:i=[],s=n.availableTransports||[],a=n,c=0,l=s,y.label=3;case 3:return c<l.length?(f=l[c],(h=this.resolveTransportOrError(f,t,r))instanceof Error?(i.push(f.transport+" failed: "+h),[3,12]):[3,4]):[3,13];case 4:if(!this.isITransport(h))return[3,12];if(this.transport=h,a)return[3,9];y.label=5;case 5:return y.trys.push([5,7,,8]),[4,this.getNegotiationResponse(e)];case 6:return a=y.sent(),[3,8];case 7:return p=y.sent(),[2,Promise.reject(p)];case 8:o=this.createConnectUrl(e,a.connectionToken),y.label=9;case 9:return y.trys.push([9,11,,12]),[4,this.startTransport(o,r)];case 10:return y.sent(),this.connectionId=a.connectionId,[2];case 11:return d=y.sent(),this.logger.log(u.a.Error,"Failed to start the transport '"+f.transport+"': "+d),a=void 0,i.push(f.transport+" failed: "+d),"Connecting "!==this.connectionState?(g="Failed to select transport before stop() was called.",this.logger.log(u.a.Debug,g),[2,Promise.reject(new Error(g))]):[3,12];case 12:return c++,[3,3];case 13:return i.length>0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case E.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new M(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case E.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new D(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case E.LongPolling:return new R(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=E[e.transport];if(null==r)return this.logger.log(u.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(u.a.Debug,"Skipping transport '"+E[r]+"' because it was disabled by the client."),new Error("'"+E[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return S[e]}).indexOf(n)>=0))return this.logger.log(u.a.Debug,"Skipping transport '"+E[r]+"' because it does not support the requested transfer format '"+S[n]+"'."),new Error("'"+E[r]+"' does not support "+S[n]+".");if(r===E.WebSockets&&!this.options.WebSocket||r===E.ServerSentEvents&&!this.options.EventSource)return this.logger.log(u.a.Debug,"Skipping transport '"+E[r]+"' because it is not supported in your environment.'"),new Error("'"+E[r]+"' is not supported in your environment.");this.logger.log(u.a.Debug,"Selecting transport '"+E[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(u.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(u.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(u.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(u.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(u.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(u.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(u.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var q=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new Y,this.transportResult=new Y,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new Y),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return B(this,void 0,void 0,function(){var t,n,r;return U(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new Y,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o<i.length;o++){var s=i[o];n.set(new Uint8Array(s),r),r+=s.byteLength}return n},e}(),Y=function(){function e(){var e=this;this.promise=new Promise(function(t,n){var r;return r=[t,n],e.resolver=r[0],e.rejecter=r[1],r})}return e.prototype.resolve=function(){this.resolver()},e.prototype.reject=function(e){this.rejecter(e)},e}(),W=n(6),z=n(7),J="json",V=function(){function e(){this.name=J,this.version=1,this.transferFormat=S.Text}return e.prototype.parseMessages=function(e,t){if("string"!=typeof e)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];null===t&&(t=W.a.instance);for(var n=[],r=0,i=z.a.parse(e);r<i.length;r++){var s=i[r],a=JSON.parse(s);if("number"!=typeof a.type)throw new Error("Invalid payload.");switch(a.type){case o.Invocation:this.isInvocationMessage(a);break;case o.StreamItem:this.isStreamItemMessage(a);break;case o.Completion:this.isCompletionMessage(a);break;case o.Ping:case o.Close:break;default:t.log(u.a.Information,"Unknown message type '"+a.type+"' ignored.");continue}n.push(a)}return n},e.prototype.writeMessage=function(e){return z.a.write(JSON.stringify(e))},e.prototype.isInvocationMessage=function(e){this.assertNotEmptyString(e.target,"Invalid payload for Invocation message."),void 0!==e.invocationId&&this.assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")},e.prototype.isStreamItemMessage=function(e){if(this.assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),void 0===e.item)throw new Error("Invalid payload for StreamItem message.")},e.prototype.isCompletionMessage=function(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this.assertNotEmptyString(e.error,"Invalid payload for Completion message."),this.assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")},e.prototype.assertNotEmptyString=function(e,t){if("string"!=typeof e||""===e)throw new Error(t)},e}(),K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},X={trace:u.a.Trace,debug:u.a.Debug,info:u.a.Information,information:u.a.Information,warn:u.a.Warning,warning:u.a.Warning,error:u.a.Error,critical:u.a.Critical,none:u.a.None};var G=function(){function e(){}return e.prototype.configureLogging=function(e){if(g.a.isRequired(e,"logging"),void 0!==e.log)this.logger=e;else if("string"==typeof e){var t=function(e){var t=X[e.toLowerCase()];if(void 0!==t)return t;throw new Error("Unknown log level: "+e)}(e);this.logger=new g.b(t)}else this.logger=new g.b(e);return this},e.prototype.withUrl=function(e,t){return g.a.isRequired(e,"url"),this.url=e,this.httpConnectionOptions=K({},this.httpConnectionOptions,"object"==typeof t?t:{transport:t}),this},e.prototype.withHubProtocol=function(e){return g.a.isRequired(e,"protocol"),this.protocol=e,this},e.prototype.withAutomaticReconnect=function(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new C(e):this.reconnectPolicy=e:this.reconnectPolicy=new C,this},e.prototype.build=function(){var e=this.httpConnectionOptions||{};if(void 0===e.logger&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");var t=new H(this.url,e);return _.create(t,this.logger||W.a.instance,this.protocol||new V,this.reconnectPolicy)},e}();n.d(t,"VERSION",function(){return Q}),n.d(t,"AbortError",function(){return i.a}),n.d(t,"HttpError",function(){return i.b}),n.d(t,"TimeoutError",function(){return i.c}),n.d(t,"HttpClient",function(){return s.a}),n.d(t,"HttpResponse",function(){return s.b}),n.d(t,"DefaultHttpClient",function(){return h}),n.d(t,"HubConnection",function(){return _}),n.d(t,"HubConnectionState",function(){return d}),n.d(t,"HubConnectionBuilder",function(){return G}),n.d(t,"MessageType",function(){return o}),n.d(t,"LogLevel",function(){return u.a}),n.d(t,"HttpTransportType",function(){return E}),n.d(t,"TransferFormat",function(){return S}),n.d(t,"NullLogger",function(){return W.a}),n.d(t,"JsonHubProtocol",function(){return V}),n.d(t,"Subject",function(){return y});var Q="0.0.0-DEV_BUILD"},function(e,t,n){"use strict";n.d(t,"b",function(){return i}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return a});var r,o=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){function t(t,n){var r=this,o=this.constructor.prototype;return(r=e.call(this,t)||this).statusCode=n,r.__proto__=o,r}return o(t,e),t}(Error),s=function(e){function t(t){void 0===t&&(t="A timeout occurred.");var n=this,r=this.constructor.prototype;return(n=e.call(this,t)||this).__proto__=r,n}return o(t,e),t}(Error),a=function(e){function t(t){void 0===t&&(t="An abort occurred.");var n=this,r=this.constructor.prototype;return(n=e.call(this,t)||this).__proto__=r,n}return o(t,e),t}(Error)},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return i});var r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o=function(){return function(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}}(),i=function(){function e(){}return e.prototype.get=function(e,t){return this.send(r({},t,{method:"GET",url:e}))},e.prototype.post=function(e,t){return this.send(r({},t,{method:"POST",url:e}))},e.prototype.delete=function(e,t){return this.send(r({},t,{method:"DELETE",url:e}))},e.prototype.getCookieString=function(e){return""},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(17);var r=n(26),o=n(11),i={},s=!1;function a(e,t,n){var o=i[e];o||(o=i[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=a,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");a(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=i[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),a=r.values(o),u=r.count(o),c=t.referenceFrames(),l=r.values(c),f=t.diffReader,h=0;h<u;h++){var p=t.updatedComponentsEntry(a,h),d=f.componentId(p),g=f.edits(p);n.updateComponent(t,d,g,l)}var y=t.disposedComponentIds(),v=r.values(y),b=r.count(y);for(h=0;h<b;h++)d=t.disposedComponentIdsEntry(v,h),n.disposeComponent(d);var m=t.disposedEventHandlerIds(),w=r.values(m),E=r.count(m);for(h=0;h<E;h++){var S=t.disposedEventHandlerIdsEntry(w,h);n.disposeEventHandler(S)}s&&(s=!1,window.scrollTo&&window.scrollTo(0,0))},t.resetScrollAfterNextBatch=function(){s=!0}},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t,n){"use strict";var r=n(22),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(19);i.inherits=n(14);var s=n(38),a=n(43);i.inherits(f,s);for(var u=o(a.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(13).Buffer,o=n(58),i=n(21),s=n(71),a=n(74),u=n(75);e.exports=function(e){var t=[],n=[];return{encode:u(t,(e=e||{forceFloat64:!1,compatibilityMode:!1,disableTimestampEncoding:!1}).forceFloat64,e.compatibilityMode,e.disableTimestampEncoding),decode:a(n),register:function(e,t,n,s){return o(t,"must have a constructor"),o(n,"must have an encode function"),o(e>=0,"must have a non-negative type"),o(s,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),s=r.allocUnsafe(1);return s.writeInt8(e,0),o.append(s),o.append(n(t)),o}),this.registerDecoder(e,s),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:s.encoder,decoder:s.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:a.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(16);var i,s=n(5),a=!1,u=!1,c=null;function l(e,t){var n=p(e);if(!t&&d(n))f(n,!1);else if(t&&location.href===e){var r=e+"?";history.replaceState(null,"",r),location.replace(e)}else location.href=e}function f(e,t){s.resetScrollAfterNextBatch(),history.pushState(null,"",e),h(t)}function h(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return c?[4,c(location.href,e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function p(e){return(i=i||document.createElement("a")).href=e,i.href}function d(e){var t,n=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1);return e.startsWith(n)}t.internalFunctions={listenForNavigationEvents:function(e){if(c=e,u)return;u=!0,window.addEventListener("popstate",function(){return h(!1)})},enableNavigationInterception:function(){a=!0},navigateTo:l,getBaseURI:function(){return document.baseURI},getLocationHref:function(){return location.href}},t.attachToEventDelegator=function(e){e.notifyAfterClick(function(e){if(a&&0===e.button&&!function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&!e.defaultPrevented){var t=function e(t,n){return t?t.tagName===n?t:e(t.parentElement,n):null}(e.target,"A");if(t&&t.hasAttribute("href")){var n=t.getAttribute("target");if(n&&"_self"!==n)return;var r=p(t.getAttribute("href"));d(r)&&(e.preventDefault(),f(r,!0))}}})},t.navigateTo=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),i=p("_blazorLogicalEnd");function s(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function a(e,t,n){var i=e;if(e instanceof Comment&&(c(i)&&c(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(i))throw new Error("Not implemented: moving existing logical children");var s=c(t);if(n<s.length){var a=s[n];a.parentNode.insertBefore(e,a),s.splice(n,0,i)}else h(e,t),s.push(i);i[o]=t,r in i||(i[r]=[])}function u(e){return e[o]||null}function c(e){return e[r]}function l(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function f(e){var t=c(u(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function h(e,t){if(t instanceof Element)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: "+t);var n=f(t);n?n.parentNode.insertBefore(e,n):h(e,u(t))}}function p(e){return"function"==typeof Symbol?Symbol():e}t.toLogicalRootCommentElement=function(e,t){if(!e.parentNode)throw new Error("Comment not connected to the DOM "+e.textContent);var n=e.parentNode,r=s(n,!0),a=c(r);return Array.from(n.childNodes).forEach(function(e){return a.push(e)}),e[o]=r,t&&(e[i]=t,s(t,!0)),s(e,!0)},t.toLogicalElement=s,t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return a(n,e,t),n},t.insertLogicalChild=a,t.removeLogicalChild=function e(t,n){var r=c(t).splice(n,1)[0];if(r instanceof Comment)for(var o=c(r);o.length>0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return c(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=c,t.permuteLogicalChildren=function(e,t){var n=c(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var s=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=s}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(20),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),i(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function s(e){t.push(e)}function a(e,t,n,r){var o=c();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),s=o.invokeDotNetFromJS(e,t,n,i);return s?f(s):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var s=o++,a=new Promise(function(e,t){n[s]={resolve:e,reject:t}});try{var u=JSON.stringify(i,g);c().beginInvokeDotNetFromJS(s,e,t,r,u)}catch(e){l(s,!1,e)}return a}function c(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=s,e.invokeMethod=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return a(e,t,null,n)},e.invokeMethodAsync=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return u(e,t,null,n)},e.jsCallDispatcher={findJSFunction:p,invokeJSFromDotNet:function(e,t){var n=p(e).apply(null,f(t));return null==n?null:JSON.stringify(n,g)},beginInvokeJSFromDotNet:function(e,t,n){var r=new Promise(function(e){e(p(t).apply(null,f(n)))});e&&r.then(function(t){return c().endInvokeJSFromDotNet(e,!0,JSON.stringify([e,!0,t],g))},function(t){return c().endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,h(t)]))})},endInvokeDotNetFromJS:function(e,t,n){var r=t?n:new Error(n);l(parseInt(e),t,r)}};var d=function(){function e(e){this._id=e}return e.prototype.invokeMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return a(null,e,this._id,t)},e.prototype.invokeMethodAsync=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u(null,e,this._id,t)},e.prototype.dispose=function(){u(null,"__Dispose",this._id,null).catch(function(e){return console.error(e)})},e.prototype.serializeAsArg=function(){return{__dotNetObject:this._id}},e}();function g(e,t){return t instanceof d?t.serializeAsArg():t}s(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__dotNetObject")?new d(t.__dotNetObject):t})}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPlatform=function(e){return t.platform=e,t.platform}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=function(e,t){if(!r)throw new Error("eventDispatcher not initialized. Call 'setEventDispatcher' to configure it.");return r(e,t)},t.setEventDispatcher=function(e){r=e}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(35).Buffer)},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ -var r=n(50),o=n(51),i=n(52);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=c.prototype:(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,n){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);c.TYPED_ARRAY_SUPPORT?(e=t).__proto__=c.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!c.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=s(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(c.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|p(t)),!c.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===c)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;h<c;h++)if(u(e,i+h)!==u(t,h)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function m(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return q(H(t),e,n,r)}function C(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=T));return n}(r)}t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,n){return u(null,e,t,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},c.allocUnsafe=function(e){return f(null,e)},c.allocUnsafeSlow=function(e){return f(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!c.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o),o+=a.length}return r},c.byteLength=d,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;f<s;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function x(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=N(e[i]);return o}function R(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=c.prototype;else{var o=t-e;n=new c(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},c.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=c.isBuffer(e)?e:F(new c(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(15);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u<c.length;u++){var l=c[u];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(53),i=n(22),a=n(65),s=n(68),c=n(69);e.exports=function(e){var t=[],n=[];return{encode:c(t,(e=e||{forceFloat64:!1,compatibilityMode:!1,disableTimestampEncoding:!1}).forceFloat64,e.compatibilityMode,e.disableTimestampEncoding),decode:s(n),register:function(e,t,n,a){return o(t,"must have a constructor"),o(n,"must have an encode function"),o(e>=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17);var i,a=n(5),s=!1,c=!1,u=null;function l(e,t){var n=p(e);if(!t&&d(n))f(n,!1);else if(t&&location.href===e){var r=e+"?";history.replaceState(null,"",r),location.replace(e)}else location.href=e}function f(e,t){a.resetScrollAfterNextBatch(),history.pushState(null,"",e),h(t)}function h(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return u?[4,u(location.href,e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function p(e){return(i=i||document.createElement("a")).href=e,i.href}function d(e){var t,n=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1);return e.startsWith(n)}t.internalFunctions={listenForNavigationEvents:function(e){if(u=e,c)return;c=!0,window.addEventListener("popstate",function(){return h(!1)})},enableNavigationInterception:function(){s=!0},navigateTo:l,getBaseURI:function(){return document.baseURI},getLocationHref:function(){return location.href}},t.attachToEventDelegator=function(e){e.notifyAfterClick(function(e){if(s&&0===e.button&&!function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&!e.defaultPrevented){var t=function e(t,n){return t?t.tagName===n?t:e(t.parentElement,n):null}(e.target,"A");if(t&&t.hasAttribute("href")){var n=t.getAttribute("target");if(n&&"_self"!==n)return;var r=p(t.getAttribute("href"));d(r)&&(e.preventDefault(),f(r,!0))}}})},t.navigateTo=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),i=p("_blazorLogicalEnd");function a(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n<a.length){var s=a[n];s.parentNode.insertBefore(e,s),a.splice(n,0,i)}else h(e,t),a.push(i);i[o]=t,r in i||(i[r]=[])}function c(e){return e[o]||null}function u(e){return e[r]}function l(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function f(e){var t=u(c(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function h(e,t){if(t instanceof Element)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: "+t);var n=f(t);n?n.parentNode.insertBefore(e,n):h(e,c(t))}}function p(e){return"function"==typeof Symbol?Symbol():e}t.toLogicalRootCommentElement=function(e,t){if(!e.parentNode)throw new Error("Comment not connected to the DOM "+e.textContent);var n=e.parentNode,r=a(n,!0),s=u(r);return Array.from(n.childNodes).forEach(function(e){return s.push(e)}),e[o]=r,t&&(e[i]=t,a(t,!0)),a(e,!0)},t.toLogicalElement=a,t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return s(n,e,t),n},t.insertLogicalChild=s,t.removeLogicalChild=function e(t,n){var r=u(t).splice(n,1)[0];if(r instanceof Comment)for(var o=u(r);o.length>0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise(function(e,t){n[a]={resolve:e,reject:t}});try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return s(e,t,null,n)},e.invokeMethodAsync=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return c(e,t,null,n)},e.jsCallDispatcher={findJSFunction:p,invokeJSFromDotNet:function(e,t){var n=p(e).apply(null,f(t));return null==n?null:JSON.stringify(n,g)},beginInvokeJSFromDotNet:function(e,t,n){var r=new Promise(function(e){e(p(t).apply(null,f(n)))});e&&r.then(function(t){return u().endInvokeJSFromDotNet(e,!0,JSON.stringify([e,!0,t],g))},function(t){return u().endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,h(t)]))})},endInvokeDotNetFromJS:function(e,t,n){var r=t?n:new Error(n);l(parseInt(e),t,r)}};var d=function(){function e(e){this._id=e}return e.prototype.invokeMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return s(null,e,this._id,t)},e.prototype.invokeMethodAsync=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return c(null,e,this._id,t)},e.prototype.dispose=function(){c(null,"__Dispose",this._id,null).catch(function(e){return console.error(e)})},e.prototype.serializeAsArg=function(){return{__dotNetObject:this._id}},e}();function g(e,t){return t instanceof d?t.serializeAsArg():t}a(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__dotNetObject")?new d(t.__dotNetObject):t})}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPlatform=function(e){return t.platform=e,t.platform}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=function(e,t){if(!r)throw new Error("eventDispatcher not initialized. Call 'setEventDispatcher' to configure it.");return r(e,t)},t.setEventDispatcher=function(e){r=e}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(6).Buffer)},function(e,t,n){var r=n(56),o=n(34),i=n(14).Buffer;function a(e){if(!(this instanceof a))return new a(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)})}else this.append(e);r.call(this)}o.inherits(a,r),a.prototype._offset=function(e){var t,n=0,r=0;if(0===e)return[0,0];for(;r<this._bufs.length;r++){if(e<(t=n+this._bufs[r].length)||r==this._bufs.length-1)return[r,e-n];n=t}},a.prototype.append=function(e){var t=0;if(i.isBuffer(e))this._appendBuffer(e);else if(Array.isArray(e))for(;t<e.length;t++)this.append(e[t]);else if(e instanceof a)for(;t<e._bufs.length;t++)this.append(e._bufs[t]);else null!=e&&("number"==typeof e&&(e=e.toString()),this._appendBuffer(i.from(e)));return this},a.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},a.prototype._write=function(e,t,n){this._appendBuffer(e),"function"==typeof n&&n()},a.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},a.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},a.prototype.get=function(e){return this.slice(e,e+1)[0]},a.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},a.prototype.copy=function(e,t,n,r){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof r||r>this.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a<this._bufs.length;a++)this._bufs[a].copy(e,f),f+=this._bufs[a].length;return e}if(l<=this._bufs[c[0]].length-h)return s?this._bufs[c[0]].copy(e,t,h,h+l):this._bufs[c[0]].slice(h,h+l);for(s||(e=i.allocUnsafe(u)),a=c[0];a<this._bufs.length;a++){if(!(l>(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},a.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)!function(t){a.prototype[t]=function(n){return this.slice(n,n+e[t])[t](0)}}(t)}(),e.exports=a},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,o)});default:for(i=new Array(s-1),a=0;a<i.length;)i[a++]=arguments[a];return t.nextTick(function(){e.apply(null,i)})}}}:e.exports=t}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(5);window.Blazor={navigateTo:r.navigateTo,_internal:{attachRootComponentToElement:o.attachRootComponentToElement,navigationManager:r.internalFunctions}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),o=n(28),i=n(13),a=n(31),s=n(19),c=n(12),u=document.createElement("template"),l=document.createElementNS("http://www.w3.org/2000/svg","g"),f={submit:!0},h={},p=function(){function e(e){var t=this;this.childComponentLocations={},this.browserRendererId=e,this.eventDelegator=new o.EventDelegator(function(e,n,r,o){!function(e,t,n,r,o){f[e.type]&&e.preventDefault();var i={browserRendererId:t,eventHandlerId:n,eventArgsType:r.type,eventFieldInfo:o};s.dispatchEvent(i,r.data)}(e,t.browserRendererId,n,r,o)}),c.attachToEventDelegator(this.eventDelegator)}return e.prototype.attachRootComponentToLogicalElement=function(e,t){this.attachComponentToElement(e,t),h[e]=t},e.prototype.updateComponent=function(e,t,n,r){var o=this.childComponentLocations[t];if(!o)throw new Error("No element is currently associated with component "+t);var a=h[t];if(a){var s=i.getLogicalSiblingEnd(a);delete h[t],s?function(e,t){var n=i.getLogicalParent(e);if(!n)throw new Error("Can't clear between nodes. The start node does not have a logical parent.");for(var r=i.getLogicalChildrenArray(n),o=r.indexOf(e)+1,a=r.indexOf(t),s=o;s<=a;s++)i.removeLogicalChild(n,o);e.textContent="!"}(a,s):function(e){var t;for(;t=e.firstChild;)e.removeChild(t)}(a)}var c=i.getClosestDomElement(o).ownerDocument,u=c&&c.activeElement;this.applyEdits(e,t,o,0,n,r),u instanceof HTMLElement&&c&&c.activeElement!==u&&u.focus()},e.prototype.disposeComponent=function(e){delete this.childComponentLocations[e]},e.prototype.disposeEventHandler=function(e){this.eventDelegator.removeListener(e)},e.prototype.attachComponentToElement=function(e,t){this.childComponentLocations[e]=t},e.prototype.applyEdits=function(e,t,n,o,a,s){for(var c,u=0,l=o,f=e.arrayBuilderSegmentReader,h=e.editReader,p=e.frameReader,d=f.values(a),g=f.offset(a),y=g+f.count(a),v=g;v<y;v++){var b=e.diffReader.editsEntry(d,v),m=h.editType(b);switch(m){case r.EditType.prependFrame:var w=h.newTreeIndex(b),E=e.referenceFramesEntry(s,w),S=h.siblingIndex(b);this.insertFrame(e,t,n,l+S,s,E,w);break;case r.EditType.removeFrame:S=h.siblingIndex(b);i.removeLogicalChild(n,l+S);break;case r.EditType.setAttribute:w=h.newTreeIndex(b),E=e.referenceFramesEntry(s,w),S=h.siblingIndex(b);if(!((C=i.getLogicalChild(n,l+S))instanceof Element))throw new Error("Cannot set attribute on non-element child");this.applyAttribute(e,t,C,E);break;case r.EditType.removeAttribute:var C;S=h.siblingIndex(b);if(!((C=i.getLogicalChild(n,l+S))instanceof HTMLElement))throw new Error("Cannot remove attribute from non-element child");var _=h.removedAttributeName(b);this.tryApplySpecialProperty(e,C,_,null)||C.removeAttribute(_);break;case r.EditType.updateText:w=h.newTreeIndex(b),E=e.referenceFramesEntry(s,w),S=h.siblingIndex(b);var I=i.getLogicalChild(n,l+S);if(!(I instanceof Text))throw new Error("Cannot set text content on non-text child");I.textContent=p.textContent(E);break;case r.EditType.updateMarkup:w=h.newTreeIndex(b),E=e.referenceFramesEntry(s,w),S=h.siblingIndex(b);i.removeLogicalChild(n,l+S),this.insertMarkup(e,n,l+S,E);break;case r.EditType.stepIn:S=h.siblingIndex(b);n=i.getLogicalChild(n,l+S),u++,l=0;break;case r.EditType.stepOut:n=i.getLogicalParent(n),l=0===--u?o:0;break;case r.EditType.permutationListEntry:(c=c||[]).push({fromSiblingIndex:l+h.siblingIndex(b),toSiblingIndex:l+h.moveToSiblingIndex(b)});break;case r.EditType.permutationListEnd:i.permuteLogicalChildren(n,c),c=void 0;break;default:throw new Error("Unknown edit type: "+m)}}},e.prototype.insertFrame=function(e,t,n,o,i,s,c){var u=e.frameReader,l=u.frameType(s);switch(l){case r.FrameType.element:return this.insertElement(e,t,n,o,i,s,c),1;case r.FrameType.text:return this.insertText(e,n,o,s),1;case r.FrameType.attribute:throw new Error("Attribute frames should only be present as leading children of element frames.");case r.FrameType.component:return this.insertComponent(e,n,o,s),1;case r.FrameType.region:return this.insertFrameRange(e,t,n,o,i,c+1,c+u.subtreeLength(s));case r.FrameType.elementReferenceCapture:if(n instanceof Element)return a.applyCaptureIdToElement(n,u.elementReferenceCaptureId(s)),0;throw new Error("Reference capture frames can only be children of element frames.");case r.FrameType.markup:return this.insertMarkup(e,n,o,s),1;default:throw new Error("Unknown frame type: "+l)}},e.prototype.insertElement=function(e,t,n,o,a,s,c){var u=e.frameReader,l=u.elementName(s),f="svg"===l||i.isSvgElement(n)?document.createElementNS("http://www.w3.org/2000/svg",l):document.createElement(l),h=i.toLogicalElement(f);i.insertLogicalChild(f,n,o);for(var p=c+u.subtreeLength(s),d=c+1;d<p;d++){var g=e.referenceFramesEntry(a,d);if(u.frameType(g)!==r.FrameType.attribute){this.insertFrameRange(e,t,h,0,a,d,p);break}this.applyAttribute(e,t,f,g)}if(f instanceof HTMLSelectElement&&"_blazorSelectValue"in f){var y=f._blazorSelectValue;f.value=y,delete f._blazorSelectValue}},e.prototype.insertComponent=function(e,t,n,r){var o=i.createAndInsertLogicalContainer(t,n),a=e.frameReader.componentId(r);this.attachComponentToElement(a,o)},e.prototype.insertText=function(e,t,n,r){var o=e.frameReader.textContent(r),a=document.createTextNode(o);i.insertLogicalChild(a,t,n)},e.prototype.insertMarkup=function(e,t,n,r){for(var o,a=i.createAndInsertLogicalContainer(t,n),s=e.frameReader.markupContent(r),c=(o=s,i.isSvgElement(t)?(l.innerHTML=o||" ",l):(u.innerHTML=o||" ",u.content)),f=0;c.firstChild;)i.insertLogicalChild(c.firstChild,a,f++)},e.prototype.applyAttribute=function(e,t,n,r){var o=e.frameReader,i=o.attributeName(r),a=o.attributeEventHandlerId(r);if(a){var s=g(i);this.eventDelegator.setListener(n,s,a,t)}else this.tryApplySpecialProperty(e,n,i,r)||n.setAttribute(i,o.attributeValue(r))},e.prototype.tryApplySpecialProperty=function(e,t,n,r){switch(n){case"value":return this.tryApplyValueProperty(e,t,r);case"checked":return this.tryApplyCheckedProperty(e,t,r);default:return!!n.startsWith("__internal_")&&(this.applyInternalAttribute(e,t,n.substring("__internal_".length),r),!0)}},e.prototype.applyInternalAttribute=function(e,t,n,r){var o=r?e.frameReader.attributeValue(r):null;if(n.startsWith("stopPropagation_")){var i=g(n.substring("stopPropagation_".length));this.eventDelegator.setStopPropagation(t,i,null!==o)}else{if(!n.startsWith("preventDefault_"))throw new Error("Unsupported internal attribute '"+n+"'");i=g(n.substring("preventDefault_".length));this.eventDelegator.setPreventDefault(t,i,null!==o)}},e.prototype.tryApplyValueProperty=function(e,t,n){var r=e.frameReader;if("INPUT"===t.tagName&&"time"===t.getAttribute("type")&&!t.getAttribute("step")){var o=n?r.attributeValue(n):null;if(o)return t.value=o.substring(0,5),!0}switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":var i=n?r.attributeValue(n):null;return t.value=i,"SELECT"===t.tagName&&(t._blazorSelectValue=i),!0;case"OPTION":(i=n?r.attributeValue(n):null)?t.setAttribute("value",i):t.removeAttribute("value");var a=this.findClosestAncestorSelectElement(t);return a&&"_blazorSelectValue"in a&&a._blazorSelectValue===i&&(this.tryApplyValueProperty(e,a,n),delete a._blazorSelectValue),!0;default:return!1}},e.prototype.tryApplyCheckedProperty=function(e,t,n){if("INPUT"===t.tagName){var r=n?e.frameReader.attributeValue(n):null;return t.checked=null!==r,!0}return!1},e.prototype.findClosestAncestorSelectElement=function(e){for(;e;){if(e instanceof HTMLSelectElement)return e;e=e.parentElement}return null},e.prototype.insertFrameRange=function(e,t,n,r,o,i,a){for(var s=r,c=i;c<a;c++){var u=e.referenceFramesEntry(o,c);r+=this.insertFrame(e,t,n,r,o,u,c),c+=d(e,u)}return r-s},e}();function d(e,t){var n=e.frameReader;switch(n.frameType(t)){case r.FrameType.component:case r.FrameType.element:case r.FrameType.region:return n.subtreeLength(t)-1;default:return 0}}function g(e){if(e.startsWith("on"))return e.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '"+e+"'")}t.BrowserRenderer=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t.EditType||(t.EditType={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup"}(t.FrameType||(t.FrameType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(30),i=l(["abort","blur","change","error","focus","load","loadend","loadstart","mouseenter","mouseleave","progress","reset","scroll","submit","unload","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),a=l(["click","dblclick","mousedown","mousemove","mouseup"]),s=function(){function e(t){this.onEvent=t,this.afterClickCallbacks=[];var n=++e.nextEventDelegatorId;this.eventsCollectionKey="_blazorEvents_"+n,this.eventInfoStore=new c(this.onGlobalEvent.bind(this))}return e.prototype.setListener=function(e,t,n,r){var o=this.getEventHandlerInfosForElement(e,!0),i=o.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{var a={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(a),o.setHandler(t,a)}},e.prototype.removeListener=function(e){var t=this.eventInfoStore.remove(e);if(t){var n=t.element,r=this.getEventHandlerInfosForElement(n,!1);r&&r.removeHandler(t.eventName)}},e.prototype.notifyAfterClick=function(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")},e.prototype.setStopPropagation=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)},e.prototype.setPreventDefault=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)},e.prototype.onGlobalEvent=function(e){if(e.target instanceof Element){for(var t,n,s=e.target,c=null,u=i.hasOwnProperty(e.type),l=!1;s;){var f=this.getEventHandlerInfosForElement(s,!1);if(f){var h=f.getHandler(e.type);if(h&&(t=s,n=e.type,!((t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&a.hasOwnProperty(n)&&t.disabled))){c||(c=r.EventForDotNet.fromDOMEvent(e));var p=o.EventFieldInfo.fromEvent(h.renderingComponentId,e);this.onEvent(e,h.eventHandlerId,c,p)}f.stopPropagation(e.type)&&(l=!0),f.preventDefault(e.type)&&e.preventDefault()}s=u||l?null:s.parentElement}"click"===e.type&&this.afterClickCallbacks.forEach(function(t){return t(e)})}},e.prototype.getEventHandlerInfosForElement=function(e,t){return e.hasOwnProperty(this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new u:null},e.nextEventDelegatorId=0,e}();t.EventDelegator=s;var c=function(){function e(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={}}return e.prototype.add=function(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error("Event "+e.eventHandlerId+" is already tracked");this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)},e.prototype.addGlobalListener=function(e){if(this.countByEventName.hasOwnProperty(e))this.countByEventName[e]++;else{this.countByEventName[e]=1;var t=i.hasOwnProperty(e);document.addEventListener(e,this.globalListener,t)}},e.prototype.update=function(e,t){if(this.infosByEventHandlerId.hasOwnProperty(t))throw new Error("Event "+t+" is already tracked");var n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n},e.prototype.remove=function(e){var t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];var n=t.eventName;0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t},e}(),u=function(){function e(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}return e.prototype.getHandler=function(e){return this.handlers.hasOwnProperty(e)?this.handlers[e]:null},e.prototype.setHandler=function(e,t){this.handlers[e]=t},e.prototype.removeHandler=function(e){delete this.handlers[e]},e.prototype.preventDefault=function(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]},e.prototype.stopPropagation=function(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]},e}();function l(e){var t={};return e.forEach(function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.type=e,this.data=t}return e.fromDOMEvent=function(t){var n=t.target;switch(t.type){case"input":case"change":if(function(e){return-1!==a.indexOf(e.getAttribute("type"))}(n)){var o=function(e){var t=e.value,n=e.type;switch(n){case"date":case"datetime-local":case"month":return t;case"time":return 5===t.length?t+":00":t;case"week":return t}throw new Error("Invalid element type '"+n+"'.")}(n);return new e("change",{type:t.type,value:o})}var s=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(n)?!!n.checked:n.value;return new e("change",{type:t.type,value:s});case"copy":case"cut":case"paste":return new e("clipboard",{type:t.type});case"drag":case"dragend":case"dragenter":case"dragleave":case"dragover":case"dragstart":case"drop":return new e("drag",function(e){return r({},i(e),{dataTransfer:e.dataTransfer})}(t));case"focus":case"blur":case"focusin":case"focusout":return new e("focus",{type:t.type});case"keydown":case"keyup":case"keypress":return new e("keyboard",function(e){return{type:e.type,key:e.key,code:e.code,location:e.location,repeat:e.repeat,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"contextmenu":case"click":case"mouseover":case"mouseout":case"mousemove":case"mousedown":case"mouseup":case"dblclick":return new e("mouse",i(t));case"error":return new e("error",function(e){return{type:e.type,message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno}}(t));case"loadstart":case"timeout":case"abort":case"load":case"loadend":case"progress":return new e("progress",function(e){return{type:e.type,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}}(t));case"touchcancel":case"touchend":case"touchmove":case"touchenter":case"touchleave":case"touchstart":return new e("touch",function(e){function t(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push({identifier:r.identifier,clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY})}return t}return{type:e.type,detail:e.detail,touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointerenter":case"pointerleave":case"pointermove":case"pointerout":case"pointerover":case"pointerup":return new e("pointer",function(e){return r({},i(e),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}(t));case"wheel":case"mousewheel":return new e("wheel",function(e){return r({},i(e),{deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ,deltaMode:e.deltaMode})}(t));default:return new e("unknown",{type:t.type})}},e}();function i(e){return{type:e.type,detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}t.EventForDotNet=o;var a=["date","datetime-local","month","time","week"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.componentId=e,this.fieldValue=t}return e.fromEvent=function(t,n){var r=n.target;if(r instanceof Element){var o=function(e){if(e instanceof HTMLInputElement)return e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value};if(e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return{value:e.value};return null}(r);if(o)return new e(t,o.value)}return null},e}();t.EventFieldInfo=r},function(e,t,n){"use strict";function r(e){return"_bl_"+e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCaptureIdToElement=function(e,t){e.setAttribute(r(t),"")};DotNet.attachReviver(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__internalId")&&"string"==typeof t.__internalId?(n=t.__internalId,o="["+r(n)+"]",document.querySelector(o)):t;var n,o})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=!1;t.showErrorNotification=function(){return r(this,void 0,void 0,function(){var e;return o(this,function(t){return(e=document.querySelector("#blazor-error-ui"))&&(e.style.display="block"),i||(i=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(e){e.onclick=function(e){location.reload(),e.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(e){e.onclick=function(e){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})),[2]})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n<i;c=r[++n])g(c)||!w(c)?a+=" "+c:a+=" "+s(c);return a},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,a={};function s(e,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)k(t,String(a))?i.push(h(e,t,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))}),i}(e,n,r,s,a):a.map(function(t){return h(e,n,r,s,t,_)}),e.seen.pop(),function(e,t,n){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,r){e?n(e):t(r)});try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=P,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};t.apply(this,n).then(function(t){e.nextTick(a,null,t)},function(t){e.nextTick(x,t,a)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(20))},,function(e,t,n){"use strict";(function(t,r){var o=n(23);e.exports=m;var i,a=n(57);m.ReadableState=b;n(37).EventEmitter;var s=function(e,t){return e.listeners(t).length},c=n(38),u=n(14).Buffer,l=t.Uint8Array||function(){};var f=n(21);f.inherits=n(15);var h=n(58),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=n(59),y=n(39);f.inherits(m,c);var v=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var r=t instanceof(i=i||n(10));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(40).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function m(e){if(i=i||n(10),!(this instanceof m))return new m(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function w(e,t,n,r,o){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,_(e)}(e,a)):(o||(i=function(e,t){var n;r=t,u.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):T(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&_(e)),T(e,t)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(e,t){this.push(null),t(e)},m.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=u.from(e,t),t=""),n=!0),w(this,e,t,!1,n)},m.prototype.unshift=function(e){return w(this,e,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(e){return d||(d=n(40).StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var S=8388608;function C(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(I,e):I(e))}function I(e){p("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function P(e){p("readable nexttick read 0"),e.read(0)}function x(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),R(e),t.flowing&&!t.reading&&e.read(0)}function R(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,o=n.data;e-=o.length;for(;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}m.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",o=!0),t.ended||t.reading?p("reading or ended",o=!1):o&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=C(n,t))),null===(r=e>0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,n);return this}var a=M(t.pipes,e);return-1===a?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},m.prototype.on=function(e,t){var n=c.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&_(this):o.nextTick(P,this))}return n},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(x,e,t))}(this,e)),this},m.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){(p("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<v.length;i++)e.on(v[i],this.emit.bind(this,v[i]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=D}).call(this,n(9),n(20))},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,a,s;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=u(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,i(this.listener,this.target,e))}.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):d(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n<u;++n)i(l[n],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,i,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=a(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if((o=a(t[r]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if((o=a(t[r]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(64)},f=n(38),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,s,r,o,i);return c}(this,o,s,e,t,n)),a},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||E(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){c(e,t,n)}):c(this,null,null)}function c(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=n(15),o.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return h});var r,o,i=n(3),a=n(4),s=n(0),c=n(1),u=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};if("undefined"==typeof XMLHttpRequest){var f=require;o=f("request")}var h=function(t){function n(e){var n=t.call(this)||this;if(void 0===o)throw new Error("The 'request' module could not be loaded.");return n.logger=e,n.cookieJar=o.jar(),n.request=o.defaults({jar:n.cookieJar}),n}return u(n,t),n.prototype.send=function(t){var n=this;return new Promise(function(r,o){var u;u=Object(c.g)(t.content)?e.from(t.content):t.content||"";var f=n.request(t.url,{body:u,encoding:"arraybuffer"===t.responseType?null:"utf8",headers:l({"X-Requested-With":"XMLHttpRequest"},t.headers),method:t.method,timeout:t.timeout},function(e,c,u){if(t.abortSignal&&(t.abortSignal.onabort=null),e)return"ETIMEDOUT"===e.code&&(n.logger.log(s.a.Warning,"Timeout from HTTP request."),o(new i.c)),n.logger.log(s.a.Warning,"Error from HTTP request. "+e),void o(e);c.statusCode>=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),n(17),n(24);var s=n(2),c=n(79),u=n(32),l=n(33),f=n(70),h=n(73),p=n(16),d=n(74),g=n(19),y=n(75),v=n(76),b=n(5),m=!1,w=!1;function E(e){return r(this,void 0,void 0,function(){var t,n,i,a,s,c,u=this;return o(this,function(l){switch(l.label){case 0:if(w)throw new Error("Blazor has already started.");return w=!0,t=y.resolveOptions(e),n=new h.ConsoleLogger(t.logLevel),window.Blazor.defaultReconnectionHandler=new v.DefaultReconnectionHandler(n),t.reconnectionHandler=t.reconnectionHandler||window.Blazor.defaultReconnectionHandler,n.log(p.LogLevel.Information,"Starting up blazor server-side application."),i=d.discoverComponents(document),a=new d.CircuitDescriptor(i),[4,S(t,n,a)];case 1:return s=l.sent(),[4,a.startCircuit(s)];case 2:return l.sent()?(c=function(e){return r(u,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:return m?[2,!1]:(i=e)?[3,2]:[4,S(t,n,a)];case 1:i=o.sent(),o.label=2;case 2:return r=i,[4,a.reconnect(r)];case 3:return o.sent()?(t.reconnectionHandler.onConnectionUp(),[2,!0]):(n.log(p.LogLevel.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),[2,!1])}})})},window.addEventListener("unload",function(){var e=new FormData,t=a.circuitId;e.append("circuitId",t),navigator.sendBeacon("_blazor/disconnect",e)},!1),window.Blazor.reconnect=c,n.log(p.LogLevel.Information,"Blazor server-side application started."),[2]):(n.log(p.LogLevel.Error,"Failed to start the circuit."),[2])}})})}function S(e,t,n){return r(this,void 0,void 0,function(){var r,i,l,h,d;return o(this,function(o){switch(o.label){case 0:(r=new c.MessagePackHubProtocol).name="blazorpack",i=(new s.HubConnectionBuilder).withUrl("_blazor").withHubProtocol(r),e.configureSignalR(i),l=i.build(),g.setEventDispatcher(function(e,t){return l.send("DispatchBrowserEvent",JSON.stringify(e),JSON.stringify(t))}),window.Blazor._internal.navigationManager.listenForNavigationEvents(function(e,t){return l.send("OnLocationChanged",e,t)}),l.on("JS.AttachComponent",function(e,t){return b.attachRootComponentToLogicalElement(0,n.resolveElement(t),e)}),l.on("JS.BeginInvokeJS",DotNet.jsCallDispatcher.beginInvokeJSFromDotNet),l.on("JS.EndInvokeDotNet",function(e){var t;return(t=DotNet.jsCallDispatcher).endInvokeDotNetFromJS.apply(t,a(JSON.parse(e)))}),h=f.RenderQueue.getOrCreate(t),l.on("JS.RenderBatch",function(e,n){t.log(p.LogLevel.Debug,"Received render batch with id "+e+" and "+n.byteLength+" bytes."),h.processBatch(e,n,l)}),l.onclose(function(t){return!m&&e.reconnectionHandler.onConnectionDown(e.reconnectionOptions,t)}),l.on("JS.Error",function(e){m=!0,C(l,e,t),u.showErrorNotification()}),window.Blazor._internal.forceCloseConnection=function(){return l.stop()},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.start()];case 2:return o.sent(),[3,4];case 3:return d=o.sent(),C(l,d,t),[3,4];case 4:return DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(e,t,n,r,o){l.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,r||0,o)},endInvokeJSFromDotNet:function(e,t,n){l.send("EndInvokeJSFromDotNet",e,t,n)}}),[2,l]}})})}function C(e,t,n){n.log(p.LogLevel.Error,t),e&&e.stop()}window.Blazor.start=E,l.shouldAutoStart()&&E()},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=u(e),r=n[0],a=n[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),c=0,l=a>0?r-4:r,f=0;f<l;f+=4)t=o[e.charCodeAt(f)]<<18|o[e.charCodeAt(f+1)]<<12|o[e.charCodeAt(f+2)]<<6|o[e.charCodeAt(f+3)],s[c++]=t>>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;a<s;a+=16383)i.push(l(e,a,a+16383>s?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s<c;++s)r[s]=a[s],o[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){ +var r=n(55),o=n(56),i=n(57);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=a(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function m(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return q(H(t),e,n,r)}function _(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,s,a,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(r,o),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=N(e[i]);return o}function x(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=u.isBuffer(e)?e:F(new u(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(37))},function(e,t,n){var r=n(62),o=n(36),i=n(13).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)})}else this.append(e);r.call(this)}o.inherits(s,r),s.prototype._offset=function(e){var t,n=0,r=0;if(0===e)return[0,0];for(;r<this._bufs.length;r++){if(e<(t=n+this._bufs[r].length)||r==this._bufs.length-1)return[r,e-n];n=t}},s.prototype.append=function(e){var t=0;if(i.isBuffer(e))this._appendBuffer(e);else if(Array.isArray(e))for(;t<e.length;t++)this.append(e[t]);else if(e instanceof s)for(;t<e._bufs.length;t++)this.append(e._bufs[t]);else null!=e&&("number"==typeof e&&(e=e.toString()),this._appendBuffer(i.from(e)));return this},s.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},s.prototype._write=function(e,t,n){this._appendBuffer(e),"function"==typeof n&&n()},s.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},s.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype.get=function(e){return this.slice(e,e+1)[0]},s.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},s.prototype.copy=function(e,t,n,r){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof r||r>this.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,s,a=!!e,u=this._offset(n),c=r-n,l=c,f=a&&t||0,h=u[1];if(0===n&&r==this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(s=0;s<this._bufs.length;s++)this._bufs[s].copy(e,f),f+=this._bufs[s].length;return e}if(l<=this._bufs[u[0]].length-h)return a?this._bufs[u[0]].copy(e,t,h,h+l):this._bufs[u[0]].slice(h,h+l);for(a||(e=i.allocUnsafe(c)),s=u[0];s<this._bufs.length;s++){if(!(l>(o=this._bufs[s].length-h))){this._bufs[s].copy(e,f,h,h+l);break}this._bufs[s].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},s.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new s(o)},s.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},s.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function(){for(var e=0,t=new s;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},s.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var t in e)!function(t){s.prototype[t]=function(n){return this.slice(n,n+e[t])[t](0)}}(t)}(),e.exports=s},function(e,t,n){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,o)});default:for(i=new Array(a-1),s=0;s<i.length;)i[s++]=arguments[s];return t.nextTick(function(){e.apply(null,i)})}}}:e.exports=t}).call(this,n(23))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(5);window.Blazor={navigateTo:r.navigateTo,_internal:{attachRootComponentToElement:o.attachRootComponentToElement,navigationManager:r.internalFunctions}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),o=n(28),i=n(11),s=n(31),a=n(18),u=n(10),c=document.createElement("template"),l=document.createElementNS("http://www.w3.org/2000/svg","g"),f={submit:!0},h={},p=function(){function e(e){var t=this;this.childComponentLocations={},this.browserRendererId=e,this.eventDelegator=new o.EventDelegator(function(e,n,r,o){!function(e,t,n,r,o){f[e.type]&&e.preventDefault();var i={browserRendererId:t,eventHandlerId:n,eventArgsType:r.type,eventFieldInfo:o};a.dispatchEvent(i,r.data)}(e,t.browserRendererId,n,r,o)}),u.attachToEventDelegator(this.eventDelegator)}return e.prototype.attachRootComponentToLogicalElement=function(e,t){this.attachComponentToElement(e,t),h[e]=t},e.prototype.updateComponent=function(e,t,n,r){var o=this.childComponentLocations[t];if(!o)throw new Error("No element is currently associated with component "+t);var s=h[t];if(s){var a=i.getLogicalSiblingEnd(s);delete h[t],a?function(e,t){var n=i.getLogicalParent(e);if(!n)throw new Error("Can't clear between nodes. The start node does not have a logical parent.");for(var r=i.getLogicalChildrenArray(n),o=r.indexOf(e)+1,s=r.indexOf(t),a=o;a<=s;a++)i.removeLogicalChild(n,o);e.textContent="!"}(s,a):function(e){var t;for(;t=e.firstChild;)e.removeChild(t)}(s)}var u=i.getClosestDomElement(o).ownerDocument,c=u&&u.activeElement;this.applyEdits(e,t,o,0,n,r),c instanceof HTMLElement&&u&&u.activeElement!==c&&c.focus()},e.prototype.disposeComponent=function(e){delete this.childComponentLocations[e]},e.prototype.disposeEventHandler=function(e){this.eventDelegator.removeListener(e)},e.prototype.attachComponentToElement=function(e,t){this.childComponentLocations[e]=t},e.prototype.applyEdits=function(e,t,n,o,s,a){for(var u,c=0,l=o,f=e.arrayBuilderSegmentReader,h=e.editReader,p=e.frameReader,d=f.values(s),g=f.offset(s),y=g+f.count(s),v=g;v<y;v++){var b=e.diffReader.editsEntry(d,v),m=h.editType(b);switch(m){case r.EditType.prependFrame:var w=h.newTreeIndex(b),E=e.referenceFramesEntry(a,w),S=h.siblingIndex(b);this.insertFrame(e,t,n,l+S,a,E,w);break;case r.EditType.removeFrame:S=h.siblingIndex(b);i.removeLogicalChild(n,l+S);break;case r.EditType.setAttribute:w=h.newTreeIndex(b),E=e.referenceFramesEntry(a,w),S=h.siblingIndex(b);if(!((_=i.getLogicalChild(n,l+S))instanceof Element))throw new Error("Cannot set attribute on non-element child");this.applyAttribute(e,t,_,E);break;case r.EditType.removeAttribute:var _;S=h.siblingIndex(b);if(!((_=i.getLogicalChild(n,l+S))instanceof HTMLElement))throw new Error("Cannot remove attribute from non-element child");var T=h.removedAttributeName(b);this.tryApplySpecialProperty(e,_,T,null)||_.removeAttribute(T);break;case r.EditType.updateText:w=h.newTreeIndex(b),E=e.referenceFramesEntry(a,w),S=h.siblingIndex(b);var C=i.getLogicalChild(n,l+S);if(!(C instanceof Text))throw new Error("Cannot set text content on non-text child");C.textContent=p.textContent(E);break;case r.EditType.updateMarkup:w=h.newTreeIndex(b),E=e.referenceFramesEntry(a,w),S=h.siblingIndex(b);i.removeLogicalChild(n,l+S),this.insertMarkup(e,n,l+S,E);break;case r.EditType.stepIn:S=h.siblingIndex(b);n=i.getLogicalChild(n,l+S),c++,l=0;break;case r.EditType.stepOut:n=i.getLogicalParent(n),l=0===--c?o:0;break;case r.EditType.permutationListEntry:(u=u||[]).push({fromSiblingIndex:l+h.siblingIndex(b),toSiblingIndex:l+h.moveToSiblingIndex(b)});break;case r.EditType.permutationListEnd:i.permuteLogicalChildren(n,u),u=void 0;break;default:throw new Error("Unknown edit type: "+m)}}},e.prototype.insertFrame=function(e,t,n,o,i,a,u){var c=e.frameReader,l=c.frameType(a);switch(l){case r.FrameType.element:return this.insertElement(e,t,n,o,i,a,u),1;case r.FrameType.text:return this.insertText(e,n,o,a),1;case r.FrameType.attribute:throw new Error("Attribute frames should only be present as leading children of element frames.");case r.FrameType.component:return this.insertComponent(e,n,o,a),1;case r.FrameType.region:return this.insertFrameRange(e,t,n,o,i,u+1,u+c.subtreeLength(a));case r.FrameType.elementReferenceCapture:if(n instanceof Element)return s.applyCaptureIdToElement(n,c.elementReferenceCaptureId(a)),0;throw new Error("Reference capture frames can only be children of element frames.");case r.FrameType.markup:return this.insertMarkup(e,n,o,a),1;default:throw new Error("Unknown frame type: "+l)}},e.prototype.insertElement=function(e,t,n,o,s,a,u){var c=e.frameReader,l=c.elementName(a),f="svg"===l||i.isSvgElement(n)?document.createElementNS("http://www.w3.org/2000/svg",l):document.createElement(l),h=i.toLogicalElement(f);i.insertLogicalChild(f,n,o);for(var p=u+c.subtreeLength(a),d=u+1;d<p;d++){var g=e.referenceFramesEntry(s,d);if(c.frameType(g)!==r.FrameType.attribute){this.insertFrameRange(e,t,h,0,s,d,p);break}this.applyAttribute(e,t,f,g)}if(f instanceof HTMLSelectElement&&"_blazorSelectValue"in f){var y=f._blazorSelectValue;f.value=y,delete f._blazorSelectValue}},e.prototype.insertComponent=function(e,t,n,r){var o=i.createAndInsertLogicalContainer(t,n),s=e.frameReader.componentId(r);this.attachComponentToElement(s,o)},e.prototype.insertText=function(e,t,n,r){var o=e.frameReader.textContent(r),s=document.createTextNode(o);i.insertLogicalChild(s,t,n)},e.prototype.insertMarkup=function(e,t,n,r){for(var o,s=i.createAndInsertLogicalContainer(t,n),a=e.frameReader.markupContent(r),u=(o=a,i.isSvgElement(t)?(l.innerHTML=o||" ",l):(c.innerHTML=o||" ",c.content)),f=0;u.firstChild;)i.insertLogicalChild(u.firstChild,s,f++)},e.prototype.applyAttribute=function(e,t,n,r){var o=e.frameReader,i=o.attributeName(r),s=o.attributeEventHandlerId(r);if(s){var a=g(i);this.eventDelegator.setListener(n,a,s,t)}else this.tryApplySpecialProperty(e,n,i,r)||n.setAttribute(i,o.attributeValue(r))},e.prototype.tryApplySpecialProperty=function(e,t,n,r){switch(n){case"value":return this.tryApplyValueProperty(e,t,r);case"checked":return this.tryApplyCheckedProperty(e,t,r);default:return!!n.startsWith("__internal_")&&(this.applyInternalAttribute(e,t,n.substring("__internal_".length),r),!0)}},e.prototype.applyInternalAttribute=function(e,t,n,r){var o=r?e.frameReader.attributeValue(r):null;if(n.startsWith("stopPropagation_")){var i=g(n.substring("stopPropagation_".length));this.eventDelegator.setStopPropagation(t,i,null!==o)}else{if(!n.startsWith("preventDefault_"))throw new Error("Unsupported internal attribute '"+n+"'");i=g(n.substring("preventDefault_".length));this.eventDelegator.setPreventDefault(t,i,null!==o)}},e.prototype.tryApplyValueProperty=function(e,t,n){var r=e.frameReader;if("INPUT"===t.tagName&&"time"===t.getAttribute("type")&&!t.getAttribute("step")){var o=n?r.attributeValue(n):null;if(o)return t.value=o.substring(0,5),!0}switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":var i=n?r.attributeValue(n):null;return t.value=i,"SELECT"===t.tagName&&(t._blazorSelectValue=i),!0;case"OPTION":(i=n?r.attributeValue(n):null)?t.setAttribute("value",i):t.removeAttribute("value");var s=this.findClosestAncestorSelectElement(t);return s&&"_blazorSelectValue"in s&&s._blazorSelectValue===i&&(this.tryApplyValueProperty(e,s,n),delete s._blazorSelectValue),!0;default:return!1}},e.prototype.tryApplyCheckedProperty=function(e,t,n){if("INPUT"===t.tagName){var r=n?e.frameReader.attributeValue(n):null;return t.checked=null!==r,!0}return!1},e.prototype.findClosestAncestorSelectElement=function(e){for(;e;){if(e instanceof HTMLSelectElement)return e;e=e.parentElement}return null},e.prototype.insertFrameRange=function(e,t,n,r,o,i,s){for(var a=r,u=i;u<s;u++){var c=e.referenceFramesEntry(o,u);r+=this.insertFrame(e,t,n,r,o,c,u),u+=d(e,c)}return r-a},e}();function d(e,t){var n=e.frameReader;switch(n.frameType(t)){case r.FrameType.component:case r.FrameType.element:case r.FrameType.region:return n.subtreeLength(t)-1;default:return 0}}function g(e){if(e.startsWith("on"))return e.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '"+e+"'")}t.BrowserRenderer=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t.EditType||(t.EditType={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup"}(t.FrameType||(t.FrameType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(30),i=l(["abort","blur","change","error","focus","load","loadend","loadstart","mouseenter","mouseleave","progress","reset","scroll","submit","unload","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),s=l(["click","dblclick","mousedown","mousemove","mouseup"]),a=function(){function e(t){this.onEvent=t,this.afterClickCallbacks=[];var n=++e.nextEventDelegatorId;this.eventsCollectionKey="_blazorEvents_"+n,this.eventInfoStore=new u(this.onGlobalEvent.bind(this))}return e.prototype.setListener=function(e,t,n,r){var o=this.getEventHandlerInfosForElement(e,!0),i=o.getHandler(t);if(i)this.eventInfoStore.update(i.eventHandlerId,n);else{var s={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(s),o.setHandler(t,s)}},e.prototype.removeListener=function(e){var t=this.eventInfoStore.remove(e);if(t){var n=t.element,r=this.getEventHandlerInfosForElement(n,!1);r&&r.removeHandler(t.eventName)}},e.prototype.notifyAfterClick=function(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")},e.prototype.setStopPropagation=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)},e.prototype.setPreventDefault=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)},e.prototype.onGlobalEvent=function(e){if(e.target instanceof Element){for(var t,n,a=e.target,u=null,c=i.hasOwnProperty(e.type),l=!1;a;){var f=this.getEventHandlerInfosForElement(a,!1);if(f){var h=f.getHandler(e.type);if(h&&(t=a,n=e.type,!((t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&s.hasOwnProperty(n)&&t.disabled))){u||(u=r.EventForDotNet.fromDOMEvent(e));var p=o.EventFieldInfo.fromEvent(h.renderingComponentId,e);this.onEvent(e,h.eventHandlerId,u,p)}f.stopPropagation(e.type)&&(l=!0),f.preventDefault(e.type)&&e.preventDefault()}a=c||l?null:a.parentElement}"click"===e.type&&this.afterClickCallbacks.forEach(function(t){return t(e)})}},e.prototype.getEventHandlerInfosForElement=function(e,t){return e.hasOwnProperty(this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new c:null},e.nextEventDelegatorId=0,e}();t.EventDelegator=a;var u=function(){function e(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={}}return e.prototype.add=function(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error("Event "+e.eventHandlerId+" is already tracked");this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)},e.prototype.addGlobalListener=function(e){if(this.countByEventName.hasOwnProperty(e))this.countByEventName[e]++;else{this.countByEventName[e]=1;var t=i.hasOwnProperty(e);document.addEventListener(e,this.globalListener,t)}},e.prototype.update=function(e,t){if(this.infosByEventHandlerId.hasOwnProperty(t))throw new Error("Event "+t+" is already tracked");var n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n},e.prototype.remove=function(e){var t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];var n=t.eventName;0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t},e}(),c=function(){function e(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}return e.prototype.getHandler=function(e){return this.handlers.hasOwnProperty(e)?this.handlers[e]:null},e.prototype.setHandler=function(e,t){this.handlers[e]=t},e.prototype.removeHandler=function(e){delete this.handlers[e]},e.prototype.preventDefault=function(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]},e.prototype.stopPropagation=function(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]},e}();function l(e){var t={};return e.forEach(function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.type=e,this.data=t}return e.fromDOMEvent=function(t){var n=t.target;switch(t.type){case"input":case"change":if(function(e){return-1!==s.indexOf(e.getAttribute("type"))}(n)){var o=function(e){var t=e.value,n=e.type;switch(n){case"date":case"datetime-local":case"month":return t;case"time":return 5===t.length?t+":00":t;case"week":return t}throw new Error("Invalid element type '"+n+"'.")}(n);return new e("change",{type:t.type,value:o})}var a=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(n)?!!n.checked:n.value;return new e("change",{type:t.type,value:a});case"copy":case"cut":case"paste":return new e("clipboard",{type:t.type});case"drag":case"dragend":case"dragenter":case"dragleave":case"dragover":case"dragstart":case"drop":return new e("drag",function(e){return r({},i(e),{dataTransfer:e.dataTransfer})}(t));case"focus":case"blur":case"focusin":case"focusout":return new e("focus",{type:t.type});case"keydown":case"keyup":case"keypress":return new e("keyboard",function(e){return{type:e.type,key:e.key,code:e.code,location:e.location,repeat:e.repeat,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"contextmenu":case"click":case"mouseover":case"mouseout":case"mousemove":case"mousedown":case"mouseup":case"dblclick":return new e("mouse",i(t));case"error":return new e("error",function(e){return{type:e.type,message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno}}(t));case"loadstart":case"timeout":case"abort":case"load":case"loadend":case"progress":return new e("progress",function(e){return{type:e.type,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}}(t));case"touchcancel":case"touchend":case"touchmove":case"touchenter":case"touchleave":case"touchstart":return new e("touch",function(e){function t(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push({identifier:r.identifier,clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY})}return t}return{type:e.type,detail:e.detail,touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointerenter":case"pointerleave":case"pointermove":case"pointerout":case"pointerover":case"pointerup":return new e("pointer",function(e){return r({},i(e),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}(t));case"wheel":case"mousewheel":return new e("wheel",function(e){return r({},i(e),{deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ,deltaMode:e.deltaMode})}(t));default:return new e("unknown",{type:t.type})}},e}();function i(e){return{type:e.type,detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}t.EventForDotNet=o;var s=["date","datetime-local","month","time","week"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.componentId=e,this.fieldValue=t}return e.fromEvent=function(t,n){var r=n.target;if(r instanceof Element){var o=function(e){if(e instanceof HTMLInputElement)return e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value};if(e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return{value:e.value};return null}(r);if(o)return new e(t,o.value)}return null},e}();t.EventFieldInfo=r},function(e,t,n){"use strict";function r(e){return"_bl_"+e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCaptureIdToElement=function(e,t){e.setAttribute(r(t),"")};DotNet.attachReviver(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__internalId")&&"string"==typeof t.__internalId?(n=t.__internalId,o="["+r(n)+"]",document.querySelector(o)):t;var n,o})},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=!1;t.showErrorNotification=function(){return r(this,void 0,void 0,function(){var e;return o(this,function(t){return(e=document.querySelector("#blazor-error-ui"))&&(e.style.display="block"),i||(i=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(e){e.onclick=function(e){location.reload(),e.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(e){e.onclick=function(e){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})),[2]})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var i=n(34),a=Object.prototype.hasOwnProperty,s=Array.prototype.slice,c="foo"===function(){}.name;function u(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(i.isFunction(e)){if(c)return e.name;var t=e.toString().match(h);return t&&t[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(c||!i.isFunction(e))return i.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,n,r,o){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function v(e,t){e||y(e,!0,t,"==",f.ok)}function b(e,t,n,a){if(e===t)return!0;if(o(e)&&o(t))return 0===r(e,t);if(i.isDate(e)&&i.isDate(t))return e.getTime()===t.getTime();if(i.isRegExp(e)&&i.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&u(e)===u(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var c=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==c&&c===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(i.isPrimitive(e)||i.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=m(e),a=m(t);if(o&&!a||!o&&a)return!1;if(o)return e=s.call(e),t=s.call(t),b(e,t,n);var c,u,l=S(e),f=S(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),u=l.length-1;u>=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return u[c]=o,r(c),c++},h.clearImmediate=p}function p(e){delete u[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=u[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(9),n(20))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(9))},function(e,t,n){"use strict";var r=n(66).Transform,o=n(15),i=n(22);function a(e){(e=e||{}).objectMode=!0,e.highWaterMark=16,r.call(this,e),this._msgpack=e.msgpack}function s(e){if(!(this instanceof s))return(e=e||{}).msgpack=this,new s(e);a.call(this,e)}function c(e){if(!(this instanceof c))return(e=e||{}).msgpack=this,new c(e);a.call(this,e),this._chunks=i()}o(a,r),o(s,a),s.prototype._transform=function(e,t,n){var r=null;try{r=this._msgpack.encode(e).slice(0)}catch(e){return this.emit("error",e),n()}this.push(r),n()},o(c,a),c.prototype._transform=function(e,t,n){e&&this._chunks.append(e);try{var r=this._msgpack.decode(this._chunks);this.push(r)}catch(e){return void(e instanceof this._msgpack.IncompleteBufferError?n():this.emit("error",e))}this._chunks.length>0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(34).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t<n)}(h,o))return null;switch(h){case 192:return n(null,1);case 194:return n(!1,1);case 195:return n(!0,1);case 204:return n(p=e.readUInt8(r+1),2);case 205:return n(p=e.readUInt16BE(r+1),3);case 206:return n(p=e.readUInt32BE(r+1),5);case 207:for(f=7;f>=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;a<r;a++){var u=i(e,t);if(!u)return null;s.push(u.value),t+=u.bytesConsumed,c+=u.bytesConsumed}return n(s,o+c)}function s(e,t,r,o){var a,s={},c=0;for(t+=o,a=0;a<r;a++){var u=i(e,t);if(!u)return null;var l=i(e,t+=u.bytesConsumed);if(!l)return null;s[u.value]=l.value,t+=l.bytesConsumed,c+=u.bytesConsumed+l.bytesConsumed}return n(s,o+c)}function c(e,t,n){var r=e.readInt8(t+1);return u(e,t,r,n,2)}function u(t,r,o,i,a){var s,c;if(r+=a,o<0)switch(o){case-1:return function(e,t,r){var o,i;switch(i=0,t){case 4:o=e.readUInt32BE(0);break;case 8:var a=e.readUInt32BE(0),s=e.readUInt32BE(4);i=a/4,o=(3&a)*Math.pow(2,32)+s;break;case 12:throw new Error("timestamp 96 is not yet implemented")}var c=1e3*o+Math.round(i/1e6);return n(new Date(c),t+r)}(c=t.slice(r,r+i),i,a)}for(s=0;s<e.length;s++){if(o===e[s].type)return c=t.slice(r,r+i),n(e[s].decode(c),a+i)}throw new Error("unable to find ext type "+o)}},e.exports.IncompleteBufferError=o},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(22),i=.1;function a(e,t){var n;return(n=r.allocUnsafe(5))[0]=202,n.writeFloatBE(e,1),(t||Math.abs(e-n.readFloatBE(1))>i)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n<e.length;n++)if(e[n].check(t)){i=e[n].encode(t);break}if(!i)return null;1==(a=i.length-1)?s.push(212):2===a?s.push(213):4===a?s.push(214):8===a?s.push(215):16===a?s.push(216):a<256?(s.push(199),s.push(a)):a<65536?(s.push(200),s.push(a>>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),a=n(71),s=n(16),c=function(){function e(e,t){this.nextBatchId=2,this.browserRendererId=e,this.logger=t}return e.getOrCreate=function(t){return e.instance||(e.instance=new e(0,t)),this.instance},e.prototype.processBatch=function(e,t,n){return r(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:return e<this.nextBatchId?[4,this.completeBatch(n,e)]:[3,2];case 1:return o.sent(),this.logger.log(s.LogLevel.Debug,"Batch "+e+" already processed. Waiting for batch "+this.nextBatchId+"."),[2];case 2:return e>this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<<r,i<128)break;r+=7}return n}(this.batchDataUint8,n),i=n+((t=o)<128?1:t<16384?2:t<2097152?3:4),a=new Uint8Array(this.batchDataUint8.buffer,this.batchDataUint8.byteOffset+i,o);return r.decodeUtf8(a)},e}(),f=function(){function e(e){this.batchDataUint8=e}return e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}(),h=function(){function e(e){this.batchDataUint8=e}return e.prototype.offset=function(e){return 0},e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}();function p(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function d(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t<n;){var i=e[t++];if(0===i)break;if(0==(128&i))r.push(i);else if(192==(224&i)){var a=63&e[t++];r.push((31&i)<<6|a)}else if(224==(240&i)){var a=63&e[t++],s=63&e[t++];r.push((31&i)<<12|a<<6|s)}else if(240==(248&i)){var a=63&e[t++],s=63&e[t++],c=63&e[t++],u=(7&i)<<18|a<<12|s<<6|c;u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),a=n(13),s=function(){function e(e){this.circuitId=void 0,this.components=e}return e.prototype.reconnect=function(e){if(!this.circuitId)throw new Error("Circuit host not initialized.");return e.invoke("ConnectCircuit",this.circuitId)},e.prototype.initialize=function(e){if(this.circuitId)throw new Error("Circuit host '"+this.circuitId+"' already initialized.");this.circuitId=e},e.prototype.startCircuit=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,e.invoke("StartCircuit",i.internalFunctions.getBaseURI(),i.internalFunctions.getLocationHref(),JSON.stringify(this.components.map(function(e){return e.toRecord()})))];case 1:return(t=n.sent())?(this.initialize(t),[2,!0]):[2,!1]}})})},e.prototype.resolveElement=function(e){var t=Number.parseInt(e);if(Number.isNaN(t))throw new Error("Invalid sequence number '"+e+"'.");return a.toLogicalRootCommentElement(this.components[t].start,this.components[t].end)},e}();t.CircuitDescriptor=s;var c=function(){function e(e,t,n,r,o){this.type=e,this.start=t,this.end=n,this.sequence=r,this.descriptor=o}return e.prototype.toRecord=function(){return{type:this.type,sequence:this.sequence,descriptor:this.descriptor}},e}();t.ComponentDescriptor=c,t.discoverComponents=function(e){for(var t=function e(t){if(!t.hasChildNodes())return[];for(var n=[],r=new h(t.childNodes);r.next()&&r.currentElement;){var o=l(r);if(o)n.push(o);else for(var i=e(r.currentElement),a=0;a<i.length;a++){var s=i[a];n.push(s)}}return n}(e),n=[],r=0;r<t.length;r++){var o=t[r],i=new c(o.type,o.start,o.end,o.sequence,o.descriptor);n.push(i)}return n.sort(function(e,t){return e.sequence-t.sequence})};var u=/\W*Blazor:[^{]*(.*)$/;function l(e){var t=e.currentElement;if(t&&t.nodeType===Node.COMMENT_NODE&&t.textContent){var n=new RegExp(u).exec(t.textContent),r=n&&n[1];if(!r)return;try{return function(e,t,n){var r=JSON.parse(e),o=r.type,i=r.sequence,a=r.descriptor,s=r.prerenderId;if("server"!==o)throw new Error("Invalid component type '"+o+"'.");if(!a)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===i)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(i))throw new Error("Error parsing the sequence '"+i+"' for component '"+e+"'");if(s){var c=function(e,t){for(;t.next()&&t.currentElement;){var n=t.currentElement;if(n.nodeType===Node.COMMENT_NODE&&n.textContent){var r=new RegExp(u).exec(n.textContent),o=r&&r[1];if(o)return f(o,e),n}}return}(s,n);if(!c)throw new Error("Could not find an end component comment for '"+t+"'");return{type:o,sequence:i,descriptor:a,start:t,prerenderId:s,end:c}}return{type:o,sequence:i,descriptor:a,start:t}}(r,t,e)}catch(e){throw new Error("Found malformed component comment at "+t.textContent)}}}function f(e,t){var n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error("Invalid end of component comment: '"+e+"'");var r=n.prerenderId;if(!r)throw new Error("End of component comment must have a value for the prerendered property: '"+e+"'");if(r!==t)throw new Error("End of component comment prerendered property must match the start comment prerender id: '"+t+"', '"+r+"'")}var h=function(){function e(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}return e.prototype.next=function(){return this.currentIndex++,this.currentIndex<this.length?(this.currentElement=this.childNodes[this.currentIndex],!0):(this.currentElement=void 0,!1)},e}()},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(16);t.resolveOptions=function(e){var t=r({},i,e);return e&&e.reconnectionOptions&&(t.reconnectionOptions=r({},i.reconnectionOptions,e.reconnectionOptions)),t};var i={configureSignalR:function(e){},logLevel:o.LogLevel.Warning,reconnectionOptions:{maxRetries:5,retryIntervalMilliseconds:3e3,dialogId:"components-reconnect-modal"}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(77),a=n(78),s=n(16),c=function(){function e(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||function(){return window.Blazor.reconnect()}}return e.prototype.onConnectionDown=function(e,t){if(!this._reconnectionDisplay){var n=document.getElementById(e.dialogId);this._reconnectionDisplay=n?new a.UserSpecifiedDisplay(n):new i.DefaultReconnectDisplay(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new u(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))},e.prototype.onConnectionUp=function(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)},e}();t.DefaultReconnectionHandler=c;var u=function(){function e(e,t,n,r){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=r,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}return e.prototype.dispose=function(){this.isDisposed=!0,this.reconnectDisplay.hide()},e.prototype.attemptPeriodicReconnection=function(e){return r(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.maxRetries?[4,this.delay(e.retryIntervalMilliseconds)]:[3,7];case 2:if(r.sent(),this.isDisposed)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.reconnectCallback()];case 4:return r.sent()?[2]:(this.reconnectDisplay.rejected(),[2]);case 5:return n=r.sent(),this.logger.log(s.LogLevel.Error,n),[3,6];case 6:return t++,[3,1];case 7:return this.reconnectDisplay.failed(),[2]}})})},e.prototype.delay=function(e){return new Promise(function(t){return setTimeout(t,e)})},e}()},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(16),a=function(){function e(e,t,n){var a=this;this.document=t,this.logger=n,this.addedToDom=!1,this.modal=this.document.createElement("div"),this.modal.id=e;this.modal.style.cssText=["position: fixed","top: 0","right: 0","bottom: 0","left: 0","z-index: 1000","display: none","overflow: hidden","background-color: #fff","opacity: 0.8","text-align: center","font-weight: bold"].join(";"),this.modal.innerHTML='<h5 style="margin-top: 20px"></h5><button style="margin:5px auto 5px">Retry</button><p>Alternatively, <a href>reload</a></p>',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(a,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try <a href>reloading</a> the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. <a href>Reload</a> the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o<e.byteLength;){var i=0,a=0,s=void 0;do{a|=(127&(s=n[o+i]))<<r[i],i++}while(i<Math.min(5,e.byteLength-o)&&0!=(128&s));if(0!=(128&s)&&i<5)throw new Error("Cannot read message size.");if(5===i&&s>7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s<c.length;s++){var u=c[s],l=this.parseMessage(u,t);l&&o.push(l)}return o},e.prototype.writeMessage=function(e){switch(e.type){case i.MessageType.Invocation:return this.writeInvocation(e);case i.MessageType.StreamInvocation:return this.writeStreamInvocation(e);case i.MessageType.StreamItem:return this.writeStreamItem(e);case i.MessageType.Completion:return this.writeCompletion(e);case i.MessageType.Ping:return a.write(s);case i.MessageType.CancelInvocation:return this.writeCancelInvocation(e);default:throw new Error("Invalid message type.")}},e.prototype.parseMessage=function(e,t){if(0===e.length)throw new Error("Invalid payload.");var n=o().decode(r.Buffer.from(e));if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");var a=n[0];switch(a){case i.MessageType.Invocation:return this.createInvocationMessage(this.readHeaders(n),n);case i.MessageType.StreamItem:return this.createStreamItemMessage(this.readHeaders(n),n);case i.MessageType.Completion:return this.createCompletionMessage(this.readHeaders(n),n);case i.MessageType.Ping:return this.createPingMessage(n);case i.MessageType.Close:return this.createCloseMessage(n);default:return t.log(i.LogLevel.Information,"Unknown message type '"+a+"' ignored."),null}},e.prototype.createCloseMessage=function(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="3.1.0"}]); \ No newline at end of file +var r=n(52),o=n(53),i=n(54);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),o=(e=a(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|p(t.length);return 0===(e=a(e,n)).length?e:(t.copy(e,0,0,n),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):h(e,t);if("Buffer"===t.type&&i(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=a(e,t<0?0:0|p(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|p(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return-1}function b(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function m(e,t,n,r){return q(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return q(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return q(H(t),e,n,r)}function _(e,t,n,r){return q(function(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,s,a,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=I));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return l(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):function(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(r,o),l=e.slice(t,n),f=0;f<a;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:s<i?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function R(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=N(e[i]);return o}function x(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;n=new u(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var s=u.isBuffer(e)?e:F(new u(e,r).toString()),a=s.length;for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(12))},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(a(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,s=String(e).replace(o,function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),u=r[n];n<i;u=r[++n])g(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),o=!0}return n.apply(this,arguments)}};var i,s={};function a(e,n){var r={seen:[],stylize:c};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&_(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var s=Object.keys(n),a=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),S(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(n);if(0===s.length){if(_(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var c,w="",T=!1,C=["{","}"];(p(n)&&(T=!0,C=["[","]"]),_(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==s.length||T&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=T?function(e,t,n,r,o){for(var i=[],s=0,a=t.length;s<a;++s)k(t,String(s))?i.push(h(e,t,n,r,String(s),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))}),i}(e,n,r,a,s):s.map(function(t){return h(e,n,r,a,t,T)}),e.seen.pop(),function(e,t,n){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,w,C)):C[0]+w+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),k(r,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=g(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===T(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===T(e)}function S(e){return w(e)&&("[object Error]"===T(e)||e instanceof Error)}function _(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else s[n]=function(){};return s[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(60);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(61),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(e,r){e?n(e):t(r)});try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=P,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,s=function(){return o.apply(i,arguments)};t.apply(this,n).then(function(t){e.nextTick(s,null,t)},function(t){e.nextTick(R,t,s)})}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(59))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t,r){var o=n(22);e.exports=m;var i,s=n(63);m.ReadableState=b;n(39).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=n(40),c=n(13).Buffer,l=t.Uint8Array||function(){};var f=n(19);f.inherits=n(14);var h=n(64),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=n(65),y=n(41);f.inherits(m,u);var v=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var r=t instanceof(i=i||n(8));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=n(42).StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function m(e){if(i=i||n(8),!(this instanceof m))return new m(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(e,t,n,r,o){var i,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,T(e)}(e,s)):(o||(i=function(e,t){var n;r=t,c.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(s,t)),i?e.emit("error",i):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):I(e,s)):E(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&T(e)),I(e,t)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(e,t){this.push(null),t(e)},m.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=c.from(e,t),t=""),n=!0),w(this,e,t,!1,n)},m.prototype.unshift=function(e){return w(this,e,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(e){return d||(d=n(42).StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var S=8388608;function _(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(C,e):C(e))}function C(e){p("emit readable"),e.emit("readable"),x(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(p("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function P(e){p("readable nexttick read 0"),e.read(0)}function R(e,t){t.reading||(p("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(p("flow",t.flowing);t.flowing&&null!==e.read(););}function A(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,o=n.data;e-=o.length;for(;n=n.next;){var i=n.data,s=e>i.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0===(e-=s)){s===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=c.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,s),0===(e-=s)){s===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function D(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}m.prototype.read=function(e){p("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&D(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&p("length less than watermark",o=!0),t.ended||t.reading?p("reading or ended",o=!1):o&&(p("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=_(n,t))),null===(r=e>0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function c(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(u):n.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===a(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,n);return this}var s=L(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n),this)},m.prototype.on=function(e,t){var n=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&T(this):o.nextTick(P,this))}return n},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var e=this._readableState;return e.flowing||(p("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(R,e,t))}(this,e)),this},m.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){(p("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<v.length;i++)e.on(v[i],this.emit.bind(this,v[i]));return this._read=function(t){p("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=A}).call(this,n(12),n(23))},function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,s,a;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,i(this.listener,this.target,e))}.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):d(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function d(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,l=d(u,c);for(n=0;n<c;++n)i(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,s;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(39).EventEmitter},function(e,t,n){"use strict";var r=n(22);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(67).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=s(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if((o=s(t[r]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if((o=s(t[r]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(22);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var a,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var c=n(19);c.inherits=n(14);var l={deprecate:n(70)},f=n(40),h=n(13).Buffer,p=o.Uint8Array||function(){};var d,g=n(41);function y(){}function v(e,t){a=a||n(8),e=e||{};var r=t instanceof a;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,n,r,t,o);else{var s=S(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?u(w,e,n,s,o):w(e,n,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||n(8),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function T(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,n,r,o,i){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==s&&(n=!0,o="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,a,r,o,i);return u}(this,o,a,e,t,n)),s},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||E(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(23),n(68).setImmediate,n(12))},function(e,t,n){"use strict";e.exports=s;var r=n(8),o=n(19);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush(function(t,n){u(e,t,n)}):u(this,null,null)}function u(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=n(14),o.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return h});var r,o,i=n(3),s=n(4),a=n(0),u=n(1),c=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};if("undefined"==typeof XMLHttpRequest){var f=require;o=f("request")}var h=function(t){function n(e){var n=t.call(this)||this;if(void 0===o)throw new Error("The 'request' module could not be loaded.");return n.logger=e,n.cookieJar=o.jar(),n.request=o.defaults({jar:n.cookieJar}),n}return c(n,t),n.prototype.send=function(t){var n=this;return new Promise(function(r,o){var c;c=Object(u.g)(t.content)?e.from(t.content):t.content||"";var f=n.request(t.url,{body:c,encoding:"arraybuffer"===t.responseType?null:"utf8",headers:l({"X-Requested-With":"XMLHttpRequest"},t.headers),method:t.method,timeout:t.timeout},function(e,u,c){if(t.abortSignal&&(t.abortSignal.onabort=null),e)return"ETIMEDOUT"===e.code&&(n.logger.log(a.a.Warning,"Timeout from HTTP request."),o(new i.c)),n.logger.log(a.a.Warning,"Error from HTTP request. "+e),void o(e);u.statusCode>=200&&u.statusCode<300?r(new s.b(u.statusCode,u.statusMessage||"",c)):o(new i.b(u.statusMessage||"",u.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(s.a)}).call(this,n(35).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(7),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var s=new Uint8Array(t);if(-1===(u=s.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var a=u+1;n=String.fromCharCode.apply(null,s.slice(0,a)),i=s.byteLength>a?s.slice(a).buffer:null}else{var u,c=t;if(-1===(u=c.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");a=u+1;n=c.substring(0,a),i=c.length>a?c.substring(a):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(35).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),n(16),n(24);var a=n(2),u=n(85),c=n(33),l=n(34),f=n(76),h=n(79),p=n(15),d=n(80),g=n(18),y=n(81),v=n(82),b=n(5),m=!1,w=!1;function E(e){return r(this,void 0,void 0,function(){var t,n,i,s,a,u,c=this;return o(this,function(l){switch(l.label){case 0:if(w)throw new Error("Blazor has already started.");return w=!0,t=y.resolveOptions(e),n=new h.ConsoleLogger(t.logLevel),window.Blazor.defaultReconnectionHandler=new v.DefaultReconnectionHandler(n),t.reconnectionHandler=t.reconnectionHandler||window.Blazor.defaultReconnectionHandler,n.log(p.LogLevel.Information,"Starting up blazor server-side application."),i=d.discoverComponents(document),s=new d.CircuitDescriptor(i),[4,S(t,n,s)];case 1:return a=l.sent(),[4,s.startCircuit(a)];case 2:return l.sent()?(u=function(e){return r(c,void 0,void 0,function(){var r,i;return o(this,function(o){switch(o.label){case 0:return m?[2,!1]:(i=e)?[3,2]:[4,S(t,n,s)];case 1:i=o.sent(),o.label=2;case 2:return r=i,[4,s.reconnect(r)];case 3:return o.sent()?(t.reconnectionHandler.onConnectionUp(),[2,!0]):(n.log(p.LogLevel.Information,"Reconnection attempt to the circuit was rejected by the server. This may indicate that the associated state is no longer available on the server."),[2,!1])}})})},window.addEventListener("unload",function(){var e=new FormData,t=s.circuitId;e.append("circuitId",t),navigator.sendBeacon("_blazor/disconnect",e)},!1),window.Blazor.reconnect=u,n.log(p.LogLevel.Information,"Blazor server-side application started."),[2]):(n.log(p.LogLevel.Error,"Failed to start the circuit."),[2])}})})}function S(e,t,n){return r(this,void 0,void 0,function(){var r,i,l,h,d;return o(this,function(o){switch(o.label){case 0:(r=new u.MessagePackHubProtocol).name="blazorpack",i=(new a.HubConnectionBuilder).withUrl("_blazor").withHubProtocol(r),e.configureSignalR(i),l=i.build(),g.setEventDispatcher(function(e,t){return l.send("DispatchBrowserEvent",JSON.stringify(e),JSON.stringify(t))}),window.Blazor._internal.navigationManager.listenForNavigationEvents(function(e,t){return l.send("OnLocationChanged",e,t)}),l.on("JS.AttachComponent",function(e,t){return b.attachRootComponentToLogicalElement(0,n.resolveElement(t),e)}),l.on("JS.BeginInvokeJS",DotNet.jsCallDispatcher.beginInvokeJSFromDotNet),l.on("JS.EndInvokeDotNet",function(e){var t;return(t=DotNet.jsCallDispatcher).endInvokeDotNetFromJS.apply(t,s(JSON.parse(e)))}),h=f.RenderQueue.getOrCreate(t),l.on("JS.RenderBatch",function(e,n){t.log(p.LogLevel.Debug,"Received render batch with id "+e+" and "+n.byteLength+" bytes."),h.processBatch(e,n,l)}),l.onclose(function(t){return!m&&e.reconnectionHandler.onConnectionDown(e.reconnectionOptions,t)}),l.on("JS.Error",function(e){m=!0,_(l,e,t),c.showErrorNotification()}),window.Blazor._internal.forceCloseConnection=function(){return l.stop()},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,l.start()];case 2:return o.sent(),[3,4];case 3:return d=o.sent(),_(l,d,t),[3,4];case 4:return DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(e,t,n,r,o){l.send("BeginInvokeDotNetFromJS",e?e.toString():null,t,n,r||0,o)},endInvokeJSFromDotNet:function(e,t,n){l.send("EndInvokeJSFromDotNet",e,t,n)}}),[2,l]}})})}function _(e,t,n){n.log(p.LogLevel.Error,t),e&&e.stop()}window.Blazor.start=E,l.shouldAutoStart()&&E()},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],s=n[1],a=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,s)),u=0,l=s>0?r-4:r,f=0;f<l;f+=4)t=o[e.charCodeAt(f)]<<18|o[e.charCodeAt(f+1)]<<12|o[e.charCodeAt(f+2)]<<6|o[e.charCodeAt(f+3)],a[u++]=t>>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===s&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,a[u++]=255&t);1===s&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(l(e,s,s+16383>a?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=c}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],s=n[1],a=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,s)),u=0,l=s>0?r-4:r,f=0;f<l;f+=4)t=o[e.charCodeAt(f)]<<18|o[e.charCodeAt(f+1)]<<12|o[e.charCodeAt(f+2)]<<6|o[e.charCodeAt(f+3)],a[u++]=t>>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===s&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,a[u++]=255&t);1===s&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(l(e,s,s+16383>a?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],o[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a<n;a+=3)o=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=c}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> + * @license MIT + */ +function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var i=n(36),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=v,h=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(i.isFunction(e)){if(u)return e.name;var t=e.toString().match(h);return t&&t[1]}}function d(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(u||!i.isFunction(e))return i.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,n,r,o){throw new f.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function v(e,t){e||y(e,!0,t,"==",f.ok)}function b(e,t,n,s){if(e===t)return!0;if(o(e)&&o(t))return 0===r(e,t);if(i.isDate(e)&&i.isDate(t))return e.getTime()===t.getTime();if(i.isRegExp(e)&&i.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===r(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(e);return-1!==u&&u===s.expected.indexOf(t)||(s.actual.push(e),s.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(i.isPrimitive(e)||i.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=m(e),s=m(t);if(o&&!s||!o&&s)return!1;if(o)return e=a.call(e),t=a.call(t),b(e,t,n);var u,c,l=S(e),f=S(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),c=l.length-1;c>=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(u=l[c],!b(e[u],t[u],n,r))return!1;return!0}(e,t,n,s))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var s="string"==typeof r,a=!e&&o&&!n;if((!e&&i.isError(o)&&s&&w(o,n)||a)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),s=o.indexOf("\n"+i);if(s>=0){var a=o.indexOf("\n",s+1);o=o.substring(a+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(8)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(13).Buffer,o=n(66);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,o=a,t.copy(n,o),a+=s.data.length,s=s.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(20),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),i(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(69),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,s,a,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var o={callback:e,args:t};return c[u]=o,r(u),u++},h.clearImmediate=p}function p(e){delete c[e]}function d(e){if(l)setTimeout(d,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{p(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(12),n(23))},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(12))},function(e,t,n){"use strict";var r=n(72).Transform,o=n(14),i=n(21);function s(e){(e=e||{}).objectMode=!0,e.highWaterMark=16,r.call(this,e),this._msgpack=e.msgpack}function a(e){if(!(this instanceof a))return(e=e||{}).msgpack=this,new a(e);s.call(this,e)}function u(e){if(!(this instanceof u))return(e=e||{}).msgpack=this,new u(e);s.call(this,e),this._chunks=i()}o(s,r),o(a,s),a.prototype._transform=function(e,t,n){var r=null;try{r=this._msgpack.encode(e).slice(0)}catch(e){return this.emit("error",e),n()}this.push(r),n()},o(u,s),u.prototype._transform=function(e,t,n){e&&this._chunks.append(e);try{var r=this._msgpack.decode(this._chunks);this.push(r)}catch(e){return void(e instanceof this._msgpack.IncompleteBufferError?n():this.emit("error",e))}this._chunks.length>0?this._transform(null,t,n):n()},e.exports.decoder=u,e.exports.encoder=a},function(e,t,n){(t=e.exports=n(38)).Stream=t,t.Readable=t,t.Writable=n(43),t.Duplex=n(8),t.Transform=n(44),t.PassThrough=n(73)},function(e,t,n){"use strict";e.exports=i;var r=n(44),o=n(19);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(14),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(21);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(36).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t<n)}(h,o))return null;switch(h){case 192:return n(null,1);case 194:return n(!1,1);case 195:return n(!0,1);case 204:return n(p=e.readUInt8(r+1),2);case 205:return n(p=e.readUInt16BE(r+1),3);case 206:return n(p=e.readUInt32BE(r+1),5);case 207:for(f=7;f>=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var s=e.readUInt32BE(t+0),a=e.readUInt32BE(t+4);return(4294967296*s+a)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),s(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),s(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),a(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return u(e,r,1);case 213:return u(e,r,2);case 214:return u(e,r,4);case 215:return u(e,r,8);case 216:return u(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?c(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?c(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?c(e,r,l,i,6):null}if(144==(240&h))return s(e,r,i=15&h,1);if(128==(240&h))return a(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function s(e,t,r,o){var s,a=[],u=0;for(t+=o,s=0;s<r;s++){var c=i(e,t);if(!c)return null;a.push(c.value),t+=c.bytesConsumed,u+=c.bytesConsumed}return n(a,o+u)}function a(e,t,r,o){var s,a={},u=0;for(t+=o,s=0;s<r;s++){var c=i(e,t);if(!c)return null;var l=i(e,t+=c.bytesConsumed);if(!l)return null;a[c.value]=l.value,t+=l.bytesConsumed,u+=c.bytesConsumed+l.bytesConsumed}return n(a,o+u)}function u(e,t,n){var r=e.readInt8(t+1);return c(e,t,r,n,2)}function c(t,r,o,i,s){var a,u;if(r+=s,o<0)switch(o){case-1:return function(e,t,r){var o,i;switch(i=0,t){case 4:o=e.readUInt32BE(0);break;case 8:var s=e.readUInt32BE(0),a=e.readUInt32BE(4);i=s/4,o=(3&s)*Math.pow(2,32)+a;break;case 12:throw new Error("timestamp 96 is not yet implemented")}var u=1e3*o+Math.round(i/1e6);return n(new Date(u),t+r)}(u=t.slice(r,r+i),i,s)}for(a=0;a<e.length;a++){if(o===e[a].type)return u=t.slice(r,r+i),n(e[a].decode(u),s+i)}throw new Error("unable to find ext type "+o)}},e.exports.IncompleteBufferError=o},function(e,t,n){"use strict";var r=n(13).Buffer,o=n(21),i=.1;function s(e,t){var n;return(n=r.allocUnsafe(5))[0]=202,n.writeFloatBE(e,1),(t||Math.abs(e-n.readFloatBE(1))>i)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function a(u,c){var l,f,h;if(void 0===u)throw new Error("undefined is not encodable in msgpack!");if(null===u)(l=r.allocUnsafe(1))[0]=192;else if(!0===u)(l=r.allocUnsafe(1))[0]=195;else if(!1===u)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof u)(f=r.byteLength(u))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(u,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(u,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(u,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(u,5));else if(u&&(u.readUInt32LE||u instanceof Uint8Array))u instanceof Uint8Array&&(u=r.from(u)),u.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=u.length):u.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(u.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(u.length,1)),l=o([l,u]);else if(Array.isArray(u))u.length<16?(l=r.allocUnsafe(1))[0]=144|u.length:u.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(u.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(u.length,1)),l=u.reduce(function(e,t){return e.append(a(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof u.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),s=1e6*(n-1e3*i);if(s||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var a=4*s,u=i/Math.pow(2,32),c=a+u&4294967295,l=4294967295&i;t.writeInt32BE(c,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(u);if("object"==typeof u)l=function(t){var n,i,s=-1,a=[];for(n=0;n<e.length;n++)if(e[n].check(t)){i=e[n].encode(t);break}if(!i)return null;1==(s=i.length-1)?a.push(212):2===s?a.push(213):4===s?a.push(214):8===s?a.push(215):16===s?a.push(216):s<256?(a.push(199),a.push(s)):s<65536?(a.push(200),a.push(s>>8),a.push(255&s)):(a.push(201),a.push(s>>24),a.push(s>>16&255),a.push(s>>8&255),a.push(255&s));return o().append(r.from(a)).append(i)}(u)||function(e){var t,n,i=[],s=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++s,i.push(a(t,!0)),i.push(a(e[t],!0)));s<16?(n=r.allocUnsafe(1))[0]=128|s:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(s,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(u);else if("number"==typeof u){if((h=u)!==Math.floor(h))return s(u,t);if(u>=0)if(u<128)(l=r.allocUnsafe(1))[0]=u;else if(u<256)(l=r.allocUnsafe(2))[0]=204,l[1]=u;else if(u<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(u,1);else if(u<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(u,1);else{if(!(u<=9007199254740991))return s(u,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,u)}else if(u>=-32)(l=r.allocUnsafe(1))[0]=256+u;else if(u>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(u,1);else if(u>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(u,1);else if(u>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(u,1);else{if(!(u>=-9007199254740991))return s(u,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var s=1,a=t+7;a>=t;a--){var u=(255^e[a])+s;e[a]=255&u,s=u>>8}}(l,1,u)}}}if(!l)throw new Error("not implemented yet");return c?l:l.slice()}return a}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),s=n(77),a=n(15),u=function(){function e(e,t){this.nextBatchId=2,this.browserRendererId=e,this.logger=t}return e.getOrCreate=function(t){return e.instance||(e.instance=new e(0,t)),this.instance},e.prototype.processBatch=function(e,t,n){return r(this,void 0,void 0,function(){var r;return o(this,function(o){switch(o.label){case 0:return e<this.nextBatchId?[4,this.completeBatch(n,e)]:[3,2];case 1:return o.sent(),this.logger.log(a.LogLevel.Debug,"Batch "+e+" already processed. Waiting for batch "+this.nextBatchId+"."),[2];case 2:return e>this.nextBatchId?this.fatalError?(this.logger.log(a.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(a.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(a.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new s.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(a.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(a.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78),o=Math.pow(2,32),i=Math.pow(2,21)-1,s=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new a(e),this.editReader=new u(e,t),this.frameReader=new c(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=s;var a=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<<r,i<128)break;r+=7}return n}(this.batchDataUint8,n),i=n+((t=o)<128?1:t<16384?2:t<2097152?3:4),s=new Uint8Array(this.batchDataUint8.buffer,this.batchDataUint8.byteOffset+i,o);return r.decodeUtf8(s)},e}(),f=function(){function e(e){this.batchDataUint8=e}return e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}(),h=function(){function e(e){this.batchDataUint8=e}return e.prototype.offset=function(e){return 0},e.prototype.count=function(e){return p(this.batchDataUint8,e)},e.prototype.values=function(e){return e+4},e}();function p(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24}function d(e,t){return e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24>>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t<n;){var i=e[t++];if(0===i)break;if(0==(128&i))r.push(i);else if(192==(224&i)){var s=63&e[t++];r.push((31&i)<<6|s)}else if(224==(240&i)){var s=63&e[t++],a=63&e[t++];r.push((31&i)<<12|s<<6|a)}else if(240==(248&i)){var s=63&e[t++],a=63&e[t++],u=63&e[t++],c=(7&i)<<18|s<<12|a<<6|u;c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(10),s=n(11),a=function(){function e(e){this.circuitId=void 0,this.components=e}return e.prototype.reconnect=function(e){if(!this.circuitId)throw new Error("Circuit host not initialized.");return e.invoke("ConnectCircuit",this.circuitId)},e.prototype.initialize=function(e){if(this.circuitId)throw new Error("Circuit host '"+this.circuitId+"' already initialized.");this.circuitId=e},e.prototype.startCircuit=function(e){return r(this,void 0,void 0,function(){var t;return o(this,function(n){switch(n.label){case 0:return[4,e.invoke("StartCircuit",i.internalFunctions.getBaseURI(),i.internalFunctions.getLocationHref(),JSON.stringify(this.components.map(function(e){return e.toRecord()})))];case 1:return(t=n.sent())?(this.initialize(t),[2,!0]):[2,!1]}})})},e.prototype.resolveElement=function(e){var t=Number.parseInt(e);if(Number.isNaN(t))throw new Error("Invalid sequence number '"+e+"'.");return s.toLogicalRootCommentElement(this.components[t].start,this.components[t].end)},e}();t.CircuitDescriptor=a;var u=function(){function e(e,t,n,r,o){this.type=e,this.start=t,this.end=n,this.sequence=r,this.descriptor=o}return e.prototype.toRecord=function(){return{type:this.type,sequence:this.sequence,descriptor:this.descriptor}},e}();t.ComponentDescriptor=u,t.discoverComponents=function(e){for(var t=function e(t){if(!t.hasChildNodes())return[];for(var n=[],r=new h(t.childNodes);r.next()&&r.currentElement;){var o=l(r);if(o)n.push(o);else for(var i=e(r.currentElement),s=0;s<i.length;s++){var a=i[s];n.push(a)}}return n}(e),n=[],r=0;r<t.length;r++){var o=t[r],i=new u(o.type,o.start,o.end,o.sequence,o.descriptor);n.push(i)}return n.sort(function(e,t){return e.sequence-t.sequence})};var c=/\W*Blazor:[^{]*(.*)$/;function l(e){var t=e.currentElement;if(t&&t.nodeType===Node.COMMENT_NODE&&t.textContent){var n=new RegExp(c).exec(t.textContent),r=n&&n[1];if(!r)return;try{return function(e,t,n){var r=JSON.parse(e),o=r.type,i=r.sequence,s=r.descriptor,a=r.prerenderId;if("server"!==o)throw new Error("Invalid component type '"+o+"'.");if(!s)throw new Error("descriptor must be defined when using a descriptor.");if(void 0===i)throw new Error("sequence must be defined when using a descriptor.");if(!Number.isInteger(i))throw new Error("Error parsing the sequence '"+i+"' for component '"+e+"'");if(a){var u=function(e,t){for(;t.next()&&t.currentElement;){var n=t.currentElement;if(n.nodeType===Node.COMMENT_NODE&&n.textContent){var r=new RegExp(c).exec(n.textContent),o=r&&r[1];if(o)return f(o,e),n}}return}(a,n);if(!u)throw new Error("Could not find an end component comment for '"+t+"'");return{type:o,sequence:i,descriptor:s,start:t,prerenderId:a,end:u}}return{type:o,sequence:i,descriptor:s,start:t}}(r,t,e)}catch(e){throw new Error("Found malformed component comment at "+t.textContent)}}}function f(e,t){var n=JSON.parse(e);if(1!==Object.keys(n).length)throw new Error("Invalid end of component comment: '"+e+"'");var r=n.prerenderId;if(!r)throw new Error("End of component comment must have a value for the prerendered property: '"+e+"'");if(r!==t)throw new Error("End of component comment prerendered property must match the start comment prerender id: '"+t+"', '"+r+"'")}var h=function(){function e(e){this.childNodes=e,this.currentIndex=-1,this.length=e.length}return e.prototype.next=function(){return this.currentIndex++,this.currentIndex<this.length?(this.currentElement=this.childNodes[this.currentIndex],!0):(this.currentElement=void 0,!1)},e}()},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(15);t.resolveOptions=function(e){var t=r({},i,e);return e&&e.reconnectionOptions&&(t.reconnectionOptions=r({},i.reconnectionOptions,e.reconnectionOptions)),t};var i={configureSignalR:function(e){},logLevel:o.LogLevel.Warning,reconnectionOptions:{maxRetries:5,retryIntervalMilliseconds:3e3,dialogId:"components-reconnect-modal"}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(83),s=n(84),a=n(15),u=function(){function e(e,t,n){this._currentReconnectionProcess=null,this._logger=e,this._reconnectionDisplay=t,this._reconnectCallback=n||function(){return window.Blazor.reconnect()}}return e.prototype.onConnectionDown=function(e,t){if(!this._reconnectionDisplay){var n=document.getElementById(e.dialogId);this._reconnectionDisplay=n?new s.UserSpecifiedDisplay(n):new i.DefaultReconnectDisplay(e.dialogId,document,this._logger)}this._currentReconnectionProcess||(this._currentReconnectionProcess=new c(e,this._logger,this._reconnectCallback,this._reconnectionDisplay))},e.prototype.onConnectionUp=function(){this._currentReconnectionProcess&&(this._currentReconnectionProcess.dispose(),this._currentReconnectionProcess=null)},e}();t.DefaultReconnectionHandler=u;var c=function(){function e(e,t,n,r){this.logger=t,this.reconnectCallback=n,this.isDisposed=!1,this.reconnectDisplay=r,this.reconnectDisplay.show(),this.attemptPeriodicReconnection(e)}return e.prototype.dispose=function(){this.isDisposed=!0,this.reconnectDisplay.hide()},e.prototype.attemptPeriodicReconnection=function(e){return r(this,void 0,void 0,function(){var t,n;return o(this,function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.maxRetries?[4,this.delay(e.retryIntervalMilliseconds)]:[3,7];case 2:if(r.sent(),this.isDisposed)return[3,7];r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.reconnectCallback()];case 4:return r.sent()?[2]:(this.reconnectDisplay.rejected(),[2]);case 5:return n=r.sent(),this.logger.log(a.LogLevel.Error,n),[3,6];case 6:return t++,[3,1];case 7:return this.reconnectDisplay.failed(),[2]}})})},e.prototype.delay=function(e){return new Promise(function(t){return setTimeout(t,e)})},e}()},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(15),s=function(){function e(e,t,n){var s=this;this.document=t,this.logger=n,this.addedToDom=!1,this.modal=this.document.createElement("div"),this.modal.id=e;this.modal.style.cssText=["position: fixed","top: 0","right: 0","bottom: 0","left: 0","z-index: 1000","display: none","overflow: hidden","background-color: #fff","opacity: 0.8","text-align: center","font-weight: bold"].join(";"),this.modal.innerHTML='<h5 style="margin-top: 20px"></h5><button style="margin:5px auto 5px">Retry</button><p>Alternatively, <a href>reload</a></p>',this.message=this.modal.querySelector("h5"),this.button=this.modal.querySelector("button"),this.reloadParagraph=this.modal.querySelector("p"),this.button.addEventListener("click",function(){return r(s,void 0,void 0,function(){var e;return o(this,function(t){switch(t.label){case 0:this.show(),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.Blazor.reconnect()];case 2:return t.sent()||this.rejected(),[3,4];case 3:return e=t.sent(),this.logger.log(i.LogLevel.Error,e),this.failed(),[3,4];case 4:return[2]}})})}),this.reloadParagraph.querySelector("a").addEventListener("click",function(){return location.reload()})}return e.prototype.show=function(){this.addedToDom||(this.addedToDom=!0,this.document.body.appendChild(this.modal)),this.modal.style.display="block",this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.textContent="Attempting to reconnect to the server..."},e.prototype.hide=function(){this.modal.style.display="none"},e.prototype.failed=function(){this.button.style.display="block",this.reloadParagraph.style.display="none",this.message.innerHTML="Reconnection failed. Try <a href>reloading</a> the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. <a href>Reload</a> the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(20),o=n(9),i=n(2),s=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o<e.byteLength;){var i=0,s=0,a=void 0;do{s|=(127&(a=n[o+i]))<<r[i],i++}while(i<Math.min(5,e.byteLength-o)&&0!=(128&a));if(0!=(128&a)&&i<5)throw new Error("Cannot read message size.");if(5===i&&a>7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+s))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+s):n.subarray(o+i,o+i+s)),o=o+i+s}return t},e}();var a=new Uint8Array([145,i.MessageType.Ping]),u=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],a=0,u=s.parse(e);a<u.length;a++){var c=u[a],l=this.parseMessage(c,t);l&&o.push(l)}return o},e.prototype.writeMessage=function(e){switch(e.type){case i.MessageType.Invocation:return this.writeInvocation(e);case i.MessageType.StreamInvocation:return this.writeStreamInvocation(e);case i.MessageType.StreamItem:return this.writeStreamItem(e);case i.MessageType.Completion:return this.writeCompletion(e);case i.MessageType.Ping:return s.write(a);case i.MessageType.CancelInvocation:return this.writeCancelInvocation(e);default:throw new Error("Invalid message type.")}},e.prototype.parseMessage=function(e,t){if(0===e.length)throw new Error("Invalid payload.");var n=o().decode(r.Buffer.from(e));if(0===n.length||!(n instanceof Array))throw new Error("Invalid payload.");var s=n[0];switch(s){case i.MessageType.Invocation:return this.createInvocationMessage(this.readHeaders(n),n);case i.MessageType.StreamItem:return this.createStreamItemMessage(this.readHeaders(n),n);case i.MessageType.Completion:return this.createCompletionMessage(this.readHeaders(n),n);case i.MessageType.Ping:return this.createPingMessage(n);case i.MessageType.Close:return this.createCloseMessage(n);default:return t.log(i.LogLevel.Information,"Unknown message type '"+s+"' ignored."),null}},e.prototype.createCloseMessage=function(e){if(e.length<2)throw new Error("Invalid payload for Close message.");return{allowReconnect:e.length>=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return s.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return s.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return s.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return s.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return s.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return c}),n.d(t,"MessagePackHubProtocol",function(){return u});var c="3.1.1-dev"}]); \ No newline at end of file diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js index 9f9d6b369d..88dbb56b2f 100644 --- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js +++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),l=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f<l;f++){var p=t.updatedComponentsEntry(u,f),m=d.componentId(p),h=d.edits(p);n.updateComponent(t,m,h,c)}var v=t.disposedComponentIds(),y=r.values(v),g=r.count(v);for(f=0;f<g;f++)m=t.disposedComponentIdsEntry(y,f),n.disposeComponent(m);var b=t.disposedEventHandlerIds(),w=r.values(b),E=r.count(b);for(f=0;f<E;f++){var _=t.disposedEventHandlerIdsEntry(w,f);n.disposeEventHandler(_)}i&&(i=!1,window.scrollTo&&window.scrollTo(0,0))},t.resetScrollAfterNextBatch=function(){i=!0}},,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function u(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17);var a,i=n(5),u=!1,l=!1,s=null;function c(e,t){var n=p(e);if(!t&&m(n))d(n,!1);else if(t&&location.href===e){var r=e+"?";history.replaceState(null,"",r),location.replace(e)}else location.href=e}function d(e,t){i.resetScrollAfterNextBatch(),history.pushState(null,"",e),f(t)}function f(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return s?[4,s(location.href,e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function p(e){return(a=a||document.createElement("a")).href=e,a.href}function m(e){var t,n=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1);return e.startsWith(n)}t.internalFunctions={listenForNavigationEvents:function(e){if(s=e,l)return;l=!0,window.addEventListener("popstate",function(){return f(!1)})},enableNavigationInterception:function(){u=!0},navigateTo:c,getBaseURI:function(){return document.baseURI},getLocationHref:function(){return location.href}},t.attachToEventDelegator=function(e){e.notifyAfterClick(function(e){if(u&&0===e.button&&!function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&!e.defaultPrevented){var t=function e(t,n){return t?t.tagName===n?t:e(t.parentElement,n):null}(e.target,"A");if(t&&t.hasAttribute("href")){var n=t.getAttribute("target");if(n&&"_self"!==n)return;var r=p(t.getAttribute("href"));m(r)&&(e.preventDefault(),d(r,!0))}}})},t.navigateTo=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),a=p("_blazorLogicalEnd");function i(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function u(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(l(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n<i.length){var u=i[n];u.parentNode.insertBefore(e,u),i.splice(n,0,a)}else f(e,t),i.push(a);a[o]=t,r in a||(a[r]=[])}function l(e){return e[o]||null}function s(e){return e[r]}function c(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function d(e){var t=s(l(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function f(e,t){if(t instanceof Element)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: "+t);var n=d(t);n?n.parentNode.insertBefore(e,n):f(e,l(t))}}function p(e){return"function"==typeof Symbol?Symbol():e}t.toLogicalRootCommentElement=function(e,t){if(!e.parentNode)throw new Error("Comment not connected to the DOM "+e.textContent);var n=e.parentNode,r=i(n,!0),u=s(r);return Array.from(n.childNodes).forEach(function(e){return u.push(e)}),e[o]=r,t&&(e[a]=t,i(t,!0)),i(e,!0)},t.toLogicalElement=i,t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return u(n,e,t),n},t.insertLogicalChild=u,t.removeLogicalChild=function e(t,n){var r=s(t).splice(n,1)[0];if(r instanceof Comment)for(var o=s(r);o.length>0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=l,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=l(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function l(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var l=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,l)}catch(e){c(i,!1,e)}return u}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return u(e,t,null,n)},e.invokeMethodAsync=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return l(e,t,null,n)},e.jsCallDispatcher={findJSFunction:p,invokeJSFromDotNet:function(e,t){var n=p(e).apply(null,d(t));return null==n?null:JSON.stringify(n,h)},beginInvokeJSFromDotNet:function(e,t,n){var r=new Promise(function(e){e(p(t).apply(null,d(n)))});e&&r.then(function(t){return s().endInvokeJSFromDotNet(e,!0,JSON.stringify([e,!0,t],h))},function(t){return s().endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,f(t)]))})},endInvokeDotNetFromJS:function(e,t,n){var r=t?n:new Error(n);c(parseInt(e),t,r)}};var m=function(){function e(e){this._id=e}return e.prototype.invokeMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u(null,e,this._id,t)},e.prototype.invokeMethodAsync=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return l(null,e,this._id,t)},e.prototype.dispose=function(){l(null,"__Dispose",this._id,null).catch(function(e){return console.error(e)})},e.prototype.serializeAsArg=function(){return{__dotNetObject:this._id}},e}();function h(e,t){return t instanceof m?t.serializeAsArg():t}i(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__dotNetObject")?new m(t.__dotNetObject):t})}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPlatform=function(e){return t.platform=e,t.platform}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=function(e,t){if(!r)throw new Error("eventDispatcher not initialized. Call 'setEventDispatcher' to configure it.");return r(e,t)},t.setEventDispatcher=function(e){r=e}},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(5);window.Blazor={navigateTo:r.navigateTo,_internal:{attachRootComponentToElement:o.attachRootComponentToElement,navigationManager:r.internalFunctions}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),o=n(28),a=n(13),i=n(31),u=n(19),l=n(12),s=document.createElement("template"),c=document.createElementNS("http://www.w3.org/2000/svg","g"),d={submit:!0},f={},p=function(){function e(e){var t=this;this.childComponentLocations={},this.browserRendererId=e,this.eventDelegator=new o.EventDelegator(function(e,n,r,o){!function(e,t,n,r,o){d[e.type]&&e.preventDefault();var a={browserRendererId:t,eventHandlerId:n,eventArgsType:r.type,eventFieldInfo:o};u.dispatchEvent(a,r.data)}(e,t.browserRendererId,n,r,o)}),l.attachToEventDelegator(this.eventDelegator)}return e.prototype.attachRootComponentToLogicalElement=function(e,t){this.attachComponentToElement(e,t),f[e]=t},e.prototype.updateComponent=function(e,t,n,r){var o=this.childComponentLocations[t];if(!o)throw new Error("No element is currently associated with component "+t);var i=f[t];if(i){var u=a.getLogicalSiblingEnd(i);delete f[t],u?function(e,t){var n=a.getLogicalParent(e);if(!n)throw new Error("Can't clear between nodes. The start node does not have a logical parent.");for(var r=a.getLogicalChildrenArray(n),o=r.indexOf(e)+1,i=r.indexOf(t),u=o;u<=i;u++)a.removeLogicalChild(n,o);e.textContent="!"}(i,u):function(e){var t;for(;t=e.firstChild;)e.removeChild(t)}(i)}var l=a.getClosestDomElement(o).ownerDocument,s=l&&l.activeElement;this.applyEdits(e,t,o,0,n,r),s instanceof HTMLElement&&l&&l.activeElement!==s&&s.focus()},e.prototype.disposeComponent=function(e){delete this.childComponentLocations[e]},e.prototype.disposeEventHandler=function(e){this.eventDelegator.removeListener(e)},e.prototype.attachComponentToElement=function(e,t){this.childComponentLocations[e]=t},e.prototype.applyEdits=function(e,t,n,o,i,u){for(var l,s=0,c=o,d=e.arrayBuilderSegmentReader,f=e.editReader,p=e.frameReader,m=d.values(i),h=d.offset(i),v=h+d.count(i),y=h;y<v;y++){var g=e.diffReader.editsEntry(m,y),b=f.editType(g);switch(b){case r.EditType.prependFrame:var w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);this.insertFrame(e,t,n,c+_,u,E,w);break;case r.EditType.removeFrame:_=f.siblingIndex(g);a.removeLogicalChild(n,c+_);break;case r.EditType.setAttribute:w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof Element))throw new Error("Cannot set attribute on non-element child");this.applyAttribute(e,t,I,E);break;case r.EditType.removeAttribute:var I;_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof HTMLElement))throw new Error("Cannot remove attribute from non-element child");var C=f.removedAttributeName(g);this.tryApplySpecialProperty(e,I,C,null)||I.removeAttribute(C);break;case r.EditType.updateText:w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);var S=a.getLogicalChild(n,c+_);if(!(S instanceof Text))throw new Error("Cannot set text content on non-text child");S.textContent=p.textContent(E);break;case r.EditType.updateMarkup:w=f.newTreeIndex(g),E=e.referenceFramesEntry(u,w),_=f.siblingIndex(g);a.removeLogicalChild(n,c+_),this.insertMarkup(e,n,c+_,E);break;case r.EditType.stepIn:_=f.siblingIndex(g);n=a.getLogicalChild(n,c+_),s++,c=0;break;case r.EditType.stepOut:n=a.getLogicalParent(n),c=0===--s?o:0;break;case r.EditType.permutationListEntry:(l=l||[]).push({fromSiblingIndex:c+f.siblingIndex(g),toSiblingIndex:c+f.moveToSiblingIndex(g)});break;case r.EditType.permutationListEnd:a.permuteLogicalChildren(n,l),l=void 0;break;default:throw new Error("Unknown edit type: "+b)}}},e.prototype.insertFrame=function(e,t,n,o,a,u,l){var s=e.frameReader,c=s.frameType(u);switch(c){case r.FrameType.element:return this.insertElement(e,t,n,o,a,u,l),1;case r.FrameType.text:return this.insertText(e,n,o,u),1;case r.FrameType.attribute:throw new Error("Attribute frames should only be present as leading children of element frames.");case r.FrameType.component:return this.insertComponent(e,n,o,u),1;case r.FrameType.region:return this.insertFrameRange(e,t,n,o,a,l+1,l+s.subtreeLength(u));case r.FrameType.elementReferenceCapture:if(n instanceof Element)return i.applyCaptureIdToElement(n,s.elementReferenceCaptureId(u)),0;throw new Error("Reference capture frames can only be children of element frames.");case r.FrameType.markup:return this.insertMarkup(e,n,o,u),1;default:throw new Error("Unknown frame type: "+c)}},e.prototype.insertElement=function(e,t,n,o,i,u,l){var s=e.frameReader,c=s.elementName(u),d="svg"===c||a.isSvgElement(n)?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c),f=a.toLogicalElement(d);a.insertLogicalChild(d,n,o);for(var p=l+s.subtreeLength(u),m=l+1;m<p;m++){var h=e.referenceFramesEntry(i,m);if(s.frameType(h)!==r.FrameType.attribute){this.insertFrameRange(e,t,f,0,i,m,p);break}this.applyAttribute(e,t,d,h)}if(d instanceof HTMLSelectElement&&"_blazorSelectValue"in d){var v=d._blazorSelectValue;d.value=v,delete d._blazorSelectValue}},e.prototype.insertComponent=function(e,t,n,r){var o=a.createAndInsertLogicalContainer(t,n),i=e.frameReader.componentId(r);this.attachComponentToElement(i,o)},e.prototype.insertText=function(e,t,n,r){var o=e.frameReader.textContent(r),i=document.createTextNode(o);a.insertLogicalChild(i,t,n)},e.prototype.insertMarkup=function(e,t,n,r){for(var o,i=a.createAndInsertLogicalContainer(t,n),u=e.frameReader.markupContent(r),l=(o=u,a.isSvgElement(t)?(c.innerHTML=o||" ",c):(s.innerHTML=o||" ",s.content)),d=0;l.firstChild;)a.insertLogicalChild(l.firstChild,i,d++)},e.prototype.applyAttribute=function(e,t,n,r){var o=e.frameReader,a=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){var u=h(a);this.eventDelegator.setListener(n,u,i,t)}else this.tryApplySpecialProperty(e,n,a,r)||n.setAttribute(a,o.attributeValue(r))},e.prototype.tryApplySpecialProperty=function(e,t,n,r){switch(n){case"value":return this.tryApplyValueProperty(e,t,r);case"checked":return this.tryApplyCheckedProperty(e,t,r);default:return!!n.startsWith("__internal_")&&(this.applyInternalAttribute(e,t,n.substring("__internal_".length),r),!0)}},e.prototype.applyInternalAttribute=function(e,t,n,r){var o=r?e.frameReader.attributeValue(r):null;if(n.startsWith("stopPropagation_")){var a=h(n.substring("stopPropagation_".length));this.eventDelegator.setStopPropagation(t,a,null!==o)}else{if(!n.startsWith("preventDefault_"))throw new Error("Unsupported internal attribute '"+n+"'");a=h(n.substring("preventDefault_".length));this.eventDelegator.setPreventDefault(t,a,null!==o)}},e.prototype.tryApplyValueProperty=function(e,t,n){var r=e.frameReader;if("INPUT"===t.tagName&&"time"===t.getAttribute("type")&&!t.getAttribute("step")){var o=n?r.attributeValue(n):null;if(o)return t.value=o.substring(0,5),!0}switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":var a=n?r.attributeValue(n):null;return t.value=a,"SELECT"===t.tagName&&(t._blazorSelectValue=a),!0;case"OPTION":(a=n?r.attributeValue(n):null)?t.setAttribute("value",a):t.removeAttribute("value");var i=this.findClosestAncestorSelectElement(t);return i&&"_blazorSelectValue"in i&&i._blazorSelectValue===a&&(this.tryApplyValueProperty(e,i,n),delete i._blazorSelectValue),!0;default:return!1}},e.prototype.tryApplyCheckedProperty=function(e,t,n){if("INPUT"===t.tagName){var r=n?e.frameReader.attributeValue(n):null;return t.checked=null!==r,!0}return!1},e.prototype.findClosestAncestorSelectElement=function(e){for(;e;){if(e instanceof HTMLSelectElement)return e;e=e.parentElement}return null},e.prototype.insertFrameRange=function(e,t,n,r,o,a,i){for(var u=r,l=a;l<i;l++){var s=e.referenceFramesEntry(o,l);r+=this.insertFrame(e,t,n,r,o,s,l),l+=m(e,s)}return r-u},e}();function m(e,t){var n=e.frameReader;switch(n.frameType(t)){case r.FrameType.component:case r.FrameType.element:case r.FrameType.region:return n.subtreeLength(t)-1;default:return 0}}function h(e){if(e.startsWith("on"))return e.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '"+e+"'")}t.BrowserRenderer=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t.EditType||(t.EditType={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup"}(t.FrameType||(t.FrameType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(30),a=c(["abort","blur","change","error","focus","load","loadend","loadstart","mouseenter","mouseleave","progress","reset","scroll","submit","unload","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),i=c(["click","dblclick","mousedown","mousemove","mouseup"]),u=function(){function e(t){this.onEvent=t,this.afterClickCallbacks=[];var n=++e.nextEventDelegatorId;this.eventsCollectionKey="_blazorEvents_"+n,this.eventInfoStore=new l(this.onGlobalEvent.bind(this))}return e.prototype.setListener=function(e,t,n,r){var o=this.getEventHandlerInfosForElement(e,!0),a=o.getHandler(t);if(a)this.eventInfoStore.update(a.eventHandlerId,n);else{var i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(i),o.setHandler(t,i)}},e.prototype.removeListener=function(e){var t=this.eventInfoStore.remove(e);if(t){var n=t.element,r=this.getEventHandlerInfosForElement(n,!1);r&&r.removeHandler(t.eventName)}},e.prototype.notifyAfterClick=function(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")},e.prototype.setStopPropagation=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)},e.prototype.setPreventDefault=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)},e.prototype.onGlobalEvent=function(e){if(e.target instanceof Element){for(var t,n,u=e.target,l=null,s=a.hasOwnProperty(e.type),c=!1;u;){var d=this.getEventHandlerInfosForElement(u,!1);if(d){var f=d.getHandler(e.type);if(f&&(t=u,n=e.type,!((t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&i.hasOwnProperty(n)&&t.disabled))){l||(l=r.EventForDotNet.fromDOMEvent(e));var p=o.EventFieldInfo.fromEvent(f.renderingComponentId,e);this.onEvent(e,f.eventHandlerId,l,p)}d.stopPropagation(e.type)&&(c=!0),d.preventDefault(e.type)&&e.preventDefault()}u=s||c?null:u.parentElement}"click"===e.type&&this.afterClickCallbacks.forEach(function(t){return t(e)})}},e.prototype.getEventHandlerInfosForElement=function(e,t){return e.hasOwnProperty(this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new s:null},e.nextEventDelegatorId=0,e}();t.EventDelegator=u;var l=function(){function e(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={}}return e.prototype.add=function(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error("Event "+e.eventHandlerId+" is already tracked");this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)},e.prototype.addGlobalListener=function(e){if(this.countByEventName.hasOwnProperty(e))this.countByEventName[e]++;else{this.countByEventName[e]=1;var t=a.hasOwnProperty(e);document.addEventListener(e,this.globalListener,t)}},e.prototype.update=function(e,t){if(this.infosByEventHandlerId.hasOwnProperty(t))throw new Error("Event "+t+" is already tracked");var n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n},e.prototype.remove=function(e){var t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];var n=t.eventName;0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t},e}(),s=function(){function e(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}return e.prototype.getHandler=function(e){return this.handlers.hasOwnProperty(e)?this.handlers[e]:null},e.prototype.setHandler=function(e,t){this.handlers[e]=t},e.prototype.removeHandler=function(e){delete this.handlers[e]},e.prototype.preventDefault=function(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]},e.prototype.stopPropagation=function(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]},e}();function c(e){var t={};return e.forEach(function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.type=e,this.data=t}return e.fromDOMEvent=function(t){var n=t.target;switch(t.type){case"input":case"change":if(function(e){return-1!==i.indexOf(e.getAttribute("type"))}(n)){var o=function(e){var t=e.value,n=e.type;switch(n){case"date":case"datetime-local":case"month":return t;case"time":return 5===t.length?t+":00":t;case"week":return t}throw new Error("Invalid element type '"+n+"'.")}(n);return new e("change",{type:t.type,value:o})}var u=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(n)?!!n.checked:n.value;return new e("change",{type:t.type,value:u});case"copy":case"cut":case"paste":return new e("clipboard",{type:t.type});case"drag":case"dragend":case"dragenter":case"dragleave":case"dragover":case"dragstart":case"drop":return new e("drag",function(e){return r({},a(e),{dataTransfer:e.dataTransfer})}(t));case"focus":case"blur":case"focusin":case"focusout":return new e("focus",{type:t.type});case"keydown":case"keyup":case"keypress":return new e("keyboard",function(e){return{type:e.type,key:e.key,code:e.code,location:e.location,repeat:e.repeat,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"contextmenu":case"click":case"mouseover":case"mouseout":case"mousemove":case"mousedown":case"mouseup":case"dblclick":return new e("mouse",a(t));case"error":return new e("error",function(e){return{type:e.type,message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno}}(t));case"loadstart":case"timeout":case"abort":case"load":case"loadend":case"progress":return new e("progress",function(e){return{type:e.type,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}}(t));case"touchcancel":case"touchend":case"touchmove":case"touchenter":case"touchleave":case"touchstart":return new e("touch",function(e){function t(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push({identifier:r.identifier,clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY})}return t}return{type:e.type,detail:e.detail,touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointerenter":case"pointerleave":case"pointermove":case"pointerout":case"pointerover":case"pointerup":return new e("pointer",function(e){return r({},a(e),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}(t));case"wheel":case"mousewheel":return new e("wheel",function(e){return r({},a(e),{deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ,deltaMode:e.deltaMode})}(t));default:return new e("unknown",{type:t.type})}},e}();function a(e){return{type:e.type,detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}t.EventForDotNet=o;var i=["date","datetime-local","month","time","week"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.componentId=e,this.fieldValue=t}return e.fromEvent=function(t,n){var r=n.target;if(r instanceof Element){var o=function(e){if(e instanceof HTMLInputElement)return e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value};if(e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return{value:e.value};return null}(r);if(o)return new e(t,o.value)}return null},e}();t.EventFieldInfo=r},function(e,t,n){"use strict";function r(e){return"_bl_"+e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCaptureIdToElement=function(e,t){e.setAttribute(r(t),"")};DotNet.attachReviver(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__internalId")&&"string"==typeof t.__internalId?(n=t.__internalId,o="["+r(n)+"]",document.querySelector(o)):t;var n,o})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function u(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=!1;t.showErrorNotification=function(){return r(this,void 0,void 0,function(){var e;return o(this,function(t){return(e=document.querySelector("#blazor-error-ui"))&&(e.style.display="block"),a||(a=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(e){e.onclick=function(e){location.reload(),e.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(e){e.onclick=function(e){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})),[2]})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},,function(e,t,n){"use strict";function r(e){var t=e.substring(e.lastIndexOf("/")+1),n=t.indexOf("?");return n<0?t:t.substring(0,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getFileNameFromUrl=r,t.getAssemblyNameFromUrl=function(e){return r(e).replace(/\.dll$/,"")}},,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function u(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,u)}l((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(17),n(24);var a=n(18),i=n(46),u=n(5),l=n(48),s=n(33),c=n(19),d=!1;function f(e){return r(this,void 0,void 0,function(){var e,t,n,s,f=this;return o(this,function(m){switch(m.label){case 0:if(d)throw new Error("Blazor has already started.");return d=!0,c.setEventDispatcher(function(e,t){return DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","DispatchEvent",e,JSON.stringify(t))}),e=a.setPlatform(i.monoPlatform),window.Blazor.platform=e,window.Blazor._internal.renderBatch=function(e,t){u.renderBatch(e,new l.SharedMemoryRenderBatch(t))},window.Blazor._internal.navigationManager.listenForNavigationEvents(function(e,t){return r(f,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","NotifyLocationChanged",e,t)];case 1:return n.sent(),[2]}})})}),[4,p()];case 1:(t=m.sent()).linkerEnabled||console.info("Blazor is running in dev mode without IL stripping. To make the bundle size significantly smaller, publish the application or see https://go.microsoft.com/fwlink/?linkid=870414"),n=t.assemblies.map(function(e){return"_framework/_bin/"+e}),m.label=2;case 2:return m.trys.push([2,4,,5]),[4,e.start(n)];case 3:return m.sent(),[3,5];case 4:throw s=m.sent(),new Error("Failed to start platform. Reason: "+s);case 5:return e.callEntryPoint(t.entryAssembly),[2]}})})}function p(){return r(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,fetch("_framework/blazor.boot.json",{method:"Get",credentials:"include"})];case 1:return[2,e.sent().json()]}})})}window.Blazor.start=f,s.shouldAutoStart()&&f().catch(function(e){Module.printErr(e)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(35),a=n(47),i=n(32),u="appBinDir",l=Math.pow(2,32),s=Math.pow(2,21)-1;t.monoPlatform={start:function(e){return new Promise(function(t,n){var l,s;a.attachDebuggerHotkey(e),window.Browser={init:function(){}},l=function(){window.Module=function(e,t,n){var l={},s=["DEBUGGING ENABLED"];return l.print=function(e){return s.indexOf(e)<0&&console.log("WASM: "+e)},l.printErr=function(e){console.error("WASM: "+e),i.showErrorNotification()},l.preRun=[],l.postRun=[],l.preloadPlugins=[],l.locateFile=function(e){switch(e){case"mono.wasm":return"_framework/wasm/mono.wasm";default:return e}},l.preRun.push(function(){var t=Module.cwrap("mono_wasm_add_assembly",null,["string","number","number"]);r=Module.cwrap("mono_wasm_string_get_utf8","number",["number"]),MONO.loaded_files=[],e.forEach(function(e){var r=o.getFileNameFromUrl(e),a="blazor:"+r;addRunDependency(a),function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response){var e=new Uint8Array(r.response);t(e)}else n(r)},r.onerror=n,r.send(void 0)})}(e).then(function(n){var o,i=Module._malloc(n.length);new Uint8Array(Module.HEAPU8.buffer,i,n.length).set(n),t(r,i,n.length),MONO.loaded_files.push((o=e,c.href=o,c.href)),removeRunDependency(a)},function(e){e instanceof XMLHttpRequest&&404===e.status&&r.match(/\.pdb$/)||n(e),removeRunDependency(a)})})}),l.postRun.push(function(){var e,n,r;MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE","true"),Module.cwrap("mono_wasm_load_runtime",null,["string","number"])(u,a.hasDebuggingEnabled()?1:0),MONO.mono_wasm_runtime_is_ready=!0,e=f("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime","InvokeDotNet"),n=f("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime","BeginInvokeDotNet"),r=f("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop.MonoWebAssemblyJSRuntime","EndInvokeJS"),DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(e,t,r,o,a){if(!o&&!t)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");var i=o?o.toString():t;n(e?e.toString():null,i,r,a)},endInvokeJSFromDotNet:function(e,t,n){r(n)},invokeDotNetFromJS:function(t,n,r,o){return e(t||null,n,r?r.toString():null,o)}}),t()}),l}(e,t,n),function(){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");var e=document.createElement("script");e.src="_framework/wasm/mono.js",e.defer=!0,document.body.appendChild(e)}()},s=document.createElement("script"),window.__wasmmodulecallback__=l,s.type="text/javascript",s.text="var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;",document.body.appendChild(s)})},callEntryPoint:function(e){f("Microsoft.AspNetCore.Blazor","Microsoft.AspNetCore.Blazor.Hosting.EntrypointInvoker","InvokeEntrypoint")(e,null)},toJavaScriptString:function(e){var t=r(e),n=Module.UTF8ToString(t);return Module._free(t),n},toUint8Array:function(e){var t=d(e),n=Module.getValue(t,"i32");return new Uint8Array(Module.HEAPU8.buffer,t+4,n)},getArrayLength:function(e){return Module.getValue(d(e),"i32")},getArrayEntryPtr:function(e,t,n){return d(e)+4+t*n},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return Module.getValue(e+(t||0),"i16")},readInt32Field:function(e,t){return Module.getValue(e+(t||0),"i32")},readUint64Field:function(e,t){var n=e+(t||0)>>2,r=Module.HEAPU32[n+1];if(r>s)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*l+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var c=document.createElement("a");function d(e){return e+12}function f(e,t,n){var r="["+e+"] "+t+":"+n;return Module.mono_bind_static_method(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=u,this.editReader=l,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,u.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},u={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,l.structLength)}},l={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=47)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(17);var r=n(26),o=n(11),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f<u;f++){var p=t.updatedComponentsEntry(l,f),m=d.componentId(p),h=d.edits(p);n.updateComponent(t,m,h,c)}var v=t.disposedComponentIds(),y=r.values(v),g=r.count(v);for(f=0;f<g;f++)m=t.disposedComponentIdsEntry(y,f),n.disposeComponent(m);var b=t.disposedEventHandlerIds(),w=r.values(b),E=r.count(b);for(f=0;f<E;f++){var _=t.disposedEventHandlerIdsEntry(w,f);n.disposeEventHandler(_)}i&&(i=!1,window.scrollTo&&window.scrollTo(0,0))},t.resetScrollAfterNextBatch=function(){i=!0}},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(16);var a,i=n(5),l=!1,u=!1,s=null;function c(e,t){var n=p(e);if(!t&&m(n))d(n,!1);else if(t&&location.href===e){var r=e+"?";history.replaceState(null,"",r),location.replace(e)}else location.href=e}function d(e,t){i.resetScrollAfterNextBatch(),history.pushState(null,"",e),f(t)}function f(e){return r(this,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return s?[4,s(location.href,e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function p(e){return(a=a||document.createElement("a")).href=e,a.href}function m(e){var t,n=(t=document.baseURI).substr(0,t.lastIndexOf("/")+1);return e.startsWith(n)}t.internalFunctions={listenForNavigationEvents:function(e){if(s=e,u)return;u=!0,window.addEventListener("popstate",function(){return f(!1)})},enableNavigationInterception:function(){l=!0},navigateTo:c,getBaseURI:function(){return document.baseURI},getLocationHref:function(){return location.href}},t.attachToEventDelegator=function(e){e.notifyAfterClick(function(e){if(l&&0===e.button&&!function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&!e.defaultPrevented){var t=function e(t,n){return t?t.tagName===n?t:e(t.parentElement,n):null}(e.target,"A");if(t&&t.hasAttribute("href")){var n=t.getAttribute("target");if(n&&"_self"!==n)return;var r=p(t.getAttribute("href"));m(r)&&(e.preventDefault(),d(r,!0))}}})},t.navigateTo=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=p("_blazorLogicalChildren"),o=p("_blazorLogicalParent"),a=p("_blazorLogicalEnd");function i(e,t){if(e.childNodes.length>0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n<i.length){var l=i[n];l.parentNode.insertBefore(e,l),i.splice(n,0,a)}else f(e,t),i.push(a);a[o]=t,r in a||(a[r]=[])}function u(e){return e[o]||null}function s(e){return e[r]}function c(e){if(e instanceof Element)return e;if(e instanceof Comment)return e.parentNode;throw new Error("Not a valid logical element")}function d(e){var t=s(u(e));return t[Array.prototype.indexOf.call(t,e)+1]||null}function f(e,t){if(t instanceof Element)t.appendChild(e);else{if(!(t instanceof Comment))throw new Error("Cannot append node because the parent is not a valid logical element. Parent: "+t);var n=d(t);n?n.parentNode.insertBefore(e,n):f(e,u(t))}}function p(e){return"function"==typeof Symbol?Symbol():e}t.toLogicalRootCommentElement=function(e,t){if(!e.parentNode)throw new Error("Comment not connected to the DOM "+e.textContent);var n=e.parentNode,r=i(n,!0),l=s(r);return Array.from(n.childNodes).forEach(function(e){return l.push(e)}),e[o]=r,t&&(e[a]=t,i(t,!0)),i(e,!0)},t.toLogicalElement=i,t.createAndInsertLogicalContainer=function(e,t){var n=document.createComment("!");return l(n,e,t),n},t.insertLogicalChild=l,t.removeLogicalChild=function e(t,n){var r=s(t).splice(n,1)[0];if(r instanceof Comment)for(var o=s(r);o.length>0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return l(e,t,null,n)},e.invokeMethodAsync=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return u(e,t,null,n)},e.jsCallDispatcher={findJSFunction:p,invokeJSFromDotNet:function(e,t){var n=p(e).apply(null,d(t));return null==n?null:JSON.stringify(n,h)},beginInvokeJSFromDotNet:function(e,t,n){var r=new Promise(function(e){e(p(t).apply(null,d(n)))});e&&r.then(function(t){return s().endInvokeJSFromDotNet(e,!0,JSON.stringify([e,!0,t],h))},function(t){return s().endInvokeJSFromDotNet(e,!1,JSON.stringify([e,!1,f(t)]))})},endInvokeDotNetFromJS:function(e,t,n){var r=t?n:new Error(n);c(parseInt(e),t,r)}};var m=function(){function e(e){this._id=e}return e.prototype.invokeMethod=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return l(null,e,this._id,t)},e.prototype.invokeMethodAsync=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u(null,e,this._id,t)},e.prototype.dispose=function(){u(null,"__Dispose",this._id,null).catch(function(e){return console.error(e)})},e.prototype.serializeAsArg=function(){return{__dotNetObject:this._id}},e}();function h(e,t){return t instanceof m?t.serializeAsArg():t}i(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__dotNetObject")?new m(t.__dotNetObject):t})}(r||(r={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPlatform=function(e){return t.platform=e,t.platform}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchEvent=function(e,t){if(!r)throw new Error("eventDispatcher not initialized. Call 'setEventDispatcher' to configure it.");return r(e,t)},t.setEventDispatcher=function(e){r=e}},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),o=n(5);window.Blazor={navigateTo:r.navigateTo,_internal:{attachRootComponentToElement:o.attachRootComponentToElement,navigationManager:r.internalFunctions}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27),o=n(28),a=n(11),i=n(31),l=n(18),u=n(10),s=document.createElement("template"),c=document.createElementNS("http://www.w3.org/2000/svg","g"),d={submit:!0},f={},p=function(){function e(e){var t=this;this.childComponentLocations={},this.browserRendererId=e,this.eventDelegator=new o.EventDelegator(function(e,n,r,o){!function(e,t,n,r,o){d[e.type]&&e.preventDefault();var a={browserRendererId:t,eventHandlerId:n,eventArgsType:r.type,eventFieldInfo:o};l.dispatchEvent(a,r.data)}(e,t.browserRendererId,n,r,o)}),u.attachToEventDelegator(this.eventDelegator)}return e.prototype.attachRootComponentToLogicalElement=function(e,t){this.attachComponentToElement(e,t),f[e]=t},e.prototype.updateComponent=function(e,t,n,r){var o=this.childComponentLocations[t];if(!o)throw new Error("No element is currently associated with component "+t);var i=f[t];if(i){var l=a.getLogicalSiblingEnd(i);delete f[t],l?function(e,t){var n=a.getLogicalParent(e);if(!n)throw new Error("Can't clear between nodes. The start node does not have a logical parent.");for(var r=a.getLogicalChildrenArray(n),o=r.indexOf(e)+1,i=r.indexOf(t),l=o;l<=i;l++)a.removeLogicalChild(n,o);e.textContent="!"}(i,l):function(e){var t;for(;t=e.firstChild;)e.removeChild(t)}(i)}var u=a.getClosestDomElement(o).ownerDocument,s=u&&u.activeElement;this.applyEdits(e,t,o,0,n,r),s instanceof HTMLElement&&u&&u.activeElement!==s&&s.focus()},e.prototype.disposeComponent=function(e){delete this.childComponentLocations[e]},e.prototype.disposeEventHandler=function(e){this.eventDelegator.removeListener(e)},e.prototype.attachComponentToElement=function(e,t){this.childComponentLocations[e]=t},e.prototype.applyEdits=function(e,t,n,o,i,l){for(var u,s=0,c=o,d=e.arrayBuilderSegmentReader,f=e.editReader,p=e.frameReader,m=d.values(i),h=d.offset(i),v=h+d.count(i),y=h;y<v;y++){var g=e.diffReader.editsEntry(m,y),b=f.editType(g);switch(b){case r.EditType.prependFrame:var w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);this.insertFrame(e,t,n,c+_,l,E,w);break;case r.EditType.removeFrame:_=f.siblingIndex(g);a.removeLogicalChild(n,c+_);break;case r.EditType.setAttribute:w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof Element))throw new Error("Cannot set attribute on non-element child");this.applyAttribute(e,t,I,E);break;case r.EditType.removeAttribute:var I;_=f.siblingIndex(g);if(!((I=a.getLogicalChild(n,c+_))instanceof HTMLElement))throw new Error("Cannot remove attribute from non-element child");var S=f.removedAttributeName(g);this.tryApplySpecialProperty(e,I,S,null)||I.removeAttribute(S);break;case r.EditType.updateText:w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);var C=a.getLogicalChild(n,c+_);if(!(C instanceof Text))throw new Error("Cannot set text content on non-text child");C.textContent=p.textContent(E);break;case r.EditType.updateMarkup:w=f.newTreeIndex(g),E=e.referenceFramesEntry(l,w),_=f.siblingIndex(g);a.removeLogicalChild(n,c+_),this.insertMarkup(e,n,c+_,E);break;case r.EditType.stepIn:_=f.siblingIndex(g);n=a.getLogicalChild(n,c+_),s++,c=0;break;case r.EditType.stepOut:n=a.getLogicalParent(n),c=0===--s?o:0;break;case r.EditType.permutationListEntry:(u=u||[]).push({fromSiblingIndex:c+f.siblingIndex(g),toSiblingIndex:c+f.moveToSiblingIndex(g)});break;case r.EditType.permutationListEnd:a.permuteLogicalChildren(n,u),u=void 0;break;default:throw new Error("Unknown edit type: "+b)}}},e.prototype.insertFrame=function(e,t,n,o,a,l,u){var s=e.frameReader,c=s.frameType(l);switch(c){case r.FrameType.element:return this.insertElement(e,t,n,o,a,l,u),1;case r.FrameType.text:return this.insertText(e,n,o,l),1;case r.FrameType.attribute:throw new Error("Attribute frames should only be present as leading children of element frames.");case r.FrameType.component:return this.insertComponent(e,n,o,l),1;case r.FrameType.region:return this.insertFrameRange(e,t,n,o,a,u+1,u+s.subtreeLength(l));case r.FrameType.elementReferenceCapture:if(n instanceof Element)return i.applyCaptureIdToElement(n,s.elementReferenceCaptureId(l)),0;throw new Error("Reference capture frames can only be children of element frames.");case r.FrameType.markup:return this.insertMarkup(e,n,o,l),1;default:throw new Error("Unknown frame type: "+c)}},e.prototype.insertElement=function(e,t,n,o,i,l,u){var s=e.frameReader,c=s.elementName(l),d="svg"===c||a.isSvgElement(n)?document.createElementNS("http://www.w3.org/2000/svg",c):document.createElement(c),f=a.toLogicalElement(d);a.insertLogicalChild(d,n,o);for(var p=u+s.subtreeLength(l),m=u+1;m<p;m++){var h=e.referenceFramesEntry(i,m);if(s.frameType(h)!==r.FrameType.attribute){this.insertFrameRange(e,t,f,0,i,m,p);break}this.applyAttribute(e,t,d,h)}if(d instanceof HTMLSelectElement&&"_blazorSelectValue"in d){var v=d._blazorSelectValue;d.value=v,delete d._blazorSelectValue}},e.prototype.insertComponent=function(e,t,n,r){var o=a.createAndInsertLogicalContainer(t,n),i=e.frameReader.componentId(r);this.attachComponentToElement(i,o)},e.prototype.insertText=function(e,t,n,r){var o=e.frameReader.textContent(r),i=document.createTextNode(o);a.insertLogicalChild(i,t,n)},e.prototype.insertMarkup=function(e,t,n,r){for(var o,i=a.createAndInsertLogicalContainer(t,n),l=e.frameReader.markupContent(r),u=(o=l,a.isSvgElement(t)?(c.innerHTML=o||" ",c):(s.innerHTML=o||" ",s.content)),d=0;u.firstChild;)a.insertLogicalChild(u.firstChild,i,d++)},e.prototype.applyAttribute=function(e,t,n,r){var o=e.frameReader,a=o.attributeName(r),i=o.attributeEventHandlerId(r);if(i){var l=h(a);this.eventDelegator.setListener(n,l,i,t)}else this.tryApplySpecialProperty(e,n,a,r)||n.setAttribute(a,o.attributeValue(r))},e.prototype.tryApplySpecialProperty=function(e,t,n,r){switch(n){case"value":return this.tryApplyValueProperty(e,t,r);case"checked":return this.tryApplyCheckedProperty(e,t,r);default:return!!n.startsWith("__internal_")&&(this.applyInternalAttribute(e,t,n.substring("__internal_".length),r),!0)}},e.prototype.applyInternalAttribute=function(e,t,n,r){var o=r?e.frameReader.attributeValue(r):null;if(n.startsWith("stopPropagation_")){var a=h(n.substring("stopPropagation_".length));this.eventDelegator.setStopPropagation(t,a,null!==o)}else{if(!n.startsWith("preventDefault_"))throw new Error("Unsupported internal attribute '"+n+"'");a=h(n.substring("preventDefault_".length));this.eventDelegator.setPreventDefault(t,a,null!==o)}},e.prototype.tryApplyValueProperty=function(e,t,n){var r=e.frameReader;if("INPUT"===t.tagName&&"time"===t.getAttribute("type")&&!t.getAttribute("step")){var o=n?r.attributeValue(n):null;if(o)return t.value=o.substring(0,5),!0}switch(t.tagName){case"INPUT":case"SELECT":case"TEXTAREA":var a=n?r.attributeValue(n):null;return t.value=a,"SELECT"===t.tagName&&(t._blazorSelectValue=a),!0;case"OPTION":(a=n?r.attributeValue(n):null)?t.setAttribute("value",a):t.removeAttribute("value");var i=this.findClosestAncestorSelectElement(t);return i&&"_blazorSelectValue"in i&&i._blazorSelectValue===a&&(this.tryApplyValueProperty(e,i,n),delete i._blazorSelectValue),!0;default:return!1}},e.prototype.tryApplyCheckedProperty=function(e,t,n){if("INPUT"===t.tagName){var r=n?e.frameReader.attributeValue(n):null;return t.checked=null!==r,!0}return!1},e.prototype.findClosestAncestorSelectElement=function(e){for(;e;){if(e instanceof HTMLSelectElement)return e;e=e.parentElement}return null},e.prototype.insertFrameRange=function(e,t,n,r,o,a,i){for(var l=r,u=a;u<i;u++){var s=e.referenceFramesEntry(o,u);r+=this.insertFrame(e,t,n,r,o,s,u),u+=m(e,s)}return r-l},e}();function m(e,t){var n=e.frameReader;switch(n.frameType(t)){case r.FrameType.component:case r.FrameType.element:case r.FrameType.region:return n.subtreeLength(t)-1;default:return 0}}function h(e){if(e.startsWith("on"))return e.substring(2);throw new Error("Attribute should be an event name, but doesn't start with 'on'. Value: '"+e+"'")}t.BrowserRenderer=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.prependFrame=1]="prependFrame",e[e.removeFrame=2]="removeFrame",e[e.setAttribute=3]="setAttribute",e[e.removeAttribute=4]="removeAttribute",e[e.updateText=5]="updateText",e[e.stepIn=6]="stepIn",e[e.stepOut=7]="stepOut",e[e.updateMarkup=8]="updateMarkup",e[e.permutationListEntry=9]="permutationListEntry",e[e.permutationListEnd=10]="permutationListEnd"}(t.EditType||(t.EditType={})),function(e){e[e.element=1]="element",e[e.text=2]="text",e[e.attribute=3]="attribute",e[e.component=4]="component",e[e.region=5]="region",e[e.elementReferenceCapture=6]="elementReferenceCapture",e[e.markup=8]="markup"}(t.FrameType||(t.FrameType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(29),o=n(30),a=c(["abort","blur","change","error","focus","load","loadend","loadstart","mouseenter","mouseleave","progress","reset","scroll","submit","unload","DOMNodeInsertedIntoDocument","DOMNodeRemovedFromDocument"]),i=c(["click","dblclick","mousedown","mousemove","mouseup"]),l=function(){function e(t){this.onEvent=t,this.afterClickCallbacks=[];var n=++e.nextEventDelegatorId;this.eventsCollectionKey="_blazorEvents_"+n,this.eventInfoStore=new u(this.onGlobalEvent.bind(this))}return e.prototype.setListener=function(e,t,n,r){var o=this.getEventHandlerInfosForElement(e,!0),a=o.getHandler(t);if(a)this.eventInfoStore.update(a.eventHandlerId,n);else{var i={element:e,eventName:t,eventHandlerId:n,renderingComponentId:r};this.eventInfoStore.add(i),o.setHandler(t,i)}},e.prototype.removeListener=function(e){var t=this.eventInfoStore.remove(e);if(t){var n=t.element,r=this.getEventHandlerInfosForElement(n,!1);r&&r.removeHandler(t.eventName)}},e.prototype.notifyAfterClick=function(e){this.afterClickCallbacks.push(e),this.eventInfoStore.addGlobalListener("click")},e.prototype.setStopPropagation=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).stopPropagation(t,n)},e.prototype.setPreventDefault=function(e,t,n){this.getEventHandlerInfosForElement(e,!0).preventDefault(t,n)},e.prototype.onGlobalEvent=function(e){if(e.target instanceof Element){for(var t,n,l=e.target,u=null,s=a.hasOwnProperty(e.type),c=!1;l;){var d=this.getEventHandlerInfosForElement(l,!1);if(d){var f=d.getHandler(e.type);if(f&&(t=l,n=e.type,!((t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement)&&i.hasOwnProperty(n)&&t.disabled))){u||(u=r.EventForDotNet.fromDOMEvent(e));var p=o.EventFieldInfo.fromEvent(f.renderingComponentId,e);this.onEvent(e,f.eventHandlerId,u,p)}d.stopPropagation(e.type)&&(c=!0),d.preventDefault(e.type)&&e.preventDefault()}l=s||c?null:l.parentElement}"click"===e.type&&this.afterClickCallbacks.forEach(function(t){return t(e)})}},e.prototype.getEventHandlerInfosForElement=function(e,t){return e.hasOwnProperty(this.eventsCollectionKey)?e[this.eventsCollectionKey]:t?e[this.eventsCollectionKey]=new s:null},e.nextEventDelegatorId=0,e}();t.EventDelegator=l;var u=function(){function e(e){this.globalListener=e,this.infosByEventHandlerId={},this.countByEventName={}}return e.prototype.add=function(e){if(this.infosByEventHandlerId[e.eventHandlerId])throw new Error("Event "+e.eventHandlerId+" is already tracked");this.infosByEventHandlerId[e.eventHandlerId]=e,this.addGlobalListener(e.eventName)},e.prototype.addGlobalListener=function(e){if(this.countByEventName.hasOwnProperty(e))this.countByEventName[e]++;else{this.countByEventName[e]=1;var t=a.hasOwnProperty(e);document.addEventListener(e,this.globalListener,t)}},e.prototype.update=function(e,t){if(this.infosByEventHandlerId.hasOwnProperty(t))throw new Error("Event "+t+" is already tracked");var n=this.infosByEventHandlerId[e];delete this.infosByEventHandlerId[e],n.eventHandlerId=t,this.infosByEventHandlerId[t]=n},e.prototype.remove=function(e){var t=this.infosByEventHandlerId[e];if(t){delete this.infosByEventHandlerId[e];var n=t.eventName;0==--this.countByEventName[n]&&(delete this.countByEventName[n],document.removeEventListener(n,this.globalListener))}return t},e}(),s=function(){function e(){this.handlers={},this.preventDefaultFlags=null,this.stopPropagationFlags=null}return e.prototype.getHandler=function(e){return this.handlers.hasOwnProperty(e)?this.handlers[e]:null},e.prototype.setHandler=function(e,t){this.handlers[e]=t},e.prototype.removeHandler=function(e){delete this.handlers[e]},e.prototype.preventDefault=function(e,t){return void 0!==t&&(this.preventDefaultFlags=this.preventDefaultFlags||{},this.preventDefaultFlags[e]=t),!!this.preventDefaultFlags&&this.preventDefaultFlags[e]},e.prototype.stopPropagation=function(e,t){return void 0!==t&&(this.stopPropagationFlags=this.stopPropagationFlags||{},this.stopPropagationFlags[e]=t),!!this.stopPropagationFlags&&this.stopPropagationFlags[e]},e}();function c(e){var t={};return e.forEach(function(e){t[e]=!0}),t}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this.type=e,this.data=t}return e.fromDOMEvent=function(t){var n=t.target;switch(t.type){case"input":case"change":if(function(e){return-1!==i.indexOf(e.getAttribute("type"))}(n)){var o=function(e){var t=e.value,n=e.type;switch(n){case"date":case"datetime-local":case"month":return t;case"time":return 5===t.length?t+":00":t;case"week":return t}throw new Error("Invalid element type '"+n+"'.")}(n);return new e("change",{type:t.type,value:o})}var l=function(e){return!!e&&"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}(n)?!!n.checked:n.value;return new e("change",{type:t.type,value:l});case"copy":case"cut":case"paste":return new e("clipboard",{type:t.type});case"drag":case"dragend":case"dragenter":case"dragleave":case"dragover":case"dragstart":case"drop":return new e("drag",function(e){return r({},a(e),{dataTransfer:e.dataTransfer})}(t));case"focus":case"blur":case"focusin":case"focusout":return new e("focus",{type:t.type});case"keydown":case"keyup":case"keypress":return new e("keyboard",function(e){return{type:e.type,key:e.key,code:e.code,location:e.location,repeat:e.repeat,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"contextmenu":case"click":case"mouseover":case"mouseout":case"mousemove":case"mousedown":case"mouseup":case"dblclick":return new e("mouse",a(t));case"error":return new e("error",function(e){return{type:e.type,message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno}}(t));case"loadstart":case"timeout":case"abort":case"load":case"loadend":case"progress":return new e("progress",function(e){return{type:e.type,lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total}}(t));case"touchcancel":case"touchend":case"touchmove":case"touchenter":case"touchleave":case"touchstart":return new e("touch",function(e){function t(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push({identifier:r.identifier,clientX:r.clientX,clientY:r.clientY,screenX:r.screenX,screenY:r.screenY,pageX:r.pageX,pageY:r.pageY})}return t}return{type:e.type,detail:e.detail,touches:t(e.touches),targetTouches:t(e.targetTouches),changedTouches:t(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}(t));case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointerenter":case"pointerleave":case"pointermove":case"pointerout":case"pointerover":case"pointerup":return new e("pointer",function(e){return r({},a(e),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}(t));case"wheel":case"mousewheel":return new e("wheel",function(e){return r({},a(e),{deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ,deltaMode:e.deltaMode})}(t));default:return new e("unknown",{type:t.type})}},e}();function a(e){return{type:e.type,detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey}}t.EventForDotNet=o;var i=["date","datetime-local","month","time","week"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.componentId=e,this.fieldValue=t}return e.fromEvent=function(t,n){var r=n.target;if(r instanceof Element){var o=function(e){if(e instanceof HTMLInputElement)return e.type&&"checkbox"===e.type.toLowerCase()?{value:e.checked}:{value:e.value};if(e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)return{value:e.value};return null}(r);if(o)return new e(t,o.value)}return null},e}();t.EventFieldInfo=r},function(e,t,n){"use strict";function r(e){return"_bl_"+e}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCaptureIdToElement=function(e,t){e.setAttribute(r(t),"")};DotNet.attachReviver(function(e,t){return t&&"object"==typeof t&&t.hasOwnProperty("__internalId")&&"string"==typeof t.__internalId?(n=t.__internalId,o="["+r(n)+"]",document.querySelector(o)):t;var n,o})},function(e,t,n){"use strict";function r(e){var t=e.substring(e.lastIndexOf("/")+1),n=t.indexOf("?");return n<0?t:t.substring(0,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getFileNameFromUrl=r,t.getAssemblyNameFromUrl=function(e){return r(e).replace(/\.dll$/,"")}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=!1;t.showErrorNotification=function(){return r(this,void 0,void 0,function(){var e;return o(this,function(t){return(e=document.querySelector("#blazor-error-ui"))&&(e.style.display="block"),a||(a=!0,document.querySelectorAll("#blazor-error-ui .reload").forEach(function(e){e.onclick=function(e){location.reload(),e.preventDefault()}}),document.querySelectorAll("#blazor-error-ui .dismiss").forEach(function(e){e.onclick=function(e){var t=document.querySelector("#blazor-error-ui");t&&(t.style.display="none"),e.preventDefault()}})),[2]})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shouldAutoStart=function(){return!(!document||!document.currentScript||"false"===document.currentScript.getAttribute("autostart"))}},,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function l(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(i,l)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),n(16),n(24);var a=n(17),i=n(48),l=n(32),u=n(5),s=n(50),c=n(34),d=n(18),f=!1;function p(e){return r(this,void 0,void 0,function(){var e,t,n,c,p,v,y=this;return o(this,function(g){switch(g.label){case 0:if(f)throw new Error("Blazor has already started.");return f=!0,d.setEventDispatcher(function(e,t){return DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","DispatchEvent",e,JSON.stringify(t))}),e=a.setPlatform(i.monoPlatform),window.Blazor.platform=e,window.Blazor._internal.renderBatch=function(e,t){u.renderBatch(e,new s.SharedMemoryRenderBatch(t))},window.Blazor._internal.navigationManager.listenForNavigationEvents(function(e,t){return r(y,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,DotNet.invokeMethodAsync("Microsoft.AspNetCore.Blazor","NotifyLocationChanged",e,t)];case 1:return n.sent(),[2]}})})}),[4,m()];case 1:t=g.sent(),n=function(e){var t=e.cssReferences.map(function(e){var t=document.createElement("link");return t.rel="stylesheet",t.href=e,h(t)}),n=e.jsReferences.map(function(e){var t=document.createElement("script");return t.src=e,h(t)});return Promise.all(t.concat(n))}(t),t.linkerEnabled||console.info("Blazor is running in dev mode without IL stripping. To make the bundle size significantly smaller, publish the application or see https://go.microsoft.com/fwlink/?linkid=870414"),c=[t.main].concat(t.assemblyReferences).map(function(e){return"_framework/_bin/"+e}),g.label=2;case 2:return g.trys.push([2,4,,5]),[4,e.start(c)];case 3:return g.sent(),[3,5];case 4:throw p=g.sent(),new Error("Failed to start platform. Reason: "+p);case 5:return[4,n];case 6:return g.sent(),v=l.getAssemblyNameFromUrl(t.main),e.callEntryPoint(v,t.entryPoint,[]),[2]}})})}function m(){return r(this,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return[4,fetch("_framework/blazor.boot.json",{method:"Get",credentials:"include"})];case 1:return[2,e.sent().json()]}})})}function h(e){return new Promise(function(t,n){e.onload=t,e.onerror=n,document.head.appendChild(e)})}window.Blazor.start=p,c.shouldAutoStart()&&p()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o,a,i,l,u,s=n(32),c=n(49),d=n(33),f={},p={},m={},h="appBinDir",v=Math.pow(2,32),y=Math.pow(2,21)-1;function g(e,t,n){var a="["+e+"]"+t+"."+n,i=p[a];if(!i){if(!(i=o(function(e){var t=f[e];if(!t){if(!(t=r(e)))throw new Error('Could not find assembly "'+e+'"');f[e]=t}return t}(e),t,n)))throw new Error('Could not find type "'+n+'" in namespace "'+t+'" in assembly "'+e+'"');p[a]=i}return i}function b(e,t,n,r){var o="["+e+"]"+t+"."+n+"::"+r,i=m[o];if(!i){if(!(i=a(g(e,t,n),r,-1)))throw new Error('Could not find method "'+r+'" on type "'+t+"."+n+'"');m[o]=i}return i}t.monoPlatform={start:function(e){return new Promise(function(n,f){var p,m;c.attachDebuggerHotkey(e),window.Browser={init:function(){}},p=function(){window.Module=function(e,n,f){var p={},m=["DEBUGGING ENABLED"];return p.print=function(e){return m.indexOf(e)<0&&console.log("WASM: "+e)},p.printErr=function(e){console.error("WASM: "+e),d.showErrorNotification()},p.preRun=[],p.postRun=[],p.preloadPlugins=[],p.locateFile=function(e){switch(e){case"dotnet.wasm":return"_framework/wasm/dotnet.wasm";default:return e}},p.preRun.push(function(){var t=Module.cwrap("mono_wasm_add_assembly",null,["string","number","number"]);r=Module.cwrap("mono_wasm_assembly_load","number",["string"]),o=Module.cwrap("mono_wasm_assembly_find_class","number",["number","string","string"]),a=Module.cwrap("mono_wasm_assembly_find_method","number",["number","string","number"]),i=Module.cwrap("mono_wasm_invoke_method","number",["number","number","number"]),l=Module.cwrap("mono_wasm_string_get_utf8","number",["number"]),u=Module.cwrap("mono_wasm_string_from_js","number",["string"]),MONO.loaded_files=[],e.forEach(function(e){var n=s.getFileNameFromUrl(e),r="blazor:"+n;addRunDependency(r),function(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(200==r.status||0==r.status&&r.response){var e=new Uint8Array(r.response);t(e)}else n(r)},r.onerror=n,r.send(void 0)})}(e).then(function(o){var a,i=Module._malloc(o.length);new Uint8Array(Module.HEAPU8.buffer,i,o.length).set(o),t(n,i,o.length),MONO.loaded_files.push((a=e,w.href=a,w.href)),removeRunDependency(r)},function(e){e instanceof XMLHttpRequest&&404===e.status&&n.match(/\.pdb$/)||f(e),removeRunDependency(r)})})}),p.postRun.push(function(){var e,r,o;MONO.mono_wasm_setenv("MONO_URI_DOTNETRELATIVEORABSOLUTE","true"),Module.cwrap("mono_wasm_load_runtime",null,["string","number"])(h,c.hasDebuggingEnabled()?1:0),MONO.mono_wasm_runtime_is_ready=!0,e=b("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop","MonoWebAssemblyJSRuntime","InvokeDotNet"),r=b("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop","MonoWebAssemblyJSRuntime","BeginInvokeDotNet"),o=b("Mono.WebAssembly.Interop","Mono.WebAssembly.Interop","MonoWebAssemblyJSRuntime","EndInvokeJS"),DotNet.attachDispatcher({beginInvokeDotNetFromJS:function(e,n,o,a,i){if(!a&&!n)throw new Error("Either assemblyName or dotNetObjectId must have a non null value.");var l=a?a.toString():n;t.monoPlatform.callMethod(r,null,[e?t.monoPlatform.toDotNetString(e.toString()):null,t.monoPlatform.toDotNetString(l),t.monoPlatform.toDotNetString(o),t.monoPlatform.toDotNetString(i)])},endInvokeJSFromDotNet:function(e,n,r){t.monoPlatform.callMethod(o,null,[t.monoPlatform.toDotNetString(r)])},invokeDotNetFromJS:function(n,r,o,a){var i=t.monoPlatform.callMethod(e,null,[n?t.monoPlatform.toDotNetString(n):null,t.monoPlatform.toDotNetString(r),o?t.monoPlatform.toDotNetString(o.toString()):null,t.monoPlatform.toDotNetString(a)]);return i?t.monoPlatform.toJavaScriptString(i):null}}),n()}),p}(e,n,f),function(){if("undefined"==typeof WebAssembly||!WebAssembly.validate)throw new Error("This browser does not support WebAssembly.");var e=document.createElement("script");e.src="_framework/wasm/dotnet.js",e.defer=!0,document.body.appendChild(e)}()},m=document.createElement("script"),window.__wasmmodulecallback__=p,m.type="text/javascript",m.text="var Module; window.__wasmmodulecallback__(); delete window.__wasmmodulecallback__;",document.body.appendChild(m)})},findMethod:b,callEntryPoint:function(e,n,r){var o=n.split("::");if(2!=o.length)throw new Error("Malformed entry point method name; could not resolve class name and method name.");var a=o[0],i=o[1],l=a.lastIndexOf("."),u=l>-1?a.substring(0,l):"",s=l>-1?a.substring(l+1):a,c=t.monoPlatform.findMethod(e,u,s,i);t.monoPlatform.callMethod(c,null,r)},callMethod:function(e,n,r){if(r.length>4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u<r.length;++u)Module.setValue(a+4*u,r[u],"i32");Module.setValue(l,0,"i32");var s=i(e,n,a,l);if(0!==Module.getValue(l,"i32"))throw new Error(t.monoPlatform.toJavaScriptString(s));return s}finally{Module.stackRestore(o)}},toJavaScriptString:function(e){var t=l(e),n=Module.UTF8ToString(t);return Module._free(t),n},toDotNetString:function(e){return u(e)},toUint8Array:function(e){var t=E(e),n=Module.getValue(t,"i32");return new Uint8Array(Module.HEAPU8.buffer,t+4,n)},getArrayLength:function(e){return Module.getValue(E(e),"i32")},getArrayEntryPtr:function(e,t,n){return E(e)+4+t*n},getObjectFieldsBaseAddress:function(e){return e+8},readInt16Field:function(e,t){return Module.getValue(e+(t||0),"i16")},readInt32Field:function(e,t){return Module.getValue(e+(t||0),"i32")},readUint64Field:function(e,t){var n=e+(t||0)>>2,r=Module.HEAPU32[n+1];if(r>y)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*v+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var w=document.createElement("a");function E(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file diff --git a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts index cf637d8444..321a708f57 100644 --- a/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts +++ b/src/Components/Web.JS/src/Platform/Mono/MonoPlatform.ts @@ -13,7 +13,7 @@ export const monoPlatform: Platform = { return new Promise<void>((resolve, reject) => { attachDebuggerHotkey(loadAssemblyUrls); - // mono.js assumes the existence of this + // dotnet.js assumes the existence of this window['Browser'] = { init: () => { }, }; @@ -118,7 +118,7 @@ function addScriptTagsToDocument() { } const scriptElem = document.createElement('script'); - scriptElem.src = '_framework/wasm/mono.js'; + scriptElem.src = '_framework/wasm/dotnet.js'; scriptElem.defer = true; document.body.appendChild(scriptElem); } @@ -142,7 +142,7 @@ function addGlobalModuleScriptTagsToDocument(callback: () => void) { function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () => void, onError: (reason?: any) => void) { const module = {} as typeof Module; - const wasmBinaryFile = '_framework/wasm/mono.wasm'; + const wasmBinaryFile = '_framework/wasm/dotnet.wasm'; const suppressMessages = ['DEBUGGING ENABLED']; module.print = line => (suppressMessages.indexOf(line) < 0 && console.log(`WASM: ${line}`)); @@ -157,7 +157,7 @@ function createEmscriptenModuleInstance(loadAssemblyUrls: string[], onReady: () module.locateFile = fileName => { switch (fileName) { - case 'mono.wasm': return wasmBinaryFile; + case 'dotnet.wasm': return wasmBinaryFile; default: return fileName; } }; diff --git a/src/Components/test/E2ETest/Tests/MonoSanityTest.cs b/src/Components/test/E2ETest/Tests/MonoSanityTest.cs index 1fb1b26ec9..b8db27fd2b 100644 --- a/src/Components/test/E2ETest/Tests/MonoSanityTest.cs +++ b/src/Components/test/E2ETest/Tests/MonoSanityTest.cs @@ -74,14 +74,6 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests Assert.Contains("Hello from test", GetValue(Browser, "triggerExceptionMessageStackTrace")); } - [Fact] - public void ProvidesDiagnosticIfInvokingWipedMethod() - { - Browser.FindElement(By.CssSelector("#invokeWipedMethod button")).Click(); - - Assert.Contains("System.NotImplementedException: Cannot invoke method because it was wiped. See stack trace for details.", GetValue(Browser, "invokeWipedMethodStackTrace")); - } - [Fact] public void CanCallJavaScriptFromDotNet() { From 0f2e88a334b89d247f64c84a5c6f4730ff847754 Mon Sep 17 00:00:00 2001 From: Ajay Bhargav B <ajbaaska@microsoft.com> Date: Tue, 21 Jan 2020 12:45:25 -0800 Subject: [PATCH 51/64] Added launchSettings.json for Blazor wasm templates (#18368) * Added launchSettings.json for Blazor wasm templates * Updated launchSettings * removed windows auth option --- .../Client/Properties/launchSettings.json | 3 ++ .../Server/Properties/launchSettings.json | 36 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Properties/launchSettings.json create mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Properties/launchSettings.json diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Properties/launchSettings.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Properties/launchSettings.json new file mode 100644 index 0000000000..5b741f2913 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Properties/launchSettings.json @@ -0,0 +1,3 @@ +{ + "useWebAssemblyDebugging": true +} \ No newline at end of file diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Properties/launchSettings.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Properties/launchSettings.json new file mode 100644 index 0000000000..3cf9f85e48 --- /dev/null +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Properties/launchSettings.json @@ -0,0 +1,36 @@ +{ + "useWebAssemblyDebugging": true, + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:8080", + //#if(RequiresHttps) + "sslPort": 44300 + //#else + "sslPort": 0 + //#endif + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Company.WebApplication1": { + "commandName": "Project", + "launchBrowser": true, + //#if(RequiresHttps) + "applicationUrl": "https://localhost:5001;http://localhost:5000", + //#else + "applicationUrl": "http://localhost:5000", + //#endif + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } + } From 05f2430bbd5e7b6929d5bae69dcdba0cb3c06e32 Mon Sep 17 00:00:00 2001 From: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Date: Tue, 21 Jan 2020 21:33:27 +0000 Subject: [PATCH 52/64] Update Mono debug proxy code (#18478) --- .../src/MonoDebugProxy/ws-proxy/DebugStore.cs | 4 +- .../src/MonoDebugProxy/ws-proxy/MonoProxy.cs | 135 ++++++++++-------- .../src/MonoDebugProxy/ws-proxy/WsProxy.cs | 48 +++++-- 3 files changed, 114 insertions(+), 73 deletions(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs index ee28bd94b7..e1e9b7392b 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/DebugStore.cs @@ -545,7 +545,7 @@ namespace WsProxy { return assemblies.FirstOrDefault (a => a.Name.Equals (name, StringComparison.InvariantCultureIgnoreCase)); } - /* + /* V8 uses zero based indexing for both line and column. PPDBs uses one based indexing for both line and column. */ @@ -598,7 +598,7 @@ namespace WsProxy { PPDBs uses one based indexing for both line and column. */ static bool Match (SequencePoint sp, int line, int column) - { + { var bp = (line: line + 1, column: column + 1); if (sp.StartLine > bp.line || sp.EndLine < bp.line) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs index 8c440da1ce..dfcb373afe 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs @@ -223,7 +223,7 @@ namespace WsProxy { Info ("RUNTIME READY, PARTY TIME"); await RuntimeReady (token); await SendCommand ("Debugger.resume", new JObject (), token); - SendEvent ("Mono.runtimeReady", new JObject (), token); + SendEvent ("Mono.runtimeReady", new JObject (), token); } async Task OnBreakPointHit (JObject args, CancellationToken token) @@ -274,12 +274,18 @@ namespace WsProxy { var frames = new List<Frame> (); int frame_id = 0; var the_mono_frames = res.Value? ["result"]? ["value"]? ["frames"]?.Values<JObject> (); + foreach (var mono_frame in the_mono_frames) { var il_pos = mono_frame ["il_pos"].Value<int> (); var method_token = mono_frame ["method_token"].Value<int> (); var assembly_name = mono_frame ["assembly_name"].Value<string> (); var asm = store.GetAssemblyByName (assembly_name); + if (asm == null) { + Info ($"Unable to find assembly: {assembly_name}"); + continue; + } + var method = asm.GetMethodByToken (method_token); if (method == null) { @@ -374,7 +380,7 @@ namespace WsProxy { //Debug ($"\t{is_ready}"); if (is_ready.HasValue && is_ready.Value == true) { Debug ("RUNTIME LOOK READY. GO TIME!"); - await RuntimeReady (token); + await OnRuntimeReady (token); } } @@ -426,33 +432,38 @@ namespace WsProxy { return; } - var values = res.Value?["result"]?["value"]?.Values<JObject>().ToArray(); + try { + var values = res.Value?["result"]?["value"]?.Values<JObject>().ToArray() ?? Array.Empty<JObject>(); + var var_list = new List<JObject>(); - var var_list = new List<JObject>(); + // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously + // results in a "Memory access out of bounds", causing 'values' to be null, + // so skip returning variable values in that case. + for (int i = 0; i < values.Length; i+=2) + { + string fieldName = (string)values[i]["name"]; + if (fieldName.Contains("k__BackingField")){ + fieldName = fieldName.Replace("k__BackingField", ""); + fieldName = fieldName.Replace("<", ""); + fieldName = fieldName.Replace(">", ""); + } + var value = values [i + 1]? ["value"]; + if (((string)value ["description"]) == null) + value ["description"] = value ["value"]?.ToString (); - // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously - // results in a "Memory access out of bounds", causing 'values' to be null, - // so skip returning variable values in that case. - for (int i = 0; i < values.Length; i+=2) - { - string fieldName = (string)values[i]["name"]; - if (fieldName.Contains("k__BackingField")){ - fieldName = fieldName.Replace("k__BackingField", ""); - fieldName = fieldName.Replace("<", ""); - fieldName = fieldName.Replace(">", ""); + var_list.Add(JObject.FromObject(new { + name = fieldName, + value + })); + + } + o = JObject.FromObject(new + { + result = var_list + }); + } catch (Exception e) { + Debug ($"failed to parse {res.Value}"); } - var_list.Add(JObject.FromObject(new - { - name = fieldName, - value = values[i+1]["value"] - })); - - } - o = JObject.FromObject(new - { - result = var_list - }); - SendResponse(msg_id, Result.Ok(o), token); } @@ -481,41 +492,51 @@ namespace WsProxy { return; } - var values = res.Value? ["result"]? ["value"]?.Values<JObject> ().ToArray (); + try { + var values = res.Value? ["result"]? ["value"]?.Values<JObject> ().ToArray (); - var var_list = new List<JObject> (); - int i = 0; - // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously - // results in a "Memory access out of bounds", causing 'values' to be null, - // so skip returning variable values in that case. - while (values != null && i < vars.Length && i < values.Length) { - var value = values [i] ["value"]; - if (((string)value ["description"]) == null) - value ["description"] = value ["value"]?.ToString(); + var var_list = new List<JObject> (); + int i = 0; + // Trying to inspect the stack frame for DotNetDispatcher::InvokeSynchronously + // results in a "Memory access out of bounds", causing 'values' to be null, + // so skip returning variable values in that case. + while (values != null && i < vars.Length && i < values.Length) { + var value = values [i] ["value"]; + if (((string)value ["description"]) == null) + value ["description"] = value ["value"]?.ToString (); - var_list.Add (JObject.FromObject (new { - name = vars [i].Name, - value = values [i] ["value"] - })); - i++; + var_list.Add (JObject.FromObject (new { + name = vars [i].Name, + value + })); + i++; + } + //Async methods are special in the way that local variables can be lifted to generated class fields + //value of "this" comes here either + while (i < values.Length) { + String name = values [i] ["name"].ToString (); + + if (name.IndexOf (">", StringComparison.Ordinal) > 0) + name = name.Substring (1, name.IndexOf (">", StringComparison.Ordinal) - 1); + + var value = values [i + 1] ["value"]; + if (((string)value ["description"]) == null) + value ["description"] = value ["value"]?.ToString (); + + var_list.Add (JObject.FromObject (new { + name, + value + })); + i = i + 2; + } + o = JObject.FromObject (new { + result = var_list + }); + SendResponse (msg_id, Result.Ok (o), token); } - //Async methods are special in the way that local variables can be lifted to generated class fields - //value of "this" comes here either - while (i < values.Length) { - String name = values [i] ["name"].ToString (); - - if (name.IndexOf (">", StringComparison.Ordinal) > 0) - name = name.Substring (1, name.IndexOf (">", StringComparison.Ordinal) - 1); - var_list.Add (JObject.FromObject (new { - name = name, - value = values [i+1] ["value"] - })); - i = i + 2; + catch (Exception exc) { + SendResponse (msg_id, res, token); } - o = JObject.FromObject (new { - result = var_list - }); - SendResponse (msg_id, Result.Ok (o), token); } async Task<Result> EnableBreakPoint (Breakpoint bp, CancellationToken token) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/WsProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/WsProxy.cs index 17c72e9ce7..87ef23027e 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/WsProxy.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/WsProxy.cs @@ -97,6 +97,7 @@ namespace WsProxy { internal class WsProxy { TaskCompletionSource<bool> side_exception = new TaskCompletionSource<bool> (); + TaskCompletionSource<bool> client_initiated_close = new TaskCompletionSource<bool> (); List<(int, TaskCompletionSource<Result>)> pending_cmds = new List<(int, TaskCompletionSource<Result>)> (); ClientWebSocket browser; WebSocket ide; @@ -119,8 +120,16 @@ namespace WsProxy { byte [] buff = new byte [4000]; var mem = new MemoryStream (); while (true) { + + if (socket.State != WebSocketState.Open) { + Console.WriteLine ($"WSProxy: Socket is no longer open."); + client_initiated_close.TrySetResult (true); + return null; + } + var result = await socket.ReceiveAsync (new ArraySegment<byte> (buff), token); if (result.MessageType == WebSocketMessageType.Close) { + client_initiated_close.TrySetResult (true); return null; } @@ -144,7 +153,7 @@ namespace WsProxy { void Send (WebSocket to, JObject o, CancellationToken token) { - var bytes = Encoding.UTF8.GetBytes (o.ToString ()); + var bytes = Encoding.UTF8.GetBytes (o.ToString ()); var queue = GetQueueForSocket (to); var task = queue.Send (bytes, token); @@ -199,9 +208,10 @@ namespace WsProxy { void ProcessIdeMessage (string msg, CancellationToken token) { - var res = JObject.Parse (msg); - - pending_ops.Add (OnCommand (res ["id"].Value<int> (), res ["method"].Value<string> (), res ["params"] as JObject, token)); + if (!string.IsNullOrEmpty (msg)) { + var res = JObject.Parse (msg); + pending_ops.Add (OnCommand (res ["id"].Value<int> (), res ["method"].Value<string> (), res ["params"] as JObject, token)); + } } internal async Task<Result> SendCommand (string method, JObject args, CancellationToken token) { @@ -255,24 +265,25 @@ namespace WsProxy { Send (this.ide, o, token); } - // , HttpContext context) + // , HttpContext context) public async Task Run (Uri browserUri, WebSocket ideSocket) { - Debug ("wsproxy start"); + Debug ($"WsProxy Starting on {browserUri}"); using (this.ide = ideSocket) { - Debug ("ide connected"); + Debug ($"WsProxy: IDE waiting for connection on {browserUri}"); queues.Add (new WsQueue (this.ide)); using (this.browser = new ClientWebSocket ()) { this.browser.Options.KeepAliveInterval = Timeout.InfiniteTimeSpan; await this.browser.ConnectAsync (browserUri, CancellationToken.None); queues.Add (new WsQueue (this.browser)); - Debug ("client connected"); + Debug ($"WsProxy: Client connected on {browserUri}"); var x = new CancellationTokenSource (); pending_ops.Add (ReadOne (browser, x.Token)); pending_ops.Add (ReadOne (ide, x.Token)); pending_ops.Add (side_exception.Task); + pending_ops.Add (client_initiated_close.Task); try { while (!x.IsCancellationRequested) { @@ -280,15 +291,23 @@ namespace WsProxy { //Console.WriteLine ("pump {0} {1}", task, pending_ops.IndexOf (task)); if (task == pending_ops [0]) { var msg = ((Task<string>)task).Result; - pending_ops [0] = ReadOne (browser, x.Token); //queue next read - ProcessBrowserMessage (msg, x.Token); + if (msg != null) { + pending_ops [0] = ReadOne (browser, x.Token); //queue next read + ProcessBrowserMessage (msg, x.Token); + } } else if (task == pending_ops [1]) { var msg = ((Task<string>)task).Result; - pending_ops [1] = ReadOne (ide, x.Token); //queue next read - ProcessIdeMessage (msg, x.Token); + if (msg != null) { + pending_ops [1] = ReadOne (ide, x.Token); //queue next read + ProcessIdeMessage (msg, x.Token); + } } else if (task == pending_ops [2]) { var res = ((Task<bool>)task).Result; throw new Exception ("side task must always complete with an exception, what's going on???"); + } else if (task == pending_ops [3]) { + var res = ((Task<bool>)task).Result; + Debug ($"WsProxy: Client initiated close from {browserUri}"); + x.Cancel (); } else { //must be a background task pending_ops.Remove (task); @@ -301,10 +320,11 @@ namespace WsProxy { } } } catch (Exception e) { - Debug ($"got exception {e}"); + Debug ($"WsProxy::Run: Exception {e}"); //throw; } finally { - x.Cancel (); + if (!x.IsCancellationRequested) + x.Cancel (); } } } From 41bc4ec1296e41bf37a7f972864ed25c91152ae6 Mon Sep 17 00:00:00 2001 From: wtgodbe <wigodbe@microsoft.com> Date: Tue, 21 Jan 2020 14:35:16 -0800 Subject: [PATCH 53/64] Fix logic for _GetPackageVersionInfo --- Directory.Build.targets | 7 +++++++ eng/targets/Packaging.targets | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index db3cea59f1..70c1ab16cd 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -70,6 +70,10 @@ <IsPackable Condition=" '$(IsPackageInThisPatch)' != 'true' ">false</IsPackable> </PropertyGroup> + <PropertyGroup> + <PackageVersionForPackageVersionInfo>$(PackageVersion)</PackageVersionForPackageVersionInfo> + </PropertyGroup> + <PropertyGroup Condition=" '$(IsPackageInThisPatch)' != 'true' AND '$(BaselinePackageVersion)' != '' AND '$(IsServicingBuild)' == 'true' "> <!-- This keeps assembly and package versions consistent across patches. If a package is not included in a patch, its version should stay at the baseline. --> <AssemblyVersion Condition="$(BaselinePackageVersion.Contains('-'))">$(BaselinePackageVersion.Substring(0, $(BaselinePackageVersion.IndexOf('-')))).0</AssemblyVersion> @@ -83,6 +87,9 @@ --> <Version Condition="'$(NoBuild)' == 'true' AND '$(DesignTimeBuild)' == 'true'">$(BaselinePackageVersion)</Version> <PackageVersion Condition="'$(NoBuild)' == 'true' AND '$(DesignTimeBuild)' == 'true'">$(BaselinePackageVersion)</PackageVersion> + + <!-- For servicing builds, we want to resolve basline versions of project packages that aren't building, always --> + <PackageVersionForPackageVersionInfo>$(BaselinePackageVersion)</PackageVersionForPackageVersionInfo> </PropertyGroup> <PropertyGroup> diff --git a/eng/targets/Packaging.targets b/eng/targets/Packaging.targets index fdef1de7a3..ea8dabdb46 100644 --- a/eng/targets/Packaging.targets +++ b/eng/targets/Packaging.targets @@ -13,7 +13,7 @@ <ItemGroup> <_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)"> <PackageId>$(PackageId)</PackageId> - <PackageVersion>$(PackageVersion)</PackageVersion> + <PackageVersion>$(PackageVersionForPackageVersionInfo)</PackageVersion> <VersionSuffix>$(VersionSuffix)</VersionSuffix> <VersionVariableName>$(PackageId.Replace('.',''))PackageVersion</VersionVariableName> </_ProjectPathWithVersion> From 419a1f11a9a94047c82e728693e0e62d146befb8 Mon Sep 17 00:00:00 2001 From: wtgodbe <wigodbe@microsoft.com> Date: Tue, 21 Jan 2020 14:38:56 -0800 Subject: [PATCH 54/64] Undo accidental merge --- Directory.Build.targets | 7 ------- eng/targets/Packaging.targets | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 70c1ab16cd..db3cea59f1 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -70,10 +70,6 @@ <IsPackable Condition=" '$(IsPackageInThisPatch)' != 'true' ">false</IsPackable> </PropertyGroup> - <PropertyGroup> - <PackageVersionForPackageVersionInfo>$(PackageVersion)</PackageVersionForPackageVersionInfo> - </PropertyGroup> - <PropertyGroup Condition=" '$(IsPackageInThisPatch)' != 'true' AND '$(BaselinePackageVersion)' != '' AND '$(IsServicingBuild)' == 'true' "> <!-- This keeps assembly and package versions consistent across patches. If a package is not included in a patch, its version should stay at the baseline. --> <AssemblyVersion Condition="$(BaselinePackageVersion.Contains('-'))">$(BaselinePackageVersion.Substring(0, $(BaselinePackageVersion.IndexOf('-')))).0</AssemblyVersion> @@ -87,9 +83,6 @@ --> <Version Condition="'$(NoBuild)' == 'true' AND '$(DesignTimeBuild)' == 'true'">$(BaselinePackageVersion)</Version> <PackageVersion Condition="'$(NoBuild)' == 'true' AND '$(DesignTimeBuild)' == 'true'">$(BaselinePackageVersion)</PackageVersion> - - <!-- For servicing builds, we want to resolve basline versions of project packages that aren't building, always --> - <PackageVersionForPackageVersionInfo>$(BaselinePackageVersion)</PackageVersionForPackageVersionInfo> </PropertyGroup> <PropertyGroup> diff --git a/eng/targets/Packaging.targets b/eng/targets/Packaging.targets index ea8dabdb46..fdef1de7a3 100644 --- a/eng/targets/Packaging.targets +++ b/eng/targets/Packaging.targets @@ -13,7 +13,7 @@ <ItemGroup> <_ProjectPathWithVersion Include="$(MSBuildProjectFullPath)"> <PackageId>$(PackageId)</PackageId> - <PackageVersion>$(PackageVersionForPackageVersionInfo)</PackageVersion> + <PackageVersion>$(PackageVersion)</PackageVersion> <VersionSuffix>$(VersionSuffix)</VersionSuffix> <VersionVariableName>$(PackageId.Replace('.',''))PackageVersion</VersionVariableName> </_ProjectPathWithVersion> From ba08d60cb95c01e8de4ebeda3948217fcc6b24a8 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 21 Jan 2020 14:43:34 -0800 Subject: [PATCH 55/64] Update names and descriptions for benchmarks (#18430) --- .../Driver/BenchmarkResult.cs | 11 ++++++ .../Wasm.Performance/Driver/Program.cs | 10 ++--- .../TestApp/wwwroot/benchmarks/appStartup.js | 5 +++ .../wwwroot/benchmarks/jsonHandling.js | 38 +++++++++++++++++-- .../benchmarks/lib/minibench/minibench.js | 16 ++++++-- .../TestApp/wwwroot/benchmarks/renderList.js | 21 ++++++++-- .../Wasm.Performance/benchmarks.compose.json | 3 ++ 7 files changed, 89 insertions(+), 15 deletions(-) diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs index 3173341e4b..33e4c4094b 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/BenchmarkResult.cs @@ -4,10 +4,21 @@ namespace Wasm.Performance.Driver { public string Name { get; set; } + public BenchmarkDescriptor Descriptor { get; set; } + + public string ShortDescription { get; set; } + public bool Success { get; set; } public int NumExecutions { get; set; } public double Duration { get; set; } + + public class BenchmarkDescriptor + { + public string Name { get; set; } + + public string Description { get; set; } + } } } \ No newline at end of file diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index cfaa9cef0f..0d74c8c6b7 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -76,9 +76,9 @@ namespace Wasm.Performance.Driver output.Metadata.Add(new BenchmarkMetadata { Source = "BlazorWasm", - Name = result.Name, - ShortDescription = $"{result.Name} Duration", - LongDescription = $"{result.Name} Duration", + Name = result.Descriptor.Name, + ShortDescription = result.Name, + LongDescription = result.Descriptor.Description, Format = "n2" }); @@ -94,7 +94,7 @@ namespace Wasm.Performance.Driver output.Metadata.Add(new BenchmarkMetadata { Source = "BlazorWasm", - Name = "Publish size", + Name = "blazorwasm/publish-size", ShortDescription = "Publish size (KB)", LongDescription = "Publish size (KB)", Format = "n2", @@ -116,7 +116,7 @@ namespace Wasm.Performance.Driver output.Metadata.Add(new BenchmarkMetadata { Source = "BlazorWasm", - Name = "Publish size (compressed)", + Name = "blazorwasm/compressed-publish-size", ShortDescription = "Publish size compressed app (KB)", LongDescription = "Publish size - compressed app (KB)", Format = "n2", diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/appStartup.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/appStartup.js index 4f11b64b0f..f506b12ee4 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/appStartup.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/appStartup.js @@ -10,6 +10,11 @@ group('App Startup', () => { } finally { app.dispose(); } + }, { + descriptor: { + name: "blazorwasm/time-to-first-ui", + description: "Time to render first UI (ms)" + } }); }); diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandling.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandling.js index 4f6a311152..698eb7cee5 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandling.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/jsonHandling.js @@ -16,22 +16,47 @@ group('JSON handling', () => { teardown(() => app.dispose()); benchmark('Serialize 1kb', () => - benchmarkJson(app, '#serialize-small', '#serialized-length', 935)); + benchmarkJson(app, '#serialize-small', '#serialized-length', 935), { + descriptor: { + name: 'blazorwasm/jsonserialize-1kb', + description: 'Serialize JSON 1kb - Time in ms' + } + }); benchmark('Serialize 340kb', () => - benchmarkJson(app, '#serialize-large', '#serialized-length', 339803)); + benchmarkJson(app, '#serialize-large', '#serialized-length', 339803), { + descriptor: { + name: 'blazorwasm/jsonserialize-340kb', + description: 'Serialize JSON 340kb - Time in ms' + } + }); benchmark('Deserialize 1kb', () => - benchmarkJson(app, '#deserialize-small', '#deserialized-count', 5)); + benchmarkJson(app, '#deserialize-small', '#deserialized-count', 5), { + descriptor: { + name: 'blazorwasm/jsondeserialize-1kb', + description: 'Deserialize JSON 1kb - Time in ms' + } + }); benchmark('Deserialize 340kb', () => - benchmarkJson(app, '#deserialize-large', '#deserialized-count', 1365)); + benchmarkJson(app, '#deserialize-large', '#deserialized-count', 1365), { + descriptor: { + name: 'blazorwasm/jsondeserialize-340kb', + description: 'Deserialize JSON 340kb - Time in ms' + } + }); benchmark('Serialize 340kb (JavaScript)', () => { const json = JSON.stringify(largeObjectToSerialize); if (json.length !== 339803) { throw new Error(`Incorrect length: ${json.length}`); } + }, { + descriptor: { + name: 'blazorwasm/jsonserialize-javascript-340kb', + description: 'Serialize JSON 340kb using JavaScript - Time in ms' + } }); benchmark('Deserialize 340kb (JavaScript)', () => { @@ -39,6 +64,11 @@ group('JSON handling', () => { if (parsed.name !== 'CEO - Subordinate 0') { throw new Error('Incorrect result'); } + }, { + descriptor: { + name: 'blazorwasm/jsondeserialize-javascript-340kb', + description: 'Deserialize JSON 340kb using JavaScript - Time in ms' + } }); }); diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js index 241721ceeb..f331321ad0 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/lib/minibench/minibench.js @@ -165,7 +165,7 @@ class Benchmark extends EventEmitter { this._group = group; this.name = name; this._fn = fn; - this._options = options; + this._options = options || {}; this._state = { status: BenchmarkStatus.idle }; } @@ -205,13 +205,23 @@ class Benchmark extends EventEmitter { await this._group.runTeardown(); } - reportBenchmarkEvent(BenchmarkEvent.benchmarkCompleted, { 'name': this.name, success: true, numExecutions: this._state.numExecutions, duration: this._state.estimatedExecutionDurationMs }); + reportBenchmarkEvent(BenchmarkEvent.benchmarkCompleted, { + name: this.name, + success: true, + numExecutions: this._state.numExecutions, + duration: this._state.estimatedExecutionDurationMs, + descriptor: this._options.descriptor + }); this._updateState({ status: BenchmarkStatus.idle }); } catch (ex) { this._updateState({ status: BenchmarkStatus.error }); console.error(ex); - reportBenchmarkEvent(BenchmarkEvent.benchmarkError, { 'name': this.name, success: false }); + reportBenchmarkEvent(BenchmarkEvent.benchmarkError, { + name: this.name, + success: false, + descriptor: this._options.descriptor + }); } }); } diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/renderList.js b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/renderList.js index 68bf32d747..32a1bb8a72 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/renderList.js +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/wwwroot/benchmarks/renderList.js @@ -16,9 +16,24 @@ group('Rendering list', () => { app.dispose(); }); - benchmark('Render 10 items', () => measureRenderList(app, 10)); - benchmark('Render 100 items', () => measureRenderList(app, 100)); - benchmark('Render 1000 items', () => measureRenderList(app, 1000)); + benchmark('Render 10 items', () => measureRenderList(app, 10), { + descriptor: { + name: 'blazorwasm/render-10-items', + description: 'Time to render 10 item list (ms)' + } + }); + benchmark('Render 100 items', () => measureRenderList(app, 100), { + descriptor: { + name: 'blazorwasm/render-100-items', + description: 'Time to render 100 item list (ms)' + } + }); + benchmark('Render 1000 items', () => measureRenderList(app, 1000), { + descriptor: { + name: 'blazorwasm/render-1000-items', + description: 'Time to render 1000 item list (ms)' + } + }); }); diff --git a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json index 81607364dc..442346e79c 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json +++ b/src/Components/benchmarkapps/Wasm.Performance/benchmarks.compose.json @@ -14,6 +14,9 @@ "branchOrCommit": "blazor-wasm", "dockerfile": "src/Components/benchmarkapps/Wasm.Performance/dockerfile" }, + "buildArguments": [ + "gitBranch=blazor-wasm" + ], "waitForExit": true, "readyStateText": "Application started." } From 3111032dc074a252f1d1cbd951ecb41153bd1555 Mon Sep 17 00:00:00 2001 From: Ryan Nowak <nowakra@gmail.com> Date: Sun, 19 Jan 2020 15:51:50 -0800 Subject: [PATCH 56/64] Rework of Blazor startup experience Fixes: #16874 This is a significant simplication of our startup code model for Blazor wasm with the goal of removing concepts that don't make much sense here. Previously in this area we've tried to be consistent with ASP.NET Core on the server, but it's not helping up much in WASM. We're still leveraging some of the lessons from server-size ASP.NET (hello CreateDefaultBuilder) but consistency is no longer a goal. This change actually makes a bunch of scenarios better (rather than removing features) - it's now possible to access services from the application's DI scope and initialize them before the UI is shown `RunAsync`. This change also adds configuration in a central way. There's nothing in this change that populates configuration in an automatic way, that will come next. --- .../ref/Microsoft.AspNetCore.Blazor.csproj | 2 +- ...rosoft.AspNetCore.Blazor.netstandard2.1.cs | 62 +++--- .../ComponentsApplicationBuilderExtensions.cs | 24 -- .../Builder/IComponentsApplicationBuilder.cs | 26 --- .../src/Hosting/BlazorWebAssemblyHost.cs | 20 -- .../src/Hosting/ConventionBasedStartup.cs | 117 ---------- .../Blazor/src/Hosting/IBlazorStartup.cs | 16 -- .../Blazor/src/Hosting/IWebAssemblyHost.cs | 34 --- .../src/Hosting/IWebAssemblyHostBuilder.cs | 46 ---- .../IWebAssemblyServiceFactoryAdapter.cs | 17 -- .../src/Hosting/RootComponentMapping.cs | 53 +++++ .../Hosting/RootComponentMappingCollection.cs | 68 ++++++ .../WebAssemblyBlazorApplicationBuilder.cs | 54 ----- .../Blazor/src/Hosting/WebAssemblyHost.cs | 171 ++++++++------ .../src/Hosting/WebAssemblyHostBuilder.cs | 136 ++++++------ .../Hosting/WebAssemblyHostBuilderContext.cs | 27 --- .../WebAssemblyHostBuilderExtensions.cs | 73 ------ .../src/Hosting/WebAssemblyHostExtensions.cs | 36 --- .../WebAssemblyServiceFactoryAdapter.cs | 52 ----- .../src/Microsoft.AspNetCore.Blazor.csproj | 4 +- .../Hosting/ConventionBasedStartupTest.cs | 210 ------------------ .../test/Hosting/RootComponentMappingTest.cs | 37 +++ .../Hosting/WebAssemblyHostBuilderTest.cs | 184 ++++++--------- .../test/Hosting/WebAssemblyHostTest.cs | 81 ++++--- .../HostedInAspNet.Client/Program.cs | 12 +- .../HostedInAspNet.Client/Startup.cs | 20 -- .../testassets/StandaloneApp/Program.cs | 12 +- .../testassets/StandaloneApp/Startup.cs | 20 -- .../Wasm.Performance/Driver/Program.cs | 4 +- .../Wasm.Performance/TestApp/Program.cs | 12 +- .../Wasm.Performance/TestApp/Startup.cs | 20 -- .../test/testassets/BasicTestApp/Program.cs | 29 ++- .../test/testassets/BasicTestApp/Startup.cs | 39 ---- .../test/testassets/TestServer/CorsStartup.cs | 4 +- .../TestServer/InternationalizationStartup.cs | 2 +- ...tartupWithMapFallbackToClientSideBlazor.cs | 10 +- .../BlazorWasm-CSharp/Client/Program.cs | 28 ++- .../BlazorWasm-CSharp/Client/Startup.cs | 28 --- .../BlazorWasm-CSharp/Server/Startup.cs | 4 +- 39 files changed, 545 insertions(+), 1249 deletions(-) delete mode 100644 src/Components/Blazor/Blazor/src/Builder/ComponentsApplicationBuilderExtensions.cs delete mode 100644 src/Components/Blazor/Blazor/src/Builder/IComponentsApplicationBuilder.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/BlazorWebAssemblyHost.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/ConventionBasedStartup.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/IBlazorStartup.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHost.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHostBuilder.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs create mode 100644 src/Components/Blazor/Blazor/src/Hosting/RootComponentMapping.cs create mode 100644 src/Components/Blazor/Blazor/src/Hosting/RootComponentMappingCollection.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderContext.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderExtensions.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs delete mode 100644 src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs delete mode 100644 src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs create mode 100644 src/Components/Blazor/Blazor/test/Hosting/RootComponentMappingTest.cs delete mode 100644 src/Components/Blazor/testassets/HostedInAspNet.Client/Startup.cs delete mode 100644 src/Components/Blazor/testassets/StandaloneApp/Startup.cs delete mode 100644 src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs delete mode 100644 src/Components/test/testassets/BasicTestApp/Startup.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj index 88ca078caa..25d2991601 100644 --- a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj @@ -7,6 +7,6 @@ <Compile Include="Microsoft.AspNetCore.Blazor.netstandard2.1.cs" /> <Reference Include="Mono.WebAssembly.Interop" /> <Reference Include="Microsoft.AspNetCore.Components.Web" /> - <Reference Include="Microsoft.Extensions.Options" /> + <Reference Include="Microsoft.Extensions.Configuration" /> </ItemGroup> </Project> diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs index b8062d72c0..eb33362975 100644 --- a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs +++ b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs @@ -12,38 +12,38 @@ namespace Microsoft.AspNetCore.Blazor } namespace Microsoft.AspNetCore.Blazor.Hosting { - public static partial class BlazorWebAssemblyHost + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RootComponentMapping { - public static Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder CreateDefaultBuilder() { throw null; } + private readonly object _dummy; + public RootComponentMapping(System.Type componentType, string selector) { throw null; } + public System.Type ComponentType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public string Selector { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } - public partial interface IWebAssemblyHost : System.IDisposable + public partial class RootComponentMappingCollection : System.Collections.ObjectModel.Collection<Microsoft.AspNetCore.Blazor.Hosting.RootComponentMapping> { - System.IServiceProvider Services { get; } - System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + public RootComponentMappingCollection() { } + public void Add(System.Type componentType, string selector) { } + public void AddRange(System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Blazor.Hosting.RootComponentMapping> items) { } + public void Add<TComponent>(string selector) where TComponent : Microsoft.AspNetCore.Components.IComponent { } } - public partial interface IWebAssemblyHostBuilder + public sealed partial class WebAssemblyHost : System.IAsyncDisposable { - System.Collections.Generic.IDictionary<object, object> Properties { get; } - Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHost Build(); - Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder ConfigureServices(System.Action<Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate); - Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder UseServiceProviderFactory<TContainerBuilder>(Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<TContainerBuilder> factory); - Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder UseServiceProviderFactory<TContainerBuilder>(System.Func<Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHostBuilderContext, Microsoft.Extensions.DependencyInjection.IServiceProviderFactory<TContainerBuilder>> factory); + internal WebAssemblyHost() { } + public Microsoft.Extensions.Configuration.IConfiguration Configuration { get { throw null; } } + public System.IServiceProvider Services { get { throw null; } } + [System.Diagnostics.DebuggerStepThroughAttribute] + public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; } + public System.Threading.Tasks.Task RunAsync() { throw null; } } - public sealed partial class WebAssemblyHostBuilderContext + public sealed partial class WebAssemblyHostBuilder { - public WebAssemblyHostBuilderContext(System.Collections.Generic.IDictionary<object, object> properties) { } - public System.Collections.Generic.IDictionary<object, object> Properties { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - public static partial class WebAssemblyHostBuilderExtensions - { - public static Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder ConfigureServices(this Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder hostBuilder, System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection> configureDelegate) { throw null; } - public static Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder UseBlazorStartup(this Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder builder, System.Type startupType) { throw null; } - public static Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder UseBlazorStartup<TStartup>(this Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHostBuilder builder) { throw null; } - } - public static partial class WebAssemblyHostExtensions - { - public static void Run(this Microsoft.AspNetCore.Blazor.Hosting.IWebAssemblyHost host) { } + internal WebAssemblyHostBuilder() { } + public Microsoft.Extensions.Configuration.IConfigurationBuilder Configuration { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Blazor.Hosting.RootComponentMappingCollection RootComponents { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } + public Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHost Build() { throw null; } + public static Microsoft.AspNetCore.Blazor.Hosting.WebAssemblyHostBuilder CreateDefault(string[] args = null) { throw null; } } } namespace Microsoft.AspNetCore.Blazor.Http @@ -67,15 +67,3 @@ namespace Microsoft.AspNetCore.Blazor.Rendering public static System.Threading.Tasks.Task DispatchEvent(Microsoft.AspNetCore.Components.RenderTree.WebEventDescriptor eventDescriptor, string eventArgsJson) { throw null; } } } -namespace Microsoft.AspNetCore.Components.Builder -{ - public static partial class ComponentsApplicationBuilderExtensions - { - public static void AddComponent<TComponent>(this Microsoft.AspNetCore.Components.Builder.IComponentsApplicationBuilder app, string domElementSelector) where TComponent : Microsoft.AspNetCore.Components.IComponent { } - } - public partial interface IComponentsApplicationBuilder - { - System.IServiceProvider Services { get; } - void AddComponent(System.Type componentType, string domElementSelector); - } -} diff --git a/src/Components/Blazor/Blazor/src/Builder/ComponentsApplicationBuilderExtensions.cs b/src/Components/Blazor/Blazor/src/Builder/ComponentsApplicationBuilderExtensions.cs deleted file mode 100644 index 66532474c6..0000000000 --- a/src/Components/Blazor/Blazor/src/Builder/ComponentsApplicationBuilderExtensions.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.AspNetCore.Components.Builder -{ - /// <summary> - /// Provides extension methods for <see cref="IComponentsApplicationBuilder"/>. - /// </summary> - public static class ComponentsApplicationBuilderExtensions - { - /// <summary> - /// Associates the component type with the application, - /// causing it to be displayed in the specified DOM element. - /// </summary> - /// <param name="app">The <see cref="IComponentsApplicationBuilder"/>.</param> - /// <typeparam name="TComponent">The type of the component.</typeparam> - /// <param name="domElementSelector">A CSS selector that uniquely identifies a DOM element.</param> - public static void AddComponent<TComponent>(this IComponentsApplicationBuilder app, string domElementSelector) - where TComponent : IComponent - { - app.AddComponent(typeof(TComponent), domElementSelector); - } - } -} diff --git a/src/Components/Blazor/Blazor/src/Builder/IComponentsApplicationBuilder.cs b/src/Components/Blazor/Blazor/src/Builder/IComponentsApplicationBuilder.cs deleted file mode 100644 index 84806a8769..0000000000 --- a/src/Components/Blazor/Blazor/src/Builder/IComponentsApplicationBuilder.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace Microsoft.AspNetCore.Components.Builder -{ - /// <summary> - /// A builder for adding components to an application. - /// </summary> - public interface IComponentsApplicationBuilder - { - /// <summary> - /// Gets the application services. - /// </summary> - IServiceProvider Services { get; } - - /// <summary> - /// Associates the <see cref="IComponent"/> with the application, - /// causing it to be displayed in the specified DOM element. - /// </summary> - /// <param name="componentType">The type of the component.</param> - /// <param name="domElementSelector">A CSS selector that uniquely identifies a DOM element.</param> - void AddComponent(Type componentType, string domElementSelector); - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/BlazorWebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/BlazorWebAssemblyHost.cs deleted file mode 100644 index e5631805ef..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/BlazorWebAssemblyHost.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - /// <summary> - /// Used to create an instance of Blazor host builder for a Browser application. - /// </summary> - public static class BlazorWebAssemblyHost - { - /// <summary> - /// Creates an instance of <see cref="IWebAssemblyHostBuilder"/>. - /// </summary> - /// <returns>The <see cref="IWebAssemblyHostBuilder"/>.</returns> - public static IWebAssemblyHostBuilder CreateDefaultBuilder() - { - return new WebAssemblyHostBuilder(); - } - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/ConventionBasedStartup.cs b/src/Components/Blazor/Blazor/src/Hosting/ConventionBasedStartup.cs deleted file mode 100644 index 53eecbf6e0..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/ConventionBasedStartup.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Diagnostics; -using System.Linq; -using System.Reflection; -using System.Runtime.ExceptionServices; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - // Keeping this simple for now to focus on predictable and reasonable behaviors. - // Startup in WebHost supports lots of things we don't yet support, and some we - // may never support. - // - // Possible additions: - // - environments - // - case-insensitivity (makes sense with environments) - // - // Likely never: - // - statics - // - DI into constructor - internal class ConventionBasedStartup : IBlazorStartup - { - public ConventionBasedStartup(object instance) - { - Instance = instance ?? throw new ArgumentNullException(nameof(instance)); - } - - public object Instance { get; } - - public void Configure(IComponentsApplicationBuilder app, IServiceProvider services) - { - try - { - var method = GetConfigureMethod(); - Debug.Assert(method != null); - - var parameters = method.GetParameters(); - var arguments = new object[parameters.Length]; - for (var i = 0; i < parameters.Length; i++) - { - var parameter = parameters[i]; - arguments[i] = parameter.ParameterType == typeof(IComponentsApplicationBuilder) - ? app - : services.GetRequiredService(parameter.ParameterType); - } - - method.Invoke(Instance, arguments); - } - catch (Exception ex) - { - if (ex is TargetInvocationException) - { - ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); - } - - throw; - } - } - - internal MethodInfo GetConfigureMethod() - { - var methods = Instance.GetType() - .GetMethods(BindingFlags.Instance | BindingFlags.Public) - .Where(m => string.Equals(m.Name, "Configure", StringComparison.Ordinal)) - .ToArray(); - - if (methods.Length == 1) - { - return methods[0]; - } - else if (methods.Length == 0) - { - throw new InvalidOperationException("The startup class must define a 'Configure' method."); - } - else - { - throw new InvalidOperationException("Overloading the 'Configure' method is not supported."); - } - } - - public void ConfigureServices(IServiceCollection services) - { - try - { - var method = GetConfigureServicesMethod(); - if (method != null) - { - method.Invoke(Instance, new object[] { services }); - } - } - catch (Exception ex) - { - if (ex is TargetInvocationException) - { - ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); - } - - throw; - } - } - - internal MethodInfo GetConfigureServicesMethod() - { - return Instance.GetType() - .GetMethod( - "ConfigureServices", - BindingFlags.Public | BindingFlags.Instance, - null, - new Type[] { typeof(IServiceCollection), }, - Array.Empty<ParameterModifier>()); - } - } -} \ No newline at end of file diff --git a/src/Components/Blazor/Blazor/src/Hosting/IBlazorStartup.cs b/src/Components/Blazor/Blazor/src/Hosting/IBlazorStartup.cs deleted file mode 100644 index e87138387f..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/IBlazorStartup.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - internal interface IBlazorStartup - { - void ConfigureServices(IServiceCollection services); - - void Configure(IComponentsApplicationBuilder app, IServiceProvider services); - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHost.cs deleted file mode 100644 index 8f21f93421..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHost.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - /// <summary> - /// A program abstraction. - /// </summary> - public interface IWebAssemblyHost : IDisposable - { - /// <summary> - /// The programs configured services. - /// </summary> - IServiceProvider Services { get; } - - /// <summary> - /// Start the program. - /// </summary> - /// <param name="cancellationToken">Used to abort program start.</param> - /// <returns></returns> - Task StartAsync(CancellationToken cancellationToken = default); - - /// <summary> - /// Attempts to gracefully stop the program. - /// </summary> - /// <param name="cancellationToken">Used to indicate when stop should no longer be graceful.</param> - /// <returns></returns> - Task StopAsync(CancellationToken cancellationToken = default); - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHostBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHostBuilder.cs deleted file mode 100644 index c5a52bc280..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyHostBuilder.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - /// <summary> - /// Abstraction for configuring a Blazor browser-based application. - /// </summary> - public interface IWebAssemblyHostBuilder - { - /// <summary> - /// A central location for sharing state between components during the host building process. - /// </summary> - IDictionary<object, object> Properties { get; } - - /// <summary> - /// Overrides the factory used to create the service provider. - /// </summary> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - IWebAssemblyHostBuilder UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> factory); - - /// <summary> - /// Overrides the factory used to create the service provider. - /// </summary> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - IWebAssemblyHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<WebAssemblyHostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory); - - /// <summary> - /// Adds services to the container. This can be called multiple times and the results will be additive. - /// </summary> - /// <param name="configureDelegate">The delegate for configuring the <see cref="IServiceCollection"/> that will be used - /// to construct the <see cref="IServiceProvider"/>.</param> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - IWebAssemblyHostBuilder ConfigureServices(Action<WebAssemblyHostBuilderContext, IServiceCollection> configureDelegate); - - /// <summary> - /// Run the given actions to initialize the host. This can only be called once. - /// </summary> - /// <returns>An initialized <see cref="IWebAssemblyHost"/></returns> - IWebAssemblyHost Build(); - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs b/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs deleted file mode 100644 index c790a3c879..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/IWebAssemblyServiceFactoryAdapter.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - // Equivalent to https://github.com/aspnet/Extensions/blob/master/src/Hosting/Hosting/src/Internal/IServiceFactoryAdapter.cs - - internal interface IWebAssemblyServiceFactoryAdapter - { - object CreateBuilder(IServiceCollection services); - - IServiceProvider CreateServiceProvider(object containerBuilder); - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/RootComponentMapping.cs b/src/Components/Blazor/Blazor/src/Hosting/RootComponentMapping.cs new file mode 100644 index 0000000000..53b34d8822 --- /dev/null +++ b/src/Components/Blazor/Blazor/src/Hosting/RootComponentMapping.cs @@ -0,0 +1,53 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using Microsoft.AspNetCore.Components; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + /// <summary> + /// Defines a mapping between a root <see cref="IComponent"/> and a DOM element selector. + /// </summary> + public readonly struct RootComponentMapping + { + /// <summary> + /// Creates a new instance of <see cref="RootComponentMapping"/> with the provided <paramref name="componentType"/> + /// and <paramref name="selector"/>. + /// </summary> + /// <param name="componentType">The component type. Must implement <see cref="IComponent"/>.</param> + /// <param name="selector">The DOM element selector.</param> + public RootComponentMapping(Type componentType, string selector) + { + if (componentType is null) + { + throw new ArgumentNullException(nameof(componentType)); + } + + if (!typeof(IComponent).IsAssignableFrom(componentType)) + { + throw new ArgumentException( + $"The type '{componentType.Name}' must implement {nameof(IComponent)} to be used as a root component.", + nameof(componentType)); + } + + if (selector is null) + { + throw new ArgumentNullException(nameof(selector)); + } + + ComponentType = componentType; + Selector = selector; + } + + /// <summary> + /// Gets the component type. + /// </summary> + public Type ComponentType { get; } + + /// <summary> + /// Gets the DOM element selector. + /// </summary> + public string Selector { get; } + } +} diff --git a/src/Components/Blazor/Blazor/src/Hosting/RootComponentMappingCollection.cs b/src/Components/Blazor/Blazor/src/Hosting/RootComponentMappingCollection.cs new file mode 100644 index 0000000000..0e488f0deb --- /dev/null +++ b/src/Components/Blazor/Blazor/src/Hosting/RootComponentMappingCollection.cs @@ -0,0 +1,68 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using Microsoft.AspNetCore.Components; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + /// <summary> + /// Defines a collection of <see cref="RootComponentMapping"/> items. + /// </summary> + public class RootComponentMappingCollection : Collection<RootComponentMapping> + { + /// <summary> + /// Adds a component mapping to the collection. + /// </summary> + /// <typeparam name="TComponent">The component type.</typeparam> + /// <param name="selector">The DOM element selector.</param> + public void Add<TComponent>(string selector) where TComponent : IComponent + { + if (selector is null) + { + throw new ArgumentNullException(nameof(selector)); + } + + Add(new RootComponentMapping(typeof(TComponent), selector)); + } + + /// <summary> + /// Adds a component mapping to the collection. + /// </summary> + /// <param name="componentType">The component type. Must implement <see cref="IComponent"/>.</param> + /// <param name="selector">The DOM element selector.</param> + public void Add(Type componentType, string selector) + { + if (componentType is null) + { + throw new ArgumentNullException(nameof(componentType)); + } + + if (selector is null) + { + throw new ArgumentNullException(nameof(selector)); + } + + Add(new RootComponentMapping(componentType, selector)); + } + + /// <summary> + /// Adds a collection of items to this collection. + /// </summary> + /// <param name="items">The items to add.</param> + public void AddRange(IEnumerable<RootComponentMapping> items) + { + if (items is null) + { + throw new ArgumentNullException(nameof(items)); + } + + foreach (var item in items) + { + Add(item); + } + } + } +} diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs deleted file mode 100644 index 8cb5d87561..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyBlazorApplicationBuilder.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Blazor.Rendering; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - internal class WebAssemblyBlazorApplicationBuilder : IComponentsApplicationBuilder - { - public WebAssemblyBlazorApplicationBuilder(IServiceProvider services) - { - Entries = new List<(Type componentType, string domElementSelector)>(); - Services = services; - } - - public List<(Type componentType, string domElementSelector)> Entries { get; } - - public IServiceProvider Services { get; } - - public void AddComponent(Type componentType, string domElementSelector) - { - if (componentType == null) - { - throw new ArgumentNullException(nameof(componentType)); - } - - if (domElementSelector == null) - { - throw new ArgumentNullException(nameof(domElementSelector)); - } - - Entries.Add((componentType, domElementSelector)); - } - - public async Task<WebAssemblyRenderer> CreateRendererAsync() - { - var loggerFactory = (ILoggerFactory)Services.GetService(typeof(ILoggerFactory)); - var renderer = new WebAssemblyRenderer(Services, loggerFactory); - for (var i = 0; i < Entries.Count; i++) - { - var (componentType, domElementSelector) = Entries[i]; - await renderer.AddComponentAsync(componentType, domElementSelector); - } - - return renderer; - } - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs index b90878fdde..02c2693ff7 100644 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs +++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHost.cs @@ -5,94 +5,135 @@ using System; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Blazor.Rendering; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.JSInterop; +using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Blazor.Hosting { - internal class WebAssemblyHost : IWebAssemblyHost + /// <summary> + /// A host object for Blazor running under WebAssembly. Use <see cref="WebAssemblyHostBuilder"/> + /// to initialize a <see cref="WebAssemblyHost"/>. + /// </summary> + public sealed class WebAssemblyHost : IAsyncDisposable { - private readonly IJSRuntime _runtime; + private readonly IServiceScope _scope; + private readonly IServiceProvider _services; + private readonly IConfiguration _configuration; + private readonly RootComponentMapping[] _rootComponents; - private IServiceScope _scope; + // NOTE: the host is disposable because it OWNs references to disposable things. + // + // The twist is that in general dispose is not going to run even if the user puts it in a using. + // When a user refreshes or navigates away that terminates the app, like a process.exit. So the + // dispose functionality here is basically so that it can be used in unit tests. + // + // Based on the APIs that exist in Blazor today it's not possible for the + // app to get disposed, however if we add something like that in the future, most of the work is + // already done. + private bool _disposed; + private bool _started; private WebAssemblyRenderer _renderer; - public WebAssemblyHost(IServiceProvider services, IJSRuntime runtime) + internal WebAssemblyHost(IServiceProvider services, IServiceScope scope, IConfiguration configuration, RootComponentMapping[] rootComponents) { // To ensure JS-invoked methods don't get linked out, have a reference to their enclosing types GC.KeepAlive(typeof(EntrypointInvoker)); GC.KeepAlive(typeof(JSInteropMethods)); GC.KeepAlive(typeof(WebAssemblyEventDispatcher)); - Services = services ?? throw new ArgumentNullException(nameof(services)); - _runtime = runtime ?? throw new ArgumentNullException(nameof(runtime)); + _services = services; + _scope = scope; + _configuration = configuration; + _rootComponents = rootComponents; } - public IServiceProvider Services { get; } + /// <summary> + /// Gets the application configuration. + /// </summary> + public IConfiguration Configuration => _configuration; - public Task StartAsync(CancellationToken cancellationToken = default) + /// <summary> + /// Gets the service provider associated with the application. + /// </summary> + public IServiceProvider Services => _scope.ServiceProvider; + + /// <summary> + /// Disposes the host asynchronously. + /// </summary> + /// <returns>A <see cref="ValueTask"/> which respresents the completion of disposal.</returns> + public async ValueTask DisposeAsync() { - return StartAsyncAwaited(); - } - - private async Task StartAsyncAwaited() - { - var scopeFactory = Services.GetRequiredService<IServiceScopeFactory>(); - _scope = scopeFactory.CreateScope(); - - try + if (_disposed) { - var startup = _scope.ServiceProvider.GetService<IBlazorStartup>(); - if (startup == null) + return; + } + + _disposed = true; + + _renderer?.Dispose(); + + if (_scope is IAsyncDisposable asyncDisposableScope) + { + await asyncDisposableScope.DisposeAsync(); + } + else + { + _scope?.Dispose(); + } + + if (_services is IAsyncDisposable asyncDisposableServices) + { + await asyncDisposableServices.DisposeAsync(); + } + else if (_services is IDisposable disposableServices) + { + disposableServices.Dispose(); + } + } + + /// <summary> + /// Runs the application associated with this host. + /// </summary> + /// <returns>A <see cref="Task"/> which represents exit of the application.</returns> + /// <remarks> + /// At this time, it's not possible to shut down a Blazor WebAssembly application using imperative code. + /// The application only stops when the hosting page is reloaded or navigated to another page. As a result + /// the task returned from this method does not complete. This method is not suitable for use in unit-testing. + /// </remarks> + public Task RunAsync() + { + // RunAsyncCore will await until the CancellationToken fires. However, we don't fire it + // currently, so the app will "run" forever. + return RunAsyncCore(CancellationToken.None); + } + + // Internal for testing. + internal async Task RunAsyncCore(CancellationToken cancellationToken) + { + if (_started) + { + throw new InvalidOperationException("The host has already started."); + } + + _started = true; + + var tcs = new TaskCompletionSource<object>(); + + using (cancellationToken.Register(() => { tcs.TrySetResult(null); })) + { + var loggerFactory = Services.GetRequiredService<ILoggerFactory>(); + _renderer = new WebAssemblyRenderer(Services, loggerFactory); + + var rootComponents = _rootComponents; + for (var i = 0; i < rootComponents.Length; i++) { - var message = - $"Could not find a registered Blazor Startup class. " + - $"Using {nameof(IWebAssemblyHost)} requires a call to {nameof(IWebAssemblyHostBuilder)}.UseBlazorStartup."; - throw new InvalidOperationException(message); + var rootComponent = rootComponents[i]; + await _renderer.AddComponentAsync(rootComponent.ComponentType, rootComponent.Selector); } - // Note that we differ from the WebHost startup path here by using a 'scope' for the app builder - // as well as the Configure method. - var builder = new WebAssemblyBlazorApplicationBuilder(_scope.ServiceProvider); - startup.Configure(builder, _scope.ServiceProvider); - - _renderer = await builder.CreateRendererAsync(); + await tcs.Task; } - catch - { - _scope.Dispose(); - _scope = null; - - if (_renderer != null) - { - _renderer.Dispose(); - _renderer = null; - } - - throw; - } - } - - public Task StopAsync(CancellationToken cancellationToken = default) - { - if (_scope != null) - { - _scope.Dispose(); - _scope = null; - } - - if (_renderer != null) - { - _renderer.Dispose(); - _renderer = null; - } - - return Task.CompletedTask; - } - - public void Dispose() - { - (Services as IDisposable)?.Dispose(); } } } diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs index 7fa4dd0ae1..1d1f05dce7 100644 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs +++ b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilder.cs @@ -3,10 +3,12 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Net.Http; using Microsoft.AspNetCore.Blazor.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Routing; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Logging; @@ -14,87 +16,89 @@ using Microsoft.JSInterop; namespace Microsoft.AspNetCore.Blazor.Hosting { - // - // This code was taken virtually as-is from the Microsoft.Extensions.Hosting project in aspnet/Hosting and then - // lots of things were removed. - // - internal class WebAssemblyHostBuilder : IWebAssemblyHostBuilder + /// <summary> + /// A builder for configuring and creating a <see cref="WebAssemblyHost"/>. + /// </summary> + public sealed class WebAssemblyHostBuilder { - private List<Action<WebAssemblyHostBuilderContext, IServiceCollection>> _configureServicesActions = new List<Action<WebAssemblyHostBuilderContext, IServiceCollection>>(); - private bool _hostBuilt; - private WebAssemblyHostBuilderContext _BrowserHostBuilderContext; - private IWebAssemblyServiceFactoryAdapter _serviceProviderFactory = new WebAssemblyServiceFactoryAdapter<IServiceCollection>(new DefaultServiceProviderFactory()); - private IServiceProvider _appServices; - /// <summary> - /// A central location for sharing state between components during the host building process. + /// Creates an instance of <see cref="WebAssemblyHostBuilder"/> using the most common + /// conventions and settings. /// </summary> - public IDictionary<object, object> Properties { get; } = new Dictionary<object, object>(); - - /// <summary> - /// Adds services to the container. This can be called multiple times and the results will be additive. - /// </summary> - /// <param name="configureDelegate"></param> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - public IWebAssemblyHostBuilder ConfigureServices(Action<WebAssemblyHostBuilderContext, IServiceCollection> configureDelegate) + /// <param name="args">The argument passed to the application's main method.</param> + /// <returns>A <see cref="WebAssemblyHostBuilder"/>.</returns> + public static WebAssemblyHostBuilder CreateDefault(string[] args = default) { - _configureServicesActions.Add(configureDelegate ?? throw new ArgumentNullException(nameof(configureDelegate))); - return this; + // We don't use the args for anything right now, but we want to accept them + // here so that it shows up this way in the project templates. + args ??= Array.Empty<string>(); + var builder = new WebAssemblyHostBuilder(); + + // Right now we don't have conventions or behaviors that are specific to this method + // however, making this the default for the template allows us to add things like that + // in the future, while giving `new WebAssemblyHostBuilder` as an opt-out of opinionated + // settings. + return builder; } /// <summary> - /// Overrides the factory used to create the service provider. + /// Creates an instance of <see cref="WebAssemblyHostBuilder"/> with the minimal configuration. /// </summary> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - public IWebAssemblyHostBuilder UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> factory) + private WebAssemblyHostBuilder() { - _serviceProviderFactory = new WebAssemblyServiceFactoryAdapter<TContainerBuilder>(factory ?? throw new ArgumentNullException(nameof(factory))); - return this; + // Private right now because we don't have much reason to expose it. This can be exposed + // in the future if we want to give people a choice between CreateDefault and something + // less opinionated. + Configuration = new ConfigurationBuilder(); + RootComponents = new RootComponentMappingCollection(); + Services = new ServiceCollection(); + + InitializeDefaultServices(); } /// <summary> - /// Overrides the factory used to create the service provider. + /// Gets an <see cref="IConfigurationBuilder"/> that can be used to customize the application's + /// configuration sources. /// </summary> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - public IWebAssemblyHostBuilder UseServiceProviderFactory<TContainerBuilder>(Func<WebAssemblyHostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factory) - { - _serviceProviderFactory = new WebAssemblyServiceFactoryAdapter<TContainerBuilder>(() => _BrowserHostBuilderContext, factory ?? throw new ArgumentNullException(nameof(factory))); - return this; - } + public IConfigurationBuilder Configuration { get; } /// <summary> - /// Run the given actions to initialize the host. This can only be called once. + /// Gets the collection of root component mappings configured for the application. /// </summary> - /// <returns>An initialized <see cref="IWebAssemblyHost"/></returns> - public IWebAssemblyHost Build() + public RootComponentMappingCollection RootComponents { get; } + + /// <summary> + /// Gets the service collection. + /// </summary> + public IServiceCollection Services { get; } + + /// <summary> + /// Builds a <see cref="WebAssemblyHost"/> instance based on the configuration of this builder. + /// </summary> + /// <returns>A <see cref="WebAssemblyHost"/> object.</returns> + public WebAssemblyHost Build() { - if (_hostBuilt) - { - throw new InvalidOperationException("Build can only be called once."); - } - _hostBuilt = true; + // Intentionally overwrite configuration with the one we're creating. + var configuration = Configuration.Build(); + Services.AddSingleton<IConfiguration>(configuration); - CreateBrowserHostBuilderContext(); - CreateServiceProvider(); + // A Blazor application always runs in a scope. Since we want to make it possible for the user + // to configure services inside *that scope* inside their startup code, we create *both* the + // service provider and the scope here. + var services = Services.BuildServiceProvider(); + var scope = services.GetRequiredService<IServiceScopeFactory>().CreateScope(); - return _appServices.GetRequiredService<IWebAssemblyHost>(); + return new WebAssemblyHost(services, scope, configuration, RootComponents.ToArray()); } - private void CreateBrowserHostBuilderContext() + private void InitializeDefaultServices() { - _BrowserHostBuilderContext = new WebAssemblyHostBuilderContext(Properties); - } - - private void CreateServiceProvider() - { - var services = new ServiceCollection(); - services.AddSingleton(_BrowserHostBuilderContext); - services.AddSingleton<IWebAssemblyHost, WebAssemblyHost>(); - services.AddSingleton<IJSRuntime>(WebAssemblyJSRuntime.Instance); - services.AddSingleton<NavigationManager>(WebAssemblyNavigationManager.Instance); - services.AddSingleton<INavigationInterception>(WebAssemblyNavigationInterception.Instance); - services.AddSingleton<ILoggerFactory, WebAssemblyLoggerFactory>(); - services.AddSingleton<HttpClient>(s => + Services.AddSingleton<IJSRuntime>(WebAssemblyJSRuntime.Instance); + Services.AddSingleton<NavigationManager>(WebAssemblyNavigationManager.Instance); + Services.AddSingleton<INavigationInterception>(WebAssemblyNavigationInterception.Instance); + Services.AddSingleton<ILoggerFactory, WebAssemblyLoggerFactory>(); + Services.TryAdd(ServiceDescriptor.Singleton(typeof(ILogger<>), typeof(WebAssemblyConsoleLogger<>))); + Services.AddSingleton<HttpClient>(s => { // Creating the URI helper needs to wait until the JS Runtime is initialized, so defer it. var navigationManager = s.GetRequiredService<NavigationManager>(); @@ -103,20 +107,6 @@ namespace Microsoft.AspNetCore.Blazor.Hosting BaseAddress = new Uri(navigationManager.BaseUri) }; }); - - // Needed for authorization - // However, since authorization isn't on by default, we could consider removing these and - // having a separate services.AddBlazorAuthorization() call that brings in the required services. - services.AddOptions(); - services.TryAdd(ServiceDescriptor.Singleton(typeof(ILogger<>), typeof(WebAssemblyConsoleLogger<>))); - - foreach (var configureServicesAction in _configureServicesActions) - { - configureServicesAction(_BrowserHostBuilderContext, services); - } - - var builder = _serviceProviderFactory.CreateBuilder(services); - _appServices = _serviceProviderFactory.CreateServiceProvider(builder); } } } diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderContext.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderContext.cs deleted file mode 100644 index c7b7dd6f19..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderContext.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Generic; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - /// <summary> - /// Context containing the common services on the <see cref="IWebAssemblyHost" />. Some properties may be null until set by the <see cref="IWebAssemblyHost" />. - /// </summary> - public sealed class WebAssemblyHostBuilderContext - { - /// <summary> - /// Creates a new <see cref="WebAssemblyHostBuilderContext" />. - /// </summary> - /// <param name="properties">The property collection.</param> - public WebAssemblyHostBuilderContext(IDictionary<object, object> properties) - { - Properties = properties ?? throw new System.ArgumentNullException(nameof(properties)); - } - - /// <summary> - /// A central location for sharing state between components during the host building process. - /// </summary> - public IDictionary<object, object> Properties { get; } - } -} \ No newline at end of file diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderExtensions.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderExtensions.cs deleted file mode 100644 index 9b03c09766..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostBuilderExtensions.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - /// <summary> - /// Provides Blazor-specific support for <see cref="IWebAssemblyHost"/>. - /// </summary> - public static class WebAssemblyHostBuilderExtensions - { - private const string BlazorStartupKey = "Blazor.Startup"; - - /// <summary> - /// Adds services to the container. This can be called multiple times and the results will be additive. - /// </summary> - /// <param name="hostBuilder">The <see cref="IWebAssemblyHostBuilder" /> to configure.</param> - /// <param name="configureDelegate"></param> - /// <returns>The same instance of the <see cref="IWebAssemblyHostBuilder"/> for chaining.</returns> - public static IWebAssemblyHostBuilder ConfigureServices(this IWebAssemblyHostBuilder hostBuilder, Action<IServiceCollection> configureDelegate) - { - return hostBuilder.ConfigureServices((context, collection) => configureDelegate(collection)); - } - - /// <summary> - /// Configures the <see cref="IWebAssemblyHostBuilder"/> to use the provided startup class. - /// </summary> - /// <param name="builder">The <see cref="IWebAssemblyHostBuilder"/>.</param> - /// <param name="startupType">A type that configures a Blazor application.</param> - /// <returns>The <see cref="IWebAssemblyHostBuilder"/>.</returns> - public static IWebAssemblyHostBuilder UseBlazorStartup(this IWebAssemblyHostBuilder builder, Type startupType) - { - if (builder == null) - { - throw new ArgumentNullException(nameof(builder)); - } - - if (builder.Properties.ContainsKey(BlazorStartupKey)) - { - throw new InvalidOperationException("A startup class has already been registered."); - } - - // It would complicate the implementation to allow multiple startup classes, and we don't - // really have a need for it. - builder.Properties.Add(BlazorStartupKey, bool.TrueString); - - var startup = new ConventionBasedStartup(Activator.CreateInstance(startupType)); - - builder.ConfigureServices(startup.ConfigureServices); - builder.ConfigureServices(s => s.AddSingleton<IBlazorStartup>(startup)); - - return builder; - } - - /// <summary> - /// Configures the <see cref="IWebAssemblyHostBuilder"/> to use the provided startup class. - /// </summary> - /// <typeparam name="TStartup">A type that configures a Blazor application.</typeparam> - /// <param name="builder">The <see cref="IWebAssemblyHostBuilder"/>.</param> - /// <returns>The <see cref="IWebAssemblyHostBuilder"/>.</returns> - public static IWebAssemblyHostBuilder UseBlazorStartup<TStartup>(this IWebAssemblyHostBuilder builder) - { - if (builder == null) - { - throw new ArgumentNullException(nameof(builder)); - } - - return UseBlazorStartup(builder, typeof(TStartup)); - } - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs deleted file mode 100644 index d08162a590..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyHostExtensions.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - /// <summary> - /// Extension methods for <see cref="IWebAssemblyHost"/>. - /// </summary> - public static class WebAssemblyHostExtensions - { - /// <summary> - /// Runs the application. - /// </summary> - /// <param name="host">The <see cref="IWebAssemblyHost"/> to run.</param> - /// <remarks> - /// Currently, Blazor applications running in the browser don't have a lifecycle - the application does not - /// get a chance to gracefully shut down. For now, <see cref="Run(IWebAssemblyHost)"/> simply starts the host - /// and allows execution to continue. - /// </remarks> - public static void Run(this IWebAssemblyHost host) - { - // Behave like async void, because we don't yet support async-main properly on WebAssembly. - // However, don't actualy make this method async, because we rely on startup being synchronous - // for things like attaching navigation event handlers. - host.StartAsync().ContinueWith(task => - { - if (task.Exception != null) - { - Console.WriteLine(task.Exception); - } - }); - } - } -} diff --git a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs b/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs deleted file mode 100644 index fcc879653a..0000000000 --- a/src/Components/Blazor/Blazor/src/Hosting/WebAssemblyServiceFactoryAdapter.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNetCore.Blazor.Hosting -{ - // Equivalent to https://github.com/aspnet/Extensions/blob/master/src/Hosting/Hosting/src/Internal/ServiceFactoryAdapter.cs - - internal class WebAssemblyServiceFactoryAdapter<TContainerBuilder> : IWebAssemblyServiceFactoryAdapter - { - private IServiceProviderFactory<TContainerBuilder> _serviceProviderFactory; - private readonly Func<WebAssemblyHostBuilderContext> _contextResolver; - private Func<WebAssemblyHostBuilderContext, IServiceProviderFactory<TContainerBuilder>> _factoryResolver; - - public WebAssemblyServiceFactoryAdapter(IServiceProviderFactory<TContainerBuilder> serviceProviderFactory) - { - _serviceProviderFactory = serviceProviderFactory ?? throw new ArgumentNullException(nameof(serviceProviderFactory)); - } - - public WebAssemblyServiceFactoryAdapter(Func<WebAssemblyHostBuilderContext> contextResolver, Func<WebAssemblyHostBuilderContext, IServiceProviderFactory<TContainerBuilder>> factoryResolver) - { - _contextResolver = contextResolver ?? throw new ArgumentNullException(nameof(contextResolver)); - _factoryResolver = factoryResolver ?? throw new ArgumentNullException(nameof(factoryResolver)); - } - - public object CreateBuilder(IServiceCollection services) - { - if (_serviceProviderFactory == null) - { - _serviceProviderFactory = _factoryResolver(_contextResolver()); - - if (_serviceProviderFactory == null) - { - throw new InvalidOperationException("The resolver returned a null IServiceProviderFactory"); - } - } - return _serviceProviderFactory.CreateBuilder(services); - } - - public IServiceProvider CreateServiceProvider(object containerBuilder) - { - if (_serviceProviderFactory == null) - { - throw new InvalidOperationException("CreateBuilder must be called before CreateServiceProvider"); - } - - return _serviceProviderFactory.CreateServiceProvider((TContainerBuilder)containerBuilder); - } - } -} diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj index be94e420a2..ff30d9d9c8 100644 --- a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.1</TargetFramework> @@ -9,7 +9,7 @@ <ItemGroup> <Reference Include="Mono.WebAssembly.Interop" /> <Reference Include="Microsoft.AspNetCore.Components.Web" /> - <Reference Include="Microsoft.Extensions.Options" /> + <Reference Include="Microsoft.Extensions.Configuration" /> </ItemGroup> <ItemGroup> diff --git a/src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs b/src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs deleted file mode 100644 index cbc73b79f8..0000000000 --- a/src/Components/Blazor/Blazor/test/Hosting/ConventionBasedStartupTest.cs +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using Microsoft.AspNetCore.Blazor.Hosting; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; -using Xunit; - -namespace Microsoft.AspNetCore.Components.Hosting -{ - public class ConventionBasedStartupTest - { - [Fact] - public void ConventionBasedStartup_GetConfigureServicesMethod_FindsConfigureServices() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup1()); - - // Act - var method = startup.GetConfigureServicesMethod(); - - // Assert - Assert.Equal(typeof(IServiceCollection), method.GetParameters()[0].ParameterType); - } - - private class MyStartup1 - { - public void ConfigureServices(IServiceCollection services) - { - } - - // Ignored - public void ConfigureServices(DateTime x) - { - - } - - // Ignored - private void ConfigureServices(int x) - { - } - - // Ignored - public static void ConfigureServices(string x) - { - } - } - - [Fact] - public void ConventionBasedStartup_GetConfigureServicesMethod_NoMethodFound() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup2()); - - // Act - var method = startup.GetConfigureServicesMethod(); - - // Assert - Assert.Null(method); - } - - private class MyStartup2 - { - } - - [Fact] - public void ConventionBasedStartup_ConfigureServices_CallsMethod() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup3()); - var services = new ServiceCollection(); - - // Act - startup.ConfigureServices(services); - - // Assert - Assert.NotEmpty(services); - } - - private class MyStartup3 - { - public void ConfigureServices(IServiceCollection services) - { - services.AddSingleton("foo"); - } - } - - [Fact] - public void ConventionBasedStartup_ConfigureServices_NoMethodFound() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup4()); - var services = new ServiceCollection(); - - // Act - startup.ConfigureServices(services); - - // Assert - Assert.Empty(services); - } - - private class MyStartup4 - { - } - - [Fact] - public void ConventionBasedStartup_GetConfigureMethod_FindsConfigure() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup5()); - - // Act - var method = startup.GetConfigureMethod(); - - // Assert - Assert.Empty(method.GetParameters()); - } - - private class MyStartup5 - { - public void Configure() - { - } - - // Ignored - private void Configure(int x) - { - } - - // Ignored - public static void Configure(string x) - { - } - } - - [Fact] - public void ConventionBasedStartup_GetConfigureMethod_NoMethodFoundThrows() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup6()); - - // Act - var ex = Assert.Throws<InvalidOperationException>(() => startup.GetConfigureMethod()); - - // Assert - Assert.Equal("The startup class must define a 'Configure' method.", ex.Message); - } - - private class MyStartup6 - { - } - - [Fact] - public void ConventionBasedStartup_GetConfigureMethod_OverloadedThrows() - { - // Arrange - var startup = new ConventionBasedStartup(new MyStartup7()); - - // Act - var ex = Assert.Throws<InvalidOperationException>(() => startup.GetConfigureMethod()); - - // Assert - Assert.Equal("Overloading the 'Configure' method is not supported.", ex.Message); - } - - private class MyStartup7 - { - public void Configure() - { - } - - public void Configure(string x) - { - } - } - - [Fact] - public void ConventionBasedStartup_Configure() - { - // Arrange - var instance = new MyStartup8(); - var startup = new ConventionBasedStartup(instance); - - var services = new ServiceCollection().AddSingleton("foo").BuildServiceProvider(); - var builder = new WebAssemblyBlazorApplicationBuilder(services); - - // Act - startup.Configure(builder, services); - - // Assert - Assert.Collection( - instance.Arguments, - a => Assert.Same(builder, a), - a => Assert.Equal("foo", a)); - } - - private class MyStartup8 - { - public List<object> Arguments { get; } = new List<object>(); - - public void Configure(IComponentsApplicationBuilder app, string foo) - { - Arguments.Add(app); - Arguments.Add(foo); - } - } - } -} diff --git a/src/Components/Blazor/Blazor/test/Hosting/RootComponentMappingTest.cs b/src/Components/Blazor/Blazor/test/Hosting/RootComponentMappingTest.cs new file mode 100644 index 0000000000..7249402880 --- /dev/null +++ b/src/Components/Blazor/Blazor/test/Hosting/RootComponentMappingTest.cs @@ -0,0 +1,37 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + + +using System; +using System.Text; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Testing; +using Xunit; + +namespace Microsoft.AspNetCore.Blazor.Hosting +{ + public class RootComponentMappingTest + { + [Fact] + public void Constructor_ValidatesComponentType_Success() + { + // Arrange + // Act + var mapping = new RootComponentMapping(typeof(Router), "test"); + + // Assert (does not throw) + GC.KeepAlive(mapping); + } + + [Fact] + public void Constructor_ValidatesComponentType_Failure() + { + // Arrange + // Act & Assert + ExceptionAssert.ThrowsArgument( + () => new RootComponentMapping(typeof(StringBuilder), "test"), + "componentType", + $"The type '{nameof(StringBuilder)}' must implement IComponent to be used as a root component."); + } + } +} diff --git a/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs index 4acf6f99a3..77b6583d26 100644 --- a/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs +++ b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostBuilderTest.cs @@ -3,160 +3,100 @@ using System; using System.Collections.Generic; +using System.Net.Http; using System.Text; +using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using Microsoft.JSInterop; using Xunit; -namespace Microsoft.AspNetCore.Blazor.Hosting.Test +namespace Microsoft.AspNetCore.Blazor.Hosting { public class WebAssemblyHostBuilderTest { [Fact] - public void HostBuilder_CanCallBuild_BuildsServices() + public void Build_AllowsConfiguringConfiguration() { // Arrange - var builder = new WebAssemblyHostBuilder(); + var builder = WebAssemblyHostBuilder.CreateDefault(); - // Act - var host = builder.Build(); - - // Assert - Assert.NotNull(host.Services.GetService(typeof(IWebAssemblyHost))); - } - - [Fact] - public void HostBuilder_CanConfigureAdditionalServices() - { - // Arrange - var builder = new WebAssemblyHostBuilder(); - builder.ConfigureServices((c, s) => s.AddSingleton<string>("foo")); - builder.ConfigureServices((c, s) => s.AddSingleton<StringBuilder>(new StringBuilder("bar"))); - - // Act - var host = builder.Build(); - - // Assert - Assert.Equal("foo", host.Services.GetService(typeof(string))); - Assert.Equal("bar", host.Services.GetService(typeof(StringBuilder)).ToString()); - } - - [Fact] - public void HostBuilder_UseBlazorStartup_CanConfigureAdditionalServices() - { - // Arrange - var builder = new WebAssemblyHostBuilder(); - builder.UseBlazorStartup<MyStartup>(); - builder.ConfigureServices((c, s) => s.AddSingleton<StringBuilder>(new StringBuilder("bar"))); - - // Act - var host = builder.Build(); - - // Assert - Assert.Equal("foo", host.Services.GetService(typeof(string))); - Assert.Equal("bar", host.Services.GetService(typeof(StringBuilder)).ToString()); - } - - [Fact] - public void HostBuilder_UseBlazorStartup_DoesNotAllowMultiple() - { - // Arrange - var builder = new WebAssemblyHostBuilder(); - builder.UseBlazorStartup<MyStartup>(); - - // Act - var ex = Assert.Throws<InvalidOperationException>(() => builder.UseBlazorStartup<MyStartup>()); - - // Assert - Assert.Equal("A startup class has already been registered.", ex.Message); - } - - private class MyStartup - { - public void ConfigureServices(IServiceCollection services) + builder.Configuration.AddInMemoryCollection(new[] { - services.AddSingleton<string>("foo"); - } - } - - [Fact] - public void HostBuilder_CanCustomizeServiceFactory() - { - // Arrange - var builder = new WebAssemblyHostBuilder(); - builder.UseServiceProviderFactory(new TestServiceProviderFactory()); - - // Act - var host = builder.Build(); - - // Assert - Assert.IsType<TestServiceProvider>(host.Services); - } - - [Fact] - public void HostBuilder_CanCustomizeServiceFactoryWithContext() - { - // Arrange - var builder = new WebAssemblyHostBuilder(); - builder.UseServiceProviderFactory(context => - { - Assert.NotNull(context.Properties); - Assert.Same(builder.Properties, context.Properties); - return new TestServiceProviderFactory(); + new KeyValuePair<string, string>("key", "value"), }); // Act var host = builder.Build(); // Assert - Assert.IsType<TestServiceProvider>(host.Services); + Assert.Equal("value", host.Configuration["key"]); } - private class TestServiceProvider : IServiceProvider + [Fact] + public void Build_AllowsConfiguringServices() { - private readonly IServiceProvider _underlyingProvider; + // Arrange + var builder = WebAssemblyHostBuilder.CreateDefault(); - public TestServiceProvider(IServiceProvider underlyingProvider) - { - _underlyingProvider = underlyingProvider; - } + // This test also verifies that we create a scope. + builder.Services.AddScoped<StringBuilder>(); - public object GetService(Type serviceType) + // Act + var host = builder.Build(); + + // Assert + Assert.NotNull(host.Services.GetRequiredService<StringBuilder>()); + } + + [Fact] + public void Build_AddsConfigurationToServices() + { + // Arrange + var builder = WebAssemblyHostBuilder.CreateDefault(); + + builder.Configuration.AddInMemoryCollection(new[] { - if (serviceType == typeof(IWebAssemblyHost)) + new KeyValuePair<string, string>("key", "value"), + }); + + // Act + var host = builder.Build(); + + // Assert + var configuration = host.Services.GetRequiredService<IConfiguration>(); + Assert.Equal("value", configuration["key"]); + } + + private static IReadOnlyList<Type> DefaultServiceTypes + { + get + { + return new Type[] { - // Since the test will make assertions about the resulting IWebAssemblyHost, - // show that custom DI containers have the power to substitute themselves - // as the IServiceProvider - return new WebAssemblyHost( - this, _underlyingProvider.GetRequiredService<IJSRuntime>()); - } - else - { - return _underlyingProvider.GetService(serviceType); - } + typeof(IJSRuntime), + typeof(NavigationManager), + typeof(INavigationInterception), + typeof(ILoggerFactory), + typeof(HttpClient), + typeof(ILogger<>), + }; } } - private class TestServiceProviderFactory : IServiceProviderFactory<IServiceCollection> + [Fact] + public void Constructor_AddsDefaultServices() { - public IServiceCollection CreateBuilder(IServiceCollection services) - { - return new TestServiceCollection(services); - } + // Arrange & Act + var builder = WebAssemblyHostBuilder.CreateDefault(); - public IServiceProvider CreateServiceProvider(IServiceCollection serviceCollection) + // Assert + Assert.Equal(DefaultServiceTypes.Count, builder.Services.Count); + foreach (var type in DefaultServiceTypes) { - Assert.IsType<TestServiceCollection>(serviceCollection); - return new TestServiceProvider(serviceCollection.BuildServiceProvider()); - } - - class TestServiceCollection : List<ServiceDescriptor>, IServiceCollection - { - public TestServiceCollection(IEnumerable<ServiceDescriptor> collection) - : base(collection) - { - } + Assert.Single(builder.Services, d => d.ServiceType == type); } } } diff --git a/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs index f99245e317..b838334566 100644 --- a/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs +++ b/src/Components/Blazor/Blazor/test/Hosting/WebAssemblyHostTest.cs @@ -2,64 +2,89 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.AspNetCore.Components.Hosting; +using Microsoft.AspNetCore.Testing; using Microsoft.Extensions.DependencyInjection; -using Microsoft.JSInterop; -using Mono.WebAssembly.Interop; using Xunit; -namespace Microsoft.AspNetCore.Blazor.Hosting.Test +namespace Microsoft.AspNetCore.Blazor.Hosting { public class WebAssemblyHostTest { - [Fact] - public async Task BrowserHost_StartAsync_ThrowsWithoutStartup() + // This won't happen in the product code, but we need to be able to safely call RunAsync + // to be able to test a few of the other details. + [Fact] + public async Task RunAsync_CanExitBasedOnCancellationToken() { // Arrange - var builder = new WebAssemblyHostBuilder(); + var builder = WebAssemblyHostBuilder.CreateDefault(); var host = builder.Build(); - // Act - var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await host.StartAsync()); + var cts = new CancellationTokenSource(); - // Assert - Assert.Equal( - "Could not find a registered Blazor Startup class. " + - "Using IWebAssemblyHost requires a call to IWebAssemblyHostBuilder.UseBlazorStartup.", - ex.Message); + // Act + var task = host.RunAsyncCore(cts.Token); + + cts.Cancel(); + await task.TimeoutAfter(TimeSpan.FromSeconds(3)); + + // Assert (does not throw) } [Fact] - public async Task BrowserHost_StartAsync_RunsConfigureMethod() + public async Task RunAsync_CallingTwiceCausesException() { // Arrange - var builder = new WebAssemblyHostBuilder(); - - var startup = new MockStartup(); - builder.ConfigureServices((c, s) => { s.AddSingleton<IBlazorStartup>(startup); }); - + var builder = WebAssemblyHostBuilder.CreateDefault(); var host = builder.Build(); + var cts = new CancellationTokenSource(); + var task = host.RunAsyncCore(cts.Token); + // Act - await host.StartAsync(); + var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => host.RunAsyncCore(cts.Token)); + + cts.Cancel(); + await task.TimeoutAfter(TimeSpan.FromSeconds(3)); // Assert - Assert.True(startup.ConfigureCalled); + Assert.Equal("The host has already started.", ex.Message); } - private class MockStartup : IBlazorStartup + [Fact] + public async Task DisposeAsync_CanDisposeAfterCallingRunAsync() { - public bool ConfigureCalled { get; set; } + // Arrange + var builder = WebAssemblyHostBuilder.CreateDefault(); + builder.Services.AddSingleton<DisposableService>(); + var host = builder.Build(); - public void Configure(IComponentsApplicationBuilder app, IServiceProvider services) + var disposable = host.Services.GetRequiredService<DisposableService>(); + + var cts = new CancellationTokenSource(); + + // Act + await using (host) { - ConfigureCalled = true; + var task = host.RunAsyncCore(cts.Token); + + cts.Cancel(); + await task.TimeoutAfter(TimeSpan.FromSeconds(3)); } - public void ConfigureServices(IServiceCollection services) + // Assert + Assert.Equal(1, disposable.DisposeCount); + } + + private class DisposableService : IAsyncDisposable + { + public int DisposeCount { get; private set; } + + public ValueTask DisposeAsync() { + DisposeCount++; + return new ValueTask(Task.CompletedTask); } } } diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/Program.cs b/src/Components/Blazor/testassets/HostedInAspNet.Client/Program.cs index 69ee439533..e922c2996f 100644 --- a/src/Components/Blazor/testassets/HostedInAspNet.Client/Program.cs +++ b/src/Components/Blazor/testassets/HostedInAspNet.Client/Program.cs @@ -1,19 +1,19 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Threading.Tasks; using Microsoft.AspNetCore.Blazor.Hosting; namespace HostedInAspNet.Client { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add<Home>("app"); - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup<Startup>(); + await builder.Build().RunAsync(); + } } } diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/Startup.cs b/src/Components/Blazor/testassets/HostedInAspNet.Client/Startup.cs deleted file mode 100644 index a06163b9e0..0000000000 --- a/src/Components/Blazor/testassets/HostedInAspNet.Client/Startup.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace HostedInAspNet.Client -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent<Home>("app"); - } - } -} diff --git a/src/Components/Blazor/testassets/StandaloneApp/Program.cs b/src/Components/Blazor/testassets/StandaloneApp/Program.cs index 530de72870..8da14834b6 100644 --- a/src/Components/Blazor/testassets/StandaloneApp/Program.cs +++ b/src/Components/Blazor/testassets/StandaloneApp/Program.cs @@ -1,19 +1,19 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Threading.Tasks; using Microsoft.AspNetCore.Blazor.Hosting; namespace StandaloneApp { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add<App>("app"); - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup<Startup>(); + await builder.Build().RunAsync(); + } } } diff --git a/src/Components/Blazor/testassets/StandaloneApp/Startup.cs b/src/Components/Blazor/testassets/StandaloneApp/Startup.cs deleted file mode 100644 index 79564e8d9d..0000000000 --- a/src/Components/Blazor/testassets/StandaloneApp/Startup.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace StandaloneApp -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent<App>("app"); - } - } -} diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index 0d74c8c6b7..6a721adf63 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -100,7 +100,7 @@ namespace Wasm.Performance.Driver Format = "n2", }); - var testAssembly = typeof(TestApp.Startup).Assembly; + var testAssembly = typeof(TestApp.Program).Assembly; var testAssemblyLocation = new FileInfo(testAssembly.Location); var testApp = new DirectoryInfo(Path.Combine( testAssemblyLocation.Directory.FullName, @@ -143,7 +143,7 @@ namespace Wasm.Performance.Driver var args = new[] { "--urls", "http://127.0.0.1:0", - "--applicationpath", typeof(TestApp.Startup).Assembly.Location, + "--applicationpath", typeof(TestApp.Program).Assembly.Location, }; var host = DevHostServerProgram.BuildWebHost(args); diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs index 403bc37c9c..57a3697382 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Program.cs @@ -1,19 +1,19 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Threading.Tasks; using Microsoft.AspNetCore.Blazor.Hosting; namespace Wasm.Performance.TestApp { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add<App>("app"); - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup<Startup>(); + await builder.Build().RunAsync(); + } } } diff --git a/src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs b/src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs deleted file mode 100644 index c79b0efb8c..0000000000 --- a/src/Components/benchmarkapps/Wasm.Performance/TestApp/Startup.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace Wasm.Performance.TestApp -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent<App>("app"); - } - } -} diff --git a/src/Components/test/testassets/BasicTestApp/Program.cs b/src/Components/test/testassets/BasicTestApp/Program.cs index 2be7d81b4e..0c62f05bd1 100644 --- a/src/Components/test/testassets/BasicTestApp/Program.cs +++ b/src/Components/test/testassets/BasicTestApp/Program.cs @@ -3,8 +3,13 @@ using System; using System.Globalization; +using System.Runtime.InteropServices; using System.Threading.Tasks; +using BasicTestApp.AuthTest; using Microsoft.AspNetCore.Blazor.Hosting; +using Microsoft.AspNetCore.Blazor.Http; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.Extensions.DependencyInjection; using Mono.WebAssembly.Interop; namespace BasicTestApp @@ -18,12 +23,26 @@ namespace BasicTestApp // We want the culture to be en-US so that the tests for bind can work consistently. CultureInfo.CurrentCulture = new CultureInfo("en-US"); - CreateHostBuilder(args).Build().Run(); - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup<Startup>(); + if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))) + { + // Needed because the test server runs on a different port than the client app, + // and we want to test sending/receiving cookies under this config + WebAssemblyHttpMessageHandlerOptions.DefaultCredentials = FetchCredentialsOption.Include; + } + + builder.RootComponents.Add<Index>("root"); + + builder.Services.AddSingleton<AuthenticationStateProvider, ServerAuthenticationStateProvider>(); + builder.Services.AddAuthorizationCore(options => + { + options.AddPolicy("NameMustStartWithB", policy => + policy.RequireAssertion(ctx => ctx.User.Identity.Name?.StartsWith("B") ?? false)); + }); + + await builder.Build().RunAsync(); + } // Supports E2E tests in StartupErrorNotificationTest private static async Task SimulateErrorsIfNeededForTest() diff --git a/src/Components/test/testassets/BasicTestApp/Startup.cs b/src/Components/test/testassets/BasicTestApp/Startup.cs deleted file mode 100644 index 008a988316..0000000000 --- a/src/Components/test/testassets/BasicTestApp/Startup.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Runtime.InteropServices; -using BasicTestApp.AuthTest; -using Microsoft.AspNetCore.Blazor.Http; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace BasicTestApp -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { - services.AddSingleton<AuthenticationStateProvider, ServerAuthenticationStateProvider>(); - - services.AddAuthorizationCore(options => - { - options.AddPolicy("NameMustStartWithB", policy => - policy.RequireAssertion(ctx => ctx.User.Identity.Name?.StartsWith("B") ?? false)); - }); - } - - public void Configure(IComponentsApplicationBuilder app) - { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY"))) - { - // Needed because the test server runs on a different port than the client app, - // and we want to test sending/receiving cookies underling this config - WebAssemblyHttpMessageHandlerOptions.DefaultCredentials = FetchCredentialsOption.Include; - } - - app.AddComponent<Index>("root"); - } - } -} diff --git a/src/Components/test/testassets/TestServer/CorsStartup.cs b/src/Components/test/testassets/TestServer/CorsStartup.cs index a4d91a84aa..28dda32d90 100644 --- a/src/Components/test/testassets/TestServer/CorsStartup.cs +++ b/src/Components/test/testassets/TestServer/CorsStartup.cs @@ -46,7 +46,7 @@ namespace TestServer app.Map("/subdir", app => { app.UseStaticFiles(); - app.UseClientSideBlazorFiles<BasicTestApp.Startup>(); + app.UseClientSideBlazorFiles<BasicTestApp.Program>(); app.UseRouting(); @@ -55,7 +55,7 @@ namespace TestServer app.UseEndpoints(endpoints => { endpoints.MapControllers(); - endpoints.MapFallbackToClientSideBlazor<BasicTestApp.Startup>("index.html"); + endpoints.MapFallbackToClientSideBlazor<BasicTestApp.Program>("index.html"); }); }); } diff --git a/src/Components/test/testassets/TestServer/InternationalizationStartup.cs b/src/Components/test/testassets/TestServer/InternationalizationStartup.cs index d508ed797b..7521ebe34b 100644 --- a/src/Components/test/testassets/TestServer/InternationalizationStartup.cs +++ b/src/Components/test/testassets/TestServer/InternationalizationStartup.cs @@ -37,7 +37,7 @@ namespace TestServer app.Map("/subdir", app => { app.UseStaticFiles(); - app.UseClientSideBlazorFiles<BasicTestApp.Startup>(); + app.UseClientSideBlazorFiles<BasicTestApp.Program>(); app.UseRequestLocalization(options => { diff --git a/src/Components/test/testassets/TestServer/StartupWithMapFallbackToClientSideBlazor.cs b/src/Components/test/testassets/TestServer/StartupWithMapFallbackToClientSideBlazor.cs index 483dd00d78..d32f48f8e3 100644 --- a/src/Components/test/testassets/TestServer/StartupWithMapFallbackToClientSideBlazor.cs +++ b/src/Components/test/testassets/TestServer/StartupWithMapFallbackToClientSideBlazor.cs @@ -36,7 +36,7 @@ namespace TestServer // The client-side files middleware needs to be here because the base href in hardcoded to /subdir/ app.Map("/subdir", app => { - app.UseClientSideBlazorFiles<BasicTestApp.Startup>(); + app.UseClientSideBlazorFiles<BasicTestApp.Program>(); }); // The calls to `Map` allow us to test each of these overloads, while keeping them isolated. @@ -46,7 +46,7 @@ namespace TestServer app.UseEndpoints(endpoints => { - endpoints.MapFallbackToClientSideBlazor<BasicTestApp.Startup>("index.html"); + endpoints.MapFallbackToClientSideBlazor<BasicTestApp.Program>("index.html"); }); }); @@ -56,7 +56,7 @@ namespace TestServer app.UseEndpoints(endpoints => { - endpoints.MapFallbackToClientSideBlazor<BasicTestApp.Startup>("test/{*path:nonfile}", "index.html"); + endpoints.MapFallbackToClientSideBlazor<BasicTestApp.Program>("test/{*path:nonfile}", "index.html"); }); }); @@ -66,7 +66,7 @@ namespace TestServer app.UseEndpoints(endpoints => { - endpoints.MapFallbackToClientSideBlazor(typeof(BasicTestApp.Startup).Assembly.Location, "index.html"); + endpoints.MapFallbackToClientSideBlazor(typeof(BasicTestApp.Program).Assembly.Location, "index.html"); }); }); @@ -76,7 +76,7 @@ namespace TestServer app.UseEndpoints(endpoints => { - endpoints.MapFallbackToClientSideBlazor(typeof(BasicTestApp.Startup).Assembly.Location, "test/{*path:nonfile}", "index.html"); + endpoints.MapFallbackToClientSideBlazor(typeof(BasicTestApp.Program).Assembly.Location, "test/{*path:nonfile}", "index.html"); }); }); } diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs index 03d510452d..06790b9c57 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs @@ -1,4 +1,12 @@ -using Microsoft.AspNetCore.Blazor.Hosting; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using System.Text; +using Microsoft.AspNetCore.Blazor.Hosting; +using Microsoft.Extensions.DependencyInjection; +#if (!NoAuth) +using Microsoft.AspNetCore.Components.Authorization; +#endif #if (Hosted) namespace BlazorWasm_CSharp.Client @@ -8,13 +16,19 @@ namespace BlazorWasm_CSharp { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add<App>("app"); - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup<Startup>(); + // use builder.Services to configure application services. +#if (IndividualLocalAuth) + builder.Services.AddOptions(); + builder.Services.AddAuthorizationCore(); + builder.Services.AddSingleton<AuthenticationStateProvider, HostAuthenticationStateProvider>(); +#endif + + await builder.Build().RunAsync(); + } } } diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs deleted file mode 100644 index 38fd10a30e..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Startup.cs +++ /dev/null @@ -1,28 +0,0 @@ -#if (!NoAuth) -using Microsoft.AspNetCore.Components.Authorization; -#endif -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -#if (Hosted) -namespace BlazorWasm_CSharp.Client -#else -namespace BlazorWasm_CSharp -#endif -{ - public class Startup - { - public void ConfigureServices(IServiceCollection services) - { -#if (IndividualLocalAuth) - services.AddAuthorizationCore(); - services.AddSingleton<AuthenticationStateProvider, HostAuthenticationStateProvider>(); -#endif - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent<App>("app"); - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs index fd1767bd47..eb96bae0e8 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs @@ -83,7 +83,7 @@ namespace BlazorWasm_CSharp.Server #endif app.UseStaticFiles(); - app.UseClientSideBlazorFiles<Client.Startup>(); + app.UseClientSideBlazorFiles<Client.Program>(); app.UseRouting(); @@ -99,7 +99,7 @@ namespace BlazorWasm_CSharp.Server #endif endpoints.MapControllers(); - endpoints.MapFallbackToClientSideBlazor<Client.Startup>("index.html"); + endpoints.MapFallbackToClientSideBlazor<Client.Program>("index.html"); }); } } From c7e6beec3caec49231124ca59d15d6f3f57cd8c9 Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Tue, 21 Jan 2020 16:38:22 -0800 Subject: [PATCH 57/64] Include compressed size in output (#18485) --- .../Wasm.Performance/Driver/Program.cs | 73 ++++++++++++++----- 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index 6a721adf63..d3fb6f2c8a 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.IO.Compression; using System.Linq; using System.Runtime.ExceptionServices; using System.Text.Encodings.Web; @@ -55,8 +56,9 @@ namespace Wasm.Performance.Driver browser.Url = launchUrl; browser.Navigate(); - var results = await benchmarkResult.Task; - FormatAsBenchmarksOutput(results); + var appSize = GetBlazorAppSize(); + await Task.WhenAll(benchmarkResult.Task, appSize); + FormatAsBenchmarksOutput(benchmarkResult.Task.Result, appSize.Result); Console.WriteLine("Done executing benchmark"); return 0; @@ -67,7 +69,7 @@ namespace Wasm.Performance.Driver benchmarkResult.TrySetResult(result); } - private static void FormatAsBenchmarksOutput(List<BenchmarkResult> results) + private static void FormatAsBenchmarksOutput(List<BenchmarkResult> results, (long publishSize, long compressedSize) sizes) { // Sample of the the format: https://github.com/aspnet/Benchmarks/blob/e55f9e0312a7dd019d1268c1a547d1863f0c7237/src/Benchmarks/Program.cs#L51-L67 var output = new BenchmarkOutput(); @@ -100,17 +102,11 @@ namespace Wasm.Performance.Driver Format = "n2", }); - var testAssembly = typeof(TestApp.Program).Assembly; - var testAssemblyLocation = new FileInfo(testAssembly.Location); - var testApp = new DirectoryInfo(Path.Combine( - testAssemblyLocation.Directory.FullName, - testAssembly.GetName().Name)); - output.Measurements.Add(new BenchmarkMeasurement { Timestamp = DateTime.UtcNow, - Name = "Publish size", - Value = GetDirectorySize(testApp) / 1024, + Name = "blazorwasm/publish-size", + Value = sizes.publishSize / 1024, }); output.Metadata.Add(new BenchmarkMetadata @@ -122,15 +118,11 @@ namespace Wasm.Performance.Driver Format = "n2", }); - var gzip = new FileInfo(Path.Combine( - testAssemblyLocation.Directory.FullName, - $"{testAssembly.GetName().Name}.gzip")); - output.Measurements.Add(new BenchmarkMeasurement { Timestamp = DateTime.UtcNow, - Name = "Publish size (compressed)", - Value = (gzip.Exists ? gzip.Length : 0) / 1024, + Name = "blazorwasm/compressed-publish-size", + Value = sizes.compressedSize / 1024, }); Console.WriteLine("#StartJobStatistics"); @@ -205,6 +197,17 @@ namespace Wasm.Performance.Driver .First(); } + static async Task<(long size, long compressedSize)> GetBlazorAppSize() + { + var testAssembly = typeof(TestApp.Startup).Assembly; + var testAssemblyLocation = new FileInfo(testAssembly.Location); + var testApp = new DirectoryInfo(Path.Combine( + testAssemblyLocation.Directory.FullName, + testAssembly.GetName().Name)); + + return (GetDirectorySize(testApp), await GetBrotliCompressedSize(testApp)); + } + static long GetDirectorySize(DirectoryInfo directory) { // This can happen if you run the app without publishing it. @@ -228,5 +231,41 @@ namespace Wasm.Performance.Driver return size; } + + static async Task<long> GetBrotliCompressedSize(DirectoryInfo directory) + { + if (!directory.Exists) + { + return 0; + } + + var tasks = new List<Task<long>>(); + foreach (var item in directory.EnumerateFileSystemInfos()) + { + if (item is FileInfo fileInfo) + { + tasks.Add(GetCompressedFileSize(fileInfo)); + } + else if (item is DirectoryInfo directoryInfo) + { + tasks.Add(GetBrotliCompressedSize(directoryInfo)); + } + } + + return (await Task.WhenAll(tasks)).Sum(s => s); + + async Task<long> GetCompressedFileSize(FileInfo fileInfo) + { + using var inputStream = new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.Read, 1, useAsync: true); + using var outputStream = new MemoryStream(); + + using (var brotliStream = new BrotliStream(outputStream, CompressionLevel.Optimal, leaveOpen: true)) + { + await inputStream.CopyToAsync(brotliStream); + } + + return outputStream.Length; + } + } } } From ffac6870914d1f4335240500b65375bff6e3cbd4 Mon Sep 17 00:00:00 2001 From: Javier Calvarro Nelson <jacalvar@microsoft.com> Date: Wed, 22 Jan 2020 14:00:39 -0800 Subject: [PATCH 58/64] Revert "[Fixes #17014] Add an auth-enabled template for Blazor WASM projects (#18354)" (#18516) This reverts commit e64b8a91ad1a5acea64f7d2a51ac00618ad96876. --- eng/Versions.props | 4 - .../BlazorWasm-CSharp.Client.csproj.in | 1 - .../BlazorWasm-CSharp.Server.csproj.in | 17 -- ...crosoft.AspNetCore.Blazor.Templates.csproj | 10 +- .../.template.config/dotnetcli.host.json | 28 +- .../.template.config/template.json | 181 ------------ .../.template.config/vs-2017.3.host.json | 24 -- .../BlazorWasm-CSharp/Client/App.razor | 17 +- .../Client/Pages/FetchData.razor | 6 - .../BlazorWasm-CSharp/Client/Program.cs | 10 - .../HostAuthenticationStateProvider.cs | 56 ---- .../LoginDisplay.IndividualLocalAuth.razor | 12 - .../Client/Shared/MainLayout.Auth.razor | 16 - ...inLayout.NoAuth.razor => MainLayout.razor} | 0 .../BlazorWasm-CSharp/Client/_Imports.razor | 3 - .../Client/wwwroot/favicon.ico | Bin 32038 -> 0 bytes .../Identity/Pages/Account/LogOut.cshtml | 15 - .../Pages/Shared/_LoginPartial.cshtml | 27 -- .../Server/Controllers/UserController.cs | 61 ---- .../Controllers/WeatherForecastController.cs | 6 - .../Server/Data/ApplicationDbContext.cs | 16 - ...000000000_CreateIdentitySchema.Designer.cs | 270 ----------------- .../00000000000000_CreateIdentitySchema.cs | 217 -------------- .../ApplicationDbContextModelSnapshot.cs | 268 ----------------- ...000000000_CreateIdentitySchema.Designer.cs | 277 ------------------ .../00000000000000_CreateIdentitySchema.cs | 220 -------------- .../ApplicationDbContextModelSnapshot.cs | 275 ----------------- .../BlazorWasm-CSharp/Server/Startup.cs | 61 +--- .../content/BlazorWasm-CSharp/Server/app.db | Bin 106496 -> 0 bytes .../Server/appsettings.Development.json | 9 - .../BlazorWasm-CSharp/Server/appsettings.json | 19 -- .../Shared/Authorization/ClaimValue.cs | 18 -- .../Shared/Authorization/UserInfo.cs | 19 -- .../test/BlazorWasmTemplateTest.cs | 107 +------ 34 files changed, 11 insertions(+), 2259 deletions(-) delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor rename src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/{MainLayout.NoAuth.razor => MainLayout.razor} (100%) delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/favicon.ico delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/app.db delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs delete mode 100644 src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs diff --git a/eng/Versions.props b/eng/Versions.props index 5f4be96aee..acef5287d1 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -204,10 +204,6 @@ <SystemThreadingTasksExtensionsPackageVersion>4.5.2</SystemThreadingTasksExtensionsPackageVersion> <!-- Packages developed by @aspnet, but manually updated as necessary. --> <LibuvPackageVersion>1.10.0</LibuvPackageVersion> - <MicrosoftAspNetCoreIdentityUIPackageVersion>3.1.0</MicrosoftAspNetCoreIdentityUIPackageVersion> - <MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion>3.1.0</MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion> - <MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion>3.1.0</MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion> - <MicrosoftAspNetCoreComponentsAuthorizationPackageVersion>3.1.0</MicrosoftAspNetCoreComponentsAuthorizationPackageVersion> <MicrosoftAspNetWebApiClientPackageVersion>5.2.6</MicrosoftAspNetWebApiClientPackageVersion> <!-- Partner teams --> <MicrosoftAzureKeyVaultPackageVersion>2.3.2</MicrosoftAzureKeyVaultPackageVersion> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in index 3ef13b2f33..70927b08e3 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Client.csproj.in @@ -10,7 +10,6 @@ <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="${MicrosoftAspNetCoreBlazorBuildPackageVersion}" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="${MicrosoftAspNetCoreBlazorDevServerPackageVersion}" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="${MicrosoftAspNetCoreBlazorHttpClientPackageVersion}" /> - <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="${MicrosoftAspNetCoreComponentsAuthorizationPackageVersion}" Condition="'$(IndividualLocalAuth)' == 'true'" /> </ItemGroup> <!--#if Hosted --> <ItemGroup> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in index dd9965626c..5fe7473679 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/BlazorWasm-CSharp.Server.csproj.in @@ -13,21 +13,4 @@ <ProjectReference Include="..\Shared\BlazorWasm-CSharp.Shared.csproj" /> </ItemGroup> - <!--#if (IndividualLocalAuth && !UseLocalDB) --> - <ItemGroup> - <None Update="app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" /> - </ItemGroup> - - <!--#endif --> - <!--#if (IndividualLocalAuth) --> - <ItemGroup> - <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="${MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion}" /> - <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="${MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion}" /> - <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="${MicrosoftAspNetCoreIdentityUIPackageVersion}" /> - <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="${MicrosoftEntityFrameworkCoreSqlServerPackageVersion}" Condition="'$(UseLocalDB)' == 'True'" /> - <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="${MicrosoftEntityFrameworkCoreSqlitePackageVersion}" Condition="'$(UseLocalDB)' != 'True'" /> - <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="${MicrosoftEntityFrameworkCoreToolsPackageVersion}" /> - </ItemGroup> - - <!--#endif --> </Project> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj index 5ae2bfe6ca..65457a000d 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/Microsoft.AspNetCore.Blazor.Templates.csproj @@ -20,15 +20,9 @@ MicrosoftAspNetCoreBlazorBuildPackageVersion=$(MicrosoftAspNetCoreBlazorBuildPackageVersion); MicrosoftAspNetCoreBlazorDevServerPackageVersion=$(MicrosoftAspNetCoreBlazorDevServerPackageVersion); MicrosoftAspNetCoreBlazorHttpClientPackageVersion=$(MicrosoftAspNetCoreBlazorHttpClientPackageVersion); - MicrosoftAspNetCoreBlazorServerPackageVersion=$(MicrosoftAspNetCoreBlazorServerPackageVersion); - MicrosoftAspNetCoreComponentsAuthorizationPackageVersion=$(MicrosoftAspNetCoreComponentsAuthorizationPackageVersion); - MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreDiagnosticsEntityFrameworkCorePackageVersion); - MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion=$(MicrosoftAspNetCoreIdentityEntityFrameworkCorePackageVersion); - MicrosoftAspNetCoreIdentityUIPackageVersion=$(MicrosoftAspNetCoreIdentityUIPackageVersion); - MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); - MicrosoftEntityFrameworkCoreSqlitePackageVersion=$(MicrosoftEntityFrameworkCoreSqlitePackageVersion); - MicrosoftEntityFrameworkCoreToolsPackageVersion=$(MicrosoftEntityFrameworkCoreToolsPackageVersion); MonoWebAssemblyInteropPackageVersion=$(MonoWebAssemblyInteropPackageVersion); + MicrosoftEntityFrameworkCoreSqlServerPackageVersion=$(MicrosoftEntityFrameworkCoreSqlServerPackageVersion); + MicrosoftAspNetCoreBlazorServerPackageVersion=$(MicrosoftAspNetCoreBlazorServerPackageVersion); </GeneratedContentProperties> </PropertyGroup> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json index 38651820f2..4e89e1d2dc 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/dotnetcli.host.json @@ -5,31 +5,11 @@ "longName": "no-restore", "shortName": "" }, - "Hosted": { - "longName": "hosted" - }, + "Hosted": { + "longName": "hosted" + }, "Framework": { "longName": "framework" - }, - "UseLocalDB": { - "longName": "use-local-db" - }, - "HttpPort": { - "isHidden": true - }, - "HttpsPort": { - "isHidden": true - }, - "ExcludeLaunchSettings": { - "longName": "exclude-launch-settings", - "shortName": "" - }, - "UserSecretsId": { - "isHidden": true - }, - "NoHttps": { - "longName": "no-https", - "shortName": "" } } -} +} \ No newline at end of file diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json index d2e1735f7e..b6cb64fcec 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/template.json @@ -74,82 +74,6 @@ "exclude": [ "*.sln" ] - }, - { - "condition": "(!IndividualLocalAuth || UseLocalDB)", - "exclude": [ - "Server/app.db" - ] - }, - { - "condition": "(!IndividualLocalAuth)", - "exclude": [ - "Server/Data/SqlLite/**", - "Server/Data/SqlServer/**", - "Server/Data/ApplicationDbContext.cs", - "Server/Areas/**" - ] - }, - { - "condition": "(IndividualLocalAuth && UseLocalDB)", - "rename": { - "Server/Data/SqlServer/": "Server/Data/Migrations/" - }, - "exclude": [ - "Server/Data/SqlLite/**" - ] - }, - { - "condition": "(IndividualLocalAuth && !UseLocalDB)", - "rename": { - "Server/Data/SqlLite/": "Server/Data/Migrations/" - }, - "exclude": [ - "Server/Data/SqlServer/**" - ] - }, - { - "condition": "(NoAuth && Hosted)", - "rename": { - "Client/Shared/MainLayout.NoAuth.razor": "Client/Shared/MainLayout.razor" - }, - "exclude": [ - "Client/Shared/LoginDisplay.*.razor", - "Client/Shared/MainLayout.Auth.razor" - ] - }, - { - "condition": "(!Hosted)", - "rename": { - "Client/Shared/MainLayout.NoAuth.razor": "Shared/MainLayout.razor" - }, - "exclude": [ - "Client/Shared/LoginDisplay.*.razor", - "Client/Shared/MainLayout.Auth.razor" - ] - }, - { - "condition": "(!NoAuth && Hosted)", - "rename": { - "Client/Shared/MainLayout.Auth.razor": "Client/Shared/MainLayout.razor" - }, - "exclude": [ - "Client/Shared/MainLayout.NoAuth.razor" - ] - }, - { - "condition": "(IndividualLocalAuth)", - "rename": { - "Client/Shared/LoginDisplay.IndividualLocalAuth.razor": "Client/Shared/LoginDisplay.razor" - } - }, - { - "condition": "(NoAuth)", - "exclude": [ - "Client/Services/HostAuthenticationStateProvider.cs", - "Server/Controllers/UserController.cs", - "Shared/Authorization/*" - ] } ] } @@ -183,111 +107,6 @@ "datatype": "bool", "defaultValue": "false", "description": "If specified, includes an ASP.NET Core host for the Blazor app." - }, - "auth": { - "type": "parameter", - "datatype": "choice", - "choices": [ - { - "choice": "None", - "description": "No authentication" - }, - { - "choice": "Individual", - "description": "Individual authentication" - } - ], - "defaultValue": "None", - "description": "The type of authentication to use" - }, - "UserSecretsId": { - "type": "parameter", - "datatype": "string", - "replaces": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502", - "defaultValue": "aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502", - "description": "The ID to use for secrets (use with OrgReadAccess or Individual auth)." - }, - "ExcludeLaunchSettings": { - "type": "parameter", - "datatype": "bool", - "defaultValue": "false", - "description": "Whether to exclude launchSettings.json from the generated template." - }, - "HttpPort": { - "type": "parameter", - "datatype": "integer", - "description": "Port number to use for the HTTP endpoint in launchSettings.json." - }, - "HttpPortGenerated": { - "type": "generated", - "generator": "port" - }, - "HttpPortReplacer": { - "type": "generated", - "generator": "coalesce", - "parameters": { - "sourceVariableName": "HttpPort", - "fallbackVariableName": "HttpPortGenerated" - }, - "replaces": "8080" - }, - "HttpsPort": { - "type": "parameter", - "datatype": "integer", - "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)." - }, - "HttpsPortGenerated": { - "type": "generated", - "generator": "port", - "parameters": { - "low": 44300, - "high": 44399 - } - }, - "HttpsPortReplacer": { - "type": "generated", - "generator": "coalesce", - "parameters": { - "sourceVariableName": "HttpsPort", - "fallbackVariableName": "HttpsPortGenerated" - }, - "replaces": "44300" - }, - "IndividualLocalAuth": { - "type": "computed", - "value": "(auth == \"Individual\")" - }, - "NoAuth": { - "type": "computed", - "value": "(!(IndividualAuth))" - }, - "IndividualAuth": { - "type": "computed", - "value": "(IndividualLocalAuth)" - }, - "RequiresHttps": { - "type": "computed", - "value": "(IndividualAuth || !NoHttps)" - }, - "NoHttps": { - "type": "parameter", - "datatype": "bool", - "defaultValue": "false", - "description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth." - }, - "UseLocalDB": { - "type": "parameter", - "datatype": "bool", - "defaultValue": "false", - "description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified." - }, - "copyrightYear": { - "type": "generated", - "generator": "now", - "replaces": "copyrightYear", - "parameters": { - "format": "yyyy" - } } }, "tags": { diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json index cbed84838b..5cb50d10a5 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/.template.config/vs-2017.3.host.json @@ -18,30 +18,6 @@ "additionalWizardParameters": { "$isMultiProjectTemplate$": "true" }, - "supportedAuthentications": [ - { - "auth": "None", - "authenticationType": "NoAuth", - "allowUnsecured": true - }, - { - "auth": "Individual", - "authenticationType": "IndividualAuth", - "b2cAuthenticationOptions": "Local" - } - ], - "ports": [ - { - "name": "HttpPort", - "useHttps": false - }, - { - "name": "HttpsPort", - "useHttps": true - } - ], - "excludeLaunchSettings": false, - "disableHttpsSymbol": "NoHttps", "symbolInfo": [ { "id": "Hosted", diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor index 7b58ea096f..1c360b7121 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/App.razor @@ -1,5 +1,4 @@ -@*#if (NoAuth) -<Router AppAssembly="@typeof(Program).Assembly"> +<Router AppAssembly="@typeof(Program).Assembly"> <Found Context="routeData"> <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> </Found> @@ -9,17 +8,3 @@ </LayoutView> </NotFound> </Router> -#else -<CascadingAuthenticationState> - <Router AppAssembly="@typeof(Program).Assembly"> - <Found Context="routeData"> - <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> - </Found> - <NotFound> - <LayoutView Layout="@typeof(MainLayout)"> - <p>Sorry, there's nothing at this address.</p> - </LayoutView> - </NotFound> - </Router> -</CascadingAuthenticationState> -#endif*@ diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor index 99cda40a53..0faf18fefd 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Pages/FetchData.razor @@ -1,13 +1,7 @@ @page "/fetchdata" -@*#if (!NoAuth) -@using Microsoft.AspNetCore.Authorization -#endif*@ @*#if (Hosted) @using BlazorWasm_CSharp.Shared #endif*@ -@*#if (!NoAuth) -@attribute [Authorize] -#endif*@ @inject HttpClient Http <h1>Weather forecast</h1> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs index 06790b9c57..5790d212dc 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Program.cs @@ -4,9 +4,6 @@ using System.Threading.Tasks; using System.Text; using Microsoft.AspNetCore.Blazor.Hosting; using Microsoft.Extensions.DependencyInjection; -#if (!NoAuth) -using Microsoft.AspNetCore.Components.Authorization; -#endif #if (Hosted) namespace BlazorWasm_CSharp.Client @@ -21,13 +18,6 @@ namespace BlazorWasm_CSharp var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add<App>("app"); - // use builder.Services to configure application services. -#if (IndividualLocalAuth) - builder.Services.AddOptions(); - builder.Services.AddAuthorizationCore(); - builder.Services.AddSingleton<AuthenticationStateProvider, HostAuthenticationStateProvider>(); -#endif - await builder.Build().RunAsync(); } } diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs deleted file mode 100644 index efb2cd636d..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Services/HostAuthenticationStateProvider.cs +++ /dev/null @@ -1,56 +0,0 @@ -using BlazorWasm_CSharp.Shared.Authorization; -using Microsoft.AspNetCore.Components; -using Microsoft.AspNetCore.Components.Authorization; -using System.Net.Http; -using System.Security.Claims; -using System.Threading.Tasks; - -namespace BlazorWasm_CSharp.Client -{ - public class HostAuthenticationStateProvider : AuthenticationStateProvider - { - private readonly HttpClient _client; - private ClaimsPrincipal _currentUser; - - public HostAuthenticationStateProvider(HttpClient client) - { - _client = client; - } - - public override async Task<AuthenticationState> GetAuthenticationStateAsync() - { - if (_currentUser == null) - { - await FetchUser(); - } - - return new AuthenticationState(_currentUser); - } - - private async Task FetchUser() - { - var user = await _client.GetJsonAsync<UserInfo>("User"); - - if (!user.IsAuthenticated) - { - _currentUser = new ClaimsPrincipal(new ClaimsIdentity()); - return; - } - - var identity = new ClaimsIdentity( - nameof(HostAuthenticationStateProvider), - user.NameClaimType, - user.RoleClaimType); - - if (user.Claims != null) - { - foreach (var claim in user.Claims) - { - identity.AddClaim(new Claim(claim.Type, claim.Value)); - } - } - - _currentUser = new ClaimsPrincipal(identity); - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor deleted file mode 100644 index 25f9db264b..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/LoginDisplay.IndividualLocalAuth.razor +++ /dev/null @@ -1,12 +0,0 @@ -<AuthorizeView> - <Authorized> - <a href="Identity/Account/Manage">Hello, @context.User.Identity.Name!</a> - <form method="post" action="Identity/Account/LogOut"> - <button type="submit" class="nav-link btn btn-link">Log out</button> - </form> - </Authorized> - <NotAuthorized> - <a href="Identity/Account/Register">Register</a> - <a href="Identity/Account/Login">Log in</a> - </NotAuthorized> -</AuthorizeView> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor deleted file mode 100644 index fafa2f55f1..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.Auth.razor +++ /dev/null @@ -1,16 +0,0 @@ -@inherits LayoutComponentBase - -<div class="sidebar"> - <NavMenu /> -</div> - -<div class="main"> - <div class="top-row px-4 auth"> - <LoginDisplay /> - <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> - </div> - - <div class="content px-4"> - @Body - </div> -</div> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.NoAuth.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor similarity index 100% rename from src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.NoAuth.razor rename to src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/MainLayout.razor diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor index fa501010b9..912a5070c2 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/_Imports.razor @@ -1,7 +1,4 @@ @using System.Net.Http -@*#if (!NoAuth) -@using Microsoft.AspNetCore.Components.Authorization -#endif*@ @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/favicon.ico b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/wwwroot/favicon.ico deleted file mode 100644 index a3a799985c43bc7309d701b2cad129023377dc71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32038 zcmeHwX>eTEbtY7aYbrGrkNjgie?1jXjZ#zP%3n{}GObKv$BxI7Sl;Bwl5E+Qtj&t8 z*p|m4DO#HoJC-FyvNnp8NP<{Na0LMnTtO21(rBP}?EAiNjWgeO?z`{3ZoURUQlV2d zY1Pqv{m|X_oO91|?^z!6@@~od!@OH>&BN;>c@O+yUfy5w>LccTKJJ&`-k<%M^Zvi( z<$dKp=jCnNX5Qa+M_%6g|IEv~4R84q9|7E=|Ho(Wz3f-0wPjaRL;W*N^>q%^KGRr7 zxbjSORb_c&eO;oV_DZ7ua!sPH=0c+W;`vzJ#j~-x3uj};50#vqo*0w4!LUqs*UCh9 zvy2S%$#8$K4EOa&e@~aBS65_hc~Mpu=454VT2^KzWqEpBA=ME|O;1cn?8p<+{MKJf zbK#@1wzL44m$k(?85<eW@6XRp%jD>=Obido7=C|xWKe%66$z)NrzRwR>?hK?_bbwT z@Da?lBrBL}Zemo1@!9pYRau&!ld17h{f+UV0sY(R{ET$PBB|-=Nr@l-nY6w8HEAw* zRMIQU`24Jl_IFEPcS=_HdrOP5yf81z_?@M>83Vv65$Q<HOixSl<aTM__jl4#^thzg zR%8kDj}7!lG~6zIy}i=c(}UmYmfr3z>Fr9nP<Q2WYG!6yx=!tqj{N(it>g(wr`Ke8 zaY4ogdnMA*F7a4Q1_uXadTLUpCk;$ZPRRJ^sMOch;rlbvUGc1R9=u;dr9YANbQ<4Z z#P|Cp9BP$FXNPolgyr1XGt$^lFPF}rmBF5rj1Kh5%dforrP<k8>8W}_qJ<Ai`=Ou7 z`ue&ogWfUli9DMc8&O<H4|y`$*Ck6>L$2qMBS-#%-|s#BPZBSETsn_EBYcr(W5dq( z@f%}<eeQ3J;Ww5b2VCRhCywj)`%eE_;>C|iN7)YN`^)<MX{;gTi@1yp^{2@b;(+g` zAt&imr^?OutN&RNC7A!n)B63jwKbWao5ecJ%hKY!EZ~|jkF}#Ltw6^3x5~;&{eFM- zi;^sTLgE!Ky7P}i#{58fMnFeDcsGT0=<Dl~`uh4mC;g*M#nOM~MM+)Qlk@xhE}^NZ zQ9_}Rw6?bH#)oeiA0L;6g#`s(=X#N*<>h7R?Cg}Do*w-!zwZb9=BMp%Wsh@nb22hA zA{`wa8Q;yz6S)zfo%sl08^GF`9csI9BlGnEy#0^Y3b);M+n<(}6jziM7nhe57a1rj zC@(2ISYBL^UtWChKzVWgf%4LW2Tqg_^7jMw`C$KvU+mcakFjV(BGAW9g%CzSyM;Df z143=mq0oxaK-H;o>F<Rt1N8OKCQyfy(wj_3Pa+10N>3~zJ<(3-j&?|QBn)WJfP#JR zRuA;`N?L83wQt78QIA$(Z)lGQY9r^SFal;LB^qi`8%8@y+mwcGsf~nv)bBy2S7z~9 z=;X@Gglk)^jpbNz?1;`!J3QUfAOp4U$Uxm5>92iT`mek#$>s`)M>;e4<M8Hm<td$i zo%63^{uMj_JZyl2H|=@`4jvvW(-Ts0+?#)(Zm%@H_UF>{#%HAAcb^8_Ax%ersk|}# z0bd;ZPu|2}18KtvmIo8`1@H~@2ejwo(5rFS`Z4&O{$$+ch2hC0=06Jh`@p+p8LZzY z&2M~8T6X^*X?yQ$3N5EzRv$(FtSxhW>>ABUyp!{<Wz0W0IwJGaQ;Ngf)HrbH_i%t+ zRbG%E4pf{tRz1*<`LTY34f{a*UrA^`{Keb<8-DNe(tP~azWFT<h7USFe1h^|)$m|) zY*glF%>484f8(%C1_y)3D%Qgfl_!sz`LTXOjR&L!zPA0qH_iNS!tY{!^2WfD%uT}P zI<~&?@&))5&hPPHVRl9);TPO>@UI2d!^ksb!$9T96V(F){puTsn(}qt_WXNw4VvHj zf;6A_XCvE`Z@}E-IOaG0rs>K>^=Sr&OgT_p;F@v0VCN0Y$r|Lw1?Wjt`AKK~RT*kJ z2>QPuVgLNcF+XKn<s0*3P3iB*gT^a0vIzTZU|trn2Uv9c3Hh)9f3g4{&h?nbULpvN z96n^`Pp`^wOQE#w`Lc8replMCXK8)sOVV=kx5^vt9Vp{-(Alv;%nuxzF#i;MKYb4U zzQV*feDk<Wj*l6DJWwXMCX~$yAMpLrvcuJb0|Uy(;g%w4-TgPxaq!#HhPhjz2Q4Rm zgZUv_3Y>o;WBv$yj@d_WFJbl*#*V_Cwzo@%3n5%z4g21G*PVZ)wM5$A{klYozmGlB zT@u2+s}=f}25%IA!yNcXUr!!1)z(Nqbhojg0lv@7@0UlvUMT)*r;M$d0-t)Z?<y`V ztR5U35HLVSIse|TN~8$;o%g;jAzZhXzwF3Z8snPGVLi>B1@qQk()o!4fqvfr_I0r7 zy1(NdkHEj#Yu{K>T#We#b#FD=c1XhS{hdTh9+8gy-vkcdkk*QS@y(xxEMb1w6z<^~ zYcETGfB#ibR#ql0EiD;PR$L&Vrh2uRv5t_$;NxC;>7_S5_OXxsi8udY3BUUdi55Sk zcyKM+PQ9YMA%D1kH1q48OFG(Gbl=FmV;yk8o>k%0$rJ8%-IYsHclnYuTskka<HNc) zw7%ikv18A{=YN3n^EKXnL?Q>iCGkUlkMY~mx&K}XRlKIW;odWIeuKjtbc^8bBOTqK zjj(ot`_j?A6y_h%vxE9o*ntx#PGrnK7AljD_r58ylE<WT-@UlL8}x(!oZA8J5zU^H z^A9LLlqc{rSK**`!q^J#O?mF{`>*oy@{IY%+mA^!|2vW_`>`aC{#3`#3;D_$^S^cM zRcF+uTO2sICledvFgNMU@A%M)%8JbSLq{dD|2|2Sg8vvh_uV6*Q?F&rKaV{v_qz&y z`f;stIb?Cb2!Cg7CG91Bhu@D@RaIrq-+o+T2fwFu#|j>lD6ZS9-t^5cx>p|?flqUA z;Cgs#V)O#`Aw4$Kr)L5?|7f4izl!;n0jux}tEW$&&YB<mKXAV!4?lsqzpK~nm2X@% zznz;rn1?^*{QmQRy*7FZTn2bH>Xz9o{+~HhoiYDJ`w5BVTl&ARya=M7zdy$FE<n#M zl!>e}iGBur8XE>rhLj&_yDk5D4n2GJZ07u7%zyAfNtOLn;)M?h*Py-Xtql5a<V_m; zgjM+PrKKg|+4S7GbD8ri{bv3|(WAftcJSQ3j463m3!*jX9@l3SwsIJ9$n(_<d<V}- zdM?8m`TY6woc|B3{h0`#lz73zk}Uaq<w4i6rzBQ)?7HUX-1c18+m(<moCSvAXLye5 zh5c`8YLaL)x*b1$i#PuXiRV8kiNc2^j&+D1gdfb}|5oTH&30~%=gw3MWL>JOtL4<G zQ+geX#i}{CfBuEhxKIYkhY836$5h(|e8hWgX@2-7&O3^caOQNC+RsJA9=Z|lz!|j~ zzv!M%E&bjs-ql8b^FEb%#q+R*m6a8_c=4j1p}V@eu9_R)yao8k1Y%7=kV>U8e|!t? z((sc6&OJXrPdVef^wZV&x=Z&~uA7^ix8rly^rEj?#d&~pQ{HN8Yq|fZ#*bXn-26P^ z5!)xRzYO9{u6vx5@q_{FE4#7BipS#{&J7*>y}lTyV94}dfE%Yk>@@pDe&F7J09<pd zBG-35{NWG(mj@qs;K5x_@BH1ar=NZmqYF>(-0|wuI|$of-MRfK51#t@t2+U|*s=W; z!Y&t{dS%!4VEEi$efA!#<<7&04?kB}Soprd8*jYv;-Qj~h~4v>{XX~kjF+@Z7<<HU zYqNw~nxvi3+#u~u4m8wBdt;r18fqQ5f-wkc<;fra!=7j)qI)jCZL`;m=MLi>t?^|i z#>_ag2i-CRAM8Ret^rZt*^K?`G|o>1o(mLkewxyA)38k93`<~4VFI?5VB!kBh%NNU zxb8K(^-MU1ImWQxG~nFB-Un;6n{lQz_FfsW9^H$Xcn{;+W^ZcG$0qLM#eNV=vGE@# z1~k&!h4@T|IiI<47@pS|i?Qcl=XZJL#$JKve;booMqDUYY{(xcdj6STDE=n?;fsS1 ze`h~Q{CT$K{+{t+#*I1=&&-UU8M&}AwAxD-rMa=e!{0gQXP@6azBq9(ji11uJF%@5 zCvV`#*?;ZguQ7o|nH%bm*s&jLej#@B35gy32Z<i}p+w67N1l-O`bz9E2Q&Prl{J&c zFtWxN6yt(CUz#|WFBayHKRA5RSe_Guv1?%CbBu>AE0`Pz@#j6R&kN5w{O4~1rhDoU zEBdU)%Nl?8zi|DR((u|gg~r$aLYmGMyK%FO*qLvwxK5+cn*`;O`16c!&&XT{$j~5k zXb^fbh<puUpgSc4h;a^JPcx88NIwB_wZ3>1GT-CI*Nj{-?r7HNg=e3E{6rxuluPXY z5Nm8ktc$o4-^SO0|Es_sp!A$8GVwOX+%)cH<;=u#R#nz;7QsHl;J@a{5NUAmAHq4D zIU5@jT!h?kUp|g~iN*!>jM6K!W5ar0v~fWrSHK@})@6Lh#h<Y-#lOkKs1PG-dHahJ zM$9B!@NH=agbTkTEj7nH{j+*#V~1D+#UC`_oFZ}Me`Xv{@kczB_^%*-rLiN#^HvZC zW(<sHDV`^1p=WbA*Ya%3^OlV(W{)pCXZUY^cUfk7fj?qhj5jjg$(WPI9Nz{#c;9@! z)Zp*vi`o)@{L|5U;-82?ew;X@(E~@0um(f0$%}}ESvgw3SzYA_xsriy$PoeZL|V8W z{@A2<JtHqX_pFg0#+X+jKYhgiuT=-g|90fanqL15WCybU=I0>)C6F6@)&-+C3(zO! z8+kV|B7LctM3DpI*~EYo>vCj>_?x&H;>y0*vKwE<xtH<PVcLDjlozY_*>0?vi$CLt zfSJB##P|M2dEUDBPKW=9cY-F;L;h3Fs4E<eJzSD0o_jT(!I%bYf7s+A4F4S&vU&{u zGbX8LWQ`N}<B$_Fk65OWB{ME!ZERdNV}zY};koB_$6`_N2)YHB>2ERdN#NSL7ctAC z?-}_a{*L@GA7JHJudx<WJi9vaTgF5Z9j)pgxL;;`&B{@bE%JPV^=rl!1jcq@Z#B+K zI|2CR^UoXk0q$!Sf5ta~Z|k1Fh3?+3@pjdRw-9@${9~P5058{|`@~;!oxq)E`a}o( z8TJsw+Xa=SEL)22TOOnx8*XCLjxTj%)P9=0>tDVA{K5Y<t}S3@pcVZ8Th-w<@*n!! z{5Iw1^Pc<=f6hypBmP*AsZr+1oqVnGKO_xxS8yg@lnLzHXK^lHLXLT2Y)od6$6zjW z9C6|q#F-b7CmbIcmKp4m7BvnvBs0jtGR{3Vggi9%Ow@12rlw(+%(c0Xy{wTRCzd-q z*e0R(?n0dVtJ1#zZi$pWqOotrym_zr!eLj|ROWD&A`Mex27eRR=>h*k(%#x4W7w+^ zcb-+ofbT5ieG+@QG2lx&7!MyE2JWDP@$k`M;0`*d+oQmJ2A^de!3c53HFcfW_Wtv< zKghQ;*FifmI}kE4dc@1y-u<d{7CivIL!OYgVGO<b{2`UIHP{i#n~qoq@_&@^AO(Z} z#dBx%d`SP8OeFNo#JyrN5tr_+l*A&Pl8ncsJC&4ZX9w(URJxP6hTSsP33H9_bi)@% zu_vKVG}rhHu7CFAlP>;@qs|V75Z^|Q0l0?teobTE8t<n*L#~=H98x(W?vyu^e<1&d zVCNt|KKw6VydWvylS1AzNdOH7;z|Q?cL6+10ul;Q-^lCSu>Gl@EB?k#q_wUjypJ*R zyEI=DJ^Z+d*&}B_xoWvs27LtH7972qqMxVFcX9}c&JbeNCXUZM0`nQIkf&C}&skSt z^9fw@b^Hb)!^hE2IJq~~GktG#ZWwWG<`@V&ckVR&r=JAO4YniJewVcG`HF;59}=bf zLyz0uxf6MhuSyH#-^!ZbHxYl<XIQZKGrvIGxelxgp{*E!yiZR}IrSkt->^mmBVrx) zyrb8sQ*qBd_WXm9c~Of$&ZP$b^)<~0%nt#7<SN=BJIqx?5B)&%HI%7#(A9E*{D)1a zzF<__h-;n;xMv$>y$1Jg$e}WCK>TeUB{P>|b1FAB?%K7>;XiOfd}JQ`|IP#Vf%kVy zXa4;XFZ+>n;F>uX&3|4zqWK2u3c<>q;tzjsb1;d{u;L$-hq3qe@82(ob<3qom#%`+ z;vzYAs7TIMl_O75BXu|r`Qhc4UT*vN$3Oo0kAC!{f2#HexDy|qUpgTF;k{o6|L>7l z=?`=*LXaow1o;o<tE{OE(?2=<A4MF}#OA>NNLXsGTrvC)$R&{m=94Tf+2iTT3Y_Or z-!;^0a{kyWtO4vksG_3cyc7HQ0~detf0+2+qxq(e1NS251N}w5iTSrM)`0p8rem!j zZ<hbA{CN2H;rvl^?u=Z#a9)8m2_BTo>56hGD=pHI*B+dd)2B`%|9f0goozCSeXPw3 z+58k~sI02Yz#lOneJzYcG)EB0|F+ggC6D|B`6}d0khAK<z1EteZqA7EX64Ap4|63J zj4Um~{}W6Oi8&OL<FvV6o6oW%_Z}v%WpZ1@U(esz>-gz7U3EGT|M_9$ZINqZjwf>P zJCZ=ogSoE`=yV5YXrcTQZx@Un(64*AlLiyxWnCJ9I<5Nc*eK6eV1Mk}ci0*NrJ=t| zCXuJG`#7GBbPceFtFEpl{(lTm`LX=B_!H+&<jfTRckhNg0e{@1{I9PYT{krFIt@FQ zg+FwG^sp{Y@uzMp4aUaWbr@wX&jIfL%sQAoAlG7w_&aAJ|2mvGb0(1gMt;7hdCnN> z>$*<vlz7PxQ0w-nB#-=5Lba8aRA*erxDLBLmXZInYq6sEvo_D#CSM*dTb3*>Hf}}y zkt@nLXFG9%v**s{z&{H4e?aq<G31K6PCl)5elgO3{9)UrlZrQaZ(c^0v}TWI7z^P2 zsLTIFwM(SQ+9#ebDO2=!Tnny)T?^fZ19!?2&qc&PopnY%cm7<U{45MZe<3%K{ohhL zm~)LF=iB)n^a1x;FCKO9wu8Z+e$vIAGyqou>p%&l#oU8lxUxk2o%K+?aAe6jLojA& z_|J0<-%u^<;NT*%4)n2-OdqfctSl6iCHE?W_Q2zpJken#_xUJlidzs249H=b#g z?}L4-Tnp6)t_5X?_$v)vz`s9@^BME2X@w<>sKZ3=B{%*B$T5Nj%6!-Hr;I!Scj`lH z&2dHFlOISwWJ&S2vf~@I4i~(0*T%OFiuX|eD*nd2utS4$1_JM?zmp>a#CsVy6Er^z zeNNZZDE?R3pM?>~e?H_N`C`hy%m4jb;6L#8=a7l>3eJS2LGgEUxsau-Yh9l~o7=Yh z2mYg3`m5*3Ik|lKQf~euzZlCWzaN&=vHuHtOwK!2@W6)hqq$Zm|7`Nmu%9^F6UH?+ z@2ii+=iJ;ZzhiUKu$QB()nKk3FooI>Jr_IjzY6=qxYy;&mvi7BlQ?t4kRjIhb|2q? zd^K~{-^cxjVSj?<hi6;nFqt>!Xs=Da5IHmFzRj!Kzh~b!?`P7c&T9s77VLYB?8_?F zauM^)p;qFG!9PHLfIsnt43UnmV?Wn?Ki7aXSosgq;f?MYUuSIYwOn(5vWhb{f%$pn z4ySN-z}_%7|B);A@PA5k*7kkdr4xZ@s{e9j+9w<CJ?O>;*RFm;XPDQwx%~;8i<oa^ zexLQs#C;Swe&jxL;2)Pn5quSD44CilIrSXYU_0#4b{VXBL&8lp8{)5e>BzSKTIGKO z{53ZZU*OLr@S5=k;?CM^i#zkxs3Sj%z0U`L%q`qM+t<Pf&d|V}H3F<zNPq^dnLw>P zX$aL;*^g$7<Ue(mJhn9?_FDN)+hp<2y0&!%%(W5co>UyM2Go+_4A+f)IQcy^G$h2E zb?nT$<GLCMXx=#+f8x!0hdAV2X~A_&-#?U7{;x-VC^O92Wb?eSzE+S6RX|=;&pC$< z9g@=0Qq9>XlgTEFJI8GN6NQf%-eVn9mPilRqUbT$pN-|;FEjq@Ao&TxpZg=mEgBHB zU@grU;&sfmqlO=6|G3sU;7t8rbK$?X0y_v9$^{X`m4jZ_BR|B|@?ZCLSPPEzz`w1n zP5nA;4(kQFKm%$enjkkBxM%Y}2si&d|62L)U(dCzCGn56HN+i#6|nV-TGIo0;W;`( zW-y=1KF4dp$$mC_|6}pbb>IHoKQeZajXQB>jVR?u`R>%l1o54?6NnS*arpVopdEF; zeC5J3*M0p`*8lif;!irrcjC?(uExejsi~>4wKYwstGY^N@KY}TujLx`S=Cu+T=!dx zKWlPm->I**E{A*q-Z^FFT5$G%7Ij0_*Mo4-y6~RmyTzUB&l<K=Dpmb{^4-!94u`ca zdNVoO>fae(WZfO>um}mnsDXPEbau-!13!!xd!qh*{C)6&bz0j1I{>y$D-S)b*)J<Y zxc^5t3qJV45B`taZ@>MCPk!=~KL&6Ngin0p6MCOxF2L_R9t8N!$2Wpced<#`y!F;w zKTi5V_kX&X09wAIJ#anfg9Dhn0s7(C6Nj3S-mVn(i|C6ZAV<aixb6h<Sg0H6jw4qU zV~?Bz5!)*lmM-iqJqY1C7nsj&+qP{N{V-~a1^op#4Sw~jUm=fL>q0$hE)874co};g z^hR7pe4lU$P;*ggYc4o&UTQC%liCXooIfkI3TNaBV%t~FRr}yHu7kjQ2J*3;e%;iW zvDVCh8=G80KAeyhCuY2LjrC!Od1rvF7h}zszxGV)&!)6ChP5WAjv-zQAMNJIG!JHS zwl?pLxC-V5II#(hQ`<T9_no>l)ZAp&M0xd4%cxmco*MIk?{BD=BK`1vpc}D39|XlV z{c&0oGdDa~TL2FT4lh=~1NL5O-P~0?V2#ie`v^CnANfGUM!b4F=JkCwd7Q`c8Na2q zJGQQk^?6w}Vg9-{|2047((lAV84uN%sK!N2?V(!_1{{<Jh_kyRt}|;t96pc-^Er3` zo}iC2gMPObPU{|m=x2|p6X&-wXJt%zkSPP3@xa!}dGs%8Jc%(S1BMS)CX6g%9UNV- z>v6rdgZl56f0zDMQ+q)jKzzu^ztsVken;=DjAh6G`Cw`Q4G+BjS+n*=KI~^K{W=%t zbD-rN)O4|*Q~@<#@1Vx$E!0W9`B~IZeFn87sHMXD>$M%|Bh93rdGf1lKo<R02YmTL zqhr<%m_BFM7Fa&y947^SQ}y4{ZAaF|G`@C+sh521)5?cN^cOe0_9@gH-Y$)(pJd(P z_1X@lpSgXfMnLNXGU%rcETRu24v0w?{GLKAA}IoVUkW|qDfm7YI>X3K651t&nhsl= zXxG|%@8}Bbrlp_u#t*DZX<}_0Yb{A9*1Pd_)LtqNwy6xT4pZrOY{s?N4)pPwT(i#y zT%`lRi8U#Ken4fw>H+N`{f#FF<O6FlgJ{<Kj?Q@Wliwb+>?ZxFlLZg7z7#cr4X>id z{9kUD`d2=w_Zlb{^c`5IOxWCZ1k<0T1D1Z31IU0Q2edsZ1K0xv$pQVYq2KEp&#v#Z z?{m@Lin;*S<!No<o1d3X^w>tr(C2sfF^L>{R3cjY`~#)m>Wm$Y|1fzeS0-$(Q^z@} zEO*vlb-<?wRtMA$a{Uv^+e}~R^M`&pP`_w=4t2sW50+lDC-HjPUHYxxaYn6a!kV+c zpX(pPb74a0@ugg}?EV6381FQ7Pgs9Tw;k1Ys~vUZ0Q%wWr;HEDO@F2gSo*u52fF@{ z0q%z~Y=K`6U=z3xA^l!GtVgeR&-iJVe)8J~tTk;$y|}FzXPtY??k~a~!Uo`(3(c&V z#ovwmXW9;9NBlZr@{{g90y1FeXN>^XK9>w&Ef^=Zzo-1AFSP#9zb~X5_+){$(eB4K z8gtW+nl{q+CTh+>v(gWrsP^DB*ge(~Q$AGxJ-eYc1isti%$%nM<_&Ev?%|??PK`$p z{f-PM{Ym8k<$$)(F9)tqz<CJIAM$L1BM%w-GTk@RUOM3L%cGxlX&$hqjP-p4?g8S* zf2wthE%1v3ttI8(g6O9&p&r4WTH3u4^(Uy`C@Z$~Z!QCFO|beXXOCj#AWIfZKZ&zf zwlZ<mX#YOv`9G~&1pUsa&k{hbqt<3(t(AT}<AbzwZ(!($j*x!R8U(=C*57b6bs&@n z(qG`LzmNXS_5(h-GP;nxKcZc<fIT|*=|N!k@%Sua0Na&@Ec*Fei5AudgZ5_Zb=dRL zy5~!dP56w~t?J)Mzt3*i+F{ENmwwIvn;HPhLRoR4kA5Ey0`~*<Tu44!-QpM^3mNiY zd69ec=!ec>FJ?h&Dk<xHrU>@D?Dt{4CHKJWLs8$zy6+(R)pr@0ur)xY{=uXFFzH_> z-F^tN1y(2hG8V)GpDg%wW0Px_ep~nIjD~*HCSxDi0y`H!`V*~RHs^uQsb1*bK<T$Q z`bO#l_@MP@_8AMlIwG!r58^)LK@V~`<U<c)KlBAULJoQm1LD58CzVp$)XfpU%erPW z8sA`jr0x}Uuf#ng_s;N@pg(vtd+S{Ehw)4s))#8cIdmaez5{i`_h`*|+aA>1qGpmd zB1m`Cjw0`nLBF2|umz+a#2X$c?Lj;M?Lj;MUp*d>7j~ayNAyj@SLpeH`)BgRH}byy zyQSat!;U{@O(<<2fp&oQkIy$z`_CQ-)O@RN;QD9T4y|wIJ^%U#(BF%=`i49}j!D-) zkOwPSJaG03SMkE~BzW}b_v>LA&y)EEYO6sbdnTX*$>UF|JhZ&^MSb4}Tgbne_4n+C zwI8<r-Iaf>U4i~PI>7a3{kVa8<kbN6eyGEHKpnx06E+}DNbur?yk^WW2oOhPEHMzw z=X22?2K^zfKk0w-3x<B|f7Kqq?vehsJ&ym&vK>|))*%C0|K+bIbmV~a`|G#+`TU#g zXW;bWIcWsQi9c4X*RUDpIfyoPY)2bI-r9)xulm1CJDkQd6u+f)_N=w1ElgEBjprPF z3o?Ly0RVeY_{<?)|7`m4UeEKeU77W{UX5;9iATSc1JZBhfY1KP&`I@+zH<_On{%uq zN9diKefHP4moxi1V~=fpz8!PYj~a2-Rue*yfn@o1>3~fPVckRMxe2lM8hj!B8F)JO z!`AP6>u>5Y&3o9t0QxBpN<VbL&~J6p@r$}YA`b%i;P8Su%#HYA>E=lJx#NyIbp1gD zzUYBIPYHIv9ngk-Zt~<)62^1Zs1LLYMh@_tP^I7EX-9)Ed0^@y{k65Gp0KRcTmMWw zU|+)qx{#q0SL+4q?Q`i0>COIIF8a0Cf&C`hbMj?LmG9K&iW-?PJt*u)38tTXAP>@R zZL6uH^!RYNq$p>PKz7f-zvg>OKXcZ8h!%Vo@{VUZp|+iUD_xb(N~G|6c#oQK^nHZU zKg#F6<)+`rf~k*Xjjye<Hud7yLjT^qdxgMfvTOvezVxCTF3Oif0G_WIV`7|<P~nWc ze(AR_33^2C!`bid4}IuE|D80@5BovapS?PO_T6`4{db`M<z8uj=gZLlJGJM6&pb2V z_4I~1<lonN^!s_xCx=V%oYNfrBiZ*!d-lDc_piSEqKx(?Wdva3^UN8rzr^2Ta=Q97 zbMnl0{t<JZx`tWn&mJE>+syV{bwU2glMMMs-^ss4`bYaVroXzn`YQUd__UlZL_mLs z(vO}k!~(mi|L+(5&;>r<;|OHnbXBE78LruP;{yBxZ6y7K3)nMo-{6PCI7gQi6+rF_ zkPod!Z8n}q46ykrlQS|hVB<q)&YlUNAEf(Uu_DAf!GkDzUD%_;=Nj{#_Uqt1dtf5y z;SZ7>(}(2Kf7BCZ>Vc;V>ccbk2~NGaf6wGQH@W9&?Zt3v(h*P4xDrN>ex7+jH*+Qg z%^jH$&+*!v{sQ!xkWN4+>|b}qGvEd6ANzgqoVy5Qfws}ef2QqF{iiR5{pT}PS&yjo z>lron#va-p=v;m>WB+XVz|o;UJFdjo5_!RRD|6W{4}A2a#bZ<YY5zOXFUQ`X@ZP(W z{s{U%j85F8y<6<33tE5Ak68a_c;MC|yL{ktG|gVY^ADbn^!84m*MEMxiVt3lk+CKA zNb%h3<?@Xjs4RdF=h6F?ZU20tua_~bKYP8{-xA*Y4e7!9EB(0Udp_^a`hUOO;5Gl# z5jHhr?F00{?z@eCP$vBJ+iSab%;E!Oz$Xi%DibEYrm<#?yF0OWCss@zphsqN`q5Lu zz8>v)gS_`b|KsSH)Sd_JIr%<%n06TX&t{&!H#{)?4W9hlJ`R1>FyugOh3=D_{einr zu(Wf`qTkvED+gEULO0I*Hs%f;&=`=X4;N8Ovf28x$A*11`dmfy2=$+PNqX>XcG`h% zJY&A6@&)*WT^rC(Caj}2+|X|6cICm5h0OK0cGB_!wEKFZJU)OQ+TZ1q2bTx9hxnq& z$9ee|f9|0M^)#E&Pr4)f?o&DMM4w>Ksb{hF(0|wh+5_{vPow{V%TFzU2za&gjttNi zIyR9qA56dX52Qbv2aY^g`U7R43-p`#sO1A=K<Q;83+yZ2l>S2aKgfR+Yu^bQ*i-qu z%0mP;Ap)B~zZgO9lG^`325gOf?iUHF{~7jyGC)3L(eL(SQ70VzR~wLN18tnx(Cz2~ zctBl1kI)wAe+cxWHw*NW-d;=pd+>+wd$a@GBju*wFvabSaP<Ja6qEsn*3Id6d4Rqr z^l|y<AEzB~*WX9~0M>tHiT!o#QFC+wBVwYo3s=y;z1jM+M=Fj!FZM>UzpL-eZzOT( zhmZmEfWa=%KE#V3-ZK5#v!Hz<pvTgWaXk$=0q8wlZ_?`kYW{7!0CX>d{zc^{ctF~- z>DT-U`}5!fk$aj24`#uGdB7r`>oX5tU|d*b|N3V1lXmv%MGrvE(dXG)^-J*LA>$LE z7kut4`zE)v{@Op|(|@i#c>tM!12FQh?}PfA0`Bp%=%*RiXVzLDXnXtE@4B)5uR}a> zbNU}q+712pIrM`k^odG8dKtG$zwHmQI^c}tfjx5?egx3!e%JRm_64e+>`Ra1IRfLb z1KQ`SxmH{cZfyVS5m(&`{V}Y4j6J{b17`h6KWqZ&hfc(<m44z)dfXB6&vU2slR>oR zxM%w!$F(mKy05kY&lco3%zvLCxBW+t*rxO+i=qGMvobx0-<7`VUu)ka`){=ew+Ovt zg%52_{&UbkUA8aJPWsk)gYWV4`dnxI%s?7^fGpq{ZQuu=VH{-t7w~K%_E<8`zS;V- zKTho*>;UQQul^1GT^HCt@I-q?)&4!QDgBndn?3sNKYKCQFU4LGKJ$n@Je$&w9@E$X z^p@iJ(v<nWs((bE+M|w5L=Us_;lY2i^s{%yg6)%J4-lXC#CZGW^gpJ(s_ajV?!O=O z|C7?MHi32l&s(N{*pmI<M2@dV_Wj@S_qE!d#UR?*C(6D*_Cak*KlNXGMIrBy1N}FN z@XUh*`bF7$*>&`1(tq~1zc>0Vow-KR&vm!GUzT?Eqgnc)leZ9p)-Z*C!zqb=-$XG0 z^!8RfuQs5s>Q~qcz92(a_Q+KH?C*vCTr~UdTiR`JGuNH8v(J|FTiSEcPrBpmHRtmd zI2Jng0J=bXK);YY^rM?jzn?~X-Pe`GbAy{D)Y6D&1GY-EBcy%Bq?bKh?A>DD9DD!p z?{q02wno2sraGUkZv5dx+J8)&K$)No43Zr(*S`FEdL!4C)}WE}vJd%{S6-3VUw>Wp z?Aasv`T0^%P$2vE?L+Qhj~qB~K%eW)xH(=b_jU}TLD&BP*Pc9hz@Z=e0nkpLkWl}> z_5J^i(9Z7$(XG9~I3sY)`OGZ#_L06+Dy4E>UstcP-rU@xJ$&rxvo!n1Ao`P~KLU-8 z{zDgN4-&A6N!kPSYbQ&7sLufi`YtE2uN$S?e&5n>Y4(q#|KP!cc1j)T^QrUXMPFaP z_SoYO8S8G}Z$?AL4`;pE?7J5K8yWqy23>cCT2<b;m*$JK^VtIU_Y$NB`p^DNyaH+G z{mp3Lmvg;t<h!|kGyA^37d!i!w9>{=-)+A$X^-I9=e!@J@A&-;Ufc)`H}c(VI&;0x zrrGv()5mjP%jXzS{^|29?bLNXS0bC%p!YXI!;O457rjCEEzMkGf~B3$T}dXBO23tP z+Ci>;5UoM?C@bU@f9G1^X3=ly&ZeFH<@|RnOG--A&)fd)AUgjw?%izq{p(KJ`EP0v z2mU)P!+3t@X14DA=E2RR-|p${GZ9ETX=d+kJRZL$nSa0daI@&oUUxnZg0xd_xu>Vz lzF#z5%kSKX?YLH3ll^(hI(_`L*t#Iva2Ede*Z;>H_<!%{oZJ8a diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml deleted file mode 100644 index 21b7fe2734..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Account/LogOut.cshtml +++ /dev/null @@ -1,15 +0,0 @@ -@page -@using Microsoft.AspNetCore.Identity -@attribute [IgnoreAntiforgeryToken] -@inject SignInManager<IdentityUser> SignInManager -@functions { - public async Task<IActionResult> OnPost() - { - if (SignInManager.IsSignedIn(User)) - { - await SignInManager.SignOutAsync(); - } - - return Redirect("~/"); - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml deleted file mode 100644 index a4f854aac3..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Areas/Identity/Pages/Shared/_LoginPartial.cshtml +++ /dev/null @@ -1,27 +0,0 @@ -@using Microsoft.AspNetCore.Identity -@inject SignInManager<IdentityUser> SignInManager -@inject UserManager<IdentityUser> UserManager -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers - -<ul class="navbar-nav"> -@if (SignInManager.IsSignedIn(User)) -{ - <li class="nav-item"> - <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity.Name!</a> - </li> - <li class="nav-item"> - <form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post"> - <button type="submit" class="nav-link btn btn-link text-dark">Logout</button> - </form> - </li> -} -else -{ - <li class="nav-item"> - <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register">Register</a> - </li> - <li class="nav-item"> - <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login">Login</a> - </li> -} -</ul> diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs deleted file mode 100644 index 6c27a4ad7c..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/UserController.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using BlazorWasm_CSharp.Shared.Authorization; - -namespace BlazorWasm_CSharp.Server.Controllers -{ - [ApiController] - public class UserController : ControllerBase - { - [HttpGet("/User")] - [Authorize] - [AllowAnonymous] - public IActionResult GetCurrentUser() => - Ok(User.Identity.IsAuthenticated ? CreateUserInfo(User) : UserInfo.Anonymous); - - private UserInfo CreateUserInfo(ClaimsPrincipal claimsPrincipal) - { - if (!claimsPrincipal.Identity.IsAuthenticated) - { - return UserInfo.Anonymous; - } - - var userInfo = new UserInfo(); - userInfo.IsAuthenticated = true; - - if (claimsPrincipal.Identity is ClaimsIdentity claimsIdentity) - { - userInfo.NameClaimType = claimsIdentity.NameClaimType; - userInfo.RoleClaimType = claimsIdentity.RoleClaimType; - } - else - { - userInfo.NameClaimType = "name"; - userInfo.RoleClaimType = "roles"; - } - - if (claimsPrincipal.Claims.Any()) - { - var claims = new List<ClaimValue>(); - var nameClaims = claimsPrincipal.FindAll(userInfo.NameClaimType); - foreach (var claim in nameClaims) - { - claims.Add(new ClaimValue(userInfo.NameClaimType, claim.Value)); - } - - // Uncomment this code if you want to send additional claims to the client. - //foreach (var claim in claimsPrincipal.Claims.Except(nameClaims)) - //{ - // claims.Add(new ClaimValue(claim.Type, claim.Value)); - //} - - userInfo.Claims = claims; - } - - return userInfo; - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs index c6f2eb0ece..6862c16a71 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Controllers/WeatherForecastController.cs @@ -3,17 +3,11 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -#if (!NoAuth) -using Microsoft.AspNetCore.Authorization; -#endif using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; namespace BlazorWasm_CSharp.Server.Controllers { -#if (!NoAuth) - [Authorize] -#endif [ApiController] [Route("[controller]")] public class WeatherForecastController : ControllerBase diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs deleted file mode 100644 index 81390814c5..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/ApplicationDbContext.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore; - -namespace BlazorWasm_CSharp.Server.Data -{ - public class ApplicationDbContext : IdentityDbContext - { - public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) - : base(options) - { - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs deleted file mode 100644 index 7bea3b5b34..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.Designer.cs +++ /dev/null @@ -1,270 +0,0 @@ -// <auto-generated /> -using System; -using BlazorWasm_CSharp.Server.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace BlazorWasm_CSharp.Server.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("00000000000000_CreateIdentitySchema")] - partial class CreateIdentitySchema - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.0.0"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property<string>("Id") - .HasColumnType("TEXT"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property<string>("Name") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<string>("NormalizedName") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property<string>("ClaimType") - .HasColumnType("TEXT"); - - b.Property<string>("ClaimValue") - .HasColumnType("TEXT"); - - b.Property<string>("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => - { - b.Property<string>("Id") - .HasColumnType("TEXT"); - - b.Property<int>("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property<string>("Email") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<bool>("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property<bool>("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property<DateTimeOffset?>("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property<string>("NormalizedEmail") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<string>("NormalizedUserName") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<string>("PasswordHash") - .HasColumnType("TEXT"); - - b.Property<string>("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property<bool>("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property<string>("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property<bool>("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property<string>("UserName") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property<string>("ClaimType") - .HasColumnType("TEXT"); - - b.Property<string>("ClaimValue") - .HasColumnType("TEXT"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.Property<string>("LoginProvider") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("ProviderKey") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("TEXT"); - - b.Property<string>("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("TEXT"); - - b.Property<string>("LoginProvider") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("Name") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs deleted file mode 100644 index 1df0c12752..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/00000000000000_CreateIdentitySchema.cs +++ /dev/null @@ -1,217 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace BlazorWasm_CSharp.Server.Data.Migrations -{ - public partial class CreateIdentitySchema : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column<string>(nullable: false), - Name = table.Column<string>(maxLength: 256, nullable: true), - NormalizedName = table.Column<string>(maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetUsers", - columns: table => new - { - Id = table.Column<string>(nullable: false), - UserName = table.Column<string>(maxLength: 256, nullable: true), - NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true), - Email = table.Column<string>(maxLength: 256, nullable: true), - NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), - EmailConfirmed = table.Column<bool>(nullable: false), - PasswordHash = table.Column<string>(nullable: true), - SecurityStamp = table.Column<string>(nullable: true), - ConcurrencyStamp = table.Column<string>(nullable: true), - PhoneNumber = table.Column<string>(nullable: true), - PhoneNumberConfirmed = table.Column<bool>(nullable: false), - TwoFactorEnabled = table.Column<bool>(nullable: false), - LockoutEnd = table.Column<DateTimeOffset>(nullable: true), - LockoutEnabled = table.Column<bool>(nullable: false), - AccessFailedCount = table.Column<int>(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column<int>(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - RoleId = table.Column<string>(nullable: false), - ClaimType = table.Column<string>(nullable: true), - ClaimValue = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column<int>(nullable: false) - .Annotation("Sqlite:Autoincrement", true), - UserId = table.Column<string>(nullable: false), - ClaimType = table.Column<string>(nullable: true), - ClaimValue = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column<string>(maxLength: 128, nullable: false), - ProviderKey = table.Column<string>(maxLength: 128, nullable: false), - ProviderDisplayName = table.Column<string>(nullable: true), - UserId = table.Column<string>(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column<string>(nullable: false), - RoleId = table.Column<string>(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column<string>(nullable: false), - LoginProvider = table.Column<string>(maxLength: 128, nullable: false), - Name = table.Column<string>(maxLength: 128, nullable: false), - Value = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "AspNetUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - - migrationBuilder.DropTable( - name: "AspNetRoles"); - - migrationBuilder.DropTable( - name: "AspNetUsers"); - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs deleted file mode 100644 index 01098a9b9f..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlLite/ApplicationDbContextModelSnapshot.cs +++ /dev/null @@ -1,268 +0,0 @@ -// <auto-generated /> -using System; -using BlazorWasm_CSharp.Server.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace BlazorWasm_CSharp.Server.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - partial class ApplicationDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.0.0"); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property<string>("Id") - .HasColumnType("TEXT"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property<string>("Name") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<string>("NormalizedName") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property<string>("ClaimType") - .HasColumnType("TEXT"); - - b.Property<string>("ClaimValue") - .HasColumnType("TEXT"); - - b.Property<string>("RoleId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => - { - b.Property<string>("Id") - .HasColumnType("TEXT"); - - b.Property<int>("AccessFailedCount") - .HasColumnType("INTEGER"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("TEXT"); - - b.Property<string>("Email") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<bool>("EmailConfirmed") - .HasColumnType("INTEGER"); - - b.Property<bool>("LockoutEnabled") - .HasColumnType("INTEGER"); - - b.Property<DateTimeOffset?>("LockoutEnd") - .HasColumnType("TEXT"); - - b.Property<string>("NormalizedEmail") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<string>("NormalizedUserName") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.Property<string>("PasswordHash") - .HasColumnType("TEXT"); - - b.Property<string>("PhoneNumber") - .HasColumnType("TEXT"); - - b.Property<bool>("PhoneNumberConfirmed") - .HasColumnType("INTEGER"); - - b.Property<string>("SecurityStamp") - .HasColumnType("TEXT"); - - b.Property<bool>("TwoFactorEnabled") - .HasColumnType("INTEGER"); - - b.Property<string>("UserName") - .HasColumnType("TEXT") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property<string>("ClaimType") - .HasColumnType("TEXT"); - - b.Property<string>("ClaimValue") - .HasColumnType("TEXT"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.Property<string>("LoginProvider") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("ProviderKey") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("ProviderDisplayName") - .HasColumnType("TEXT"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("TEXT"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("TEXT"); - - b.Property<string>("RoleId") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("TEXT"); - - b.Property<string>("LoginProvider") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("Name") - .HasColumnType("TEXT") - .HasMaxLength(128); - - b.Property<string>("Value") - .HasColumnType("TEXT"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs deleted file mode 100644 index f1d1fc3f8c..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.Designer.cs +++ /dev/null @@ -1,277 +0,0 @@ -// <auto-generated /> -using System; -using BlazorWasm_CSharp.Server.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace BlazorWasm_CSharp.Server.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("00000000000000_CreateIdentitySchema")] - partial class CreateIdentitySchema - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property<string>("Id") - .HasColumnType("nvarchar(450)"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property<string>("Name") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<string>("NormalizedName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - b.Property<string>("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => - { - b.Property<string>("Id") - .HasColumnType("nvarchar(450)"); - - b.Property<int>("AccessFailedCount") - .HasColumnType("int"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property<string>("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<bool>("EmailConfirmed") - .HasColumnType("bit"); - - b.Property<bool>("LockoutEnabled") - .HasColumnType("bit"); - - b.Property<DateTimeOffset?>("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property<string>("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<string>("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<string>("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property<bool>("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property<string>("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property<bool>("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property<string>("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - b.Property<string>("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.Property<string>("LoginProvider") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("ProviderKey") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property<string>("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property<string>("LoginProvider") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs deleted file mode 100644 index eb6f88d7cb..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/00000000000000_CreateIdentitySchema.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace BlazorWasm_CSharp.Server.Data.Migrations -{ - public partial class CreateIdentitySchema : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "AspNetRoles", - columns: table => new - { - Id = table.Column<string>(nullable: false), - Name = table.Column<string>(maxLength: 256, nullable: true), - NormalizedName = table.Column<string>(maxLength: 256, nullable: true), - ConcurrencyStamp = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoles", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetUsers", - columns: table => new - { - Id = table.Column<string>(nullable: false), - UserName = table.Column<string>(maxLength: 256, nullable: true), - NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true), - Email = table.Column<string>(maxLength: 256, nullable: true), - NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), - EmailConfirmed = table.Column<bool>(nullable: false), - PasswordHash = table.Column<string>(nullable: true), - SecurityStamp = table.Column<string>(nullable: true), - ConcurrencyStamp = table.Column<string>(nullable: true), - PhoneNumber = table.Column<string>(nullable: true), - PhoneNumberConfirmed = table.Column<bool>(nullable: false), - TwoFactorEnabled = table.Column<bool>(nullable: false), - LockoutEnd = table.Column<DateTimeOffset>(nullable: true), - LockoutEnabled = table.Column<bool>(nullable: false), - AccessFailedCount = table.Column<int>(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUsers", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "AspNetRoleClaims", - columns: table => new - { - Id = table.Column<int>(nullable: false) - .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - RoleId = table.Column<string>(nullable: false), - ClaimType = table.Column<string>(nullable: true), - ClaimValue = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetRoleClaims_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserClaims", - columns: table => new - { - Id = table.Column<int>(nullable: false) - .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - UserId = table.Column<string>(nullable: false), - ClaimType = table.Column<string>(nullable: true), - ClaimValue = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserClaims", x => x.Id); - table.ForeignKey( - name: "FK_AspNetUserClaims_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserLogins", - columns: table => new - { - LoginProvider = table.Column<string>(maxLength: 128, nullable: false), - ProviderKey = table.Column<string>(maxLength: 128, nullable: false), - ProviderDisplayName = table.Column<string>(nullable: true), - UserId = table.Column<string>(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey }); - table.ForeignKey( - name: "FK_AspNetUserLogins_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserRoles", - columns: table => new - { - UserId = table.Column<string>(nullable: false), - RoleId = table.Column<string>(nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId }); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetRoles_RoleId", - column: x => x.RoleId, - principalTable: "AspNetRoles", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_AspNetUserRoles_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column<string>(nullable: false), - LoginProvider = table.Column<string>(maxLength: 128, nullable: false), - Name = table.Column<string>(maxLength: 128, nullable: false), - Value = table.Column<string>(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - table.ForeignKey( - name: "FK_AspNetUserTokens_AspNetUsers_UserId", - column: x => x.UserId, - principalTable: "AspNetUsers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_AspNetRoleClaims_RoleId", - table: "AspNetRoleClaims", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName", - unique: true, - filter: "[NormalizedName] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserClaims_UserId", - table: "AspNetUserClaims", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserLogins_UserId", - table: "AspNetUserLogins", - column: "UserId"); - - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_RoleId", - table: "AspNetUserRoles", - column: "RoleId"); - - migrationBuilder.CreateIndex( - name: "EmailIndex", - table: "AspNetUsers", - column: "NormalizedEmail"); - - migrationBuilder.CreateIndex( - name: "UserNameIndex", - table: "AspNetUsers", - column: "NormalizedUserName", - unique: true, - filter: "[NormalizedUserName] IS NOT NULL"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "AspNetRoleClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserClaims"); - - migrationBuilder.DropTable( - name: "AspNetUserLogins"); - - migrationBuilder.DropTable( - name: "AspNetUserRoles"); - - migrationBuilder.DropTable( - name: "AspNetUserTokens"); - - migrationBuilder.DropTable( - name: "AspNetRoles"); - - migrationBuilder.DropTable( - name: "AspNetUsers"); - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs deleted file mode 100644 index 07026c1264..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Data/SqlServer/ApplicationDbContextModelSnapshot.cs +++ /dev/null @@ -1,275 +0,0 @@ -// <auto-generated /> -using System; -using BlazorWasm_CSharp.Server.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace BlazorWasm_CSharp.Server.Data.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - partial class ApplicationDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property<string>("Id") - .HasColumnType("nvarchar(450)"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property<string>("Name") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<string>("NormalizedName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - b.Property<string>("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => - { - b.Property<string>("Id") - .HasColumnType("nvarchar(450)"); - - b.Property<int>("AccessFailedCount") - .HasColumnType("int"); - - b.Property<string>("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property<string>("Email") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<bool>("EmailConfirmed") - .HasColumnType("bit"); - - b.Property<bool>("LockoutEnabled") - .HasColumnType("bit"); - - b.Property<DateTimeOffset?>("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property<string>("NormalizedEmail") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<string>("NormalizedUserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.Property<string>("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("PhoneNumber") - .HasColumnType("nvarchar(max)"); - - b.Property<bool>("PhoneNumberConfirmed") - .HasColumnType("bit"); - - b.Property<string>("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property<bool>("TwoFactorEnabled") - .HasColumnType("bit"); - - b.Property<string>("UserName") - .HasColumnType("nvarchar(256)") - .HasMaxLength(256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.Property<int>("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - b.Property<string>("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.Property<string>("LoginProvider") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("ProviderKey") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property<string>("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property<string>("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.Property<string>("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property<string>("LoginProvider") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("Name") - .HasColumnType("nvarchar(128)") - .HasMaxLength(128); - - b.Property<string>("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs index eb96bae0e8..ac46fb46dd 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/Startup.cs @@ -1,53 +1,18 @@ using Microsoft.AspNetCore.Builder; -#if (IndividualLocalAuth) -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Identity.UI; -#endif -#if (RequiresHttps) -using Microsoft.AspNetCore.HttpsPolicy; -#endif using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.ResponseCompression; -#if (IndividualLocalAuth) -using Microsoft.EntityFrameworkCore; -#endif -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using System.Linq; -#if (IndividualLocalAuth) -using BlazorWasm_CSharp.Server.Data; -#endif namespace BlazorWasm_CSharp.Server { public class Startup { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - // This method gets called by the runtime. Use this method to add services to the container. // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 public void ConfigureServices(IServiceCollection services) { -#if (IndividualLocalAuth) - services.AddDbContext<ApplicationDbContext>(options => -#if (UseLocalDB) - options.UseSqlServer( - Configuration.GetConnectionString("DefaultConnection"))); -#else - options.UseSqlite( - Configuration.GetConnectionString("DefaultConnection"))); -#endif - services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true) - .AddEntityFrameworkStores<ApplicationDbContext>(); - -#endif services.AddMvc(); services.AddResponseCompression(opts => { @@ -64,41 +29,17 @@ namespace BlazorWasm_CSharp.Server if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); -#if (IndividualLocalAuth) - app.UseDatabaseErrorPage(); -#endif app.UseBlazorDebugging(); } - else - { - app.UseExceptionHandler("/Error"); -#if (RequiresHttps) - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); - } - app.UseHttpsRedirection(); -#else - } - -#endif app.UseStaticFiles(); app.UseClientSideBlazorFiles<Client.Program>(); app.UseRouting(); -#if (IndividualLocalAuth) - app.UseAuthentication(); - app.UseAuthorization(); - -#endif app.UseEndpoints(endpoints => { -#if (IndividualLocalAuth) - endpoints.MapRazorPages(); -#endif - endpoints.MapControllers(); - + endpoints.MapDefaultControllerRoute(); endpoints.MapFallbackToClientSideBlazor<Client.Program>("index.html"); }); } diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/app.db b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/app.db deleted file mode 100644 index ec163057f1f5433ac77fa2fea05aa4a544e6ded0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 106496 zcmeI)UvJyi83$m|b|g!-Eay+dt-w&02G$6+i)2IL6<Ft~GL;aPDMyk68%3cp5|a>- zL`S5Yx<CuaZh{m8cDb8=g8>5y<hpn5%`UgAeTrQ+Los0I@Q@-8MOhBo42$p+;zZ;j z4_`j-dk!U&NbPpnbPVa9)$8bv^y|cOLJ$(am!w1@F++adBtQOZnY@|v7s$Ut=>532 zGl}(oKf6FT&iz2Q`C0CVrLPtbvtOpaUwnW5^ZB*p^SN)6y_v7)p3JDicS0fY&A6^& z)(?csDY39F4Bj@oE#nh)zfrIcHN)Anjb7QhZ+7hleXF*jtFIKRN};Yus<x%<OY-;~ zWvQY`a&&iDx+b%Z<@`XnG&Y7}TQ@tSF|gH_&xnEBF&YDF<YTxP8$;D<8(vrRt?v-5 zzBDF=V2cLZF&snCNMrEY^Tu*Yd}l=%WZhKIwVK{BRGJsYM_1Vw`2%vBMUP?A?loGN zZSzy3MZ1&pr`4sDxVkDl{m9Ypwv8Y&ZugPJoOiT(;lr{LPNTaq={}p0$ji^AR9E)v zl2#!<d*$+)*GRWjTXJk;v7*)L)q<+kC3$x{RDIq7cB|@6p?V-~D+fWztVu&O?-=23 zN+aEP-MU>4(^0Ba74@d(_3Xu%m#RuhsVZ7gsrjetMRH9h=a8q>yrq;CQu@V0tytJn zUM2!s@_seT5+8v-9AYAHccZzCk06`Le~?Rxw^xOPTRQfmHkpwcdf&0!<)~`oMkLG2 zr>l!8aeZBQnvT>2n*)N)*>ZMVRj}ruEZpVYo^@olj9z>J$bR#-aXev*Ez>@1>&I>x zyT#-em`C?=1?I=fR~R2LDYS5S`ANBEeTKYWNwPPyNwKy*IoVz`p=`4?OD9JQZn~em z6-hUn>VkB$<;8L79?qlQK&OM8jAZ4eQXNhLQg~=`Bi!FRoPfe!y`pO5csq(#_tWcc zSU)~ASbcD-@96D*Wc_)oftx2-Ft0juyO|`NdJkN7Z<yM~qrTB?8j-~X4n5L%txKlz zHL_>^<S0FwN;+e)6Jn_hmNQ(h-eoyx4o2?zQyJd-r%om9n?@3MSqazGFqJ_tuXN5Q zGwv6gsg$^~B0N(fW5^DMk3Ap9?a$_+LBpNj_z^>{=OJN#92A<Qc<hpHwvATN>UW*d zLFjK<w7SiHuSd%5xaR1cLw-Oh9nwe4Dzeu-v)3_VMz`N_*=jzt`i|12A1ThWotIR9 z|KLMPOb|gMr5m08cXiu-Z1q~Vbo&7x{_X>-YiRw>UH|IiA1~B!j<c&7M9p;K%<7M= zlHPQz-o#VqV<#2#-h5J2S0+#6cKCX2r%$e4a7X-UBT{&E>!HyNRUcbUjw?ad9E|w0 zrcIf@EXIyUIY`WK^7pw%XX)_h<*o{TSfN7aKKSvGkPEbX*gWyvOrGzu$c_+3WouFc zZPp#qC(V#7ol!hg_w8Jqr`r-xj!aqcL)zObbf&)7+2b^T_O}m4NYF+rY;JOexk30C z?!tw^zK{|(HiVOk>(FQ@r5*ErPj^hKYu_?$QtijFD`$9{*lhx(VV@JZ#&i?|M?S5! z`c3B!`It?Dja)d0h&q!LKi(KO=3<Z2xDmU0mVKMPx{xJrgxo(8<PTmDfB*y_009U< z00Izz00bZa0SLT40;|GoO}x&%8pWQWJLH$qM%SUg32Z(vI{J-wufO}N3^^|$_s<0R zgBJuK009U<00Izz00bZa0SG_<0<W9EFK26M?sov!V}A)i@BfpB{_%nU1Rwwb2tWV= z5P$##AOHafKwydm=>30u|DWOn<J2Gk0SG_<0uX=z1Rwwb2tWV=L;&~yQ3eoz00bZa z0SG_<0uX=z1Rwx`=@-EL|LM;$&JY3+fB*y_009U<00Izz00ba_`~Ro`2tWV=5P$## zAOHafKmY;|fWY(%;Qs&g=NM-Q0SG_<0uX=z1Rwwb2tWV=5WxL^)Bpq^009U<00Izz z00bZa0SG`~`UUX)fBJKbGlT#HAOHafKmY;|fB*y_009W#`#)*`0uX=z1Rwwb2tWV= z5P$##ATa#``2IirImQ`600Izz00bZa0SG_<0uX=z1n~d=p#~rT0SG_<0uX=z1Rwwb z2tWV=(=UMg|I?pioFN1t009U<00Izz00bZa0SG_<_y17?5P$##AOHafKmY;|fB*y_ z0D<Wj!1w>@&oRyr0uX=z1Rwwb2tWV=5P$##Ab{`xr~wE-00Izz00bZa0SG_<0uX?} z^b6qo|Mce=X9xiZKmY;|fB*y_009U<00I!e_kYv?1Rwwb2tWV=5P$##AOHafKw$a> z@cn=KbBr^D00bZa0SG_<0uX=z1Rwwb2xN0F5(~-aiKV~i{+j*U(pQUz*)P-IFTOwj z`TSb)`P{e3-pto?Pi9o%JE4&HCh<F7?6WH=adTA|{KD+Ej8D}4M!`PR3}??adR41! z*bVx(+KQ}wqgYi6bwyIOEoEPl$L=Oe6-|;OJIm5Fne{5?2g2o)SXdVZZ;u|oY~44z zc7uiz4uGw`az+H)j?oZUBaMM|Ok=n-HilwbH#?&-u+^8(h=JQN8Ut(OW4IU_19kGc z3MV31eQ8V#!4_Ty!!ZPn;anKYDe;{ZVUTrGLATNLj-k@JU>T&V?2G&Xxy_=-uxa<2 z)$8bO^HZZmyOZ;|7jv`X>Z<VcBS*j6HX_9lS<HDys~0{jD{+;S%}C_s=TfRG`*lgH zke|JBdChC2F{&*&wy{{zYV~SC)#{SGyB)25S=z0tJB8|jw5=QjC9@_C3)nkGxSP^Q zH(s}{-!L7eN>x#BYF^J?jCrZ5l$5HX6_uKQy6$dNlAJ@H4yY}qtdPN1EYymHE#+k* zpe65Dvn=ru_`@M40(ZCZ5o9y@4{}NI_NtI@OUHiHHXWm(_Z`b!j;c0pM6$e`dm;Qw zTwfQSrXw}MMr*J+Th5NFis9h)GVd<$_N*hbW%S|;K=zxrjpGShY?=09TR(Qo*exc% zz&yH_D=<G+zQXv3Nuh<q%TLNR>oes2N|L>qO^UVk$;tMj31yqDSvomdNYQjZc`K4` zHq`~`X3LA?(mk9<y>!z-PDZkFQ>hLo0VzB*xe@N~9Zo=DuU=6#a=aZytNZD7H>@8Y z8mvCJ)pzuEKeGP3)xgaYESOiFx!p{XPQ3>%yEja2<5Az}HjT*Q0*4-Hyw)XC`5M_X ze{z%_O(mVN*a@*z2Fn?)SMQTS&`jo-mriAP@1HuAwD0p=IfkhWf_bHLKACa9*i5Cw zl@;Nc5*b5wFnsL!IBtJ74@q;E&G93KT+c(o{x~Q!N%7bv-E14JqSfy@ql3`jv}kpk z{a%lh+i}g&JBR#$QaYrMm{nx2duFd=#Efpg<FeI!X!RYXOFvSaXFKoXfWLq6Atfe= zppnvzPXD{QZ9lepty{YNfDeE7fz>s%e&?=#_3@7vYB<N))eNF$I&o(8$5u&iI#zGu zsq?Xu3VLroDXJ@zr*S)cy|&XQS1-6D{<IM(yt?(!=!U9~Ehop7AZrdr{8`hc%wHB` zFSK%ynBnB_bC1r_W3LK+SfN7aKKSvGkPEbX*gWyvOrGzu$c_+3WouFcZPp#qC(V#7 zol!hg_w8Jqr`r-xj!aqcL)zObbf&)7+2b^T_O}m4NYF+rY;JOexk30C?!tw^zK{|( zHiVOk>(FQ@r5*ErPj^hKYu_?$QtijFD`$9{*lhx(VV@JZ#&i?|M?S5!`c3B!`It?D zWs||M8i|NHlN3MR7&qo(kJGpjyLy&<kDsUC<#GR?|BVKgAOHafKmY;|fB*y_009U< z00Pq}kR>OzIRBf(Qg!L#;%^uJv+(DIOPN1qGU-327w7*%8t{Su1Rwwb2tWV=p1`5V z9`{;tpV9H}4u&50qO0sTy;~}KntFS0_`n~xb@-_-cOP<#CG^ynzpb4A!_}1dHhI7- z?H<v+(HcG6&%MKW4;BX7OgIR;Yn%V<jR{XP(qO_56S_B?ME;;LPcyRJqA_^)&w?ij z@h~MGresfy<o`zxQ~t>3?oO*qDLjiAeG-z6YjRKcb$u4|M?ao-y1M8-;en?yM;`Y0 zKYSV!_y6&c4gwH>00bZa0SG_<0uX=z1RyZ|0{H$v{W-=NLI45~fB*y_009U<00Izz H00jOE{cSD9 diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json deleted file mode 100644 index 8983e0fc1c..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json deleted file mode 100644 index fbfae3faee..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Server/appsettings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ -////#if (IndividualLocalAuth) -// "ConnectionStrings": { -////#if (UseLocalDB) -// "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-BlazorServerWeb-CSharp-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true" -////#else -// "DefaultConnection": "DataSource=app.db" -////#endif -// }, -////#endif - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs deleted file mode 100644 index de28f359b4..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/ClaimValue.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace BlazorWasm_CSharp.Shared.Authorization -{ - public class ClaimValue - { - public ClaimValue() - { - } - - public ClaimValue(string type, string value) - { - Type = type; - Value = value; - } - - public string Type { get; set; } - public string Value { get; set; } - } -} diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs deleted file mode 100644 index c21d8b50d6..0000000000 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Shared/Authorization/UserInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; - -namespace BlazorWasm_CSharp.Shared.Authorization -{ - public class UserInfo - { - public static readonly UserInfo Anonymous = new UserInfo(); - - public bool IsAuthenticated { get; set; } - - public string NameClaimType { get; set; } - - public string RoleClaimType { get; set; } - - public ICollection<ClaimValue> Claims { get; set; } - } -} diff --git a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs index 238385bf17..41cb82ac21 100644 --- a/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs +++ b/src/ProjectTemplates/test/BlazorWasmTemplateTest.cs @@ -1,7 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.IO; using System.Net; using System.Threading; @@ -91,64 +90,7 @@ namespace Templates.Test } } - [Theory] - [InlineData(true)] - [InlineData(false)] - public async Task BlazorWasmHostedTemplate_IndividualAuth_Works(bool useLocalDb) - { - var project = await ProjectFactory.GetOrCreateProject("blazorhostedindividual" + (useLocalDb ? "uld" : ""), Output); - - var createResult = await project.RunDotNetNewAsync("blazorwasm", args: new[] { "--hosted", "-au", "Individual", useLocalDb ? "-uld" : "" }); - Assert.True(0 == createResult.ExitCode, ErrorMessages.GetFailedProcessMessage("create/restore", project, createResult)); - - var serverProject = GetSubProject(project, "Server", $"{project.ProjectName}.Server"); - - var serverProjectFileContents = ReadFile(serverProject.TemplateOutputDir, $"{serverProject.ProjectName}.csproj"); - if (!useLocalDb) - { - Assert.Contains(".db", serverProjectFileContents); - } - var publishResult = await serverProject.RunDotNetPublishAsync(); - Assert.True(0 == publishResult.ExitCode, ErrorMessages.GetFailedProcessMessage("publish", serverProject, publishResult)); - - // Run dotnet build after publish. The reason is that one uses Config = Debug and the other uses Config = Release - // The output from publish will go into bin/Release/netcoreappX.Y/publish and won't be affected by calling build - // later, while the opposite is not true. - - var buildResult = await serverProject.RunDotNetBuildAsync(); - Assert.True(0 == buildResult.ExitCode, ErrorMessages.GetFailedProcessMessage("build", serverProject, buildResult)); - - var migrationsResult = await serverProject.RunDotNetEfCreateMigrationAsync("blazorwasm"); - Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", serverProject, migrationsResult)); - serverProject.AssertEmptyMigration("blazorwasm"); - - if (useLocalDb) - { - using var dbUpdateResult = await serverProject.RunDotNetEfUpdateDatabaseAsync(); - Assert.True(0 == dbUpdateResult.ExitCode, ErrorMessages.GetFailedProcessMessage("update database", serverProject, dbUpdateResult)); - } - - await BuildAndRunTest(project.ProjectName, serverProject, usesAuth: true); - - using var aspNetProcess = serverProject.StartPublishedProjectAsync(); - - Assert.False( - aspNetProcess.Process.HasExited, - ErrorMessages.GetFailedProcessMessageOrEmpty("Run published project", serverProject, aspNetProcess.Process)); - - await aspNetProcess.AssertStatusCode("/", HttpStatusCode.OK, "text/html"); - if (BrowserFixture.IsHostAutomationSupported()) - { - aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(project.ProjectName, usesAuth: true); - } - else - { - BrowserFixture.EnforceSupportedConfigurations(); - } - } - - protected async Task BuildAndRunTest(string appName, Project project, bool usesAuth = false) + protected async Task BuildAndRunTest(string appName, Project project) { using var aspNetProcess = project.StartBuiltProjectAsync(); @@ -160,7 +102,7 @@ namespace Templates.Test if (BrowserFixture.IsHostAutomationSupported()) { aspNetProcess.VisitInBrowser(Browser); - TestBasicNavigation(appName, usesAuth); + TestBasicNavigation(appName); } else { @@ -168,7 +110,7 @@ namespace Templates.Test } } - private void TestBasicNavigation(string appName, bool usesAuth = false) + private void TestBasicNavigation(string appName) { // Give components.server enough time to load so that it can replace // the prerendered content before we start making assertions. @@ -191,40 +133,6 @@ namespace Templates.Test Browser.FindElement(By.CssSelector("p+button")).Click(); Browser.Equal("Current count: 1", () => Browser.FindElement(By.CssSelector("h1 + p")).Text); - if (usesAuth) - { - Browser.FindElement(By.PartialLinkText("Log in")).Click(); - Browser.Contains("/Identity/Account/Login", () => Browser.Url); - - Browser.FindElement(By.PartialLinkText("Register as a new user")).Click(); - - var userName = $"{Guid.NewGuid()}@example.com"; - var password = $"!Test.Password1$"; - Browser.Exists(By.Name("Input.Email")); - Browser.FindElement(By.Name("Input.Email")).SendKeys(userName); - Browser.FindElement(By.Name("Input.Password")).SendKeys(password); - Browser.FindElement(By.Name("Input.ConfirmPassword")).SendKeys(password); - Browser.FindElement(By.Id("registerSubmit")).Click(); - - // We will be redirected to the RegisterConfirmation - Browser.Contains("/Identity/Account/RegisterConfirmation", () => Browser.Url); - Browser.FindElement(By.PartialLinkText("Click here to confirm your account")).Click(); - - // We will be redirected to the ConfirmEmail - Browser.Contains("/Identity/Account/ConfirmEmail", () => Browser.Url); - - // Now we can login - Browser.FindElement(By.PartialLinkText("Login")).Click(); - Browser.Exists(By.Name("Input.Email")); - Browser.FindElement(By.Name("Input.Email")).SendKeys(userName); - Browser.FindElement(By.Name("Input.Password")).SendKeys(password); - Browser.FindElement(By.Id("login-submit")).Click(); - - // Need to navigate to fetch page - Browser.Navigate().GoToUrl(new Uri(Browser.Url).GetLeftPart(UriPartial.Authority)); - Browser.Equal(appName.Trim(), () => Browser.Title.Trim()); - } - // Can navigate to the 'fetch data' page Browser.FindElement(By.PartialLinkText("Fetch data")).Click(); Browser.Contains("fetchdata", () => Browser.Url); @@ -235,15 +143,6 @@ namespace Templates.Test Browser.Equal(5, () => Browser.FindElements(By.CssSelector("p+table>tbody>tr")).Count); } - private string ReadFile(string basePath, string path) - { - var fullPath = Path.Combine(basePath, path); - var doesExist = File.Exists(fullPath); - - Assert.True(doesExist, $"Expected file to exist, but it doesn't: {path}"); - return File.ReadAllText(Path.Combine(basePath, path)); - } - private Project GetSubProject(Project project, string projectDirectory, string projectName) { var subProjectDirectory = Path.Combine(project.TemplateOutputDir, projectDirectory); From 5f43e7a8a8e8d083e7416fb5f20cb003936c97da Mon Sep 17 00:00:00 2001 From: Daniel Roth <daroth@microsoft.com> Date: Thu, 23 Jan 2020 09:01:15 -0800 Subject: [PATCH 59/64] Update survey link for 3.2.0-preview1 (#18513) --- .../content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor index 2b7b716c20..adb69df8e8 100644 --- a/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor +++ b/src/ProjectTemplates/BlazorWasm.ProjectTemplates/content/BlazorWasm-CSharp/Client/Shared/SurveyPrompt.razor @@ -4,7 +4,7 @@ <span class="text-nowrap"> Please take our - <a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2109206">brief survey</a> + <a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2116045">brief survey</a> </span> and tell us what you think. </div> From 9bdf208631be6a68663841ee58fde5536845f42b Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Fri, 24 Jan 2020 15:05:45 -0800 Subject: [PATCH 60/64] Fixup bad merge (#18570) --- src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index d3fb6f2c8a..b5e9189a0d 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -199,7 +199,7 @@ namespace Wasm.Performance.Driver static async Task<(long size, long compressedSize)> GetBlazorAppSize() { - var testAssembly = typeof(TestApp.Startup).Assembly; + var testAssembly = typeof(TestApp.Program).Assembly; var testAssemblyLocation = new FileInfo(testAssembly.Location); var testApp = new DirectoryInfo(Path.Combine( testAssemblyLocation.Directory.FullName, From e24f73e14b17de75bfc9eded0dd3e9887727b31e Mon Sep 17 00:00:00 2001 From: Pranav K <prkrishn@hotmail.com> Date: Fri, 24 Jan 2020 16:04:11 -0800 Subject: [PATCH 61/64] Fix build warnings in MonoProxy (#18573) --- .../Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs index dfcb373afe..eb4cf65b50 100644 --- a/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs +++ b/src/Components/Blazor/Server/src/MonoDebugProxy/ws-proxy/MonoProxy.cs @@ -461,7 +461,7 @@ namespace WsProxy { { result = var_list }); - } catch (Exception e) { + } catch (Exception) { Debug ($"failed to parse {res.Value}"); } SendResponse(msg_id, Result.Ok(o), token); @@ -534,7 +534,7 @@ namespace WsProxy { }); SendResponse (msg_id, Result.Ok (o), token); } - catch (Exception exc) { + catch (Exception) { SendResponse (msg_id, res, token); } } From 24be2992dec6773a6e71839efd1cf992deba58ec Mon Sep 17 00:00:00 2001 From: Ajay Bhargav B <ajbaaska@microsoft.com> Date: Mon, 27 Jan 2020 17:54:18 -0800 Subject: [PATCH 62/64] Run Blazor E2E tests on SauceLabs (#18456) * Run Blazor E2E tests on SauceLabs * Added azure pipeline * update yml * Update meta * More changes --- .azure/pipelines/blazor-daily-tests.yml | 59 ++++ .../StandaloneApp/wwwroot/index.html | 3 +- .../AssemblyInfo.AssemblyFixtures.cs | 1 + .../ServerFixtures/AspNetSiteServerFixture.cs | 9 +- .../ServerFixtures/DevHostServerFixture.cs | 9 +- .../ServerFixtures/ServerFixture.cs | 11 +- .../ServerFixtures/StaticSiteServerFixture.cs | 9 +- .../test/E2ETest/Tests/StandaloneAppTest.cs | 7 +- .../test/E2ETest/e2eTestSettings.json | 2 +- src/Components/test/E2ETest/package.json | 9 +- src/Components/test/E2ETest/scripts/sauce.ts | 82 ++++++ src/Components/test/E2ETest/yarn.lock | 182 +++++++++++- src/Shared/E2ETesting/BrowserFixture.cs | 120 +++++++- src/Shared/E2ETesting/E2ETestOptions.cs | 6 +- src/Shared/E2ETesting/E2ETesting.props | 1 + src/Shared/E2ETesting/E2ETesting.targets | 8 + src/Shared/E2ETesting/SauceConnectServer.cs | 262 ++++++++++++++++++ src/Shared/E2ETesting/SauceOptions.cs | 36 +++ 18 files changed, 797 insertions(+), 19 deletions(-) create mode 100644 .azure/pipelines/blazor-daily-tests.yml create mode 100644 src/Components/test/E2ETest/scripts/sauce.ts create mode 100644 src/Shared/E2ETesting/SauceConnectServer.cs create mode 100644 src/Shared/E2ETesting/SauceOptions.cs diff --git a/.azure/pipelines/blazor-daily-tests.yml b/.azure/pipelines/blazor-daily-tests.yml new file mode 100644 index 0000000000..537751bfed --- /dev/null +++ b/.azure/pipelines/blazor-daily-tests.yml @@ -0,0 +1,59 @@ +# Uses Scheduled Triggers, which aren't supported in YAML yet. +# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=vsts&tabs=yaml#scheduled + +# Daily Tests for Blazor +# These use Sauce Labs resources, hence they run daily rather than per-commit. + +# We just need one Windows machine because all it does is trigger SauceLabs. +variables: + SAUCE_CONNECT_DOWNLOAD_ON_INSTALL: true + E2ETESTS_SauceTest: true + E2ETESTS_Sauce__TunnelIdentifier: 'blazor-e2e-sc-proxy-tunnel' + E2ETESTS_Sauce__HostName: 'sauce.local' +jobs: +- template: jobs/default-build.yml + parameters: + buildDirectory: src/Components + isTestingJob: true + agentOs: Windows + jobName: BlazorDailyTests + jobDisplayName: "Blazor Daily Tests" + afterBuild: + + # macOS/Safari + - script: 'dotnet test --filter "StandaloneAppTest"' + workingDirectory: 'src/Components/test/E2ETest' + displayName: 'Run Blazor tests - macOS/Safari' + condition: succeededOrFailed() + env: + # Secrets need to be explicitly mapped to env variables. + E2ETESTS_Sauce__Username: '$(asplab-sauce-labs-username)' + E2ETESTS_Sauce__AccessKey: '$(asplab-sauce-labs-access-key)' + # Set platform/browser configuration. + E2ETESTS_Sauce__TestName: 'Blazor Daily Tests - macOS/Safari' + E2ETESTS_Sauce__PlatformName: 'macOS 10.14' + E2ETESTS_Sauce__BrowserName: 'Safari' + # Need to explicitly set version here because some older versions don't support timeouts in Safari. + E2ETESTS_Sauce__SeleniumVersion: '3.4.0' + + # Android/Chrome + - script: 'dotnet test --filter "StandaloneAppTest"' + workingDirectory: 'src/Components/test/E2ETest' + displayName: 'Run Blazor tests - Android/Chrome' + condition: succeededOrFailed() + env: + # Secrets need to be explicitly mapped to env variables. + E2ETESTS_Sauce__Username: '$(asplab-sauce-labs-username)' + E2ETESTS_Sauce__AccessKey: '$(asplab-sauce-labs-access-key)' + # Set platform/browser configuration. + E2ETESTS_Sauce__TestName: 'Blazor Daily Tests - Android/Chrome' + E2ETESTS_Sauce__PlatformName: 'Android' + E2ETESTS_Sauce__PlatformVersion: '10.0' + E2ETESTS_Sauce__BrowserName: 'Chrome' + E2ETESTS_Sauce__DeviceName: 'Android GoogleAPI Emulator' + E2ETESTS_Sauce__DeviceOrientation: 'portrait' + E2ETESTS_Sauce__AppiumVersion: '1.9.1' + artifacts: + - name: Windows_Logs + path: ../../artifacts/log/ + publishOnError: true \ No newline at end of file diff --git a/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html b/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html index fde34bd639..646ea2f3da 100644 --- a/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html +++ b/src/Components/Blazor/testassets/StandaloneApp/wwwroot/index.html @@ -2,7 +2,8 @@ <html> <head> <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width"> + <!-- Forcing the device width here so that our automated tests work consistently on mobile browsers. --> + <meta name="viewport" content="width=1024"> <title>Blazor standalone diff --git a/src/Components/test/E2ETest/Infrastructure/AssemblyInfo.AssemblyFixtures.cs b/src/Components/test/E2ETest/Infrastructure/AssemblyInfo.AssemblyFixtures.cs index 9392d18aa9..4f2868269a 100644 --- a/src/Components/test/E2ETest/Infrastructure/AssemblyInfo.AssemblyFixtures.cs +++ b/src/Components/test/E2ETest/Infrastructure/AssemblyInfo.AssemblyFixtures.cs @@ -6,3 +6,4 @@ using Xunit; [assembly: TestFramework("Microsoft.AspNetCore.E2ETesting.XunitTestFrameworkWithAssemblyFixture", "Microsoft.AspNetCore.Components.E2ETests")] [assembly: AssemblyFixture(typeof(SeleniumStandaloneServer))] +[assembly: AssemblyFixture(typeof(SauceConnectServer))] diff --git a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/AspNetSiteServerFixture.cs b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/AspNetSiteServerFixture.cs index 98ad897bb9..abb11bc748 100644 --- a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/AspNetSiteServerFixture.cs +++ b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/AspNetSiteServerFixture.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using Microsoft.AspNetCore.E2ETesting; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; @@ -34,9 +35,15 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures var assembly = ApplicationAssembly ?? BuildWebHostMethod.Method.DeclaringType.Assembly; var sampleSitePath = FindSampleOrTestSitePath(assembly.FullName); + var host = "127.0.0.1"; + if (E2ETestOptions.Instance.SauceTest) + { + host = E2ETestOptions.Instance.Sauce.HostName; + } + return BuildWebHostMethod(new[] { - "--urls", "http://127.0.0.1:0", + "--urls", $"http://{host}:0", "--contentroot", sampleSitePath, "--environment", Environment.ToString(), }.Concat(AdditionalArguments).ToArray()); diff --git a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/DevHostServerFixture.cs b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/DevHostServerFixture.cs index d487598539..d09118ef3f 100644 --- a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/DevHostServerFixture.cs +++ b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/DevHostServerFixture.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using Microsoft.AspNetCore.E2ETesting; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting.Server; using Microsoft.AspNetCore.Http.Features; @@ -24,9 +25,15 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures ContentRoot = FindSampleOrTestSitePath( typeof(TProgram).Assembly.FullName); + var host = "127.0.0.1"; + if (E2ETestOptions.Instance.SauceTest) + { + host = E2ETestOptions.Instance.Sauce.HostName; + } + var args = new List { - "--urls", "http://127.0.0.1:0", + "--urls", $"http://{host}:0", "--contentroot", ContentRoot, "--pathbase", PathBase, "--applicationpath", typeof(TProgram).Assembly.Location, diff --git a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ServerFixture.cs b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ServerFixture.cs index 742a83f12f..67c164543c 100644 --- a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ServerFixture.cs +++ b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ServerFixture.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Reflection; using System.Runtime.ExceptionServices; using System.Threading; +using Microsoft.AspNetCore.E2ETesting; namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures { @@ -22,7 +23,15 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures public ServerFixture() { _rootUriInitializer = new Lazy(() => - new Uri(StartAndGetRootUri())); + { + var uri = new Uri(StartAndGetRootUri()); + if (E2ETestOptions.Instance.SauceTest) + { + uri = new UriBuilder(uri.Scheme, E2ETestOptions.Instance.Sauce.HostName, uri.Port).Uri; + } + + return uri; + }); } public abstract void Dispose(); diff --git a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/StaticSiteServerFixture.cs b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/StaticSiteServerFixture.cs index 899f165e93..096e9315fe 100644 --- a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/StaticSiteServerFixture.cs +++ b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/StaticSiteServerFixture.cs @@ -4,6 +4,7 @@ using System; using System.IO; using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.E2ETesting; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; @@ -26,13 +27,19 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures var sampleSitePath = FindSampleOrTestSitePath(SampleSiteName); + var host = "127.0.0.1"; + if (E2ETestOptions.Instance.SauceTest) + { + host = E2ETestOptions.Instance.Sauce.HostName; + } + return new HostBuilder() .ConfigureWebHost(webHostBuilder => webHostBuilder .UseKestrel() .UseContentRoot(sampleSitePath) .UseWebRoot(string.Empty) .UseStartup() - .UseUrls("http://127.0.0.1:0")) + .UseUrls($"http://{host}:0")) .Build(); } diff --git a/src/Components/test/E2ETest/Tests/StandaloneAppTest.cs b/src/Components/test/E2ETest/Tests/StandaloneAppTest.cs index db665d64c0..4cc1f57cff 100644 --- a/src/Components/test/E2ETest/Tests/StandaloneAppTest.cs +++ b/src/Components/test/E2ETest/Tests/StandaloneAppTest.cs @@ -8,7 +8,6 @@ using OpenQA.Selenium; using OpenQA.Selenium.Support.UI; using System; using System.Linq; -using System.Threading.Tasks; using Xunit; using Xunit.Abstractions; @@ -52,7 +51,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests // Verify we start at home, with the home link highlighted Assert.Equal("Hello, world!", Browser.FindElement(mainHeaderSelector).Text); Assert.Collection(Browser.FindElements(activeNavLinksSelector), - item => Assert.Equal("Home", item.Text)); + item => Assert.Equal("Home", item.Text.Trim())); // Click on the "counter" link Browser.FindElement(By.LinkText("Counter")).Click(); @@ -60,13 +59,13 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests // Verify we're now on the counter page, with that nav link (only) highlighted Assert.Equal("Counter", Browser.FindElement(mainHeaderSelector).Text); Assert.Collection(Browser.FindElements(activeNavLinksSelector), - item => Assert.Equal("Counter", item.Text)); + item => Assert.Equal("Counter", item.Text.Trim())); // Verify we can navigate back to home too Browser.FindElement(By.LinkText("Home")).Click(); Assert.Equal("Hello, world!", Browser.FindElement(mainHeaderSelector).Text); Assert.Collection(Browser.FindElements(activeNavLinksSelector), - item => Assert.Equal("Home", item.Text)); + item => Assert.Equal("Home", item.Text.Trim())); } [Fact] diff --git a/src/Components/test/E2ETest/e2eTestSettings.json b/src/Components/test/E2ETest/e2eTestSettings.json index 809f33f046..1a7155db30 100644 --- a/src/Components/test/E2ETest/e2eTestSettings.json +++ b/src/Components/test/E2ETest/e2eTestSettings.json @@ -1,4 +1,4 @@ { "DefaultWaitTimeoutInSeconds": 20, - "ScreenShotsPath": "../../screenshots" + "ScreenShotsPath": "../../screenshots", } diff --git a/src/Components/test/E2ETest/package.json b/src/Components/test/E2ETest/package.json index a84e769eb4..26a767f77b 100644 --- a/src/Components/test/E2ETest/package.json +++ b/src/Components/test/E2ETest/package.json @@ -6,11 +6,18 @@ "private": true, "scripts": { "selenium-standalone": "selenium-standalone", - "prepare": "selenium-standalone install" + "prepare": "selenium-standalone install", + "sauce": "ts-node ./scripts/sauce.ts" }, "author": "", "license": "Apache-2.0", "dependencies": { + "sauce-connect-launcher": "^1.3.1", "selenium-standalone": "^6.15.4" + }, + "devDependencies": { + "@types/node": "^13.1.7", + "ts-node": "^8.6.2", + "typescript": "^3.7.5" } } diff --git a/src/Components/test/E2ETest/scripts/sauce.ts b/src/Components/test/E2ETest/scripts/sauce.ts new file mode 100644 index 0000000000..395d0c1324 --- /dev/null +++ b/src/Components/test/E2ETest/scripts/sauce.ts @@ -0,0 +1,82 @@ +import { EOL } from "os"; +import * as _fs from "fs"; +import { promisify } from "util"; + +// Promisify things from fs we want to use. +const fs = { + createWriteStream: _fs.createWriteStream, + exists: promisify(_fs.exists), + mkdir: promisify(_fs.mkdir), + appendFile: promisify(_fs.appendFile), + readFile: promisify(_fs.readFile), +}; + +process.on("unhandledRejection", (reason) => { + console.error(`Unhandled promise rejection: ${reason}`); + process.exit(1); +}); + +let sauceUser = null; +let sauceKey = null; +let tunnelIdentifier = null; +let hostName = null; + +for (let i = 0; i < process.argv.length; i += 1) { + switch (process.argv[i]) { + case "--sauce-user": + i += 1; + sauceUser = process.argv[i]; + break; + case "--sauce-key": + i += 1; + sauceKey = process.argv[i]; + break; + case "--sauce-tunnel": + i += 1; + tunnelIdentifier = process.argv[i]; + break; + case "--use-hostname": + i += 1; + hostName = process.argv[i]; + break; + } +} + +const HOSTSFILE_PATH = process.platform === "win32" ? `${process.env.SystemRoot}\\System32\\drivers\\etc\\hosts` : null; + +(async () => { + + if (hostName) { + // Register a custom hostname in the hosts file (requires Admin, but AzDO agents run as Admin) + // Used to work around issues in Sauce Labs. + if (process.platform !== "win32") { + throw new Error("Can't use '--use-hostname' on non-Windows platform."); + } + + try { + + console.log(`Updating Hosts file (${HOSTSFILE_PATH}) to register host name '${hostName}'`); + await fs.appendFile(HOSTSFILE_PATH, `${EOL}127.0.0.1 ${hostName}${EOL}`); + + } catch (error) { + console.log(`Unable to update hosts file at ${HOSTSFILE_PATH}. Error: ${error}`); + } + } + + + // Creates a persistent proxy tunnel using Sauce Connect. + var sauceConnectLauncher = require('sauce-connect-launcher'); + + sauceConnectLauncher({ + username: sauceUser, + accessKey: sauceKey, + tunnelIdentifier: tunnelIdentifier, + }, function (err, sauceConnectProcess) { + if (err) { + console.error(err.message); + return; + } + + console.log("Sauce Connect ready"); + }); +})(); diff --git a/src/Components/test/E2ETest/yarn.lock b/src/Components/test/E2ETest/yarn.lock index 6f2b1cc3e3..250aa50786 100644 --- a/src/Components/test/E2ETest/yarn.lock +++ b/src/Components/test/E2ETest/yarn.lock @@ -2,6 +2,23 @@ # yarn lockfile v1 +"@types/node@^13.1.7": + version "13.1.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.8.tgz#1d590429fe8187a02707720ecf38a6fe46ce294b" + integrity sha512-6XzyyNM9EKQW4HKuzbo/CkOIjn/evtCmsU+MUM1xDfJ+3/rNjBttM1NgN7AOQvN6tP1Sl1D1PIKMreTArnxM9A== + +adm-zip@~0.4.3: + version "0.4.13" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.13.tgz#597e2f8cc3672151e1307d3e95cddbc75672314a" + integrity sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw== + +agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" @@ -12,6 +29,11 @@ ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +arg@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.2.tgz#e70c90579e02c63d80e3ad4e31d8bfdb8bd50064" + integrity sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg== + asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" @@ -24,7 +46,7 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -async@^2.6.2: +async@^2.1.2, async@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== @@ -46,6 +68,11 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" @@ -61,11 +88,24 @@ bl@^2.2.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -83,6 +123,11 @@ commander@^2.19.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -106,6 +151,13 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -118,6 +170,11 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -133,6 +190,18 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" +es6-promise@^4.0.3: + version "4.2.8" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" + integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== + +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -184,6 +253,11 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -191,6 +265,18 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" @@ -213,7 +299,23 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -inherits@^2.0.3, inherits@~2.0.3: +https-proxy-agent@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" + integrity sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg== + dependencies: + agent-base "^4.3.0" + debug "^3.1.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -268,11 +370,21 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +lodash@^4.16.6: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + lodash@^4.17.11, lodash@^4.17.14: version "4.17.14" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== +make-error@^1.1.1: + version "1.3.5" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" + integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== + mime-db@1.40.0: version "1.40.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" @@ -285,6 +397,13 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.40.0" +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -317,13 +436,18 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -once@^1.4.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -417,6 +541,13 @@ request@2.88.0: tunnel-agent "^0.6.0" uuid "^3.3.2" +rimraf@^2.5.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" @@ -432,6 +563,17 @@ safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +sauce-connect-launcher@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/sauce-connect-launcher/-/sauce-connect-launcher-1.3.1.tgz#31137f57b0f7176e1c0525b7fb09c6da746647cf" + integrity sha512-vIf9qDol3q2FlYzrKt0dr3kvec6LSjX2WS+/mVnAJIhqh1evSkPKCR2AzcJrnSmx9Xt9PtV0tLY7jYh0wsQi8A== + dependencies: + adm-zip "~0.4.3" + async "^2.1.2" + https-proxy-agent "^3.0.0" + lodash "^4.16.6" + rimraf "^2.5.4" + selenium-standalone@^6.15.4: version "6.16.0" resolved "https://registry.yarnpkg.com/selenium-standalone/-/selenium-standalone-6.16.0.tgz#ffcf02665c58ff7a7472427ae819ba79c15967ac" @@ -468,6 +610,19 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +source-map-support@^0.5.6: + version "0.5.16" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" + integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + sshpk@^1.7.0: version "1.16.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" @@ -516,6 +671,17 @@ tough-cookie@~2.4.3: psl "^1.1.24" punycode "^1.4.1" +ts-node@^8.6.2: + version "8.6.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.6.2.tgz#7419a01391a818fbafa6f826a33c1a13e9464e35" + integrity sha512-4mZEbofxGqLL2RImpe3zMJukvEvcO1XP8bj8ozBPySdCUXEcU5cIRwR0aM3R+VoZq7iXc8N86NC0FspGRqP4gg== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.6" + yn "3.1.1" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -528,6 +694,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +typescript@^3.7.5: + version "3.7.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae" + integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw== + uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -578,3 +749,8 @@ yauzl@^2.10.0: dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/src/Shared/E2ETesting/BrowserFixture.cs b/src/Shared/E2ETesting/BrowserFixture.cs index 7808176318..bf8b31d294 100644 --- a/src/Shared/E2ETesting/BrowserFixture.cs +++ b/src/Shared/E2ETesting/BrowserFixture.cs @@ -72,13 +72,24 @@ namespace Microsoft.AspNetCore.E2ETesting public Task<(IWebDriver, ILogs)> GetOrCreateBrowserAsync(ITestOutputHelper output, string isolationContext = "") { - if (!IsHostAutomationSupported()) + Func> createBrowserFunc; + if (E2ETestOptions.Instance.SauceTest) { - output.WriteLine($"{nameof(BrowserFixture)}: Host does not support browser automation."); - return Task.FromResult<(IWebDriver, ILogs)>(default); + createBrowserFunc = CreateSauceBrowserAsync; + } + else + { + if (!IsHostAutomationSupported()) + { + output.WriteLine($"{nameof(BrowserFixture)}: Host does not support browser automation."); + return Task.FromResult<(IWebDriver, ILogs)>(default); + } + + createBrowserFunc = CreateBrowserAsync; } - return _browsers.GetOrAdd(isolationContext, CreateBrowserAsync, output); + + return _browsers.GetOrAdd(isolationContext, createBrowserFunc, output); } public Task InitializeAsync() => Task.CompletedTask; @@ -143,5 +154,106 @@ namespace Microsoft.AspNetCore.E2ETesting throw new InvalidOperationException("Couldn't create a Selenium remote driver client. The server is irresponsive"); } + + private async Task<(IWebDriver browser, ILogs log)> CreateSauceBrowserAsync(string context, ITestOutputHelper output) + { + var sauce = E2ETestOptions.Instance.Sauce; + + if (sauce == null || + string.IsNullOrEmpty(sauce.TestName) || + string.IsNullOrEmpty(sauce.Username) || + string.IsNullOrEmpty(sauce.AccessKey) || + string.IsNullOrEmpty(sauce.TunnelIdentifier) || + string.IsNullOrEmpty(sauce.PlatformName) || + string.IsNullOrEmpty(sauce.BrowserName)) + { + throw new InvalidOperationException("Required SauceLabs environment variables not set."); + } + + var name = sauce.TestName; + if (!string.IsNullOrEmpty(context)) + { + name = $"{name} - {context}"; + } + + var capabilities = new DesiredCapabilities(); + + // Required config + capabilities.SetCapability("username", sauce.Username); + capabilities.SetCapability("accessKey", sauce.AccessKey); + capabilities.SetCapability("tunnelIdentifier", sauce.TunnelIdentifier); + capabilities.SetCapability("name", name); + + if (!string.IsNullOrEmpty(sauce.BrowserName)) + { + capabilities.SetCapability("browserName", sauce.BrowserName); + } + + if (!string.IsNullOrEmpty(sauce.PlatformVersion)) + { + capabilities.SetCapability("platformName", sauce.PlatformName); + capabilities.SetCapability("platformVersion", sauce.PlatformVersion); + } + else + { + // In some cases (like macOS), SauceLabs expects us to set "platform" instead of "platformName". + capabilities.SetCapability("platform", sauce.PlatformName); + } + + if (!string.IsNullOrEmpty(sauce.BrowserVersion)) + { + capabilities.SetCapability("browserVersion", sauce.BrowserVersion); + } + + if (!string.IsNullOrEmpty(sauce.DeviceName)) + { + capabilities.SetCapability("deviceName", sauce.DeviceName); + } + + if (!string.IsNullOrEmpty(sauce.DeviceOrientation)) + { + capabilities.SetCapability("deviceOrientation", sauce.DeviceOrientation); + } + + if (!string.IsNullOrEmpty(sauce.AppiumVersion)) + { + capabilities.SetCapability("appiumVersion", sauce.AppiumVersion); + } + + if (!string.IsNullOrEmpty(sauce.SeleniumVersion)) + { + capabilities.SetCapability("seleniumVersion", sauce.SeleniumVersion); + } + + await SauceConnectServer.StartAsync(output); + + var attempt = 0; + const int maxAttempts = 3; + do + { + try + { + // Attempt to create a new browser in SauceLabs. + var driver = new RemoteWebDriver( + new Uri("http://localhost:4445/wd/hub"), + capabilities, + TimeSpan.FromSeconds(60).Add(TimeSpan.FromSeconds(attempt * 60))); + + driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1); + var logs = new RemoteLogs(driver); + + return (driver, logs); + } + catch (Exception ex) + { + output.WriteLine($"Error initializing RemoteWebDriver: {ex.Message}"); + } + + attempt++; + + } while (attempt < maxAttempts); + + throw new InvalidOperationException("Couldn't create a SauceLabs remote driver client."); + } } } diff --git a/src/Shared/E2ETesting/E2ETestOptions.cs b/src/Shared/E2ETesting/E2ETestOptions.cs index 0b35320176..4be16ef779 100644 --- a/src/Shared/E2ETesting/E2ETestOptions.cs +++ b/src/Shared/E2ETesting/E2ETestOptions.cs @@ -39,7 +39,7 @@ namespace Microsoft.AspNetCore.E2ETesting } Configuration = builder - .AddEnvironmentVariables("E2ETESTS") + .AddEnvironmentVariables("E2ETESTS_") .Build(); var instance = new E2ETestOptions(); @@ -56,5 +56,9 @@ namespace Microsoft.AspNetCore.E2ETesting public string ScreenShotsPath { get; set; } public double DefaultAfterFailureWaitTimeoutInSeconds { get; set; } = 3; + + public bool SauceTest { get; set; } + + public SauceOptions Sauce { get; set; } } } diff --git a/src/Shared/E2ETesting/E2ETesting.props b/src/Shared/E2ETesting/E2ETesting.props index e31cbd93ac..6433411060 100644 --- a/src/Shared/E2ETesting/E2ETesting.props +++ b/src/Shared/E2ETesting/E2ETesting.props @@ -5,6 +5,7 @@ $([MSBuild]::NormalizeDirectory('$(ArtifactsTestResultsDir)','$(MSBuildProjectName)')) $([MSBuild]::EnsureTrailingSlash('$(RepoRoot)'))artifacts\tmp\selenium\ true + $([MSBuild]::EnsureTrailingSlash('$(RepoRoot)'))artifacts\tmp\sauceconnect\ true diff --git a/src/Shared/E2ETesting/E2ETesting.targets b/src/Shared/E2ETesting/E2ETesting.targets index 500d910a30..1cb421de3b 100644 --- a/src/Shared/E2ETesting/E2ETesting.targets +++ b/src/Shared/E2ETesting/E2ETesting.targets @@ -121,6 +121,14 @@ <_Parameter2>$(SeleniumProcessTrackingFolder) + + + + <_Parameter1>Microsoft.AspNetCore.Testing.SauceConnect.ProcessTracking + <_Parameter2>$(SauceConnectProcessTrackingFolder) + + diff --git a/src/Shared/E2ETesting/SauceConnectServer.cs b/src/Shared/E2ETesting/SauceConnectServer.cs new file mode 100644 index 0000000000..ac53b9b472 --- /dev/null +++ b/src/Shared/E2ETesting/SauceConnectServer.cs @@ -0,0 +1,262 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Collections.Concurrent; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.AspNetCore.E2ETesting; +using Microsoft.Extensions.Internal; +using Xunit.Abstractions; +using Xunit.Sdk; + +namespace Microsoft.AspNetCore.E2ETesting +{ + public class SauceConnectServer : IDisposable + { + private static SemaphoreSlim _semaphore = new SemaphoreSlim(1); + + private Process _process; + private string _sentinelPath; + private Process _sentinelProcess; + private static IMessageSink _diagnosticsMessageSink; + + // 2h + private static int SauceConnectProcessTimeout = 7200; + + public SauceConnectServer(IMessageSink diagnosticsMessageSink) + { + if (Instance != null || _diagnosticsMessageSink != null) + { + throw new InvalidOperationException("Sauce connect singleton already created."); + } + + // The assembly level attribute AssemblyFixture takes care of this being being instantiated before tests run + // and disposed after tests are run, gracefully shutting down the server when possible by calling Dispose on + // the singleton. + Instance = this; + _diagnosticsMessageSink = diagnosticsMessageSink; + } + + private void Initialize( + Process process, + string sentinelPath, + Process sentinelProcess) + { + _process = process; + _sentinelPath = sentinelPath; + _sentinelProcess = sentinelProcess; + } + + internal static SauceConnectServer Instance { get; private set; } + + public static async Task StartAsync(ITestOutputHelper output) + { + try + { + await _semaphore.WaitAsync(); + if (Instance._process == null) + { + // No process was started, meaning the instance wasn't initialized. + await InitializeInstance(output); + } + } + finally + { + _semaphore.Release(); + } + } + + private static async Task InitializeInstance(ITestOutputHelper output) + { + var psi = new ProcessStartInfo + { + FileName = "npm", + Arguments = "run sauce --" + + $" --sauce-user {E2ETestOptions.Instance.Sauce.Username}" + + $" --sauce-key {E2ETestOptions.Instance.Sauce.AccessKey}" + + $" --sauce-tunnel {E2ETestOptions.Instance.Sauce.TunnelIdentifier}" + + $" --use-hostname {E2ETestOptions.Instance.Sauce.HostName}", + RedirectStandardOutput = true, + RedirectStandardError = true, + }; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + psi.FileName = "cmd"; + psi.Arguments = $"/c npm {psi.Arguments}"; + } + + // It's important that we get the folder value before we start the process to prevent + // untracked processes when the tracking folder is not correctly configure. + var trackingFolder = GetProcessTrackingFolder(); + if (!Directory.Exists(trackingFolder)) + { + throw new InvalidOperationException($"Invalid tracking folder. Set the 'SauceConnectProcessTrackingFolder' MSBuild property to a valid folder."); + } + + Process process = null; + Process sentinel = null; + string pidFilePath = null; + try + { + process = Process.Start(psi); + pidFilePath = await WriteTrackingFileAsync(output, trackingFolder, process); + sentinel = StartSentinelProcess(process, pidFilePath, SauceConnectProcessTimeout); + } + catch + { + ProcessCleanup(process, pidFilePath); + ProcessCleanup(sentinel, pidFilePath: null); + throw; + } + + // Log output for sauce connect process. + // This is for the case where the server fails to launch. + var logOutput = new BlockingCollection(); + + process.OutputDataReceived += LogOutput; + process.ErrorDataReceived += LogOutput; + + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + + // The Sauce connect server has to be up for the entirety of the tests and is only shutdown when the application (i.e. the test) exits. + AppDomain.CurrentDomain.ProcessExit += (sender, args) => ProcessCleanup(process, pidFilePath); + + // Log + void LogOutput(object sender, DataReceivedEventArgs e) + { + logOutput.TryAdd(e.Data); + + // We avoid logging on the output here because it is unreliable. We can only log in the diagnostics sink. + lock (_diagnosticsMessageSink) + { + _diagnosticsMessageSink.OnMessage(new DiagnosticMessage(e.Data)); + } + } + + var uri = new UriBuilder("http", E2ETestOptions.Instance.Sauce.HostName, 4445).Uri; + var httpClient = new HttpClient + { + Timeout = TimeSpan.FromSeconds(1), + }; + + var retries = 0; + do + { + await Task.Delay(1000); + try + { + var response = await httpClient.GetAsync(uri); + if (response.StatusCode == HttpStatusCode.OK) + { + output = null; + Instance.Initialize(process, pidFilePath, sentinel); + return; + } + } + catch (OperationCanceledException) + { + } + catch (HttpRequestException) + { + } + + retries++; + } while (retries < 30); + + // Make output null so that we stop logging to it. + output = null; + logOutput.CompleteAdding(); + var exitCodeString = process.HasExited ? process.ExitCode.ToString() : "Process has not yet exited."; + var message = $@"Failed to launch the server. +ExitCode: {exitCodeString} +Captured output lines: +{string.Join(Environment.NewLine, logOutput.GetConsumingEnumerable())}."; + + // If we got here, we couldn't launch Sauce connect or get it to respond. So shut it down. + ProcessCleanup(process, pidFilePath); + throw new InvalidOperationException(message); + } + + private static Process StartSentinelProcess(Process process, string sentinelFile, int timeout) + { + // This sentinel process will start and will kill any rouge sauce connect server that wasn't torn down via normal means. + var psi = new ProcessStartInfo + { + FileName = "powershell", + Arguments = $"-NoProfile -NonInteractive -Command \"Start-Sleep {timeout}; " + + $"if(Test-Path {sentinelFile}){{ " + + $"Write-Output 'Stopping process {process.Id}'; Stop-Process {process.Id}; }}" + + $"else{{ Write-Output 'Sentinel file {sentinelFile} not found.'}}", + }; + + return Process.Start(psi); + } + + private static void ProcessCleanup(Process process, string pidFilePath) + { + try + { + if (process?.HasExited == false) + { + try + { + process?.KillTree(TimeSpan.FromSeconds(10)); + process?.Dispose(); + } + catch + { + // Ignore errors here since we can't do anything + } + } + if (pidFilePath != null && File.Exists(pidFilePath)) + { + File.Delete(pidFilePath); + } + } + catch + { + // Ignore errors here since we can't do anything + } + } + + private static async Task WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process) + { + var pidFile = Path.Combine(trackingFolder, $"{process.Id}.{Guid.NewGuid()}.pid"); + for (var i = 0; i < 3; i++) + { + try + { + await File.WriteAllTextAsync(pidFile, process.Id.ToString()); + return pidFile; + } + catch + { + output.WriteLine($"Can't write file to process tracking folder: {trackingFolder}"); + } + } + + throw new InvalidOperationException($"Failed to write file for process {process.Id}"); + } + + private static string GetProcessTrackingFolder() => + typeof(SauceConnectServer).Assembly + .GetCustomAttributes() + .Single(a => a.Key == "Microsoft.AspNetCore.Testing.SauceConnect.ProcessTracking").Value; + + public void Dispose() + { + ProcessCleanup(_process, _sentinelPath); + ProcessCleanup(_sentinelProcess, pidFilePath: null); + } + } +} diff --git a/src/Shared/E2ETesting/SauceOptions.cs b/src/Shared/E2ETesting/SauceOptions.cs new file mode 100644 index 0000000000..b8bb22ec8c --- /dev/null +++ b/src/Shared/E2ETesting/SauceOptions.cs @@ -0,0 +1,36 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace Microsoft.AspNetCore.E2ETesting +{ + public class SauceOptions + { + public string Username { get; set; } + + public string AccessKey { get; set; } + + public string TunnelIdentifier { get; set; } + + public string HostName { get; set; } + + public string TestName { get; set; } + + public bool IsRealDevice { get; set; } + + public string PlatformName { get; set; } + + public string PlatformVersion { get; set; } + + public string BrowserName { get; set; } + + public string BrowserVersion { get; set; } + + public string DeviceName { get; set; } + + public string DeviceOrientation { get; set; } + + public string AppiumVersion { get; set; } + + public string SeleniumVersion { get; set; } + } +} From bb1b2c4bf29ae69604aef120d1c418566b568db8 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 28 Jan 2020 09:08:57 -0800 Subject: [PATCH 63/64] Use scenario name for measurements and metadata (#18609) --- .../benchmarkapps/Wasm.Performance/Driver/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs index b5e9189a0d..8d588b6430 100644 --- a/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs +++ b/src/Components/benchmarkapps/Wasm.Performance/Driver/Program.cs @@ -75,10 +75,11 @@ namespace Wasm.Performance.Driver var output = new BenchmarkOutput(); foreach (var result in results) { + var scenarioName = result.Descriptor.Name; output.Metadata.Add(new BenchmarkMetadata { Source = "BlazorWasm", - Name = result.Descriptor.Name, + Name = scenarioName, ShortDescription = result.Name, LongDescription = result.Descriptor.Description, Format = "n2" @@ -87,7 +88,7 @@ namespace Wasm.Performance.Driver output.Measurements.Add(new BenchmarkMeasurement { Timestamp = DateTime.UtcNow, - Name = result.Name, + Name = scenarioName, Value = result.Duration, }); } From bbafecc0535e1de3264845e51ea8b3d18eb3ca61 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Tue, 28 Jan 2020 13:18:31 -0800 Subject: [PATCH 64/64] Update Web.JS scripts (#18635) --- src/Components/Web.JS/dist/Release/blazor.server.js | 13 +++---------- .../Web.JS/dist/Release/blazor.webassembly.js | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/Components/Web.JS/dist/Release/blazor.server.js b/src/Components/Web.JS/dist/Release/blazor.server.js index 400db6164b..36050055b1 100644 --- a/src/Components/Web.JS/dist/Release/blazor.server.js +++ b/src/Components/Web.JS/dist/Release/blazor.server.js @@ -1,22 +1,15 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=51)}([function(e,t,n){"use strict";var r;n.d(t,"a",function(){return r}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"c",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"g",function(){return l}),n.d(t,"h",function(){return f}),n.d(t,"e",function(){return h}),n.d(t,"d",function(){return p}),n.d(t,"b",function(){return d});var r=n(0),o=n(6),i=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},s=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t);var r,o,i=n(3),s=n(4),a=n(45),u=n(0),c=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return c(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise(function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var a=e.headers;a&&Object.keys(a).forEach(function(e){o.setRequestHeader(e,a[e])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new s.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(u.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(u.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(s.a),f=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new a.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(s.a),p=n(46);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case E.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new M(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case E.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new D(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case E.LongPolling:return new R(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=E[e.transport];if(null==r)return this.logger.log(u.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(u.a.Debug,"Skipping transport '"+E[r]+"' because it was disabled by the client."),new Error("'"+E[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return S[e]}).indexOf(n)>=0))return this.logger.log(u.a.Debug,"Skipping transport '"+E[r]+"' because it does not support the requested transfer format '"+S[n]+"'."),new Error("'"+E[r]+"' does not support "+S[n]+".");if(r===E.WebSockets&&!this.options.WebSocket||r===E.ServerSentEvents&&!this.options.EventSource)return this.logger.log(u.a.Debug,"Skipping transport '"+E[r]+"' because it is not supported in your environment.'"),new Error("'"+E[r]+"' is not supported in your environment.");this.logger.log(u.a.Debug,"Selecting transport '"+E[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(u.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(u.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(u.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(u.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(u.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(u.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(u.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var q=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new Y,this.transportResult=new Y,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new Y),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return B(this,void 0,void 0,function(){var t,n,r;return U(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new Y,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o=0,"must have a non-negative type"),o(s,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),s=r.allocUnsafe(1);return s.writeInt8(e,0),o.append(s),o.append(n(t)),o}),this.registerDecoder(e,s),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:s.encoder,decoder:s.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:a.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function a(e,t,n){var i=e;if(e instanceof Comment&&(c(i)&&c(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(i))throw new Error("Not implemented: moving existing logical children");var s=c(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return c(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=c,t.permuteLogicalChildren=function(e,t){var n=c(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var s=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=s}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(20),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),i(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function s(e){t.push(e)}function a(e,t,n,r){var o=c();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),s=o.invokeDotNetFromJS(e,t,n,i);return s?f(s):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var s=o++,a=new Promise(function(e,t){n[s]={resolve:e,reject:t}});try{var u=JSON.stringify(i,g);c().beginInvokeDotNetFromJS(s,e,t,r,u)}catch(e){l(s,!1,e)}return a}function c(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=s,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1&&this.subject.observers.splice(e,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch(function(e){})},e}(),d=function(){function e(e){this.minimumLogLevel=e,this.outputConsole=console}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.a.Critical:case r.a.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;case r.a.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r.a[e]+": "+t);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r.a[e]+": "+t)}},e}()},function(e,t,n){"use strict";n.r(t);var r,o,i=n(3),a=n(4),s=n(43),c=n(0),u=(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(e){function t(t){var n=e.call(this)||this;return n.logger=t,n}return u(t,e),t.prototype.send=function(e){var t=this;return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?new Promise(function(n,r){var o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=!0,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var s=e.headers;s&&Object.keys(s).forEach(function(e){o.setRequestHeader(e,s[e])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=function(){o.abort(),r(new i.a)}),e.timeout&&(o.timeout=e.timeout),o.onload=function(){e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?n(new a.b(o.status,o.statusText,o.response||o.responseText)):r(new i.b(o.statusText,o.status))},o.onerror=function(){t.logger.log(c.a.Warning,"Error from HTTP request. "+o.status+": "+o.statusText+"."),r(new i.b(o.statusText,o.status))},o.ontimeout=function(){t.logger.log(c.a.Warning,"Timeout from HTTP request."),r(new i.c)},o.send(e.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t}(a.a),f=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(e){function t(t){var n=e.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new l(t):n.httpClient=new s.a(t),n}return f(t,e),t.prototype.send=function(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new i.a):e.method?e.url?this.httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},t.prototype.getCookieString=function(e){return this.httpClient.getCookieString(e)},t}(a.a),p=n(44);!function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"}(o||(o={}));var d,g=n(1),y=function(){function e(){this.observers=[]}return e.prototype.next=function(e){for(var t=0,n=this.observers;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+i.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}})})},e.prototype.constructTransport=function(e){switch(e){case E.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new A(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case E.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new O(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case E.LongPolling:return new x(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+e+".")}},e.prototype.startTransport=function(e,t){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(e){return n.stopConnection(e)},this.transport.connect(e,t)},e.prototype.resolveTransportOrError=function(e,t,n){var r=E[e.transport];if(null==r)return this.logger.log(c.a.Debug,"Skipping transport '"+e.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+e.transport+"' because it is not supported by this client.");if(!function(e,t){return!e||0!=(t&e)}(t,r))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it was disabled by the client."),new Error("'"+E[r]+"' is disabled by the client.");if(!(e.transferFormats.map(function(e){return S[e]}).indexOf(n)>=0))return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it does not support the requested transfer format '"+S[n]+"'."),new Error("'"+E[r]+"' does not support "+S[n]+".");if(r===E.WebSockets&&!this.options.WebSocket||r===E.ServerSentEvents&&!this.options.EventSource)return this.logger.log(c.a.Debug,"Skipping transport '"+E[r]+"' because it is not supported in your environment.'"),new Error("'"+E[r]+"' is not supported in your environment.");this.logger.log(c.a.Debug,"Selecting transport '"+E[r]+"'.");try{return this.constructTransport(r)}catch(e){return e}},e.prototype.isITransport=function(e){return e&&"object"==typeof e&&"connect"in e},e.prototype.stopConnection=function(e){if(this.logger.log(c.a.Debug,"HttpConnection.stopConnection("+e+") called while in state "+this.connectionState+"."),this.transport=void 0,e=this.stopError||e,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),e?this.logger.log(c.a.Error,"Connection disconnected with error '"+e+"'."):this.logger.log(c.a.Information,"Connection disconnected."),this.connectionId=void 0,this.connectionState="Disconnected",this.onclose&&this.connectionStarted){this.connectionStarted=!1;try{this.onclose(e)}catch(t){this.logger.log(c.a.Error,"HttpConnection.onclose("+e+") threw error '"+t+"'.")}}}else this.logger.log(c.a.Warning,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(c.a.Debug,"Call to HttpConnection.stopConnection("+e+") was ignored because the connection is already in the disconnected state.")},e.prototype.resolveUrl=function(e){if(0===e.lastIndexOf("https://",0)||0===e.lastIndexOf("http://",0))return e;if(!g.c.isBrowser||!window.document)throw new Error("Cannot resolve '"+e+"'.");var t=window.document.createElement("a");return t.href=e,this.logger.log(c.a.Information,"Normalizing '"+e+"' to '"+t.href+"'."),t.href},e.prototype.resolveNegotiateUrl=function(e){var t=e.indexOf("?"),n=e.substring(0,-1===t?e.length:t);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===t?"":e.substring(t)).indexOf("negotiateVersion")&&(n+=-1===t?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},e}();var q=function(){function e(e){this.transport=e,this.buffer=[],this.executing=!0,this.sendBufferedData=new W,this.transportResult=new W,this.sendLoopPromise=this.sendLoop()}return e.prototype.send=function(e){return this.bufferData(e),this.transportResult||(this.transportResult=new W),this.transportResult.promise},e.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},e.prototype.bufferData=function(e){if(this.buffer.length&&typeof this.buffer[0]!=typeof e)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof e);this.buffer.push(e),this.sendBufferedData.resolve()},e.prototype.sendLoop=function(){return B(this,void 0,void 0,function(){var t,n,r;return j(this,function(o){switch(o.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(o.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new W,t=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):e.concatBuffers(this.buffer),this.buffer.length=0,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return o.sent(),t.resolve(),[3,5];case 4:return r=o.sent(),t.reject(r),[3,5];case 5:return[3,0];case 6:return[2]}})})},e.concatBuffers=function(e){for(var t=e.map(function(e){return e.byteLength}).reduce(function(e,t){return e+t}),n=new Uint8Array(t),r=0,o=0,i=e;o * @license MIT */ -var r=n(55),o=n(56),i=n(57);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;ia&&(n=a-u),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(37))},function(e,t,n){var r=n(62),o=n(36),i=n(13).Buffer;function s(e){if(!(this instanceof s))return new s(e);if(this._bufs=[],this.length=0,"function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",function(e){e.on("error",t)}),this.on("unpipe",function(e){e.removeListener("error",t)})}else this.append(e);r.call(this)}o.inherits(s,r),s.prototype._offset=function(e){var t,n=0,r=0;if(0===e)return[0,0];for(;rthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,s,a=!!e,u=this._offset(n),c=r-n,l=c,f=a&&t||0,h=u[1];if(0===n&&r==this.length){if(!a)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(s=0;s(o=this._bufs[s].length-h))){this._bufs[s].copy(e,f,h,h+l);break}this._bufs[s].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},s.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new s(o)},s.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},s.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},s.prototype.duplicate=function(){for(var e=0,t=new s;e1)for(var n=1;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function d(e,t){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var l=-1;for(i=n;is&&(n=s-c),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:u>223?3:u>191?2:1;if(o+f<=n)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&u)<<6|63&i)>127&&(l=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&u)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function M(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function A(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||A(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,i){return i||A(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||O(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);O(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}()},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){function e(){}return e.write=function(t){return""+t+e.RecordSeparator},e.parse=function(t){if(t[t.length-1]!==e.RecordSeparator)throw new Error("Message is incomplete.");var n=t.split(e.RecordSeparator);return n.pop(),n},e.RecordSeparatorCode=30,e.RecordSeparator=String.fromCharCode(e.RecordSeparatorCode),e}()},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(23),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var i=n(21);i.inherits=n(15);var a=n(36),s=n(41);i.inherits(f,a);for(var c=o(s.prototype),u=0;u=0,"must have a non-negative type"),o(a,"must have a decode function"),this.registerEncoder(function(e){return e instanceof t},function(t){var o=i(),a=r.allocUnsafe(1);return a.writeInt8(e,0),o.append(a),o.append(n(t)),o}),this.registerDecoder(e,a),this},registerEncoder:function(e,n){return o(e,"must have an encode function"),o(n,"must have an encode function"),t.push({check:e,encode:n}),this},registerDecoder:function(e,t){return o(e>=0,"must have a non-negative type"),o(t,"must have a decode function"),n.push({type:e,decode:t}),this},encoder:a.encoder,decoder:a.decoder,buffer:!0,type:"msgpack5",IncompleteBufferError:s.IncompleteBufferError}}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function s(e,t,n){var i=e;if(e instanceof Comment&&(u(i)&&u(i).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(c(i))throw new Error("Not implemented: moving existing logical children");var a=u(t);if(n0;)e(r,0);var i=r;i.parentNode.removeChild(i)},t.getLogicalParent=c,t.getLogicalSiblingEnd=function(e){return e[i]||null},t.getLogicalChild=function(e,t){return u(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===l(e).namespaceURI},t.getLogicalChildrenArray=u,t.permuteLogicalChildren=function(e,t){var n=u(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=f(t);if(n)return n.previousSibling;var r=c(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):h(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,i=r;i;){var a=i.nextSibling;if(n.insertBefore(i,t),i===o)break;i=a}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=l},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"}(t.LogLevel||(t.LogLevel={}))},function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,i=null;function a(e){t.push(e)}function s(e,t,n,r){var o=u();if(o.invokeDotNetFromJS){var i=JSON.stringify(r,g),a=o.invokeDotNetFromJS(e,t,n,i);return a?f(a):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function c(e,t,r,i){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var a=o++,s=new Promise(function(e,t){n[a]={resolve:e,reject:t}});try{var c=JSON.stringify(i,g);u().beginInvokeDotNetFromJS(a,e,t,r,c)}catch(e){l(a,!1,e)}return s}function u(){if(null!==i)return i;throw new Error("No .NET call dispatcher has been set.")}function l(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function f(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function h(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){i=e},e.attachReviver=a,e.invokeMethod=function(e,t){for(var n=[],r=2;r1)for(var n=1;nthis.length)&&(r=this.length),n>=this.length)return e||i.alloc(0);if(r<=0)return e||i.alloc(0);var o,a,s=!!e,c=this._offset(n),u=r-n,l=u,f=s&&t||0,h=c[1];if(0===n&&r==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+l);break}this._bufs[a].copy(e,f,h),f+=o,l-=o,h&&(h=0)}return e},a.prototype.shallowSlice=function(e,t){e=e||0,t=t||this.length,e<0&&(e+=this.length),t<0&&(t+=this.length);var n=this._offset(e),r=this._offset(t),o=this._bufs.slice(n[0],r[0]+1);return 0==r[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,r[1]),0!=n[1]&&(o[0]=o[0].slice(n[1])),new a(o)},a.prototype.toString=function(e,t,n){return this.slice(t,n).toString(e)},a.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},a.prototype.duplicate=function(){for(var e=0,t=new a;e0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),c=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),l(r,e,r.depth)}function c(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(C(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var u,w="",_=!1,I=["{","}"];(p(n)&&(_=!0,I=["[","]"]),C(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==a.length||_&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=_?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,w,I)):I[0]+w+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=g(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function S(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function C(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(54);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),T[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(55),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function x(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?E(e,a,t,!1):T(e,a)):E(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(I,e):I(e))}function I(e){p("emit readable"),e.emit("readable"),R(e)}function T(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,a),0===(e-=a)){a===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(L,t,e))}function L(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function M(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):_(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&O(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&O(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var c=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function u(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(c):n.once("end",c),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,R(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==M(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===s(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else{var u=c.length,l=d(c,u);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(37).EventEmitter},function(e,t,n){"use strict";var r=n(23);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(61).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(23);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,c=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var u=n(21);u.inherits=n(15);var l={deprecate:n(64)},f=n(38),h=n(14).Buffer,p=o.Uint8Array||function(){};var d,g=n(39);function y(){}function v(e,t){s=s||n(10),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,u=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),_(e,t))}(e,n,r,t,o);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?c(w,e,n,a,o):w(e,n,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(10),!(d.call(b,this)||this instanceof s))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),_(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:u.length,u,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),_(e,t)})}function _(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(C,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,a=!1,s=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(r,a),o=!1),o}(this,o,e,n))&&(o.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,_(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(20),n(62).setImmediate,n(9))},function(e,t,n){"use strict";e.exports=a;var r=n(10),o=n(21);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&c.statusCode<300?r(new a.b(c.statusCode,c.statusMessage||"",u)):o(new i.b(c.statusMessage||"",c.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(a.a)}).call(this,n(6).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(8),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var a=new Uint8Array(t);if(-1===(c=a.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var s=c+1;n=String.fromCharCode.apply(null,a.slice(0,s)),i=a.byteLength>s?a.slice(s).buffer:null}else{var c,u=t;if(-1===(c=u.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");s=c+1;n=u.substring(0,s),i=u.length>s?u.substring(s):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(6).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,s[c++]=t>>8&255,s[c++]=255&t;2===a&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,s[c++]=255&t);1===a&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=0,s=n-o;as?s:a+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,a=[],s=t;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=u}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+f>=1?h/c:h*Math.pow(2,1-f))*c>=2&&(a++,c/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*c-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=d,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=d,a/=256,u-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var r=n(52),o=n(53),i=n(54);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){var i,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=n;ia&&(n=a-u),i=n;i>=0;i--){for(var f=!0,h=0;ho&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function T(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(r,o),l=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function L(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function M(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return i||M(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||M(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):L(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);D(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):L(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):L(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(12))},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=a.styles[t];return n?"["+a.colors[n][0]+"m"+e+"["+a.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&_(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(y(t))return e.stylize(""+t,"number");if(d(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(i)return i;var s=Object.keys(n),a=function(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),S(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(n);if(0===s.length){if(_(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(m(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return f(n)}var c,w="",T=!1,C=["{","}"];(p(n)&&(T=!0,C=["[","]"]),_(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return m(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+f(n)),0!==s.length||T&&0!=n.length?r<0?m(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=T?function(e,t,n,r,o){for(var i=[],s=0,a=t.length;s=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,w,C)):C[0]+w+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),k(r,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=g(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function g(e){return null===e}function y(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function m(e){return w(e)&&"[object RegExp]"===T(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===T(e)}function S(e){return w(e)&&("[object Error]"===T(e)||e instanceof Error)}function _(e){return"function"==typeof e}function T(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(i)&&(i=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(i)){var r=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else s[n]=function(){};return s[n]},t.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=m,t.isObject=w,t.isDate=E,t.isError=S,t.isFunction=_,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(60);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(e=new Date,n=[C(e.getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(61),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise(function(e,r){t=e,n=r}),o=[],i=0;i0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):I(e,s)):E(e,s,t,!1))):r||(s.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=S?e=S:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(p("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(C,e):C(e))}function C(e){p("emit readable"),e.emit("readable"),x(e)}function I(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;ei.length?i.length:e;if(s===i.length?o+=i:o+=i.slice(0,e),0===(e-=s)){s===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(s));break}++r}return t.length-=r,o}(e,t):function(e,t){var n=c.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(n,n.length-e,0,s),0===(e-=s)){s===i.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(s));break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function D(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function L(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return p("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&D(this),null;var r,o=t.needReadable;return p("need readable",o),(0===t.length||t.length-e0?A(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,p("pipe count=%d opts=%j",i.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:m;function c(t,r){p("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",m),n.removeListener("data",g),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){p("onend"),e.end()}i.endEmitted?o.nextTick(u):n.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",f);var h=!1;var d=!1;function g(t){p("ondata"),d=!1,!1!==e.write(t)||d||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==L(i.pipes,e))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(t){p("onerror",t),m(),e.removeListener("error",y),0===a(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),m()}function b(){p("onfinish"),e.removeListener("close",v),m()}function m(){p("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",v),e.once("finish",b),e.emit("pipe",n),i.flowing||(p("pipe resume"),n.resume()),e},m.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n),this);if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=function(){for(var e=[],t=0;t0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,l=d(u,c);for(n=0;n=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports=n(39).EventEmitter},function(e,t,n){"use strict";var r=n(22);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(67).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return o>0&&(e.lastNeed=o-1),o;if(--r=0)return o>0&&(e.lastNeed=o-2),o;if(--r=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";(function(t,r,o){var i=n(22);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var a,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:i.nextTick;b.WritableState=v;var c=n(19);c.inherits=n(14);var l={deprecate:n(70)},f=n(40),h=n(13).Buffer,p=o.Uint8Array||function(){};var d,g=n(41);function y(){}function v(e,t){a=a||n(8),e=e||{};var r=t instanceof a;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(i.nextTick(o,r),i.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(o(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,n,r,t,o);else{var s=S(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||E(e,n),r?u(w,e,n,s,o):w(e,n,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(e){if(a=a||n(8),!(d.call(b,this)||this instanceof a))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,n,r,o,i,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function E(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),i=t.corkedRequestsFree;i.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,m(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(m(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function _(e,t){e._final(function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function T(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(_,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(b,f),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):d=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=e,h.isBuffer(r)||r instanceof p);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=y),o.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),i.nextTick(t,n)}(this,n):(a||function(e,t,n,r){var o=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(r,s),o=!1),o}(this,o,e,n))&&(o.pendingcb++,s=function(e,t,n,r,o,i){if(!n){var s=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==s&&(n=!0,o="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?i.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(23),n(68).setImmediate,n(12))},function(e,t,n){"use strict";e.exports=s;var r=n(8),o=n(19);function i(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length=200&&u.statusCode<300?r(new s.b(u.statusCode,u.statusMessage||"",c)):o(new i.b(u.statusMessage||"",u.statusCode||0))});t.abortSignal&&(t.abortSignal.onabort=function(){f.abort(),o(new i.a)})})},n.prototype.getCookieString=function(e){return this.cookieJar.getCookieString(e)},n}(s.a)}).call(this,n(35).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return i});var r=n(7),o=n(1),i=function(){function t(){}return t.prototype.writeHandshakeRequest=function(e){return r.a.write(JSON.stringify(e))},t.prototype.parseHandshakeResponse=function(t){var n,i;if(Object(o.g)(t)||void 0!==e&&t instanceof e){var s=new Uint8Array(t);if(-1===(u=s.indexOf(r.a.RecordSeparatorCode)))throw new Error("Message is incomplete.");var a=u+1;n=String.fromCharCode.apply(null,s.slice(0,a)),i=s.byteLength>a?s.slice(a).buffer:null}else{var u,c=t;if(-1===(u=c.indexOf(r.a.RecordSeparator)))throw new Error("Message is incomplete.");a=u+1;n=c.substring(0,a),i=c.length>a?c.substring(a):null}var l=r.a.parse(n),f=JSON.parse(l[0]);if(f.type)throw new Error("Expected a handshake response from the server.");return[i,f]},t}()}).call(this,n(35).Buffer)},,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s},s=this&&this.__spread||function(){for(var e=[],t=0;t0?r-4:r,f=0;f>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===s&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,a[u++]=255&t);1===s&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;sa?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=c}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){for(var t,n=c(e),r=n[0],s=n[1],a=new i(function(e,t,n){return 3*(t+n)/4-n}(0,r,s)),u=0,l=s>0?r-4:r,f=0;f>16&255,a[u++]=t>>8&255,a[u++]=255&t;2===s&&(t=o[e.charCodeAt(f)]<<2|o[e.charCodeAt(f+1)]>>4,a[u++]=255&t);1===s&&(t=o[e.charCodeAt(f)]<<10|o[e.charCodeAt(f+1)]<<4|o[e.charCodeAt(f+2)]>>2,a[u++]=t>>8&255,a[u++]=255&t);return a},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;sa?a:s+16383));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=c}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,d=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=d,a/=256,o-=8);for(s=s<0;e[n+p]=255&s,p+=d,s/=256,c-=8);e[n+p-d]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(t){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(u=l[c],!b(e[u],t[u],n,r))return!1;return!0}(e,t,n,s))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var s="string"==typeof r,a=!e&&o&&!n;if((!e&&i.isError(o)&&s&&w(o,n)||a)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),s=o.indexOf("\n"+i);if(s>=0){var a=o.indexOf("\n",s+1);o=o.substring(a+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(h);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f1)for(var n=1;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=i,o=a,t.copy(n,o),a+=s.data.length,s=s.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(20),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),i(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(69),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(12))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,s,a,u=1,c={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(s="setImmediate$"+Math.random()+"$",a=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&d(+t.data.slice(s.length))},e.addEventListener?e.addEventListener("message",a,!1):e.attachEvent("onmessage",a),r=function(t){e.postMessage(s+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=u,e.exports.encoder=a},function(e,t,n){(t=e.exports=n(38)).Stream=t,t.Readable=t,t.Writable=n(43),t.Duplex=n(8),t.Transform=n(44),t.PassThrough=n(73)},function(e,t,n){"use strict";e.exports=i;var r=n(44),o=n(19);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(14),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(21);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(36).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var s=e.readUInt32BE(t+0),a=e.readUInt32BE(t+4);return(4294967296*s+a)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),s(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),s(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),a(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return u(e,r,1);case 213:return u(e,r,2);case 214:return u(e,r,4);case 215:return u(e,r,8);case 216:return u(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?c(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?c(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?c(e,r,l,i,6):null}if(144==(240&h))return s(e,r,i=15&h,1);if(128==(240&h))return a(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function s(e,t,r,o){var s,a=[],u=0;for(t+=o,s=0;si)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function a(u,c){var l,f,h;if(void 0===u)throw new Error("undefined is not encodable in msgpack!");if(null===u)(l=r.allocUnsafe(1))[0]=192;else if(!0===u)(l=r.allocUnsafe(1))[0]=195;else if(!1===u)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof u)(f=r.byteLength(u))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(u,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(u,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(u,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(u,5));else if(u&&(u.readUInt32LE||u instanceof Uint8Array))u instanceof Uint8Array&&(u=r.from(u)),u.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=u.length):u.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(u.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(u.length,1)),l=o([l,u]);else if(Array.isArray(u))u.length<16?(l=r.allocUnsafe(1))[0]=144|u.length:u.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(u.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(u.length,1)),l=u.reduce(function(e,t){return e.append(a(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof u.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),s=1e6*(n-1e3*i);if(s||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var a=4*s,u=i/Math.pow(2,32),c=a+u&4294967295,l=4294967295&i;t.writeInt32BE(c,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(u);if("object"==typeof u)l=function(t){var n,i,s=-1,a=[];for(n=0;n>8),a.push(255&s)):(a.push(201),a.push(s>>24),a.push(s>>16&255),a.push(s>>8&255),a.push(255&s));return o().append(r.from(a)).append(i)}(u)||function(e){var t,n,i=[],s=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++s,i.push(a(t,!0)),i.push(a(e[t],!0)));s<16?(n=r.allocUnsafe(1))[0]=128|s:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(s,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(u);else if("number"==typeof u){if((h=u)!==Math.floor(h))return s(u,t);if(u>=0)if(u<128)(l=r.allocUnsafe(1))[0]=u;else if(u<256)(l=r.allocUnsafe(2))[0]=204,l[1]=u;else if(u<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(u,1);else if(u<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(u,1);else{if(!(u<=9007199254740991))return s(u,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,u)}else if(u>=-32)(l=r.allocUnsafe(1))[0]=256+u;else if(u>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(u,1);else if(u>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(u,1);else if(u>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(u,1);else{if(!(u>=-9007199254740991))return s(u,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var s=1,a=t+7;a>=t;a--){var u=(255^e[a])+s;e[a]=255&u,s=u>>8}}(l,1,u)}}}if(!l)throw new Error("not implemented yet");return c?l:l.slice()}return a}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(a.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(a.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(a.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new s.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(a.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(a.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(78),o=Math.pow(2,32),i=Math.pow(2,21)-1,s=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new a(e),this.editReader=new u(e,t),this.frameReader=new c(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=s;var a=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(15),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(20),o=n(9),i=n(2),s=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+s))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+s):n.subarray(o+i,o+i+s)),o=o+i+s}return t},e}();var a=new Uint8Array([145,i.MessageType.Ping]),u=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],a=0,u=s.parse(e);a=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return s.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return s.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return s.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return s.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return s.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return c}),n.d(t,"MessagePackHubProtocol",function(){return u});var c="3.1.1-dev"}]); \ No newline at end of file +function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o=0;u--)if(l[u]!==f[u])return!1;for(u=l.length-1;u>=0;u--)if(c=l[u],!b(e[c],t[c],n,r))return!1;return!0}(e,t,n,a))}return n?e===t:e==t}function m(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&y(o,n,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&o&&!n;if((!e&&i.isError(o)&&a&&w(o,n)||s)&&y(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=d(g((t=this).actual),128)+" "+t.operator+" "+d(g(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=p(n),a=o.indexOf("\n"+i);if(a>=0){var s=o.indexOf("\n",a+1);o=o.substring(s+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=y,f.ok=v,f.equal=function(e,t,n){e!=t&&y(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||y(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||y(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&y(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){E(!0,e,t,n)},f.doesNotThrow=function(e,t,n){E(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var S=Object.keys||function(e){var t=[];for(var n in e)a.call(e,n)&&t.push(n);return t}}).call(this,n(9))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){e.exports=n(10)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){},function(e,t,n){"use strict";var r=n(14).Buffer,o=n(60);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,i=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,o=s,t.copy(n,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){var r=n(6),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=a),i(o,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(63),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,s,c=1,u={},l=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){d(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){d(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){d(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(d,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&d(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n0?this._transform(null,t,n):n()},e.exports.decoder=c,e.exports.encoder=s},function(e,t,n){(t=e.exports=n(36)).Stream=t,t.Readable=t,t.Writable=n(41),t.Duplex=n(10),t.Transform=n(42),t.PassThrough=n(67)},function(e,t,n){"use strict";e.exports=i;var r=n(42),o=n(21);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}o.inherits=n(15),o.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){var r=n(22);function o(e){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.message=e||"unable to decode"}n(34).inherits(o,Error),e.exports=function(e){return function(e){e instanceof r||(e=r().append(e));var t=i(e);if(t)return e.consume(t.bytesConsumed),t.value;throw new o};function t(e,t,n){return t>=n+e}function n(e,t){return{value:e,bytesConsumed:t}}function i(e,r){r=void 0===r?0:r;var o=e.length-r;if(o<=0)return null;var i,l,f,h=e.readUInt8(r),p=0;if(!function(e,t){var n=function(e){switch(e){case 196:return 2;case 197:return 3;case 198:return 5;case 199:return 3;case 200:return 4;case 201:return 6;case 202:return 5;case 203:return 9;case 204:return 2;case 205:return 3;case 206:return 5;case 207:return 9;case 208:return 2;case 209:return 3;case 210:return 5;case 211:return 9;case 212:return 3;case 213:return 4;case 214:return 6;case 215:return 10;case 216:return 18;case 217:return 2;case 218:return 3;case 219:return 5;case 222:return 3;default:return-1}}(e);return!(-1!==n&&t=0;f--)p+=e.readUInt8(r+f+1)*Math.pow(2,8*(7-f));return n(p,9);case 208:return n(p=e.readInt8(r+1),2);case 209:return n(p=e.readInt16BE(r+1),3);case 210:return n(p=e.readInt32BE(r+1),5);case 211:return n(p=function(e,t){var n=128==(128&e[t]);if(n)for(var r=1,o=t+7;o>=t;o--){var i=(255^e[o])+r;e[o]=255&i,r=i>>8}var a=e.readUInt32BE(t+0),s=e.readUInt32BE(t+4);return(4294967296*a+s)*(n?-1:1)}(e.slice(r+1,r+9),0),9);case 202:return n(p=e.readFloatBE(r+1),5);case 203:return n(p=e.readDoubleBE(r+1),9);case 217:return t(i=e.readUInt8(r+1),o,2)?n(p=e.toString("utf8",r+2,r+2+i),2+i):null;case 218:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.toString("utf8",r+3,r+3+i),3+i):null;case 219:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.toString("utf8",r+5,r+5+i),5+i):null;case 196:return t(i=e.readUInt8(r+1),o,2)?n(p=e.slice(r+2,r+2+i),2+i):null;case 197:return t(i=e.readUInt16BE(r+1),o,3)?n(p=e.slice(r+3,r+3+i),3+i):null;case 198:return t(i=e.readUInt32BE(r+1),o,5)?n(p=e.slice(r+5,r+5+i),5+i):null;case 220:return o<3?null:(i=e.readUInt16BE(r+1),a(e,r,i,3));case 221:return o<5?null:(i=e.readUInt32BE(r+1),a(e,r,i,5));case 222:return i=e.readUInt16BE(r+1),s(e,r,i,3);case 223:throw new Error("map too big to decode in JS");case 212:return c(e,r,1);case 213:return c(e,r,2);case 214:return c(e,r,4);case 215:return c(e,r,8);case 216:return c(e,r,16);case 199:return i=e.readUInt8(r+1),l=e.readUInt8(r+2),t(i,o,3)?u(e,r,l,i,3):null;case 200:return i=e.readUInt16BE(r+1),l=e.readUInt8(r+3),t(i,o,4)?u(e,r,l,i,4):null;case 201:return i=e.readUInt32BE(r+1),l=e.readUInt8(r+5),t(i,o,6)?u(e,r,l,i,6):null}if(144==(240&h))return a(e,r,i=15&h,1);if(128==(240&h))return s(e,r,i=15&h,1);if(160==(224&h))return t(i=31&h,o,1)?n(p=e.toString("utf8",r+1,r+i+1),i+1):null;if(h>=224)return n(p=h-256,1);if(h<128)return n(h,1);throw new Error("not implemented yet")}function a(e,t,r,o){var a,s=[],c=0;for(t+=o,a=0;ai)&&((n=r.allocUnsafe(9))[0]=203,n.writeDoubleBE(e,1)),n}e.exports=function(e,t,n,i){function s(c,u){var l,f,h;if(void 0===c)throw new Error("undefined is not encodable in msgpack!");if(null===c)(l=r.allocUnsafe(1))[0]=192;else if(!0===c)(l=r.allocUnsafe(1))[0]=195;else if(!1===c)(l=r.allocUnsafe(1))[0]=194;else if("string"==typeof c)(f=r.byteLength(c))<32?((l=r.allocUnsafe(1+f))[0]=160|f,f>0&&l.write(c,1)):f<=255&&!n?((l=r.allocUnsafe(2+f))[0]=217,l[1]=f,l.write(c,2)):f<=65535?((l=r.allocUnsafe(3+f))[0]=218,l.writeUInt16BE(f,1),l.write(c,3)):((l=r.allocUnsafe(5+f))[0]=219,l.writeUInt32BE(f,1),l.write(c,5));else if(c&&(c.readUInt32LE||c instanceof Uint8Array))c instanceof Uint8Array&&(c=r.from(c)),c.length<=255?((l=r.allocUnsafe(2))[0]=196,l[1]=c.length):c.length<=65535?((l=r.allocUnsafe(3))[0]=197,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=198,l.writeUInt32BE(c.length,1)),l=o([l,c]);else if(Array.isArray(c))c.length<16?(l=r.allocUnsafe(1))[0]=144|c.length:c.length<65536?((l=r.allocUnsafe(3))[0]=220,l.writeUInt16BE(c.length,1)):((l=r.allocUnsafe(5))[0]=221,l.writeUInt32BE(c.length,1)),l=c.reduce(function(e,t){return e.append(s(t,!0)),e},o().append(l));else{if(!i&&"function"==typeof c.getDate)return function(e){var t,n=1*e,i=Math.floor(n/1e3),a=1e6*(n-1e3*i);if(a||i>4294967295){(t=new r(10))[0]=215,t[1]=-1;var s=4*a,c=i/Math.pow(2,32),u=s+c&4294967295,l=4294967295&i;t.writeInt32BE(u,2),t.writeInt32BE(l,6)}else(t=new r(6))[0]=214,t[1]=-1,t.writeUInt32BE(Math.floor(n/1e3),2);return o().append(t)}(c);if("object"==typeof c)l=function(t){var n,i,a=-1,s=[];for(n=0;n>8),s.push(255&a)):(s.push(201),s.push(a>>24),s.push(a>>16&255),s.push(a>>8&255),s.push(255&a));return o().append(r.from(s)).append(i)}(c)||function(e){var t,n,i=[],a=0;for(t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&"function"!=typeof e[t]&&(++a,i.push(s(t,!0)),i.push(s(e[t],!0)));a<16?(n=r.allocUnsafe(1))[0]=128|a:((n=r.allocUnsafe(3))[0]=222,n.writeUInt16BE(a,1));return i.unshift(n),i.reduce(function(e,t){return e.append(t)},o())}(c);else if("number"==typeof c){if((h=c)!==Math.floor(h))return a(c,t);if(c>=0)if(c<128)(l=r.allocUnsafe(1))[0]=c;else if(c<256)(l=r.allocUnsafe(2))[0]=204,l[1]=c;else if(c<65536)(l=r.allocUnsafe(3))[0]=205,l.writeUInt16BE(c,1);else if(c<=4294967295)(l=r.allocUnsafe(5))[0]=206,l.writeUInt32BE(c,1);else{if(!(c<=9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=207,function(e,t){for(var n=7;n>=0;n--)e[n+1]=255&t,t/=256}(l,c)}else if(c>=-32)(l=r.allocUnsafe(1))[0]=256+c;else if(c>=-128)(l=r.allocUnsafe(2))[0]=208,l.writeInt8(c,1);else if(c>=-32768)(l=r.allocUnsafe(3))[0]=209,l.writeInt16BE(c,1);else if(c>-214748365)(l=r.allocUnsafe(5))[0]=210,l.writeInt32BE(c,1);else{if(!(c>=-9007199254740991))return a(c,!0);(l=r.allocUnsafe(9))[0]=211,function(e,t,n){var r=n<0;r&&(n=Math.abs(n));var o=n%4294967296,i=n/4294967296;if(e.writeUInt32BE(Math.floor(i),t+0),e.writeUInt32BE(o,t+4),r)for(var a=1,s=t+7;s>=t;s--){var c=(255^e[s])+a;e[s]=255&c,a=c>>8}}(l,1,c)}}}if(!l)throw new Error("not implemented yet");return u?l:l.slice()}return s}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]this.nextBatchId?this.fatalError?(this.logger.log(s.LogLevel.Debug,"Received a new batch "+e+" but errored out on a previous batch "+(this.nextBatchId-1)),[4,n.send("OnRenderCompleted",this.nextBatchId-1,this.fatalError.toString())]):[3,4]:[3,5];case 3:return o.sent(),[2];case 4:return this.logger.log(s.LogLevel.Debug,"Waiting for batch "+this.nextBatchId+". Batch "+e+" not processed."),[2];case 5:return o.trys.push([5,7,,8]),this.nextBatchId++,this.logger.log(s.LogLevel.Debug,"Applying batch "+e+"."),i.renderBatch(this.browserRendererId,new a.OutOfProcessRenderBatch(t)),[4,this.completeBatch(n,e)];case 6:return o.sent(),[3,8];case 7:throw r=o.sent(),this.fatalError=r.toString(),this.logger.log(s.LogLevel.Error,"There was an error applying batch "+e+"."),n.send("OnRenderCompleted",e,r.toString()),r;case 8:return[2]}})})},e.prototype.getLastBatchid=function(){return this.nextBatchId-1},e.prototype.completeBatch=function(e,t){return r(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.send("OnRenderCompleted",t,null)];case 1:return n.sent(),[3,3];case 2:return n.sent(),this.logger.log(s.LogLevel.Warning,"Failed to deliver completion notification for render '"+t+"'."),[3,3];case 3:return[2]}})})},e}();t.RenderQueue=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(72),o=Math.pow(2,32),i=Math.pow(2,21)-1,a=function(){function e(e){this.batchData=e;var t=new l(e);this.arrayRangeReader=new f(e),this.arrayBuilderSegmentReader=new h(e),this.diffReader=new s(e),this.editReader=new c(e,t),this.frameReader=new u(e,t)}return e.prototype.updatedComponents=function(){return p(this.batchData,this.batchData.length-20)},e.prototype.referenceFrames=function(){return p(this.batchData,this.batchData.length-16)},e.prototype.disposedComponentIds=function(){return p(this.batchData,this.batchData.length-12)},e.prototype.disposedEventHandlerIds=function(){return p(this.batchData,this.batchData.length-8)},e.prototype.updatedComponentsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.referenceFramesEntry=function(e,t){return e+20*t},e.prototype.disposedComponentIdsEntry=function(e,t){var n=e+4*t;return p(this.batchData,n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=e+8*t;return g(this.batchData,n)},e}();t.OutOfProcessRenderBatch=a;var s=function(){function e(e){this.batchDataUint8=e}return e.prototype.componentId=function(e){return p(this.batchDataUint8,e)},e.prototype.edits=function(e){return e+4},e.prototype.editsEntry=function(e,t){return e+16*t},e}(),c=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.editType=function(e){return p(this.batchDataUint8,e)},e.prototype.siblingIndex=function(e){return p(this.batchDataUint8,e+4)},e.prototype.newTreeIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.moveToSiblingIndex=function(e){return p(this.batchDataUint8,e+8)},e.prototype.removedAttributeName=function(e){var t=p(this.batchDataUint8,e+12);return this.stringReader.readString(t)},e}(),u=function(){function e(e,t){this.batchDataUint8=e,this.stringReader=t}return e.prototype.frameType=function(e){return p(this.batchDataUint8,e)},e.prototype.subtreeLength=function(e){return p(this.batchDataUint8,e+4)},e.prototype.elementReferenceCaptureId=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.componentId=function(e){return p(this.batchDataUint8,e+8)},e.prototype.elementName=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.textContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.markupContent=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeName=function(e){var t=p(this.batchDataUint8,e+4);return this.stringReader.readString(t)},e.prototype.attributeValue=function(e){var t=p(this.batchDataUint8,e+8);return this.stringReader.readString(t)},e.prototype.attributeEventHandlerId=function(e){return g(this.batchDataUint8,e+12)},e}(),l=function(){function e(e){this.batchDataUint8=e,this.stringTableStartIndex=p(e,e.length-4)}return e.prototype.readString=function(e){if(-1===e)return null;var t,n=p(this.batchDataUint8,this.stringTableStartIndex+4*e),o=function(e,t){for(var n=0,r=0,o=0;o<4;o++){var i=e[t+o];if(n|=(127&i)<>>0)}function g(e,t){var n=d(e,t+4);if(n>i)throw new Error("Cannot read uint64 with high order part "+n+", because the result would exceed Number.MAX_SAFE_INTEGER.");return n*o+d(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof TextDecoder?new TextDecoder("utf-8"):null;t.decodeUtf8=r?r.decode.bind(r):function(e){var t=0,n=e.length,r=[],o=[];for(;t65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u)}r.length>1024&&(o.push(String.fromCharCode.apply(null,r)),r.length=0)}return o.push(String.fromCharCode.apply(null,r)),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(16),o=function(){function e(){}return e.prototype.log=function(e,t){},e.instance=new e,e}();t.NullLogger=o;var i=function(){function e(e){this.minimumLogLevel=e}return e.prototype.log=function(e,t){if(e>=this.minimumLogLevel)switch(e){case r.LogLevel.Critical:case r.LogLevel.Error:console.error("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Warning:console.warn("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;case r.LogLevel.Information:console.info("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t);break;default:console.log("["+(new Date).toISOString()+"] "+r.LogLevel[e]+": "+t)}},e}();t.ConsoleLogger=i},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]reloading the page if you're unable to reconnect.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e.prototype.rejected=function(){this.button.style.display="none",this.reloadParagraph.style.display="none",this.message.innerHTML="Could not reconnect to the server. Reload the page to restore functionality.",this.message.querySelector("a").addEventListener("click",function(){return location.reload()})},e}();t.DefaultReconnectDisplay=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.dialog=e}return e.prototype.show=function(){this.removeClasses(),this.dialog.classList.add(e.ShowClassName)},e.prototype.hide=function(){this.removeClasses(),this.dialog.classList.add(e.HideClassName)},e.prototype.failed=function(){this.removeClasses(),this.dialog.classList.add(e.FailedClassName)},e.prototype.rejected=function(){this.removeClasses(),this.dialog.classList.add(e.RejectedClassName)},e.prototype.removeClasses=function(){this.dialog.classList.remove(e.ShowClassName,e.HideClassName,e.FailedClassName,e.RejectedClassName)},e.ShowClassName="components-reconnect-show",e.HideClassName="components-reconnect-hide",e.FailedClassName="components-reconnect-failed",e.RejectedClassName="components-reconnect-rejected",e}();t.UserSpecifiedDisplay=r},function(e,t,n){"use strict";n.r(t);var r=n(6),o=n(11),i=n(2),a=function(){function e(){}return e.write=function(e){var t=e.byteLength||e.length,n=[];do{var r=127&t;(t>>=7)>0&&(r|=128),n.push(r)}while(t>0);t=e.byteLength||e.length;var o=new Uint8Array(n.length+t);return o.set(n,0),o.set(e,n.length),o.buffer},e.parse=function(e){for(var t=[],n=new Uint8Array(e),r=[0,7,14,21,28],o=0;o7)throw new Error("Messages bigger than 2GB are not supported.");if(!(n.byteLength>=o+i+a))throw new Error("Incomplete message.");t.push(n.slice?n.slice(o+i,o+i+a):n.subarray(o+i,o+i+a)),o=o+i+a}return t},e}();var s=new Uint8Array([145,i.MessageType.Ping]),c=function(){function e(){this.name="messagepack",this.version=1,this.transferFormat=i.TransferFormat.Binary,this.errorResult=1,this.voidResult=2,this.nonVoidResult=3}return e.prototype.parseMessages=function(e,t){if(!(e instanceof r.Buffer||(n=e,n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name))))throw new Error("Invalid input for MessagePack hub protocol. Expected an ArrayBuffer or Buffer.");var n;null===t&&(t=i.NullLogger.instance);for(var o=[],s=0,c=a.parse(e);s=3?e[2]:void 0,error:e[1],type:i.MessageType.Close}},e.prototype.createPingMessage=function(e){if(e.length<1)throw new Error("Invalid payload for Ping message.");return{type:i.MessageType.Ping}},e.prototype.createInvocationMessage=function(e,t){if(t.length<5)throw new Error("Invalid payload for Invocation message.");var n=t[2];return n?{arguments:t[4],headers:e,invocationId:n,streamIds:[],target:t[3],type:i.MessageType.Invocation}:{arguments:t[4],headers:e,streamIds:[],target:t[3],type:i.MessageType.Invocation}},e.prototype.createStreamItemMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for StreamItem message.");return{headers:e,invocationId:t[2],item:t[3],type:i.MessageType.StreamItem}},e.prototype.createCompletionMessage=function(e,t){if(t.length<4)throw new Error("Invalid payload for Completion message.");var n,r,o=t[3];if(o!==this.voidResult&&t.length<5)throw new Error("Invalid payload for Completion message.");switch(o){case this.errorResult:n=t[4];break;case this.nonVoidResult:r=t[4]}return{error:n,headers:e,invocationId:t[2],result:r,type:i.MessageType.Completion}},e.prototype.writeInvocation=function(e){var t=o().encode([i.MessageType.Invocation,e.headers||{},e.invocationId||null,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamInvocation=function(e){var t=o().encode([i.MessageType.StreamInvocation,e.headers||{},e.invocationId,e.target,e.arguments,e.streamIds]);return a.write(t.slice())},e.prototype.writeStreamItem=function(e){var t=o().encode([i.MessageType.StreamItem,e.headers||{},e.invocationId,e.item]);return a.write(t.slice())},e.prototype.writeCompletion=function(e){var t,n=o(),r=e.error?this.errorResult:e.result?this.nonVoidResult:this.voidResult;switch(r){case this.errorResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.error]);break;case this.voidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r]);break;case this.nonVoidResult:t=n.encode([i.MessageType.Completion,e.headers||{},e.invocationId,r,e.result])}return a.write(t.slice())},e.prototype.writeCancelInvocation=function(e){var t=o().encode([i.MessageType.CancelInvocation,e.headers||{},e.invocationId]);return a.write(t.slice())},e.prototype.readHeaders=function(e){var t=e[1];if("object"!=typeof t)throw new Error("Invalid headers.");return t},e}();n.d(t,"VERSION",function(){return u}),n.d(t,"MessagePackHubProtocol",function(){return c});var u="3.1.0"}]); \ No newline at end of file diff --git a/src/Components/Web.JS/dist/Release/blazor.webassembly.js b/src/Components/Web.JS/dist/Release/blazor.webassembly.js index 88dbb56b2f..16dd578625 100644 --- a/src/Components/Web.JS/dist/Release/blazor.webassembly.js +++ b/src/Components/Web.JS/dist/Release/blazor.webassembly.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=47)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(17);var r=n(26),o=n(11),a={},i=!1;function l(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=l,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");l(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),l=r.values(o),u=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function l(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(u(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=u,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=u(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function l(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function u(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,l=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var u=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,u)}catch(e){c(i,!1,e)}return l}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]-1?a.substring(0,l):"",s=l>-1?a.substring(l+1):a,c=t.monoPlatform.findMethod(e,u,s,i);t.monoPlatform.callMethod(c,null,r)},callMethod:function(e,n,r){if(r.length>4)throw new Error("Currently, MonoPlatform supports passing a maximum of 4 arguments from JS to .NET. You tried to pass "+r.length+".");var o=Module.stackSave();try{for(var a=Module.stackAlloc(r.length),l=Module.stackAlloc(4),u=0;u>2,r=Module.HEAPU32[n+1];if(r>y)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*v+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var w=document.createElement("a");function E(e){return e+12}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(32),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=l,this.editReader=u,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,l.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},l={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,u.structLength)}},u={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(25),n(18);var r=n(26),o=n(13),a={},i=!1;function u(e,t,n){var o=a[e];o||(o=a[e]=new r.BrowserRenderer(e)),o.attachRootComponentToLogicalElement(n,t)}t.attachRootComponentToLogicalElement=u,t.attachRootComponentToElement=function(e,t,n){var r=document.querySelector(e);if(!r)throw new Error("Could not find any element matching selector '"+e+"'.");u(n||0,o.toLogicalElement(r,!0),t)},t.renderBatch=function(e,t){var n=a[e];if(!n)throw new Error("There is no browser renderer with ID "+e+".");for(var r=t.arrayRangeReader,o=t.updatedComponents(),u=r.values(o),l=r.count(o),s=t.referenceFrames(),c=r.values(s),d=t.diffReader,f=0;f0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&!t)throw new Error("New logical elements must start empty, or allowExistingContents must be true");return e[r]=[],e}function u(e,t,n){var a=e;if(e instanceof Comment&&(s(a)&&s(a).length>0))throw new Error("Not implemented: inserting non-empty logical container");if(l(a))throw new Error("Not implemented: moving existing logical children");var i=s(t);if(n0;)e(r,0);var a=r;a.parentNode.removeChild(a)},t.getLogicalParent=l,t.getLogicalSiblingEnd=function(e){return e[a]||null},t.getLogicalChild=function(e,t){return s(e)[t]},t.isSvgElement=function(e){return"http://www.w3.org/2000/svg"===c(e).namespaceURI},t.getLogicalChildrenArray=s,t.permuteLogicalChildren=function(e,t){var n=s(e);t.forEach(function(e){e.moveRangeStart=n[e.fromSiblingIndex],e.moveRangeEnd=function e(t){if(t instanceof Element)return t;var n=d(t);if(n)return n.previousSibling;var r=l(t);return r instanceof Element?r.lastChild:e(r)}(e.moveRangeStart)}),t.forEach(function(t){var r=t.moveToBeforeMarker=document.createComment("marker"),o=n[t.toSiblingIndex+1];o?o.parentNode.insertBefore(r,o):f(r,e)}),t.forEach(function(e){for(var t=e.moveToBeforeMarker,n=t.parentNode,r=e.moveRangeStart,o=e.moveRangeEnd,a=r;a;){var i=a.nextSibling;if(n.insertBefore(a,t),a===o)break;a=i}n.removeChild(t)}),t.forEach(function(e){n[e.toSiblingIndex]=e.moveRangeStart})},t.getClosestDomElement=c},,,,function(e,t,n){"use strict";var r;!function(e){window.DotNet=e;var t=[],n={},r={},o=1,a=null;function i(e){t.push(e)}function u(e,t,n,r){var o=s();if(o.invokeDotNetFromJS){var a=JSON.stringify(r,h),i=o.invokeDotNetFromJS(e,t,n,a);return i?d(i):null}throw new Error("The current dispatcher does not support synchronous calls from JS to .NET. Use invokeMethodAsync instead.")}function l(e,t,r,a){if(e&&r)throw new Error("For instance method calls, assemblyName should be null. Received '"+e+"'.");var i=o++,u=new Promise(function(e,t){n[i]={resolve:e,reject:t}});try{var l=JSON.stringify(a,h);s().beginInvokeDotNetFromJS(i,e,t,r,l)}catch(e){c(i,!1,e)}return u}function s(){if(null!==a)return a;throw new Error("No .NET call dispatcher has been set.")}function c(e,t,r){if(!n.hasOwnProperty(e))throw new Error("There is no pending async call with ID "+e+".");var o=n[e];delete n[e],t?o.resolve(r):o.reject(r)}function d(e){return e?JSON.parse(e,function(e,n){return t.reduce(function(t,n){return n(e,t)},n)}):null}function f(e){return e instanceof Error?e.message+"\n"+e.stack:e?e.toString():"null"}function p(e){if(r.hasOwnProperty(e))return r[e];var t,n=window,o="window";if(e.split(".").forEach(function(e){if(!(e in n))throw new Error("Could not find '"+e+"' in '"+o+"'.");t=n,n=n[e],o+="."+e}),n instanceof Function)return n=n.bind(t),r[e]=n,n;throw new Error("The value '"+o+"' is not a function.")}e.attachDispatcher=function(e){a=e},e.attachReviver=i,e.invokeMethod=function(e,t){for(var n=[],r=2;r0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]>2,r=Module.HEAPU32[n+1];if(r>s)throw new Error("Cannot read uint64 with high order part "+r+", because the result would exceed Number.MAX_SAFE_INTEGER.");return r*l+Module.HEAPU32[n]},readFloatField:function(e,t){return Module.getValue(e+(t||0),"float")},readObjectField:function(e,t){return Module.getValue(e+(t||0),"i32")},readStringField:function(e,n){var r=Module.getValue(e+(n||0),"i32");return 0===r?null:t.monoPlatform.toJavaScriptString(r)},readStructField:function(e,t){return e+(t||0)}};var c=document.createElement("a");function d(e){return e+12}function f(e,t,n){var r="["+e+"] "+t+":"+n;return Module.mono_bind_static_method(r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(35),o=window.chrome&&navigator.userAgent.indexOf("Edge")<0,a=!1;function i(){return a&&o}t.hasDebuggingEnabled=i,t.attachDebuggerHotkey=function(e){a=e.some(function(e){return/\.pdb$/.test(r.getFileNameFromUrl(e))});var t=navigator.platform.match(/^Mac/i)?"Cmd":"Alt";i()&&console.info("Debugging hotkey: Shift+"+t+"+D (when application has focus)"),document.addEventListener("keydown",function(e){var t;e.shiftKey&&(e.metaKey||e.altKey)&&"KeyD"===e.code&&(a?o?((t=document.createElement("a")).href="_framework/debug?url="+encodeURIComponent(location.href),t.target="_blank",t.rel="noopener noreferrer",t.click()):console.error("Currently, only Edge(Chromium) or Chrome is supported for debugging."):console.error("Cannot start debugging, because the application was not compiled with debugging enabled."))})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(18),o=function(){function e(e){this.batchAddress=e,this.arrayRangeReader=a,this.arrayBuilderSegmentReader=i,this.diffReader=u,this.editReader=l,this.frameReader=s}return e.prototype.updatedComponents=function(){return r.platform.readStructField(this.batchAddress,0)},e.prototype.referenceFrames=function(){return r.platform.readStructField(this.batchAddress,a.structLength)},e.prototype.disposedComponentIds=function(){return r.platform.readStructField(this.batchAddress,2*a.structLength)},e.prototype.disposedEventHandlerIds=function(){return r.platform.readStructField(this.batchAddress,3*a.structLength)},e.prototype.updatedComponentsEntry=function(e,t){return c(e,t,u.structLength)},e.prototype.referenceFramesEntry=function(e,t){return c(e,t,s.structLength)},e.prototype.disposedComponentIdsEntry=function(e,t){var n=c(e,t,4);return r.platform.readInt32Field(n)},e.prototype.disposedEventHandlerIdsEntry=function(e,t){var n=c(e,t,8);return r.platform.readUint64Field(n)},e}();t.SharedMemoryRenderBatch=o;var a={structLength:8,values:function(e){return r.platform.readObjectField(e,0)},count:function(e){return r.platform.readInt32Field(e,4)}},i={structLength:12,values:function(e){var t=r.platform.readObjectField(e,0),n=r.platform.getObjectFieldsBaseAddress(t);return r.platform.readObjectField(n,0)},offset:function(e){return r.platform.readInt32Field(e,4)},count:function(e){return r.platform.readInt32Field(e,8)}},u={structLength:4+i.structLength,componentId:function(e){return r.platform.readInt32Field(e,0)},edits:function(e){return r.platform.readStructField(e,4)},editsEntry:function(e,t){return c(e,t,l.structLength)}},l={structLength:20,editType:function(e){return r.platform.readInt32Field(e,0)},siblingIndex:function(e){return r.platform.readInt32Field(e,4)},newTreeIndex:function(e){return r.platform.readInt32Field(e,8)},moveToSiblingIndex:function(e){return r.platform.readInt32Field(e,8)},removedAttributeName:function(e){return r.platform.readStringField(e,16)}},s={structLength:36,frameType:function(e){return r.platform.readInt16Field(e,4)},subtreeLength:function(e){return r.platform.readInt32Field(e,8)},elementReferenceCaptureId:function(e){return r.platform.readStringField(e,16)},componentId:function(e){return r.platform.readInt32Field(e,12)},elementName:function(e){return r.platform.readStringField(e,16)},textContent:function(e){return r.platform.readStringField(e,16)},markupContent:function(e){return r.platform.readStringField(e,16)},attributeName:function(e){return r.platform.readStringField(e,16)},attributeValue:function(e){return r.platform.readStringField(e,24)},attributeEventHandlerId:function(e){return r.platform.readUint64Field(e,8)}};function c(e,t,n){return r.platform.getArrayEntryPtr(e,t,n)}}]); \ No newline at end of file