Commit 025ff22a81958a91354d809872c9b022aee6c9e4
1 parent
262a1443
Vrh.Web.Reportin v1.2.1.0
- beépülők frissítése
Showing
59 changed files
with
3967 additions
and
828 deletions
Show diff stats
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.OneReport/Vrh.OneReport.csproj
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
54 | 54 | </Reference> |
55 | 55 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
56 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
56 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
57 | 57 | </Reference> |
58 | 58 | <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
59 | 59 | <HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.1\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
... | ... | @@ -112,6 +112,7 @@ |
112 | 112 | <Compile Include="Enums.cs" /> |
113 | 113 | <Compile Include="Properties\AssemblyInfo.cs" /> |
114 | 114 | <Compile Include="ReportService.cs" /> |
115 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
115 | 116 | <Compile Include="XmlProcessing\IOneReport.cs" /> |
116 | 117 | <Compile Include="XmlProcessing\Dataset.cs" /> |
117 | 118 | <Compile Include="XmlProcessing\FolderElement.cs" /> |
... | ... | @@ -133,6 +134,15 @@ |
133 | 134 | <None Include="Vrh.NugetModuls.Documentations\Vrh.XmlProcessing\ReadMe.md" /> |
134 | 135 | </ItemGroup> |
135 | 136 | <ItemGroup> |
137 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
138 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
139 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
140 | + </Content> | |
141 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
142 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
143 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
144 | + </Content> | |
145 | + <Content Include="SqlServerTypes\readme.htm" /> | |
136 | 146 | <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> |
137 | 147 | <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> |
138 | 148 | <None Include="XmlParser.xml"> | ... | ... |
Vrh.OneReport/packages.config
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <package id="Microsoft.AspNet.Razor" version="3.2.9" targetFramework="net45" /> |
6 | 6 | <package id="Microsoft.AspNet.WebPages" version="3.2.9" targetFramework="net45" /> |
7 | 7 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net45" /> |
8 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net45" /> | |
8 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
9 | 9 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net45" /> |
10 | 10 | <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net45" /> |
11 | 11 | <package id="VRH.Common" version="3.0.0" targetFramework="net45" /> | ... | ... |
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.Web.OneReport.Lib/Vrh.NugetModuls.Documentations/Vrh.Web.Common.Lib/ReadMe.md
... | ... | @@ -469,6 +469,19 @@ public RedisConnection(string redisConnectionString, bool isRequired = true) |
469 | 469 | |
470 | 470 | *** |
471 | 471 | ### Version History: |
472 | +#### 2.20.1 (2023.09.19) Patches: | |
473 | +- WebCommon.ErrorListBuilder mostantól saját kódot használ, nem a VRH.Common.ErrorListBuilder-ét. A VRH.Common.EF.ErrorListBuilder kód tartalmát használja, ami meg valamiért nem elérhető. | |
474 | + | |
475 | +#### 2.20.0 (2023.09.07) Compatible changes: | |
476 | +- DataTablesIn.DTColumn osztály kibővült egy OrderField nevű tulajdonsággal. | |
477 | +- DataTables.Order metódus módosítása, hogy ha ki van töltve az OrderField, akkor a rendezés arra történik. | |
478 | + | |
479 | +#### 2.19.5 (2023.08.10) Patches: | |
480 | +- DataTables.Filter metódus módosítása. Nullozható enumokra is helyesen működik. | |
481 | + | |
482 | +#### 2.19.4 (2023.07.18) Patches: | |
483 | +- DataTables.Filter metódus módosítása. Most már Guid típusú mező szűrésekor is helyesen működik. | |
484 | + | |
472 | 485 | #### 2.19.3 (2023.06.05) Patches: |
473 | 486 | - DataTables.Filter metódus módosítása. Enum összehasonlításkor volt típus konfliktus. |
474 | 487 | ... | ... |
Vrh.Web.OneReport.Lib/Vrh.Web.OneReport.Lib.csproj
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
53 | 53 | </Reference> |
54 | 54 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
55 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
55 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
56 | 56 | </Reference> |
57 | 57 | <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
58 | 58 | <HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.1\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
... | ... | @@ -111,8 +111,8 @@ |
111 | 111 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
112 | 112 | <Private>True</Private> |
113 | 113 | </Reference> |
114 | - <Reference Include="Vrh.Web.Common.Lib, Version=2.19.3.0, Culture=neutral, processorArchitecture=MSIL"> | |
115 | - <HintPath>..\packages\Vrh.Web.Common.Lib.2.19.3\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
114 | + <Reference Include="Vrh.Web.Common.Lib, Version=2.20.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
115 | + <HintPath>..\packages\Vrh.Web.Common.Lib.2.20.1\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
116 | 116 | </Reference> |
117 | 117 | <Reference Include="Vrh.XmlProcessing, Version=1.32.0.0, Culture=neutral, processorArchitecture=MSIL"> |
118 | 118 | <HintPath>..\packages\Vrh.XmlProcessing.1.32.0\lib\net45\Vrh.XmlProcessing.dll</HintPath> |
... | ... | @@ -129,8 +129,8 @@ |
129 | 129 | <Compile Include="ReportViewerForMvc\ReportViewerForMvc.cs" /> |
130 | 130 | <Compile Include="ReportViewerForMvc\ReportViewerHelpers.cs" /> |
131 | 131 | <Compile Include="ReportViewerForMvc\ReportViewerWebForm.aspx.cs"> |
132 | - <SubType>ASPXCodeBehind</SubType> | |
133 | 132 | <DependentUpon>ReportViewerWebForm.aspx</DependentUpon> |
133 | + <SubType>ASPXCodeBehind</SubType> | |
134 | 134 | </Compile> |
135 | 135 | <Compile Include="ReportViewerForMvc\ReportViewerWebForm.aspx.designer.cs"> |
136 | 136 | <DependentUpon>ReportViewerWebForm.aspx.cs</DependentUpon> |
... | ... | @@ -139,6 +139,7 @@ |
139 | 139 | <Compile Include="ReportViewerForMvc\WebResourceHelper.cs" /> |
140 | 140 | <Compile Include="Properties\AssemblyInfo.cs" /> |
141 | 141 | <Compile Include="Properties\CommonAssemblyInfo.cs" /> |
142 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
142 | 143 | </ItemGroup> |
143 | 144 | <ItemGroup> |
144 | 145 | <None Include="App.config" /> |
... | ... | @@ -161,6 +162,15 @@ |
161 | 162 | <EmbeddedResource Include="ReportViewerForMvc\web.config" /> |
162 | 163 | </ItemGroup> |
163 | 164 | <ItemGroup> |
165 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
166 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
167 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
168 | + </Content> | |
169 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
170 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
171 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
172 | + </Content> | |
173 | + <Content Include="SqlServerTypes\readme.htm" /> | |
164 | 174 | <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> |
165 | 175 | <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> |
166 | 176 | <None Include="XmlParser.xml"> | ... | ... |
Vrh.Web.OneReport.Lib/packages.config
... | ... | @@ -6,11 +6,11 @@ |
6 | 6 | <package id="Microsoft.AspNet.WebPages" version="3.2.9" targetFramework="net451" /> |
7 | 7 | <package id="Microsoft.Net.Compilers.Toolset" version="3.9.0" targetFramework="net451" developmentDependency="true" /> |
8 | 8 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net451" /> |
9 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net451" /> | |
9 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
10 | 10 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net451" /> |
11 | 11 | <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net451" /> |
12 | 12 | <package id="VRH.Common" version="3.0.0" targetFramework="net451" /> |
13 | 13 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net451" /> |
14 | - <package id="Vrh.Web.Common.Lib" version="2.19.3" targetFramework="net462" /> | |
14 | + <package id="Vrh.Web.Common.Lib" version="2.20.1" targetFramework="net462" /> | |
15 | 15 | <package id="Vrh.XmlProcessing" version="1.32.0" targetFramework="net462" /> |
16 | 16 | </packages> |
17 | 17 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/RolesToUserRoleGroups/Index.cshtml
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | |
27 | 27 | } |
28 | 28 | |
29 | -<script src="~/Scripts/jquery-ui-1.12.1.min.js"></script> | |
29 | +<script src="~/Scripts/jquery-ui-1.13.2.min.js"></script> | |
30 | 30 | <script src="@(Url.Content(WebConst.AREA_SCRIPTSPATH + "RolesToUserRoleGroupsDialog.js"))"></script> |
31 | 31 | <script type="text/javascript"> |
32 | 32 | rturgd.TitleNew = '@newRoleTranslationText'; | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/RolesToUsers/Index.cshtml
0 → 100644
... | ... | @@ -0,0 +1,47 @@ |
1 | +@* | |
2 | + ----------------------------------------- | |
3 | + RolesToUserRoleGroups - Index.cshtml | |
4 | + ----------------------------------------- | |
5 | +*@ | |
6 | +@using VRH.Log4Pro.MultiLanguageManager; | |
7 | +@using Vrh.Web.Common.Lib; | |
8 | + | |
9 | +@model CommonModel | |
10 | + | |
11 | +@{ | |
12 | + ViewBag.Title = Html.Raw("Roles to Users"); | |
13 | + | |
14 | + IHtmlString okTranslationText = Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Words.OK))); | |
15 | + IHtmlString cancelTranslationText = Html.Raw(Model.Trans(typeof(GeneralWordCodes.MLM.General.Words.Cancel))); | |
16 | + IHtmlString deleteTranslationText = Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Common.Delete))); | |
17 | + IHtmlString closeTranslationText = Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Common.Close))); | |
18 | + IHtmlString renameTranslationText = Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.Common.Rename))); | |
19 | + | |
20 | + string labelUserManager = Model.Trans(typeof(WordCodes.MvcMembership.Labels.Button.Users)); | |
21 | + string labelUTURG = Model.Trans(typeof(WordCodes.MvcMembership.Labels.Button.UsersToRoleGroups)); | |
22 | + string labelRoles = Model.Trans(typeof(WordCodes.MvcMembership.Labels.Button.Roles)); | |
23 | + | |
24 | +} | |
25 | + | |
26 | +<script src="~/Scripts/jquery-ui-1.13.2.min.js"></script> | |
27 | +<script src="@(Url.Content(WebConst.AREA_SCRIPTSPATH + "RolesToUserRoleGroupsDialog.js"))"></script> | |
28 | +<script type="text/javascript"> | |
29 | + rturgd.TitleOK = '@okTranslationText'; | |
30 | + rturgd.TitleCancel = '@cancelTranslationText'; | |
31 | + rturgd.TitleClose = '@cancelTranslationText'; | |
32 | + | |
33 | + //$(function() { | |
34 | + //}); | |
35 | +</script> | |
36 | + | |
37 | +<div class="card"> | |
38 | + <div class="card-header"> | |
39 | + @UserManagementHtmlHelper.AddHeader(Html, Ajax, Url, Model, ViewBag.Title.ToString() | |
40 | + , new List<UserManagementHtmlHelper.DisableThisButton> { UserManagementHtmlHelper.DisableThisButton.RolesToUsers }) | |
41 | + </div> | |
42 | + <div class="card-body"> | |
43 | + <div class="row"> | |
44 | + @Html.Partial("_RolesToUsers", ViewData["id"] != null ? new ViewDataDictionary() { { "id", ViewData["id"] } } : null) | |
45 | + </div> | |
46 | + </div> | |
47 | +</div> | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/RolesToUsers/_RolesToUsers.cshtml
0 → 100644
... | ... | @@ -0,0 +1,20 @@ |
1 | +@using VRH.Log4Pro.MultiLanguageManager; | |
2 | +@using Vrh.Web.Membership.Areas.UAManyToMany.Models; | |
3 | + | |
4 | +@{ | |
5 | + string areaName = "UAManyToMany"; | |
6 | + string ctrlName = areaName; | |
7 | + if (Session["MTM"] != null) | |
8 | + { | |
9 | + Session["MTM"] = null; | |
10 | + } | |
11 | + UAManyToManySessionModel mtmSession = new UAManyToManySessionModel(); | |
12 | + mtmSession.DefaultListItemsHeader = "Users"; | |
13 | + mtmSession.DefaultSelectedListItemsHeader = "Roles of selected user"; | |
14 | + mtmSession.DefaultAvailableListItemsHeader = "Roles that selected user does not have"; | |
15 | + mtmSession.ListItemsHeader = MultiLanguageManager.GetTranslation(typeof(WordCodes.MvcMembership.ManyToMany.Roles)); | |
16 | + mtmSession.SelectedListItemsHeader = "Users of selected role"; | |
17 | + mtmSession.AvailableListItemsHeader = "Users that do not have the selected role"; | |
18 | + Session["MTM"] = mtmSession; | |
19 | + Html.RenderAction("ManyToMany", ctrlName, new { area = areaName, name = "RolesToUsers", isDefault = true }); | |
20 | +} | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/UserAdministration/Details.cshtml
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | @*<dd>@Model.User.CreationDate.ToString("MMMM dd, yyyy h:mm:ss tt", CultureInfo.InvariantCulture)</dd>*@ |
73 | 73 | <dd>@Model.User.CreationDate.ToString("yyyy MM dd, h:mm:ss", CultureInfo.InvariantCulture)</dd> |
74 | 74 | </dl> |
75 | - @if (Model.User.UserName != Constants.FIRST_USERNAME && Model.User.UserName != User.Identity.Name) | |
75 | + @if (Model.User.UserName != Constants.USERNAME_ADMINISTRATOR && Model.User.UserName != User.Identity.Name) | |
76 | 76 | { // !!! Az 'Admin'-t és saját magát ne tudja letiltani !!! |
77 | 77 | using (Html.BeginForm("ChangeApproval", WebConst.CONTROLLER_UA, new { id = Model.User.ProviderUserKey })) |
78 | 78 | { | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/UserAdministration/Role.cshtml
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | { |
37 | 37 | @Html.ActionLink(user.UserName, "Details", new { id = user.ProviderUserKey }, new { @class = "text-light" }) |
38 | 38 | |
39 | - if (Model.Role != Constants.ROLE_ADMINISTRATOR || user.UserName != Constants.FIRST_USERNAME) | |
39 | + if (Model.Role != Constants.ROLE_ADMINISTRATOR || user.UserName != Constants.USERNAME_ADMINISTRATOR) | |
40 | 40 | { // Az alapértelmezett felhasználót nem lehet kivenni az |
41 | 41 | using (Html.BeginForm("RemoveFromRoleOnRolePage", WebConst.CONTROLLER_UA, new { id = user.ProviderUserKey, role = Model.Role })) |
42 | 42 | { | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/UserAdministration/SearchUser.cshtml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | UserAdministration - SearchUser.cshtml |
4 | 4 | ----------------------------------------- |
5 | 5 | *@ |
6 | -model Vrh.Web.Membership.Areas.UserAdministration.Models.IndexViewModel | |
6 | +@model Vrh.Web.Membership.Areas.UserAdministration.Models.IndexViewModel | |
7 | 7 | |
8 | 8 | @{ |
9 | 9 | ViewBag.Title = Html.Raw(Model.Trans(typeof(WordCodes.MvcMembership.User.UserManagement))); | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/UserAdministration/UsersRoles.cshtml
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | @section Styles { |
10 | 10 | <link href="@Url.Content(WebConst.AREA_CONTENTPATH + "MvcMembership.css")" rel="stylesheet" type="text/css" /> |
11 | 11 | } |
12 | -<script src="~/Scripts/jquery-ui-1.12.1.min.js"></script>" | |
12 | +<script src="~/Scripts/jquery-ui-1.13.2.min.js"></script>" | |
13 | 13 | |
14 | 14 | <div class="card"> |
15 | 15 | <div class="card-header"> | ... | ... |
Vrh.Web.Reporting/Areas/UserAdministration/Views/UsersToUserRoleGroups/Index.cshtml
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | string labelRTURG = Model.Trans(typeof(WordCodes.MvcMembership.Labels.Button.RolesToRoleGroups)); |
16 | 16 | string labelRoles = Model.Trans(typeof(WordCodes.MvcMembership.Labels.Button.Roles)); |
17 | 17 | } |
18 | -<script src="~/Scripts/jquery-ui-1.12.1.min.js"></script>" | |
18 | +<script src="~/Scripts/jquery-ui-1.13.2.min.js"></script>" | |
19 | 19 | <div class="card"> |
20 | 20 | <div class="card-header"> |
21 | 21 | @UserManagementHtmlHelper.AddHeader(Html, Ajax, Url, Model, ViewBag.Title.ToString() | ... | ... |
Vrh.Web.Reporting/Areas/WebTools/Views/UserIsNotAuthenticated.cshtml
0 → 100644
... | ... | @@ -0,0 +1,10 @@ |
1 | +@model object | |
2 | +@{string detailedmessage = string.IsNullOrWhiteSpace((string)Model) ? "" : (string)Model; } | |
3 | +<hgroup class="title"> | |
4 | + <h1 class="error" style="background-color: black; color: white; Line-height: 2">Error!</h1> | |
5 | + <h2 class="error" style="background-color: lightgrey; color: black;">No user logged in, or user not authorized!</h2> | |
6 | +</hgroup> | |
7 | +<hr style="color: white;"> | |
8 | +<hgroup class="title"> | |
9 | + <h6 class="error" style="background-color: lightgrey; color: black;">@detailedmessage</h6> | |
10 | +</hgroup> | ... | ... |
Vrh.Web.Reporting/Areas/WebTools/Views/_LayoutNoMenu.cshtml
0 → 100644
... | ... | @@ -0,0 +1,23 @@ |
1 | +<!DOCTYPE html> | |
2 | + | |
3 | +@using System.Reflection; | |
4 | +@using VRH.Log4Pro.MultiLanguageManager; | |
5 | +@using Vrh.Web.Common.Lib | |
6 | +@using System.Web.Optimization | |
7 | + | |
8 | +<html> | |
9 | +<head> | |
10 | + <meta charset="utf-8" /> | |
11 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
12 | + <title>@ViewBag.Title</title> | |
13 | + @Styles.Render(WTConst.BUNDLES_STYLE) | |
14 | + @RenderSection("styles", required: false) | |
15 | + | |
16 | + | |
17 | + @Scripts.Render(WTConst.BUNDLES_SCRIPT) | |
18 | +</head> | |
19 | +<body> | |
20 | + <div class="container-fluid body-content">@RenderBody()</div> | |
21 | + @RenderSection("scripts", required: false) | |
22 | +</body> | |
23 | +</html> | |
0 | 24 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/Areas/WebTools/Views/_ViewStart.cshtml
... | ... | @@ -0,0 +1,35 @@ |
1 | +<?xml version="1.0"?> | |
2 | + | |
3 | +<configuration> | |
4 | + <configSections> | |
5 | + <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | |
6 | + <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | |
7 | + <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | |
8 | + </sectionGroup> | |
9 | + </configSections> | |
10 | + | |
11 | + <system.web.webPages.razor> | |
12 | + <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
13 | + <pages pageBaseType="System.Web.Mvc.WebViewPage"> | |
14 | + <namespaces> | |
15 | + <add namespace="System.Web.Mvc" /> | |
16 | + <add namespace="System.Web.Mvc.Ajax" /> | |
17 | + <add namespace="System.Web.Mvc.Html" /> | |
18 | + <add namespace="System.Web.Routing" /> | |
19 | + <add namespace="VRH.Log4Pro.WebTools" /> | |
20 | + | |
21 | + </namespaces> | |
22 | + </pages> | |
23 | + </system.web.webPages.razor> | |
24 | + | |
25 | + <appSettings> | |
26 | + <add key="webpages:Enabled" value="false" /> | |
27 | + </appSettings> | |
28 | + | |
29 | + <system.webServer> | |
30 | + <handlers> | |
31 | + <remove name="BlockViewHandler"/> | |
32 | + <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> | |
33 | + </handlers> | |
34 | + </system.webServer> | |
35 | +</configuration> | |
0 | 36 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/Properties/AssemblyInfo.cs
... | ... | @@ -36,6 +36,6 @@ using System.Runtime.InteropServices; |
36 | 36 | // You can specify all the values or you can default the Build and Revision Numbers |
37 | 37 | // by using the '*' as shown below: |
38 | 38 | // [assembly: AssemblyVersion("1.0.*")] |
39 | -[assembly: AssemblyVersion("1.2.0.0")] | |
40 | -[assembly: AssemblyFileVersion("1.2.0.0")] | |
41 | -[assembly: AssemblyInformationalVersion("1.2.0")] | |
39 | +[assembly: AssemblyVersion("1.2.1.0")] | |
40 | +[assembly: AssemblyFileVersion("1.2.1.0")] | |
41 | +[assembly: AssemblyInformationalVersion("1.2.1")] | ... | ... |
Vrh.Web.Reporting/Scripts/_references.js
Vrh.Web.Reporting/Scripts/jquery-ui-1.12.1.min.js deleted
... | ... | @@ -1,13 +0,0 @@ |
1 | -/*! jQuery UI - v1.12.1 - 2016-09-14 | |
2 | -* http://jqueryui.com | |
3 | -* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js | |
4 | -* Copyright jQuery Foundation and other contributors; Licensed MIT */ | |
5 | - | |
6 | -(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType,o=!s&&!n;return{element:i,isWindow:s,isDocument:n,offset:o?t(e).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}},t.fn.position=function(n){if(!n||!n.of)return d.apply(this,arguments);n=t.extend({},n);var u,p,f,g,m,_,v=t(n.of),b=t.position.getWithinInfo(n.within),y=t.position.getScrollInfo(b),w=(n.collision||"flip").split(" "),k={};return _=s(v),v[0].preventDefault&&(n.at="left top"),p=_.width,f=_.height,g=_.offset,m=t.extend({},g),t.each(["my","at"],function(){var t,e,i=(n[this]||"").split(" ");1===i.length&&(i=r.test(i[0])?i.concat(["center"]):h.test(i[0])?["center"].concat(i):["center","center"]),i[0]=r.test(i[0])?i[0]:"center",i[1]=h.test(i[1])?i[1]:"center",t=l.exec(i[0]),e=l.exec(i[1]),k[this]=[t?t[0]:0,e?e[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===n.at[0]?m.left+=p:"center"===n.at[0]&&(m.left+=p/2),"bottom"===n.at[1]?m.top+=f:"center"===n.at[1]&&(m.top+=f/2),u=e(k.at,p,f),m.left+=u[0],m.top+=u[1],this.each(function(){var s,r,h=t(this),l=h.outerWidth(),c=h.outerHeight(),d=i(this,"marginLeft"),_=i(this,"marginTop"),x=l+d+i(this,"marginRight")+y.width,C=c+_+i(this,"marginBottom")+y.height,D=t.extend({},m),I=e(k.my,h.outerWidth(),h.outerHeight());"right"===n.my[0]?D.left-=l:"center"===n.my[0]&&(D.left-=l/2),"bottom"===n.my[1]?D.top-=c:"center"===n.my[1]&&(D.top-=c/2),D.left+=I[0],D.top+=I[1],s={marginLeft:d,marginTop:_},t.each(["left","top"],function(e,i){t.ui.position[w[e]]&&t.ui.position[w[e]][i](D,{targetWidth:p,targetHeight:f,elemWidth:l,elemHeight:c,collisionPosition:s,collisionWidth:x,collisionHeight:C,offset:[u[0]+I[0],u[1]+I[1]],my:n.my,at:n.at,within:b,elem:h})}),n.using&&(r=function(t){var e=g.left-D.left,i=e+p-l,s=g.top-D.top,r=s+f-c,u={target:{element:v,left:g.left,top:g.top,width:p,height:f},element:{element:h,left:D.left,top:D.top,width:l,height:c},horizontal:0>i?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n) | |
7 | -}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()<e.index()),c=this.options.animate||{},u=l&&c.down||c,d=function(){a._toggleComplete(i)};return"number"==typeof u&&(o=u),"string"==typeof u&&(n=u),n=n||u.easing||c.easing,o=o||u.duration||c.duration,e.length?t.length?(s=t.show().outerHeight(),e.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(this.showProps,{duration:o,easing:n,complete:d,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==a.options.heightStyle&&(i.now=Math.round(s-e.outerHeight()-r),r=0)}}),void 0):e.animate(this.hideProps,o,n,d):t.animate(this.showProps,o,n,d)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("<span>").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)},_filterMenuItems:function(e){var i=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(t.trim(t(this).children(".ui-menu-item-wrapper").text()))})}}),t.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n; | |
8 | -this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<div>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("<div>").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t("<span>"),this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),t=this.element[0].disabled,null!=t&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===t.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,i){var s="iconPosition"!==e,n=s?this.options.iconPosition:i,o="top"===n||"bottom"===n;this.icon?s&&this._removeClass(this.icon,null,this.options.icon):(this.icon=t("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),s&&this._addClass(this.icon,null,i),this._attachIcon(n),o?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=t("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(n))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),this.element[0].disabled=e,e&&this.element.blur())},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),t.uiBackCompat!==!1&&(t.widget("ui.button",t.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){return"text"===t?(this._super("showLabel",e),void 0):("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments),void 0)}}),t.fn.button=function(e){return function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?e.apply(this,arguments):(t.ui.checkboxradio||t.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}}(t.fn.button),t.fn.buttonset=function(){return t.ui.controlgroup||t.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),t.ui.button,t.extend(t.ui,{datepicker:{version:"1.12.1"}});var m;t.extend(s.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return a(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var s=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s)) | |
9 | -}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,P+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+E[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!E[2]?"":" title='"+E[2].replace(/'/g,"'")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?" ":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===B.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),T+="</tbody></table>"+(X?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())} | |
10 | -},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY<n.scrollSensitivity?a.scrollTop=o=a.scrollTop+n.scrollSpeed:e.pageY-s.overflowOffset.top<n.scrollSensitivity&&(a.scrollTop=o=a.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+a.offsetWidth-e.pageX<n.scrollSensitivity?a.scrollLeft=o=a.scrollLeft+n.scrollSpeed:e.pageX-s.overflowOffset.left<n.scrollSensitivity&&(a.scrollLeft=o=a.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(e.pageY-t(r).scrollTop()<n.scrollSensitivity?o=t(r).scrollTop(t(r).scrollTop()-n.scrollSpeed):t(window).height()-(e.pageY-t(r).scrollTop())<n.scrollSensitivity&&(o=t(r).scrollTop(t(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(e.pageX-t(r).scrollLeft()<n.scrollSensitivity?o=t(r).scrollLeft(t(r).scrollLeft()-n.scrollSpeed):t(window).width()-(e.pageX-t(r).scrollLeft())<n.scrollSensitivity&&(o=t(r).scrollLeft(t(r).scrollLeft()+n.scrollSpeed)))),o!==!1&&t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(s,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,i,s){var n=s.options;s.snapElements=[],t(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var e=t(this),i=e.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:i.top,left:i.left})})},drag:function(e,i,s){var n,o,a,r,h,l,c,u,d,p,f=s.options,g=f.snapTolerance,m=i.offset.left,_=m+s.helperProportions.width,v=i.offset.top,b=v+s.helperProportions.height;for(d=s.snapElements.length-1;d>=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("<div>"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog | |
11 | -},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=t()},_drawButton:function(){var e,i=this,s=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.focus(),t.preventDefault()}}),this.element.hide(),this.button=t("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=t("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(s).appendTo(this.button),this.options.width!==!1&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){i._rendered||i._refreshMenu()})},_drawMenu:function(){var e=this;this.menu=t("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=t("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,i){t.preventDefault(),e._setSelection(),e._select(i.item.data("ui-selectmenu-item"),t)},focus:function(t,i){var s=i.item.data("ui-selectmenu-item");null!=e.focusIndex&&s.index!==e.focusIndex&&(e._trigger("focus",t,{item:s}),e.isOpen||e._select(s,t)),e.focusIndex=s.index,e.button.attr("aria-activedescendant",e.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t,e=this.element.find("option");this.menu.empty(),this._parseOptions(e),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,e.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(t.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var i=t("<span>");return this._setText(i,e.label),this._addClass(i,"ui-selectmenu-text"),i},_renderMenu:function(e,i){var s=this,n="";t.each(i,function(i,o){var a;o.optgroup!==n&&(a=t("<li>",{text:o.optgroup}),s._addClass(a,"ui-selectmenu-optgroup","ui-menu-divider"+(o.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),a.appendTo(e),n=o.optgroup),s._renderItemData(e,o)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(e,i){var s=t("<li>"),n=t("<div>",{title:i.element.attr("title")});return i.disabled&&this._addClass(s,null,"ui-state-disabled"),this._setText(n,i.label),s.append(n).appendTo(e)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),n+=":not(.ui-state-disabled)"),s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](n).eq(-1):i[t+"All"](n).eq(0),s.length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?(t=window.getSelection(),t.removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(t(e.target).closest(".ui-selectmenu-menu, #"+t.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection(),t.rangeCount&&(this.range=t.getRangeAt(0))):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(e){var i=!0;switch(e.keyCode){case t.ui.keyCode.TAB:case t.ui.keyCode.ESCAPE:this.close(e),i=!1;break;case t.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case t.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case t.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case t.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case t.ui.keyCode.LEFT:this._move("prev",e);break;case t.ui.keyCode.RIGHT:this._move("next",e);break;case t.ui.keyCode.HOME:case t.ui.keyCode.PAGE_UP:this._move("first",e);break;case t.ui.keyCode.END:case t.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),i=!1}i&&e.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){var e=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":e,"aria-activedescendant":e}),this.menu.attr("aria-activedescendant",e)},_setOption:function(t,e){if("icons"===t){var i=this.button.find("span.ui-icon");this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)}this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;return t===!1?(this.button.css("width",""),void 0):(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t),void 0)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(e){var i=this,s=[];e.each(function(e,n){s.push(i._parseOption(t(n),e))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),t.widget("ui.slider",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1 | |
12 | -},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),this._super(e,i),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(i),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=n-1;s>=0;s--)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step,s=Math.round((t-e)/i)*i;t=s+e,t>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this._hasMultipleValues()?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},r.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},r.animate))},_handleEvents:{keydown:function(e){var i,s,n,o,a=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(t(e.target),null,"ui-state-active"),i=this._start(e,a),i===!1))return}switch(o=this.options.step,s=n=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case t.ui.keyCode.HOME:n=this._valueMin();break;case t.ui.keyCode.END:n=this._valueMax();break;case t.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-o)}this._slide(e,a,n)},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),this._removeClass(t(e.target),null,"ui-state-active"))}}}),t.widget("ui.sortable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return t>=e&&e+i>t},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):void 0}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var e,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),o=s&&n;return o?(e=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection(),this.floating?"right"===i||"down"===e?2:1:e&&("down"===e?2:1)):!1},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s],this.document[0]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i],this.document[0]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]);return e._addClass(n,"ui-sortable-placeholder",i||e.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(n)):"tr"===s?e._createTrPlaceholder(e.currentItem,n):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,i){var s=this;e.children().each(function(){t("<td> </td>",s.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(e){var i,s,n,o,a,r,h,l,c,u,d=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!t.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(d&&t.contains(this.containers[i].element[0],d.element[0]))continue;d=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",e,this._uiHash(this)),this.containers[i].containerCache.over=0);if(d)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,c=d.floating||this._isFloating(this.currentItem),a=c?"left":"top",r=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)t.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[a],l=!1,e[u]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(e[u]-h)&&(n=Math.abs(e[u]-h),o=this.items[s],this.direction=l?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;o?this._rearrange(e,o,null,!0):this._rearrange(e,null,this.containers[p].element,!0),this._trigger("change",e,this._uiHash()),this.containers[p]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",e,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter; | |
13 | -this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("<div>").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("<div>").attr("role","tooltip"),s=t("<div>").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip}); | |
14 | 0 | \ No newline at end of file |
Vrh.Web.Reporting/Scripts/jquery-ui-1.12.1.js renamed to Vrh.Web.Reporting/Scripts/jquery-ui-1.13.2.js
1 | -/*! jQuery UI - v1.12.1 - 2016-09-14 | |
1 | +/*! jQuery UI - v1.13.2 - 2022-07-14 | |
2 | 2 | * http://jqueryui.com |
3 | -* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js | |
3 | +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js | |
4 | 4 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ |
5 | 5 | |
6 | -(function( factory ) { | |
6 | +( function( factory ) { | |
7 | + "use strict"; | |
8 | + | |
7 | 9 | if ( typeof define === "function" && define.amd ) { |
8 | 10 | |
9 | 11 | // AMD. Register as an anonymous module. |
10 | - define([ "jquery" ], factory ); | |
12 | + define( [ "jquery" ], factory ); | |
11 | 13 | } else { |
12 | 14 | |
13 | 15 | // Browser globals |
14 | 16 | factory( jQuery ); |
15 | 17 | } |
16 | -}(function( $ ) { | |
18 | +} )( function( $ ) { | |
19 | +"use strict"; | |
17 | 20 | |
18 | 21 | $.ui = $.ui || {}; |
19 | 22 | |
20 | -var version = $.ui.version = "1.12.1"; | |
23 | +var version = $.ui.version = "1.13.2"; | |
21 | 24 | |
22 | 25 | |
23 | 26 | /*! |
24 | - * jQuery UI Widget 1.12.1 | |
27 | + * jQuery UI Widget 1.13.2 | |
25 | 28 | * http://jqueryui.com |
26 | 29 | * |
27 | 30 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -36,24 +39,20 @@ var version = $.ui.version = "1.12.1"; |
36 | 39 | //>>demos: http://jqueryui.com/widget/ |
37 | 40 | |
38 | 41 | |
39 | - | |
40 | 42 | var widgetUuid = 0; |
43 | +var widgetHasOwnProperty = Array.prototype.hasOwnProperty; | |
41 | 44 | var widgetSlice = Array.prototype.slice; |
42 | 45 | |
43 | 46 | $.cleanData = ( function( orig ) { |
44 | 47 | return function( elems ) { |
45 | 48 | var events, elem, i; |
46 | 49 | for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { |
47 | - try { | |
48 | - | |
49 | - // Only trigger remove when necessary to save time | |
50 | - events = $._data( elem, "events" ); | |
51 | - if ( events && events.remove ) { | |
52 | - $( elem ).triggerHandler( "remove" ); | |
53 | - } | |
54 | 50 | |
55 | - // Http://bugs.jquery.com/ticket/8235 | |
56 | - } catch ( e ) {} | |
51 | + // Only trigger remove when necessary to save time | |
52 | + events = $._data( elem, "events" ); | |
53 | + if ( events && events.remove ) { | |
54 | + $( elem ).triggerHandler( "remove" ); | |
55 | + } | |
57 | 56 | } |
58 | 57 | orig( elems ); |
59 | 58 | }; |
... | ... | @@ -75,12 +74,12 @@ $.widget = function( name, base, prototype ) { |
75 | 74 | base = $.Widget; |
76 | 75 | } |
77 | 76 | |
78 | - if ( $.isArray( prototype ) ) { | |
77 | + if ( Array.isArray( prototype ) ) { | |
79 | 78 | prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); |
80 | 79 | } |
81 | 80 | |
82 | 81 | // Create selector for plugin |
83 | - $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { | |
82 | + $.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) { | |
84 | 83 | return !!$.data( elem, fullName ); |
85 | 84 | }; |
86 | 85 | |
... | ... | @@ -89,7 +88,7 @@ $.widget = function( name, base, prototype ) { |
89 | 88 | constructor = $[ namespace ][ name ] = function( options, element ) { |
90 | 89 | |
91 | 90 | // Allow instantiation without "new" keyword |
92 | - if ( !this._createWidget ) { | |
91 | + if ( !this || !this._createWidget ) { | |
93 | 92 | return new constructor( options, element ); |
94 | 93 | } |
95 | 94 | |
... | ... | @@ -120,7 +119,7 @@ $.widget = function( name, base, prototype ) { |
120 | 119 | // inheriting from |
121 | 120 | basePrototype.options = $.widget.extend( {}, basePrototype.options ); |
122 | 121 | $.each( prototype, function( prop, value ) { |
123 | - if ( !$.isFunction( value ) ) { | |
122 | + if ( typeof value !== "function" ) { | |
124 | 123 | proxiedPrototype[ prop ] = value; |
125 | 124 | return; |
126 | 125 | } |
... | ... | @@ -199,7 +198,7 @@ $.widget.extend = function( target ) { |
199 | 198 | for ( ; inputIndex < inputLength; inputIndex++ ) { |
200 | 199 | for ( key in input[ inputIndex ] ) { |
201 | 200 | value = input[ inputIndex ][ key ]; |
202 | - if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { | |
201 | + if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) { | |
203 | 202 | |
204 | 203 | // Clone objects |
205 | 204 | if ( $.isPlainObject( value ) ) { |
... | ... | @@ -248,7 +247,8 @@ $.widget.bridge = function( name, object ) { |
248 | 247 | "attempted to call method '" + options + "'" ); |
249 | 248 | } |
250 | 249 | |
251 | - if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { | |
250 | + if ( typeof instance[ options ] !== "function" || | |
251 | + options.charAt( 0 ) === "_" ) { | |
252 | 252 | return $.error( "no such method '" + options + "' for " + name + |
253 | 253 | " widget instance" ); |
254 | 254 | } |
... | ... | @@ -509,12 +509,34 @@ $.Widget.prototype = { |
509 | 509 | classes: this.options.classes || {} |
510 | 510 | }, options ); |
511 | 511 | |
512 | + function bindRemoveEvent() { | |
513 | + var nodesToBind = []; | |
514 | + | |
515 | + options.element.each( function( _, element ) { | |
516 | + var isTracked = $.map( that.classesElementLookup, function( elements ) { | |
517 | + return elements; | |
518 | + } ) | |
519 | + .some( function( elements ) { | |
520 | + return elements.is( element ); | |
521 | + } ); | |
522 | + | |
523 | + if ( !isTracked ) { | |
524 | + nodesToBind.push( element ); | |
525 | + } | |
526 | + } ); | |
527 | + | |
528 | + that._on( $( nodesToBind ), { | |
529 | + remove: "_untrackClassesElement" | |
530 | + } ); | |
531 | + } | |
532 | + | |
512 | 533 | function processClassString( classes, checkOption ) { |
513 | 534 | var current, i; |
514 | 535 | for ( i = 0; i < classes.length; i++ ) { |
515 | 536 | current = that.classesElementLookup[ classes[ i ] ] || $(); |
516 | 537 | if ( options.add ) { |
517 | - current = $( $.unique( current.get().concat( options.element.get() ) ) ); | |
538 | + bindRemoveEvent(); | |
539 | + current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) ); | |
518 | 540 | } else { |
519 | 541 | current = $( current.not( options.element ).get() ); |
520 | 542 | } |
... | ... | @@ -526,10 +548,6 @@ $.Widget.prototype = { |
526 | 548 | } |
527 | 549 | } |
528 | 550 | |
529 | - this._on( options.element, { | |
530 | - "remove": "_untrackClassesElement" | |
531 | - } ); | |
532 | - | |
533 | 551 | if ( options.keys ) { |
534 | 552 | processClassString( options.keys.match( /\S+/g ) || [], true ); |
535 | 553 | } |
... | ... | @@ -547,6 +565,8 @@ $.Widget.prototype = { |
547 | 565 | that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); |
548 | 566 | } |
549 | 567 | } ); |
568 | + | |
569 | + this._off( $( event.target ) ); | |
550 | 570 | }, |
551 | 571 | |
552 | 572 | _removeClass: function( element, keys, extra ) { |
... | ... | @@ -627,7 +647,7 @@ $.Widget.prototype = { |
627 | 647 | _off: function( element, eventName ) { |
628 | 648 | eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + |
629 | 649 | this.eventNamespace; |
630 | - element.off( eventName ).off( eventName ); | |
650 | + element.off( eventName ); | |
631 | 651 | |
632 | 652 | // Clear the stack to avoid memory leaks (#10056) |
633 | 653 | this.bindings = $( this.bindings.not( element ).get() ); |
... | ... | @@ -693,7 +713,7 @@ $.Widget.prototype = { |
693 | 713 | } |
694 | 714 | |
695 | 715 | this.element.trigger( event, data ); |
696 | - return !( $.isFunction( callback ) && | |
716 | + return !( typeof callback === "function" && | |
697 | 717 | callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || |
698 | 718 | event.isDefaultPrevented() ); |
699 | 719 | } |
... | ... | @@ -715,6 +735,8 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { |
715 | 735 | options = options || {}; |
716 | 736 | if ( typeof options === "number" ) { |
717 | 737 | options = { duration: options }; |
738 | + } else if ( options === true ) { | |
739 | + options = {}; | |
718 | 740 | } |
719 | 741 | |
720 | 742 | hasOptions = !$.isEmptyObject( options ); |
... | ... | @@ -744,7 +766,7 @@ var widget = $.widget; |
744 | 766 | |
745 | 767 | |
746 | 768 | /*! |
747 | - * jQuery UI Position 1.12.1 | |
769 | + * jQuery UI Position 1.13.2 | |
748 | 770 | * http://jqueryui.com |
749 | 771 | * |
750 | 772 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -783,6 +805,10 @@ function parseCss( element, property ) { |
783 | 805 | return parseInt( $.css( element, property ), 10 ) || 0; |
784 | 806 | } |
785 | 807 | |
808 | +function isWindow( obj ) { | |
809 | + return obj != null && obj === obj.window; | |
810 | +} | |
811 | + | |
786 | 812 | function getDimensions( elem ) { |
787 | 813 | var raw = elem[ 0 ]; |
788 | 814 | if ( raw.nodeType === 9 ) { |
... | ... | @@ -792,7 +818,7 @@ function getDimensions( elem ) { |
792 | 818 | offset: { top: 0, left: 0 } |
793 | 819 | }; |
794 | 820 | } |
795 | - if ( $.isWindow( raw ) ) { | |
821 | + if ( isWindow( raw ) ) { | |
796 | 822 | return { |
797 | 823 | width: elem.width(), |
798 | 824 | height: elem.height(), |
... | ... | @@ -819,9 +845,9 @@ $.position = { |
819 | 845 | return cachedScrollbarWidth; |
820 | 846 | } |
821 | 847 | var w1, w2, |
822 | - div = $( "<div " + | |
823 | - "style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" + | |
824 | - "<div style='height:100px;width:auto;'></div></div>" ), | |
848 | + div = $( "<div style=" + | |
849 | + "'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" + | |
850 | + "<div style='height:300px;width:auto;'></div></div>" ), | |
825 | 851 | innerDiv = div.children()[ 0 ]; |
826 | 852 | |
827 | 853 | $( "body" ).append( div ); |
... | ... | @@ -854,12 +880,12 @@ $.position = { |
854 | 880 | }, |
855 | 881 | getWithinInfo: function( element ) { |
856 | 882 | var withinElement = $( element || window ), |
857 | - isWindow = $.isWindow( withinElement[ 0 ] ), | |
883 | + isElemWindow = isWindow( withinElement[ 0 ] ), | |
858 | 884 | isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, |
859 | - hasOffset = !isWindow && !isDocument; | |
885 | + hasOffset = !isElemWindow && !isDocument; | |
860 | 886 | return { |
861 | 887 | element: withinElement, |
862 | - isWindow: isWindow, | |
888 | + isWindow: isElemWindow, | |
863 | 889 | isDocument: isDocument, |
864 | 890 | offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, |
865 | 891 | scrollLeft: withinElement.scrollLeft(), |
... | ... | @@ -879,7 +905,12 @@ $.fn.position = function( options ) { |
879 | 905 | options = $.extend( {}, options ); |
880 | 906 | |
881 | 907 | var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, |
882 | - target = $( options.of ), | |
908 | + | |
909 | + // Make sure string options are treated as CSS selectors | |
910 | + target = typeof options.of === "string" ? | |
911 | + $( document ).find( options.of ) : | |
912 | + $( options.of ), | |
913 | + | |
883 | 914 | within = $.position.getWithinInfo( options.within ), |
884 | 915 | scrollInfo = $.position.getScrollInfo( within ), |
885 | 916 | collision = ( options.collision || "flip" ).split( " " ), |
... | ... | @@ -1232,7 +1263,7 @@ var position = $.ui.position; |
1232 | 1263 | |
1233 | 1264 | |
1234 | 1265 | /*! |
1235 | - * jQuery UI :data 1.12.1 | |
1266 | + * jQuery UI :data 1.13.2 | |
1236 | 1267 | * http://jqueryui.com |
1237 | 1268 | * |
1238 | 1269 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -1246,7 +1277,7 @@ var position = $.ui.position; |
1246 | 1277 | //>>docs: http://api.jqueryui.com/data-selector/ |
1247 | 1278 | |
1248 | 1279 | |
1249 | -var data = $.extend( $.expr[ ":" ], { | |
1280 | +var data = $.extend( $.expr.pseudos, { | |
1250 | 1281 | data: $.expr.createPseudo ? |
1251 | 1282 | $.expr.createPseudo( function( dataName ) { |
1252 | 1283 | return function( elem ) { |
... | ... | @@ -1261,7 +1292,7 @@ var data = $.extend( $.expr[ ":" ], { |
1261 | 1292 | } ); |
1262 | 1293 | |
1263 | 1294 | /*! |
1264 | - * jQuery UI Disable Selection 1.12.1 | |
1295 | + * jQuery UI Disable Selection 1.13.2 | |
1265 | 1296 | * http://jqueryui.com |
1266 | 1297 | * |
1267 | 1298 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -1276,7 +1307,6 @@ var data = $.extend( $.expr[ ":" ], { |
1276 | 1307 | |
1277 | 1308 | // This file is deprecated |
1278 | 1309 | |
1279 | - | |
1280 | 1310 | var disableSelection = $.fn.extend( { |
1281 | 1311 | disableSelection: ( function() { |
1282 | 1312 | var eventType = "onselectstart" in document.createElement( "div" ) ? |
... | ... | @@ -1296,56 +1326,37 @@ var disableSelection = $.fn.extend( { |
1296 | 1326 | } ); |
1297 | 1327 | |
1298 | 1328 | |
1299 | -/*! | |
1300 | - * jQuery UI Effects 1.12.1 | |
1301 | - * http://jqueryui.com | |
1302 | - * | |
1303 | - * Copyright jQuery Foundation and other contributors | |
1304 | - * Released under the MIT license. | |
1305 | - * http://jquery.org/license | |
1306 | - */ | |
1307 | - | |
1308 | -//>>label: Effects Core | |
1309 | -//>>group: Effects | |
1310 | -// jscs:disable maximumLineLength | |
1311 | -//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. | |
1312 | -// jscs:enable maximumLineLength | |
1313 | -//>>docs: http://api.jqueryui.com/category/effects-core/ | |
1314 | -//>>demos: http://jqueryui.com/effect/ | |
1315 | - | |
1316 | - | |
1317 | 1329 | |
1318 | -var dataSpace = "ui-effects-", | |
1319 | - dataSpaceStyle = "ui-effects-style", | |
1320 | - dataSpaceAnimated = "ui-effects-animated", | |
1330 | +// Create a local jQuery because jQuery Color relies on it and the | |
1331 | +// global may not exist with AMD and a custom build (#10199). | |
1332 | +// This module is a noop if used as a regular AMD module. | |
1333 | +// eslint-disable-next-line no-unused-vars | |
1334 | +var jQuery = $; | |
1321 | 1335 | |
1322 | - // Create a local jQuery because jQuery Color relies on it and the | |
1323 | - // global may not exist with AMD and a custom build (#10199) | |
1324 | - jQuery = $; | |
1325 | - | |
1326 | -$.effects = { | |
1327 | - effect: {} | |
1328 | -}; | |
1329 | 1336 | |
1330 | 1337 | /*! |
1331 | - * jQuery Color Animations v2.1.2 | |
1338 | + * jQuery Color Animations v2.2.0 | |
1332 | 1339 | * https://github.com/jquery/jquery-color |
1333 | 1340 | * |
1334 | - * Copyright 2014 jQuery Foundation and other contributors | |
1341 | + * Copyright OpenJS Foundation and other contributors | |
1335 | 1342 | * Released under the MIT license. |
1336 | 1343 | * http://jquery.org/license |
1337 | 1344 | * |
1338 | - * Date: Wed Jan 16 08:47:09 2013 -0600 | |
1345 | + * Date: Sun May 10 09:02:36 2020 +0200 | |
1339 | 1346 | */ |
1340 | -( function( jQuery, undefined ) { | |
1347 | + | |
1348 | + | |
1341 | 1349 | |
1342 | 1350 | var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " + |
1343 | 1351 | "borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", |
1344 | 1352 | |
1345 | - // Plusequals test for += 100 -= 100 | |
1353 | + class2type = {}, | |
1354 | + toString = class2type.toString, | |
1355 | + | |
1356 | + // plusequals test for += 100 -= 100 | |
1346 | 1357 | rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, |
1347 | 1358 | |
1348 | - // A set of RE's that can match strings and generate color tuples. | |
1359 | + // a set of RE's that can match strings and generate color tuples. | |
1349 | 1360 | stringParsers = [ { |
1350 | 1361 | re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, |
1351 | 1362 | parse: function( execResult ) { |
... | ... | @@ -1368,24 +1379,31 @@ $.effects = { |
1368 | 1379 | } |
1369 | 1380 | }, { |
1370 | 1381 | |
1371 | - // This regex ignores A-F because it's compared against an already lowercased string | |
1372 | - re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, | |
1382 | + // this regex ignores A-F because it's compared against an already lowercased string | |
1383 | + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/, | |
1373 | 1384 | parse: function( execResult ) { |
1374 | 1385 | return [ |
1375 | 1386 | parseInt( execResult[ 1 ], 16 ), |
1376 | 1387 | parseInt( execResult[ 2 ], 16 ), |
1377 | - parseInt( execResult[ 3 ], 16 ) | |
1388 | + parseInt( execResult[ 3 ], 16 ), | |
1389 | + execResult[ 4 ] ? | |
1390 | + ( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) : | |
1391 | + 1 | |
1378 | 1392 | ]; |
1379 | 1393 | } |
1380 | 1394 | }, { |
1381 | 1395 | |
1382 | - // This regex ignores A-F because it's compared against an already lowercased string | |
1383 | - re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, | |
1396 | + // this regex ignores A-F because it's compared against an already lowercased string | |
1397 | + re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/, | |
1384 | 1398 | parse: function( execResult ) { |
1385 | 1399 | return [ |
1386 | 1400 | parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), |
1387 | 1401 | parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), |
1388 | - parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) | |
1402 | + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ), | |
1403 | + execResult[ 4 ] ? | |
1404 | + ( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 ) | |
1405 | + .toFixed( 2 ) : | |
1406 | + 1 | |
1389 | 1407 | ]; |
1390 | 1408 | } |
1391 | 1409 | }, { |
... | ... | @@ -1401,7 +1419,7 @@ $.effects = { |
1401 | 1419 | } |
1402 | 1420 | } ], |
1403 | 1421 | |
1404 | - // JQuery.Color( ) | |
1422 | + // jQuery.Color( ) | |
1405 | 1423 | color = jQuery.Color = function( color, green, blue, alpha ) { |
1406 | 1424 | return new jQuery.Color.fn.parse( color, green, blue, alpha ); |
1407 | 1425 | }, |
... | ... | @@ -1455,20 +1473,20 @@ $.effects = { |
1455 | 1473 | }, |
1456 | 1474 | support = color.support = {}, |
1457 | 1475 | |
1458 | - // Element for support tests | |
1476 | + // element for support tests | |
1459 | 1477 | supportElem = jQuery( "<p>" )[ 0 ], |
1460 | 1478 | |
1461 | - // Colors = jQuery.Color.names | |
1479 | + // colors = jQuery.Color.names | |
1462 | 1480 | colors, |
1463 | 1481 | |
1464 | - // Local aliases of functions called often | |
1482 | + // local aliases of functions called often | |
1465 | 1483 | each = jQuery.each; |
1466 | 1484 | |
1467 | -// Determine rgba support immediately | |
1485 | +// determine rgba support immediately | |
1468 | 1486 | supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; |
1469 | 1487 | support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; |
1470 | 1488 | |
1471 | -// Define cache name and alpha properties | |
1489 | +// define cache name and alpha properties | |
1472 | 1490 | // for rgba and hsla spaces |
1473 | 1491 | each( spaces, function( spaceName, space ) { |
1474 | 1492 | space.cache = "_" + spaceName; |
... | ... | @@ -1479,6 +1497,22 @@ each( spaces, function( spaceName, space ) { |
1479 | 1497 | }; |
1480 | 1498 | } ); |
1481 | 1499 | |
1500 | +// Populate the class2type map | |
1501 | +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), | |
1502 | + function( _i, name ) { | |
1503 | + class2type[ "[object " + name + "]" ] = name.toLowerCase(); | |
1504 | + } ); | |
1505 | + | |
1506 | +function getType( obj ) { | |
1507 | + if ( obj == null ) { | |
1508 | + return obj + ""; | |
1509 | + } | |
1510 | + | |
1511 | + return typeof obj === "object" ? | |
1512 | + class2type[ toString.call( obj ) ] || "object" : | |
1513 | + typeof obj; | |
1514 | +} | |
1515 | + | |
1482 | 1516 | function clamp( value, prop, allowEmpty ) { |
1483 | 1517 | var type = propTypes[ prop.type ] || {}; |
1484 | 1518 | |
... | ... | @@ -1497,13 +1531,13 @@ function clamp( value, prop, allowEmpty ) { |
1497 | 1531 | |
1498 | 1532 | if ( type.mod ) { |
1499 | 1533 | |
1500 | - // We add mod before modding to make sure that negatives values | |
1534 | + // we add mod before modding to make sure that negatives values | |
1501 | 1535 | // get converted properly: -10 -> 350 |
1502 | 1536 | return ( value + type.mod ) % type.mod; |
1503 | 1537 | } |
1504 | 1538 | |
1505 | - // For now all property types without mod have min and max | |
1506 | - return 0 > value ? 0 : type.max < value ? type.max : value; | |
1539 | + // for now all property types without mod have min and max | |
1540 | + return Math.min( type.max, Math.max( 0, value ) ); | |
1507 | 1541 | } |
1508 | 1542 | |
1509 | 1543 | function stringParse( string ) { |
... | ... | @@ -1512,7 +1546,7 @@ function stringParse( string ) { |
1512 | 1546 | |
1513 | 1547 | string = string.toLowerCase(); |
1514 | 1548 | |
1515 | - each( stringParsers, function( i, parser ) { | |
1549 | + each( stringParsers, function( _i, parser ) { | |
1516 | 1550 | var parsed, |
1517 | 1551 | match = parser.re.exec( string ), |
1518 | 1552 | values = match && parser.parse( match ), |
... | ... | @@ -1521,12 +1555,12 @@ function stringParse( string ) { |
1521 | 1555 | if ( values ) { |
1522 | 1556 | parsed = inst[ spaceName ]( values ); |
1523 | 1557 | |
1524 | - // If this was an rgba parse the assignment might happen twice | |
1558 | + // if this was an rgba parse the assignment might happen twice | |
1525 | 1559 | // oh well.... |
1526 | 1560 | inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; |
1527 | 1561 | rgba = inst._rgba = parsed._rgba; |
1528 | 1562 | |
1529 | - // Exit each( stringParsers ) here because we matched | |
1563 | + // exit each( stringParsers ) here because we matched | |
1530 | 1564 | return false; |
1531 | 1565 | } |
1532 | 1566 | } ); |
... | ... | @@ -1534,7 +1568,7 @@ function stringParse( string ) { |
1534 | 1568 | // Found a stringParser that handled it |
1535 | 1569 | if ( rgba.length ) { |
1536 | 1570 | |
1537 | - // If this came from a parsed string, force "transparent" when alpha is 0 | |
1571 | + // if this came from a parsed string, force "transparent" when alpha is 0 | |
1538 | 1572 | // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) |
1539 | 1573 | if ( rgba.join() === "0,0,0,0" ) { |
1540 | 1574 | jQuery.extend( rgba, colors.transparent ); |
... | ... | @@ -1542,7 +1576,7 @@ function stringParse( string ) { |
1542 | 1576 | return inst; |
1543 | 1577 | } |
1544 | 1578 | |
1545 | - // Named colors | |
1579 | + // named colors | |
1546 | 1580 | return colors[ string ]; |
1547 | 1581 | } |
1548 | 1582 | |
... | ... | @@ -1558,10 +1592,10 @@ color.fn = jQuery.extend( color.prototype, { |
1558 | 1592 | } |
1559 | 1593 | |
1560 | 1594 | var inst = this, |
1561 | - type = jQuery.type( red ), | |
1595 | + type = getType( red ), | |
1562 | 1596 | rgba = this._rgba = []; |
1563 | 1597 | |
1564 | - // More than 1 argument specified - assume ( red, green, blue, alpha ) | |
1598 | + // more than 1 argument specified - assume ( red, green, blue, alpha ) | |
1565 | 1599 | if ( green !== undefined ) { |
1566 | 1600 | red = [ red, green, blue, alpha ]; |
1567 | 1601 | type = "array"; |
... | ... | @@ -1572,7 +1606,7 @@ color.fn = jQuery.extend( color.prototype, { |
1572 | 1606 | } |
1573 | 1607 | |
1574 | 1608 | if ( type === "array" ) { |
1575 | - each( spaces.rgba.props, function( key, prop ) { | |
1609 | + each( spaces.rgba.props, function( _key, prop ) { | |
1576 | 1610 | rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); |
1577 | 1611 | } ); |
1578 | 1612 | return this; |
... | ... | @@ -1580,20 +1614,20 @@ color.fn = jQuery.extend( color.prototype, { |
1580 | 1614 | |
1581 | 1615 | if ( type === "object" ) { |
1582 | 1616 | if ( red instanceof color ) { |
1583 | - each( spaces, function( spaceName, space ) { | |
1617 | + each( spaces, function( _spaceName, space ) { | |
1584 | 1618 | if ( red[ space.cache ] ) { |
1585 | 1619 | inst[ space.cache ] = red[ space.cache ].slice(); |
1586 | 1620 | } |
1587 | 1621 | } ); |
1588 | 1622 | } else { |
1589 | - each( spaces, function( spaceName, space ) { | |
1623 | + each( spaces, function( _spaceName, space ) { | |
1590 | 1624 | var cache = space.cache; |
1591 | 1625 | each( space.props, function( key, prop ) { |
1592 | 1626 | |
1593 | - // If the cache doesn't exist, and we know how to convert | |
1627 | + // if the cache doesn't exist, and we know how to convert | |
1594 | 1628 | if ( !inst[ cache ] && space.to ) { |
1595 | 1629 | |
1596 | - // If the value was null, we don't need to copy it | |
1630 | + // if the value was null, we don't need to copy it | |
1597 | 1631 | // if the key was alpha, we don't need to copy it either |
1598 | 1632 | if ( key === "alpha" || red[ key ] == null ) { |
1599 | 1633 | return; |
... | ... | @@ -1601,17 +1635,19 @@ color.fn = jQuery.extend( color.prototype, { |
1601 | 1635 | inst[ cache ] = space.to( inst._rgba ); |
1602 | 1636 | } |
1603 | 1637 | |
1604 | - // This is the only case where we allow nulls for ALL properties. | |
1638 | + // this is the only case where we allow nulls for ALL properties. | |
1605 | 1639 | // call clamp with alwaysAllowEmpty |
1606 | 1640 | inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); |
1607 | 1641 | } ); |
1608 | 1642 | |
1609 | - // Everything defined but alpha? | |
1610 | - if ( inst[ cache ] && | |
1611 | - jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { | |
1643 | + // everything defined but alpha? | |
1644 | + if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { | |
1645 | + | |
1646 | + // use the default of 1 | |
1647 | + if ( inst[ cache ][ 3 ] == null ) { | |
1648 | + inst[ cache ][ 3 ] = 1; | |
1649 | + } | |
1612 | 1650 | |
1613 | - // Use the default of 1 | |
1614 | - inst[ cache ][ 3 ] = 1; | |
1615 | 1651 | if ( space.from ) { |
1616 | 1652 | inst._rgba = space.from( inst[ cache ] ); |
1617 | 1653 | } |
... | ... | @@ -1661,18 +1697,18 @@ color.fn = jQuery.extend( color.prototype, { |
1661 | 1697 | result = start.slice(); |
1662 | 1698 | |
1663 | 1699 | end = end[ space.cache ]; |
1664 | - each( space.props, function( key, prop ) { | |
1700 | + each( space.props, function( _key, prop ) { | |
1665 | 1701 | var index = prop.idx, |
1666 | 1702 | startValue = start[ index ], |
1667 | 1703 | endValue = end[ index ], |
1668 | 1704 | type = propTypes[ prop.type ] || {}; |
1669 | 1705 | |
1670 | - // If null, don't override start value | |
1706 | + // if null, don't override start value | |
1671 | 1707 | if ( endValue === null ) { |
1672 | 1708 | return; |
1673 | 1709 | } |
1674 | 1710 | |
1675 | - // If null - use end | |
1711 | + // if null - use end | |
1676 | 1712 | if ( startValue === null ) { |
1677 | 1713 | result[ index ] = endValue; |
1678 | 1714 | } else { |
... | ... | @@ -1690,7 +1726,7 @@ color.fn = jQuery.extend( color.prototype, { |
1690 | 1726 | }, |
1691 | 1727 | blend: function( opaque ) { |
1692 | 1728 | |
1693 | - // If we are already opaque - return ourself | |
1729 | + // if we are already opaque - return ourself | |
1694 | 1730 | if ( this._rgba[ 3 ] === 1 ) { |
1695 | 1731 | return this; |
1696 | 1732 | } |
... | ... | @@ -1706,7 +1742,10 @@ color.fn = jQuery.extend( color.prototype, { |
1706 | 1742 | toRgbaString: function() { |
1707 | 1743 | var prefix = "rgba(", |
1708 | 1744 | rgba = jQuery.map( this._rgba, function( v, i ) { |
1709 | - return v == null ? ( i > 2 ? 1 : 0 ) : v; | |
1745 | + if ( v != null ) { | |
1746 | + return v; | |
1747 | + } | |
1748 | + return i > 2 ? 1 : 0; | |
1710 | 1749 | } ); |
1711 | 1750 | |
1712 | 1751 | if ( rgba[ 3 ] === 1 ) { |
... | ... | @@ -1723,7 +1762,7 @@ color.fn = jQuery.extend( color.prototype, { |
1723 | 1762 | v = i > 2 ? 1 : 0; |
1724 | 1763 | } |
1725 | 1764 | |
1726 | - // Catch 1 and 2 | |
1765 | + // catch 1 and 2 | |
1727 | 1766 | if ( i && i < 3 ) { |
1728 | 1767 | v = Math.round( v * 100 ) + "%"; |
1729 | 1768 | } |
... | ... | @@ -1746,7 +1785,7 @@ color.fn = jQuery.extend( color.prototype, { |
1746 | 1785 | |
1747 | 1786 | return "#" + jQuery.map( rgba, function( v ) { |
1748 | 1787 | |
1749 | - // Default to 0 when nulls exist | |
1788 | + // default to 0 when nulls exist | |
1750 | 1789 | v = ( v || 0 ).toString( 16 ); |
1751 | 1790 | return v.length === 1 ? "0" + v : v; |
1752 | 1791 | } ).join( "" ); |
... | ... | @@ -1757,7 +1796,7 @@ color.fn = jQuery.extend( color.prototype, { |
1757 | 1796 | } ); |
1758 | 1797 | color.fn.parse.prototype = color.fn; |
1759 | 1798 | |
1760 | -// Hsla conversions adapted from: | |
1799 | +// hsla conversions adapted from: | |
1761 | 1800 | // https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 |
1762 | 1801 | |
1763 | 1802 | function hue2rgb( p, q, h ) { |
... | ... | @@ -1799,7 +1838,7 @@ spaces.hsla.to = function( rgba ) { |
1799 | 1838 | h = ( 60 * ( r - g ) / diff ) + 240; |
1800 | 1839 | } |
1801 | 1840 | |
1802 | - // Chroma (diff) == 0 means greyscale which, by definition, saturation = 0% | |
1841 | + // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% | |
1803 | 1842 | // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) |
1804 | 1843 | if ( diff === 0 ) { |
1805 | 1844 | s = 0; |
... | ... | @@ -1830,16 +1869,17 @@ spaces.hsla.from = function( hsla ) { |
1830 | 1869 | ]; |
1831 | 1870 | }; |
1832 | 1871 | |
1872 | + | |
1833 | 1873 | each( spaces, function( spaceName, space ) { |
1834 | 1874 | var props = space.props, |
1835 | 1875 | cache = space.cache, |
1836 | 1876 | to = space.to, |
1837 | 1877 | from = space.from; |
1838 | 1878 | |
1839 | - // Makes rgba() and hsla() | |
1879 | + // makes rgba() and hsla() | |
1840 | 1880 | color.fn[ spaceName ] = function( value ) { |
1841 | 1881 | |
1842 | - // Generate a cache for this space if it doesn't exist | |
1882 | + // generate a cache for this space if it doesn't exist | |
1843 | 1883 | if ( to && !this[ cache ] ) { |
1844 | 1884 | this[ cache ] = to( this._rgba ); |
1845 | 1885 | } |
... | ... | @@ -1848,7 +1888,7 @@ each( spaces, function( spaceName, space ) { |
1848 | 1888 | } |
1849 | 1889 | |
1850 | 1890 | var ret, |
1851 | - type = jQuery.type( value ), | |
1891 | + type = getType( value ), | |
1852 | 1892 | arr = ( type === "array" || type === "object" ) ? value : arguments, |
1853 | 1893 | local = this[ cache ].slice(); |
1854 | 1894 | |
... | ... | @@ -1869,19 +1909,24 @@ each( spaces, function( spaceName, space ) { |
1869 | 1909 | } |
1870 | 1910 | }; |
1871 | 1911 | |
1872 | - // Makes red() green() blue() alpha() hue() saturation() lightness() | |
1912 | + // makes red() green() blue() alpha() hue() saturation() lightness() | |
1873 | 1913 | each( props, function( key, prop ) { |
1874 | 1914 | |
1875 | - // Alpha is included in more than one space | |
1915 | + // alpha is included in more than one space | |
1876 | 1916 | if ( color.fn[ key ] ) { |
1877 | 1917 | return; |
1878 | 1918 | } |
1879 | 1919 | color.fn[ key ] = function( value ) { |
1880 | - var vtype = jQuery.type( value ), | |
1881 | - fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), | |
1882 | - local = this[ fn ](), | |
1883 | - cur = local[ prop.idx ], | |
1884 | - match; | |
1920 | + var local, cur, match, fn, | |
1921 | + vtype = getType( value ); | |
1922 | + | |
1923 | + if ( key === "alpha" ) { | |
1924 | + fn = this._hsla ? "hsla" : "rgba"; | |
1925 | + } else { | |
1926 | + fn = spaceName; | |
1927 | + } | |
1928 | + local = this[ fn ](); | |
1929 | + cur = local[ prop.idx ]; | |
1885 | 1930 | |
1886 | 1931 | if ( vtype === "undefined" ) { |
1887 | 1932 | return cur; |
... | ... | @@ -1889,7 +1934,7 @@ each( spaces, function( spaceName, space ) { |
1889 | 1934 | |
1890 | 1935 | if ( vtype === "function" ) { |
1891 | 1936 | value = value.call( this, cur ); |
1892 | - vtype = jQuery.type( value ); | |
1937 | + vtype = getType( value ); | |
1893 | 1938 | } |
1894 | 1939 | if ( value == null && prop.empty ) { |
1895 | 1940 | return this; |
... | ... | @@ -1906,18 +1951,17 @@ each( spaces, function( spaceName, space ) { |
1906 | 1951 | } ); |
1907 | 1952 | } ); |
1908 | 1953 | |
1909 | -// Add cssHook and .fx.step function for each named hook. | |
1954 | +// add cssHook and .fx.step function for each named hook. | |
1910 | 1955 | // accept a space separated string of properties |
1911 | 1956 | color.hook = function( hook ) { |
1912 | 1957 | var hooks = hook.split( " " ); |
1913 | - each( hooks, function( i, hook ) { | |
1958 | + each( hooks, function( _i, hook ) { | |
1914 | 1959 | jQuery.cssHooks[ hook ] = { |
1915 | 1960 | set: function( elem, value ) { |
1916 | 1961 | var parsed, curElem, |
1917 | 1962 | backgroundColor = ""; |
1918 | 1963 | |
1919 | - if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || | |
1920 | - ( parsed = stringParse( value ) ) ) ) { | |
1964 | + if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { | |
1921 | 1965 | value = color( parsed || value ); |
1922 | 1966 | if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { |
1923 | 1967 | curElem = hook === "backgroundColor" ? elem.parentNode : elem; |
... | ... | @@ -1943,8 +1987,7 @@ color.hook = function( hook ) { |
1943 | 1987 | elem.style[ hook ] = value; |
1944 | 1988 | } catch ( e ) { |
1945 | 1989 | |
1946 | - // Wrapped to prevent IE from throwing errors on "invalid" values like | |
1947 | - // 'auto' or 'inherit' | |
1990 | + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' | |
1948 | 1991 | } |
1949 | 1992 | } |
1950 | 1993 | }; |
... | ... | @@ -1966,7 +2009,7 @@ jQuery.cssHooks.borderColor = { |
1966 | 2009 | expand: function( value ) { |
1967 | 2010 | var expanded = {}; |
1968 | 2011 | |
1969 | - each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { | |
2012 | + each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) { | |
1970 | 2013 | expanded[ "border" + part + "Color" ] = value; |
1971 | 2014 | } ); |
1972 | 2015 | return expanded; |
... | ... | @@ -2002,7 +2045,32 @@ colors = jQuery.Color.names = { |
2002 | 2045 | _default: "#ffffff" |
2003 | 2046 | }; |
2004 | 2047 | |
2005 | -} )( jQuery ); | |
2048 | + | |
2049 | +/*! | |
2050 | + * jQuery UI Effects 1.13.2 | |
2051 | + * http://jqueryui.com | |
2052 | + * | |
2053 | + * Copyright jQuery Foundation and other contributors | |
2054 | + * Released under the MIT license. | |
2055 | + * http://jquery.org/license | |
2056 | + */ | |
2057 | + | |
2058 | +//>>label: Effects Core | |
2059 | +//>>group: Effects | |
2060 | +/* eslint-disable max-len */ | |
2061 | +//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects. | |
2062 | +/* eslint-enable max-len */ | |
2063 | +//>>docs: http://api.jqueryui.com/category/effects-core/ | |
2064 | +//>>demos: http://jqueryui.com/effect/ | |
2065 | + | |
2066 | + | |
2067 | +var dataSpace = "ui-effects-", | |
2068 | + dataSpaceStyle = "ui-effects-style", | |
2069 | + dataSpaceAnimated = "ui-effects-animated"; | |
2070 | + | |
2071 | +$.effects = { | |
2072 | + effect: {} | |
2073 | +}; | |
2006 | 2074 | |
2007 | 2075 | /******************************************************************************/ |
2008 | 2076 | /****************************** CLASS ANIMATIONS ******************************/ |
... | ... | @@ -2034,6 +2102,12 @@ $.each( |
2034 | 2102 | } |
2035 | 2103 | ); |
2036 | 2104 | |
2105 | +function camelCase( string ) { | |
2106 | + return string.replace( /-([\da-z])/gi, function( all, letter ) { | |
2107 | + return letter.toUpperCase(); | |
2108 | + } ); | |
2109 | +} | |
2110 | + | |
2037 | 2111 | function getElementStyles( elem ) { |
2038 | 2112 | var key, len, |
2039 | 2113 | style = elem.ownerDocument.defaultView ? |
... | ... | @@ -2046,7 +2120,7 @@ function getElementStyles( elem ) { |
2046 | 2120 | while ( len-- ) { |
2047 | 2121 | key = style[ len ]; |
2048 | 2122 | if ( typeof style[ key ] === "string" ) { |
2049 | - styles[ $.camelCase( key ) ] = style[ key ]; | |
2123 | + styles[ camelCase( key ) ] = style[ key ]; | |
2050 | 2124 | } |
2051 | 2125 | } |
2052 | 2126 | |
... | ... | @@ -2220,12 +2294,12 @@ $.fn.extend( { |
2220 | 2294 | |
2221 | 2295 | ( function() { |
2222 | 2296 | |
2223 | -if ( $.expr && $.expr.filters && $.expr.filters.animated ) { | |
2224 | - $.expr.filters.animated = ( function( orig ) { | |
2297 | +if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) { | |
2298 | + $.expr.pseudos.animated = ( function( orig ) { | |
2225 | 2299 | return function( elem ) { |
2226 | 2300 | return !!$( elem ).data( dataSpaceAnimated ) || orig( elem ); |
2227 | 2301 | }; |
2228 | - } )( $.expr.filters.animated ); | |
2302 | + } )( $.expr.pseudos.animated ); | |
2229 | 2303 | } |
2230 | 2304 | |
2231 | 2305 | if ( $.uiBackCompat !== false ) { |
... | ... | @@ -2294,6 +2368,7 @@ if ( $.uiBackCompat !== false ) { |
2294 | 2368 | // Firefox incorrectly exposes anonymous content |
2295 | 2369 | // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 |
2296 | 2370 | try { |
2371 | + // eslint-disable-next-line no-unused-expressions | |
2297 | 2372 | active.id; |
2298 | 2373 | } catch ( e ) { |
2299 | 2374 | active = document.body; |
... | ... | @@ -2356,7 +2431,7 @@ if ( $.uiBackCompat !== false ) { |
2356 | 2431 | } |
2357 | 2432 | |
2358 | 2433 | $.extend( $.effects, { |
2359 | - version: "1.12.1", | |
2434 | + version: "1.13.2", | |
2360 | 2435 | |
2361 | 2436 | define: function( name, mode, effect ) { |
2362 | 2437 | if ( !effect ) { |
... | ... | @@ -2572,7 +2647,7 @@ function _normalizeArguments( effect, options, speed, callback ) { |
2572 | 2647 | } |
2573 | 2648 | |
2574 | 2649 | // Catch (effect, callback) |
2575 | - if ( $.isFunction( options ) ) { | |
2650 | + if ( typeof options === "function" ) { | |
2576 | 2651 | callback = options; |
2577 | 2652 | speed = null; |
2578 | 2653 | options = {}; |
... | ... | @@ -2586,7 +2661,7 @@ function _normalizeArguments( effect, options, speed, callback ) { |
2586 | 2661 | } |
2587 | 2662 | |
2588 | 2663 | // Catch (effect, options, callback) |
2589 | - if ( $.isFunction( speed ) ) { | |
2664 | + if ( typeof speed === "function" ) { | |
2590 | 2665 | callback = speed; |
2591 | 2666 | speed = null; |
2592 | 2667 | } |
... | ... | @@ -2620,7 +2695,7 @@ function standardAnimationOption( option ) { |
2620 | 2695 | } |
2621 | 2696 | |
2622 | 2697 | // Complete callback |
2623 | - if ( $.isFunction( option ) ) { | |
2698 | + if ( typeof option === "function" ) { | |
2624 | 2699 | return true; |
2625 | 2700 | } |
2626 | 2701 | |
... | ... | @@ -2647,7 +2722,7 @@ $.fn.extend( { |
2647 | 2722 | var el = $( this ), |
2648 | 2723 | normalizedMode = $.effects.mode( el, mode ) || defaultMode; |
2649 | 2724 | |
2650 | - // Sentinel for duck-punching the :animated psuedo-selector | |
2725 | + // Sentinel for duck-punching the :animated pseudo-selector | |
2651 | 2726 | el.data( dataSpaceAnimated, true ); |
2652 | 2727 | |
2653 | 2728 | // Save effect mode for later use, |
... | ... | @@ -2655,7 +2730,7 @@ $.fn.extend( { |
2655 | 2730 | // as the .show() below destroys the initial state |
2656 | 2731 | modes.push( normalizedMode ); |
2657 | 2732 | |
2658 | - // See $.uiBackCompat inside of run() for removal of defaultMode in 1.13 | |
2733 | + // See $.uiBackCompat inside of run() for removal of defaultMode in 1.14 | |
2659 | 2734 | if ( defaultMode && ( normalizedMode === "show" || |
2660 | 2735 | ( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) { |
2661 | 2736 | el.show(); |
... | ... | @@ -2665,7 +2740,7 @@ $.fn.extend( { |
2665 | 2740 | $.effects.saveStyle( el ); |
2666 | 2741 | } |
2667 | 2742 | |
2668 | - if ( $.isFunction( next ) ) { | |
2743 | + if ( typeof next === "function" ) { | |
2669 | 2744 | next(); |
2670 | 2745 | } |
2671 | 2746 | }; |
... | ... | @@ -2700,11 +2775,11 @@ $.fn.extend( { |
2700 | 2775 | } |
2701 | 2776 | |
2702 | 2777 | function done() { |
2703 | - if ( $.isFunction( complete ) ) { | |
2778 | + if ( typeof complete === "function" ) { | |
2704 | 2779 | complete.call( elem[ 0 ] ); |
2705 | 2780 | } |
2706 | 2781 | |
2707 | - if ( $.isFunction( next ) ) { | |
2782 | + if ( typeof next === "function" ) { | |
2708 | 2783 | next(); |
2709 | 2784 | } |
2710 | 2785 | } |
... | ... | @@ -2813,22 +2888,24 @@ $.fn.extend( { |
2813 | 2888 | width: target.innerWidth() |
2814 | 2889 | }, |
2815 | 2890 | startPosition = element.offset(), |
2816 | - transfer = $( "<div class='ui-effects-transfer'></div>" ) | |
2817 | - .appendTo( "body" ) | |
2818 | - .addClass( options.className ) | |
2819 | - .css( { | |
2820 | - top: startPosition.top - fixTop, | |
2821 | - left: startPosition.left - fixLeft, | |
2822 | - height: element.innerHeight(), | |
2823 | - width: element.innerWidth(), | |
2824 | - position: targetFixed ? "fixed" : "absolute" | |
2825 | - } ) | |
2826 | - .animate( animation, options.duration, options.easing, function() { | |
2827 | - transfer.remove(); | |
2828 | - if ( $.isFunction( done ) ) { | |
2829 | - done(); | |
2830 | - } | |
2831 | - } ); | |
2891 | + transfer = $( "<div class='ui-effects-transfer'></div>" ); | |
2892 | + | |
2893 | + transfer | |
2894 | + .appendTo( "body" ) | |
2895 | + .addClass( options.className ) | |
2896 | + .css( { | |
2897 | + top: startPosition.top - fixTop, | |
2898 | + left: startPosition.left - fixLeft, | |
2899 | + height: element.innerHeight(), | |
2900 | + width: element.innerWidth(), | |
2901 | + position: targetFixed ? "fixed" : "absolute" | |
2902 | + } ) | |
2903 | + .animate( animation, options.duration, options.easing, function() { | |
2904 | + transfer.remove(); | |
2905 | + if ( typeof done === "function" ) { | |
2906 | + done(); | |
2907 | + } | |
2908 | + } ); | |
2832 | 2909 | } |
2833 | 2910 | } ); |
2834 | 2911 | |
... | ... | @@ -2922,7 +2999,7 @@ var effect = $.effects; |
2922 | 2999 | |
2923 | 3000 | |
2924 | 3001 | /*! |
2925 | - * jQuery UI Effects Blind 1.12.1 | |
3002 | + * jQuery UI Effects Blind 1.13.2 | |
2926 | 3003 | * http://jqueryui.com |
2927 | 3004 | * |
2928 | 3005 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -2937,7 +3014,6 @@ var effect = $.effects; |
2937 | 3014 | //>>demos: http://jqueryui.com/effect/ |
2938 | 3015 | |
2939 | 3016 | |
2940 | - | |
2941 | 3017 | var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) { |
2942 | 3018 | var map = { |
2943 | 3019 | up: [ "bottom", "top" ], |
... | ... | @@ -2978,7 +3054,7 @@ var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, d |
2978 | 3054 | |
2979 | 3055 | |
2980 | 3056 | /*! |
2981 | - * jQuery UI Effects Bounce 1.12.1 | |
3057 | + * jQuery UI Effects Bounce 1.13.2 | |
2982 | 3058 | * http://jqueryui.com |
2983 | 3059 | * |
2984 | 3060 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -2993,7 +3069,6 @@ var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, d |
2993 | 3069 | //>>demos: http://jqueryui.com/effect/ |
2994 | 3070 | |
2995 | 3071 | |
2996 | - | |
2997 | 3072 | var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) { |
2998 | 3073 | var upAnim, downAnim, refValue, |
2999 | 3074 | element = $( this ), |
... | ... | @@ -3074,7 +3149,7 @@ var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) |
3074 | 3149 | |
3075 | 3150 | |
3076 | 3151 | /*! |
3077 | - * jQuery UI Effects Clip 1.12.1 | |
3152 | + * jQuery UI Effects Clip 1.13.2 | |
3078 | 3153 | * http://jqueryui.com |
3079 | 3154 | * |
3080 | 3155 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3089,7 +3164,6 @@ var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) |
3089 | 3164 | //>>demos: http://jqueryui.com/effect/ |
3090 | 3165 | |
3091 | 3166 | |
3092 | - | |
3093 | 3167 | var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) { |
3094 | 3168 | var start, |
3095 | 3169 | animate = {}, |
... | ... | @@ -3125,7 +3199,7 @@ var effectsEffectClip = $.effects.define( "clip", "hide", function( options, don |
3125 | 3199 | |
3126 | 3200 | |
3127 | 3201 | /*! |
3128 | - * jQuery UI Effects Drop 1.12.1 | |
3202 | + * jQuery UI Effects Drop 1.13.2 | |
3129 | 3203 | * http://jqueryui.com |
3130 | 3204 | * |
3131 | 3205 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3140,7 +3214,6 @@ var effectsEffectClip = $.effects.define( "clip", "hide", function( options, don |
3140 | 3214 | //>>demos: http://jqueryui.com/effect/ |
3141 | 3215 | |
3142 | 3216 | |
3143 | - | |
3144 | 3217 | var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) { |
3145 | 3218 | |
3146 | 3219 | var distance, |
... | ... | @@ -3180,7 +3253,7 @@ var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, don |
3180 | 3253 | |
3181 | 3254 | |
3182 | 3255 | /*! |
3183 | - * jQuery UI Effects Explode 1.12.1 | |
3256 | + * jQuery UI Effects Explode 1.13.2 | |
3184 | 3257 | * http://jqueryui.com |
3185 | 3258 | * |
3186 | 3259 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3190,14 +3263,13 @@ var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, don |
3190 | 3263 | |
3191 | 3264 | //>>label: Explode Effect |
3192 | 3265 | //>>group: Effects |
3193 | -// jscs:disable maximumLineLength | |
3266 | +/* eslint-disable max-len */ | |
3194 | 3267 | //>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. |
3195 | -// jscs:enable maximumLineLength | |
3268 | +/* eslint-enable max-len */ | |
3196 | 3269 | //>>docs: http://api.jqueryui.com/explode-effect/ |
3197 | 3270 | //>>demos: http://jqueryui.com/effect/ |
3198 | 3271 | |
3199 | 3272 | |
3200 | - | |
3201 | 3273 | var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) { |
3202 | 3274 | |
3203 | 3275 | var i, j, left, top, mx, my, |
... | ... | @@ -3277,7 +3349,7 @@ var effectsEffectExplode = $.effects.define( "explode", "hide", function( option |
3277 | 3349 | |
3278 | 3350 | |
3279 | 3351 | /*! |
3280 | - * jQuery UI Effects Fade 1.12.1 | |
3352 | + * jQuery UI Effects Fade 1.13.2 | |
3281 | 3353 | * http://jqueryui.com |
3282 | 3354 | * |
3283 | 3355 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3292,7 +3364,6 @@ var effectsEffectExplode = $.effects.define( "explode", "hide", function( option |
3292 | 3364 | //>>demos: http://jqueryui.com/effect/ |
3293 | 3365 | |
3294 | 3366 | |
3295 | - | |
3296 | 3367 | var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) { |
3297 | 3368 | var show = options.mode === "show"; |
3298 | 3369 | |
... | ... | @@ -3310,7 +3381,7 @@ var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, d |
3310 | 3381 | |
3311 | 3382 | |
3312 | 3383 | /*! |
3313 | - * jQuery UI Effects Fold 1.12.1 | |
3384 | + * jQuery UI Effects Fold 1.13.2 | |
3314 | 3385 | * http://jqueryui.com |
3315 | 3386 | * |
3316 | 3387 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3325,7 +3396,6 @@ var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, d |
3325 | 3396 | //>>demos: http://jqueryui.com/effect/ |
3326 | 3397 | |
3327 | 3398 | |
3328 | - | |
3329 | 3399 | var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) { |
3330 | 3400 | |
3331 | 3401 | // Create element |
... | ... | @@ -3385,7 +3455,7 @@ var effectsEffectFold = $.effects.define( "fold", "hide", function( options, don |
3385 | 3455 | |
3386 | 3456 | |
3387 | 3457 | /*! |
3388 | - * jQuery UI Effects Highlight 1.12.1 | |
3458 | + * jQuery UI Effects Highlight 1.13.2 | |
3389 | 3459 | * http://jqueryui.com |
3390 | 3460 | * |
3391 | 3461 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3400,7 +3470,6 @@ var effectsEffectFold = $.effects.define( "fold", "hide", function( options, don |
3400 | 3470 | //>>demos: http://jqueryui.com/effect/ |
3401 | 3471 | |
3402 | 3472 | |
3403 | - | |
3404 | 3473 | var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) { |
3405 | 3474 | var element = $( this ), |
3406 | 3475 | animation = { |
... | ... | @@ -3428,7 +3497,7 @@ var effectsEffectHighlight = $.effects.define( "highlight", "show", function( op |
3428 | 3497 | |
3429 | 3498 | |
3430 | 3499 | /*! |
3431 | - * jQuery UI Effects Size 1.12.1 | |
3500 | + * jQuery UI Effects Size 1.13.2 | |
3432 | 3501 | * http://jqueryui.com |
3433 | 3502 | * |
3434 | 3503 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3443,7 +3512,6 @@ var effectsEffectHighlight = $.effects.define( "highlight", "show", function( op |
3443 | 3512 | //>>demos: http://jqueryui.com/effect/ |
3444 | 3513 | |
3445 | 3514 | |
3446 | - | |
3447 | 3515 | var effectsEffectSize = $.effects.define( "size", function( options, done ) { |
3448 | 3516 | |
3449 | 3517 | // Create element |
... | ... | @@ -3520,6 +3588,8 @@ var effectsEffectSize = $.effects.define( "size", function( options, done ) { |
3520 | 3588 | to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top; |
3521 | 3589 | to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left; |
3522 | 3590 | } |
3591 | + delete from.outerHeight; | |
3592 | + delete from.outerWidth; | |
3523 | 3593 | element.css( from ); |
3524 | 3594 | |
3525 | 3595 | // Animate the children if desired |
... | ... | @@ -3605,7 +3675,7 @@ var effectsEffectSize = $.effects.define( "size", function( options, done ) { |
3605 | 3675 | |
3606 | 3676 | |
3607 | 3677 | /*! |
3608 | - * jQuery UI Effects Scale 1.12.1 | |
3678 | + * jQuery UI Effects Scale 1.13.2 | |
3609 | 3679 | * http://jqueryui.com |
3610 | 3680 | * |
3611 | 3681 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3620,7 +3690,6 @@ var effectsEffectSize = $.effects.define( "size", function( options, done ) { |
3620 | 3690 | //>>demos: http://jqueryui.com/effect/ |
3621 | 3691 | |
3622 | 3692 | |
3623 | - | |
3624 | 3693 | var effectsEffectScale = $.effects.define( "scale", function( options, done ) { |
3625 | 3694 | |
3626 | 3695 | // Create element |
... | ... | @@ -3646,7 +3715,7 @@ var effectsEffectScale = $.effects.define( "scale", function( options, done ) { |
3646 | 3715 | |
3647 | 3716 | |
3648 | 3717 | /*! |
3649 | - * jQuery UI Effects Puff 1.12.1 | |
3718 | + * jQuery UI Effects Puff 1.13.2 | |
3650 | 3719 | * http://jqueryui.com |
3651 | 3720 | * |
3652 | 3721 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3661,7 +3730,6 @@ var effectsEffectScale = $.effects.define( "scale", function( options, done ) { |
3661 | 3730 | //>>demos: http://jqueryui.com/effect/ |
3662 | 3731 | |
3663 | 3732 | |
3664 | - | |
3665 | 3733 | var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) { |
3666 | 3734 | var newOptions = $.extend( true, {}, options, { |
3667 | 3735 | fade: true, |
... | ... | @@ -3673,7 +3741,7 @@ var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, don |
3673 | 3741 | |
3674 | 3742 | |
3675 | 3743 | /*! |
3676 | - * jQuery UI Effects Pulsate 1.12.1 | |
3744 | + * jQuery UI Effects Pulsate 1.13.2 | |
3677 | 3745 | * http://jqueryui.com |
3678 | 3746 | * |
3679 | 3747 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3688,7 +3756,6 @@ var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, don |
3688 | 3756 | //>>demos: http://jqueryui.com/effect/ |
3689 | 3757 | |
3690 | 3758 | |
3691 | - | |
3692 | 3759 | var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) { |
3693 | 3760 | var element = $( this ), |
3694 | 3761 | mode = options.mode, |
... | ... | @@ -3723,7 +3790,7 @@ var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( option |
3723 | 3790 | |
3724 | 3791 | |
3725 | 3792 | /*! |
3726 | - * jQuery UI Effects Shake 1.12.1 | |
3793 | + * jQuery UI Effects Shake 1.13.2 | |
3727 | 3794 | * http://jqueryui.com |
3728 | 3795 | * |
3729 | 3796 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3738,7 +3805,6 @@ var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( option |
3738 | 3805 | //>>demos: http://jqueryui.com/effect/ |
3739 | 3806 | |
3740 | 3807 | |
3741 | - | |
3742 | 3808 | var effectsEffectShake = $.effects.define( "shake", function( options, done ) { |
3743 | 3809 | |
3744 | 3810 | var i = 1, |
... | ... | @@ -3783,7 +3849,7 @@ var effectsEffectShake = $.effects.define( "shake", function( options, done ) { |
3783 | 3849 | |
3784 | 3850 | |
3785 | 3851 | /*! |
3786 | - * jQuery UI Effects Slide 1.12.1 | |
3852 | + * jQuery UI Effects Slide 1.13.2 | |
3787 | 3853 | * http://jqueryui.com |
3788 | 3854 | * |
3789 | 3855 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3798,7 +3864,6 @@ var effectsEffectShake = $.effects.define( "shake", function( options, done ) { |
3798 | 3864 | //>>demos: http://jqueryui.com/effect/ |
3799 | 3865 | |
3800 | 3866 | |
3801 | - | |
3802 | 3867 | var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) { |
3803 | 3868 | var startClip, startRef, |
3804 | 3869 | element = $( this ), |
... | ... | @@ -3845,7 +3910,7 @@ var effectsEffectSlide = $.effects.define( "slide", "show", function( options, d |
3845 | 3910 | |
3846 | 3911 | |
3847 | 3912 | /*! |
3848 | - * jQuery UI Effects Transfer 1.12.1 | |
3913 | + * jQuery UI Effects Transfer 1.13.2 | |
3849 | 3914 | * http://jqueryui.com |
3850 | 3915 | * |
3851 | 3916 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3860,7 +3925,6 @@ var effectsEffectSlide = $.effects.define( "slide", "show", function( options, d |
3860 | 3925 | //>>demos: http://jqueryui.com/effect/ |
3861 | 3926 | |
3862 | 3927 | |
3863 | - | |
3864 | 3928 | var effect; |
3865 | 3929 | if ( $.uiBackCompat !== false ) { |
3866 | 3930 | effect = $.effects.define( "transfer", function( options, done ) { |
... | ... | @@ -3871,7 +3935,7 @@ var effectsEffectTransfer = effect; |
3871 | 3935 | |
3872 | 3936 | |
3873 | 3937 | /*! |
3874 | - * jQuery UI Focusable 1.12.1 | |
3938 | + * jQuery UI Focusable 1.13.2 | |
3875 | 3939 | * http://jqueryui.com |
3876 | 3940 | * |
3877 | 3941 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3885,7 +3949,6 @@ var effectsEffectTransfer = effect; |
3885 | 3949 | //>>docs: http://api.jqueryui.com/focusable-selector/ |
3886 | 3950 | |
3887 | 3951 | |
3888 | - | |
3889 | 3952 | // Selectors |
3890 | 3953 | $.ui.focusable = function( element, hasTabindex ) { |
3891 | 3954 | var map, mapName, img, focusableIfVisible, fieldset, |
... | ... | @@ -3932,10 +3995,10 @@ function visible( element ) { |
3932 | 3995 | element = element.parent(); |
3933 | 3996 | visibility = element.css( "visibility" ); |
3934 | 3997 | } |
3935 | - return visibility !== "hidden"; | |
3998 | + return visibility === "visible"; | |
3936 | 3999 | } |
3937 | 4000 | |
3938 | -$.extend( $.expr[ ":" ], { | |
4001 | +$.extend( $.expr.pseudos, { | |
3939 | 4002 | focusable: function( element ) { |
3940 | 4003 | return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); |
3941 | 4004 | } |
... | ... | @@ -3945,17 +4008,16 @@ var focusable = $.ui.focusable; |
3945 | 4008 | |
3946 | 4009 | |
3947 | 4010 | |
3948 | - | |
3949 | 4011 | // Support: IE8 Only |
3950 | 4012 | // IE8 does not support the form attribute and when it is supplied. It overwrites the form prop |
3951 | 4013 | // with a string, so we need to find the proper form. |
3952 | -var form = $.fn.form = function() { | |
4014 | +var form = $.fn._form = function() { | |
3953 | 4015 | return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); |
3954 | 4016 | }; |
3955 | 4017 | |
3956 | 4018 | |
3957 | 4019 | /*! |
3958 | - * jQuery UI Form Reset Mixin 1.12.1 | |
4020 | + * jQuery UI Form Reset Mixin 1.13.2 | |
3959 | 4021 | * http://jqueryui.com |
3960 | 4022 | * |
3961 | 4023 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -3969,7 +4031,6 @@ var form = $.fn.form = function() { |
3969 | 4031 | //>>docs: http://api.jqueryui.com/form-reset-mixin/ |
3970 | 4032 | |
3971 | 4033 | |
3972 | - | |
3973 | 4034 | var formResetMixin = $.ui.formResetMixin = { |
3974 | 4035 | _formResetHandler: function() { |
3975 | 4036 | var form = $( this ); |
... | ... | @@ -3984,7 +4045,7 @@ var formResetMixin = $.ui.formResetMixin = { |
3984 | 4045 | }, |
3985 | 4046 | |
3986 | 4047 | _bindFormResetHandler: function() { |
3987 | - this.form = this.element.form(); | |
4048 | + this.form = this.element._form(); | |
3988 | 4049 | if ( !this.form.length ) { |
3989 | 4050 | return; |
3990 | 4051 | } |
... | ... | @@ -4018,7 +4079,7 @@ var formResetMixin = $.ui.formResetMixin = { |
4018 | 4079 | |
4019 | 4080 | |
4020 | 4081 | /*! |
4021 | - * jQuery UI Support for jQuery core 1.7.x 1.12.1 | |
4082 | + * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2 | |
4022 | 4083 | * http://jqueryui.com |
4023 | 4084 | * |
4024 | 4085 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4027,77 +4088,73 @@ var formResetMixin = $.ui.formResetMixin = { |
4027 | 4088 | * |
4028 | 4089 | */ |
4029 | 4090 | |
4030 | -//>>label: jQuery 1.7 Support | |
4091 | +//>>label: jQuery 1.8+ Support | |
4031 | 4092 | //>>group: Core |
4032 | -//>>description: Support version 1.7.x of jQuery core | |
4033 | - | |
4034 | - | |
4035 | - | |
4036 | -// Support: jQuery 1.7 only | |
4037 | -// Not a great way to check versions, but since we only support 1.7+ and only | |
4038 | -// need to detect <1.8, this is a simple check that should suffice. Checking | |
4039 | -// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 | |
4040 | -// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting | |
4041 | -// 1.7 anymore). See #11197 for why we're not using feature detection. | |
4042 | -if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { | |
4043 | - | |
4044 | - // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() | |
4045 | - // Unlike jQuery Core 1.8+, these only support numeric values to set the | |
4046 | - // dimensions in pixels | |
4047 | - $.each( [ "Width", "Height" ], function( i, name ) { | |
4048 | - var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], | |
4049 | - type = name.toLowerCase(), | |
4050 | - orig = { | |
4051 | - innerWidth: $.fn.innerWidth, | |
4052 | - innerHeight: $.fn.innerHeight, | |
4053 | - outerWidth: $.fn.outerWidth, | |
4054 | - outerHeight: $.fn.outerHeight | |
4055 | - }; | |
4093 | +//>>description: Support version 1.8.x and newer of jQuery core | |
4056 | 4094 | |
4057 | - function reduce( elem, size, border, margin ) { | |
4058 | - $.each( side, function() { | |
4059 | - size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; | |
4060 | - if ( border ) { | |
4061 | - size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; | |
4062 | - } | |
4063 | - if ( margin ) { | |
4064 | - size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; | |
4065 | - } | |
4066 | - } ); | |
4067 | - return size; | |
4068 | - } | |
4069 | 4095 | |
4070 | - $.fn[ "inner" + name ] = function( size ) { | |
4071 | - if ( size === undefined ) { | |
4072 | - return orig[ "inner" + name ].call( this ); | |
4073 | - } | |
4096 | +// Support: jQuery 1.9.x or older | |
4097 | +// $.expr[ ":" ] is deprecated. | |
4098 | +if ( !$.expr.pseudos ) { | |
4099 | + $.expr.pseudos = $.expr[ ":" ]; | |
4100 | +} | |
4074 | 4101 | |
4075 | - return this.each( function() { | |
4076 | - $( this ).css( type, reduce( this, size ) + "px" ); | |
4077 | - } ); | |
4078 | - }; | |
4102 | +// Support: jQuery 1.11.x or older | |
4103 | +// $.unique has been renamed to $.uniqueSort | |
4104 | +if ( !$.uniqueSort ) { | |
4105 | + $.uniqueSort = $.unique; | |
4106 | +} | |
4107 | + | |
4108 | +// Support: jQuery 2.2.x or older. | |
4109 | +// This method has been defined in jQuery 3.0.0. | |
4110 | +// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js | |
4111 | +if ( !$.escapeSelector ) { | |
4112 | + | |
4113 | + // CSS string/identifier serialization | |
4114 | + // https://drafts.csswg.org/cssom/#common-serializing-idioms | |
4115 | + var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; | |
4079 | 4116 | |
4080 | - $.fn[ "outer" + name ] = function( size, margin ) { | |
4081 | - if ( typeof size !== "number" ) { | |
4082 | - return orig[ "outer" + name ].call( this, size ); | |
4117 | + var fcssescape = function( ch, asCodePoint ) { | |
4118 | + if ( asCodePoint ) { | |
4119 | + | |
4120 | + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER | |
4121 | + if ( ch === "\0" ) { | |
4122 | + return "\uFFFD"; | |
4083 | 4123 | } |
4084 | 4124 | |
4085 | - return this.each( function() { | |
4086 | - $( this ).css( type, reduce( this, size, true, margin ) + "px" ); | |
4087 | - } ); | |
4088 | - }; | |
4089 | - } ); | |
4125 | + // Control characters and (dependent upon position) numbers get escaped as code points | |
4126 | + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; | |
4127 | + } | |
4090 | 4128 | |
4091 | - $.fn.addBack = function( selector ) { | |
4092 | - return this.add( selector == null ? | |
4093 | - this.prevObject : this.prevObject.filter( selector ) | |
4094 | - ); | |
4129 | + // Other potentially-special ASCII characters get backslash-escaped | |
4130 | + return "\\" + ch; | |
4131 | + }; | |
4132 | + | |
4133 | + $.escapeSelector = function( sel ) { | |
4134 | + return ( sel + "" ).replace( rcssescape, fcssescape ); | |
4095 | 4135 | }; |
4096 | 4136 | } |
4097 | 4137 | |
4138 | +// Support: jQuery 3.4.x or older | |
4139 | +// These methods have been defined in jQuery 3.5.0. | |
4140 | +if ( !$.fn.even || !$.fn.odd ) { | |
4141 | + $.fn.extend( { | |
4142 | + even: function() { | |
4143 | + return this.filter( function( i ) { | |
4144 | + return i % 2 === 0; | |
4145 | + } ); | |
4146 | + }, | |
4147 | + odd: function() { | |
4148 | + return this.filter( function( i ) { | |
4149 | + return i % 2 === 1; | |
4150 | + } ); | |
4151 | + } | |
4152 | + } ); | |
4153 | +} | |
4154 | + | |
4098 | 4155 | ; |
4099 | 4156 | /*! |
4100 | - * jQuery UI Keycode 1.12.1 | |
4157 | + * jQuery UI Keycode 1.13.2 | |
4101 | 4158 | * http://jqueryui.com |
4102 | 4159 | * |
4103 | 4160 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4131,19 +4188,8 @@ var keycode = $.ui.keyCode = { |
4131 | 4188 | }; |
4132 | 4189 | |
4133 | 4190 | |
4134 | - | |
4135 | - | |
4136 | -// Internal use only | |
4137 | -var escapeSelector = $.ui.escapeSelector = ( function() { | |
4138 | - var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; | |
4139 | - return function( selector ) { | |
4140 | - return selector.replace( selectorEscape, "\\$1" ); | |
4141 | - }; | |
4142 | -} )(); | |
4143 | - | |
4144 | - | |
4145 | 4191 | /*! |
4146 | - * jQuery UI Labels 1.12.1 | |
4192 | + * jQuery UI Labels 1.13.2 | |
4147 | 4193 | * http://jqueryui.com |
4148 | 4194 | * |
4149 | 4195 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4157,10 +4203,13 @@ var escapeSelector = $.ui.escapeSelector = ( function() { |
4157 | 4203 | //>>docs: http://api.jqueryui.com/labels/ |
4158 | 4204 | |
4159 | 4205 | |
4160 | - | |
4161 | 4206 | var labels = $.fn.labels = function() { |
4162 | 4207 | var ancestor, selector, id, labels, ancestors; |
4163 | 4208 | |
4209 | + if ( !this.length ) { | |
4210 | + return this.pushStack( [] ); | |
4211 | + } | |
4212 | + | |
4164 | 4213 | // Check control.labels first |
4165 | 4214 | if ( this[ 0 ].labels && this[ 0 ].labels.length ) { |
4166 | 4215 | return this.pushStack( this[ 0 ].labels ); |
... | ... | @@ -4183,7 +4232,7 @@ var labels = $.fn.labels = function() { |
4183 | 4232 | ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); |
4184 | 4233 | |
4185 | 4234 | // Create a selector for the label based on the id |
4186 | - selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; | |
4235 | + selector = "label[for='" + $.escapeSelector( id ) + "']"; | |
4187 | 4236 | |
4188 | 4237 | labels = labels.add( ancestors.find( selector ).addBack( selector ) ); |
4189 | 4238 | |
... | ... | @@ -4195,7 +4244,7 @@ var labels = $.fn.labels = function() { |
4195 | 4244 | |
4196 | 4245 | |
4197 | 4246 | /*! |
4198 | - * jQuery UI Scroll Parent 1.12.1 | |
4247 | + * jQuery UI Scroll Parent 1.13.2 | |
4199 | 4248 | * http://jqueryui.com |
4200 | 4249 | * |
4201 | 4250 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4209,7 +4258,6 @@ var labels = $.fn.labels = function() { |
4209 | 4258 | //>>docs: http://api.jqueryui.com/scrollParent/ |
4210 | 4259 | |
4211 | 4260 | |
4212 | - | |
4213 | 4261 | var scrollParent = $.fn.scrollParent = function( includeHidden ) { |
4214 | 4262 | var position = this.css( "position" ), |
4215 | 4263 | excludeStaticParent = position === "absolute", |
... | ... | @@ -4230,7 +4278,7 @@ var scrollParent = $.fn.scrollParent = function( includeHidden ) { |
4230 | 4278 | |
4231 | 4279 | |
4232 | 4280 | /*! |
4233 | - * jQuery UI Tabbable 1.12.1 | |
4281 | + * jQuery UI Tabbable 1.13.2 | |
4234 | 4282 | * http://jqueryui.com |
4235 | 4283 | * |
4236 | 4284 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4244,8 +4292,7 @@ var scrollParent = $.fn.scrollParent = function( includeHidden ) { |
4244 | 4292 | //>>docs: http://api.jqueryui.com/tabbable-selector/ |
4245 | 4293 | |
4246 | 4294 | |
4247 | - | |
4248 | -var tabbable = $.extend( $.expr[ ":" ], { | |
4295 | +var tabbable = $.extend( $.expr.pseudos, { | |
4249 | 4296 | tabbable: function( element ) { |
4250 | 4297 | var tabIndex = $.attr( element, "tabindex" ), |
4251 | 4298 | hasTabindex = tabIndex != null; |
... | ... | @@ -4255,7 +4302,7 @@ var tabbable = $.extend( $.expr[ ":" ], { |
4255 | 4302 | |
4256 | 4303 | |
4257 | 4304 | /*! |
4258 | - * jQuery UI Unique ID 1.12.1 | |
4305 | + * jQuery UI Unique ID 1.13.2 | |
4259 | 4306 | * http://jqueryui.com |
4260 | 4307 | * |
4261 | 4308 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4269,7 +4316,6 @@ var tabbable = $.extend( $.expr[ ":" ], { |
4269 | 4316 | //>>docs: http://api.jqueryui.com/uniqueId/ |
4270 | 4317 | |
4271 | 4318 | |
4272 | - | |
4273 | 4319 | var uniqueId = $.fn.extend( { |
4274 | 4320 | uniqueId: ( function() { |
4275 | 4321 | var uuid = 0; |
... | ... | @@ -4294,7 +4340,7 @@ var uniqueId = $.fn.extend( { |
4294 | 4340 | |
4295 | 4341 | |
4296 | 4342 | /*! |
4297 | - * jQuery UI Accordion 1.12.1 | |
4343 | + * jQuery UI Accordion 1.13.2 | |
4298 | 4344 | * http://jqueryui.com |
4299 | 4345 | * |
4300 | 4346 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4304,9 +4350,9 @@ var uniqueId = $.fn.extend( { |
4304 | 4350 | |
4305 | 4351 | //>>label: Accordion |
4306 | 4352 | //>>group: Widgets |
4307 | -// jscs:disable maximumLineLength | |
4353 | +/* eslint-disable max-len */ | |
4308 | 4354 | //>>description: Displays collapsible content panels for presenting information in a limited amount of space. |
4309 | -// jscs:enable maximumLineLength | |
4355 | +/* eslint-enable max-len */ | |
4310 | 4356 | //>>docs: http://api.jqueryui.com/accordion/ |
4311 | 4357 | //>>demos: http://jqueryui.com/accordion/ |
4312 | 4358 | //>>css.structure: ../../themes/base/core.css |
... | ... | @@ -4314,9 +4360,8 @@ var uniqueId = $.fn.extend( { |
4314 | 4360 | //>>css.theme: ../../themes/base/theme.css |
4315 | 4361 | |
4316 | 4362 | |
4317 | - | |
4318 | 4363 | var widgetsAccordion = $.widget( "ui.accordion", { |
4319 | - version: "1.12.1", | |
4364 | + version: "1.13.2", | |
4320 | 4365 | options: { |
4321 | 4366 | active: 0, |
4322 | 4367 | animate: {}, |
... | ... | @@ -4327,7 +4372,9 @@ var widgetsAccordion = $.widget( "ui.accordion", { |
4327 | 4372 | }, |
4328 | 4373 | collapsible: false, |
4329 | 4374 | event: "click", |
4330 | - header: "> li > :first-child, > :not(li):even", | |
4375 | + header: function( elem ) { | |
4376 | + return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() ); | |
4377 | + }, | |
4331 | 4378 | heightStyle: "auto", |
4332 | 4379 | icons: { |
4333 | 4380 | activeHeader: "ui-icon-triangle-1-s", |
... | ... | @@ -4558,7 +4605,11 @@ var widgetsAccordion = $.widget( "ui.accordion", { |
4558 | 4605 | var prevHeaders = this.headers, |
4559 | 4606 | prevPanels = this.panels; |
4560 | 4607 | |
4561 | - this.headers = this.element.find( this.options.header ); | |
4608 | + if ( typeof this.options.header === "function" ) { | |
4609 | + this.headers = this.options.header( this.element ); | |
4610 | + } else { | |
4611 | + this.headers = this.element.find( this.options.header ); | |
4612 | + } | |
4562 | 4613 | this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed", |
4563 | 4614 | "ui-state-default" ); |
4564 | 4615 | |
... | ... | @@ -4921,7 +4972,7 @@ var safeActiveElement = $.ui.safeActiveElement = function( document ) { |
4921 | 4972 | |
4922 | 4973 | |
4923 | 4974 | /*! |
4924 | - * jQuery UI Menu 1.12.1 | |
4975 | + * jQuery UI Menu 1.13.2 | |
4925 | 4976 | * http://jqueryui.com |
4926 | 4977 | * |
4927 | 4978 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -4939,9 +4990,8 @@ var safeActiveElement = $.ui.safeActiveElement = function( document ) { |
4939 | 4990 | //>>css.theme: ../../themes/base/theme.css |
4940 | 4991 | |
4941 | 4992 | |
4942 | - | |
4943 | 4993 | var widgetsMenu = $.widget( "ui.menu", { |
4944 | - version: "1.12.1", | |
4994 | + version: "1.13.2", | |
4945 | 4995 | defaultElement: "<ul>", |
4946 | 4996 | delay: 300, |
4947 | 4997 | options: { |
... | ... | @@ -4968,6 +5018,7 @@ var widgetsMenu = $.widget( "ui.menu", { |
4968 | 5018 | // Flag used to prevent firing of the click handler |
4969 | 5019 | // as the event bubbles up through nested menus |
4970 | 5020 | this.mouseHandled = false; |
5021 | + this.lastMousePosition = { x: null, y: null }; | |
4971 | 5022 | this.element |
4972 | 5023 | .uniqueId() |
4973 | 5024 | .attr( { |
... | ... | @@ -4982,6 +5033,8 @@ var widgetsMenu = $.widget( "ui.menu", { |
4982 | 5033 | // them (focus should always stay on UL during navigation). |
4983 | 5034 | "mousedown .ui-menu-item": function( event ) { |
4984 | 5035 | event.preventDefault(); |
5036 | + | |
5037 | + this._activateItem( event ); | |
4985 | 5038 | }, |
4986 | 5039 | "click .ui-menu-item": function( event ) { |
4987 | 5040 | var target = $( event.target ); |
... | ... | @@ -5011,36 +5064,15 @@ var widgetsMenu = $.widget( "ui.menu", { |
5011 | 5064 | } |
5012 | 5065 | } |
5013 | 5066 | }, |
5014 | - "mouseenter .ui-menu-item": function( event ) { | |
5015 | - | |
5016 | - // Ignore mouse events while typeahead is active, see #10458. | |
5017 | - // Prevents focusing the wrong item when typeahead causes a scroll while the mouse | |
5018 | - // is over an item in the menu | |
5019 | - if ( this.previousFilter ) { | |
5020 | - return; | |
5021 | - } | |
5022 | - | |
5023 | - var actualTarget = $( event.target ).closest( ".ui-menu-item" ), | |
5024 | - target = $( event.currentTarget ); | |
5025 | - | |
5026 | - // Ignore bubbled events on parent items, see #11641 | |
5027 | - if ( actualTarget[ 0 ] !== target[ 0 ] ) { | |
5028 | - return; | |
5029 | - } | |
5030 | - | |
5031 | - // Remove ui-state-active class from siblings of the newly focused menu item | |
5032 | - // to avoid a jump caused by adjacent elements both having a class with a border | |
5033 | - this._removeClass( target.siblings().children( ".ui-state-active" ), | |
5034 | - null, "ui-state-active" ); | |
5035 | - this.focus( event, target ); | |
5036 | - }, | |
5067 | + "mouseenter .ui-menu-item": "_activateItem", | |
5068 | + "mousemove .ui-menu-item": "_activateItem", | |
5037 | 5069 | mouseleave: "collapseAll", |
5038 | 5070 | "mouseleave .ui-menu": "collapseAll", |
5039 | 5071 | focus: function( event, keepActiveItem ) { |
5040 | 5072 | |
5041 | 5073 | // If there's already an active item, keep it active |
5042 | 5074 | // If not, activate the first item |
5043 | - var item = this.active || this.element.find( this.options.items ).eq( 0 ); | |
5075 | + var item = this.active || this._menuItems().first(); | |
5044 | 5076 | |
5045 | 5077 | if ( !keepActiveItem ) { |
5046 | 5078 | this.focus( event, item ); |
... | ... | @@ -5066,7 +5098,7 @@ var widgetsMenu = $.widget( "ui.menu", { |
5066 | 5098 | this._on( this.document, { |
5067 | 5099 | click: function( event ) { |
5068 | 5100 | if ( this._closeOnDocumentClick( event ) ) { |
5069 | - this.collapseAll( event ); | |
5101 | + this.collapseAll( event, true ); | |
5070 | 5102 | } |
5071 | 5103 | |
5072 | 5104 | // Reset the mouseHandled flag |
... | ... | @@ -5075,6 +5107,46 @@ var widgetsMenu = $.widget( "ui.menu", { |
5075 | 5107 | } ); |
5076 | 5108 | }, |
5077 | 5109 | |
5110 | + _activateItem: function( event ) { | |
5111 | + | |
5112 | + // Ignore mouse events while typeahead is active, see #10458. | |
5113 | + // Prevents focusing the wrong item when typeahead causes a scroll while the mouse | |
5114 | + // is over an item in the menu | |
5115 | + if ( this.previousFilter ) { | |
5116 | + return; | |
5117 | + } | |
5118 | + | |
5119 | + // If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356) | |
5120 | + if ( event.clientX === this.lastMousePosition.x && | |
5121 | + event.clientY === this.lastMousePosition.y ) { | |
5122 | + return; | |
5123 | + } | |
5124 | + | |
5125 | + this.lastMousePosition = { | |
5126 | + x: event.clientX, | |
5127 | + y: event.clientY | |
5128 | + }; | |
5129 | + | |
5130 | + var actualTarget = $( event.target ).closest( ".ui-menu-item" ), | |
5131 | + target = $( event.currentTarget ); | |
5132 | + | |
5133 | + // Ignore bubbled events on parent items, see #11641 | |
5134 | + if ( actualTarget[ 0 ] !== target[ 0 ] ) { | |
5135 | + return; | |
5136 | + } | |
5137 | + | |
5138 | + // If the item is already active, there's nothing to do | |
5139 | + if ( target.is( ".ui-state-active" ) ) { | |
5140 | + return; | |
5141 | + } | |
5142 | + | |
5143 | + // Remove ui-state-active class from siblings of the newly focused menu item | |
5144 | + // to avoid a jump caused by adjacent elements both having a class with a border | |
5145 | + this._removeClass( target.siblings().children( ".ui-state-active" ), | |
5146 | + null, "ui-state-active" ); | |
5147 | + this.focus( event, target ); | |
5148 | + }, | |
5149 | + | |
5078 | 5150 | _destroy: function() { |
5079 | 5151 | var items = this.element.find( ".ui-menu-item" ) |
5080 | 5152 | .removeAttr( "role aria-disabled" ), |
... | ... | @@ -5406,7 +5478,7 @@ var widgetsMenu = $.widget( "ui.menu", { |
5406 | 5478 | this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" ); |
5407 | 5479 | |
5408 | 5480 | this.activeMenu = currentMenu; |
5409 | - }, this.delay ); | |
5481 | + }, all ? 0 : this.delay ); | |
5410 | 5482 | }, |
5411 | 5483 | |
5412 | 5484 | // With no arguments, closes the currently active menu - if nothing is active |
... | ... | @@ -5442,11 +5514,7 @@ var widgetsMenu = $.widget( "ui.menu", { |
5442 | 5514 | }, |
5443 | 5515 | |
5444 | 5516 | expand: function( event ) { |
5445 | - var newItem = this.active && | |
5446 | - this.active | |
5447 | - .children( ".ui-menu " ) | |
5448 | - .find( this.options.items ) | |
5449 | - .first(); | |
5517 | + var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first(); | |
5450 | 5518 | |
5451 | 5519 | if ( newItem && newItem.length ) { |
5452 | 5520 | this._open( newItem.parent() ); |
... | ... | @@ -5474,21 +5542,27 @@ var widgetsMenu = $.widget( "ui.menu", { |
5474 | 5542 | return this.active && !this.active.nextAll( ".ui-menu-item" ).length; |
5475 | 5543 | }, |
5476 | 5544 | |
5545 | + _menuItems: function( menu ) { | |
5546 | + return ( menu || this.element ) | |
5547 | + .find( this.options.items ) | |
5548 | + .filter( ".ui-menu-item" ); | |
5549 | + }, | |
5550 | + | |
5477 | 5551 | _move: function( direction, filter, event ) { |
5478 | 5552 | var next; |
5479 | 5553 | if ( this.active ) { |
5480 | 5554 | if ( direction === "first" || direction === "last" ) { |
5481 | 5555 | next = this.active |
5482 | 5556 | [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) |
5483 | - .eq( -1 ); | |
5557 | + .last(); | |
5484 | 5558 | } else { |
5485 | 5559 | next = this.active |
5486 | 5560 | [ direction + "All" ]( ".ui-menu-item" ) |
5487 | - .eq( 0 ); | |
5561 | + .first(); | |
5488 | 5562 | } |
5489 | 5563 | } |
5490 | 5564 | if ( !next || !next.length || !this.active ) { |
5491 | - next = this.activeMenu.find( this.options.items )[ filter ](); | |
5565 | + next = this._menuItems( this.activeMenu )[ filter ](); | |
5492 | 5566 | } |
5493 | 5567 | |
5494 | 5568 | this.focus( event, next ); |
... | ... | @@ -5506,7 +5580,13 @@ var widgetsMenu = $.widget( "ui.menu", { |
5506 | 5580 | } |
5507 | 5581 | if ( this._hasScroll() ) { |
5508 | 5582 | base = this.active.offset().top; |
5509 | - height = this.element.height(); | |
5583 | + height = this.element.innerHeight(); | |
5584 | + | |
5585 | + // jQuery 3.2 doesn't include scrollbars in innerHeight, add it back. | |
5586 | + if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) { | |
5587 | + height += this.element[ 0 ].offsetHeight - this.element.outerHeight(); | |
5588 | + } | |
5589 | + | |
5510 | 5590 | this.active.nextAll( ".ui-menu-item" ).each( function() { |
5511 | 5591 | item = $( this ); |
5512 | 5592 | return item.offset().top - base - height < 0; |
... | ... | @@ -5514,7 +5594,7 @@ var widgetsMenu = $.widget( "ui.menu", { |
5514 | 5594 | |
5515 | 5595 | this.focus( event, item ); |
5516 | 5596 | } else { |
5517 | - this.focus( event, this.activeMenu.find( this.options.items ) | |
5597 | + this.focus( event, this._menuItems( this.activeMenu ) | |
5518 | 5598 | [ !this.active ? "first" : "last" ]() ); |
5519 | 5599 | } |
5520 | 5600 | }, |
... | ... | @@ -5530,7 +5610,13 @@ var widgetsMenu = $.widget( "ui.menu", { |
5530 | 5610 | } |
5531 | 5611 | if ( this._hasScroll() ) { |
5532 | 5612 | base = this.active.offset().top; |
5533 | - height = this.element.height(); | |
5613 | + height = this.element.innerHeight(); | |
5614 | + | |
5615 | + // jQuery 3.2 doesn't include scrollbars in innerHeight, add it back. | |
5616 | + if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) { | |
5617 | + height += this.element[ 0 ].offsetHeight - this.element.outerHeight(); | |
5618 | + } | |
5619 | + | |
5534 | 5620 | this.active.prevAll( ".ui-menu-item" ).each( function() { |
5535 | 5621 | item = $( this ); |
5536 | 5622 | return item.offset().top - base + height > 0; |
... | ... | @@ -5538,7 +5624,7 @@ var widgetsMenu = $.widget( "ui.menu", { |
5538 | 5624 | |
5539 | 5625 | this.focus( event, item ); |
5540 | 5626 | } else { |
5541 | - this.focus( event, this.activeMenu.find( this.options.items ).first() ); | |
5627 | + this.focus( event, this._menuItems( this.activeMenu ).first() ); | |
5542 | 5628 | } |
5543 | 5629 | }, |
5544 | 5630 | |
... | ... | @@ -5569,14 +5655,15 @@ var widgetsMenu = $.widget( "ui.menu", { |
5569 | 5655 | .filter( ".ui-menu-item" ) |
5570 | 5656 | .filter( function() { |
5571 | 5657 | return regex.test( |
5572 | - $.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) ); | |
5658 | + String.prototype.trim.call( | |
5659 | + $( this ).children( ".ui-menu-item-wrapper" ).text() ) ); | |
5573 | 5660 | } ); |
5574 | 5661 | } |
5575 | 5662 | } ); |
5576 | 5663 | |
5577 | 5664 | |
5578 | 5665 | /*! |
5579 | - * jQuery UI Autocomplete 1.12.1 | |
5666 | + * jQuery UI Autocomplete 1.13.2 | |
5580 | 5667 | * http://jqueryui.com |
5581 | 5668 | * |
5582 | 5669 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -5594,9 +5681,8 @@ var widgetsMenu = $.widget( "ui.menu", { |
5594 | 5681 | //>>css.theme: ../../themes/base/theme.css |
5595 | 5682 | |
5596 | 5683 | |
5597 | - | |
5598 | 5684 | $.widget( "ui.autocomplete", { |
5599 | - version: "1.12.1", | |
5685 | + version: "1.13.2", | |
5600 | 5686 | defaultElement: "<input>", |
5601 | 5687 | options: { |
5602 | 5688 | appendTo: null, |
... | ... | @@ -5622,6 +5708,7 @@ $.widget( "ui.autocomplete", { |
5622 | 5708 | |
5623 | 5709 | requestIndex: 0, |
5624 | 5710 | pending: 0, |
5711 | + liveRegionTimer: null, | |
5625 | 5712 | |
5626 | 5713 | _create: function() { |
5627 | 5714 | |
... | ... | @@ -5759,11 +5846,6 @@ $.widget( "ui.autocomplete", { |
5759 | 5846 | this.previous = this._value(); |
5760 | 5847 | }, |
5761 | 5848 | blur: function( event ) { |
5762 | - if ( this.cancelBlur ) { | |
5763 | - delete this.cancelBlur; | |
5764 | - return; | |
5765 | - } | |
5766 | - | |
5767 | 5849 | clearTimeout( this.searching ); |
5768 | 5850 | this.close( event ); |
5769 | 5851 | this._change( event ); |
... | ... | @@ -5779,31 +5861,24 @@ $.widget( "ui.autocomplete", { |
5779 | 5861 | role: null |
5780 | 5862 | } ) |
5781 | 5863 | .hide() |
5864 | + | |
5865 | + // Support: IE 11 only, Edge <= 14 | |
5866 | + // For other browsers, we preventDefault() on the mousedown event | |
5867 | + // to keep the dropdown from taking focus from the input. This doesn't | |
5868 | + // work for IE/Edge, causing problems with selection and scrolling (#9638) | |
5869 | + // Happily, IE and Edge support an "unselectable" attribute that | |
5870 | + // prevents an element from receiving focus, exactly what we want here. | |
5871 | + .attr( { | |
5872 | + "unselectable": "on" | |
5873 | + } ) | |
5782 | 5874 | .menu( "instance" ); |
5783 | 5875 | |
5784 | 5876 | this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); |
5785 | 5877 | this._on( this.menu.element, { |
5786 | 5878 | mousedown: function( event ) { |
5787 | 5879 | |
5788 | - // prevent moving focus out of the text field | |
5880 | + // Prevent moving focus out of the text field | |
5789 | 5881 | event.preventDefault(); |
5790 | - | |
5791 | - // IE doesn't prevent moving focus even with event.preventDefault() | |
5792 | - // so we set a flag to know when we should ignore the blur event | |
5793 | - this.cancelBlur = true; | |
5794 | - this._delay( function() { | |
5795 | - delete this.cancelBlur; | |
5796 | - | |
5797 | - // Support: IE 8 only | |
5798 | - // Right clicking a menu item or selecting text from the menu items will | |
5799 | - // result in focus moving out of the input. However, we've already received | |
5800 | - // and ignored the blur event because of the cancelBlur flag set above. So | |
5801 | - // we restore focus to ensure that the menu closes properly based on the user's | |
5802 | - // next actions. | |
5803 | - if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) { | |
5804 | - this.element.trigger( "focus" ); | |
5805 | - } | |
5806 | - } ); | |
5807 | 5882 | }, |
5808 | 5883 | menufocus: function( event, ui ) { |
5809 | 5884 | var label, item; |
... | ... | @@ -5834,9 +5909,11 @@ $.widget( "ui.autocomplete", { |
5834 | 5909 | |
5835 | 5910 | // Announce the value in the liveRegion |
5836 | 5911 | label = ui.item.attr( "aria-label" ) || item.value; |
5837 | - if ( label && $.trim( label ).length ) { | |
5838 | - this.liveRegion.children().hide(); | |
5839 | - $( "<div>" ).text( label ).appendTo( this.liveRegion ); | |
5912 | + if ( label && String.prototype.trim.call( label ).length ) { | |
5913 | + clearTimeout( this.liveRegionTimer ); | |
5914 | + this.liveRegionTimer = this._delay( function() { | |
5915 | + this.liveRegion.html( $( "<div>" ).text( label ) ); | |
5916 | + }, 100 ); | |
5840 | 5917 | } |
5841 | 5918 | }, |
5842 | 5919 | menuselect: function( event, ui ) { |
... | ... | @@ -5946,7 +6023,7 @@ $.widget( "ui.autocomplete", { |
5946 | 6023 | _initSource: function() { |
5947 | 6024 | var array, url, |
5948 | 6025 | that = this; |
5949 | - if ( $.isArray( this.options.source ) ) { | |
6026 | + if ( Array.isArray( this.options.source ) ) { | |
5950 | 6027 | array = this.options.source; |
5951 | 6028 | this.source = function( request, response ) { |
5952 | 6029 | response( $.ui.autocomplete.filter( array, request.term ) ); |
... | ... | @@ -6018,7 +6095,7 @@ $.widget( "ui.autocomplete", { |
6018 | 6095 | _response: function() { |
6019 | 6096 | var index = ++this.requestIndex; |
6020 | 6097 | |
6021 | - return $.proxy( function( content ) { | |
6098 | + return function( content ) { | |
6022 | 6099 | if ( index === this.requestIndex ) { |
6023 | 6100 | this.__response( content ); |
6024 | 6101 | } |
... | ... | @@ -6027,7 +6104,7 @@ $.widget( "ui.autocomplete", { |
6027 | 6104 | if ( !this.pending ) { |
6028 | 6105 | this._removeClass( "ui-autocomplete-loading" ); |
6029 | 6106 | } |
6030 | - }, this ); | |
6107 | + }.bind( this ); | |
6031 | 6108 | }, |
6032 | 6109 | |
6033 | 6110 | __response: function( content ) { |
... | ... | @@ -6187,7 +6264,7 @@ $.widget( "ui.autocomplete", { |
6187 | 6264 | var editable = element.prop( "contentEditable" ); |
6188 | 6265 | |
6189 | 6266 | if ( editable === "inherit" ) { |
6190 | - return this._isContentEditable( element.parent() ); | |
6267 | + return this._isContentEditable( element.parent() ); | |
6191 | 6268 | } |
6192 | 6269 | |
6193 | 6270 | return editable === "true"; |
... | ... | @@ -6231,8 +6308,10 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, { |
6231 | 6308 | } else { |
6232 | 6309 | message = this.options.messages.noResults; |
6233 | 6310 | } |
6234 | - this.liveRegion.children().hide(); | |
6235 | - $( "<div>" ).text( message ).appendTo( this.liveRegion ); | |
6311 | + clearTimeout( this.liveRegionTimer ); | |
6312 | + this.liveRegionTimer = this._delay( function() { | |
6313 | + this.liveRegion.html( $( "<div>" ).text( message ) ); | |
6314 | + }, 100 ); | |
6236 | 6315 | } |
6237 | 6316 | } ); |
6238 | 6317 | |
... | ... | @@ -6240,7 +6319,7 @@ var widgetsAutocomplete = $.ui.autocomplete; |
6240 | 6319 | |
6241 | 6320 | |
6242 | 6321 | /*! |
6243 | - * jQuery UI Controlgroup 1.12.1 | |
6322 | + * jQuery UI Controlgroup 1.13.2 | |
6244 | 6323 | * http://jqueryui.com |
6245 | 6324 | * |
6246 | 6325 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -6261,7 +6340,7 @@ var widgetsAutocomplete = $.ui.autocomplete; |
6261 | 6340 | var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g; |
6262 | 6341 | |
6263 | 6342 | var widgetsControlgroup = $.widget( "ui.controlgroup", { |
6264 | - version: "1.12.1", | |
6343 | + version: "1.13.2", | |
6265 | 6344 | defaultElement: "<div>", |
6266 | 6345 | options: { |
6267 | 6346 | direction: "horizontal", |
... | ... | @@ -6378,7 +6457,7 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", { |
6378 | 6457 | } ); |
6379 | 6458 | } ); |
6380 | 6459 | |
6381 | - this.childWidgets = $( $.unique( childWidgets ) ); | |
6460 | + this.childWidgets = $( $.uniqueSort( childWidgets ) ); | |
6382 | 6461 | this._addClass( this.childWidgets, "ui-controlgroup-item" ); |
6383 | 6462 | }, |
6384 | 6463 | |
... | ... | @@ -6462,7 +6541,7 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", { |
6462 | 6541 | var result = {}; |
6463 | 6542 | $.each( classes, function( key ) { |
6464 | 6543 | var current = instance.options.classes[ key ] || ""; |
6465 | - current = $.trim( current.replace( controlgroupCornerRegex, "" ) ); | |
6544 | + current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) ); | |
6466 | 6545 | result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " ); |
6467 | 6546 | } ); |
6468 | 6547 | return result; |
... | ... | @@ -6525,7 +6604,7 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", { |
6525 | 6604 | } ); |
6526 | 6605 | |
6527 | 6606 | /*! |
6528 | - * jQuery UI Checkboxradio 1.12.1 | |
6607 | + * jQuery UI Checkboxradio 1.13.2 | |
6529 | 6608 | * http://jqueryui.com |
6530 | 6609 | * |
6531 | 6610 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -6544,9 +6623,8 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", { |
6544 | 6623 | //>>css.theme: ../../themes/base/theme.css |
6545 | 6624 | |
6546 | 6625 | |
6547 | - | |
6548 | 6626 | $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { |
6549 | - version: "1.12.1", | |
6627 | + version: "1.13.2", | |
6550 | 6628 | options: { |
6551 | 6629 | disabled: null, |
6552 | 6630 | label: null, |
... | ... | @@ -6558,8 +6636,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { |
6558 | 6636 | }, |
6559 | 6637 | |
6560 | 6638 | _getCreateOptions: function() { |
6561 | - var disabled, labels; | |
6562 | - var that = this; | |
6639 | + var disabled, labels, labelContents; | |
6563 | 6640 | var options = this._super() || {}; |
6564 | 6641 | |
6565 | 6642 | // We read the type here, because it makes more sense to throw a element type error first, |
... | ... | @@ -6579,12 +6656,18 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { |
6579 | 6656 | |
6580 | 6657 | // We need to get the label text but this may also need to make sure it does not contain the |
6581 | 6658 | // input itself. |
6582 | - this.label.contents().not( this.element[ 0 ] ).each( function() { | |
6659 | + // The label contents could be text, html, or a mix. We wrap all elements | |
6660 | + // and read the wrapper's `innerHTML` to get a string representation of | |
6661 | + // the label, without the input as part of it. | |
6662 | + labelContents = this.label.contents().not( this.element[ 0 ] ); | |
6583 | 6663 | |
6584 | - // The label contents could be text, html, or a mix. We concat each element to get a | |
6585 | - // string representation of the label, without the input as part of it. | |
6586 | - that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML; | |
6587 | - } ); | |
6664 | + if ( labelContents.length ) { | |
6665 | + this.originalLabel += labelContents | |
6666 | + .clone() | |
6667 | + .wrapAll( "<div></div>" ) | |
6668 | + .parent() | |
6669 | + .html(); | |
6670 | + } | |
6588 | 6671 | |
6589 | 6672 | // Set the label option if we found label text |
6590 | 6673 | if ( this.originalLabel ) { |
... | ... | @@ -6625,9 +6708,6 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { |
6625 | 6708 | |
6626 | 6709 | if ( checked ) { |
6627 | 6710 | this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" ); |
6628 | - if ( this.icon ) { | |
6629 | - this._addClass( this.icon, null, "ui-state-hover" ); | |
6630 | - } | |
6631 | 6711 | } |
6632 | 6712 | |
6633 | 6713 | this._on( { |
... | ... | @@ -6662,7 +6742,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { |
6662 | 6742 | _getRadioGroup: function() { |
6663 | 6743 | var group; |
6664 | 6744 | var name = this.element[ 0 ].name; |
6665 | - var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']"; | |
6745 | + var nameSelector = "input[name='" + $.escapeSelector( name ) + "']"; | |
6666 | 6746 | |
6667 | 6747 | if ( !name ) { |
6668 | 6748 | return $( [] ); |
... | ... | @@ -6674,7 +6754,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, { |
6674 | 6754 | |
6675 | 6755 | // Not inside a form, check all inputs that also are not inside a form |
6676 | 6756 | group = $( nameSelector ).filter( function() { |
6677 | - return $( this ).form().length === 0; | |
6757 | + return $( this )._form().length === 0; | |
6678 | 6758 | } ); |
6679 | 6759 | } |
6680 | 6760 | |
... | ... | @@ -6795,7 +6875,7 @@ var widgetsCheckboxradio = $.ui.checkboxradio; |
6795 | 6875 | |
6796 | 6876 | |
6797 | 6877 | /*! |
6798 | - * jQuery UI Button 1.12.1 | |
6878 | + * jQuery UI Button 1.13.2 | |
6799 | 6879 | * http://jqueryui.com |
6800 | 6880 | * |
6801 | 6881 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -6813,9 +6893,8 @@ var widgetsCheckboxradio = $.ui.checkboxradio; |
6813 | 6893 | //>>css.theme: ../../themes/base/theme.css |
6814 | 6894 | |
6815 | 6895 | |
6816 | - | |
6817 | 6896 | $.widget( "ui.button", { |
6818 | - version: "1.12.1", | |
6897 | + version: "1.13.2", | |
6819 | 6898 | defaultElement: "<button>", |
6820 | 6899 | options: { |
6821 | 6900 | classes: { |
... | ... | @@ -7039,7 +7118,7 @@ $.widget( "ui.button", { |
7039 | 7118 | this._toggleClass( null, "ui-state-disabled", value ); |
7040 | 7119 | this.element[ 0 ].disabled = value; |
7041 | 7120 | if ( value ) { |
7042 | - this.element.blur(); | |
7121 | + this.element.trigger( "blur" ); | |
7043 | 7122 | } |
7044 | 7123 | } |
7045 | 7124 | }, |
... | ... | @@ -7118,22 +7197,82 @@ if ( $.uiBackCompat !== false ) { |
7118 | 7197 | } ); |
7119 | 7198 | |
7120 | 7199 | $.fn.button = ( function( orig ) { |
7121 | - return function() { | |
7122 | - if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) || | |
7123 | - ( this.length && this[ 0 ].tagName === "INPUT" && ( | |
7124 | - this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio" | |
7125 | - ) ) ) { | |
7126 | - return orig.apply( this, arguments ); | |
7127 | - } | |
7128 | - if ( !$.ui.checkboxradio ) { | |
7129 | - $.error( "Checkboxradio widget missing" ); | |
7130 | - } | |
7131 | - if ( arguments.length === 0 ) { | |
7132 | - return this.checkboxradio( { | |
7133 | - "icon": false | |
7200 | + return function( options ) { | |
7201 | + var isMethodCall = typeof options === "string"; | |
7202 | + var args = Array.prototype.slice.call( arguments, 1 ); | |
7203 | + var returnValue = this; | |
7204 | + | |
7205 | + if ( isMethodCall ) { | |
7206 | + | |
7207 | + // If this is an empty collection, we need to have the instance method | |
7208 | + // return undefined instead of the jQuery instance | |
7209 | + if ( !this.length && options === "instance" ) { | |
7210 | + returnValue = undefined; | |
7211 | + } else { | |
7212 | + this.each( function() { | |
7213 | + var methodValue; | |
7214 | + var type = $( this ).attr( "type" ); | |
7215 | + var name = type !== "checkbox" && type !== "radio" ? | |
7216 | + "button" : | |
7217 | + "checkboxradio"; | |
7218 | + var instance = $.data( this, "ui-" + name ); | |
7219 | + | |
7220 | + if ( options === "instance" ) { | |
7221 | + returnValue = instance; | |
7222 | + return false; | |
7223 | + } | |
7224 | + | |
7225 | + if ( !instance ) { | |
7226 | + return $.error( "cannot call methods on button" + | |
7227 | + " prior to initialization; " + | |
7228 | + "attempted to call method '" + options + "'" ); | |
7229 | + } | |
7230 | + | |
7231 | + if ( typeof instance[ options ] !== "function" || | |
7232 | + options.charAt( 0 ) === "_" ) { | |
7233 | + return $.error( "no such method '" + options + "' for button" + | |
7234 | + " widget instance" ); | |
7235 | + } | |
7236 | + | |
7237 | + methodValue = instance[ options ].apply( instance, args ); | |
7238 | + | |
7239 | + if ( methodValue !== instance && methodValue !== undefined ) { | |
7240 | + returnValue = methodValue && methodValue.jquery ? | |
7241 | + returnValue.pushStack( methodValue.get() ) : | |
7242 | + methodValue; | |
7243 | + return false; | |
7244 | + } | |
7245 | + } ); | |
7246 | + } | |
7247 | + } else { | |
7248 | + | |
7249 | + // Allow multiple hashes to be passed on init | |
7250 | + if ( args.length ) { | |
7251 | + options = $.widget.extend.apply( null, [ options ].concat( args ) ); | |
7252 | + } | |
7253 | + | |
7254 | + this.each( function() { | |
7255 | + var type = $( this ).attr( "type" ); | |
7256 | + var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio"; | |
7257 | + var instance = $.data( this, "ui-" + name ); | |
7258 | + | |
7259 | + if ( instance ) { | |
7260 | + instance.option( options || {} ); | |
7261 | + if ( instance._init ) { | |
7262 | + instance._init(); | |
7263 | + } | |
7264 | + } else { | |
7265 | + if ( name === "button" ) { | |
7266 | + orig.call( $( this ), options ); | |
7267 | + return; | |
7268 | + } | |
7269 | + | |
7270 | + $( this ).checkboxradio( $.extend( { icon: false }, options ) ); | |
7271 | + } | |
7134 | 7272 | } ); |
7135 | 7273 | } |
7136 | - return this.checkboxradio.apply( this, arguments ); | |
7274 | + | |
7275 | + return returnValue; | |
7137 | 7276 | }; |
7138 | 7277 | } )( $.fn.button ); |
7139 | 7278 | |
... | ... | @@ -7160,10 +7299,9 @@ if ( $.uiBackCompat !== false ) { |
7160 | 7299 | var widgetsButton = $.ui.button; |
7161 | 7300 | |
7162 | 7301 | |
7163 | -// jscs:disable maximumLineLength | |
7164 | -/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */ | |
7302 | +/* eslint-disable max-len, camelcase */ | |
7165 | 7303 | /*! |
7166 | - * jQuery UI Datepicker 1.12.1 | |
7304 | + * jQuery UI Datepicker 1.13.2 | |
7167 | 7305 | * http://jqueryui.com |
7168 | 7306 | * |
7169 | 7307 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -7181,8 +7319,7 @@ var widgetsButton = $.ui.button; |
7181 | 7319 | //>>css.theme: ../../themes/base/theme.css |
7182 | 7320 | |
7183 | 7321 | |
7184 | - | |
7185 | -$.extend( $.ui, { datepicker: { version: "1.12.1" } } ); | |
7322 | +$.extend( $.ui, { datepicker: { version: "1.13.2" } } ); | |
7186 | 7323 | |
7187 | 7324 | var datepicker_instActive; |
7188 | 7325 | |
... | ... | @@ -7210,6 +7347,7 @@ function datepicker_getZindex( elem ) { |
7210 | 7347 | |
7211 | 7348 | return 0; |
7212 | 7349 | } |
7350 | + | |
7213 | 7351 | /* Date picker manager. |
7214 | 7352 | Use the singleton instance of this class, $.datepicker, to interact with the date picker. |
7215 | 7353 | Settings for (groups of) date pickers are maintained in an instance object, |
... | ... | @@ -7236,18 +7374,20 @@ function Datepicker() { |
7236 | 7374 | prevText: "Prev", // Display text for previous month link |
7237 | 7375 | nextText: "Next", // Display text for next month link |
7238 | 7376 | currentText: "Today", // Display text for current month link |
7239 | - monthNames: [ "January","February","March","April","May","June", | |
7240 | - "July","August","September","October","November","December" ], // Names of months for drop-down and formatting | |
7377 | + monthNames: [ "January", "February", "March", "April", "May", "June", | |
7378 | + "July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting | |
7241 | 7379 | monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting |
7242 | 7380 | dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting |
7243 | 7381 | dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting |
7244 | - dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday | |
7382 | + dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday | |
7245 | 7383 | weekHeader: "Wk", // Column header for week of the year |
7246 | 7384 | dateFormat: "mm/dd/yy", // See format options on parseDate |
7247 | 7385 | firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... |
7248 | 7386 | isRTL: false, // True if right-to-left language, false if left-to-right |
7249 | 7387 | showMonthAfterYear: false, // True if the year select precedes month, false for month then year |
7250 | - yearSuffix: "" // Additional text to append to the year in the month headers | |
7388 | + yearSuffix: "", // Additional text to append to the year in the month headers, | |
7389 | + selectMonthLabel: "Select month", // Invisible label for month selector | |
7390 | + selectYearLabel: "Select year" // Invisible label for year selector | |
7251 | 7391 | }; |
7252 | 7392 | this._defaults = { // Global defaults for all the date picker instances |
7253 | 7393 | showOn: "focus", // "focus" for popup on focus, |
... | ... | @@ -7288,6 +7428,7 @@ function Datepicker() { |
7288 | 7428 | onSelect: null, // Define a callback function when a date is selected |
7289 | 7429 | onChangeMonthYear: null, // Define a callback function when the month or year is changed |
7290 | 7430 | onClose: null, // Define a callback function when the datepicker is closed |
7431 | + onUpdateDatepicker: null, // Define a callback function when the datepicker is updated | |
7291 | 7432 | numberOfMonths: 1, // Number of months to show at a time |
7292 | 7433 | showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) |
7293 | 7434 | stepMonths: 1, // Number of months to step back/forward |
... | ... | @@ -7306,6 +7447,7 @@ function Datepicker() { |
7306 | 7447 | } |
7307 | 7448 | |
7308 | 7449 | $.extend( Datepicker.prototype, { |
7450 | + | |
7309 | 7451 | /* Class name added to elements to indicate already configured with a date picker. */ |
7310 | 7452 | markerClassName: "hasDatepicker", |
7311 | 7453 | |
... | ... | @@ -7388,7 +7530,9 @@ $.extend( Datepicker.prototype, { |
7388 | 7530 | inst.append.remove(); |
7389 | 7531 | } |
7390 | 7532 | if ( appendText ) { |
7391 | - inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" ); | |
7533 | + inst.append = $( "<span>" ) | |
7534 | + .addClass( this._appendClass ) | |
7535 | + .text( appendText ); | |
7392 | 7536 | input[ isRTL ? "before" : "after" ]( inst.append ); |
7393 | 7537 | } |
7394 | 7538 | |
... | ... | @@ -7405,12 +7549,32 @@ $.extend( Datepicker.prototype, { |
7405 | 7549 | if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked |
7406 | 7550 | buttonText = this._get( inst, "buttonText" ); |
7407 | 7551 | buttonImage = this._get( inst, "buttonImage" ); |
7408 | - inst.trigger = $( this._get( inst, "buttonImageOnly" ) ? | |
7409 | - $( "<img/>" ).addClass( this._triggerClass ). | |
7410 | - attr( { src: buttonImage, alt: buttonText, title: buttonText } ) : | |
7411 | - $( "<button type='button'></button>" ).addClass( this._triggerClass ). | |
7412 | - html( !buttonImage ? buttonText : $( "<img/>" ).attr( | |
7413 | - { src:buttonImage, alt:buttonText, title:buttonText } ) ) ); | |
7552 | + | |
7553 | + if ( this._get( inst, "buttonImageOnly" ) ) { | |
7554 | + inst.trigger = $( "<img>" ) | |
7555 | + .addClass( this._triggerClass ) | |
7556 | + .attr( { | |
7557 | + src: buttonImage, | |
7558 | + alt: buttonText, | |
7559 | + title: buttonText | |
7560 | + } ); | |
7561 | + } else { | |
7562 | + inst.trigger = $( "<button type='button'>" ) | |
7563 | + .addClass( this._triggerClass ); | |
7564 | + if ( buttonImage ) { | |
7565 | + inst.trigger.html( | |
7566 | + $( "<img>" ) | |
7567 | + .attr( { | |
7568 | + src: buttonImage, | |
7569 | + alt: buttonText, | |
7570 | + title: buttonText | |
7571 | + } ) | |
7572 | + ); | |
7573 | + } else { | |
7574 | + inst.trigger.text( buttonText ); | |
7575 | + } | |
7576 | + } | |
7577 | + | |
7414 | 7578 | input[ isRTL ? "before" : "after" ]( inst.trigger ); |
7415 | 7579 | inst.trigger.on( "click", function() { |
7416 | 7580 | if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) { |
... | ... | @@ -7556,6 +7720,7 @@ $.extend( Datepicker.prototype, { |
7556 | 7720 | |
7557 | 7721 | if ( datepicker_instActive === inst ) { |
7558 | 7722 | datepicker_instActive = null; |
7723 | + this._curInst = null; | |
7559 | 7724 | } |
7560 | 7725 | }, |
7561 | 7726 | |
... | ... | @@ -7575,7 +7740,9 @@ $.extend( Datepicker.prototype, { |
7575 | 7740 | if ( nodeName === "input" ) { |
7576 | 7741 | target.disabled = false; |
7577 | 7742 | inst.trigger.filter( "button" ). |
7578 | - each( function() { this.disabled = false; } ).end(). | |
7743 | + each( function() { | |
7744 | + this.disabled = false; | |
7745 | + } ).end(). | |
7579 | 7746 | filter( "img" ).css( { opacity: "1.0", cursor: "" } ); |
7580 | 7747 | } else if ( nodeName === "div" || nodeName === "span" ) { |
7581 | 7748 | inline = $target.children( "." + this._inlineClass ); |
... | ... | @@ -7584,7 +7751,11 @@ $.extend( Datepicker.prototype, { |
7584 | 7751 | prop( "disabled", false ); |
7585 | 7752 | } |
7586 | 7753 | this._disabledInputs = $.map( this._disabledInputs, |
7587 | - function( value ) { return ( value === target ? null : value ); } ); // delete entry | |
7754 | + | |
7755 | + // Delete entry | |
7756 | + function( value ) { | |
7757 | + return ( value === target ? null : value ); | |
7758 | + } ); | |
7588 | 7759 | }, |
7589 | 7760 | |
7590 | 7761 | /* Disable the date picker to a jQuery selection. |
... | ... | @@ -7603,7 +7774,9 @@ $.extend( Datepicker.prototype, { |
7603 | 7774 | if ( nodeName === "input" ) { |
7604 | 7775 | target.disabled = true; |
7605 | 7776 | inst.trigger.filter( "button" ). |
7606 | - each( function() { this.disabled = true; } ).end(). | |
7777 | + each( function() { | |
7778 | + this.disabled = true; | |
7779 | + } ).end(). | |
7607 | 7780 | filter( "img" ).css( { opacity: "0.5", cursor: "default" } ); |
7608 | 7781 | } else if ( nodeName === "div" || nodeName === "span" ) { |
7609 | 7782 | inline = $target.children( "." + this._inlineClass ); |
... | ... | @@ -7612,7 +7785,11 @@ $.extend( Datepicker.prototype, { |
7612 | 7785 | prop( "disabled", true ); |
7613 | 7786 | } |
7614 | 7787 | this._disabledInputs = $.map( this._disabledInputs, |
7615 | - function( value ) { return ( value === target ? null : value ); } ); // delete entry | |
7788 | + | |
7789 | + // Delete entry | |
7790 | + function( value ) { | |
7791 | + return ( value === target ? null : value ); | |
7792 | + } ); | |
7616 | 7793 | this._disabledInputs[ this._disabledInputs.length ] = target; |
7617 | 7794 | }, |
7618 | 7795 | |
... | ... | @@ -7640,8 +7817,7 @@ $.extend( Datepicker.prototype, { |
7640 | 7817 | _getInst: function( target ) { |
7641 | 7818 | try { |
7642 | 7819 | return $.data( target, "datepicker" ); |
7643 | - } | |
7644 | - catch ( err ) { | |
7820 | + } catch ( err ) { | |
7645 | 7821 | throw "Missing instance data for this datepicker"; |
7646 | 7822 | } |
7647 | 7823 | }, |
... | ... | @@ -7874,8 +8050,7 @@ $.extend( Datepicker.prototype, { |
7874 | 8050 | $.datepicker._updateAlternate( inst ); |
7875 | 8051 | $.datepicker._updateDatepicker( inst ); |
7876 | 8052 | } |
7877 | - } | |
7878 | - catch ( err ) { | |
8053 | + } catch ( err ) { | |
7879 | 8054 | } |
7880 | 8055 | } |
7881 | 8056 | return true; |
... | ... | @@ -7980,7 +8155,8 @@ $.extend( Datepicker.prototype, { |
7980 | 8155 | numMonths = this._getNumberOfMonths( inst ), |
7981 | 8156 | cols = numMonths[ 1 ], |
7982 | 8157 | width = 17, |
7983 | - activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); | |
8158 | + activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ), | |
8159 | + onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" ); | |
7984 | 8160 | |
7985 | 8161 | if ( activeCell.length > 0 ) { |
7986 | 8162 | datepicker_handleMouseover.apply( activeCell.get( 0 ) ); |
... | ... | @@ -8006,11 +8182,15 @@ $.extend( Datepicker.prototype, { |
8006 | 8182 | |
8007 | 8183 | //assure that inst.yearshtml didn't change. |
8008 | 8184 | if ( origyearshtml === inst.yearshtml && inst.yearshtml ) { |
8009 | - inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml ); | |
8185 | + inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml ); | |
8010 | 8186 | } |
8011 | 8187 | origyearshtml = inst.yearshtml = null; |
8012 | 8188 | }, 0 ); |
8013 | 8189 | } |
8190 | + | |
8191 | + if ( onUpdateDatepicker ) { | |
8192 | + onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] ); | |
8193 | + } | |
8014 | 8194 | }, |
8015 | 8195 | |
8016 | 8196 | // #6694 - don't focus the input if it's already focused |
... | ... | @@ -8048,7 +8228,7 @@ $.extend( Datepicker.prototype, { |
8048 | 8228 | inst = this._getInst( obj ), |
8049 | 8229 | isRTL = this._get( inst, "isRTL" ); |
8050 | 8230 | |
8051 | - while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) { | |
8231 | + while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) { | |
8052 | 8232 | obj = obj[ isRTL ? "previousSibling" : "nextSibling" ]; |
8053 | 8233 | } |
8054 | 8234 | |
... | ... | @@ -8136,9 +8316,7 @@ $.extend( Datepicker.prototype, { |
8136 | 8316 | if ( this._isDisabledDatepicker( target[ 0 ] ) ) { |
8137 | 8317 | return; |
8138 | 8318 | } |
8139 | - this._adjustInstDate( inst, offset + | |
8140 | - ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning | |
8141 | - period ); | |
8319 | + this._adjustInstDate( inst, offset, period ); | |
8142 | 8320 | this._updateDatepicker( inst ); |
8143 | 8321 | }, |
8144 | 8322 | |
... | ... | @@ -8185,7 +8363,7 @@ $.extend( Datepicker.prototype, { |
8185 | 8363 | } |
8186 | 8364 | |
8187 | 8365 | inst = this._getInst( target[ 0 ] ); |
8188 | - inst.selectedDay = inst.currentDay = $( "a", td ).html(); | |
8366 | + inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) ); | |
8189 | 8367 | inst.selectedMonth = inst.currentMonth = month; |
8190 | 8368 | inst.selectedYear = inst.currentYear = year; |
8191 | 8369 | this._selectDate( id, this._formatDate( inst, |
... | ... | @@ -8238,7 +8416,7 @@ $.extend( Datepicker.prototype, { |
8238 | 8416 | altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" ); |
8239 | 8417 | date = this._getDate( inst ); |
8240 | 8418 | dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) ); |
8241 | - $( altField ).val( dateStr ); | |
8419 | + $( document ).find( altField ).val( dateStr ); | |
8242 | 8420 | } |
8243 | 8421 | }, |
8244 | 8422 | |
... | ... | @@ -8677,8 +8855,7 @@ $.extend( Datepicker.prototype, { |
8677 | 8855 | try { |
8678 | 8856 | return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ), |
8679 | 8857 | offset, $.datepicker._getFormatConfig( inst ) ); |
8680 | - } | |
8681 | - catch ( e ) { | |
8858 | + } catch ( e ) { | |
8682 | 8859 | |
8683 | 8860 | // Ignore |
8684 | 8861 | } |
... | ... | @@ -8852,32 +9029,104 @@ $.extend( Datepicker.prototype, { |
8852 | 9029 | this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ), |
8853 | 9030 | this._getFormatConfig( inst ) ) ); |
8854 | 9031 | |
8855 | - prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ? | |
8856 | - "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + | |
8857 | - " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" : | |
8858 | - ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) ); | |
9032 | + if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) { | |
9033 | + prev = $( "<a>" ) | |
9034 | + .attr( { | |
9035 | + "class": "ui-datepicker-prev ui-corner-all", | |
9036 | + "data-handler": "prev", | |
9037 | + "data-event": "click", | |
9038 | + title: prevText | |
9039 | + } ) | |
9040 | + .append( | |
9041 | + $( "<span>" ) | |
9042 | + .addClass( "ui-icon ui-icon-circle-triangle-" + | |
9043 | + ( isRTL ? "e" : "w" ) ) | |
9044 | + .text( prevText ) | |
9045 | + )[ 0 ].outerHTML; | |
9046 | + } else if ( hideIfNoPrevNext ) { | |
9047 | + prev = ""; | |
9048 | + } else { | |
9049 | + prev = $( "<a>" ) | |
9050 | + .attr( { | |
9051 | + "class": "ui-datepicker-prev ui-corner-all ui-state-disabled", | |
9052 | + title: prevText | |
9053 | + } ) | |
9054 | + .append( | |
9055 | + $( "<span>" ) | |
9056 | + .addClass( "ui-icon ui-icon-circle-triangle-" + | |
9057 | + ( isRTL ? "e" : "w" ) ) | |
9058 | + .text( prevText ) | |
9059 | + )[ 0 ].outerHTML; | |
9060 | + } | |
8859 | 9061 | |
8860 | 9062 | nextText = this._get( inst, "nextText" ); |
8861 | 9063 | nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText, |
8862 | 9064 | this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ), |
8863 | 9065 | this._getFormatConfig( inst ) ) ); |
8864 | 9066 | |
8865 | - next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ? | |
8866 | - "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + | |
8867 | - " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" : | |
8868 | - ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) ); | |
9067 | + if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) { | |
9068 | + next = $( "<a>" ) | |
9069 | + .attr( { | |
9070 | + "class": "ui-datepicker-next ui-corner-all", | |
9071 | + "data-handler": "next", | |
9072 | + "data-event": "click", | |
9073 | + title: nextText | |
9074 | + } ) | |
9075 | + .append( | |
9076 | + $( "<span>" ) | |
9077 | + .addClass( "ui-icon ui-icon-circle-triangle-" + | |
9078 | + ( isRTL ? "w" : "e" ) ) | |
9079 | + .text( nextText ) | |
9080 | + )[ 0 ].outerHTML; | |
9081 | + } else if ( hideIfNoPrevNext ) { | |
9082 | + next = ""; | |
9083 | + } else { | |
9084 | + next = $( "<a>" ) | |
9085 | + .attr( { | |
9086 | + "class": "ui-datepicker-next ui-corner-all ui-state-disabled", | |
9087 | + title: nextText | |
9088 | + } ) | |
9089 | + .append( | |
9090 | + $( "<span>" ) | |
9091 | + .attr( "class", "ui-icon ui-icon-circle-triangle-" + | |
9092 | + ( isRTL ? "w" : "e" ) ) | |
9093 | + .text( nextText ) | |
9094 | + )[ 0 ].outerHTML; | |
9095 | + } | |
8869 | 9096 | |
8870 | 9097 | currentText = this._get( inst, "currentText" ); |
8871 | 9098 | gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today ); |
8872 | 9099 | currentText = ( !navigationAsDateFormat ? currentText : |
8873 | 9100 | this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) ); |
8874 | 9101 | |
8875 | - controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + | |
8876 | - this._get( inst, "closeText" ) + "</button>" : "" ); | |
8877 | - | |
8878 | - buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) + | |
8879 | - ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" + | |
8880 | - ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : ""; | |
9102 | + controls = ""; | |
9103 | + if ( !inst.inline ) { | |
9104 | + controls = $( "<button>" ) | |
9105 | + .attr( { | |
9106 | + type: "button", | |
9107 | + "class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all", | |
9108 | + "data-handler": "hide", | |
9109 | + "data-event": "click" | |
9110 | + } ) | |
9111 | + .text( this._get( inst, "closeText" ) )[ 0 ].outerHTML; | |
9112 | + } | |
9113 | + | |
9114 | + buttonPanel = ""; | |
9115 | + if ( showButtonPanel ) { | |
9116 | + buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" ) | |
9117 | + .append( isRTL ? controls : "" ) | |
9118 | + .append( this._isInRange( inst, gotoDate ) ? | |
9119 | + $( "<button>" ) | |
9120 | + .attr( { | |
9121 | + type: "button", | |
9122 | + "class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all", | |
9123 | + "data-handler": "today", | |
9124 | + "data-event": "click" | |
9125 | + } ) | |
9126 | + .text( currentText ) : | |
9127 | + "" ) | |
9128 | + .append( isRTL ? "" : controls )[ 0 ].outerHTML; | |
9129 | + } | |
8881 | 9130 | |
8882 | 9131 | firstDay = parseInt( this._get( inst, "firstDay" ), 10 ); |
8883 | 9132 | firstDay = ( isNaN( firstDay ) ? 0 : firstDay ); |
... | ... | @@ -8965,7 +9214,9 @@ $.extend( Datepicker.prototype, { |
8965 | 9214 | ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) + |
8966 | 9215 | ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day |
8967 | 9216 | ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months |
8968 | - "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date | |
9217 | + "' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader | |
9218 | + "' data-date='" + printDate.getDate() + // store date as data | |
9219 | + "'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date | |
8969 | 9220 | printDate.setDate( printDate.getDate() + 1 ); |
8970 | 9221 | printDate = this._daylightSavingAdjust( printDate ); |
8971 | 9222 | } |
... | ... | @@ -8995,6 +9246,8 @@ $.extend( Datepicker.prototype, { |
8995 | 9246 | changeMonth = this._get( inst, "changeMonth" ), |
8996 | 9247 | changeYear = this._get( inst, "changeYear" ), |
8997 | 9248 | showMonthAfterYear = this._get( inst, "showMonthAfterYear" ), |
9249 | + selectMonthLabel = this._get( inst, "selectMonthLabel" ), | |
9250 | + selectYearLabel = this._get( inst, "selectYearLabel" ), | |
8998 | 9251 | html = "<div class='ui-datepicker-title'>", |
8999 | 9252 | monthHtml = ""; |
9000 | 9253 | |
... | ... | @@ -9004,7 +9257,7 @@ $.extend( Datepicker.prototype, { |
9004 | 9257 | } else { |
9005 | 9258 | inMinYear = ( minDate && minDate.getFullYear() === drawYear ); |
9006 | 9259 | inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear ); |
9007 | - monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; | |
9260 | + monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>"; | |
9008 | 9261 | for ( month = 0; month < 12; month++ ) { |
9009 | 9262 | if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) { |
9010 | 9263 | monthHtml += "<option value='" + month + "'" + |
... | ... | @@ -9039,7 +9292,7 @@ $.extend( Datepicker.prototype, { |
9039 | 9292 | endYear = Math.max( year, determineYear( years[ 1 ] || "" ) ); |
9040 | 9293 | year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year ); |
9041 | 9294 | endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear ); |
9042 | - inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; | |
9295 | + inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>"; | |
9043 | 9296 | for ( ; year <= endYear; year++ ) { |
9044 | 9297 | inst.yearshtml += "<option value='" + year + "'" + |
9045 | 9298 | ( year === drawYear ? " selected='selected'" : "" ) + |
... | ... | @@ -9251,28 +9504,29 @@ $.fn.datepicker = function( options ) { |
9251 | 9504 | apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) ); |
9252 | 9505 | } |
9253 | 9506 | return this.each( function() { |
9254 | - typeof options === "string" ? | |
9255 | - $.datepicker[ "_" + options + "Datepicker" ]. | |
9256 | - apply( $.datepicker, [ this ].concat( otherArgs ) ) : | |
9507 | + if ( typeof options === "string" ) { | |
9508 | + $.datepicker[ "_" + options + "Datepicker" ] | |
9509 | + .apply( $.datepicker, [ this ].concat( otherArgs ) ); | |
9510 | + } else { | |
9257 | 9511 | $.datepicker._attachDatepicker( this, options ); |
9512 | + } | |
9258 | 9513 | } ); |
9259 | 9514 | }; |
9260 | 9515 | |
9261 | 9516 | $.datepicker = new Datepicker(); // singleton instance |
9262 | 9517 | $.datepicker.initialized = false; |
9263 | 9518 | $.datepicker.uuid = new Date().getTime(); |
9264 | -$.datepicker.version = "1.12.1"; | |
9519 | +$.datepicker.version = "1.13.2"; | |
9265 | 9520 | |
9266 | 9521 | var widgetsDatepicker = $.datepicker; |
9267 | 9522 | |
9268 | 9523 | |
9269 | 9524 | |
9270 | - | |
9271 | 9525 | // This file is deprecated |
9272 | 9526 | var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); |
9273 | 9527 | |
9274 | 9528 | /*! |
9275 | - * jQuery UI Mouse 1.12.1 | |
9529 | + * jQuery UI Mouse 1.13.2 | |
9276 | 9530 | * http://jqueryui.com |
9277 | 9531 | * |
9278 | 9532 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -9286,14 +9540,13 @@ var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); |
9286 | 9540 | //>>docs: http://api.jqueryui.com/mouse/ |
9287 | 9541 | |
9288 | 9542 | |
9289 | - | |
9290 | 9543 | var mouseHandled = false; |
9291 | 9544 | $( document ).on( "mouseup", function() { |
9292 | 9545 | mouseHandled = false; |
9293 | 9546 | } ); |
9294 | 9547 | |
9295 | 9548 | var widgetsMouse = $.widget( "ui.mouse", { |
9296 | - version: "1.12.1", | |
9549 | + version: "1.13.2", | |
9297 | 9550 | options: { |
9298 | 9551 | cancel: "input, textarea, button, select, option", |
9299 | 9552 | distance: 1, |
... | ... | @@ -9338,7 +9591,9 @@ var widgetsMouse = $.widget( "ui.mouse", { |
9338 | 9591 | this._mouseMoved = false; |
9339 | 9592 | |
9340 | 9593 | // We may have missed mouseup (out of window) |
9341 | - ( this._mouseStarted && this._mouseUp( event ) ); | |
9594 | + if ( this._mouseStarted ) { | |
9595 | + this._mouseUp( event ); | |
9596 | + } | |
9342 | 9597 | |
9343 | 9598 | this._mouseDownEvent = event; |
9344 | 9599 | |
... | ... | @@ -9431,7 +9686,11 @@ var widgetsMouse = $.widget( "ui.mouse", { |
9431 | 9686 | if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) { |
9432 | 9687 | this._mouseStarted = |
9433 | 9688 | ( this._mouseStart( this._mouseDownEvent, event ) !== false ); |
9434 | - ( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) ); | |
9689 | + if ( this._mouseStarted ) { | |
9690 | + this._mouseDrag( event ); | |
9691 | + } else { | |
9692 | + this._mouseUp( event ); | |
9693 | + } | |
9435 | 9694 | } |
9436 | 9695 | |
9437 | 9696 | return !this._mouseStarted; |
... | ... | @@ -9478,12 +9737,13 @@ var widgetsMouse = $.widget( "ui.mouse", { |
9478 | 9737 | _mouseStart: function( /* event */ ) {}, |
9479 | 9738 | _mouseDrag: function( /* event */ ) {}, |
9480 | 9739 | _mouseStop: function( /* event */ ) {}, |
9481 | - _mouseCapture: function( /* event */ ) { return true; } | |
9740 | + _mouseCapture: function( /* event */ ) { | |
9741 | + return true; | |
9742 | + } | |
9482 | 9743 | } ); |
9483 | 9744 | |
9484 | 9745 | |
9485 | 9746 | |
9486 | - | |
9487 | 9747 | // $.ui.plugin is deprecated. Use $.widget() extensions instead. |
9488 | 9748 | var plugin = $.ui.plugin = { |
9489 | 9749 | add: function( module, option, set ) { |
... | ... | @@ -9528,7 +9788,7 @@ var safeBlur = $.ui.safeBlur = function( element ) { |
9528 | 9788 | |
9529 | 9789 | |
9530 | 9790 | /*! |
9531 | - * jQuery UI Draggable 1.12.1 | |
9791 | + * jQuery UI Draggable 1.13.2 | |
9532 | 9792 | * http://jqueryui.com |
9533 | 9793 | * |
9534 | 9794 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -9544,9 +9804,8 @@ var safeBlur = $.ui.safeBlur = function( element ) { |
9544 | 9804 | //>>css.structure: ../../themes/base/draggable.css |
9545 | 9805 | |
9546 | 9806 | |
9547 | - | |
9548 | 9807 | $.widget( "ui.draggable", $.ui.mouse, { |
9549 | - version: "1.12.1", | |
9808 | + version: "1.13.2", | |
9550 | 9809 | widgetEventPrefix: "drag", |
9551 | 9810 | options: { |
9552 | 9811 | addClasses: true, |
... | ... | @@ -9710,7 +9969,9 @@ $.widget( "ui.draggable", $.ui.mouse, { |
9710 | 9969 | this.originalPageY = event.pageY; |
9711 | 9970 | |
9712 | 9971 | //Adjust the mouse offset relative to the helper if "cursorAt" is supplied |
9713 | - ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) ); | |
9972 | + if ( o.cursorAt ) { | |
9973 | + this._adjustOffsetFromHelper( o.cursorAt ); | |
9974 | + } | |
9714 | 9975 | |
9715 | 9976 | //Set a containment if given in the options |
9716 | 9977 | this._setContainment(); |
... | ... | @@ -9805,7 +10066,7 @@ $.widget( "ui.draggable", $.ui.mouse, { |
9805 | 10066 | |
9806 | 10067 | if ( ( this.options.revert === "invalid" && !dropped ) || |
9807 | 10068 | ( this.options.revert === "valid" && dropped ) || |
9808 | - this.options.revert === true || ( $.isFunction( this.options.revert ) && | |
10069 | + this.options.revert === true || ( typeof this.options.revert === "function" && | |
9809 | 10070 | this.options.revert.call( this.element, dropped ) ) |
9810 | 10071 | ) { |
9811 | 10072 | $( this.helper ).animate( |
... | ... | @@ -9877,7 +10138,7 @@ $.widget( "ui.draggable", $.ui.mouse, { |
9877 | 10138 | _createHelper: function( event ) { |
9878 | 10139 | |
9879 | 10140 | var o = this.options, |
9880 | - helperIsFunction = $.isFunction( o.helper ), | |
10141 | + helperIsFunction = typeof o.helper === "function", | |
9881 | 10142 | helper = helperIsFunction ? |
9882 | 10143 | $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : |
9883 | 10144 | ( o.helper === "clone" ? |
... | ... | @@ -9916,7 +10177,7 @@ $.widget( "ui.draggable", $.ui.mouse, { |
9916 | 10177 | if ( typeof obj === "string" ) { |
9917 | 10178 | obj = obj.split( " " ); |
9918 | 10179 | } |
9919 | - if ( $.isArray( obj ) ) { | |
10180 | + if ( Array.isArray( obj ) ) { | |
9920 | 10181 | obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; |
9921 | 10182 | } |
9922 | 10183 | if ( "left" in obj ) { |
... | ... | @@ -10625,12 +10886,13 @@ $.ui.plugin.add( "draggable", "snap", { |
10625 | 10886 | !$.contains( inst.snapElements[ i ].item.ownerDocument, |
10626 | 10887 | inst.snapElements[ i ].item ) ) { |
10627 | 10888 | if ( inst.snapElements[ i ].snapping ) { |
10628 | - ( inst.options.snap.release && | |
10889 | + if ( inst.options.snap.release ) { | |
10629 | 10890 | inst.options.snap.release.call( |
10630 | 10891 | inst.element, |
10631 | 10892 | event, |
10632 | 10893 | $.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } ) |
10633 | - ) ); | |
10894 | + ); | |
10895 | + } | |
10634 | 10896 | } |
10635 | 10897 | inst.snapElements[ i ].snapping = false; |
10636 | 10898 | continue; |
... | ... | @@ -10701,13 +10963,14 @@ $.ui.plugin.add( "draggable", "snap", { |
10701 | 10963 | } |
10702 | 10964 | |
10703 | 10965 | if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) { |
10704 | - ( inst.options.snap.snap && | |
10966 | + if ( inst.options.snap.snap ) { | |
10705 | 10967 | inst.options.snap.snap.call( |
10706 | 10968 | inst.element, |
10707 | 10969 | event, |
10708 | 10970 | $.extend( inst._uiHash(), { |
10709 | 10971 | snapItem: inst.snapElements[ i ].item |
10710 | - } ) ) ); | |
10972 | + } ) ); | |
10973 | + } | |
10711 | 10974 | } |
10712 | 10975 | inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first ); |
10713 | 10976 | |
... | ... | @@ -10725,7 +10988,9 @@ $.ui.plugin.add( "draggable", "stack", { |
10725 | 10988 | ( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 ); |
10726 | 10989 | } ); |
10727 | 10990 | |
10728 | - if ( !group.length ) { return; } | |
10991 | + if ( !group.length ) { | |
10992 | + return; | |
10993 | + } | |
10729 | 10994 | |
10730 | 10995 | min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0; |
10731 | 10996 | $( group ).each( function( i ) { |
... | ... | @@ -10758,7 +11023,7 @@ var widgetsDraggable = $.ui.draggable; |
10758 | 11023 | |
10759 | 11024 | |
10760 | 11025 | /*! |
10761 | - * jQuery UI Resizable 1.12.1 | |
11026 | + * jQuery UI Resizable 1.13.2 | |
10762 | 11027 | * http://jqueryui.com |
10763 | 11028 | * |
10764 | 11029 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -10776,9 +11041,8 @@ var widgetsDraggable = $.ui.draggable; |
10776 | 11041 | //>>css.theme: ../../themes/base/theme.css |
10777 | 11042 | |
10778 | 11043 | |
10779 | - | |
10780 | 11044 | $.widget( "ui.resizable", $.ui.mouse, { |
10781 | - version: "1.12.1", | |
11045 | + version: "1.13.2", | |
10782 | 11046 | widgetEventPrefix: "resize", |
10783 | 11047 | options: { |
10784 | 11048 | alsoResize: false, |
... | ... | @@ -10833,9 +11097,15 @@ $.widget( "ui.resizable", $.ui.mouse, { |
10833 | 11097 | // TODO: determine which cases actually cause this to happen |
10834 | 11098 | // if the element doesn't have the scroll set, see if it's possible to |
10835 | 11099 | // set the scroll |
10836 | - el[ scroll ] = 1; | |
10837 | - has = ( el[ scroll ] > 0 ); | |
10838 | - el[ scroll ] = 0; | |
11100 | + try { | |
11101 | + el[ scroll ] = 1; | |
11102 | + has = ( el[ scroll ] > 0 ); | |
11103 | + el[ scroll ] = 0; | |
11104 | + } catch ( e ) { | |
11105 | + | |
11106 | + // `el` might be a string, then setting `scroll` will throw | |
11107 | + // an error in strict mode; ignore it. | |
11108 | + } | |
10839 | 11109 | return has; |
10840 | 11110 | }, |
10841 | 11111 | |
... | ... | @@ -10858,7 +11128,8 @@ $.widget( "ui.resizable", $.ui.mouse, { |
10858 | 11128 | if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) { |
10859 | 11129 | |
10860 | 11130 | this.element.wrap( |
10861 | - $( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( { | |
11131 | + $( "<div class='ui-wrapper'></div>" ).css( { | |
11132 | + overflow: "hidden", | |
10862 | 11133 | position: this.element.css( "position" ), |
10863 | 11134 | width: this.element.outerWidth(), |
10864 | 11135 | height: this.element.outerHeight(), |
... | ... | @@ -10929,15 +11200,14 @@ $.widget( "ui.resizable", $.ui.mouse, { |
10929 | 11200 | _destroy: function() { |
10930 | 11201 | |
10931 | 11202 | this._mouseDestroy(); |
11203 | + this._addedHandles.remove(); | |
10932 | 11204 | |
10933 | 11205 | var wrapper, |
10934 | 11206 | _destroy = function( exp ) { |
10935 | 11207 | $( exp ) |
10936 | 11208 | .removeData( "resizable" ) |
10937 | 11209 | .removeData( "ui-resizable" ) |
10938 | - .off( ".resizable" ) | |
10939 | - .find( ".ui-resizable-handle" ) | |
10940 | - .remove(); | |
11210 | + .off( ".resizable" ); | |
10941 | 11211 | }; |
10942 | 11212 | |
10943 | 11213 | // TODO: Unwrap at same DOM position |
... | ... | @@ -10968,6 +11238,9 @@ $.widget( "ui.resizable", $.ui.mouse, { |
10968 | 11238 | this._removeHandles(); |
10969 | 11239 | this._setupHandles(); |
10970 | 11240 | break; |
11241 | + case "aspectRatio": | |
11242 | + this._aspectRatio = !!value; | |
11243 | + break; | |
10971 | 11244 | default: |
10972 | 11245 | break; |
10973 | 11246 | } |
... | ... | @@ -10989,6 +11262,7 @@ $.widget( "ui.resizable", $.ui.mouse, { |
10989 | 11262 | } ); |
10990 | 11263 | |
10991 | 11264 | this._handles = $(); |
11265 | + this._addedHandles = $(); | |
10992 | 11266 | if ( this.handles.constructor === String ) { |
10993 | 11267 | |
10994 | 11268 | if ( this.handles === "all" ) { |
... | ... | @@ -11000,7 +11274,7 @@ $.widget( "ui.resizable", $.ui.mouse, { |
11000 | 11274 | |
11001 | 11275 | for ( i = 0; i < n.length; i++ ) { |
11002 | 11276 | |
11003 | - handle = $.trim( n[ i ] ); | |
11277 | + handle = String.prototype.trim.call( n[ i ] ); | |
11004 | 11278 | hname = "ui-resizable-" + handle; |
11005 | 11279 | axis = $( "<div>" ); |
11006 | 11280 | this._addClass( axis, "ui-resizable-handle " + hname ); |
... | ... | @@ -11008,7 +11282,10 @@ $.widget( "ui.resizable", $.ui.mouse, { |
11008 | 11282 | axis.css( { zIndex: o.zIndex } ); |
11009 | 11283 | |
11010 | 11284 | this.handles[ handle ] = ".ui-resizable-" + handle; |
11011 | - this.element.append( axis ); | |
11285 | + if ( !this.element.children( this.handles[ handle ] ).length ) { | |
11286 | + this.element.append( axis ); | |
11287 | + this._addedHandles = this._addedHandles.add( axis ); | |
11288 | + } | |
11012 | 11289 | } |
11013 | 11290 | |
11014 | 11291 | } |
... | ... | @@ -11074,7 +11351,7 @@ $.widget( "ui.resizable", $.ui.mouse, { |
11074 | 11351 | }, |
11075 | 11352 | |
11076 | 11353 | _removeHandles: function() { |
11077 | - this._handles.remove(); | |
11354 | + this._addedHandles.remove(); | |
11078 | 11355 | }, |
11079 | 11356 | |
11080 | 11357 | _mouseCapture: function( event ) { |
... | ... | @@ -11454,7 +11731,7 @@ $.widget( "ui.resizable", $.ui.mouse, { |
11454 | 11731 | |
11455 | 11732 | if ( this._helper ) { |
11456 | 11733 | |
11457 | - this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" ); | |
11734 | + this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } ); | |
11458 | 11735 | |
11459 | 11736 | this._addClass( this.helper, this._helper ); |
11460 | 11737 | this.helper.css( { |
... | ... | @@ -11511,7 +11788,9 @@ $.widget( "ui.resizable", $.ui.mouse, { |
11511 | 11788 | |
11512 | 11789 | _propagate: function( n, event ) { |
11513 | 11790 | $.ui.plugin.call( this, n, [ event, this.ui() ] ); |
11514 | - ( n !== "resize" && this._trigger( n, event, this.ui() ) ); | |
11791 | + if ( n !== "resize" ) { | |
11792 | + this._trigger( n, event, this.ui() ); | |
11793 | + } | |
11515 | 11794 | }, |
11516 | 11795 | |
11517 | 11796 | plugins: {}, |
... | ... | @@ -11632,8 +11911,8 @@ $.ui.plugin.add( "resizable", "containment", { |
11632 | 11911 | co = that.containerOffset; |
11633 | 11912 | ch = that.containerSize.height; |
11634 | 11913 | cw = that.containerSize.width; |
11635 | - width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw ); | |
11636 | - height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ; | |
11914 | + width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw ); | |
11915 | + height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch ); | |
11637 | 11916 | |
11638 | 11917 | that.parentData = { |
11639 | 11918 | element: ce, |
... | ... | @@ -11942,7 +12221,7 @@ var widgetsResizable = $.ui.resizable; |
11942 | 12221 | |
11943 | 12222 | |
11944 | 12223 | /*! |
11945 | - * jQuery UI Dialog 1.12.1 | |
12224 | + * jQuery UI Dialog 1.13.2 | |
11946 | 12225 | * http://jqueryui.com |
11947 | 12226 | * |
11948 | 12227 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -11960,9 +12239,8 @@ var widgetsResizable = $.ui.resizable; |
11960 | 12239 | //>>css.theme: ../../themes/base/theme.css |
11961 | 12240 | |
11962 | 12241 | |
11963 | - | |
11964 | 12242 | $.widget( "ui.dialog", { |
11965 | - version: "1.12.1", | |
12243 | + version: "1.13.2", | |
11966 | 12244 | options: { |
11967 | 12245 | appendTo: "body", |
11968 | 12246 | autoOpen: true, |
... | ... | @@ -12207,7 +12485,7 @@ $.widget( "ui.dialog", { |
12207 | 12485 | that._trigger( "focus" ); |
12208 | 12486 | } ); |
12209 | 12487 | |
12210 | - // Track the dialog immediately upon openening in case a focus event | |
12488 | + // Track the dialog immediately upon opening in case a focus event | |
12211 | 12489 | // somehow occurs outside of the dialog before an element inside the |
12212 | 12490 | // dialog is focused (#10152) |
12213 | 12491 | this._makeFocusTarget(); |
... | ... | @@ -12243,22 +12521,23 @@ $.widget( "ui.dialog", { |
12243 | 12521 | hasFocus.eq( 0 ).trigger( "focus" ); |
12244 | 12522 | }, |
12245 | 12523 | |
12246 | - _keepFocus: function( event ) { | |
12247 | - function checkFocus() { | |
12248 | - var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), | |
12249 | - isActive = this.uiDialog[ 0 ] === activeElement || | |
12250 | - $.contains( this.uiDialog[ 0 ], activeElement ); | |
12251 | - if ( !isActive ) { | |
12252 | - this._focusTabbable(); | |
12253 | - } | |
12524 | + _restoreTabbableFocus: function() { | |
12525 | + var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ), | |
12526 | + isActive = this.uiDialog[ 0 ] === activeElement || | |
12527 | + $.contains( this.uiDialog[ 0 ], activeElement ); | |
12528 | + if ( !isActive ) { | |
12529 | + this._focusTabbable(); | |
12254 | 12530 | } |
12531 | + }, | |
12532 | + | |
12533 | + _keepFocus: function( event ) { | |
12255 | 12534 | event.preventDefault(); |
12256 | - checkFocus.call( this ); | |
12535 | + this._restoreTabbableFocus(); | |
12257 | 12536 | |
12258 | 12537 | // support: IE |
12259 | 12538 | // IE <= 8 doesn't prevent moving focus even with event.preventDefault() |
12260 | 12539 | // so we check again later |
12261 | - this._delay( checkFocus ); | |
12540 | + this._delay( this._restoreTabbableFocus ); | |
12262 | 12541 | }, |
12263 | 12542 | |
12264 | 12543 | _createWrapper: function() { |
... | ... | @@ -12287,8 +12566,8 @@ $.widget( "ui.dialog", { |
12287 | 12566 | return; |
12288 | 12567 | } |
12289 | 12568 | var tabbables = this.uiDialog.find( ":tabbable" ), |
12290 | - first = tabbables.filter( ":first" ), | |
12291 | - last = tabbables.filter( ":last" ); | |
12569 | + first = tabbables.first(), | |
12570 | + last = tabbables.last(); | |
12292 | 12571 | |
12293 | 12572 | if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) && |
12294 | 12573 | !event.shiftKey ) { |
... | ... | @@ -12399,14 +12678,14 @@ $.widget( "ui.dialog", { |
12399 | 12678 | this.uiDialogButtonPane.remove(); |
12400 | 12679 | this.uiButtonSet.empty(); |
12401 | 12680 | |
12402 | - if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) { | |
12681 | + if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) { | |
12403 | 12682 | this._removeClass( this.uiDialog, "ui-dialog-buttons" ); |
12404 | 12683 | return; |
12405 | 12684 | } |
12406 | 12685 | |
12407 | 12686 | $.each( buttons, function( name, props ) { |
12408 | 12687 | var click, buttonOptions; |
12409 | - props = $.isFunction( props ) ? | |
12688 | + props = typeof props === "function" ? | |
12410 | 12689 | { click: props, text: name } : |
12411 | 12690 | props; |
12412 | 12691 | |
... | ... | @@ -12771,6 +13050,8 @@ $.widget( "ui.dialog", { |
12771 | 13050 | return; |
12772 | 13051 | } |
12773 | 13052 | |
13053 | + var jqMinor = $.fn.jquery.substring( 0, 4 ); | |
13054 | + | |
12774 | 13055 | // We use a delay in case the overlay is created from an |
12775 | 13056 | // event that we're going to be cancelling (#2804) |
12776 | 13057 | var isOpening = true; |
... | ... | @@ -12781,20 +13062,28 @@ $.widget( "ui.dialog", { |
12781 | 13062 | if ( !this.document.data( "ui-dialog-overlays" ) ) { |
12782 | 13063 | |
12783 | 13064 | // Prevent use of anchors and inputs |
12784 | - // Using _on() for an event handler shared across many instances is | |
12785 | - // safe because the dialogs stack and must be closed in reverse order | |
12786 | - this._on( this.document, { | |
12787 | - focusin: function( event ) { | |
12788 | - if ( isOpening ) { | |
12789 | - return; | |
12790 | - } | |
13065 | + // This doesn't use `_on()` because it is a shared event handler | |
13066 | + // across all open modal dialogs. | |
13067 | + this.document.on( "focusin.ui-dialog", function( event ) { | |
13068 | + if ( isOpening ) { | |
13069 | + return; | |
13070 | + } | |
12791 | 13071 | |
12792 | - if ( !this._allowInteraction( event ) ) { | |
12793 | - event.preventDefault(); | |
12794 | - this._trackingInstances()[ 0 ]._focusTabbable(); | |
13072 | + var instance = this._trackingInstances()[ 0 ]; | |
13073 | + if ( !instance._allowInteraction( event ) ) { | |
13074 | + event.preventDefault(); | |
13075 | + instance._focusTabbable(); | |
13076 | + | |
13077 | + // Support: jQuery >=3.4 <3.6 only | |
13078 | + // Focus re-triggering in jQuery 3.4/3.5 makes the original element | |
13079 | + // have its focus event propagated last, breaking the re-targeting. | |
13080 | + // Trigger focus in a delay in addition if needed to avoid the issue | |
13081 | + // See https://github.com/jquery/jquery/issues/4382 | |
13082 | + if ( jqMinor === "3.4." || jqMinor === "3.5." ) { | |
13083 | + instance._delay( instance._restoreTabbableFocus ); | |
12795 | 13084 | } |
12796 | 13085 | } |
12797 | - } ); | |
13086 | + }.bind( this ) ); | |
12798 | 13087 | } |
12799 | 13088 | |
12800 | 13089 | this.overlay = $( "<div>" ) |
... | ... | @@ -12817,7 +13106,7 @@ $.widget( "ui.dialog", { |
12817 | 13106 | var overlays = this.document.data( "ui-dialog-overlays" ) - 1; |
12818 | 13107 | |
12819 | 13108 | if ( !overlays ) { |
12820 | - this._off( this.document, "focusin" ); | |
13109 | + this.document.off( "focusin.ui-dialog" ); | |
12821 | 13110 | this.document.removeData( "ui-dialog-overlays" ); |
12822 | 13111 | } else { |
12823 | 13112 | this.document.data( "ui-dialog-overlays", overlays ); |
... | ... | @@ -12857,7 +13146,7 @@ var widgetsDialog = $.ui.dialog; |
12857 | 13146 | |
12858 | 13147 | |
12859 | 13148 | /*! |
12860 | - * jQuery UI Droppable 1.12.1 | |
13149 | + * jQuery UI Droppable 1.13.2 | |
12861 | 13150 | * http://jqueryui.com |
12862 | 13151 | * |
12863 | 13152 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -12872,9 +13161,8 @@ var widgetsDialog = $.ui.dialog; |
12872 | 13161 | //>>demos: http://jqueryui.com/droppable/ |
12873 | 13162 | |
12874 | 13163 | |
12875 | - | |
12876 | 13164 | $.widget( "ui.droppable", { |
12877 | - version: "1.12.1", | |
13165 | + version: "1.13.2", | |
12878 | 13166 | widgetEventPrefix: "drop", |
12879 | 13167 | options: { |
12880 | 13168 | accept: "*", |
... | ... | @@ -12899,7 +13187,7 @@ $.widget( "ui.droppable", { |
12899 | 13187 | this.isover = false; |
12900 | 13188 | this.isout = true; |
12901 | 13189 | |
12902 | - this.accept = $.isFunction( accept ) ? accept : function( d ) { | |
13190 | + this.accept = typeof accept === "function" ? accept : function( d ) { | |
12903 | 13191 | return d.is( accept ); |
12904 | 13192 | }; |
12905 | 13193 | |
... | ... | @@ -12922,7 +13210,9 @@ $.widget( "ui.droppable", { |
12922 | 13210 | |
12923 | 13211 | this._addToManager( o.scope ); |
12924 | 13212 | |
12925 | - o.addClasses && this._addClass( "ui-droppable" ); | |
13213 | + if ( o.addClasses ) { | |
13214 | + this._addClass( "ui-droppable" ); | |
13215 | + } | |
12926 | 13216 | |
12927 | 13217 | }, |
12928 | 13218 | |
... | ... | @@ -12951,7 +13241,7 @@ $.widget( "ui.droppable", { |
12951 | 13241 | _setOption: function( key, value ) { |
12952 | 13242 | |
12953 | 13243 | if ( key === "accept" ) { |
12954 | - this.accept = $.isFunction( value ) ? value : function( d ) { | |
13244 | + this.accept = typeof value === "function" ? value : function( d ) { | |
12955 | 13245 | return d.is( value ); |
12956 | 13246 | }; |
12957 | 13247 | } else if ( key === "scope" ) { |
... | ... | @@ -13041,14 +13331,15 @@ $.widget( "ui.droppable", { |
13041 | 13331 | inst.accept.call( |
13042 | 13332 | inst.element[ 0 ], ( draggable.currentItem || draggable.element ) |
13043 | 13333 | ) && |
13044 | - intersect( | |
13334 | + $.ui.intersect( | |
13045 | 13335 | draggable, |
13046 | 13336 | $.extend( inst, { offset: inst.element.offset() } ), |
13047 | 13337 | inst.options.tolerance, event |
13048 | 13338 | ) |
13049 | 13339 | ) { |
13050 | 13340 | childrenIntersection = true; |
13051 | - return false; } | |
13341 | + return false; | |
13342 | + } | |
13052 | 13343 | } ); |
13053 | 13344 | if ( childrenIntersection ) { |
13054 | 13345 | return false; |
... | ... | @@ -13077,7 +13368,7 @@ $.widget( "ui.droppable", { |
13077 | 13368 | }, |
13078 | 13369 | |
13079 | 13370 | // Extension points just to make backcompat sane and avoid duplicating logic |
13080 | - // TODO: Remove in 1.13 along with call to it below | |
13371 | + // TODO: Remove in 1.14 along with call to it below | |
13081 | 13372 | _addHoverClass: function() { |
13082 | 13373 | this._addClass( "ui-droppable-hover" ); |
13083 | 13374 | }, |
... | ... | @@ -13095,7 +13386,7 @@ $.widget( "ui.droppable", { |
13095 | 13386 | } |
13096 | 13387 | } ); |
13097 | 13388 | |
13098 | -var intersect = $.ui.intersect = ( function() { | |
13389 | +$.ui.intersect = ( function() { | |
13099 | 13390 | function isOverAxis( x, reference, size ) { |
13100 | 13391 | return ( x >= reference ) && ( x < ( reference + size ) ); |
13101 | 13392 | } |
... | ... | @@ -13203,7 +13494,7 @@ $.ui.ddmanager = { |
13203 | 13494 | return; |
13204 | 13495 | } |
13205 | 13496 | if ( !this.options.disabled && this.visible && |
13206 | - intersect( draggable, this, this.options.tolerance, event ) ) { | |
13497 | + $.ui.intersect( draggable, this, this.options.tolerance, event ) ) { | |
13207 | 13498 | dropped = this._drop.call( this, event ) || dropped; |
13208 | 13499 | } |
13209 | 13500 | |
... | ... | @@ -13244,7 +13535,7 @@ $.ui.ddmanager = { |
13244 | 13535 | } |
13245 | 13536 | |
13246 | 13537 | var parentInstance, scope, parent, |
13247 | - intersects = intersect( draggable, this, this.options.tolerance, event ), | |
13538 | + intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ), | |
13248 | 13539 | c = !intersects && this.isover ? |
13249 | 13540 | "isout" : |
13250 | 13541 | ( intersects && !this.isover ? "isover" : null ); |
... | ... | @@ -13338,7 +13629,7 @@ var widgetsDroppable = $.ui.droppable; |
13338 | 13629 | |
13339 | 13630 | |
13340 | 13631 | /*! |
13341 | - * jQuery UI Progressbar 1.12.1 | |
13632 | + * jQuery UI Progressbar 1.13.2 | |
13342 | 13633 | * http://jqueryui.com |
13343 | 13634 | * |
13344 | 13635 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -13348,9 +13639,9 @@ var widgetsDroppable = $.ui.droppable; |
13348 | 13639 | |
13349 | 13640 | //>>label: Progressbar |
13350 | 13641 | //>>group: Widgets |
13351 | -// jscs:disable maximumLineLength | |
13642 | +/* eslint-disable max-len */ | |
13352 | 13643 | //>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators. |
13353 | -// jscs:enable maximumLineLength | |
13644 | +/* eslint-enable max-len */ | |
13354 | 13645 | //>>docs: http://api.jqueryui.com/progressbar/ |
13355 | 13646 | //>>demos: http://jqueryui.com/progressbar/ |
13356 | 13647 | //>>css.structure: ../../themes/base/core.css |
... | ... | @@ -13358,9 +13649,8 @@ var widgetsDroppable = $.ui.droppable; |
13358 | 13649 | //>>css.theme: ../../themes/base/theme.css |
13359 | 13650 | |
13360 | 13651 | |
13361 | - | |
13362 | 13652 | var widgetsProgressbar = $.widget( "ui.progressbar", { |
13363 | - version: "1.12.1", | |
13653 | + version: "1.13.2", | |
13364 | 13654 | options: { |
13365 | 13655 | classes: { |
13366 | 13656 | "ui-progressbar": "ui-corner-all", |
... | ... | @@ -13502,7 +13792,7 @@ var widgetsProgressbar = $.widget( "ui.progressbar", { |
13502 | 13792 | |
13503 | 13793 | |
13504 | 13794 | /*! |
13505 | - * jQuery UI Selectable 1.12.1 | |
13795 | + * jQuery UI Selectable 1.13.2 | |
13506 | 13796 | * http://jqueryui.com |
13507 | 13797 | * |
13508 | 13798 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -13518,9 +13808,8 @@ var widgetsProgressbar = $.widget( "ui.progressbar", { |
13518 | 13808 | //>>css.structure: ../../themes/base/selectable.css |
13519 | 13809 | |
13520 | 13810 | |
13521 | - | |
13522 | 13811 | var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { |
13523 | - version: "1.12.1", | |
13812 | + version: "1.13.2", | |
13524 | 13813 | options: { |
13525 | 13814 | appendTo: "body", |
13526 | 13815 | autoRefresh: true, |
... | ... | @@ -13671,8 +13960,12 @@ var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { |
13671 | 13960 | x2 = event.pageX, |
13672 | 13961 | y2 = event.pageY; |
13673 | 13962 | |
13674 | - if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; } | |
13675 | - if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; } | |
13963 | + if ( x1 > x2 ) { | |
13964 | + tmp = x2; x2 = x1; x1 = tmp; | |
13965 | + } | |
13966 | + if ( y1 > y2 ) { | |
13967 | + tmp = y2; y2 = y1; y1 = tmp; | |
13968 | + } | |
13676 | 13969 | this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } ); |
13677 | 13970 | |
13678 | 13971 | this.selectees.each( function() { |
... | ... | @@ -13797,7 +14090,7 @@ var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { |
13797 | 14090 | |
13798 | 14091 | |
13799 | 14092 | /*! |
13800 | - * jQuery UI Selectmenu 1.12.1 | |
14093 | + * jQuery UI Selectmenu 1.13.2 | |
13801 | 14094 | * http://jqueryui.com |
13802 | 14095 | * |
13803 | 14096 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -13807,9 +14100,9 @@ var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { |
13807 | 14100 | |
13808 | 14101 | //>>label: Selectmenu |
13809 | 14102 | //>>group: Widgets |
13810 | -// jscs:disable maximumLineLength | |
14103 | +/* eslint-disable max-len */ | |
13811 | 14104 | //>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select. |
13812 | -// jscs:enable maximumLineLength | |
14105 | +/* eslint-enable max-len */ | |
13813 | 14106 | //>>docs: http://api.jqueryui.com/selectmenu/ |
13814 | 14107 | //>>demos: http://jqueryui.com/selectmenu/ |
13815 | 14108 | //>>css.structure: ../../themes/base/core.css |
... | ... | @@ -13817,9 +14110,8 @@ var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, { |
13817 | 14110 | //>>css.theme: ../../themes/base/theme.css |
13818 | 14111 | |
13819 | 14112 | |
13820 | - | |
13821 | 14113 | var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
13822 | - version: "1.12.1", | |
14114 | + version: "1.13.2", | |
13823 | 14115 | defaultElement: "<select>", |
13824 | 14116 | options: { |
13825 | 14117 | appendTo: null, |
... | ... | @@ -13874,7 +14166,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
13874 | 14166 | this.labels = this.element.labels().attr( "for", this.ids.button ); |
13875 | 14167 | this._on( this.labels, { |
13876 | 14168 | click: function( event ) { |
13877 | - this.button.focus(); | |
14169 | + this.button.trigger( "focus" ); | |
13878 | 14170 | event.preventDefault(); |
13879 | 14171 | } |
13880 | 14172 | } ); |
... | ... | @@ -14192,7 +14484,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
14192 | 14484 | // Support: IE |
14193 | 14485 | // Setting the text selection kills the button focus in IE, but |
14194 | 14486 | // restoring the focus doesn't kill the selection. |
14195 | - this.button.focus(); | |
14487 | + this.button.trigger( "focus" ); | |
14196 | 14488 | }, |
14197 | 14489 | |
14198 | 14490 | _documentClick: { |
... | ... | @@ -14202,7 +14494,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
14202 | 14494 | } |
14203 | 14495 | |
14204 | 14496 | if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + |
14205 | - $.ui.escapeSelector( this.ids.button ) ).length ) { | |
14497 | + $.escapeSelector( this.ids.button ) ).length ) { | |
14206 | 14498 | this.close( event ); |
14207 | 14499 | } |
14208 | 14500 | } |
... | ... | @@ -14433,6 +14725,10 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
14433 | 14725 | var that = this, |
14434 | 14726 | data = []; |
14435 | 14727 | options.each( function( index, item ) { |
14728 | + if ( item.hidden ) { | |
14729 | + return; | |
14730 | + } | |
14731 | + | |
14436 | 14732 | data.push( that._parseOption( $( item ), index ) ); |
14437 | 14733 | } ); |
14438 | 14734 | this.items = data; |
... | ... | @@ -14463,7 +14759,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
14463 | 14759 | |
14464 | 14760 | |
14465 | 14761 | /*! |
14466 | - * jQuery UI Slider 1.12.1 | |
14762 | + * jQuery UI Slider 1.13.2 | |
14467 | 14763 | * http://jqueryui.com |
14468 | 14764 | * |
14469 | 14765 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -14481,9 +14777,8 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, { |
14481 | 14777 | //>>css.theme: ../../themes/base/theme.css |
14482 | 14778 | |
14483 | 14779 | |
14484 | - | |
14485 | 14780 | var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { |
14486 | - version: "1.12.1", | |
14781 | + version: "1.13.2", | |
14487 | 14782 | widgetEventPrefix: "slide", |
14488 | 14783 | |
14489 | 14784 | options: { |
... | ... | @@ -14580,7 +14875,7 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { |
14580 | 14875 | options.values = [ this._valueMin(), this._valueMin() ]; |
14581 | 14876 | } else if ( options.values.length && options.values.length !== 2 ) { |
14582 | 14877 | options.values = [ options.values[ 0 ], options.values[ 0 ] ]; |
14583 | - } else if ( $.isArray( options.values ) ) { | |
14878 | + } else if ( Array.isArray( options.values ) ) { | |
14584 | 14879 | options.values = options.values.slice( 0 ); |
14585 | 14880 | } |
14586 | 14881 | } |
... | ... | @@ -14843,7 +15138,7 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { |
14843 | 15138 | } |
14844 | 15139 | |
14845 | 15140 | if ( arguments.length ) { |
14846 | - if ( $.isArray( arguments[ 0 ] ) ) { | |
15141 | + if ( Array.isArray( arguments[ 0 ] ) ) { | |
14847 | 15142 | vals = this.options.values; |
14848 | 15143 | newValues = arguments[ 0 ]; |
14849 | 15144 | for ( i = 0; i < vals.length; i += 1 ) { |
... | ... | @@ -14877,7 +15172,7 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { |
14877 | 15172 | } |
14878 | 15173 | } |
14879 | 15174 | |
14880 | - if ( $.isArray( this.options.values ) ) { | |
15175 | + if ( Array.isArray( this.options.values ) ) { | |
14881 | 15176 | valsLength = this.options.values.length; |
14882 | 15177 | } |
14883 | 15178 | |
... | ... | @@ -15199,7 +15494,7 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { |
15199 | 15494 | |
15200 | 15495 | |
15201 | 15496 | /*! |
15202 | - * jQuery UI Sortable 1.12.1 | |
15497 | + * jQuery UI Sortable 1.13.2 | |
15203 | 15498 | * http://jqueryui.com |
15204 | 15499 | * |
15205 | 15500 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -15215,9 +15510,8 @@ var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, { |
15215 | 15510 | //>>css.structure: ../../themes/base/sortable.css |
15216 | 15511 | |
15217 | 15512 | |
15218 | - | |
15219 | 15513 | var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15220 | - version: "1.12.1", | |
15514 | + version: "1.13.2", | |
15221 | 15515 | widgetEventPrefix: "sort", |
15222 | 15516 | ready: false, |
15223 | 15517 | options: { |
... | ... | @@ -15377,6 +15671,11 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15377 | 15671 | // mouseCapture |
15378 | 15672 | this.refreshPositions(); |
15379 | 15673 | |
15674 | + //Prepare the dragged items parent | |
15675 | + this.appendTo = $( o.appendTo !== "parent" ? | |
15676 | + o.appendTo : | |
15677 | + this.currentItem.parent() ); | |
15678 | + | |
15380 | 15679 | //Create and append the visible helper |
15381 | 15680 | this.helper = this._createHelper( event ); |
15382 | 15681 | |
... | ... | @@ -15391,9 +15690,6 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15391 | 15690 | //Cache the margins of the original element |
15392 | 15691 | this._cacheMargins(); |
15393 | 15692 | |
15394 | - //Get the next scrolling parent | |
15395 | - this.scrollParent = this.helper.scrollParent(); | |
15396 | - | |
15397 | 15693 | //The element's absolute position on the page minus margins |
15398 | 15694 | this.offset = this.currentItem.offset(); |
15399 | 15695 | this.offset = { |
... | ... | @@ -15406,25 +15702,22 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15406 | 15702 | left: event.pageX - this.offset.left, |
15407 | 15703 | top: event.pageY - this.offset.top |
15408 | 15704 | }, |
15409 | - parent: this._getParentOffset(), | |
15410 | 15705 | |
15411 | 15706 | // This is a relative to absolute position minus the actual position calculation - |
15412 | 15707 | // only used for relative positioned helper |
15413 | 15708 | relative: this._getRelativeOffset() |
15414 | 15709 | } ); |
15415 | 15710 | |
15416 | - // Only after we got the offset, we can change the helper's position to absolute | |
15711 | + // After we get the helper offset, but before we get the parent offset we can | |
15712 | + // change the helper's position to absolute | |
15417 | 15713 | // TODO: Still need to figure out a way to make relative sorting possible |
15418 | 15714 | this.helper.css( "position", "absolute" ); |
15419 | 15715 | this.cssPosition = this.helper.css( "position" ); |
15420 | 15716 | |
15421 | - //Generate the original position | |
15422 | - this.originalPosition = this._generatePosition( event ); | |
15423 | - this.originalPageX = event.pageX; | |
15424 | - this.originalPageY = event.pageY; | |
15425 | - | |
15426 | 15717 | //Adjust the mouse offset relative to the helper if "cursorAt" is supplied |
15427 | - ( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) ); | |
15718 | + if ( o.cursorAt ) { | |
15719 | + this._adjustOffsetFromHelper( o.cursorAt ); | |
15720 | + } | |
15428 | 15721 | |
15429 | 15722 | //Cache the former DOM position |
15430 | 15723 | this.domPosition = { |
... | ... | @@ -15441,6 +15734,13 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15441 | 15734 | //Create the placeholder |
15442 | 15735 | this._createPlaceholder(); |
15443 | 15736 | |
15737 | + //Get the next scrolling parent | |
15738 | + this.scrollParent = this.placeholder.scrollParent(); | |
15739 | + | |
15740 | + $.extend( this.offset, { | |
15741 | + parent: this._getParentOffset() | |
15742 | + } ); | |
15743 | + | |
15444 | 15744 | //Set a containment if given in the options |
15445 | 15745 | if ( o.containment ) { |
15446 | 15746 | this._setContainment(); |
... | ... | @@ -15457,13 +15757,9 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15457 | 15757 | $( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body ); |
15458 | 15758 | } |
15459 | 15759 | |
15460 | - if ( o.opacity ) { // opacity option | |
15461 | - if ( this.helper.css( "opacity" ) ) { | |
15462 | - this._storedOpacity = this.helper.css( "opacity" ); | |
15463 | - } | |
15464 | - this.helper.css( "opacity", o.opacity ); | |
15465 | - } | |
15466 | - | |
15760 | + // We need to make sure to grab the zIndex before setting the | |
15761 | + // opacity, because setting the opacity to anything lower than 1 | |
15762 | + // causes the zIndex to change from "auto" to 0. | |
15467 | 15763 | if ( o.zIndex ) { // zIndex option |
15468 | 15764 | if ( this.helper.css( "zIndex" ) ) { |
15469 | 15765 | this._storedZIndex = this.helper.css( "zIndex" ); |
... | ... | @@ -15471,6 +15767,13 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15471 | 15767 | this.helper.css( "zIndex", o.zIndex ); |
15472 | 15768 | } |
15473 | 15769 | |
15770 | + if ( o.opacity ) { // opacity option | |
15771 | + if ( this.helper.css( "opacity" ) ) { | |
15772 | + this._storedOpacity = this.helper.css( "opacity" ); | |
15773 | + } | |
15774 | + this.helper.css( "opacity", o.opacity ); | |
15775 | + } | |
15776 | + | |
15474 | 15777 | //Prepare scrolling |
15475 | 15778 | if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && |
15476 | 15779 | this.scrollParent[ 0 ].tagName !== "HTML" ) { |
... | ... | @@ -15505,77 +15808,82 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15505 | 15808 | |
15506 | 15809 | this._addClass( this.helper, "ui-sortable-helper" ); |
15507 | 15810 | |
15508 | - // Execute the drag once - this causes the helper not to be visiblebefore getting its | |
15509 | - // correct position | |
15510 | - this._mouseDrag( event ); | |
15511 | - return true; | |
15811 | + //Move the helper, if needed | |
15812 | + if ( !this.helper.parent().is( this.appendTo ) ) { | |
15813 | + this.helper.detach().appendTo( this.appendTo ); | |
15512 | 15814 | |
15513 | - }, | |
15815 | + //Update position | |
15816 | + this.offset.parent = this._getParentOffset(); | |
15817 | + } | |
15514 | 15818 | |
15515 | - _mouseDrag: function( event ) { | |
15516 | - var i, item, itemElement, intersection, | |
15517 | - o = this.options, | |
15518 | - scrolled = false; | |
15819 | + //Generate the original position | |
15820 | + this.position = this.originalPosition = this._generatePosition( event ); | |
15821 | + this.originalPageX = event.pageX; | |
15822 | + this.originalPageY = event.pageY; | |
15823 | + this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" ); | |
15519 | 15824 | |
15520 | - //Compute the helpers position | |
15521 | - this.position = this._generatePosition( event ); | |
15522 | - this.positionAbs = this._convertPositionTo( "absolute" ); | |
15825 | + this._mouseDrag( event ); | |
15523 | 15826 | |
15524 | - if ( !this.lastPositionAbs ) { | |
15525 | - this.lastPositionAbs = this.positionAbs; | |
15526 | - } | |
15827 | + return true; | |
15527 | 15828 | |
15528 | - //Do scrolling | |
15529 | - if ( this.options.scroll ) { | |
15530 | - if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && | |
15531 | - this.scrollParent[ 0 ].tagName !== "HTML" ) { | |
15829 | + }, | |
15532 | 15830 | |
15533 | - if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) - | |
15534 | - event.pageY < o.scrollSensitivity ) { | |
15535 | - this.scrollParent[ 0 ].scrollTop = | |
15536 | - scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed; | |
15537 | - } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) { | |
15538 | - this.scrollParent[ 0 ].scrollTop = | |
15539 | - scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed; | |
15540 | - } | |
15831 | + _scroll: function( event ) { | |
15832 | + var o = this.options, | |
15833 | + scrolled = false; | |
15541 | 15834 | |
15542 | - if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) - | |
15543 | - event.pageX < o.scrollSensitivity ) { | |
15544 | - this.scrollParent[ 0 ].scrollLeft = scrolled = | |
15545 | - this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed; | |
15546 | - } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) { | |
15547 | - this.scrollParent[ 0 ].scrollLeft = scrolled = | |
15548 | - this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed; | |
15549 | - } | |
15835 | + if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && | |
15836 | + this.scrollParent[ 0 ].tagName !== "HTML" ) { | |
15550 | 15837 | |
15551 | - } else { | |
15838 | + if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) - | |
15839 | + event.pageY < o.scrollSensitivity ) { | |
15840 | + this.scrollParent[ 0 ].scrollTop = | |
15841 | + scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed; | |
15842 | + } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) { | |
15843 | + this.scrollParent[ 0 ].scrollTop = | |
15844 | + scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed; | |
15845 | + } | |
15552 | 15846 | |
15553 | - if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) { | |
15554 | - scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed ); | |
15555 | - } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) < | |
15556 | - o.scrollSensitivity ) { | |
15557 | - scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed ); | |
15558 | - } | |
15847 | + if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) - | |
15848 | + event.pageX < o.scrollSensitivity ) { | |
15849 | + this.scrollParent[ 0 ].scrollLeft = scrolled = | |
15850 | + this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed; | |
15851 | + } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) { | |
15852 | + this.scrollParent[ 0 ].scrollLeft = scrolled = | |
15853 | + this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed; | |
15854 | + } | |
15559 | 15855 | |
15560 | - if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) { | |
15561 | - scrolled = this.document.scrollLeft( | |
15562 | - this.document.scrollLeft() - o.scrollSpeed | |
15563 | - ); | |
15564 | - } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) < | |
15565 | - o.scrollSensitivity ) { | |
15566 | - scrolled = this.document.scrollLeft( | |
15567 | - this.document.scrollLeft() + o.scrollSpeed | |
15568 | - ); | |
15569 | - } | |
15856 | + } else { | |
15570 | 15857 | |
15858 | + if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) { | |
15859 | + scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed ); | |
15860 | + } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) < | |
15861 | + o.scrollSensitivity ) { | |
15862 | + scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed ); | |
15571 | 15863 | } |
15572 | 15864 | |
15573 | - if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { | |
15574 | - $.ui.ddmanager.prepareOffsets( this, event ); | |
15865 | + if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) { | |
15866 | + scrolled = this.document.scrollLeft( | |
15867 | + this.document.scrollLeft() - o.scrollSpeed | |
15868 | + ); | |
15869 | + } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) < | |
15870 | + o.scrollSensitivity ) { | |
15871 | + scrolled = this.document.scrollLeft( | |
15872 | + this.document.scrollLeft() + o.scrollSpeed | |
15873 | + ); | |
15575 | 15874 | } |
15875 | + | |
15576 | 15876 | } |
15577 | 15877 | |
15578 | - //Regenerate the absolute position used for position checks | |
15878 | + return scrolled; | |
15879 | + }, | |
15880 | + | |
15881 | + _mouseDrag: function( event ) { | |
15882 | + var i, item, itemElement, intersection, | |
15883 | + o = this.options; | |
15884 | + | |
15885 | + //Compute the helpers position | |
15886 | + this.position = this._generatePosition( event ); | |
15579 | 15887 | this.positionAbs = this._convertPositionTo( "absolute" ); |
15580 | 15888 | |
15581 | 15889 | //Set the helper position |
... | ... | @@ -15586,6 +15894,24 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15586 | 15894 | this.helper[ 0 ].style.top = this.position.top + "px"; |
15587 | 15895 | } |
15588 | 15896 | |
15897 | + //Do scrolling | |
15898 | + if ( o.scroll ) { | |
15899 | + if ( this._scroll( event ) !== false ) { | |
15900 | + | |
15901 | + //Update item positions used in position checks | |
15902 | + this._refreshItemPositions( true ); | |
15903 | + | |
15904 | + if ( $.ui.ddmanager && !o.dropBehaviour ) { | |
15905 | + $.ui.ddmanager.prepareOffsets( this, event ); | |
15906 | + } | |
15907 | + } | |
15908 | + } | |
15909 | + | |
15910 | + this.dragDirection = { | |
15911 | + vertical: this._getDragVerticalDirection(), | |
15912 | + horizontal: this._getDragHorizontalDirection() | |
15913 | + }; | |
15914 | + | |
15589 | 15915 | //Rearrange |
15590 | 15916 | for ( i = this.items.length - 1; i >= 0; i-- ) { |
15591 | 15917 | |
... | ... | @@ -15612,7 +15938,8 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15612 | 15938 | // no useless actions that have been done before |
15613 | 15939 | // no action if the item moved is the parent of the item checked |
15614 | 15940 | if ( itemElement !== this.currentItem[ 0 ] && |
15615 | - this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement && | |
15941 | + this.placeholder[ intersection === 1 ? | |
15942 | + "next" : "prev" ]()[ 0 ] !== itemElement && | |
15616 | 15943 | !$.contains( this.placeholder[ 0 ], itemElement ) && |
15617 | 15944 | ( this.options.type === "semi-dynamic" ? |
15618 | 15945 | !$.contains( this.element[ 0 ], itemElement ) : |
... | ... | @@ -15622,7 +15949,8 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15622 | 15949 | |
15623 | 15950 | this.direction = intersection === 1 ? "down" : "up"; |
15624 | 15951 | |
15625 | - if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) { | |
15952 | + if ( this.options.tolerance === "pointer" || | |
15953 | + this._intersectsWithSides( item ) ) { | |
15626 | 15954 | this._rearrange( event, item ); |
15627 | 15955 | } else { |
15628 | 15956 | break; |
... | ... | @@ -15838,12 +16166,12 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15838 | 16166 | return false; |
15839 | 16167 | } |
15840 | 16168 | |
15841 | - verticalDirection = this._getDragVerticalDirection(); | |
15842 | - horizontalDirection = this._getDragHorizontalDirection(); | |
16169 | + verticalDirection = this.dragDirection.vertical; | |
16170 | + horizontalDirection = this.dragDirection.horizontal; | |
15843 | 16171 | |
15844 | 16172 | return this.floating ? |
15845 | - ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) | |
15846 | - : ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) ); | |
16173 | + ( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) : | |
16174 | + ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) ); | |
15847 | 16175 | |
15848 | 16176 | }, |
15849 | 16177 | |
... | ... | @@ -15853,8 +16181,8 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15853 | 16181 | this.offset.click.top, item.top + ( item.height / 2 ), item.height ), |
15854 | 16182 | isOverRightHalf = this._isOverAxis( this.positionAbs.left + |
15855 | 16183 | this.offset.click.left, item.left + ( item.width / 2 ), item.width ), |
15856 | - verticalDirection = this._getDragVerticalDirection(), | |
15857 | - horizontalDirection = this._getDragHorizontalDirection(); | |
16184 | + verticalDirection = this.dragDirection.vertical, | |
16185 | + horizontalDirection = this.dragDirection.horizontal; | |
15858 | 16186 | |
15859 | 16187 | if ( this.floating && horizontalDirection ) { |
15860 | 16188 | return ( ( horizontalDirection === "right" && isOverRightHalf ) || |
... | ... | @@ -15903,7 +16231,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15903 | 16231 | for ( j = cur.length - 1; j >= 0; j-- ) { |
15904 | 16232 | inst = $.data( cur[ j ], this.widgetFullName ); |
15905 | 16233 | if ( inst && inst !== this && !inst.options.disabled ) { |
15906 | - queries.push( [ $.isFunction( inst.options.items ) ? | |
16234 | + queries.push( [ typeof inst.options.items === "function" ? | |
15907 | 16235 | inst.options.items.call( inst.element ) : |
15908 | 16236 | $( inst.options.items, inst.element ) |
15909 | 16237 | .not( ".ui-sortable-helper" ) |
... | ... | @@ -15913,7 +16241,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15913 | 16241 | } |
15914 | 16242 | } |
15915 | 16243 | |
15916 | - queries.push( [ $.isFunction( this.options.items ) ? | |
16244 | + queries.push( [ typeof this.options.items === "function" ? | |
15917 | 16245 | this.options.items |
15918 | 16246 | .call( this.element, null, { options: this.options, item: this.currentItem } ) : |
15919 | 16247 | $( this.options.items, this.element ) |
... | ... | @@ -15953,7 +16281,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15953 | 16281 | |
15954 | 16282 | var i, j, cur, inst, targetData, _queries, item, queriesLength, |
15955 | 16283 | items = this.items, |
15956 | - queries = [ [ $.isFunction( this.options.items ) ? | |
16284 | + queries = [ [ typeof this.options.items === "function" ? | |
15957 | 16285 | this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) : |
15958 | 16286 | $( this.options.items, this.element ), this ] ], |
15959 | 16287 | connectWith = this._connectWith(); |
... | ... | @@ -15965,7 +16293,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15965 | 16293 | for ( j = cur.length - 1; j >= 0; j-- ) { |
15966 | 16294 | inst = $.data( cur[ j ], this.widgetFullName ); |
15967 | 16295 | if ( inst && inst !== this && !inst.options.disabled ) { |
15968 | - queries.push( [ $.isFunction( inst.options.items ) ? | |
16296 | + queries.push( [ typeof inst.options.items === "function" ? | |
15969 | 16297 | inst.options.items |
15970 | 16298 | .call( inst.element[ 0 ], event, { item: this.currentItem } ) : |
15971 | 16299 | $( inst.options.items, inst.element ), inst ] ); |
... | ... | @@ -15996,26 +16324,14 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
15996 | 16324 | |
15997 | 16325 | }, |
15998 | 16326 | |
15999 | - refreshPositions: function( fast ) { | |
16000 | - | |
16001 | - // Determine whether items are being displayed horizontally | |
16002 | - this.floating = this.items.length ? | |
16003 | - this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : | |
16004 | - false; | |
16005 | - | |
16006 | - //This has to be redone because due to the item being moved out/into the offsetParent, | |
16007 | - // the offsetParent's position will change | |
16008 | - if ( this.offsetParent && this.helper ) { | |
16009 | - this.offset.parent = this._getParentOffset(); | |
16010 | - } | |
16011 | - | |
16327 | + _refreshItemPositions: function( fast ) { | |
16012 | 16328 | var i, item, t, p; |
16013 | 16329 | |
16014 | 16330 | for ( i = this.items.length - 1; i >= 0; i-- ) { |
16015 | 16331 | item = this.items[ i ]; |
16016 | 16332 | |
16017 | 16333 | //We ignore calculating positions of all connected containers when we're not over them |
16018 | - if ( item.instance !== this.currentContainer && this.currentContainer && | |
16334 | + if ( this.currentContainer && item.instance !== this.currentContainer && | |
16019 | 16335 | item.item[ 0 ] !== this.currentItem[ 0 ] ) { |
16020 | 16336 | continue; |
16021 | 16337 | } |
... | ... | @@ -16033,6 +16349,24 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16033 | 16349 | item.left = p.left; |
16034 | 16350 | item.top = p.top; |
16035 | 16351 | } |
16352 | + }, | |
16353 | + | |
16354 | + refreshPositions: function( fast ) { | |
16355 | + | |
16356 | + // Determine whether items are being displayed horizontally | |
16357 | + this.floating = this.items.length ? | |
16358 | + this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : | |
16359 | + false; | |
16360 | + | |
16361 | + // This has to be redone because due to the item being moved out/into the offsetParent, | |
16362 | + // the offsetParent's position will change | |
16363 | + if ( this.offsetParent && this.helper ) { | |
16364 | + this.offset.parent = this._getParentOffset(); | |
16365 | + } | |
16366 | + | |
16367 | + this._refreshItemPositions( fast ); | |
16368 | + | |
16369 | + var i, p; | |
16036 | 16370 | |
16037 | 16371 | if ( this.options.custom && this.options.custom.refreshContainers ) { |
16038 | 16372 | this.options.custom.refreshContainers.call( this ); |
... | ... | @@ -16053,20 +16387,20 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16053 | 16387 | |
16054 | 16388 | _createPlaceholder: function( that ) { |
16055 | 16389 | that = that || this; |
16056 | - var className, | |
16390 | + var className, nodeName, | |
16057 | 16391 | o = that.options; |
16058 | 16392 | |
16059 | 16393 | if ( !o.placeholder || o.placeholder.constructor === String ) { |
16060 | 16394 | className = o.placeholder; |
16395 | + nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(); | |
16061 | 16396 | o.placeholder = { |
16062 | 16397 | element: function() { |
16063 | 16398 | |
16064 | - var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(), | |
16065 | - element = $( "<" + nodeName + ">", that.document[ 0 ] ); | |
16399 | + var element = $( "<" + nodeName + ">", that.document[ 0 ] ); | |
16066 | 16400 | |
16067 | - that._addClass( element, "ui-sortable-placeholder", | |
16068 | - className || that.currentItem[ 0 ].className ) | |
16069 | - ._removeClass( element, "ui-sortable-helper" ); | |
16401 | + that._addClass( element, "ui-sortable-placeholder", | |
16402 | + className || that.currentItem[ 0 ].className ) | |
16403 | + ._removeClass( element, "ui-sortable-helper" ); | |
16070 | 16404 | |
16071 | 16405 | if ( nodeName === "tbody" ) { |
16072 | 16406 | that._createTrPlaceholder( |
... | ... | @@ -16095,9 +16429,15 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16095 | 16429 | return; |
16096 | 16430 | } |
16097 | 16431 | |
16098 | - //If the element doesn't have a actual height by itself (without styles coming | |
16099 | - // from a stylesheet), it receives the inline height from the dragged item | |
16100 | - if ( !p.height() ) { | |
16432 | + // If the element doesn't have a actual height or width by itself (without | |
16433 | + // styles coming from a stylesheet), it receives the inline height and width | |
16434 | + // from the dragged item. Or, if it's a tbody or tr, it's going to have a height | |
16435 | + // anyway since we're populating them with <td>s above, but they're unlikely to | |
16436 | + // be the correct height on their own if the row heights are dynamic, so we'll | |
16437 | + // always assign the height of the dragged item given forcePlaceholderSize | |
16438 | + // is true. | |
16439 | + if ( !p.height() || ( o.forcePlaceholderSize && | |
16440 | + ( nodeName === "tbody" || nodeName === "tr" ) ) ) { | |
16101 | 16441 | p.height( |
16102 | 16442 | that.currentItem.innerHeight() - |
16103 | 16443 | parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) - |
... | ... | @@ -16230,9 +16570,11 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16230 | 16570 | return; |
16231 | 16571 | } |
16232 | 16572 | |
16233 | - itemWithLeastDistance ? | |
16234 | - this._rearrange( event, itemWithLeastDistance, null, true ) : | |
16573 | + if ( itemWithLeastDistance ) { | |
16574 | + this._rearrange( event, itemWithLeastDistance, null, true ); | |
16575 | + } else { | |
16235 | 16576 | this._rearrange( event, null, this.containers[ innermostIndex ].element, true ); |
16577 | + } | |
16236 | 16578 | this._trigger( "change", event, this._uiHash() ); |
16237 | 16579 | this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) ); |
16238 | 16580 | this.currentContainer = this.containers[ innermostIndex ]; |
... | ... | @@ -16240,6 +16582,15 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16240 | 16582 | //Update the placeholder |
16241 | 16583 | this.options.placeholder.update( this.currentContainer, this.placeholder ); |
16242 | 16584 | |
16585 | + //Update scrollParent | |
16586 | + this.scrollParent = this.placeholder.scrollParent(); | |
16587 | + | |
16588 | + //Update overflowOffset | |
16589 | + if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && | |
16590 | + this.scrollParent[ 0 ].tagName !== "HTML" ) { | |
16591 | + this.overflowOffset = this.scrollParent.offset(); | |
16592 | + } | |
16593 | + | |
16243 | 16594 | this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) ); |
16244 | 16595 | this.containers[ innermostIndex ].containerCache.over = 1; |
16245 | 16596 | } |
... | ... | @@ -16249,15 +16600,13 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16249 | 16600 | _createHelper: function( event ) { |
16250 | 16601 | |
16251 | 16602 | var o = this.options, |
16252 | - helper = $.isFunction( o.helper ) ? | |
16603 | + helper = typeof o.helper === "function" ? | |
16253 | 16604 | $( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) : |
16254 | 16605 | ( o.helper === "clone" ? this.currentItem.clone() : this.currentItem ); |
16255 | 16606 | |
16256 | 16607 | //Add the helper to the DOM if that didn't happen already |
16257 | 16608 | if ( !helper.parents( "body" ).length ) { |
16258 | - $( o.appendTo !== "parent" ? | |
16259 | - o.appendTo : | |
16260 | - this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] ); | |
16609 | + this.appendTo[ 0 ].appendChild( helper[ 0 ] ); | |
16261 | 16610 | } |
16262 | 16611 | |
16263 | 16612 | if ( helper[ 0 ] === this.currentItem[ 0 ] ) { |
... | ... | @@ -16285,7 +16634,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16285 | 16634 | if ( typeof obj === "string" ) { |
16286 | 16635 | obj = obj.split( " " ); |
16287 | 16636 | } |
16288 | - if ( $.isArray( obj ) ) { | |
16637 | + if ( Array.isArray( obj ) ) { | |
16289 | 16638 | obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 }; |
16290 | 16639 | } |
16291 | 16640 | if ( "left" in obj ) { |
... | ... | @@ -16565,9 +16914,12 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16565 | 16914 | |
16566 | 16915 | _rearrange: function( event, i, a, hardRefresh ) { |
16567 | 16916 | |
16568 | - a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) : | |
16917 | + if ( a ) { | |
16918 | + a[ 0 ].appendChild( this.placeholder[ 0 ] ); | |
16919 | + } else { | |
16569 | 16920 | i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ], |
16570 | 16921 | ( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) ); |
16922 | + } | |
16571 | 16923 | |
16572 | 16924 | //Various things done here to improve the performance: |
16573 | 16925 | // 1. we create a setTimeout, that calls refreshPositions |
... | ... | @@ -16735,7 +17087,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16735 | 17087 | |
16736 | 17088 | |
16737 | 17089 | /*! |
16738 | - * jQuery UI Spinner 1.12.1 | |
17090 | + * jQuery UI Spinner 1.13.2 | |
16739 | 17091 | * http://jqueryui.com |
16740 | 17092 | * |
16741 | 17093 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -16753,8 +17105,7 @@ var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, { |
16753 | 17105 | //>>css.theme: ../../themes/base/theme.css |
16754 | 17106 | |
16755 | 17107 | |
16756 | - | |
16757 | -function spinnerModifer( fn ) { | |
17108 | +function spinnerModifier( fn ) { | |
16758 | 17109 | return function() { |
16759 | 17110 | var previous = this.element.val(); |
16760 | 17111 | fn.apply( this, arguments ); |
... | ... | @@ -16766,7 +17117,7 @@ function spinnerModifer( fn ) { |
16766 | 17117 | } |
16767 | 17118 | |
16768 | 17119 | $.widget( "ui.spinner", { |
16769 | - version: "1.12.1", | |
17120 | + version: "1.13.2", | |
16770 | 17121 | defaultElement: "<input>", |
16771 | 17122 | widgetEventPrefix: "spin", |
16772 | 17123 | options: { |
... | ... | @@ -16859,9 +17210,13 @@ $.widget( "ui.spinner", { |
16859 | 17210 | } |
16860 | 17211 | }, |
16861 | 17212 | mousewheel: function( event, delta ) { |
16862 | - if ( !delta ) { | |
17213 | + var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ); | |
17214 | + var isActive = this.element[ 0 ] === activeElement; | |
17215 | + | |
17216 | + if ( !isActive || !delta ) { | |
16863 | 17217 | return; |
16864 | 17218 | } |
17219 | + | |
16865 | 17220 | if ( !this.spinning && !this._start( event ) ) { |
16866 | 17221 | return false; |
16867 | 17222 | } |
... | ... | @@ -17059,7 +17414,7 @@ $.widget( "ui.spinner", { |
17059 | 17414 | var incremental = this.options.incremental; |
17060 | 17415 | |
17061 | 17416 | if ( incremental ) { |
17062 | - return $.isFunction( incremental ) ? | |
17417 | + return typeof incremental === "function" ? | |
17063 | 17418 | incremental( i ) : |
17064 | 17419 | Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); |
17065 | 17420 | } |
... | ... | @@ -17157,7 +17512,7 @@ $.widget( "ui.spinner", { |
17157 | 17512 | this.buttons.button( value ? "disable" : "enable" ); |
17158 | 17513 | }, |
17159 | 17514 | |
17160 | - _setOptions: spinnerModifer( function( options ) { | |
17515 | + _setOptions: spinnerModifier( function( options ) { | |
17161 | 17516 | this._super( options ); |
17162 | 17517 | } ), |
17163 | 17518 | |
... | ... | @@ -17224,7 +17579,7 @@ $.widget( "ui.spinner", { |
17224 | 17579 | this.uiSpinner.replaceWith( this.element ); |
17225 | 17580 | }, |
17226 | 17581 | |
17227 | - stepUp: spinnerModifer( function( steps ) { | |
17582 | + stepUp: spinnerModifier( function( steps ) { | |
17228 | 17583 | this._stepUp( steps ); |
17229 | 17584 | } ), |
17230 | 17585 | _stepUp: function( steps ) { |
... | ... | @@ -17234,7 +17589,7 @@ $.widget( "ui.spinner", { |
17234 | 17589 | } |
17235 | 17590 | }, |
17236 | 17591 | |
17237 | - stepDown: spinnerModifer( function( steps ) { | |
17592 | + stepDown: spinnerModifier( function( steps ) { | |
17238 | 17593 | this._stepDown( steps ); |
17239 | 17594 | } ), |
17240 | 17595 | _stepDown: function( steps ) { |
... | ... | @@ -17244,11 +17599,11 @@ $.widget( "ui.spinner", { |
17244 | 17599 | } |
17245 | 17600 | }, |
17246 | 17601 | |
17247 | - pageUp: spinnerModifer( function( pages ) { | |
17602 | + pageUp: spinnerModifier( function( pages ) { | |
17248 | 17603 | this._stepUp( ( pages || 1 ) * this.options.page ); |
17249 | 17604 | } ), |
17250 | 17605 | |
17251 | - pageDown: spinnerModifer( function( pages ) { | |
17606 | + pageDown: spinnerModifier( function( pages ) { | |
17252 | 17607 | this._stepDown( ( pages || 1 ) * this.options.page ); |
17253 | 17608 | } ), |
17254 | 17609 | |
... | ... | @@ -17256,7 +17611,7 @@ $.widget( "ui.spinner", { |
17256 | 17611 | if ( !arguments.length ) { |
17257 | 17612 | return this._parse( this.element.val() ); |
17258 | 17613 | } |
17259 | - spinnerModifer( this._value ).call( this, newVal ); | |
17614 | + spinnerModifier( this._value ).call( this, newVal ); | |
17260 | 17615 | }, |
17261 | 17616 | |
17262 | 17617 | widget: function() { |
... | ... | @@ -17293,7 +17648,7 @@ var widgetsSpinner = $.ui.spinner; |
17293 | 17648 | |
17294 | 17649 | |
17295 | 17650 | /*! |
17296 | - * jQuery UI Tabs 1.12.1 | |
17651 | + * jQuery UI Tabs 1.13.2 | |
17297 | 17652 | * http://jqueryui.com |
17298 | 17653 | * |
17299 | 17654 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -17311,9 +17666,8 @@ var widgetsSpinner = $.ui.spinner; |
17311 | 17666 | //>>css.theme: ../../themes/base/theme.css |
17312 | 17667 | |
17313 | 17668 | |
17314 | - | |
17315 | 17669 | $.widget( "ui.tabs", { |
17316 | - version: "1.12.1", | |
17670 | + version: "1.13.2", | |
17317 | 17671 | delay: 300, |
17318 | 17672 | options: { |
17319 | 17673 | active: null, |
... | ... | @@ -17371,8 +17725,8 @@ $.widget( "ui.tabs", { |
17371 | 17725 | |
17372 | 17726 | // Take disabling tabs via class attribute from HTML |
17373 | 17727 | // into account and update option properly. |
17374 | - if ( $.isArray( options.disabled ) ) { | |
17375 | - options.disabled = $.unique( options.disabled.concat( | |
17728 | + if ( Array.isArray( options.disabled ) ) { | |
17729 | + options.disabled = $.uniqueSort( options.disabled.concat( | |
17376 | 17730 | $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { |
17377 | 17731 | return that.tabs.index( li ); |
17378 | 17732 | } ) |
... | ... | @@ -17707,7 +18061,6 @@ $.widget( "ui.tabs", { |
17707 | 18061 | return $( "a", this )[ 0 ]; |
17708 | 18062 | } ) |
17709 | 18063 | .attr( { |
17710 | - role: "presentation", | |
17711 | 18064 | tabIndex: -1 |
17712 | 18065 | } ); |
17713 | 18066 | this._addClass( this.anchors, "ui-tabs-anchor" ); |
... | ... | @@ -17779,7 +18132,7 @@ $.widget( "ui.tabs", { |
17779 | 18132 | _setOptionDisabled: function( disabled ) { |
17780 | 18133 | var currentItem, li, i; |
17781 | 18134 | |
17782 | - if ( $.isArray( disabled ) ) { | |
18135 | + if ( Array.isArray( disabled ) ) { | |
17783 | 18136 | if ( !disabled.length ) { |
17784 | 18137 | disabled = false; |
17785 | 18138 | } else if ( disabled.length === this.anchors.length ) { |
... | ... | @@ -18010,7 +18363,7 @@ $.widget( "ui.tabs", { |
18010 | 18363 | // meta-function to give users option to provide a href string instead of a numerical index. |
18011 | 18364 | if ( typeof index === "string" ) { |
18012 | 18365 | index = this.anchors.index( this.anchors.filter( "[href$='" + |
18013 | - $.ui.escapeSelector( index ) + "']" ) ); | |
18366 | + $.escapeSelector( index ) + "']" ) ); | |
18014 | 18367 | } |
18015 | 18368 | |
18016 | 18369 | return index; |
... | ... | @@ -18067,7 +18420,7 @@ $.widget( "ui.tabs", { |
18067 | 18420 | disabled = false; |
18068 | 18421 | } else { |
18069 | 18422 | index = this._getIndex( index ); |
18070 | - if ( $.isArray( disabled ) ) { | |
18423 | + if ( Array.isArray( disabled ) ) { | |
18071 | 18424 | disabled = $.map( disabled, function( num ) { |
18072 | 18425 | return num !== index ? num : null; |
18073 | 18426 | } ); |
... | ... | @@ -18093,7 +18446,7 @@ $.widget( "ui.tabs", { |
18093 | 18446 | if ( $.inArray( index, disabled ) !== -1 ) { |
18094 | 18447 | return; |
18095 | 18448 | } |
18096 | - if ( $.isArray( disabled ) ) { | |
18449 | + if ( Array.isArray( disabled ) ) { | |
18097 | 18450 | disabled = $.merge( [ index ], disabled ).sort(); |
18098 | 18451 | } else { |
18099 | 18452 | disabled = [ index ]; |
... | ... | @@ -18199,7 +18552,7 @@ var widgetsTabs = $.ui.tabs; |
18199 | 18552 | |
18200 | 18553 | |
18201 | 18554 | /*! |
18202 | - * jQuery UI Tooltip 1.12.1 | |
18555 | + * jQuery UI Tooltip 1.13.2 | |
18203 | 18556 | * http://jqueryui.com |
18204 | 18557 | * |
18205 | 18558 | * Copyright jQuery Foundation and other contributors |
... | ... | @@ -18217,18 +18570,14 @@ var widgetsTabs = $.ui.tabs; |
18217 | 18570 | //>>css.theme: ../../themes/base/theme.css |
18218 | 18571 | |
18219 | 18572 | |
18220 | - | |
18221 | 18573 | $.widget( "ui.tooltip", { |
18222 | - version: "1.12.1", | |
18574 | + version: "1.13.2", | |
18223 | 18575 | options: { |
18224 | 18576 | classes: { |
18225 | 18577 | "ui-tooltip": "ui-corner-all ui-widget-shadow" |
18226 | 18578 | }, |
18227 | 18579 | content: function() { |
18228 | - | |
18229 | - // support: IE<9, Opera in jQuery <1.7 | |
18230 | - // .text() can't accept undefined, so coerce to a string | |
18231 | - var title = $( this ).attr( "title" ) || ""; | |
18580 | + var title = $( this ).attr( "title" ); | |
18232 | 18581 | |
18233 | 18582 | // Escape title, since we're going from an attribute to raw HTML |
18234 | 18583 | return $( "<a>" ).text( title ).html(); |
... | ... | @@ -18255,7 +18604,7 @@ $.widget( "ui.tooltip", { |
18255 | 18604 | describedby.push( id ); |
18256 | 18605 | elem |
18257 | 18606 | .data( "ui-tooltip-id", id ) |
18258 | - .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); | |
18607 | + .attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) ); | |
18259 | 18608 | }, |
18260 | 18609 | |
18261 | 18610 | _removeDescribedBy: function( elem ) { |
... | ... | @@ -18268,7 +18617,7 @@ $.widget( "ui.tooltip", { |
18268 | 18617 | } |
18269 | 18618 | |
18270 | 18619 | elem.removeData( "ui-tooltip-id" ); |
18271 | - describedby = $.trim( describedby.join( " " ) ); | |
18620 | + describedby = String.prototype.trim.call( describedby.join( " " ) ); | |
18272 | 18621 | if ( describedby ) { |
18273 | 18622 | elem.attr( "aria-describedby", describedby ); |
18274 | 18623 | } else { |
... | ... | @@ -18514,7 +18863,7 @@ $.widget( "ui.tooltip", { |
18514 | 18863 | position( positionOption.of ); |
18515 | 18864 | clearInterval( delayedShow ); |
18516 | 18865 | } |
18517 | - }, $.fx.interval ); | |
18866 | + }, 13 ); | |
18518 | 18867 | } |
18519 | 18868 | |
18520 | 18869 | this._trigger( "open", event, { tooltip: tooltip } ); |
... | ... | @@ -18535,7 +18884,10 @@ $.widget( "ui.tooltip", { |
18535 | 18884 | // tooltips will handle this in destroy. |
18536 | 18885 | if ( target[ 0 ] !== this.element[ 0 ] ) { |
18537 | 18886 | events.remove = function() { |
18538 | - this._removeTooltip( this._find( target ).tooltip ); | |
18887 | + var targetElement = this._find( target ); | |
18888 | + if ( targetElement ) { | |
18889 | + this._removeTooltip( targetElement.tooltip ); | |
18890 | + } | |
18539 | 18891 | }; |
18540 | 18892 | } |
18541 | 18893 | |
... | ... | @@ -18635,6 +18987,10 @@ $.widget( "ui.tooltip", { |
18635 | 18987 | }, |
18636 | 18988 | |
18637 | 18989 | _removeTooltip: function( tooltip ) { |
18990 | + | |
18991 | + // Clear the interval for delayed tracking tooltips | |
18992 | + clearInterval( this.delayedShow ); | |
18993 | + | |
18638 | 18994 | tooltip.remove(); |
18639 | 18995 | delete this.tooltips[ tooltip.attr( "id" ) ]; |
18640 | 18996 | }, |
... | ... | @@ -18703,4 +19059,4 @@ var widgetsTooltip = $.ui.tooltip; |
18703 | 19059 | |
18704 | 19060 | |
18705 | 19061 | |
18706 | -})); | |
18707 | 19062 | \ No newline at end of file |
19063 | +} ); | |
18708 | 19064 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,6 @@ |
1 | +/*! jQuery UI - v1.13.2 - 2022-07-14 | |
2 | +* http://jqueryui.com | |
3 | +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js | |
4 | +* Copyright jQuery Foundation and other contributors; Licensed MIT */ | |
5 | + | |
6 | +!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.2";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;V.cleanData=(n=V.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=V._data(i,"events"))&&e.remove&&V(i).triggerHandler("remove");n(t)}),V.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=V.Widget),Array.isArray(e)&&(e=V.extend.apply(null,[{}].concat(e))),V.expr.pseudos[l.toLowerCase()]=function(t){return!!V.data(t,l)},V[r]=V[r]||{},s=V[r][t],n=V[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},V.extend(n,s,{version:e.version,_proto:V.extend({},e),_childConstructors:[]}),(o=new i).options=V.widget.extend({},o.options),V.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=V.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(V.each(s._childConstructors,function(t,e){var i=e.prototype;V.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),V.widget.bridge(t,n),n},V.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(V.isPlainObject(i)?t[e]=V.isPlainObject(t[e])?V.widget.extend({},t[e],i):V.widget.extend({},i):t[e]=i);return t},V.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;V.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=V.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V.data(this,a);t?(t.option(i||{}),t._init&&t._init()):V.data(this,a,new e(i,this))})),n}},V.Widget=function(){},V.Widget._childConstructors=[],V.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=V(e||this.defaultElement||this)[0],this.element=V(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=V(),this.hoverable=V(),this.focusable=V(),this.classesElementLookup={},e!==this&&(V.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=V(e.style?e.ownerDocument:e.document||e),this.window=V(this.document[0].defaultView||this.document[0].parentWindow)),this.options=V.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:V.noop,_create:V.noop,_init:V.noop,destroy:function(){var i=this;this._destroy(),V.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:V.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return V.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=V.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=V(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||V(),i=n.add?(function(){var i=[];n.element.each(function(t,e){V.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(V(i),{remove:"_untrackClassesElement"})}(),V(V.uniqueSort(i.get().concat(n.element.get())))):V(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=V.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;V.each(s.classesElementLookup,function(t,e){-1!==V.inArray(i.target,e)&&(s.classesElementLookup[t]=V(e.not(i.target).get()))}),this._off(V(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=V(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),V.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!V(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||V.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?a.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=V(this.bindings.not(t).get()),this.focusable=V(this.focusable.not(t).get()),this.hoverable=V(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(V(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(V(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(V(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=V.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},V.each({show:"fadeIn",hide:"fadeOut"},function(o,a){V.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!V.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&V.effects&&V.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){V(this)[o](),i&&i.call(e[0]),t()})}});var s,x,k,o,l,h,c,u,C;V.widget;function D(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function I(t,e){return parseInt(V.css(t,e),10)||0}function T(t){return null!=t&&t===t.window}x=Math.max,k=Math.abs,o=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,C=V.fn.position,V.position={scrollbarWidth:function(){if(void 0!==s)return s;var t,e=V("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),i=e.children()[0];return V("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?V.position.scrollbarWidth():0,height:e?V.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=V(t||window),i=T(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:!i&&!s?V(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},V.fn.position=function(u){if(!u||!u.of)return C.apply(this,arguments);var d,p,f,g,m,t,_="string"==typeof(u=V.extend({},u)).of?V(document).find(u.of):V(u.of),v=V.position.getWithinInfo(u.within),b=V.position.getScrollInfo(v),y=(u.collision||"flip").split(" "),w={},e=9===(t=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:T(t)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()};return _[0].preventDefault&&(u.at="left top"),p=e.width,f=e.height,m=V.extend({},g=e.offset),V.each(["my","at"],function(){var t,e,i=(u[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):l.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=l.test(i[1])?i[1]:"center",t=h.exec(i[0]),e=h.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],u[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===u.at[0]?m.left+=p:"center"===u.at[0]&&(m.left+=p/2),"bottom"===u.at[1]?m.top+=f:"center"===u.at[1]&&(m.top+=f/2),d=D(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=V(this),r=a.outerWidth(),l=a.outerHeight(),e=I(this,"marginLeft"),s=I(this,"marginTop"),n=r+e+I(this,"marginRight")+b.width,o=l+s+I(this,"marginBottom")+b.height,h=V.extend({},m),c=D(w.my,a.outerWidth(),a.outerHeight());"right"===u.my[0]?h.left-=r:"center"===u.my[0]&&(h.left-=r/2),"bottom"===u.my[1]?h.top-=l:"center"===u.my[1]&&(h.top-=l/2),h.left+=c[0],h.top+=c[1],i={marginLeft:e,marginTop:s},V.each(["left","top"],function(t,e){V.ui.position[y[t]]&&V.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+c[0],d[1]+c[1]],my:u.my,at:u.at,within:v,elem:a})}),u.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&k(e+i)<p&&(o.horizontal="center"),f<l&&k(s+n)<f&&(o.vertical="middle"),x(k(e),k(i))>x(k(s),k(n))?o.important="horizontal":o.important="vertical",u.using.call(this,t,o)}),a.offset(V.extend(h,{using:t}))})},V.ui.position={fit:{left:function(t,e){var i=e.within,s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,a=s-o,r=o+e.collisionWidth-n-s;e.collisionWidth>n?0<a&&r<=0?(i=t.left+a+e.collisionWidth-n-s,t.left+=a-i):t.left=!(0<r&&a<=0)&&r<a?s+n-e.collisionWidth:s:0<a?t.left+=a:0<r?t.left-=r:t.left=x(t.left-o,t.left)},top:function(t,e){var i=e.within,s=i.isWindow?i.scrollTop:i.offset.top,n=e.within.height,o=t.top-e.collisionPosition.marginTop,a=s-o,r=o+e.collisionHeight-n-s;e.collisionHeight>n?0<a&&r<=0?(i=t.top+a+e.collisionHeight-n-s,t.top+=a-i):t.top=!(0<r&&a<=0)&&r<a?s+n-e.collisionHeight:s:0<a?t.top+=a:0<r?t.top-=r:t.top=x(t.top-o,t.top)}},flip:{left:function(t,e){var i=e.within,s=i.offset.left+i.scrollLeft,n=i.width,o=i.isWindow?i.scrollLeft:i.offset.left,a=t.left-e.collisionPosition.marginLeft,r=a-o,l=a+e.collisionWidth-n-o,h="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,i="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,a=-2*e.offset[0];r<0?((s=t.left+h+i+a+e.collisionWidth-n-s)<0||s<k(r))&&(t.left+=h+i+a):0<l&&(0<(o=t.left-e.collisionPosition.marginLeft+h+i+a-o)||k(o)<l)&&(t.left+=h+i+a)},top:function(t,e){var i=e.within,s=i.offset.top+i.scrollTop,n=i.height,o=i.isWindow?i.scrollTop:i.offset.top,a=t.top-e.collisionPosition.marginTop,r=a-o,l=a+e.collisionHeight-n-o,h="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,i="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,a=-2*e.offset[1];r<0?((s=t.top+h+i+a+e.collisionHeight-n-s)<0||s<k(r))&&(t.top+=h+i+a):0<l&&(0<(o=t.top-e.collisionPosition.marginTop+h+i+a-o)||k(o)<l)&&(t.top+=h+i+a)}},flipfit:{left:function(){V.ui.position.flip.left.apply(this,arguments),V.ui.position.fit.left.apply(this,arguments)},top:function(){V.ui.position.flip.top.apply(this,arguments),V.ui.position.fit.top.apply(this,arguments)}}};V.ui.position,V.extend(V.expr.pseudos,{data:V.expr.createPseudo?V.expr.createPseudo(function(e){return function(t){return!!V.data(t,e)}}):function(t,e,i){return!!V.data(t,i[3])}}),V.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var t,d=V,p={},e=p.toString,f=/^([\-+])=\s*(\d+\.?\d*)/,g=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],m=d.Color=function(t,e,i,s){return new d.Color.fn.parse(t,e,i,s)},_={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},v={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},b=m.support={},y=d("<p>")[0],w=d.each;function P(t){return null==t?t+"":"object"==typeof t?p[e.call(t)]||"object":typeof t}function M(t,e,i){var s=v[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:Math.min(s.max,Math.max(0,t)))}function S(s){var n=m(),o=n._rgba=[];return s=s.toLowerCase(),w(g,function(t,e){var i=e.re.exec(s),i=i&&e.parse(i),e=e.space||"rgba";if(i)return i=n[e](i),n[_[e].cache]=i[_[e].cache],o=n._rgba=i._rgba,!1}),o.length?("0,0,0,0"===o.join()&&d.extend(o,B.transparent),n):B[s]}function H(t,e,i){return 6*(i=(i+1)%1)<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}y.style.cssText="background-color:rgba(1,1,1,.5)",b.rgba=-1<y.style.backgroundColor.indexOf("rgba"),w(_,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),d.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){p["[object "+e+"]"]=e.toLowerCase()}),(m.fn=d.extend(m.prototype,{parse:function(n,t,e,i){if(void 0===n)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=d(n).css(t),t=void 0);var o=this,s=P(n),a=this._rgba=[];return void 0!==t&&(n=[n,t,e,i],s="array"),"string"===s?this.parse(S(n)||B._default):"array"===s?(w(_.rgba.props,function(t,e){a[e.idx]=M(n[e.idx],e)}),this):"object"===s?(w(_,n instanceof m?function(t,e){n[e.cache]&&(o[e.cache]=n[e.cache].slice())}:function(t,i){var s=i.cache;w(i.props,function(t,e){if(!o[s]&&i.to){if("alpha"===t||null==n[t])return;o[s]=i.to(o._rgba)}o[s][e.idx]=M(n[t],e,!0)}),o[s]&&d.inArray(null,o[s].slice(0,3))<0&&(null==o[s][3]&&(o[s][3]=1),i.from&&(o._rgba=i.from(o[s])))}),this):void 0},is:function(t){var n=m(t),o=!0,a=this;return w(_,function(t,e){var i,s=n[e.cache];return s&&(i=a[e.cache]||e.to&&e.to(a._rgba)||[],w(e.props,function(t,e){if(null!=s[e.idx])return o=s[e.idx]===i[e.idx]})),o}),o},_space:function(){var i=[],s=this;return w(_,function(t,e){s[e.cache]&&i.push(t)}),i.pop()},transition:function(t,a){var e=(h=m(t))._space(),i=_[e],t=0===this.alpha()?m("transparent"):this,r=t[i.cache]||i.to(t._rgba),l=r.slice(),h=h[i.cache];return w(i.props,function(t,e){var i=e.idx,s=r[i],n=h[i],o=v[e.type]||{};null!==n&&(null===s?l[i]=n:(o.mod&&(n-s>o.mod/2?s+=o.mod:s-n>o.mod/2&&(s-=o.mod)),l[i]=M((n-s)*a+s,e)))}),this[e](l)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),i=e.pop(),s=m(t)._rgba;return m(d.map(e,function(t,e){return(1-i)*s[e]+i*t}))},toRgbaString:function(){var t="rgba(",e=d.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=d.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),i=e.pop();return t&&e.push(~~(255*i)),"#"+d.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=m.fn,_.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,i=t[1]/255,s=t[2]/255,n=t[3],o=Math.max(e,i,s),a=Math.min(e,i,s),r=o-a,l=o+a,t=.5*l,i=a===o?0:e===o?60*(i-s)/r+360:i===o?60*(s-e)/r+120:60*(e-i)/r+240,l=0==r?0:t<=.5?r/l:r/(2-l);return[Math.round(i)%360,l,t,null==n?1:n]},_.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],t=t[3],i=s<=.5?s*(1+i):s+i-s*i,s=2*s-i;return[Math.round(255*H(s,i,e+1/3)),Math.round(255*H(s,i,e)),Math.round(255*H(s,i,e-1/3)),t]},w(_,function(l,t){var e=t.props,o=t.cache,a=t.to,r=t.from;m.fn[l]=function(t){if(a&&!this[o]&&(this[o]=a(this._rgba)),void 0===t)return this[o].slice();var i=P(t),s="array"===i||"object"===i?t:arguments,n=this[o].slice();return w(e,function(t,e){t=s["object"===i?t:e.idx];null==t&&(t=n[e.idx]),n[e.idx]=M(t,e)}),r?((t=m(r(n)))[o]=n,t):m(n)},w(e,function(a,r){m.fn[a]||(m.fn[a]=function(t){var e,i=P(t),s="alpha"===a?this._hsla?"hsla":"rgba":l,n=this[s](),o=n[r.idx];return"undefined"===i?o:("function"===i&&(i=P(t=t.call(this,o))),null==t&&r.empty?this:("string"===i&&(e=f.exec(t))&&(t=o+parseFloat(e[2])*("+"===e[1]?1:-1)),n[r.idx]=t,this[s](n)))})})}),(m.hook=function(t){t=t.split(" ");w(t,function(t,o){d.cssHooks[o]={set:function(t,e){var i,s,n="";if("transparent"!==e&&("string"!==P(e)||(i=S(e)))){if(e=m(i||e),!b.rgba&&1!==e._rgba[3]){for(s="backgroundColor"===o?t.parentNode:t;(""===n||"transparent"===n)&&s&&s.style;)try{n=d.css(s,"backgroundColor"),s=s.parentNode}catch(t){}e=e.blend(n&&"transparent"!==n?n:"_default")}e=e.toRgbaString()}try{t.style[o]=e}catch(t){}}},d.fx.step[o]=function(t){t.colorInit||(t.start=m(t.elem,o),t.end=m(t.end),t.colorInit=!0),d.cssHooks[o].set(t.elem,t.start.transition(t.end,t.pos))}})})("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),d.cssHooks.borderColor={expand:function(i){var s={};return w(["Top","Right","Bottom","Left"],function(t,e){s["border"+e+"Color"]=i}),s}};var z,A,O,N,E,W,F,L,R,Y,B=d.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"},j="ui-effects-",q="ui-effects-style",K="ui-effects-animated";function U(t){var e,i,s=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,n={};if(s&&s.length&&s[0]&&s[s[0]])for(i=s.length;i--;)"string"==typeof s[e=s[i]]&&(n[e.replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})]=s[e]);else for(e in s)"string"==typeof s[e]&&(n[e]=s[e]);return n}function X(t,e,i,s){return t={effect:t=V.isPlainObject(t)?(e=t).effect:t},"function"==typeof(e=null==e?{}:e)&&(s=e,i=null,e={}),"number"!=typeof e&&!V.fx.speeds[e]||(s=i,i=e,e={}),"function"==typeof i&&(s=i,i=null),e&&V.extend(t,e),i=i||e.duration,t.duration=V.fx.off?0:"number"==typeof i?i:i in V.fx.speeds?V.fx.speeds[i]:V.fx.speeds._default,t.complete=s||e.complete,t}function $(t){return!t||"number"==typeof t||V.fx.speeds[t]||("string"==typeof t&&!V.effects.effect[t]||("function"==typeof t||"object"==typeof t&&!t.effect))}function G(t,e){var i=e.outerWidth(),e=e.outerHeight(),t=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,e,0];return{top:parseFloat(t[1])||0,right:"auto"===t[2]?i:parseFloat(t[2]),bottom:"auto"===t[3]?e:parseFloat(t[3]),left:parseFloat(t[4])||0}}V.effects={effect:{}},N=["add","remove","toggle"],E={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1},V.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,e){V.fx.step[e]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(d.style(t.elem,e,t.end),t.setAttr=!0)}}),V.fn.addBack||(V.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),V.effects.animateClass=function(n,t,e,i){var o=V.speed(t,e,i);return this.queue(function(){var i=V(this),t=i.attr("class")||"",e=(e=o.children?i.find("*").addBack():i).map(function(){return{el:V(this),start:U(this)}}),s=function(){V.each(N,function(t,e){n[e]&&i[e+"Class"](n[e])})};s(),e=e.map(function(){return this.end=U(this.el[0]),this.diff=function(t,e){var i,s,n={};for(i in e)s=e[i],t[i]!==s&&(E[i]||!V.fx.step[i]&&isNaN(parseFloat(s))||(n[i]=s));return n}(this.start,this.end),this}),i.attr("class",t),e=e.map(function(){var t=this,e=V.Deferred(),i=V.extend({},o,{queue:!1,complete:function(){e.resolve(t)}});return this.el.animate(this.diff,i),e.promise()}),V.when.apply(V,e.get()).done(function(){s(),V.each(arguments,function(){var e=this.el;V.each(this.diff,function(t){e.css(t,"")})}),o.complete.call(i[0])})})},V.fn.extend({addClass:(O=V.fn.addClass,function(t,e,i,s){return e?V.effects.animateClass.call(this,{add:t},e,i,s):O.apply(this,arguments)}),removeClass:(A=V.fn.removeClass,function(t,e,i,s){return 1<arguments.length?V.effects.animateClass.call(this,{remove:t},e,i,s):A.apply(this,arguments)}),toggleClass:(z=V.fn.toggleClass,function(t,e,i,s,n){return"boolean"==typeof e||void 0===e?i?V.effects.animateClass.call(this,e?{add:t}:{remove:t},i,s,n):z.apply(this,arguments):V.effects.animateClass.call(this,{toggle:t},e,i,s)}),switchClass:function(t,e,i,s,n){return V.effects.animateClass.call(this,{add:e,remove:t},i,s,n)}}),V.expr&&V.expr.pseudos&&V.expr.pseudos.animated&&(V.expr.pseudos.animated=(W=V.expr.pseudos.animated,function(t){return!!V(t).data(K)||W(t)})),!1!==V.uiBackCompat&&V.extend(V.effects,{save:function(t,e){for(var i=0,s=e.length;i<s;i++)null!==e[i]&&t.data(j+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;s<n;s++)null!==e[s]&&(i=t.data(j+e[s]),t.css(e[s],i))},setMode:function(t,e){return e="toggle"===e?t.is(":hidden")?"show":"hide":e},createWrapper:function(i){if(i.parent().is(".ui-effects-wrapper"))return i.parent();var s={width:i.outerWidth(!0),height:i.outerHeight(!0),float:i.css("float")},t=V("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:i.width(),height:i.height()},n=document.activeElement;try{n.id}catch(t){n=document.body}return i.wrap(t),i[0]!==n&&!V.contains(i[0],n)||V(n).trigger("focus"),t=i.parent(),"static"===i.css("position")?(t.css({position:"relative"}),i.css({position:"relative"})):(V.extend(s,{position:i.css("position"),zIndex:i.css("z-index")}),V.each(["top","left","bottom","right"],function(t,e){s[e]=i.css(e),isNaN(parseInt(s[e],10))&&(s[e]="auto")}),i.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),i.css(e),t.css(s).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!V.contains(t[0],e)||V(e).trigger("focus")),t}}),V.extend(V.effects,{version:"1.13.2",define:function(t,e,i){return i||(i=e,e="effect"),V.effects.effect[t]=i,V.effects.effect[t].mode=e,i},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,e="vertical"!==i?(e||100)/100:1;return{height:t.height()*e,width:t.width()*s,outerHeight:t.outerHeight()*e,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();1<e&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(q,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(q)||"",t.removeData(q)},mode:function(t,e){t=t.is(":hidden");return"toggle"===e&&(e=t?"show":"hide"),e=(t?"hide"===e:"show"===e)?"none":e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(t){var e,i=t.css("position"),s=t.position();return t.css({marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()),/^(static|relative)/.test(i)&&(i="absolute",e=V("<"+t[0].nodeName+">").insertAfter(t).css({display:/^(inline|ruby)/.test(t.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:t.css("marginTop"),marginBottom:t.css("marginBottom"),marginLeft:t.css("marginLeft"),marginRight:t.css("marginRight"),float:t.css("float")}).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).addClass("ui-effects-placeholder"),t.data(j+"placeholder",e)),t.css({position:i,left:s.left,top:s.top}),e},removePlaceholder:function(t){var e=j+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(t){V.effects.restoreStyle(t),V.effects.removePlaceholder(t)},setTransition:function(s,t,n,o){return o=o||{},V.each(t,function(t,e){var i=s.cssUnit(e);0<i[0]&&(o[e]=i[0]*n+i[1])}),o}}),V.fn.extend({effect:function(){function t(t){var e=V(this),i=V.effects.mode(e,r)||o;e.data(K,!0),l.push(i),o&&("show"===i||i===o&&"hide"===i)&&e.show(),o&&"none"===i||V.effects.saveStyle(e),"function"==typeof t&&t()}var s=X.apply(this,arguments),n=V.effects.effect[s.effect],o=n.mode,e=s.queue,i=e||"fx",a=s.complete,r=s.mode,l=[];return V.fx.off||!n?r?this[r](s.duration,a):this.each(function(){a&&a.call(this)}):!1===e?this.each(t).each(h):this.queue(i,t).queue(i,h);function h(t){var e=V(this);function i(){"function"==typeof a&&a.call(e[0]),"function"==typeof t&&t()}s.mode=l.shift(),!1===V.uiBackCompat||o?"none"===s.mode?(e[r](),i()):n.call(e[0],s,function(){e.removeData(K),V.effects.cleanUp(e),"hide"===s.mode&&e.hide(),i()}):(e.is(":hidden")?"hide"===r:"show"===r)?(e[r](),i()):n.call(e[0],s,i)}},show:(R=V.fn.show,function(t){if($(t))return R.apply(this,arguments);t=X.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(L=V.fn.hide,function(t){if($(t))return L.apply(this,arguments);t=X.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(F=V.fn.toggle,function(t){if($(t)||"boolean"==typeof t)return F.apply(this,arguments);t=X.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(t){var i=this.css(t),s=[];return V.each(["em","px","%","pt"],function(t,e){0<i.indexOf(e)&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):G(this.css("clip"),this)},transfer:function(t,e){var i=V(this),s=V(t.to),n="fixed"===s.css("position"),o=V("body"),a=n?o.scrollTop():0,r=n?o.scrollLeft():0,o=s.offset(),o={top:o.top-a,left:o.left-r,height:s.innerHeight(),width:s.innerWidth()},s=i.offset(),l=V("<div class='ui-effects-transfer'></div>");l.appendTo("body").addClass(t.className).css({top:s.top-a,left:s.left-r,height:i.innerHeight(),width:i.innerWidth(),position:n?"fixed":"absolute"}).animate(o,t.duration,t.easing,function(){l.remove(),"function"==typeof e&&e()})}}),V.fx.step.clip=function(t){t.clipInit||(t.start=V(t.elem).cssClip(),"string"==typeof t.end&&(t.end=G(t.end,t.elem)),t.clipInit=!0),V(t.elem).cssClip({top:t.pos*(t.end.top-t.start.top)+t.start.top,right:t.pos*(t.end.right-t.start.right)+t.start.right,bottom:t.pos*(t.end.bottom-t.start.bottom)+t.start.bottom,left:t.pos*(t.end.left-t.start.left)+t.start.left})},Y={},V.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,t){Y[t]=function(t){return Math.pow(t,e+2)}}),V.extend(Y,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),V.each(Y,function(t,e){V.easing["easeIn"+t]=e,V.easing["easeOut"+t]=function(t){return 1-e(1-t)},V.easing["easeInOut"+t]=function(t){return t<.5?e(2*t)/2:1-e(-2*t+2)/2}});y=V.effects,V.effects.define("blind","hide",function(t,e){var i={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=V(this),n=t.direction||"up",o=s.cssClip(),a={clip:V.extend({},o)},r=V.effects.createPlaceholder(s);a.clip[i[n][0]]=a.clip[i[n][1]],"show"===t.mode&&(s.cssClip(a.clip),r&&r.css(V.effects.clipToBox(a)),a.clip=o),r&&r.animate(V.effects.clipToBox(a),t.duration,t.easing),s.animate(a,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("bounce",function(t,e){var i,s,n=V(this),o=t.mode,a="hide"===o,r="show"===o,l=t.direction||"up",h=t.distance,c=t.times||5,o=2*c+(r||a?1:0),u=t.duration/o,d=t.easing,p="up"===l||"down"===l?"top":"left",f="up"===l||"left"===l,g=0,t=n.queue().length;for(V.effects.createPlaceholder(n),l=n.css(p),h=h||n["top"==p?"outerHeight":"outerWidth"]()/3,r&&((s={opacity:1})[p]=l,n.css("opacity",0).css(p,f?2*-h:2*h).animate(s,u,d)),a&&(h/=Math.pow(2,c-1)),(s={})[p]=l;g<c;g++)(i={})[p]=(f?"-=":"+=")+h,n.animate(i,u,d).animate(s,u,d),h=a?2*h:h/2;a&&((i={opacity:0})[p]=(f?"-=":"+=")+h,n.animate(i,u,d)),n.queue(e),V.effects.unshift(n,t,1+o)}),V.effects.define("clip","hide",function(t,e){var i={},s=V(this),n=t.direction||"vertical",o="both"===n,a=o||"horizontal"===n,o=o||"vertical"===n,n=s.cssClip();i.clip={top:o?(n.bottom-n.top)/2:n.top,right:a?(n.right-n.left)/2:n.right,bottom:o?(n.bottom-n.top)/2:n.bottom,left:a?(n.right-n.left)/2:n.left},V.effects.createPlaceholder(s),"show"===t.mode&&(s.cssClip(i.clip),i.clip=n),s.animate(i,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("drop","hide",function(t,e){var i=V(this),s="show"===t.mode,n=t.direction||"left",o="up"===n||"down"===n?"top":"left",a="up"===n||"left"===n?"-=":"+=",r="+="==a?"-=":"+=",l={opacity:0};V.effects.createPlaceholder(i),n=t.distance||i["top"==o?"outerHeight":"outerWidth"](!0)/2,l[o]=a+n,s&&(i.css(l),l[o]=r+n,l.opacity=1),i.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("explode","hide",function(t,e){var i,s,n,o,a,r,l=t.pieces?Math.round(Math.sqrt(t.pieces)):3,h=l,c=V(this),u="show"===t.mode,d=c.show().css("visibility","hidden").offset(),p=Math.ceil(c.outerWidth()/h),f=Math.ceil(c.outerHeight()/l),g=[];function m(){g.push(this),g.length===l*h&&(c.css({visibility:"visible"}),V(g).remove(),e())}for(i=0;i<l;i++)for(o=d.top+i*f,r=i-(l-1)/2,s=0;s<h;s++)n=d.left+s*p,a=s-(h-1)/2,c.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-s*p,top:-i*f}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:f,left:n+(u?a*p:0),top:o+(u?r*f:0),opacity:u?0:1}).animate({left:n+(u?0:a*p),top:o+(u?0:r*f),opacity:u?1:0},t.duration||500,t.easing,m)}),V.effects.define("fade","toggle",function(t,e){var i="show"===t.mode;V(this).css("opacity",i?0:1).animate({opacity:i?1:0},{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("fold","hide",function(e,t){var i=V(this),s=e.mode,n="show"===s,o="hide"===s,a=e.size||15,r=/([0-9]+)%/.exec(a),l=!!e.horizFirst?["right","bottom"]:["bottom","right"],h=e.duration/2,c=V.effects.createPlaceholder(i),u=i.cssClip(),d={clip:V.extend({},u)},p={clip:V.extend({},u)},f=[u[l[0]],u[l[1]]],s=i.queue().length;r&&(a=parseInt(r[1],10)/100*f[o?0:1]),d.clip[l[0]]=a,p.clip[l[0]]=a,p.clip[l[1]]=0,n&&(i.cssClip(p.clip),c&&c.css(V.effects.clipToBox(p)),p.clip=u),i.queue(function(t){c&&c.animate(V.effects.clipToBox(d),h,e.easing).animate(V.effects.clipToBox(p),h,e.easing),t()}).animate(d,h,e.easing).animate(p,h,e.easing).queue(t),V.effects.unshift(i,s,4)}),V.effects.define("highlight","show",function(t,e){var i=V(this),s={backgroundColor:i.css("backgroundColor")};"hide"===t.mode&&(s.opacity=0),V.effects.saveStyle(i),i.css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(s,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),V.effects.define("size",function(s,e){var n,i=V(this),t=["fontSize"],o=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],a=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=s.mode,l="effect"!==r,h=s.scale||"both",c=s.origin||["middle","center"],u=i.css("position"),d=i.position(),p=V.effects.scaledDimensions(i),f=s.from||p,g=s.to||V.effects.scaledDimensions(i,0);V.effects.createPlaceholder(i),"show"===r&&(r=f,f=g,g=r),n={from:{y:f.height/p.height,x:f.width/p.width},to:{y:g.height/p.height,x:g.width/p.width}},"box"!==h&&"both"!==h||(n.from.y!==n.to.y&&(f=V.effects.setTransition(i,o,n.from.y,f),g=V.effects.setTransition(i,o,n.to.y,g)),n.from.x!==n.to.x&&(f=V.effects.setTransition(i,a,n.from.x,f),g=V.effects.setTransition(i,a,n.to.x,g))),"content"!==h&&"both"!==h||n.from.y!==n.to.y&&(f=V.effects.setTransition(i,t,n.from.y,f),g=V.effects.setTransition(i,t,n.to.y,g)),c&&(c=V.effects.getBaseline(c,p),f.top=(p.outerHeight-f.outerHeight)*c.y+d.top,f.left=(p.outerWidth-f.outerWidth)*c.x+d.left,g.top=(p.outerHeight-g.outerHeight)*c.y+d.top,g.left=(p.outerWidth-g.outerWidth)*c.x+d.left),delete f.outerHeight,delete f.outerWidth,i.css(f),"content"!==h&&"both"!==h||(o=o.concat(["marginTop","marginBottom"]).concat(t),a=a.concat(["marginLeft","marginRight"]),i.find("*[width]").each(function(){var t=V(this),e=V.effects.scaledDimensions(t),i={height:e.height*n.from.y,width:e.width*n.from.x,outerHeight:e.outerHeight*n.from.y,outerWidth:e.outerWidth*n.from.x},e={height:e.height*n.to.y,width:e.width*n.to.x,outerHeight:e.height*n.to.y,outerWidth:e.width*n.to.x};n.from.y!==n.to.y&&(i=V.effects.setTransition(t,o,n.from.y,i),e=V.effects.setTransition(t,o,n.to.y,e)),n.from.x!==n.to.x&&(i=V.effects.setTransition(t,a,n.from.x,i),e=V.effects.setTransition(t,a,n.to.x,e)),l&&V.effects.saveStyle(t),t.css(i),t.animate(e,s.duration,s.easing,function(){l&&V.effects.restoreStyle(t)})})),i.animate(g,{queue:!1,duration:s.duration,easing:s.easing,complete:function(){var t=i.offset();0===g.opacity&&i.css("opacity",f.opacity),l||(i.css("position","static"===u?"relative":u).offset(t),V.effects.saveStyle(i)),e()}})}),V.effects.define("scale",function(t,e){var i=V(this),s=t.mode,s=parseInt(t.percent,10)||(0===parseInt(t.percent,10)||"effect"!==s?0:100),s=V.extend(!0,{from:V.effects.scaledDimensions(i),to:V.effects.scaledDimensions(i,s,t.direction||"both"),origin:t.origin||["middle","center"]},t);t.fade&&(s.from.opacity=1,s.to.opacity=0),V.effects.effect.size.call(this,s,e)}),V.effects.define("puff","hide",function(t,e){t=V.extend(!0,{},t,{fade:!0,percent:parseInt(t.percent,10)||150});V.effects.effect.scale.call(this,t,e)}),V.effects.define("pulsate","show",function(t,e){var i=V(this),s=t.mode,n="show"===s,o=2*(t.times||5)+(n||"hide"===s?1:0),a=t.duration/o,r=0,l=1,s=i.queue().length;for(!n&&i.is(":visible")||(i.css("opacity",0).show(),r=1);l<o;l++)i.animate({opacity:r},a,t.easing),r=1-r;i.animate({opacity:r},a,t.easing),i.queue(e),V.effects.unshift(i,s,1+o)}),V.effects.define("shake",function(t,e){var i=1,s=V(this),n=t.direction||"left",o=t.distance||20,a=t.times||3,r=2*a+1,l=Math.round(t.duration/r),h="up"===n||"down"===n?"top":"left",c="up"===n||"left"===n,u={},d={},p={},n=s.queue().length;for(V.effects.createPlaceholder(s),u[h]=(c?"-=":"+=")+o,d[h]=(c?"+=":"-=")+2*o,p[h]=(c?"-=":"+=")+2*o,s.animate(u,l,t.easing);i<a;i++)s.animate(d,l,t.easing).animate(p,l,t.easing);s.animate(d,l,t.easing).animate(u,l/2,t.easing).queue(e),V.effects.unshift(s,n,1+r)}),V.effects.define("slide","show",function(t,e){var i,s,n=V(this),o={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},a=t.mode,r=t.direction||"left",l="up"===r||"down"===r?"top":"left",h="up"===r||"left"===r,c=t.distance||n["top"==l?"outerHeight":"outerWidth"](!0),u={};V.effects.createPlaceholder(n),i=n.cssClip(),s=n.position()[l],u[l]=(h?-1:1)*c+s,u.clip=n.cssClip(),u.clip[o[r][1]]=u.clip[o[r][0]],"show"===a&&(n.cssClip(u.clip),n.css(l,u[l]),u.clip=i,u[l]=s),n.animate(u,{queue:!1,duration:t.duration,easing:t.easing,complete:e})}),y=!1!==V.uiBackCompat?V.effects.define("transfer",function(t,e){V(this).transfer(t,e)}):y;V.ui.focusable=function(t,e){var i,s,n,o,a=t.nodeName.toLowerCase();return"area"===a?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&(0<(s=V("img[usemap='#"+s+"']")).length&&s.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(a)?(n=!t.disabled)&&(o=V(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===a&&t.href||e,n&&V(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(V(t)))},V.extend(V.expr.pseudos,{focusable:function(t){return V.ui.focusable(t,null!=V.attr(t,"tabindex"))}});var Q,J;V.ui.focusable,V.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):V(this[0].form)},V.ui.formResetMixin={_formResetHandler:function(){var e=V(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");V.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(V.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}};V.expr.pseudos||(V.expr.pseudos=V.expr[":"]),V.uniqueSort||(V.uniqueSort=V.unique),V.escapeSelector||(Q=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,J=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},V.escapeSelector=function(t){return(t+"").replace(Q,J)}),V.fn.even&&V.fn.odd||V.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}});var Z;V.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},V.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+V.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},V.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=V(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:V(this[0].ownerDocument||document)},V.extend(V.expr.pseudos,{tabbable:function(t){var e=V.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&V.ui.focusable(t,i)}}),V.fn.extend({uniqueId:(Z=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++Z)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&V(this).removeAttr("id")})}}),V.widget("ui.accordion",{version:"1.13.2",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:function(t){return t.find("> li > :first-child").add(t.find("> :not(li)").even())},heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=V(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),t.collapsible||!1!==t.active&&null!=t.active||(t.active=0),this._processPanels(),t.active<0&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():V()}},_createIcons:function(){var t,e=this.options.icons;e&&(t=V("<span>"),this._addClass(t,"ui-accordion-header-icon","ui-icon "+e.header),t.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,e.header)._addClass(t,null,e.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){"active"!==t?("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||!1!==this.options.active||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons())):this._activate(e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var e=V.ui.keyCode,i=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case e.RIGHT:case e.DOWN:n=this.headers[(s+1)%i];break;case e.LEFT:case e.UP:n=this.headers[(s-1+i)%i];break;case e.SPACE:case e.ENTER:this._eventHandler(t);break;case e.HOME:n=this.headers[0];break;case e.END:n=this.headers[i-1]}n&&(V(t.target).attr("tabIndex",-1),V(n).attr("tabIndex",0),V(n).trigger("focus"),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===V.ui.keyCode.UP&&t.ctrlKey&&V(t.currentTarget).prev().trigger("focus")},refresh:function(){var t=this.options;this._processPanels(),!1===t.active&&!0===t.collapsible||!this.headers.length?(t.active=!1,this.active=V()):!1===t.active?this._activate(0):this.active.length&&!V.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=V()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;"function"==typeof this.options.header?this.headers=this.options.header(this.element):this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var i,t=this.options,e=t.heightStyle,s=this.element.parent();this.active=this._findActive(t.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var t=V(this),e=t.uniqueId().attr("id"),i=t.next(),s=i.uniqueId().attr("id");t.attr("aria-controls",s),i.attr("aria-labelledby",e)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(t.event),"fill"===e?(i=s.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=V(this).outerHeight(!0)}),this.headers.next().each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.headers.next().each(function(){var t=V(this).is(":visible");t||V(this).show(),i=Math.max(i,V(this).css("height","").height()),t||V(this).hide()}).height(i))},_activate:function(t){t=this._findActive(t)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):V()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():s.next(),r=i.next(),a={oldHeader:i,oldPanel:r,newHeader:o?V():s,newPanel:a};t.preventDefault(),n&&!e.collapsible||!1===this._trigger("beforeActivate",t,a)||(e.active=!o&&this.headers.index(s),this.active=n?V():s,this._toggle(a),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),e.icons&&(i=i.children(".ui-accordion-header-icon"),this._removeClass(i,null,e.icons.activeHeader)._addClass(i,null,e.icons.header)),n||(this._removeClass(s,"ui-accordion-header-collapsed")._addClass(s,"ui-accordion-header-active","ui-state-active"),e.icons&&(n=s.children(".ui-accordion-header-icon"),this._removeClass(n,null,e.icons.header)._addClass(n,null,e.icons.activeHeader)),this._addClass(s.next(),"ui-accordion-content-active")))},_toggle:function(t){var e=t.newPanel,i=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=e,this.prevHide=i,this.options.animate?this._animate(e,i,t):(i.hide(),e.show(),this._toggleComplete(t)),i.attr({"aria-hidden":"true"}),i.prev().attr({"aria-selected":"false","aria-expanded":"false"}),e.length&&i.length?i.prev().attr({tabIndex:-1,"aria-expanded":"false"}):e.length&&this.headers.filter(function(){return 0===parseInt(V(this).attr("tabIndex"),10)}).attr("tabIndex",-1),e.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,i,e){var s,n,o,a=this,r=0,l=t.css("box-sizing"),h=t.length&&(!i.length||t.index()<i.index()),c=this.options.animate||{},u=h&&c.down||c,h=function(){a._toggleComplete(e)};return n=(n="string"==typeof u?u:n)||u.easing||c.easing,o=(o="number"==typeof u?u:o)||u.duration||c.duration,i.length?t.length?(s=t.show().outerHeight(),i.animate(this.hideProps,{duration:o,easing:n,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(this.showProps,{duration:o,easing:n,complete:h,step:function(t,e){e.now=Math.round(t),"height"!==e.prop?"content-box"===l&&(r+=e.now):"content"!==a.options.heightStyle&&(e.now=Math.round(s-i.outerHeight()-r),r=0)}})):i.animate(this.hideProps,o,n,h):t.animate(this.showProps,o,n,h)},_toggleComplete:function(t){var e=t.oldPanel,i=e.prev();this._removeClass(e,"ui-accordion-content-active"),this._removeClass(i,"ui-accordion-header-active")._addClass(i,"ui-accordion-header-collapsed"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}}),V.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=!(i=i||e.body).nodeName?e.body:i},V.widget("ui.menu",{version:"1.13.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=V(t.target),i=V(V.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){V.contains(this.element[0],V.ui.safeActiveElement(this.document[0]))||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){var e,i;this.previousFilter||t.clientX===this.lastMousePosition.x&&t.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:t.clientX,y:t.clientY},e=V(t.target).closest(".ui-menu-item"),i=V(t.currentTarget),e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i))))},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=V(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n=!0;switch(t.keyCode){case V.ui.keyCode.PAGE_UP:this.previousPage(t);break;case V.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case V.ui.keyCode.HOME:this._move("first","first",t);break;case V.ui.keyCode.END:this._move("last","last",t);break;case V.ui.keyCode.UP:this.previous(t);break;case V.ui.keyCode.DOWN:this.next(t);break;case V.ui.keyCode.LEFT:this.collapse(t);break;case V.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case V.ui.keyCode.ENTER:case V.ui.keyCode.SPACE:this._activate(t);break;case V.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=this.previousFilter||"",s=n=!1,i=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),i===e?s=!0:i=e+i,e=this._filterMenuItems(i),(e=s&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(i=String.fromCharCode(t.keyCode),e=this._filterMenuItems(i)),e.length?(this.focus(t,e),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=V(this),e=t.prev(),i=V("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=V(this);s._isDivider(t)&&s._addClass(t,"ui-menu-divider","ui-widget-content")}),i=(e=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(e,"ui-menu-item")._addClass(i,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!V.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){var i;"icons"===t&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s;this._hasScroll()&&(i=parseFloat(V.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(V.css(this.activeMenu[0],"paddingTop"))||0,e=t.offset().top-this.activeMenu.offset().top-i-s,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),t=t.outerHeight(),e<0?this.activeMenu.scrollTop(i+e):s<e+t&&this.activeMenu.scrollTop(i+e-s+t))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=V.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:V(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){(t=t||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!V(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;(s=this.active?"first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=V(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===V.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=V(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||V(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var t=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),e=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return e.test(String.prototype.trim.call(V(this).children(".ui-menu-item-wrapper").text()))})}});V.widget("ui.autocomplete",{version:"1.13.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,t="input"===t;this.isMultiLine=e||!t&&this._isContentEditable(this.element),this.valueMethod=this.element[e||t?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=V.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=V("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().attr({unselectable:"on"}).menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){V(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==V.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=V("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||V.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(V.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=V.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t=t&&this._normalize(t),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:V.map(t,function(t){return"string"==typeof t?{label:t,value:t}:V.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(V.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;V.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return V("<li>").append(V("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),V.extend(V.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(V.ui.autocomplete.escapeRegex(e),"i");return V.grep(t,function(t){return i.test(t.label||t.value||t)})}}),V.widget("ui.autocomplete",V.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(V("<div>").text(e))},100))}});V.ui.autocomplete;var tt=/ui-corner-([a-z]){2,6}/g;V.widget("ui.controlgroup",{version:"1.13.2",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,a=[];V.each(this.options.items,function(s,t){var e,n={};if(t)return"controlgroupLabel"===s?((e=o.element.find(t)).each(function(){var t=V(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(a=a.concat(e.get()))):void(V.fn[s]&&(n=o["_"+s+"Options"]?o["_"+s+"Options"]("middle"):{classes:{}},o.element.find(t).each(function(){var t=V(this),e=t[s]("instance"),i=V.widget.extend({},n);"button"===s&&t.parent(".ui-spinner").length||((e=e||t[s]()[s]("instance"))&&(i.classes=o._resolveClassesValues(i.classes,e)),t[s](i),i=t[s]("widget"),V.data(i[0],"ui-controlgroup-data",e||t[s]("instance")),a.push(i[0]))})))}),this.childWidgets=V(V.uniqueSort(a)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=V(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){e=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,e)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){t=this._buildSimpleOptions(t,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return V.each(i,function(t){var e=s.options.classes[t]||"",e=String.prototype.trim.call(e.replace(tt,""));n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,(n=this.options.onlyVisible?n.filter(":visible"):n).length&&(V.each(["first","last"],function(t,e){var i,s=n[e]().data("ui-controlgroup-data");s&&o["_"+s.widgetName+"Options"]?((i=o["_"+s.widgetName+"Options"](1===n.length?"only":e)).classes=o._resolveClassesValues(i.classes,s),s.element[s.widgetName](i)):o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}});V.widget("ui.checkboxradio",[V.ui.formResetMixin,{version:"1.13.2",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e=this._super()||{};return this._readType(),t=this.element.labels(),this.label=V(t[t.length-1]),this.label.length||V.error("No label found for checkboxradio widget"),this.originalLabel="",(t=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=t.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(e.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(e.disabled=t),e},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||V.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+V.escapeSelector(t)+"']";return t?(this.form.length?V(this.form[0].elements).filter(e):V(e).filter(function(){return 0===V(this)._form().length})).not(this.element):V([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=V(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=V("<span>"),this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),(t=this.iconSpace?t.not(this.iconSpace[0]):t).remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]);var et;V.ui.checkboxradio;V.widget("ui.button",{version:"1.13.2",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===V.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var i="iconPosition"!==t,s=i?this.options.iconPosition:e,t="top"===s||"bottom"===s;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=V("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,e),this._attachIcon(s),t?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=V("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=(void 0===t.showLabel?this.options:t).showLabel,i=(void 0===t.icon?this.options:t).icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!1!==V.uiBackCompat&&(V.widget("ui.button",V.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),V.fn.button=(et=V.fn.button,function(i){var t="string"==typeof i,s=Array.prototype.slice.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t=V(this).attr("type"),e=V.data(this,"ui-"+("checkbox"!==t&&"radio"!==t?"button":"checkboxradio"));return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?V.error("no such method '"+i+"' for button widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:V.error("cannot call methods on button prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=V.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=V(this).attr("type"),e="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",t=V.data(this,"ui-"+e);t?(t.option(i||{}),t._init&&t._init()):"button"!=e?V(this).checkboxradio(V.extend({icon:!1},i)):et.call(V(this),i)})),n}),V.fn.buttonset=function(){return V.ui.controlgroup||V.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var it;V.ui.button;function st(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},V.extend(this._defaults,this.regional[""]),this.regional.en=V.extend(!0,{},this.regional[""]),this.regional["en-US"]=V.extend(!0,{},this.regional.en),this.dpDiv=nt(V("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function nt(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){V(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,ot)}function ot(){V.datepicker._isDisabledDatepicker((it.inline?it.dpDiv.parent():it.input)[0])||(V(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),V(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&V(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&V(this).addClass("ui-datepicker-next-hover"))}function at(t,e){for(var i in V.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}V.extend(V.ui,{datepicker:{version:"1.13.2"}}),V.extend(st.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return at(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s=t.nodeName.toLowerCase(),n="div"===s||"span"===s;t.id||(this.uuid+=1,t.id="dp"+this.uuid),(i=this._newInst(V(t),n)).settings=V.extend({},e||{}),"input"===s?this._connectDatepicker(t,i):n&&this._inlineDatepicker(t,i)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?nt(V("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=V(t);e.append=V([]),e.trigger=V([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),V.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s=this._get(e,"appendText"),n=this._get(e,"isRTL");e.append&&e.append.remove(),s&&(e.append=V("<span>").addClass(this._appendClass).text(s),t[n?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),i=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=V("<img>").addClass(this._triggerClass).attr({src:i,alt:s,title:s}):(e.trigger=V("<button type='button'>").addClass(this._triggerClass),i?e.trigger.html(V("<img>").attr({src:i,alt:s,title:s})):e.trigger.text(s)),t[n?"before":"after"](e.trigger),e.trigger.on("click",function(){return V.datepicker._datepickerShowing&&V.datepicker._lastInput===t[0]?V.datepicker._hideDatepicker():(V.datepicker._datepickerShowing&&V.datepicker._lastInput!==t[0]&&V.datepicker._hideDatepicker(),V.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){var e,i,s,n,o,a;this._get(t,"autoSize")&&!t.inline&&(o=new Date(2009,11,20),(a=this._get(t,"dateFormat")).match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length))},_inlineDatepicker:function(t,e){var i=V(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),V.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))},_dialogDatepicker:function(t,e,i,s,n){var o,a=this._dialogInst;return a||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=V("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),V("body").append(this._dialogInput),(a=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},V.data(this._dialogInput[0],"datepicker",a)),at(a.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(a,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,e=document.documentElement.scrollLeft||document.body.scrollLeft,n=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+e,s/2-150+n]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),V.blockUI&&V.blockUI(this.dpDiv),V.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(t){var e,i=V(t),s=V.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),V.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),it===s&&(it=null,this._curInst=null))},_enableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,s.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i=V(e),s=V.data(e,"datepicker");i.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,s.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=i.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=V.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return V.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?V.extend({},V.datepicker._defaults):o?"all"===e?V.extend({},o.settings):this._get(o,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),o&&(this._curInst===o&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),e=this._getMinMaxDate(o,"min"),i=this._getMinMaxDate(o,"max"),at(o.settings,s),null!==e&&void 0!==s.dateFormat&&void 0===s.minDate&&(o.settings.minDate=this._formatDate(o,e)),null!==i&&void 0!==s.dateFormat&&void 0===s.maxDate&&(o.settings.maxDate=this._formatDate(o,i)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(V(t),o),this._autoSize(o),this._setDate(o,n),this._updateAlternate(o),this._updateDatepicker(o))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){t=this._getInst(t);t&&this._updateDatepicker(t)},_setDateDatepicker:function(t,e){t=this._getInst(t);t&&(this._setDate(t,e),this._updateDatepicker(t),this._updateAlternate(t))},_getDateDatepicker:function(t,e){t=this._getInst(t);return t&&!t.inline&&this._setDateFromField(t,e),t?this._getDate(t):null},_doKeyDown:function(t){var e,i,s=V.datepicker._getInst(t.target),n=!0,o=s.dpDiv.is(".ui-datepicker-rtl");if(s._keyEvent=!0,V.datepicker._datepickerShowing)switch(t.keyCode){case 9:V.datepicker._hideDatepicker(),n=!1;break;case 13:return(i=V("td."+V.datepicker._dayOverClass+":not(."+V.datepicker._currentClass+")",s.dpDiv))[0]&&V.datepicker._selectDay(t.target,s.selectedMonth,s.selectedYear,i[0]),(e=V.datepicker._get(s,"onSelect"))?(i=V.datepicker._formatDate(s),e.apply(s.input?s.input[0]:null,[i,s])):V.datepicker._hideDatepicker(),!1;case 27:V.datepicker._hideDatepicker();break;case 33:V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 34:V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&V.datepicker._clearDate(t.target),n=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&V.datepicker._gotoToday(t.target),n=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?1:-1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?-V.datepicker._get(s,"stepBigMonths"):-V.datepicker._get(s,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,-7,"D"),n=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,o?-1:1,"D"),n=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&V.datepicker._adjustDate(t.target,t.ctrlKey?+V.datepicker._get(s,"stepBigMonths"):+V.datepicker._get(s,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&V.datepicker._adjustDate(t.target,7,"D"),n=t.ctrlKey||t.metaKey;break;default:n=!1}else 36===t.keyCode&&t.ctrlKey?V.datepicker._showDatepicker(this):n=!1;n&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i=V.datepicker._getInst(t.target);if(V.datepicker._get(i,"constrainInput"))return e=V.datepicker._possibleChars(V.datepicker._get(i,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){t=V.datepicker._getInst(t.target);if(t.input.val()!==t.lastVal)try{V.datepicker.parseDate(V.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,V.datepicker._getFormatConfig(t))&&(V.datepicker._setDateFromField(t),V.datepicker._updateAlternate(t),V.datepicker._updateDatepicker(t))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=V("input",t.parentNode)[0]),V.datepicker._isDisabledDatepicker(t)||V.datepicker._lastInput===t||(n=V.datepicker._getInst(t),V.datepicker._curInst&&V.datepicker._curInst!==n&&(V.datepicker._curInst.dpDiv.stop(!0,!0),n&&V.datepicker._datepickerShowing&&V.datepicker._hideDatepicker(V.datepicker._curInst.input[0])),!1!==(i=(s=V.datepicker._get(n,"beforeShow"))?s.apply(t,[t,n]):{})&&(at(n.settings,i),n.lastVal=null,V.datepicker._lastInput=t,V.datepicker._setDateFromField(n),V.datepicker._inDialog&&(t.value=""),V.datepicker._pos||(V.datepicker._pos=V.datepicker._findPos(t),V.datepicker._pos[1]+=t.offsetHeight),e=!1,V(t).parents().each(function(){return!(e|="fixed"===V(this).css("position"))}),s={left:V.datepicker._pos[0],top:V.datepicker._pos[1]},V.datepicker._pos=null,n.dpDiv.empty(),n.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),V.datepicker._updateDatepicker(n),s=V.datepicker._checkOffset(n,s,e),n.dpDiv.css({position:V.datepicker._inDialog&&V.blockUI?"static":e?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),n.inline||(i=V.datepicker._get(n,"showAnim"),s=V.datepicker._get(n,"duration"),n.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(V(t))+1),V.datepicker._datepickerShowing=!0,V.effects&&V.effects.effect[i]?n.dpDiv.show(i,V.datepicker._get(n,"showOptions"),s):n.dpDiv[i||"show"](i?s:null),V.datepicker._shouldFocusInput(n)&&n.input.trigger("focus"),V.datepicker._curInst=n)))},_updateDatepicker:function(t){this.maxRows=4,(it=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=V.datepicker._get(t,"onUpdateDatepicker");0<n.length&&ot.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===V.datepicker._curInst&&V.datepicker._datepickerShowing&&V.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:V(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:V(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?V(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?V(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e=this._getInst(t),i=this._get(e,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||V.expr.pseudos.hidden(t));)t=t[i?"previousSibling":"nextSibling"];return[(e=V(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s=this._curInst;!s||t&&s!==V.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(s,"showAnim"),i=this._get(s,"duration"),t=function(){V.datepicker._tidyDialog(s)},V.effects&&(V.effects.effect[e]||V.effects[e])?s.dpDiv.hide(e,V.datepicker._get(s,"showOptions"),i,t):s.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,t),e||t(),this._datepickerShowing=!1,(t=this._get(s,"onClose"))&&t.apply(s.input?s.input[0]:null,[s.input?s.input.val():"",s]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),V.blockUI&&(V.unblockUI(),V("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){var e;V.datepicker._curInst&&(e=V(t.target),t=V.datepicker._getInst(e[0]),(e[0].id===V.datepicker._mainDivId||0!==e.parents("#"+V.datepicker._mainDivId).length||e.hasClass(V.datepicker.markerClassName)||e.closest("."+V.datepicker._triggerClass).length||!V.datepicker._datepickerShowing||V.datepicker._inDialog&&V.blockUI)&&(!e.hasClass(V.datepicker.markerClassName)||V.datepicker._curInst===t)||V.datepicker._hideDatepicker())},_adjustDate:function(t,e,i){var s=V(t),t=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(t,e,i),this._updateDatepicker(t))},_gotoToday:function(t){var e=V(t),i=this._getInst(e[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(t=new Date,i.selectedDay=t.getDate(),i.drawMonth=i.selectedMonth=t.getMonth(),i.drawYear=i.selectedYear=t.getFullYear()),this._notifyChange(i),this._adjustDate(e)},_selectMonthYear:function(t,e,i){var s=V(t),t=this._getInst(s[0]);t["selected"+("M"===i?"Month":"Year")]=t["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(t),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n=V(t);V(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(n[0])||((n=this._getInst(n[0])).selectedDay=n.currentDay=parseInt(V("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){t=V(t);this._selectDate(t,"")},_selectDate:function(t,e){var i=V(t),t=this._getInst(i[0]);e=null!=e?e:this._formatDate(t),t.input&&t.input.val(e),this._updateAlternate(t),(i=this._get(t,"onSelect"))?i.apply(t.input?t.input[0]:null,[e,t]):t.input&&t.input.trigger("change"),t.inline?this._updateDatepicker(t):(this._hideDatepicker(),this._lastInput=t.input[0],"object"!=typeof t.input[0]&&t.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s=this._get(t,"altField");s&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),t=this.formatDate(e,i,this._getFormatConfig(t)),V(document).find(s).val(t))},noWeekends:function(t){t=t.getDay();return[0<t&&t<6,""]},iso8601Week:function(t){var e=new Date(t.getTime());return e.setDate(e.getDate()+4-(e.getDay()||7)),t=e.getTime(),e.setMonth(0),e.setDate(1),Math.floor(Math.round((t-e)/864e5)/7)+1},parseDate:function(e,n,t){if(null==e||null==n)throw"Invalid arguments";if(""===(n="object"==typeof n?n.toString():n+""))return null;for(var i,s,o,a=0,r=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,r="string"!=typeof r?r:(new Date).getFullYear()%100+parseInt(r,10),l=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,h=(t?t.dayNames:null)||this._defaults.dayNames,c=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,u=(t?t.monthNames:null)||this._defaults.monthNames,d=-1,p=-1,f=-1,g=-1,m=!1,_=function(t){t=w+1<e.length&&e.charAt(w+1)===t;return t&&w++,t},v=function(t){var e=_(t),e="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,e=new RegExp("^\\d{"+("y"===t?e:1)+","+e+"}"),e=n.substring(a).match(e);if(!e)throw"Missing number at position "+a;return a+=e[0].length,parseInt(e[0],10)},b=function(t,e,i){var s=-1,e=V.map(_(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(V.each(e,function(t,e){var i=e[1];if(n.substr(a,i.length).toLowerCase()===i.toLowerCase())return s=e[0],a+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+a},y=function(){if(n.charAt(a)!==e.charAt(w))throw"Unexpected literal at position "+a;a++},w=0;w<e.length;w++)if(m)"'"!==e.charAt(w)||_("'")?y():m=!1;else switch(e.charAt(w)){case"d":f=v("d");break;case"D":b("D",l,h);break;case"o":g=v("o");break;case"m":p=v("m");break;case"M":p=b("M",c,u);break;case"y":d=v("y");break;case"@":d=(o=new Date(v("@"))).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"!":d=(o=new Date((v("!")-this._ticksTo1970)/1e4)).getFullYear(),p=o.getMonth()+1,f=o.getDate();break;case"'":_("'")?y():m=!0;break;default:y()}if(a<n.length&&(s=n.substr(a),!/^\s+/.test(s)))throw"Extra/unparsed characters found in date: "+s;if(-1===d?d=(new Date).getFullYear():d<100&&(d+=(new Date).getFullYear()-(new Date).getFullYear()%100+(d<=r?0:-100)),-1<g)for(p=1,f=g;;){if(f<=(i=this._getDaysInMonth(d,p-1)))break;p++,f-=i}if((o=this._daylightSavingAdjust(new Date(d,p-1,f))).getFullYear()!==d||o.getMonth()+1!==p||o.getDate()!==f)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return"";function s(t,e,i){var s=""+e;if(c(t))for(;s.length<i;)s="0"+s;return s}function n(t,e,i,s){return(c(t)?s:i)[e]}var o,a=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,h=(i?i.monthNames:null)||this._defaults.monthNames,c=function(t){t=o+1<e.length&&e.charAt(o+1)===t;return t&&o++,t},u="",d=!1;if(t)for(o=0;o<e.length;o++)if(d)"'"!==e.charAt(o)||c("'")?u+=e.charAt(o):d=!1;else switch(e.charAt(o)){case"d":u+=s("d",t.getDate(),2);break;case"D":u+=n("D",t.getDay(),a,r);break;case"o":u+=s("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=s("m",t.getMonth()+1,2);break;case"M":u+=n("M",t.getMonth(),l,h);break;case"y":u+=c("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":c("'")?u+="'":d=!0;break;default:u+=e.charAt(o)}return u},_possibleChars:function(e){for(var t="",i=!1,s=function(t){t=n+1<e.length&&e.charAt(n+1)===t;return t&&n++,t},n=0;n<e.length;n++)if(i)"'"!==e.charAt(n)||s("'")?t+=e.charAt(n):i=!1;else switch(e.charAt(n)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":s("'")?t+="'":i=!0;break;default:t+=e.charAt(n)}return t},_get:function(t,e){return(void 0!==t.settings[e]?t.settings:this._defaults)[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s,t=null==t||""===t?e:"string"==typeof t?function(t){try{return V.datepicker.parseDate(V.datepicker._get(r,"dateFormat"),t,V.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?V.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,V.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(t=t&&"Invalid Date"===t.toString()?e:t)&&(t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)),this._daylightSavingAdjust(t)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,e=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=e.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=e.getMonth(),t.drawYear=t.selectedYear=t.currentYear=e.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){V.datepicker._adjustDate(i,-e,"M")},next:function(){V.datepicker._adjustDate(i,+e,"M")},hide:function(){V.datepicker._hideDatepicker()},today:function(){V.datepicker._gotoToday(i)},selectDay:function(){return V.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return V.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return V.datepicker._selectMonthYear(i,this,"Y"),!1}};V(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,x,k,C,D,I,T,P,M,S,H,z,A=new Date,O=this._daylightSavingAdjust(new Date(A.getFullYear(),A.getMonth(),A.getDate())),N=this._get(t,"isRTL"),E=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),F=this._get(t,"navigationAsDateFormat"),L=this._getNumberOfMonths(t),R=this._get(t,"showCurrentAtPos"),A=this._get(t,"stepMonths"),Y=1!==L[0]||1!==L[1],B=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),j=this._getMinMaxDate(t,"min"),q=this._getMinMaxDate(t,"max"),K=t.drawMonth-R,U=t.drawYear;if(K<0&&(K+=12,U--),q)for(e=this._daylightSavingAdjust(new Date(q.getFullYear(),q.getMonth()-L[0]*L[1]+1,q.getDate())),e=j&&e<j?j:e;this._daylightSavingAdjust(new Date(U,K,1))>e;)--K<0&&(K=11,U--);for(t.drawMonth=K,t.drawYear=U,R=this._get(t,"prevText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K-A,1)),this._getFormatConfig(t)):R,i=this._canAdjustMonth(t,-1,U,K)?V("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"e":"w")).text(R))[0].outerHTML,R=this._get(t,"nextText"),R=F?this.formatDate(R,this._daylightSavingAdjust(new Date(U,K+A,1)),this._getFormatConfig(t)):R,s=this._canAdjustMonth(t,1,U,K)?V("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:R}).append(V("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML:W?"":V("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:R}).append(V("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(N?"w":"e")).text(R))[0].outerHTML,A=this._get(t,"currentText"),W=this._get(t,"gotoCurrent")&&t.currentDay?B:O,A=F?this.formatDate(A,W,this._getFormatConfig(t)):A,R="",t.inline||(R=V("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),F="",E&&(F=V("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(N?R:"").append(this._isInRange(t,W)?V("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(A):"").append(N?"":R)[0].outerHTML),n=parseInt(this._get(t,"firstDay"),10),n=isNaN(n)?0:n,o=this._get(t,"showWeek"),a=this._get(t,"dayNames"),r=this._get(t,"dayNamesMin"),l=this._get(t,"monthNames"),h=this._get(t,"monthNamesShort"),c=this._get(t,"beforeShowDay"),u=this._get(t,"showOtherMonths"),d=this._get(t,"selectOtherMonths"),p=this._getDefaultDate(t),f="",m=0;m<L[0];m++){for(_="",this.maxRows=4,v=0;v<L[1];v++){if(b=this._daylightSavingAdjust(new Date(U,K,t.selectedDay)),y=" ui-corner-all",w="",Y){if(w+="<div class='ui-datepicker-group",1<L[1])switch(v){case 0:w+=" ui-datepicker-group-first",y=" ui-corner-"+(N?"right":"left");break;case L[1]-1:w+=" ui-datepicker-group-last",y=" ui-corner-"+(N?"left":"right");break;default:w+=" ui-datepicker-group-middle",y=""}w+="'>"}for(w+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+y+"'>"+(/all|left/.test(y)&&0===m?N?s:i:"")+(/all|right/.test(y)&&0===m?N?i:s:"")+this._generateMonthYearHeader(t,K,U,j,q,0<m||0<v,l,h)+"</div><table class='ui-datepicker-calendar'><thead><tr>",x=o?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",g=0;g<7;g++)x+="<th scope='col'"+(5<=(g+n+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+a[k=(g+n)%7]+"'>"+r[k]+"</span></th>";for(w+=x+"</tr></thead><tbody>",D=this._getDaysInMonth(U,K),U===t.selectedYear&&K===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,D)),C=(this._getFirstDayOfMonth(U,K)-n+7)%7,D=Math.ceil((C+D)/7),I=Y&&this.maxRows>D?this.maxRows:D,this.maxRows=I,T=this._daylightSavingAdjust(new Date(U,K,1-C)),P=0;P<I;P++){for(w+="<tr>",M=o?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(T)+"</td>":"",g=0;g<7;g++)S=c?c.apply(t.input?t.input[0]:null,[T]):[!0,""],z=(H=T.getMonth()!==K)&&!d||!S[0]||j&&T<j||q&&q<T,M+="<td class='"+(5<=(g+n+6)%7?" ui-datepicker-week-end":"")+(H?" ui-datepicker-other-month":"")+(T.getTime()===b.getTime()&&K===t.selectedMonth&&t._keyEvent||p.getTime()===T.getTime()&&p.getTime()===b.getTime()?" "+this._dayOverClass:"")+(z?" "+this._unselectableClass+" ui-state-disabled":"")+(H&&!u?"":" "+S[1]+(T.getTime()===B.getTime()?" "+this._currentClass:"")+(T.getTime()===O.getTime()?" ui-datepicker-today":""))+"'"+(H&&!u||!S[2]?"":" title='"+S[2].replace(/'/g,"'")+"'")+(z?"":" data-handler='selectDay' data-event='click' data-month='"+T.getMonth()+"' data-year='"+T.getFullYear()+"'")+">"+(H&&!u?" ":z?"<span class='ui-state-default'>"+T.getDate()+"</span>":"<a class='ui-state-default"+(T.getTime()===O.getTime()?" ui-state-highlight":"")+(T.getTime()===B.getTime()?" ui-state-active":"")+(H?" ui-priority-secondary":"")+"' href='#' aria-current='"+(T.getTime()===B.getTime()?"true":"false")+"' data-date='"+T.getDate()+"'>"+T.getDate()+"</a>")+"</td>",T.setDate(T.getDate()+1),T=this._daylightSavingAdjust(T);w+=M+"</tr>"}11<++K&&(K=0,U++),_+=w+="</tbody></table>"+(Y?"</div>"+(0<L[0]&&v===L[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}f+=_}return f+=F,t._keyEvent=!1,f},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f=this._get(t,"changeMonth"),g=this._get(t,"changeYear"),m=this._get(t,"showMonthAfterYear"),_=this._get(t,"selectMonthLabel"),v=this._get(t,"selectYearLabel"),b="<div class='ui-datepicker-title'>",y="";if(o||!f)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' aria-label='"+_+"' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!l||c>=s.getMonth())&&(!h||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(m||(b+=y+(!o&&f&&g?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!g)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(a=this._get(t,"yearRange").split(":"),u=(new Date).getFullYear(),d=(_=function(t){t=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?u+parseInt(t,10):parseInt(t,10);return isNaN(t)?u:t})(a[0]),p=Math.max(d,_(a[1]||"")),d=s?Math.max(d,s.getFullYear()):d,p=n?Math.min(p,n.getFullYear()):p,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+v+"' data-handler='selectYear' data-event='change'>";d<=p;d++)t.yearshtml+="<option value='"+d+"'"+(d===i?" selected='selected'":"")+">"+d+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),m&&(b+=(!o&&f&&g?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),e=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),e=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,e)));t.selectedDay=e.getDate(),t.drawMonth=t.selectedMonth=e.getMonth(),t.drawYear=t.selectedYear=e.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),t=this._getMinMaxDate(t,"max"),e=i&&e<i?i:e;return t&&t<e?t:e},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){t=this._get(t,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),n=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(t,n)},_isInRange:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=null,o=null,a=this._get(t,"yearRange");return a&&(t=a.split(":"),a=(new Date).getFullYear(),n=parseInt(t[0],10),o=parseInt(t[1],10),t[0].match(/[+\-].*/)&&(n+=a),t[1].match(/[+\-].*/)&&(o+=a)),(!i||e.getTime()>=i.getTime())&&(!s||e.getTime()<=s.getTime())&&(!n||e.getFullYear()>=n)&&(!o||e.getFullYear()<=o)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);e=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),e,this._getFormatConfig(t))}}),V.fn.datepicker=function(t){if(!this.length)return this;V.datepicker.initialized||(V(document).on("mousedown",V.datepicker._checkExternalClick),V.datepicker.initialized=!0),0===V("#"+V.datepicker._mainDivId).length&&V("body").append(V.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"==typeof t&&("isDisabled"===t||"getDate"===t||"widget"===t)||"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?V.datepicker["_"+t+"Datepicker"].apply(V.datepicker,[this].concat(e)):V.datepicker._attachDatepicker(this,t)})},V.datepicker=new st,V.datepicker.initialized=!1,V.datepicker.uuid=(new Date).getTime(),V.datepicker.version="1.13.2";V.datepicker,V.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var rt=!1;V(document).on("mouseup",function(){rt=!1});V.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===V.data(t.target,e.widgetName+".preventClickEvent"))return V.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!rt){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s=!("string"!=typeof this.options.cancel||!t.target.nodeName)&&V(t.target).closest(this.options.cancel).length;return i&&!s&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===V.data(t.target,this.widgetName+".preventClickEvent")&&V.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),rt=!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(V.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&V.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,rt=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),V.ui.plugin={add:function(t,e,i){var s,n=V.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},V.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&V(t).trigger("blur")};V.widget("ui.draggable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<V(t.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(t),!!this.handle&&(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),!0))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=V(this);return V("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=V.ui.safeActiveElement(this.document[0]);V(t.target).closest(e).length||V.ui.safeBlur(e)},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),V.ui.ddmanager&&(V.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===V(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),V.ui.ddmanager&&!e.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),V.ui.ddmanager&&V.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){e=this._uiHash();if(!1===this._trigger("drag",t,e))return this._mouseUp(new V.Event("mouseup",t)),!1;this.position=e.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return V.ui.ddmanager&&!this.options.dropBehaviour&&(i=V.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?V(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),V.ui.ddmanager&&V.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),V.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new V.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!V(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,t=i?V(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return t.parents("body").length||t.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&t[0]===this.element[0]&&this._setPositionRelative(),t[0]===this.element[0]||/(fixed|absolute)/.test(t.css("position"))||t.css("position","absolute"),t},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this._isRootNode(this.offsetParent[0])?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,n=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=V(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,V(n).width()-this.helperProportions.width-this.margins.left,(V(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[V(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,V(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,V(window).scrollLeft()+V(window).width()-this.helperProportions.width-this.margins.left,V(window).scrollTop()+(V(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,t=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:t?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:t?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s=this.options,n=this._isRootNode(this.scrollParent[0]),o=t.pageX,a=t.pageY;return n&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(i=this.relativeContainer.offset(),[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(o=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(a=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(o=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(a=i[3]+this.offset.click.top)),s.grid&&(t=s.grid[1]?this.originalPageY+Math.round((a-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,a=!i||t-this.offset.click.top>=i[1]||t-this.offset.click.top>i[3]?t:t-this.offset.click.top>=i[1]?t-s.grid[1]:t+s.grid[1],t=s.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,o=!i||t-this.offset.click.left>=i[0]||t-this.offset.click.left>i[2]?t:t-this.offset.click.left>=i[0]?t-s.grid[0]:t+s.grid[0]),"y"===s.axis&&(o=this.originalPageX),"x"===s.axis&&(a=this.originalPageY)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:n?0:this.offset.scroll.top),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:n?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),V.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),V.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),V.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=V.extend({},t,{item:i.element});i.sortables=[],V(i.options.connectToSortable).each(function(){var t=V(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=V.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,V.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){V.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,V.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,t=this!==e&&this._intersectsWith(this.containerCache)&&V.contains(e.element[0],this.element[0])?!1:t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,V.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,V.each(n.sortables,function(){this.refreshPositions()}))})}}),V.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=V("body"),i=i.options;s.css("cursor")&&(i._cursor=s.css("cursor")),s.css("cursor",i.cursor)},stop:function(t,e,i){i=i.options;i._cursor&&V("body").css("cursor",i._cursor)}}),V.ui.plugin.add("draggable","opacity",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("opacity")&&(i._opacity=e.css("opacity")),e.css("opacity",i.opacity)},stop:function(t,e,i){i=i.options;i._opacity&&V(e.helper).css("opacity",i._opacity)}}),V.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-V(a).scrollTop()<s.scrollSensitivity?n=V(a).scrollTop(V(a).scrollTop()-s.scrollSpeed):V(window).height()-(t.pageY-V(a).scrollTop())<s.scrollSensitivity&&(n=V(a).scrollTop(V(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-V(a).scrollLeft()<s.scrollSensitivity?n=V(a).scrollLeft(V(a).scrollLeft()-s.scrollSpeed):V(window).width()-(t.pageX-V(a).scrollLeft())<s.scrollSensitivity&&(n=V(a).scrollLeft(V(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&V.ui.ddmanager&&!s.dropBehaviour&&V.ui.ddmanager.prepareOffsets(i,t)}}),V.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],V(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=V(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){for(var s,n,o,a,r,l,h,c,u,d=i.options,p=d.snapTolerance,f=e.offset.left,g=f+i.helperProportions.width,m=e.offset.top,_=m+i.helperProportions.height,v=i.snapElements.length-1;0<=v;v--)l=(r=i.snapElements[v].left-i.margins.left)+i.snapElements[v].width,c=(h=i.snapElements[v].top-i.margins.top)+i.snapElements[v].height,g<r-p||l+p<f||_<h-p||c+p<m||!V.contains(i.snapElements[v].item.ownerDocument,i.snapElements[v].item)?(i.snapElements[v].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=!1):("inner"!==d.snapMode&&(s=Math.abs(h-_)<=p,n=Math.abs(c-m)<=p,o=Math.abs(r-g)<=p,a=Math.abs(l-f)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),u=s||n||o||a,"outer"!==d.snapMode&&(s=Math.abs(h-m)<=p,n=Math.abs(c-_)<=p,o=Math.abs(r-f)<=p,a=Math.abs(l-g)<=p,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:c-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[v].snapping&&(s||n||o||a||u)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,V.extend(i._uiHash(),{snapItem:i.snapElements[v].item})),i.snapElements[v].snapping=s||n||o||a||u)}}),V.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,i=i.options,i=V.makeArray(V(i.stack)).sort(function(t,e){return(parseInt(V(t).css("zIndex"),10)||0)-(parseInt(V(e).css("zIndex"),10)||0)});i.length&&(s=parseInt(V(i[0]).css("zIndex"),10)||0,V(i).each(function(t){V(this).css("zIndex",s+t)}),this.css("zIndex",s+i.length))}}),V.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){e=V(e.helper),i=i.options;e.css("zIndex")&&(i._zIndex=e.css("zIndex")),e.css("zIndex",i.zIndex)},stop:function(t,e,i){i=i.options;i._zIndex&&V(e.helper).css("zIndex",i._zIndex)}});V.ui.draggable;V.widget("ui.resizable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){if("hidden"===V(t).css("overflow"))return!1;var i=e&&"left"===e?"scrollLeft":"scrollTop",e=!1;if(0<t[i])return!0;try{t[i]=1,e=0<t[i],t[i]=0}catch(t){}return e},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),V.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(V("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&V(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){V(t).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(V(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=V(),this._addedHandles=V(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=V("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=V(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=V(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=V(this.handles[e])[0])!==t.target&&!V.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=V(s.containment).scrollLeft()||0,i+=V(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=V(".ui-resizable-"+this.axis).css("cursor"),V("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),V.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(V.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),V("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),s<n.maxWidth&&(n.maxWidth=s),t<n.maxHeight&&(n.maxHeight=t)),this._vBoundaries=n},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&i&&(t.top=l-e.minHeight),n&&i&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||V("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return V.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return V.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){V.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),V.ui.plugin.add("resizable","animate",{stop:function(e){var i=V(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,n={width:i.size.width-a,height:i.size.height-o},a=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(V.extend(n,o&&a?{top:o,left:a}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&V(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),V.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=V(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,a=o instanceof V?o.get(0):/parent/.test(o)?e.parent().get(0):o;a&&(n.containerElement=V(a),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:V(document),left:0,top:0,width:V(document).width(),height:V(document).height()||document.body.parentNode.scrollHeight}):(i=V(a),s=[],V(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(a,"left")?a.scrollWidth:o,e=n._hasScroll(a)?a.scrollHeight:e,n.parentData={element:a,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=V(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,a={top:0,left:0},r=e.containerElement,t=!0;r[0]!==document&&/static/.test(r.css("position"))&&(a=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-a.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0),i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-a.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-a.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=V(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=V(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&V(this).css({left:a.left-s.left-i.left,width:r,height:o})}}),V.ui.plugin.add("resizable","alsoResize",{start:function(){var t=V(this).resizable("instance").options;V(t.alsoResize).each(function(){var t=V(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=V(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};V(s.alsoResize).each(function(){var t=V(this),s=V(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];V.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){V(this).removeData("ui-resizable-alsoresize")}}),V.ui.plugin.add("resizable","ghost",{start:function(){var t=V(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==V.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=V(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=V(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),V.ui.plugin.add("resizable","grid",{resize:function(){var t,e=V(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,c=Math.round((s.width-n.width)/l)*l,u=Math.round((s.height-n.height)/h)*h,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<p,m=i.minWidth&&i.minWidth>d,s=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=l),s&&(p+=h),f&&(d-=l),g&&(p-=h),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):((p-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<p-h?(e.size.height=p,e.position.top=o.top-u):(p=h-t.height,e.size.height=p,e.position.top=o.top+n.height-p),0<d-l?(e.size.width=d,e.position.left=o.left-c):(d=l-t.width,e.size.width=d,e.position.left=o.left+n.width-d))}});V.ui.resizable;V.widget("ui.dialog",{version:"1.13.2",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=V(this).css(t).offset().top;e<0&&V(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&V.fn.draggable&&this._makeDraggable(),this.options.resizable&&V.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?V(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:V.noop,enable:V.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||V.ui.safeBlur(V.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+V(this).css("z-index")}).get(),s=Math.max.apply(null,s);return s>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",s+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=V(V.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;(t=!(t=!(t=!(t=!(t=t||this.element.find("[autofocus]")).length?this.element.find(":tabbable"):t).length?this.uiDialogButtonPane.find(":tabbable"):t).length?this.uiDialogTitlebarClose.filter(":tabbable"):t).length?this.uiDialog:t).eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=V.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===t||V.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus(),this._delay(this._restoreTabbableFocus)},_createWrapper:function(){this.uiDialog=V("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===V.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);var e,i,s;t.keyCode!==V.ui.keyCode.TAB||t.isDefaultPrevented()||(e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last(),t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault()))},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=V("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){V(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=V("<button type='button'></button>").button({label:V("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),t=V("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=V("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=V("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var s=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),V.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(V.each(t,function(t,e){var i;e=V.extend({type:"button"},e="function"==typeof e?{click:e,text:t}:e),i=e.click,t={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,V("<button></button>",e).button(t).appendTo(s.uiButtonSet).on("click",function(){i.apply(s.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(V(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(V(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var n=this,o=this.options,t=o.resizable,e=this.uiDialog.css("position"),t="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function a(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:t,start:function(t,e){n._addClass(V(this),"ui-dialog-resizing"),n._blockFrames(),n._trigger("resizeStart",t,a(e))},resize:function(t,e){n._trigger("resize",t,a(e))},stop:function(t,e){var i=n.uiDialog.offset(),s=i.left-n.document.scrollLeft(),i=i.top-n.document.scrollTop();o.height=n.uiDialog.height(),o.width=n.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=i?"+":"")+i,of:n.window},n._removeClass(V(this),"ui-dialog-resizing"),n._unblockFrames(),n._trigger("resizeStop",t,a(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=V(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=V.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||this.document.data("ui-dialog-instances",t=[]),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};V.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:V("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=s.is(":data(ui-draggable)"))&&!e&&s.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((i=s.is(":data(ui-resizable)"))&&!e&&s.resizable("destroy"),i&&"string"==typeof e&&s.resizable("option","handles",e),i||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=V(this);return V("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!V(t.target).closest(".ui-dialog").length||!!V(t.target).closest(".ui-datepicker").length},_createOverlay:function(){var i,s;this.options.modal&&(i=V.fn.jquery.substring(0,4),s=!0,this._delay(function(){s=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){var e;s||((e=this._trackingInstances()[0])._allowInteraction(t)||(t.preventDefault(),e._focusTabbable(),"3.4."!==i&&"3.5."!==i||e._delay(e._restoreTabbableFocus)))}.bind(this)),this.overlay=V("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1))},_destroyOverlay:function(){var t;this.options.modal&&this.overlay&&((t=this.document.data("ui-dialog-overlays")-1)?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null)}}),!1!==V.uiBackCompat&&V.widget("ui.dialog",V.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}});V.ui.dialog;function lt(t,e,i){return e<=t&&t<e+i}V.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept="function"==typeof i?i:function(t){return t.is(i)},this.proportions=function(){if(!arguments.length)return t=t||{width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};t=arguments[0]},this._addToManager(e.scope),e.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){V.ui.ddmanager.droppables[t]=V.ui.ddmanager.droppables[t]||[],V.ui.ddmanager.droppables[t].push(this)},_splice:function(t){for(var e=0;e<t.length;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var t=V.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,e){var i;"accept"===t?this.accept="function"==typeof e?e:function(t){return t.is(e)}:"scope"===t&&(i=V.ui.ddmanager.droppables[this.options.scope],this._splice(i),this._addToManager(e)),this._super(t,e)},_activate:function(t){var e=V.ui.ddmanager.current;this._addActiveClass(),e&&this._trigger("activate",t,this.ui(e))},_deactivate:function(t){var e=V.ui.ddmanager.current;this._removeActiveClass(),e&&this._trigger("deactivate",t,this.ui(e))},_over:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(e)))},_out:function(t){var e=V.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(e)))},_drop:function(e,t){var i=t||V.ui.ddmanager.current,s=!1;return!(!i||(i.currentItem||i.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=V(this).droppable("instance");if(t.options.greedy&&!t.options.disabled&&t.options.scope===i.options.scope&&t.accept.call(t.element[0],i.currentItem||i.element)&&V.ui.intersect(i,V.extend(t,{offset:t.element.offset()}),t.options.tolerance,e))return!(s=!0)}),!s&&(!!this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(i)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}}),V.ui.intersect=function(t,e,i,s){if(!e.offset)return!1;var n=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,a=n+t.helperProportions.width,r=o+t.helperProportions.height,l=e.offset.left,h=e.offset.top,c=l+e.proportions().width,u=h+e.proportions().height;switch(i){case"fit":return l<=n&&a<=c&&h<=o&&r<=u;case"intersect":return l<n+t.helperProportions.width/2&&a-t.helperProportions.width/2<c&&h<o+t.helperProportions.height/2&&r-t.helperProportions.height/2<u;case"pointer":return lt(s.pageY,h,e.proportions().height)&<(s.pageX,l,e.proportions().width);case"touch":return(h<=o&&o<=u||h<=r&&r<=u||o<h&&u<r)&&(l<=n&&n<=c||l<=a&&a<=c||n<l&&c<a);default:return!1}},!(V.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(t,e){var i,s,n=V.ui.ddmanager.droppables[t.options.scope]||[],o=e?e.type:null,a=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();t:for(i=0;i<n.length;i++)if(!(n[i].options.disabled||t&&!n[i].accept.call(n[i].element[0],t.currentItem||t.element))){for(s=0;s<a.length;s++)if(a[s]===n[i].element[0]){n[i].proportions().height=0;continue t}n[i].visible="none"!==n[i].element.css("display"),n[i].visible&&("mousedown"===o&&n[i]._activate.call(n[i],e),n[i].offset=n[i].element.offset(),n[i].proportions({width:n[i].element[0].offsetWidth,height:n[i].element[0].offsetHeight}))}},drop:function(t,e){var i=!1;return V.each((V.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&V.ui.intersect(t,this,this.options.tolerance,e)&&(i=this._drop.call(this,e)||i),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,e)))}),i},dragStart:function(t,e){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)})},drag:function(n,o){n.options.refreshPositions&&V.ui.ddmanager.prepareOffsets(n,o),V.each(V.ui.ddmanager.droppables[n.options.scope]||[],function(){var t,e,i,s;this.options.disabled||this.greedyChild||!this.visible||(s=!(i=V.ui.intersect(n,this,this.options.tolerance,o))&&this.isover?"isout":i&&!this.isover?"isover":null)&&(this.options.greedy&&(e=this.options.scope,(i=this.element.parents(":data(ui-droppable)").filter(function(){return V(this).droppable("instance").options.scope===e})).length&&((t=V(i[0]).droppable("instance")).greedyChild="isover"===s)),t&&"isover"===s&&(t.isover=!1,t.isout=!0,t._out.call(t,o)),this[s]=!0,this["isout"===s?"isover":"isout"]=!1,this["isover"===s?"_over":"_out"].call(this,o),t&&"isout"===s&&(t.isout=!1,t.isover=!0,t._over.call(t,o)))})},dragStop:function(t,e){t.element.parentsUntil("body").off("scroll.droppable"),t.options.refreshPositions||V.ui.ddmanager.prepareOffsets(t,e)}})!==V.uiBackCompat&&V.widget("ui.droppable",V.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});V.ui.droppable,V.widget("ui.progressbar",{version:"1.13.2",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=V("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){if(void 0===t)return this.options.value;this.options.value=this._constrainedValue(t),this._refreshValue()},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=!1===t,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).width(e.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,t===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=V("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),V.widget("ui.selectable",V.ui.mouse,{version:"1.13.2",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var i=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){i.elementPos=V(i.element[0]).offset(),i.selectees=V(i.options.filter,i.element[0]),i._addClass(i.selectees,"ui-selectee"),i.selectees.each(function(){var t=V(this),e=t.offset(),e={left:e.left-i.elementPos.left,top:e.top-i.elementPos.top};V.data(this,"selectable-item",{element:this,$element:t,left:e.left,top:e.top,right:e.left+t.outerWidth(),bottom:e.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=V("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(i){var s=this,t=this.options;this.opos=[i.pageX,i.pageY],this.elementPos=V(this.element[0]).offset(),this.options.disabled||(this.selectees=V(t.filter,this.element[0]),this._trigger("start",i),V(t.appendTo).append(this.helper),this.helper.css({left:i.pageX,top:i.pageY,width:0,height:0}),t.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var t=V.data(this,"selectable-item");t.startselected=!0,i.metaKey||i.ctrlKey||(s._removeClass(t.$element,"ui-selected"),t.selected=!1,s._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,s._trigger("unselecting",i,{unselecting:t.element}))}),V(i.target).parents().addBack().each(function(){var t,e=V.data(this,"selectable-item");if(e)return t=!i.metaKey&&!i.ctrlKey||!e.$element.hasClass("ui-selected"),s._removeClass(e.$element,t?"ui-unselecting":"ui-selected")._addClass(e.$element,t?"ui-selecting":"ui-unselecting"),e.unselecting=!t,e.selecting=t,(e.selected=t)?s._trigger("selecting",i,{selecting:e.element}):s._trigger("unselecting",i,{unselecting:e.element}),!1}))},_mouseDrag:function(s){if(this.dragged=!0,!this.options.disabled){var t,n=this,o=this.options,a=this.opos[0],r=this.opos[1],l=s.pageX,h=s.pageY;return l<a&&(t=l,l=a,a=t),h<r&&(t=h,h=r,r=t),this.helper.css({left:a,top:r,width:l-a,height:h-r}),this.selectees.each(function(){var t=V.data(this,"selectable-item"),e=!1,i={};t&&t.element!==n.element[0]&&(i.left=t.left+n.elementPos.left,i.right=t.right+n.elementPos.left,i.top=t.top+n.elementPos.top,i.bottom=t.bottom+n.elementPos.top,"touch"===o.tolerance?e=!(i.left>l||i.right<a||i.top>h||i.bottom<r):"fit"===o.tolerance&&(e=i.left>a&&i.right<l&&i.top>r&&i.bottom<h),e?(t.selected&&(n._removeClass(t.$element,"ui-selected"),t.selected=!1),t.unselecting&&(n._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1),t.selecting||(n._addClass(t.$element,"ui-selecting"),t.selecting=!0,n._trigger("selecting",s,{selecting:t.element}))):(t.selecting&&((s.metaKey||s.ctrlKey)&&t.startselected?(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,n._addClass(t.$element,"ui-selected"),t.selected=!0):(n._removeClass(t.$element,"ui-selecting"),t.selecting=!1,t.startselected&&(n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0),n._trigger("unselecting",s,{unselecting:t.element}))),t.selected&&(s.metaKey||s.ctrlKey||t.startselected||(n._removeClass(t.$element,"ui-selected"),t.selected=!1,n._addClass(t.$element,"ui-unselecting"),t.unselecting=!0,n._trigger("unselecting",s,{unselecting:t.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,V(".ui-unselecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-unselecting"),t.unselecting=!1,t.startselected=!1,i._trigger("unselected",e,{unselected:t.element})}),V(".ui-selecting",this.element[0]).each(function(){var t=V.data(this,"selectable-item");i._removeClass(t.$element,"ui-selecting")._addClass(t.$element,"ui-selected"),t.selecting=!1,t.selected=!0,t.startselected=!0,i._trigger("selected",e,{selected:t.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),V.widget("ui.selectmenu",[V.ui.formResetMixin,{version:"1.13.2",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var t=this.element.uniqueId().attr("id");this.ids={element:t,button:t+"-button",menu:t+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=V()},_drawButton:function(){var t,e=this,i=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(t){this.button.trigger("focus"),t.preventDefault()}}),this.element.hide(),this.button=V("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),t=V("<span>").appendTo(this.button),this._addClass(t,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(i).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){e._rendered||e._refreshMenu()})},_drawMenu:function(){var i=this;this.menu=V("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=V("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(t,e){t.preventDefault(),i._setSelection(),i._select(e.item.data("ui-selectmenu-item"),t)},focus:function(t,e){e=e.item.data("ui-selectmenu-item");null!=i.focusIndex&&e.index!==i.focusIndex&&(i._trigger("focus",t,{item:e}),i.isOpen||i._select(e,t)),i.focusIndex=e.index,i.button.attr("aria-activedescendant",i.menuItems.eq(e.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(t=this._getSelectedItem(),this.menuInstance.focus(null,t),this._setAria(t.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(t){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",t)))},_position:function(){this.menuWrap.position(V.extend({of:this.button},this.options.position))},close:function(t){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",t))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(t){var e=V("<span>");return this._setText(e,t.label),this._addClass(e,"ui-selectmenu-text"),e},_renderMenu:function(s,t){var n=this,o="";V.each(t,function(t,e){var i;e.optgroup!==o&&(i=V("<li>",{text:e.optgroup}),n._addClass(i,"ui-selectmenu-optgroup","ui-menu-divider"+(e.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),i.appendTo(s),o=e.optgroup),n._renderItemData(s,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-selectmenu-item",e)},_renderItem:function(t,e){var i=V("<li>"),s=V("<div>",{title:e.element.attr("title")});return e.disabled&&this._addClass(i,null,"ui-state-disabled"),this._setText(s,e.label),i.append(s).appendTo(t)},_setText:function(t,e){e?t.text(e):t.html(" ")},_move:function(t,e){var i,s=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex).parent("li"):(i=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),s+=":not(.ui-state-disabled)"),(s="first"===t||"last"===t?i["first"===t?"prevAll":"nextAll"](s).eq(-1):i[t+"All"](s).eq(0)).length&&this.menuInstance.focus(e,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(t){this[this.isOpen?"close":"open"](t)},_setSelection:function(){var t;this.range&&(window.getSelection?((t=window.getSelection()).removeAllRanges(),t.addRange(this.range)):this.range.select(),this.button.trigger("focus"))},_documentClick:{mousedown:function(t){this.isOpen&&(V(t.target).closest(".ui-selectmenu-menu, #"+V.escapeSelector(this.ids.button)).length||this.close(t))}},_buttonEvents:{mousedown:function(){var t;window.getSelection?(t=window.getSelection()).rangeCount&&(this.range=t.getRangeAt(0)):this.range=document.selection.createRange()},click:function(t){this._setSelection(),this._toggle(t)},keydown:function(t){var e=!0;switch(t.keyCode){case V.ui.keyCode.TAB:case V.ui.keyCode.ESCAPE:this.close(t),e=!1;break;case V.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case V.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case V.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case V.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case V.ui.keyCode.LEFT:this._move("prev",t);break;case V.ui.keyCode.RIGHT:this._move("next",t);break;case V.ui.keyCode.HOME:case V.ui.keyCode.PAGE_UP:this._move("first",t);break;case V.ui.keyCode.END:case V.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),e=!1}e&&t.preventDefault()}},_selectFocusedItem:function(t){var e=this.menuItems.eq(this.focusIndex).parent("li");e.hasClass("ui-state-disabled")||this._select(e.data("ui-selectmenu-item"),t)},_select:function(t,e){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=t.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(t)),this._setAria(t),this._trigger("select",e,{item:t}),t.index!==i&&this._trigger("change",e,{item:t}),this.close(e)},_setAria:function(t){t=this.menuItems.eq(t.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(t,e){var i;"icons"===t&&(i=this.button.find("span.ui-icon"),this._removeClass(i,null,this.options.icons.button)._addClass(i,null,e.button)),this._super(t,e),"appendTo"===t&&this.menuWrap.appendTo(this._appendTo()),"width"===t&&this._resizeButton()},_setOptionDisabled:function(t){this._super(t),this.menuInstance.option("disabled",t),this.button.attr("aria-disabled",t),this._toggleClass(this.button,null,"ui-state-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var t=this.options.appendTo;return t=!(t=!(t=t&&(t.jquery||t.nodeType?V(t):this.document.find(t).eq(0)))||!t[0]?this.element.closest(".ui-front, dialog"):t).length?this.document[0].body:t},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var t=this.options.width;!1!==t?(null===t&&(t=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(t)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var t=this._super();return t.disabled=this.element.prop("disabled"),t},_parseOptions:function(t){var i=this,s=[];t.each(function(t,e){e.hidden||s.push(i._parseOption(V(e),t))}),this.items=s},_parseOption:function(t,e){var i=t.parent("optgroup");return{element:t,index:e,value:t.val(),label:t.text(),optgroup:i.attr("label")||"",disabled:i.prop("disabled")||t.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),V.widget("ui.slider",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e=this.options,i=this.element.find(".ui-slider-handle"),s=[],n=e.values&&e.values.length||1;for(i.length>n&&(i.slice(n).remove(),i=i.slice(0,n)),t=i.length;t<n;t++)s.push("<span tabindex='0'></span>");this.handles=i.add(V(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){V(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=V("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,o,e,a,r=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),a={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(a),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-r.values(t));(e<s||s===e&&(t===r._lastChangedValue||r.values(t)===l.min))&&(s=e,n=V(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),e=n.offset(),a=!V(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=a?{left:0,top:0}:{left:t.pageX-e.left-n.width()/2,top:t.pageY-e.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},e=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,e),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,t="horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),t=t/e;return(t=1<t?1:t)<0&&(t=0),"vertical"===this.orientation&&(t=1-t),e=this._valueMax()-this._valueMin(),e=this._valueMin()+t*e,this._trimAlignValue(e)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(t,e){var i,s,n;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i;if(arguments.length)return t=this.options.values[t],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(e=this.options.values.slice(),i=0;i<e.length;i+=1)e[i]=this._trimAlignValue(e[i]);return e}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,t=t-i;return 2*Math.abs(i)>=e&&(t+=0<i?e:-e),parseFloat(t.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",V(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=V(t.target).data("ui-slider-handle-index");switch(t.keyCode){case V.ui.keyCode.HOME:case V.ui.keyCode.END:case V.ui.keyCode.PAGE_UP:case V.ui.keyCode.PAGE_DOWN:case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(V(t.target),null,"ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case V.ui.keyCode.HOME:i=this._valueMin();break;case V.ui.keyCode.END:i=this._valueMax();break;case V.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case V.ui.keyCode.UP:case V.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case V.ui.keyCode.DOWN:case V.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=V(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(V(t.target),null,"ui-state-active"))}}}),V.widget("ui.sortable",V.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,i){return e<=t&&t<e+i},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),V.each(this.items,function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;0<=t;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,e){var i=null,s=!1,n=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),V(t.target).parents().each(function(){if(V.data(this,n.widgetName+"-item")===n)return i=V(this),!1}),!!(i=V.data(t.target,n.widgetName+"-item")===n?V(t.target):i)&&(!(this.options.handle&&!e&&(V(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(s=!0)}),!s))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,e,i){var s,n,o=this.options;if((this.currentContainer=this).refreshPositions(),this.appendTo=V("parent"!==o.appendTo?o.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},V.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),V.extend(this.offset,{parent:this._getParentOffset()}),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(n=this.document.find("body"),this.storedCursor=n.css("cursor"),n.css("cursor",o.cursor),this.storedStylesheet=V("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(n)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(s=this.containers.length-1;0<=s;s--)this.containers[s]._trigger("activate",t,this._uiHash(this));return V.ui.ddmanager&&(V.ui.ddmanager.current=this),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(t){var e=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),i},_mouseDrag:function(t){var e,i,s,n,o=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),o.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),V.ui.ddmanager&&!o.dropBehaviour&&V.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},e=this.items.length-1;0<=e;e--)if(s=(i=this.items[e]).item[0],(n=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(s===this.currentItem[0]||this.placeholder[1===n?"next":"prev"]()[0]===s||V.contains(this.placeholder[0],s)||"semi-dynamic"===this.options.type&&V.contains(this.element[0],s))){if(this.direction=1===n?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),V.ui.ddmanager&&V.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,e){var i,s,n,o;if(t)return V.ui.ddmanager&&!this.options.dropBehaviour&&V.ui.ddmanager.drop(this,t),this.options.revert?(s=(i=this).placeholder.offset(),o={},(n=this.options.axis)&&"x"!==n||(o.left=s.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),n&&"y"!==n||(o.top=s.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,V(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){i._clear(t)})):this._clear(t,e),!1},cancel:function(){if(this.dragging){this._mouseUp(new V.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;0<=t;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),V.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?V(this.domPosition.prev).after(this.currentItem):V(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var t=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},V(t).each(function(){var t=(V(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);t&&i.push((e.key||t[1]+"[]")+"="+(e.key&&e.expression?t[1]:t[2]))}),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(t){var e=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e.each(function(){i.push(V(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,l=r+t.height,h=this.offset.click.top,c=this.offset.click.left,h="x"===this.options.axis||r<s+h&&s+h<l,c="y"===this.options.axis||o<e+c&&e+c<a;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?h&&c:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),t="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!e||!t)&&(e=this.dragDirection.vertical,t=this.dragDirection.horizontal,this.floating?"right"===t||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this.dragDirection.vertical,t=this.dragDirection.horizontal;return this.floating&&t?"right"===t&&i||"left"===t&&!i:s&&("down"===s&&e||"up"===s&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!=t&&(0<t?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!=t&&(0<t?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(t){var e,i,s,n,o=[],a=[],r=this._connectWith();if(r&&t)for(e=r.length-1;0<=e;e--)for(i=(s=V(r[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&a.push(["function"==typeof n.options.items?n.options.items.call(n.element):V(n.options.items,n.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),n]);function l(){o.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):V(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),e=a.length-1;0<=e;e--)a[e][0].each(l);return V(o)},_removeCurrentsFromItems:function(){var i=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=V.grep(this.items,function(t){for(var e=0;e<i.length;e++)if(i[e]===t.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var e,i,s,n,o,a,r,l,h=this.items,c=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):V(this.options.items,this.element),this]],u=this._connectWith();if(u&&this.ready)for(e=u.length-1;0<=e;e--)for(i=(s=V(u[e],this.document[0])).length-1;0<=i;i--)(n=V.data(s[i],this.widgetFullName))&&n!==this&&!n.options.disabled&&(c.push(["function"==typeof n.options.items?n.options.items.call(n.element[0],t,{item:this.currentItem}):V(n.options.items,n.element),n]),this.containers.push(n));for(e=c.length-1;0<=e;e--)for(o=c[e][1],l=(a=c[e][i=0]).length;i<l;i++)(r=V(a[i])).data(this.widgetName+"-item",o),h.push({item:r,instance:o,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){for(var e,i,s=this.items.length-1;0<=s;s--)e=this.items[s],this.currentContainer&&e.instance!==this.currentContainer&&e.item[0]!==this.currentItem[0]||(i=this.options.toleranceElement?V(this.options.toleranceElement,e.item):e.item,t||(e.width=i.outerWidth(),e.height=i.outerHeight()),i=i.offset(),e.left=i.left,e.top=i.top)},refreshPositions:function(t){var e,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)i=this.containers[e].element.offset(),this.containers[e].containerCache.left=i.left,this.containers[e].containerCache.top=i.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(i){var s,n,o=(i=i||this).options;o.placeholder&&o.placeholder.constructor!==String||(s=o.placeholder,n=i.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var t=V("<"+n+">",i.document[0]);return i._addClass(t,"ui-sortable-placeholder",s||i.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===n?i._createTrPlaceholder(i.currentItem.find("tr").eq(0),V("<tr>",i.document[0]).appendTo(t)):"tr"===n?i._createTrPlaceholder(i.currentItem,t):"img"===n&&t.attr("src",i.currentItem.attr("src")),s||t.css("visibility","hidden"),t},update:function(t,e){s&&!o.forcePlaceholderSize||(e.height()&&(!o.forcePlaceholderSize||"tbody"!==n&&"tr"!==n)||e.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=V(o.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),o.placeholder.update(i,i.placeholder)},_createTrPlaceholder:function(t,e){var i=this;t.children().each(function(){V("<td> </td>",i.document[0]).attr("colspan",V(this).attr("colspan")||1).appendTo(e)})},_contactContainers:function(t){for(var e,i,s,n,o,a,r,l,h,c=null,u=null,d=this.containers.length-1;0<=d;d--)V.contains(this.currentItem[0],this.containers[d].element[0])||(this._intersectsWith(this.containers[d].containerCache)?c&&V.contains(this.containers[d].element[0],c.element[0])||(c=this.containers[d],u=d):this.containers[d].containerCache.over&&(this.containers[d]._trigger("out",t,this._uiHash(this)),this.containers[d].containerCache.over=0));if(c)if(1===this.containers.length)this.containers[u].containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1);else{for(i=1e4,s=null,n=(l=c.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",h=l?"pageX":"pageY",e=this.items.length-1;0<=e;e--)V.contains(this.containers[u].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(a=this.items[e].item.offset()[n],r=!1,t[h]-a>this.items[e][o]/2&&(r=!0),Math.abs(t[h]-a)<i&&(i=Math.abs(t[h]-a),s=this.items[e],this.direction=r?"up":"down"));(s||this.options.dropOnEmpty)&&(this.currentContainer!==this.containers[u]?(s?this._rearrange(t,s,null,!0):this._rearrange(t,null,this.containers[u].element,!0),this._trigger("change",t,this._uiHash()),this.containers[u]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[u],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[u]._trigger("over",t,this._uiHash(this)),this.containers[u].containerCache.over=1):this.currentContainer.containerCache.over||(this.containers[u]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1))}},_createHelper:function(t){var e=this.options,t="function"==typeof e.helper?V(e.helper.apply(this.element[0],[t,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return t.parents("body").length||this.appendTo[0].appendChild(t[0]),t[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),t[0].style.width&&!e.forceHelperSize||t.width(this.currentItem.width()),t[0].style.height&&!e.forceHelperSize||t.height(this.currentItem.height()),t},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),"left"in(t=Array.isArray(t)?{left:+t[0],top:+t[1]||0}:t)&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),{top:(t=this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&V.ui.ie?{top:0,left:0}:t).top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i=this.options;"parent"===i.containment&&(i.containment=this.helper[0].parentNode),"document"!==i.containment&&"window"!==i.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===i.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===i.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||(t=V(i.containment)[0],e=V(i.containment).offset(),i="hidden"!==V(t).css("overflow"),this.containment=[e.left+(parseInt(V(t).css("borderLeftWidth"),10)||0)+(parseInt(V(t).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(V(t).css("borderTopWidth"),10)||0)+(parseInt(V(t).css("paddingTop"),10)||0)-this.margins.top,e.left+(i?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(V(t).css("borderLeftWidth"),10)||0)-(parseInt(V(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(i?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(V(t).css("borderTopWidth"),10)||0)-(parseInt(V(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,e){e=e||this.position;var i="absolute"===t?1:-1,s="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,t=/(html|body)/i.test(s[0].tagName);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():t?0:s.scrollTop())*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():t?0:s.scrollLeft())*i}},_generatePosition:function(t){var e=this.options,i=t.pageX,s=t.pageY,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&V.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),e.grid&&(t=this.originalPageY+Math.round((s-this.originalPageY)/e.grid[1])*e.grid[1],s=!this.containment||t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-e.grid[1]:t+e.grid[1],t=this.originalPageX+Math.round((i-this.originalPageX)/e.grid[0])*e.grid[0],i=!this.containment||t-this.offset.click.left>=this.containment[0]&&t-this.offset.click.left<=this.containment[2]?t:t-this.offset.click.left>=this.containment[0]?t-e.grid[0]:t+e.grid[0])),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,i,s){return function(t){s._trigger(e,t,i._uiHash(i))}}for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;0<=i;i--)e||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===V.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var e=t||this;return{helper:e.helper,placeholder:e.placeholder||V([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:t?t.element:null}}});function ht(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}V.widget("ui.spinner",{version:"1.13.2",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var s=this._super(),n=this.element;return V.each(["min","max","step"],function(t,e){var i=n.attr(e);null!=i&&i.length&&(s[e]=i)}),s},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t))},mousewheel:function(t,e){var i=V.ui.safeActiveElement(this.document[0]);if(this.element[0]===i&&e){if(!this.spinning&&!this._start(t))return!1;this._spin((0<e?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(t){var e;function i(){this.element[0]===V.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=e,this._delay(function(){this.previous=e}))}e=this.element[0]===V.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),!1!==this._start(t)&&this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){if(V(t.currentTarget).hasClass("ui-state-active"))return!1!==this._start(t)&&void this._repeat(null,V(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(t){var e=this.options,i=V.ui.keyCode;switch(t.keyCode){case i.UP:return this._repeat(null,1,t),!0;case i.DOWN:return this._repeat(null,-1,t),!0;case i.PAGE_UP:return this._repeat(null,e.page,t),!0;case i.PAGE_DOWN:return this._repeat(null,-e.page,t),!0}return!1},_start:function(t){return!(!this.spinning&&!1===this._trigger("start",t))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",e,{value:i})||(this._value(i),this.counter++)},_increment:function(t){var e=this.options.incremental;return e?"function"==typeof e?e(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return t=null!==this.options.min?Math.max(t,this._precisionOf(this.options.min)):t},_precisionOf:function(t){var e=t.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_adjustValue:function(t){var e=this.options,i=null!==e.min?e.min:0,s=t-i;return t=i+Math.round(s/e.step)*e.step,t=parseFloat(t.toFixed(this._precision())),null!==e.max&&t>e.max?e.max:null!==e.min&&t<e.min?e.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i;if("culture"===t||"numberFormat"===t)return i=this._parse(this.element.val()),this.options[t]=e,void this.element.val(this._format(i));"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(i=this.buttons.first().find(".ui-icon"),this._removeClass(i,null,this.options.icons.up),this._addClass(i,null,e.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,e.down)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:ht(function(t){this._super(t)}),_parse:function(t){return""===(t="string"==typeof t&&""!==t?window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t:t)||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null!==t&&t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&null!==(i=this._parse(t))&&(e||(i=this._adjustValue(i)),t=this._format(i)),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:ht(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:ht(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:ht(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:ht(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){if(!arguments.length)return this._parse(this.element.val());ht(this._value).call(this,t)},widget:function(){return this.uiSpinner}}),!1!==V.uiBackCompat&&V.widget("ui.spinner",V.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var ct;V.ui.spinner;V.widget("ui.tabs",{version:"1.13.2",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(ct=/#.*$/,function(t){var e=t.href.replace(ct,""),i=location.href.replace(ct,"");try{e=decodeURIComponent(e)}catch(t){}try{i=decodeURIComponent(i)}catch(t){}return 1<t.hash.length&&e===i}),_create:function(){var e=this,t=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,t.collapsible),this._processTabs(),t.active=this._initialActive(),Array.isArray(t.disabled)&&(t.disabled=V.uniqueSort(t.disabled.concat(V.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(t.active):this.active=V(),this._refresh(),this.active.length&&this.load(t.active)},_initialActive:function(){var i=this.options.active,t=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(t,e){if(V(e).attr("aria-controls")===s)return i=t,!1}),null!==(i=null===i?this.tabs.index(this.tabs.filter(".ui-tabs-active")):i)&&-1!==i||(i=!!this.tabs.length&&0)),!1!==i&&-1===(i=this.tabs.index(this.tabs.eq(i)))&&(i=!t&&0),i=!t&&!1===i&&this.anchors.length?0:i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):V()}},_tabKeydown:function(t){var e=V(V.ui.safeActiveElement(this.document[0])).closest("li"),i=this.tabs.index(e),s=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case V.ui.keyCode.RIGHT:case V.ui.keyCode.DOWN:i++;break;case V.ui.keyCode.UP:case V.ui.keyCode.LEFT:s=!1,i--;break;case V.ui.keyCode.END:i=this.anchors.length-1;break;case V.ui.keyCode.HOME:i=0;break;case V.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i);case V.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),void this._activate(i!==this.options.active&&i);default:return}t.preventDefault(),clearTimeout(this.activating),i=this._focusNextTab(i,s),t.ctrlKey||t.metaKey||(e.attr("aria-selected","false"),this.tabs.eq(i).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",i)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===V.ui.keyCode.UP&&(t.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(t){return t.altKey&&t.keyCode===V.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===V.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,e){var i=this.tabs.length-1;for(;-1!==V.inArray(t=(t=i<t?0:t)<0?i:t,this.options.disabled);)t=e?t+1:t-1;return t},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){"active"!==t?(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||!1!==this.options.active||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e)):this._activate(e)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,e=this.tablist.children(":has(a[href])");t.disabled=V.map(e.filter(".ui-state-disabled"),function(t){return e.index(t)}),this._processTabs(),!1!==t.active&&this.anchors.length?this.active.length&&!V.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=V()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=V()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var l=this,t=this.tabs,e=this.anchors,i=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(t){V(this).is(".ui-state-disabled")&&t.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){V(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return V("a",this)[0]}).attr({tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=V(),this.anchors.each(function(t,e){var i,s,n,o=V(e).uniqueId().attr("id"),a=V(e).closest("li"),r=a.attr("aria-controls");l._isLocal(e)?(n=(i=e.hash).substring(1),s=l.element.find(l._sanitizeSelector(i))):(n=a.attr("aria-controls")||V({}).uniqueId()[0].id,(s=l.element.find(i="#"+n)).length||(s=l._createPanel(n)).insertAfter(l.panels[t-1]||l.tablist),s.attr("aria-live","polite")),s.length&&(l.panels=l.panels.add(s)),r&&a.data("ui-tabs-aria-controls",r),a.attr({"aria-controls":n,"aria-labelledby":o}),s.attr("aria-labelledby",o)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),t&&(this._off(t.not(this.tabs)),this._off(e.not(this.anchors)),this._off(i.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(t){return V("<div>").attr("id",t).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(t){var e,i;for(Array.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1),i=0;e=this.tabs[i];i++)e=V(e),!0===t||-1!==V.inArray(i,t)?(e.attr("aria-disabled","true"),this._addClass(e,null,"ui-state-disabled")):(e.removeAttr("aria-disabled"),this._removeClass(e,null,"ui-state-disabled"));this.options.disabled=t,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===t)},_setupEvents:function(t){var i={};t&&V.each(t.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,e=this.element.parent();"fill"===t?(i=e.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=V(this),e=t.css("position");"absolute"!==e&&"fixed"!==e&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=V(this).outerHeight(!0)}),this.panels.each(function(){V(this).height(Math.max(0,i-V(this).innerHeight()+V(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,V(this).height("").height())}).height(i))},_eventHandler:function(t){var e=this.options,i=this.active,s=V(t.currentTarget).closest("li"),n=s[0]===i[0],o=n&&e.collapsible,a=o?V():this._getPanelForTab(s),r=i.length?this._getPanelForTab(i):V(),i={oldTab:i,oldPanel:r,newTab:o?V():s,newPanel:a};t.preventDefault(),s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||n&&!e.collapsible||!1===this._trigger("beforeActivate",t,i)||(e.active=!o&&this.tabs.index(s),this.active=n?V():s,this.xhr&&this.xhr.abort(),r.length||a.length||V.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,i))},_toggle:function(t,e){var i=this,s=e.newPanel,n=e.oldPanel;function o(){i.running=!1,i._trigger("activate",t,e)}function a(){i._addClass(e.newTab.closest("li"),"ui-tabs-active","ui-state-active"),s.length&&i.options.show?i._show(s,i.options.show,o):(s.show(),o())}this.running=!0,n.length&&this.options.hide?this._hide(n,this.options.hide,function(){i._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),a()}):(this._removeClass(e.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n.hide(),a()),n.attr("aria-hidden","true"),e.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),s.length&&n.length?e.oldTab.attr("tabIndex",-1):s.length&&this.tabs.filter(function(){return 0===V(this).attr("tabIndex")}).attr("tabIndex",-1),s.attr("aria-hidden","false"),e.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var t=this._findActive(t);t[0]!==this.active[0]&&(t=(t=!t.length?this.active:t).find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:V.noop}))},_findActive:function(t){return!1===t?V():this.tabs.eq(t)},_getIndex:function(t){return t="string"==typeof t?this.anchors.index(this.anchors.filter("[href$='"+V.escapeSelector(t)+"']")):t},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){V.data(this,"ui-tabs-destroy")?V(this).remove():V(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var t=V(this),e=t.data("ui-tabs-aria-controls");e?t.attr("aria-controls",e).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var t=this.options.disabled;!1!==t&&(t=void 0!==i&&(i=this._getIndex(i),Array.isArray(t)?V.map(t,function(t){return t!==i?t:null}):V.map(this.tabs,function(t,e){return e!==i?e:null})),this._setOptionDisabled(t))},disable:function(t){var e=this.options.disabled;if(!0!==e){if(void 0===t)e=!0;else{if(t=this._getIndex(t),-1!==V.inArray(t,e))return;e=Array.isArray(e)?V.merge([t],e).sort():[t]}this._setOptionDisabled(e)}},load:function(t,s){t=this._getIndex(t);function n(t,e){"abort"===e&&o.panels.stop(!1,!0),o._removeClass(i,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===o.xhr&&delete o.xhr}var o=this,i=this.tabs.eq(t),t=i.find(".ui-tabs-anchor"),a=this._getPanelForTab(i),r={tab:i,panel:a};this._isLocal(t[0])||(this.xhr=V.ajax(this._ajaxSettings(t,s,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(i,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,i){setTimeout(function(){a.html(t),o._trigger("load",s,r),n(i,e)},1)}).fail(function(t,e){setTimeout(function(){n(t,e)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href").replace(/#.*$/,""),beforeSend:function(t,e){return n._trigger("beforeLoad",i,V.extend({jqXHR:t,ajaxSettings:e},s))}}},_getPanelForTab:function(t){t=V(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==V.uiBackCompat&&V.widget("ui.tabs",V.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});V.ui.tabs;V.widget("ui.tooltip",{version:"1.13.2",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=V(this).attr("title");return V("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),e=V.inArray(e,i);-1!==e&&i.splice(e,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=V("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=V([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&V.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=V(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=V(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=V([])},open:function(t){var i=this,e=V(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=V(this);e.data("ui-tooltip-open")&&((t=V.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t=this.options.content,s=this,n=i?i.type:null;if("string"==typeof t||t.nodeType||t.jquery)return this._open(i,e,t);(t=t.call(e[0],function(t){s._delay(function(){e.data("ui-tooltip-open")&&(i&&(i.type=n),this._open(i,e,t))})}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a=V.extend({},this.options.position);function r(t){a.of=t,n.is(":hidden")||n.position(a)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(i=V("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),i.removeAttr("id").find("[id]").removeAttr("id"),i.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:r}),r(t)):n.position(V.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(r(a.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,e){var i={keyup:function(t){t.keyCode===V.ui.keyCode.ESCAPE&&((t=V.Event(t)).currentTarget=e[0],this.close(t,!0))}};e[0]!==this.element[0]&&(i.remove=function(){var t=this._find(e);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(i.mouseleave="close"),t&&"focusin"!==t.type||(i.focusout="close"),this._on(!0,e,i)},close:function(t){var e,i=this,s=V(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(V(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&V.each(this.parents,function(t,e){V(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=V("<div>").attr("role","tooltip"),i=V("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){t=t.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){t=t.closest(".ui-front, dialog");return t=!t.length?this.document[0].body:t},_destroy:function(){var s=this;V.each(this.tooltips,function(t,e){var i=V.Event("blur"),e=e.element;i.target=i.currentTarget=e[0],s.close(i,!0),V("#"+t).remove(),e.data("ui-tooltip-title")&&(e.attr("title")||e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==V.uiBackCompat&&V.widget("ui.tooltip",V.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});V.ui.tooltip}); | |
0 | 7 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/Views/Shared/ErrorNoUserLoggedIn.cshtml
0 → 100644
... | ... | @@ -0,0 +1,10 @@ |
1 | +@model object | |
2 | +@{string detailedmessage = string.IsNullOrWhiteSpace((string)Model) ? "" : (string)Model; } | |
3 | +<hgroup class="title"> | |
4 | + <h1 class="error" style="background-color: black; color: white; Line-height: 2">Error!</h1> | |
5 | + <h2 class="error" style="background-color: lightgrey; color: black;">No user logged in, or user not authorized!</h2> | |
6 | +</hgroup> | |
7 | +<hr style="color: white;"> | |
8 | +<hgroup class="title"> | |
9 | + <h6 class="error" style="background-color: lightgrey; color: black;">@detailedmessage</h6> | |
10 | +</hgroup> | ... | ... |
Vrh.Web.Reporting/Vrh.NugetModuls.Documentations/Vrh.Web.Common.Lib/ReadMe.md
... | ... | @@ -469,6 +469,19 @@ public RedisConnection(string redisConnectionString, bool isRequired = true) |
469 | 469 | |
470 | 470 | *** |
471 | 471 | ### Version History: |
472 | +#### 2.20.1 (2023.09.19) Patches: | |
473 | +- WebCommon.ErrorListBuilder mostantól saját kódot használ, nem a VRH.Common.ErrorListBuilder-ét. A VRH.Common.EF.ErrorListBuilder kód tartalmát használja, ami meg valamiért nem elérhető. | |
474 | + | |
475 | +#### 2.20.0 (2023.09.07) Compatible changes: | |
476 | +- DataTablesIn.DTColumn osztály kibővült egy OrderField nevű tulajdonsággal. | |
477 | +- DataTables.Order metódus módosítása, hogy ha ki van töltve az OrderField, akkor a rendezés arra történik. | |
478 | + | |
479 | +#### 2.19.5 (2023.08.10) Patches: | |
480 | +- DataTables.Filter metódus módosítása. Nullozható enumokra is helyesen működik. | |
481 | + | |
482 | +#### 2.19.4 (2023.07.18) Patches: | |
483 | +- DataTables.Filter metódus módosítása. Most már Guid típusú mező szűrésekor is helyesen működik. | |
484 | + | |
472 | 485 | #### 2.19.3 (2023.06.05) Patches: |
473 | 486 | - DataTables.Filter metódus módosítása. Enum összehasonlításkor volt típus konfliktus. |
474 | 487 | ... | ... |
Vrh.Web.Reporting/Vrh.NugetModuls.Documentations/Vrh.Web.Membership/ReadMe.md
... | ... | @@ -395,6 +395,16 @@ IsTemporary|```bool```|Annak jelzése, hogy a felhasználó ideiglenesen létreh |
395 | 395 | |
396 | 396 | *** |
397 | 397 | ### Version History of Vrh.Web.Membership: |
398 | +#### 4.8.4 (2023.08.18) Patch: | |
399 | +- A jquery-ui frissítésekor a hivatkozásokat is át kell írni a megfelelő helyeken. Ez elmaradt, és emiatt nem működtek bizonyos funkciók (pl. szerep és szerepkörök összerendelése). Ennek a javítása történ. | |
400 | +#### 4.8.3 Patch (2023.08.01, nuget): | |
401 | +#### 4.8.2 Patch (2023.05.24, nuget): | |
402 | +- AutoLogout.js-ben javítás | |
403 | +#### 4.8.1 Patch (2022.12.19, nuget): | |
404 | +- áttérés a VRH.Common 3.0-ra | |
405 | +#### 4.8.0 Compatible change (2022.12.19, nuget): | |
406 | +#### 4.7.0 Compatible change (2022.12.19, nuget): | |
407 | +- automatikus kijelentkezéshez szükséges egyes dolgok igazítása | |
398 | 408 | #### 4.6.1 (2022.10.29) Patch: |
399 | 409 | - Frissítés a Vrh.Web.Common.Lib 2.18.1 változatára |
400 | 410 | #### 4.6.0 (2022.10.21) Compatible change: | ... | ... |
Vrh.Web.Reporting/Vrh.Web.Reporting.csproj
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
105 | 105 | </Reference> |
106 | 106 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
107 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
107 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
108 | 108 | </Reference> |
109 | 109 | <Reference Include="Microsoft.Web.Administration, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
110 | 110 | <HintPath>..\packages\Microsoft.Web.Administration.11.1.0\lib\netstandard1.5\Microsoft.Web.Administration.dll</HintPath> |
... | ... | @@ -290,23 +290,23 @@ |
290 | 290 | <Reference Include="VRH.Log4Pro.MultiLanguageManager, Version=3.21.3.0, Culture=neutral, processorArchitecture=MSIL"> |
291 | 291 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
292 | 292 | </Reference> |
293 | - <Reference Include="VRH.Log4Pro.WebTools, Version=1.11.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
294 | - <HintPath>..\packages\VRH.Log4Pro.WebTools.1.11.1\lib\net451\VRH.Log4Pro.WebTools.dll</HintPath> | |
293 | + <Reference Include="VRH.Log4Pro.WebTools, Version=1.12.5.0, Culture=neutral, processorArchitecture=MSIL"> | |
294 | + <HintPath>..\packages\VRH.Log4Pro.WebTools.1.12.5\lib\net451\VRH.Log4Pro.WebTools.dll</HintPath> | |
295 | 295 | </Reference> |
296 | - <Reference Include="Vrh.Logger, Version=2.10.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
297 | - <HintPath>..\packages\Vrh.Logger.2.10.0\lib\net451\Vrh.Logger.dll</HintPath> | |
296 | + <Reference Include="Vrh.Logger, Version=2.11.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
297 | + <HintPath>..\packages\Vrh.Logger.2.11.1\lib\net451\Vrh.Logger.dll</HintPath> | |
298 | 298 | </Reference> |
299 | - <Reference Include="Vrh.Membership, Version=4.11.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
300 | - <HintPath>..\packages\Vrh.Membership.4.11.0\lib\net451\Vrh.Membership.dll</HintPath> | |
299 | + <Reference Include="Vrh.Membership, Version=4.13.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
300 | + <HintPath>..\packages\Vrh.Membership.4.13.0\lib\net451\Vrh.Membership.dll</HintPath> | |
301 | 301 | </Reference> |
302 | - <Reference Include="Vrh.Web.Common.Lib, Version=2.19.3.0, Culture=neutral, processorArchitecture=MSIL"> | |
303 | - <HintPath>..\packages\Vrh.Web.Common.Lib.2.19.3\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
302 | + <Reference Include="Vrh.Web.Common.Lib, Version=2.20.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
303 | + <HintPath>..\packages\Vrh.Web.Common.Lib.2.20.1\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
304 | 304 | </Reference> |
305 | 305 | <Reference Include="Vrh.Web.FileManager.Lib, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL"> |
306 | 306 | <HintPath>..\packages\Vrh.Web.FileManager.1.5.1\lib\net462\Vrh.Web.FileManager.Lib.dll</HintPath> |
307 | 307 | </Reference> |
308 | - <Reference Include="Vrh.Web.Membership.Lib, Version=4.8.2.0, Culture=neutral, processorArchitecture=MSIL"> | |
309 | - <HintPath>..\packages\Vrh.Web.Membership.4.8.2\lib\net451\Vrh.Web.Membership.Lib.dll</HintPath> | |
308 | + <Reference Include="Vrh.Web.Membership.Lib, Version=4.10.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
309 | + <HintPath>..\packages\Vrh.Web.Membership.4.10.0\lib\net451\Vrh.Web.Membership.Lib.dll</HintPath> | |
310 | 310 | </Reference> |
311 | 311 | <Reference Include="Vrh.Web.Menu.Lib, Version=1.28.5.0, Culture=neutral, processorArchitecture=MSIL"> |
312 | 312 | <HintPath>..\packages\Vrh.Web.Menu.1.28.5\lib\net451\Vrh.Web.Menu.Lib.dll</HintPath> |
... | ... | @@ -344,10 +344,27 @@ |
344 | 344 | <Compile Include="Global.asax.cs"> |
345 | 345 | <DependentUpon>Global.asax</DependentUpon> |
346 | 346 | </Compile> |
347 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
347 | 348 | <Compile Include="WebServerHostedServiceStarter.cs" /> |
348 | 349 | <Compile Include="Properties\AssemblyInfo.cs" /> |
349 | 350 | </ItemGroup> |
350 | 351 | <ItemGroup> |
352 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
353 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
354 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
355 | + </Content> | |
356 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\SqlServerSpatial110.dll"> | |
357 | + <Link>SqlServerTypes\x64\SqlServerSpatial110.dll</Link> | |
358 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
359 | + </Content> | |
360 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
361 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
362 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
363 | + </Content> | |
364 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\SqlServerSpatial110.dll"> | |
365 | + <Link>SqlServerTypes\x86\SqlServerSpatial110.dll</Link> | |
366 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
367 | + </Content> | |
351 | 368 | <Content Include="App_Data\ConnectionStringStore.xml" /> |
352 | 369 | <Content Include="App_Data\ConnectionStringStoreAnti.xml" /> |
353 | 370 | <Content Include="App_Data\iSchedulerReport.xml" /> |
... | ... | @@ -668,6 +685,10 @@ |
668 | 685 | <Content Include="Images\ajax-loader_black.gif" /> |
669 | 686 | <Content Include="Images\log4pro_cube.png" /> |
670 | 687 | <Content Include="Images\userlogo.jpg" /> |
688 | + <Content Include="Areas\WebTools\Views\_ViewStart.cshtml" /> | |
689 | + <Content Include="Areas\WebTools\Views\_LayoutNoMenu.cshtml" /> | |
690 | + <Content Include="Areas\WebTools\Views\web.config" /> | |
691 | + <Content Include="Areas\WebTools\Views\UserIsNotAuthenticated.cshtml" /> | |
671 | 692 | <Content Include="Areas\UserAdministration\Views\_ViewStart.cshtml" /> |
672 | 693 | <Content Include="Areas\UserAdministration\Views\web.config" /> |
673 | 694 | <Content Include="Areas\UserAdministration\Views\User\Roles.cshtml" /> |
... | ... | @@ -692,6 +713,8 @@ |
692 | 713 | <Content Include="Areas\UserAdministration\Views\SecondaryUser\SecondaryFunction.cshtml" /> |
693 | 714 | <Content Include="Areas\UserAdministration\Views\SecondaryUser\Manager.cshtml" /> |
694 | 715 | <Content Include="Areas\UserAdministration\Views\SecondaryUser\Editor.cshtml" /> |
716 | + <Content Include="Areas\UserAdministration\Views\RolesToUsers\_RolesToUsers.cshtml" /> | |
717 | + <Content Include="Areas\UserAdministration\Views\RolesToUsers\Index.cshtml" /> | |
695 | 718 | <Content Include="Areas\UserAdministration\Views\RolesToUserRoleGroups\_RolesToUserRoleGroups.cshtml" /> |
696 | 719 | <Content Include="Areas\UserAdministration\Views\RolesToUserRoleGroups\_NewUserRoleGroupForm.cshtml" /> |
697 | 720 | <Content Include="Areas\UserAdministration\Views\RolesToUserRoleGroups\_EditUserRoleGroupForm.cshtml" /> |
... | ... | @@ -845,10 +868,6 @@ |
845 | 868 | <Content Include="Content\bootstrap-reboot.css.map" /> |
846 | 869 | <Content Include="Content\bootstrap-grid.min.css.map" /> |
847 | 870 | <Content Include="Content\bootstrap-grid.css.map" /> |
848 | - <Content Include="Scripts\vrh.bootstrap-datetimepicker.js" /> | |
849 | - <Content Include="Scripts\vrh.bootstrap-datetimepicker.min.js" /> | |
850 | - <Content Include="Scripts\vrh.commontools.js" /> | |
851 | - <Content Include="Scripts\vrh.commontools.min.js" /> | |
852 | 871 | <Content Include="Areas\WebForm\Views\WebForm\WebForm.cshtml" /> |
853 | 872 | <Content Include="Areas\WebForm\Views\WebForm\Inputs.cshtml" /> |
854 | 873 | <Content Include="Areas\WebForm\Views\WebForm\Index.cshtml" /> |
... | ... | @@ -871,7 +890,6 @@ |
871 | 890 | <Content Include="Areas\OneReport\Views\Shared\ErrorList.cshtml" /> |
872 | 891 | <Content Include="Areas\OneReport\Views\web.config" /> |
873 | 892 | <Content Include="Areas\OneReport\Views\_ViewStart.cshtml" /> |
874 | - <Content Include="Areas\WebTools\Views\_ViewStart.cshtml" /> | |
875 | 893 | <Content Include="App_Data\OneReport\AndonLog - en-US.rdl" /> |
876 | 894 | <Content Include="App_Data\OneReport\AndonLog - hu-HU.rdl" /> |
877 | 895 | <Content Include="App_Data\OneReport\Downtime1 - en-US.rdl" /> |
... | ... | @@ -912,17 +930,24 @@ |
912 | 930 | <Content Include="App_Data\OneReport\Production3 - en-US.rdl" /> |
913 | 931 | <Content Include="App_Data\OneReport\Production3 - hu-HU.rdl" /> |
914 | 932 | <Content Include="App_Data\OneScripter\Test.ps" /> |
933 | + <Content Include="Scripts\bootstrap4-toggle.min.js.map" /> | |
915 | 934 | <None Include="system.web.authentication.config" /> |
916 | 935 | <None Include="system.web.membership.config" /> |
917 | 936 | <None Include="system.web.rolemanager.config" /> |
918 | 937 | <None Include="Vrh.NugetModuls.Documentations\VRH.Common\ReadMe.md" /> |
919 | - <None Include="Vrh.NugetModuls.Documentations\VRH.Log4Pro.WebTools\ReadMe.md" /> | |
920 | - <Content Include="Scripts\bootstrap4-toggle.min.js.map" /> | |
938 | + <Content Include="Scripts\vrh.bootstrap-datetimepicker.js" /> | |
939 | + <Content Include="Scripts\vrh.bootstrap-datetimepicker.min.js" /> | |
940 | + <Content Include="Scripts\vrh.commontools.js" /> | |
941 | + <Content Include="Scripts\vrh.commontools.min.js" /> | |
942 | + <Content Include="SqlServerTypes\readme.htm" /> | |
921 | 943 | <Content Include="Vrh.NugetModuls.Documentations\Vrh.Logger\ReadMe.md" /> |
944 | + <None Include="Vrh.NugetModuls.Documentations\VRH.Log4Pro.WebTools\ReadMe.md" /> | |
922 | 945 | <None Include="Vrh.NugetModuls.Documentations\Vrh.Web.Common.Lib\ReadMe.md" /> |
923 | 946 | <None Include="Vrh.NugetModuls.Documentations\Vrh.Web.FileManager\ReadMe.md" /> |
924 | 947 | <None Include="Vrh.NugetModuls.Documentations\Vrh.Web.Membership\ReadMe.md" /> |
925 | 948 | <None Include="Vrh.NugetModuls.Documentations\Vrh.WebForm\ReadMe.md" /> |
949 | + <Content Include="Scripts\jquery-ui-1.13.2.js" /> | |
950 | + <Content Include="Scripts\jquery-ui-1.13.2.min.js" /> | |
926 | 951 | <Content Include="WCFBehaviors.config" /> |
927 | 952 | <Content Include="WCFBindings.config" /> |
928 | 953 | <Content Include="WCFClients.config" /> |
... | ... | @@ -967,8 +992,6 @@ |
967 | 992 | <Content Include="Scripts\moment.min.js" /> |
968 | 993 | <Content Include="Scripts\moment.min.js.map" /> |
969 | 994 | <Content Include="Scripts\moment-with-locales.min.js.map" /> |
970 | - <Content Include="Scripts\jquery-ui-1.12.1.js" /> | |
971 | - <Content Include="Scripts\jquery-ui-1.12.1.min.js" /> | |
972 | 995 | <Content Include="Scripts\jquery.unobtrusive-ajax.js" /> |
973 | 996 | <Content Include="Scripts\jquery.unobtrusive-ajax.min.js" /> |
974 | 997 | <Content Include="Scripts\lib\cupertino\images\ui-bg_diagonals-thick_90_eeeeee_40x40.png" /> | ... | ... |
Vrh.Web.Reporting/Web.config
... | ... | @@ -18,11 +18,11 @@ |
18 | 18 | <add key="webpages:Enabled" value="false" /> |
19 | 19 | <add key="ClientValidationEnabled" value="true" /> |
20 | 20 | <add key="UnobtrusiveJavaScriptEnabled" value="true" /> |
21 | - <add key="enableSimpleMembership" value="false" /> | |
22 | - <add key="autoFormsAuthentication" value="false" /> | |
21 | + | |
22 | + | |
23 | 23 | <add key="HangfireBootstrapper:disableautostart" value="false" /> |
24 | 24 | <add key="HangfireBootstrapper:dbconnectionstring" value="MAINDBLOG4PRO" /> |
25 | - </appSettings> | |
25 | + <add key="enableSimpleMembership" value="false" /><add key="autoFormsAuthentication" value="false" /></appSettings> | |
26 | 26 | <system.serviceModel> |
27 | 27 | <client configSource="WCFClients.config" /> |
28 | 28 | <services configSource="WCFServices.config" /> |
... | ... | @@ -41,10 +41,10 @@ |
41 | 41 | <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" /> |
42 | 42 | </providers> |
43 | 43 | </sessionState> |
44 | - <membership configSource="system.web.membership.config" /> | |
45 | - <roleManager configSource="system.web.roleManager.config" /> | |
44 | + <membership configSource="system.web.membership.config"></membership> | |
45 | + <roleManager configSource="system.web.roleManager.config"></roleManager> | |
46 | 46 | <identity configSource="WebIdentity.config" /> |
47 | - <authentication configSource="system.web.authentication.config" /> | |
47 | + <authentication configSource="system.web.authentication.config"></authentication> | |
48 | 48 | </system.web> |
49 | 49 | <runtime> |
50 | 50 | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ... | ... |
Vrh.Web.Reporting/_CreateNewNuGetPackage/Config.ps1
0 → 100644
... | ... | @@ -0,0 +1,67 @@ |
1 | +#========================================================== | |
2 | +# Edit the variable values below to configure how your .nupkg file is packed (i.e. created) and pushed (i.e. uploaded) to the NuGet gallery. | |
3 | +# | |
4 | +# If you have modified this script: | |
5 | +# - if you uninstall the "Create New NuGet Package From Project After Each Build" package, this file may not be removed automatically; you may need to manually delete it. | |
6 | +# - if you update the "Create New NuGet Package From Project After Each Build" package, this file may not be updated unless you specify it to be overwritten, either by | |
7 | +# confirming the overwrite if prompted, or by providing the "-FileConflictAction Overwrite" parameter when installing from the command line. | |
8 | +# If you overwrite this file then your custom changes will be lost, and you will need to manually reapply your changes. | |
9 | +# If you are not using source control, I recommend backing up this file before updating the package so you can see what changes you had made to it. | |
10 | +#========================================================== | |
11 | + | |
12 | +#------------------------------------------------ | |
13 | +# Pack parameters used to create the .nupkg file. | |
14 | +#------------------------------------------------ | |
15 | + | |
16 | +# Specify the Version Number to use for the NuGet package. If not specified, the version number of the assembly being packed will be used. | |
17 | +# NuGet version number guidance: https://docs.nuget.org/docs/reference/versioning and the Semantic Versioning spec: http://semver.org/ | |
18 | +# e.g. "" (use assembly's version), "1.2.3" (stable version), "1.2.3-alpha" (prerelease version). | |
19 | +$versionNumber = "" | |
20 | + | |
21 | +# Specify any Release Notes for this package. | |
22 | +# These will only be included in the package if you have a .nuspec file for the project in the same directory as the project file. | |
23 | +$releaseNotes = "" | |
24 | + | |
25 | +# Specify a specific Configuration and/or Platform to only create a NuGet package when building the project with this Configuration and/or Platform. | |
26 | +# e.g. $configuration = "Release" | |
27 | +# $platform = "AnyCPU" | |
28 | +$configuration = "" | |
29 | +$platform = "" | |
30 | + | |
31 | +# Specify any NuGet Pack Properties to pass to MsBuild. | |
32 | +# e.g. $packProperties = "TargetFrameworkVersion=v3.5;Optimize=true" | |
33 | +# Do not specify the "Configuration" or "Platform" here; use the $configuration and $platform variables above. | |
34 | +# MsBuild Properties that can be specified: http://msdn.microsoft.com/en-us/library/vstudio/bb629394.aspx | |
35 | +$packProperties = "" | |
36 | + | |
37 | +# Specify any NuGet Pack options to pass to nuget.exe. | |
38 | +# e.g. $packOptions = "-Symbols" | |
39 | +# e.g. $packOptions = "-IncludeReferencedProjects -Symbols" | |
40 | +# Do not specify a "-Version" (use $versionNumber above), "-OutputDirectory", or "-NonInteractive", as these are already provided. | |
41 | +# Do not specify any "-Properties" here; instead use the $packProperties variable above. | |
42 | +# Do not specify "-Build", as this may result in an infinite build loop. | |
43 | +# NuGet Pack options that can be specified: http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command_Options | |
44 | +# Use "-Symbols" to also create a symbols package. When pushing your package, the symbols package will automatically be detected and pushed as well: https://www.symbolsource.org/Public/Wiki/Publishing | |
45 | +$packOptions = "" | |
46 | + | |
47 | +# Specify $true if the generated .nupkg file should be renamed to include the Configuration and Platform that was used to build the project, $false if not. | |
48 | +# e.g. If $true, MyProject.1.1.5.6.nupkg might be renamed to MyProject.1.1.5.6.Debug.AnyCPU.nupkg | |
49 | +# e.g. If $true, MyProject.1.1.5.6-beta1.nupkg might re renamed to MyProject.1.1.5.6-beta1.Release.x86.nupkg | |
50 | +$appendConfigurationAndPlatformToNuGetPackageFileName = $false | |
51 | + | |
52 | + | |
53 | +#------------------------------------------------ | |
54 | +# Push parameters used to upload the .nupkg file to the NuGet gallery. | |
55 | +#------------------------------------------------ | |
56 | + | |
57 | +# The NuGet gallery to upload to. If not provided, the DefaultPushSource in your NuGet.config file is used (typically nuget.org). | |
58 | +$sourceToUploadTo = "" | |
59 | + | |
60 | +# The API Key to use to upload the package to the gallery. If not provided and a system-level one does not exist for the specified Source, you will be prompted for it. | |
61 | +$apiKey = "" | |
62 | + | |
63 | +# Specify any NuGet Push options to pass to nuget.exe. | |
64 | +# e.g. $pushOptions = "-Timeout 120" | |
65 | +# Do not specify the "-Source" or "-ApiKey" here; use the variables above. | |
66 | +# NuGet Push options that can be specified: http://docs.nuget.org/docs/reference/command-line-reference#Push_Command_Options | |
67 | +$pushOptions = "" | ... | ... |
Vrh.Web.Reporting/_CreateNewNuGetPackage/DoNotModify/CreateNuGetPackage.ps1
0 → 100644
... | ... | @@ -0,0 +1,295 @@ |
1 | +#========================================================== | |
2 | +# DO NOT EDIT THIS FILE. | |
3 | +# If you want to configure how your package is created, modify the Config.ps1 file. | |
4 | +# | |
5 | +# This script is ran automatically after every successful build. | |
6 | +# This script creates a NuGet package for the current project, and places the .nupkg file in the project's output directory (beside the .dll/.exe file). | |
7 | +#========================================================== | |
8 | +param ([string]$ProjectFilePath, [string]$OutputDirectory, [string]$BuildConfiguration, [string]$BuildPlatform) | |
9 | + | |
10 | +# Turn on Strict Mode to help catch syntax-related errors. | |
11 | +# This must come after a script's/function's param section. | |
12 | +# Forces a function to be the first non-comment code to appear in a PowerShell Module. | |
13 | +Set-StrictMode -Version Latest | |
14 | + | |
15 | +# PowerShell v2.0 compatible version of [string]::IsNullOrWhitespace. | |
16 | +function Test-StringIsNullOrWhitespace([string]$string) | |
17 | +{ | |
18 | + if ($string -ne $null) { $string = $string.Trim() } | |
19 | + return [string]::IsNullOrEmpty($string) | |
20 | +} | |
21 | + | |
22 | +# Display the parameter values passed to this script. | |
23 | +Write-Output "ProjectFilePath parameter value passed to script is '$ProjectFilePath'." | |
24 | +Write-Output "OutputDirectory parameter value passed to script is '$OutputDirectory'." | |
25 | +Write-Output "BuildConfiguration parameter value passed to script is '$BuildConfiguration'." | |
26 | +Write-Output "BuildPlatform parameter value passed to script is '$BuildPlatform'." | |
27 | + | |
28 | +# Get the directory that this script is in. | |
29 | +$THIS_SCRIPTS_DIRECTORY_PATH = Split-Path $script:MyInvocation.MyCommand.Path | |
30 | + | |
31 | +# Make sure the OutputDirectory does not end in a trailing backslash, as it will mess up nuget.exe's parameter parsing. | |
32 | +$OutputDirectory = $OutputDirectory.TrimEnd('\') | |
33 | + | |
34 | +# Get the path to the Config file and dot source it into this script. | |
35 | +# The variables below should be defined in the Config file, but if they aren't we initialize them with default values. | |
36 | +$CONFIG_FILE_PATH = Join-Path -Path (Split-Path -Path $THIS_SCRIPTS_DIRECTORY_PATH -Parent) -ChildPath 'Config.ps1' | |
37 | +if (Test-Path -Path $CONFIG_FILE_PATH) { . $CONFIG_FILE_PATH } | |
38 | +else { Write-Warning "Could not find Config file at '$CONFIG_FILE_PATH'. Default values will be used instead." } | |
39 | + | |
40 | +# Specify the version number to use for the NuGet package. If not specified, the version number of the assembly being packed will be used. | |
41 | +# NuGet version number guidance: https://docs.nuget.org/docs/reference/versioning and the Semantic Versioning spec: http://semver.org/ | |
42 | +# e.g. "" (use assembly's version), "1.2.3" (stable version), "1.2.3-alpha" (prerelease version). | |
43 | +if (!(Test-Path Variable:Private:versionNumber) -or (Test-StringIsNullOrWhitespace $versionNumber)) { $versionNumber = ""; Write-Output "Using default Version Number value." } | |
44 | +else { Write-Output "Using user-specified Version Number value '$versionNumber'." } | |
45 | + | |
46 | +# Specify any release notes for this package. | |
47 | +# These will only be included in the package if you have a .nuspec file for the project in the same directory as the project file. | |
48 | +if (!(Test-Path Variable:Private:releaseNotes) -or (Test-StringIsNullOrWhitespace $releaseNotes)) { $releaseNotes = ""; Write-Output "Using default Release Notes value." } | |
49 | +else { Write-Output "Using user-specified Release Notes value '$releaseNotes'." } | |
50 | + | |
51 | +# Make sure we pack the assemblies of the currently selected Configuration (e.g. Debug, Release) and Platform (e.g. x86, x64, Any CPU). | |
52 | +if (!(Test-Path Variable:Private:configuration) -or (Test-StringIsNullOrWhitespace $configuration)) { $configuration = $BuildConfiguration; Write-Output "Using default Configuration value." } | |
53 | +else { Write-Output "Using user-specified Configuration value '$configuration'." } | |
54 | +if (!(Test-Path Variable:Private:platform) -or (Test-StringIsNullOrWhitespace $platform)) { $platform = $BuildPlatform; Write-Output "Using default Platform value." } | |
55 | +else { Write-Output "Using user-specified Platform value '$platform'." } | |
56 | +$packPropertiesConfigurationAndPlatform = "Configuration=""$BuildConfiguration"";Platform=""$BuildPlatform"";" | |
57 | + | |
58 | +# Specify any NuGet Pack Properties to pass to MsBuild. | |
59 | +# e.g. $packProperties = "TargetFrameworkVersion=v3.5;Optimize=true" | |
60 | +# Do not specify the "Configuration" or "Platform" here (the $BuildConfiguration and $BuildPlatform values will be used). | |
61 | +# MsBuild Properties that can be specified: http://msdn.microsoft.com/en-us/library/vstudio/bb629394.aspx | |
62 | +if (!(Test-Path Variable:Private:packProperties) -or (Test-StringIsNullOrWhitespace $packProperties)) { $packProperties = ""; Write-Output "Using default Pack Properties value." } | |
63 | +else { Write-Output "Using user-specified Pack Properties value '$packProperties'." } | |
64 | + | |
65 | +# Specify any NuGet Pack options to pass to nuget.exe. | |
66 | +# e.g. $packOptions = "-IncludeReferencedProjects" | |
67 | +# Do not specify a "-Version" (use $versionNumber above), "-OutputDirectory", or "-NonInteractive", as these are already provided. | |
68 | +# Do not specify any "-Properties" here; instead use the $packProperties variable above. | |
69 | +# Do not specify "-Build", as this may result in an infinite build loop. | |
70 | +# NuGet Pack options that can be specified: http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command_Options | |
71 | +if (!(Test-Path Variable:Private:packOptions) -or (Test-StringIsNullOrWhitespace $packOptions)) { $packOptions = ""; Write-Output "Using default Pack Options value." } | |
72 | +else { Write-Output "Using user-specified Pack Options value '$packOptions'." } | |
73 | + | |
74 | +# Join the Configuration and Platform into the rest of the pack Properties. | |
75 | +$packProperties = ($packPropertiesConfigurationAndPlatform + $packProperties).TrimEnd(';') | |
76 | + | |
77 | +# If the user-specified Configuration and Platform do not match the Configuration and Platform the project was just built with. | |
78 | +if ($BuildConfiguration -ne $configuration -or $BuildPlatform -ne $platform) | |
79 | +{ | |
80 | + # Display that the Configuration or Platform does not match and exit this function before creating the NuGet package. | |
81 | + Write-Output "Project was not built with the Configuration or Platform that the user has specified should be used to create NuGet packages, so exiting without creating a NuGet package." | |
82 | + Write-Output "Configuration and Platform used by build was '$BuildConfiguration','$BuildPlatform'." | |
83 | + Write-Output "Configuration and Platform specified by user is '$configuration','$platform'." | |
84 | + break | |
85 | +} | |
86 | + | |
87 | +#----- | |
88 | +# Make sure the assembly still exists in the folder specified by the project file, since if an Output Directory different than the one specified in | |
89 | +# the project file was used (e.g. passed in using msbuild.exe's outdir property parameter, NuGet.exe won't be able to find the assembly file and pack it. | |
90 | + | |
91 | +# Define helper functions. | |
92 | +function Get-XmlNamespaceManager([xml]$XmlDocument, [string]$NamespaceURI = "") | |
93 | +{ | |
94 | + # If a Namespace URI was not given, use the Xml document's default namespace. | |
95 | + if ([string]::IsNullOrEmpty($NamespaceURI)) { $NamespaceURI = $XmlDocument.DocumentElement.NamespaceURI } | |
96 | + | |
97 | + # In order for SelectSingleNode() to actually work, we need to use the fully qualified node path along with an Xml Namespace Manager, so set them up. | |
98 | + [System.Xml.XmlNamespaceManager]$xmlNsManager = New-Object System.Xml.XmlNamespaceManager($XmlDocument.NameTable) | |
99 | + $xmlNsManager.AddNamespace("ns", $NamespaceURI) | |
100 | + return ,$xmlNsManager # Need to put the comma before the variable name so that PowerShell doesn't convert it into an Object[]. | |
101 | +} | |
102 | + | |
103 | +function Get-FullyQualifiedXmlNodePath([string]$NodePath, [string]$NodeSeparatorCharacter = '.') | |
104 | +{ | |
105 | + return "/ns:$($NodePath.Replace($($NodeSeparatorCharacter), '/ns:'))" | |
106 | +} | |
107 | + | |
108 | +function Get-XmlNode([xml]$XmlDocument, [string]$NodePath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
109 | +{ | |
110 | + $xmlNsManager = Get-XmlNamespaceManager -XmlDocument $XmlDocument -NamespaceURI $NamespaceURI | |
111 | + [string]$fullyQualifiedNodePath = Get-FullyQualifiedXmlNodePath -NodePath $NodePath -NodeSeparatorCharacter $NodeSeparatorCharacter | |
112 | + | |
113 | + # Try and get the node, then return it. Returns $null if the node was not found. | |
114 | + $node = $XmlDocument.SelectSingleNode($fullyQualifiedNodePath, $xmlNsManager) | |
115 | + return $node | |
116 | +} | |
117 | + | |
118 | +function Get-XmlNodes([xml]$XmlDocument, [string]$NodePath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
119 | +{ | |
120 | + $xmlNsManager = Get-XmlNamespaceManager -XmlDocument $XmlDocument -NamespaceURI $NamespaceURI | |
121 | + [string]$fullyQualifiedNodePath = Get-FullyQualifiedXmlNodePath -NodePath $NodePath -NodeSeparatorCharacter $NodeSeparatorCharacter | |
122 | + | |
123 | + # Try and get the nodes, then return them. Returns $null if no nodes were found. | |
124 | + $nodes = $XmlDocument.SelectNodes($fullyQualifiedNodePath, $xmlNsManager) | |
125 | + return $nodes | |
126 | +} | |
127 | + | |
128 | +function Get-XmlElementsTextValue([xml]$XmlDocument, [string]$ElementPath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
129 | +{ | |
130 | + # Try and get the node. | |
131 | + $node = Get-XmlNode -XmlDocument $XmlDocument -NodePath $ElementPath -NamespaceURI $NamespaceURI -NodeSeparatorCharacter $NodeSeparatorCharacter | |
132 | + | |
133 | + # If the node already exists, return its value, otherwise return null. | |
134 | + if ($node) { return $node.InnerText } else { return $null } | |
135 | +} | |
136 | + | |
137 | +# Makes sure the assembly exists in the directory defined by the Project File (this is where NuGet.exe will expect it to be in order to pack it). | |
138 | +# This is required in case the user is building with MsBuild and has provided an alternative output directory (e.g. /p:OutDir="Some\Other\Path"). | |
139 | +function Ensure-AssemblyFileExistsWhereNuGetExpectsItToBe([string]$ProjectFilePath, [string]$OutputDirectory, [string]$Configuration, [string]$Platform) | |
140 | +{ | |
141 | + # Display the time that the pre-processing started running. | |
142 | + $scriptStartTime = Get-Date | |
143 | + Write-Output "Pre-processing the project file to make sure the assembly exists where NuGet.exe will expect it to be, started at $($scriptStartTime.TimeOfDay.ToString())." | |
144 | + | |
145 | + # If the Project File Path does not exist, display an error message and return. | |
146 | + if (!(Test-Path $ProjectFilePath)) { Write-Output "Project file does not exist at '$ProjectFilePath', so cannot pre-process it."; return } | |
147 | + | |
148 | + # Get the contents of the Project File as Xml. | |
149 | + $projectFileXml = New-Object System.Xml.XmlDocument | |
150 | + $projectFileXml.Load($ProjectFilePath) | |
151 | + | |
152 | + # Get the Property Group for the current Configuration and Platform from the Project File. | |
153 | + $projectFilePropertyGroups = Get-XmlNodes -XmlDocument $projectFileXml -NodePath "Project.PropertyGroup" | |
154 | + if (!$projectFilePropertyGroups) { "No PropertyGroup elements could be found in the project file, so cannot pre-process it."; return } | |
155 | + $projectFilePropertyGroupForCurrentConfigurationAndPlatform = $projectFilePropertyGroups | Where { $_.Attributes.GetNamedItem('Condition') -and $_.Attributes.GetNamedItem('Condition').Value -match ".*$Configuration\|$Platform.*" } | |
156 | + if (!$projectFilePropertyGroupForCurrentConfigurationAndPlatform) { "Could not find the PropertyGroup element in the project file that corresponds to Configuration '$Configuration' and Platform '$Platform', so cannot pre-process it."; return } | |
157 | + | |
158 | + # Get the Directory where NuGet.exe will expect to find the assembly to pack. | |
159 | + $projectFileOutputDirectory = $projectFilePropertyGroupForCurrentConfigurationAndPlatform.OutputPath | |
160 | + | |
161 | + # If we were not able to get the Output Directory where NuGet.exe will expect to find the assembly from the Project File, display an error message and return. | |
162 | + if ([string]::IsNullOrEmpty($projectFileOutputDirectory)) { Write-Output "Could not find the OutputPath element in the project file that corresponds to Configuration '$Configuration' and Platform '$Platform', so cannot pre-process it."; return } | |
163 | + | |
164 | + # Get the full path of the directory where NuGet.exe will expect to find the assembly. | |
165 | + $nuGetExpectedOutputDirectoryPath = Join-Path (Split-Path -Path $ProjectFilePath -Parent) $projectFileOutputDirectory | |
166 | + $nuGetExpectedOutputDirectoryPath = $nuGetExpectedOutputDirectoryPath.TrimEnd('\') # We trimmed the OutputDirectory, so trim this one too so we can compare them to see if they match. | |
167 | + | |
168 | + # If the actual Output Directory is different than the one specified in the Project File. | |
169 | + if (!$OutputDirectory.Equals($nuGetExpectedOutputDirectoryPath, [System.StringComparison]::OrdinalIgnoreCase)) | |
170 | + { | |
171 | + # Get the name of the assembly. | |
172 | + $assemblyName = Get-XmlElementsTextValue -XmlDocument $projectFileXml -ElementPath "Project.PropertyGroup.AssemblyName" | |
173 | + if (!$assemblyName) { $assemblyName = [string]::Empty } | |
174 | + | |
175 | + # Get the type of project being built, so we can determine what file extension it should have. | |
176 | + $assemblyType = Get-XmlElementsTextValue -XmlDocument $projectFileXml -ElementPath "Project.PropertyGroup.OutputType" | |
177 | + if (!$assemblyType) { $assemblyType = [string]::Empty } | |
178 | + | |
179 | + # Attach the file extension to the assembly name based on the type of project this is. Either a Library or Executable. | |
180 | + if ($assemblyType.Equals("Library", [System.StringComparison]::OrdinalIgnoreCase)) { $assemblyName = "$assemblyName.dll" } | |
181 | + else { $assemblyName = "$assemblyName.exe" } | |
182 | + | |
183 | + # Get the full path of the assembly. | |
184 | + $assemblyPath = Join-Path $OutputDirectory $assemblyName | |
185 | + $nuGetExpectedAssemblyPath = Join-Path $nuGetExpectedOutputDirectoryPath $assemblyName | |
186 | + | |
187 | + # If the assembly is not in the Output Directory (which it should be), display an error message and return. | |
188 | + if (!(Test-Path $assemblyPath -PathType Leaf)) { Write-Output "Could not find the assembly at the expected path '$assemblyPath', so cannot continue pre-processing."; return } | |
189 | + | |
190 | + # Make sure the assembly exists in the Project File's Output Path, since that is where NuGet.exe expects to find it. | |
191 | + # If the assembly does not exist where the Project File defines it should be (i.e. where NuGet expects it to be), copy it there, | |
192 | + # OR the assembly exists in both places, but If the one in the Output Directory is newer, overwrite the one in the Project Output Directory. | |
193 | + if (!(Test-Path $nuGetExpectedAssemblyPath -PathType Leaf) -or | |
194 | + ((Get-Item -Path $assemblyPath).LastWriteTime -lt (Get-Item -Path $nuGetExpectedAssemblyPath).LastWriteTime)) | |
195 | + { | |
196 | + # If the directory to hold the assembly file does not exist, create it. | |
197 | + $nuGetExpectedAssemblyDirectoryPath = Split-Path $nuGetExpectedAssemblyPath -Parent | |
198 | + if (!(Test-Path $nuGetExpectedAssemblyDirectoryPath)) { New-Item -Path $nuGetExpectedAssemblyDirectoryPath -ItemType Container -Force > $null } | |
199 | + | |
200 | + # Copy the assembly file. | |
201 | + Write-Output "Copying assembly file from '$assemblyPath' to '$nuGetExpectedAssemblyPath'." | |
202 | + Copy-Item -Path $assemblyPath -Destination $nuGetExpectedAssemblyPath -Force | |
203 | + | |
204 | + # Copy the Pdb file, if it exists. | |
205 | + $assemblyPdbPath = [System.IO.Path]::ChangeExtension($assemblyPath, "pdb") | |
206 | + $nuGetExpectedAssemblyPdbPath = [System.IO.Path]::ChangeExtension($nuGetExpectedAssemblyPath, "pdb") | |
207 | + if (Test-Path $assemblyPdbPath -PathType Leaf) | |
208 | + { | |
209 | + Write-Output "Copying symbols file from '$assemblyPdbPath' to '$nuGetExpectedAssemblyPdbPath'." | |
210 | + Copy-Item -Path $assemblyPdbPath -Destination $nuGetExpectedAssemblyPdbPath -Force | |
211 | + } | |
212 | + else { Write-Output "No symbols file found at '$assemblyPdbPath', so it was not copied to '$nuGetExpectedAssemblyPdbPath'." } | |
213 | + | |
214 | + # Copy the Xml file, if it exists. | |
215 | + # The Xml file location and name are specified in the Project File, but NuGet.exe seems to ignore that and expects it to be in the same directory as the assembly, | |
216 | + # with the same name as the assembly, so just put it where NuGet.exe expects it to be. | |
217 | + $assemblyXmlPath = [System.IO.Path]::ChangeExtension($assemblyPath, "xml") | |
218 | + $nuGetExpectedAssemblyXmlPath = [System.IO.Path]::ChangeExtension($nuGetExpectedAssemblyPath, "xml") | |
219 | + if (Test-Path $assemblyXmlPath -PathType Leaf) | |
220 | + { | |
221 | + Write-Output "Copying documentation file from '$assemblyXmlPath' to '$nuGetExpectedAssemblyXmlPath'." | |
222 | + Copy-Item -Path $assemblyXmlPath -Destination $nuGetExpectedAssemblyXmlPath -Force | |
223 | + } | |
224 | + else { Write-Output "No documentation file found at '$assemblyXmlPath', so it was not copied to '$nuGetExpectedAssemblyXmlPath'." } | |
225 | + } | |
226 | + else { Write-Output "The proper assembly already exists where NuGet.exe will expect it to be, so no pre-processing actions were required." } | |
227 | + } | |
228 | + else { Write-Output "The Output Directory is the same as defined in the project file, so no pre-processing actions were required." } | |
229 | + | |
230 | + # Display the time that the pre-processing finished running, and how long it took to run. | |
231 | + $scriptFinishTime = Get-Date | |
232 | + $scriptElapsedTimeInSeconds = ($scriptFinishTime - $scriptStartTime).TotalSeconds.ToString() | |
233 | + Write-Output "Pre-processing the project file finished running at $($scriptFinishTime.TimeOfDay.ToString()). Completed in $scriptElapsedTimeInSeconds seconds." | |
234 | +} | |
235 | + | |
236 | +# Process the Project File and make sure the assembly exists where NuGet.exe will expect it to be. | |
237 | +Ensure-AssemblyFileExistsWhereNuGetExpectsItToBe -ProjectFilePath $ProjectFilePath -OutputDirectory $OutputDirectory -Configuration $BuildConfiguration -Platform $BuildPlatform | |
238 | +#----- | |
239 | + | |
240 | +# Create the new NuGet package. | |
241 | +$nuGetPackageFilePath = & "$THIS_SCRIPTS_DIRECTORY_PATH\New-NuGetPackage.ps1" -ProjectFilePath "$ProjectFilePath" -VersionNumber $versionNumber -ReleaseNotes $releaseNotes -PackOptions "-OutputDirectory ""$OutputDirectory"" -Properties $packProperties -NonInteractive $packOptions" -DoNotUpdateNuSpecFile -NoPrompt -Verbose | |
242 | + | |
243 | +# If the NuGet package file should be renamed to include the Configuration and Platform. | |
244 | +if ($appendConfigurationAndPlatformToNuGetPackageFileName) | |
245 | +{ | |
246 | + # Build the new desired NuGet package file path. | |
247 | + $nuGetPackageFileNameWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($nuGetPackageFilePath) | |
248 | + $nuGetPackageFileExtension = [System.IO.Path]::GetExtension($nuGetPackageFilePath) | |
249 | + $desiredNuGetPackageFileName = "$nuGetPackageFileNameWithoutExtension.$BuildConfiguration.$BuildPlatform$nuGetPackageFileExtension" | |
250 | + $desiredNuGetPackageFilePath = Join-Path -Path (Split-Path $nuGetPackageFilePath -Parent) -ChildPath $desiredNuGetPackageFileName | |
251 | + | |
252 | + # If the NuGet package file exists, rename it. | |
253 | + if (Test-Path -Path $nugetPackageFilePath -PathType Leaf) | |
254 | + { | |
255 | + # If a file with the desired name already exists, we must delete that file first bfeore doing the rename. | |
256 | + if (Test-Path -Path $desiredNuGetPackageFilePath -PathType Leaf) | |
257 | + { Remove-Item -Path $desiredNuGetPackageFilePath -Force } | |
258 | + | |
259 | + # Rename the NuGet package file name to the desired file name. | |
260 | + Rename-Item -Path $nugetPackageFilePath -NewName $desiredNuGetPackageFilePath -Force | |
261 | + | |
262 | + # Display that the NuGet package file was renamed. | |
263 | + Write-Output "'$nuGetPackageFilePath' was renamed to '$desiredNuGetPackageFilePath'." | |
264 | + } | |
265 | + else | |
266 | + { Write-Warning "Could not find NuGet package at '$nugetPackageFilePath', so it was not renamed to '$desiredNuGetPackageFilePath'." } | |
267 | + | |
268 | + # Save the new NuGet package file path. | |
269 | + $nuGetPackageFilePath = $desiredNuGetPackageFilePath | |
270 | + | |
271 | + # If a Symbols NuGet package was specified to be created too, rename it as well. | |
272 | + if ($packOptions -like '*-Symbols*') | |
273 | + { | |
274 | + # Build the new desired Symbols NuGet package file path. | |
275 | + $desiredSymbolsNuGetPackageFileName = "$nuGetPackageFileNameWithoutExtension.$BuildConfiguration.$BuildPlatform.symbols$nuGetPackageFileExtension" | |
276 | + $desiredSymbolsNuGetPackageFilePath = Join-Path -Path (Split-Path $nuGetPackageFilePath -Parent) -ChildPath $desiredSymbolsNuGetPackageFileName | |
277 | + | |
278 | + # Construct the path of what the original Symbols NuGet package should be, and if it exists, rename it to the desired file name. | |
279 | + $originalSymbolsNuGetPackageFileName = "$nuGetPackageFileNameWithoutExtension.symbols$nuGetPackageFileExtension" | |
280 | + $originalSymbolsNuGetPackageFilePath = Join-Path -Path (Split-Path $nuGetPackageFilePath -Parent) -ChildPath $originalSymbolsNuGetPackageFileName | |
281 | + if (Test-Path -Path $originalSymbolsNuGetPackageFilePath -PathType Leaf) | |
282 | + { | |
283 | + # Rename the Symbols NuGet package to the desired name. | |
284 | + Rename-Item -Path $originalSymbolsNuGetPackageFilePath -NewName $desiredSymbolsNuGetPackageFilePath -Force | |
285 | + | |
286 | + # Display that the NuGet package file was renamed. | |
287 | + Write-Output "'$originalSymbolsNuGetPackageFilePath' was renamed to '$desiredSymbolsNuGetPackageFilePath'." | |
288 | + } | |
289 | + else | |
290 | + { Write-Warning "Could not find Symbols NuGet package at '$originalSymbolsNuGetPackageFilePath', so it was not renamed to '$desiredSymbolsNuGetPackageFilePath'." } | |
291 | + } | |
292 | +} | |
293 | + | |
294 | +# Display the path to the NuGet package file. | |
295 | +Write-Output $nuGetPackageFilePath | |
0 | 296 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/_CreateNewNuGetPackage/DoNotModify/New-NuGetPackage.ps1
0 → 100644
... | ... | @@ -0,0 +1,1482 @@ |
1 | +#Requires -Version 2.0 | |
2 | +<# | |
3 | + .SYNOPSIS | |
4 | + Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file, and optionally uploads it to a NuGet Gallery. | |
5 | + | |
6 | + .DESCRIPTION | |
7 | + Creates a NuGet Package (.nupkg) file from the given Project or NuSpec file. | |
8 | + Additional parameters may be provided to also upload the new NuGet package to a NuGet Gallery. | |
9 | + If an "-OutputDirectory" is not provided via the PackOptions parameter, the default is to place the .nupkg file in a "New-NuGetPackages" directory in the same directory as the .nuspec or project file being packed. | |
10 | + If a NuGet Package file is specified (rather than a Project or NuSpec file), we will simply push that package to the NuGet Gallery. | |
11 | + | |
12 | + .PARAMETER NuSpecFilePath | |
13 | + The path to the .nuspec file to pack. | |
14 | + If you intend to pack a project file that has an accompanying .nuspec file, use the ProjectFilePath parameter instead. | |
15 | + | |
16 | + .PARAMETER ProjectFilePath | |
17 | + The path to the project file (e.g. .csproj, .vbproj, .fsproj) to pack. | |
18 | + If packing a project file that has an accompanying .nuspec file, the nuspec file will automatically be picked up by the NuGet executable. | |
19 | + | |
20 | + .PARAMETER PackageFilePath | |
21 | + The path to the NuGet package file (.nupkg) to push to the NuGet gallery. | |
22 | + If provided a new package will not be created; we will simply push to specified NuGet package to the NuGet gallery. | |
23 | + | |
24 | + .PARAMETER VersionNumber | |
25 | + The version number to use for the NuGet package. | |
26 | + The version element in the .nuspec file (if available) will be updated with the given value unless the DoNotUpdateNuSpecFile switch is provided. | |
27 | + If this parameter is not provided then you will be prompted for the version number to use (unless the NoPrompt or NoPromptForVersionNumber switch is provided). | |
28 | + If the "-Version" parameter is provided in the PackOptions, that version will be used for the NuGet package, but this version will be used to update the .nuspec file (if available). | |
29 | + | |
30 | + .PARAMETER ReleaseNotes | |
31 | + The release notes to use for the NuGet package. | |
32 | + The release notes element in the .nuspec file (if available) will be updated with the given value unless the DoNotUpdateNuSpecFile switch is provided. | |
33 | + | |
34 | + .PARAMETER PackOptions | |
35 | + The arguments to pass to NuGet's Pack command. These will be passed to the NuGet executable as-is, so be sure to follow the NuGet's required syntax. | |
36 | + By default this is set to "-Build" in order to be able to create a package from a project that has not been manually built yet. | |
37 | + See http://docs.nuget.org/docs/reference/command-line-reference for valid parameters. | |
38 | + | |
39 | + .PARAMETER PushPackageToNuGetGallery | |
40 | + If this switch is provided the NuGet package will be pushed to the NuGet gallery. | |
41 | + Use the PushOptions to specify a custom gallery to push to, or an API key if required. | |
42 | + | |
43 | + .PARAMETER PushOptions | |
44 | + The arguments to pass to NuGet's Push command. These will be passed to the NuGet executable as-is, so be sure to follow the NuGet's required syntax. | |
45 | + See http://docs.nuget.org/docs/reference/command-line-reference for valid parameters. | |
46 | + | |
47 | + .PARAMETER DeletePackageAfterPush | |
48 | + If this switch is provided and the package is successfully pushed to a NuGet gallery, the NuGet package file will then be deleted. | |
49 | + | |
50 | + .PARAMETER NoPrompt | |
51 | + If this switch is provided the user will not be prompted for the version number or release notes; the current ones in the .nuspec file will be used (if available). | |
52 | + The user will not be prompted for any other form of input either, such as if they want to push the package to a gallery, or to give input before the script exits when an error occurs. | |
53 | + This parameter should be provided when an automated mechanism is running this script (e.g. an automated build system). | |
54 | + | |
55 | + .PARAMETER NoPromptExceptOnError | |
56 | + The same as NoPrompt except if an error occurs the user will be prompted for input before the script exists, making sure they are notified that an error occurred. | |
57 | + If both this and the NoPrompt switch are provided, the NoPrompt switch will be used. | |
58 | + If both this and the NoPromptForInputOnError switch are provided, it is the same as providing the NoPrompt switch. | |
59 | + | |
60 | + .PARAMETER NoPromptForVersionNumber | |
61 | + If this switch is provided the user will not be prompted for the version number; the one in the .nuspec file will be used (if available). | |
62 | + | |
63 | + .PARAMETER NoPromptForReleaseNotes | |
64 | + If this switch is provided the user will not be prompted for the release notes; the ones in the .nuspec file will be used (if available). | |
65 | + | |
66 | + .PARAMETER NoPromptForPushPackageToNuGetGallery | |
67 | + If this switch is provided the user will not be asked if they want to push the new package to the NuGet Gallery when the PushPackageToNuGetGallery switch is not provided. | |
68 | + | |
69 | + .PARAMETER NoPromptForInputOnError | |
70 | + If this switch is provided the user will not be prompted for input before the script exits when an error occurs, so they may not notice than an error occurred. | |
71 | + | |
72 | + .PARAMETER UsePowerShellPrompts | |
73 | + If this switch is provided any prompts for user input will be made via the PowerShell console, rather than the regular GUI components. | |
74 | + This may be preferable when attempting to pipe input into the cmdlet. | |
75 | + | |
76 | + .PARAMETER DoNotUpdateNuSpecFile | |
77 | + If this switch is provided a backup of the .nuspec file (if available) will be made, changes will be made to the original .nuspec file in order to | |
78 | + properly perform the pack, and then the original file will be restored once the pack is complete. | |
79 | + | |
80 | + .PARAMETER NuGetExecutableFilePath | |
81 | + The full path to NuGet.exe. | |
82 | + If not provided it is assumed that NuGet.exe is in the same directory as this script, or that NuGet.exe has been added to your PATH and can be called directly from the command prompt. | |
83 | + | |
84 | + .PARAMETER UpdateNuGetExecutable | |
85 | + If this switch is provided "NuGet.exe update -self" will be performed before packing or pushing anything. | |
86 | + Provide this switch to ensure your NuGet executable is always up-to-date on the latest version. | |
87 | + | |
88 | + .EXAMPLE | |
89 | + & .\New-NuGetPackage.ps1 | |
90 | + | |
91 | + Run the script without any parameters (e.g. as if it was ran directly from Windows Explorer). | |
92 | + This will prompt the user for a .nuspec, project, or .nupkg file if one is not found in the same directory as the script, as well as for any other input that is required. | |
93 | + This assumes that you are currently in the same directory as the New-NuGetPackage.ps1 script, since a relative path is supplied. | |
94 | + | |
95 | + .EXAMPLE | |
96 | + & "C:\Some Folder\New-NuGetPackage.ps1" -NuSpecFilePath ".\Some Folder\SomeNuSpecFile.nuspec" -Verbose | |
97 | + | |
98 | + Create a new package from the SomeNuSpecFile.nuspec file. | |
99 | + This can be ran from any directory since an absolute path to the New-NuGetPackage.ps1 script is supplied. | |
100 | + Additional information will be displayed about the operations being performed because the -Verbose switch was supplied. | |
101 | + | |
102 | + .EXAMPLE | |
103 | + & .\New-NuGetPackage.ps1 -ProjectFilePath "C:\Some Folder\TestProject.csproj" -VersionNumber "1.1" -ReleaseNotes "Version 1.1 contains many bug fixes." | |
104 | + | |
105 | + Create a new package from the TestProject.csproj file. | |
106 | + Because the VersionNumber and ReleaseNotes parameters are provided, the user will not be prompted for them. | |
107 | + If "C:\Some Folder\TestProject.nuspec" exists, it will automatically be picked up and used when creating the package; if it contained a version number or release notes, they will be overwritten with the ones provided. | |
108 | + | |
109 | + .EXAMPLE | |
110 | + & .\New-NuGetPackage.ps1 -ProjectFilePath "C:\Some Folder\TestProject.csproj" -PackOptions "-Build -OutputDirectory ""C:\Output""" -UsePowerShellPrompts | |
111 | + | |
112 | + Create a new package from the TestProject.csproj file, building the project before packing it and saving the package in "C:\Output". | |
113 | + Because the UsePowerShellPrompts parameter was provided, all prompts will be made via the PowerShell console instead of GUI popups. | |
114 | + | |
115 | + .EXAMPLE | |
116 | + & .\New-NuGetPackage.ps1 -NuSpecFilePath "C:\Some Folder\SomeNuSpecFile.nuspec" -NoPrompt | |
117 | + | |
118 | + Create a new package from SomeNuSpecFile.nuspec without prompting the user for anything, so the existing version number and release notes in the .nuspec file will be used. | |
119 | + | |
120 | + .EXAMPLE | |
121 | + & .\New-NuGetPackage.ps1 -NuSpecFilePath ".\Some Folder\SomeNuSpecFile.nuspec" -VersionNumber "9.9.9.9" -DoNotUpdateNuSpecFile | |
122 | + | |
123 | + Create a new package with version number "9.9.9.9" from SomeNuSpecFile.nuspec without saving the changes to the file. | |
124 | + | |
125 | + .EXAMPLE | |
126 | + & .\New-NuGetPackage.ps1 -NuSpecFilePath "C:\Some Folder\SomeNuSpecFile.nuspec" -PushPackageToNuGetGallery -PushOptions "-Source ""http://my.server.com/MyNuGetGallery"" -ApiKey ""EAE1E980-5ECB-4453-9623-F0A0250E3A57""" | |
127 | + | |
128 | + Create a new package from SomeNuSpecFile.nuspec and push it to a custom NuGet gallery using the user's unique Api Key. | |
129 | + | |
130 | + .EXAMPLE | |
131 | + & .\New-NuGetPackage.ps1 -NuSpecFilePath "C:\Some Folder\SomeNuSpecFile.nuspec" -NuGetExecutableFilePath "C:\Utils\NuGet.exe" | |
132 | + | |
133 | + Create a new package from SomeNuSpecFile.nuspec by specifying the path to the NuGet executable (required when NuGet.exe is not in the user's PATH). | |
134 | + | |
135 | + .EXAMPLE | |
136 | + & New-NuGetPackage.ps1 -PackageFilePath "C:\Some Folder\MyPackage.nupkg" | |
137 | + | |
138 | + Push the existing "MyPackage.nupkg" file to the NuGet gallery. | |
139 | + User will be prompted to confirm that they want to push the package; to avoid this prompt supply the -PushPackageToNuGetGallery switch. | |
140 | + | |
141 | + .EXAMPLE | |
142 | + & .\New-NuGetPackage.ps1 -NoPromptForInputOnError -UpdateNuGetExecutable | |
143 | + | |
144 | + Create a new package or push an existing package by auto-finding the .nuspec, project, or .nupkg file to use, and prompting for one if none are found. | |
145 | + Will not prompt the user for input before exitting the script when an error occurs. | |
146 | + | |
147 | + .OUTPUTS | |
148 | + Returns the full path to the NuGet package that was created. | |
149 | + If a NuGet package was not required to be created (e.g. you were just pushing an existing package), then nothing is returned. | |
150 | + Use the -Verbose switch to see more detailed information about the operations performed. | |
151 | + | |
152 | + .LINK | |
153 | + Project home: https://newnugetpackage.codeplex.com | |
154 | + | |
155 | + .NOTES | |
156 | + Author: Daniel Schroeder | |
157 | + Version: 1.5.9 | |
158 | + | |
159 | + This script is designed to be called from PowerShell or ran directly from Windows Explorer. | |
160 | + If this script is ran without the $NuSpecFilePath, $ProjectFilePath, and $PackageFilePath parameters, it will automatically search for a .nuspec, project, or package file in the | |
161 | + same directory as the script and use it if one is found. If none or more than one are found, the user will be prompted to specify the file to use. | |
162 | +#> | |
163 | +[CmdletBinding(DefaultParameterSetName="PackUsingNuSpec")] | |
164 | +param | |
165 | +( | |
166 | + [parameter(Position=1,Mandatory=$false,ParameterSetName="PackUsingNuSpec")] | |
167 | + [ValidateScript({Test-Path $_ -PathType Leaf})] | |
168 | + [string] $NuSpecFilePath, | |
169 | + | |
170 | + [parameter(Position=1,Mandatory=$false,ParameterSetName="PackUsingProject")] | |
171 | + [ValidateScript({Test-Path $_ -PathType Leaf})] | |
172 | + [string] $ProjectFilePath, | |
173 | + | |
174 | + [parameter(Position=1,Mandatory=$false,ParameterSetName="PushExistingPackage")] | |
175 | + [ValidateScript({Test-Path $_ -PathType Leaf})] | |
176 | + [string] $PackageFilePath, | |
177 | + | |
178 | + [parameter(Position=2,Mandatory=$false,HelpMessage="The new version number to use for the NuGet Package.",ParameterSetName="PackUsingNuSpec")] | |
179 | + [parameter(Position=2,Mandatory=$false,HelpMessage="The new version number to use for the NuGet Package.",ParameterSetName="PackUsingProject")] | |
180 | + [ValidatePattern('(?i)(^\d+(\.\d+){1,3}(-[a-zA-Z0-9\-\.\+]+)?$)|(^(\$version\$)$)|(^$)')] # This validation is duplicated in the Update-NuSpecFile function, so update it in both places. This regex does not represent Sematic Versioning, but the versioning that NuGet.exe allows. | |
181 | + [Alias("Version")] | |
182 | + [Alias("V")] | |
183 | + [string] $VersionNumber, | |
184 | + | |
185 | + [parameter(ParameterSetName="PackUsingNuSpec")] | |
186 | + [parameter(ParameterSetName="PackUsingProject")] | |
187 | + [Alias("Notes")] | |
188 | + [string] $ReleaseNotes, | |
189 | + | |
190 | + [parameter(ParameterSetName="PackUsingNuSpec")] | |
191 | + [parameter(ParameterSetName="PackUsingProject")] | |
192 | + [Alias("PO")] | |
193 | + [string] $PackOptions = "-Build", # Build projects by default to make sure the files to pack exist. | |
194 | + | |
195 | + [Alias("Push")] | |
196 | + [switch] $PushPackageToNuGetGallery, | |
197 | + | |
198 | + [string] $PushOptions, | |
199 | + | |
200 | + [Alias("DPAP")] | |
201 | + [switch] $DeletePackageAfterPush, | |
202 | + | |
203 | + [Alias("NP")] | |
204 | + [switch] $NoPrompt, | |
205 | + | |
206 | + [Alias("NPEOE")] | |
207 | + [switch] $NoPromptExceptOnError, | |
208 | + | |
209 | + [parameter(ParameterSetName="PackUsingNuSpec")] | |
210 | + [parameter(ParameterSetName="PackUsingProject")] | |
211 | + [Alias("NPFVN")] | |
212 | + [switch] $NoPromptForVersionNumber, | |
213 | + | |
214 | + [parameter(ParameterSetName="PackUsingNuSpec")] | |
215 | + [parameter(ParameterSetName="PackUsingProject")] | |
216 | + [Alias("NPFRN")] | |
217 | + [switch] $NoPromptForReleaseNotes, | |
218 | + | |
219 | + [Alias("NPFPPTNG")] | |
220 | + [switch] $NoPromptForPushPackageToNuGetGallery, | |
221 | + | |
222 | + [Alias("NPFIOE")] | |
223 | + [switch] $NoPromptForInputOnError, | |
224 | + | |
225 | + [Alias("UPSP")] | |
226 | + [switch] $UsePowerShellPrompts, | |
227 | + | |
228 | + [parameter(ParameterSetName="PackUsingNuSpec")] | |
229 | + [parameter(ParameterSetName="PackUsingProject")] | |
230 | + [Alias("NoUpdate")] | |
231 | + [switch] $DoNotUpdateNuSpecFile, | |
232 | + | |
233 | + [Alias("NuGet")] | |
234 | + [string] $NuGetExecutableFilePath, | |
235 | + | |
236 | + [Alias("UNE")] | |
237 | + [switch] $UpdateNuGetExecutable | |
238 | +) | |
239 | + | |
240 | +# Turn on Strict Mode to help catch syntax-related errors. | |
241 | +# This must come after a script's/function's param section. | |
242 | +# Forces a function to be the first non-comment code to appear in a PowerShell Module. | |
243 | +Set-StrictMode -Version Latest | |
244 | + | |
245 | +# Default the ParameterSet variables that may not have been set depending on which parameter set is being used. This is required for PowerShell v2.0 compatibility. | |
246 | +if (!(Test-Path Variable:Private:NuSpecFilePath)) { $NuSpecFilePath = $null } | |
247 | +if (!(Test-Path Variable:Private:ProjectFilePath)) { $ProjectFilePath = $null } | |
248 | +if (!(Test-Path Variable:Private:PackageFilePath)) { $PackageFilePath = $null } | |
249 | +if (!(Test-Path Variable:Private:VersionNumber)) { $VersionNumber = $null } | |
250 | +if (!(Test-Path Variable:Private:ReleaseNotes)) { $ReleaseNotes = $null } | |
251 | +if (!(Test-Path Variable:Private:PackOptions)) { $PackOptions = $null } | |
252 | +if (!(Test-Path Variable:Private:NoPromptForVersionNumber)) { $NoPromptForVersionNumber = $false } | |
253 | +if (!(Test-Path Variable:Private:NoPromptForReleaseNotes)) { $NoPromptForReleaseNotes = $false } | |
254 | +if (!(Test-Path Variable:Private:DoNotUpdateNuSpecFile)) { $DoNotUpdateNuSpecFile = $false } | |
255 | + | |
256 | + | |
257 | +#========================================================== | |
258 | +# Define any necessary global variables, such as file paths. | |
259 | +#========================================================== | |
260 | + | |
261 | +# Import any necessary assemblies. | |
262 | +Add-Type -AssemblyName System.Windows.Forms | |
263 | +Add-Type -AssemblyName Microsoft.VisualBasic | |
264 | + | |
265 | +# Get the directory that this script is in. | |
266 | +$THIS_SCRIPTS_DIRECTORY_PATH = Split-Path $script:MyInvocation.MyCommand.Path | |
267 | + | |
268 | +# The list of project type extensions that NuGet supports packing. | |
269 | +$VALID_NUGET_PROJECT_TYPE_EXTENSIONS_ARRAY = @(".csproj", ".vbproj", ".fsproj") | |
270 | + | |
271 | +$VALID_NUGET_PROJECT_TYPE_EXTENSIONS_WITH_WILDCARD_ARRAY = @() | |
272 | +foreach ($extension in $VALID_NUGET_PROJECT_TYPE_EXTENSIONS_ARRAY) | |
273 | +{ | |
274 | + $VALID_NUGET_PROJECT_TYPE_EXTENSIONS_WITH_WILDCARD_ARRAY += "*$extension" | |
275 | +} | |
276 | + | |
277 | +# The directory to put the NuGet package into if one is not supplied. | |
278 | +$DEFAULT_DIRECTORY_TO_PUT_NUGET_PACKAGES_IN = "New-NuGetPackages" | |
279 | + | |
280 | +# The file path where the API keys are saved. | |
281 | +$NUGET_CONFIG_FILE_PATH = Join-Path $env:APPDATA "NuGet\NuGet.config" | |
282 | + | |
283 | +# The default NuGet source to push to when one is not explicitly provided. | |
284 | +$DEFAULT_NUGET_SOURCE_TO_PUSH_TO = "https://www.nuget.org" | |
285 | + | |
286 | +#========================================================== | |
287 | +# Strings to look for in console app output. | |
288 | +# If running in a non-english language, these strings will need to be changed to the strings returned by the console apps when running in the non-english language. | |
289 | +#========================================================== | |
290 | + | |
291 | +# TF.exe output strings. | |
292 | +$TF_EXE_NO_WORKING_FOLDER_MAPPING_ERROR_MESSAGE = 'There is no working folder mapping for' | |
293 | +$TF_EXE_NO_PENDING_CHANGES_MESSAGE = 'There are no pending changes.' | |
294 | +$TF_EXE_KEYWORD_IN_PENDING_CHANGES_MESSAGE = 'change\(s\)' # Escape regular expression characters. | |
295 | + | |
296 | +# NuGet.exe output strings. | |
297 | +$NUGET_EXE_VERSION_NUMBER_REGEX = [regex] "(?i)(NuGet Version: (?<Version>\d+\.\d+\.\d+\.\d+).)" | |
298 | +$NUGET_EXE_SUCCESSFULLY_CREATED_PACKAGE_MESSAGE_REGEX = [regex] "(?i)(Successfully created package '(?<FilePath>.*?)'.)" | |
299 | +$NUGET_EXE_SUCCESSFULLY_PUSHED_PACKAGE_MESSAGE = 'Your package was pushed.' | |
300 | +$NUGET_EXE_SUCCESSFULLY_SAVED_API_KEY_MESSAGE = "The API Key '{0}' was saved for '{1}'." | |
301 | +$NUGET_EXE_SUCCESSFULLY_UPDATED_TO_NEW_VERSION = 'Update successful.' | |
302 | + | |
303 | +#========================================================== | |
304 | +# Define functions used by the script. | |
305 | +#========================================================== | |
306 | + | |
307 | +# Catch any exceptions thrown, display the error message, wait for input if appropriate, and then stop the script. | |
308 | +trap [Exception] | |
309 | +{ | |
310 | + $errorMessage = $_ | |
311 | + Write-Host "An error occurred while running New-NuGetPackage script:`n$errorMessage`n" -Foreground Red | |
312 | + | |
313 | + if (!$NoPromptForInputOnError) | |
314 | + { | |
315 | + # If we should prompt directly from PowerShell. | |
316 | + if ($UsePowerShellPrompts) | |
317 | + { | |
318 | + Write-Host "Press any key to continue ..." | |
319 | + $x = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp") | |
320 | + } | |
321 | + # Else use a nice GUI prompt. | |
322 | + else | |
323 | + { | |
324 | + $VersionNumber = Read-MessageBoxDialog -Message $errorMessage -WindowTitle "Error Occurred Running New-NuGetPackage Script" -Buttons OK -Icon Error | |
325 | + } | |
326 | + } | |
327 | + break | |
328 | +} | |
329 | + | |
330 | +# Function to return the path to backup the NuSpec file to if needed. | |
331 | +function Get-NuSpecBackupFilePath { return "$NuSpecFilePath.backup" } | |
332 | + | |
333 | +# PowerShell v2.0 compatible version of [string]::IsNullOrWhitespace. | |
334 | +function Test-StringIsNullOrWhitespace([string] $string) | |
335 | +{ | |
336 | + if ($string -ne $null) { $string = $string.Trim() } | |
337 | + return [string]::IsNullOrEmpty($string) | |
338 | +} | |
339 | + | |
340 | +# Function to update the $NuSpecFilePath (.nuspec file) with the appropriate information before using it to create the NuGet package. | |
341 | +function Update-NuSpecFile | |
342 | +{ | |
343 | + Write-Verbose "Starting process to update the nuspec file '$NuSpecFilePath'..." | |
344 | + | |
345 | + # If we don't have a NuSpec file to update, throw an error that something went wrong. | |
346 | + if (!(Test-Path $NuSpecFilePath)) | |
347 | + { | |
348 | + throw "The Update-NuSpecFile function was called with an invalid NuSpecFilePath; this should not happen. There must be a bug in this script." | |
349 | + } | |
350 | + | |
351 | + # Validate that the NuSpec file is a valid xml file. | |
352 | + try | |
353 | + { | |
354 | + $nuSpecXml = New-Object System.Xml.XmlDocument | |
355 | + $nuSpecXml.Load($NuSpecFilePath) # Will throw an exception if it is unable to load the xml properly. | |
356 | + $nuSpecXml = $null # Release the memory. | |
357 | + } | |
358 | + catch | |
359 | + { | |
360 | + throw ("An error occurred loading the nuspec xml file '{0}': {1}" -f $NuSpecFilePath, $_.Exception.Message) | |
361 | + } | |
362 | + | |
363 | + # Get the NuSpec file contents and Last Write Time before we make any changes to it, so we can determine if we did in fact make changes to it later (and undo the checkout from TFS if we didn't). | |
364 | + $script:nuSpecFileContentsBeforeCheckout = [System.IO.File]::ReadAllText($NuSpecFilePath) | |
365 | + $script:nuSpecLastWriteTimeBeforeCheckout = [System.IO.File]::GetLastWriteTime($NuSpecFilePath) | |
366 | + | |
367 | + # Try and check the file out of TFS. | |
368 | + $script:nuSpecFileWasAlreadyCheckedOut = Tfs-IsItemCheckedOut -Path $NuSpecFilePath | |
369 | + if ($script:nuSpecFileWasAlreadyCheckedOut -eq $false) { Tfs-Checkout -Path $NuSpecFilePath } | |
370 | + | |
371 | + # If we shouldn't update to the .nuspec file permanently, create a backup that we can restore from after. | |
372 | + if ($DoNotUpdateNuSpecFile) | |
373 | + { | |
374 | + Copy-Item -Path $NuSpecFilePath -Destination (Get-NuSpecBackupFilePath) -Force | |
375 | + } | |
376 | + | |
377 | + # Get the current version number from the .nuspec file. | |
378 | + $currentVersionNumber = Get-NuSpecVersionNumber -NuSpecFilePath $NuSpecFilePath | |
379 | + | |
380 | + # If an explicit Version Number was not provided, prompt for it. | |
381 | + if (Test-StringIsNullOrWhitespace $VersionNumber) | |
382 | + { | |
383 | + # If we shouldn't prompt for a version number, just use the existing one from the NuSpec file (if it exists). | |
384 | + if ($NoPromptForVersionNumber) | |
385 | + { | |
386 | + $VersionNumber = $currentVersionNumber | |
387 | + } | |
388 | + # Else prompt the user for the version number to use. | |
389 | + else | |
390 | + { | |
391 | + $promptMessage = 'Enter the NuGet package version number to use (x.x[.x.x] or $version$ if packing a project file)' | |
392 | + | |
393 | + # If we should prompt directly from PowerShell. | |
394 | + if ($UsePowerShellPrompts) | |
395 | + { | |
396 | + $VersionNumber = Read-Host "$promptMessage. Current value in the .nuspec file is:`n$currentVersionNumber`n" | |
397 | + } | |
398 | + # Else use a nice GUI prompt. | |
399 | + else | |
400 | + { | |
401 | + $VersionNumber = Read-InputBoxDialog -Message "$promptMessage`:" -WindowTitle "NuGet Package Version Number" -DefaultText $currentVersionNumber | |
402 | + } | |
403 | + } | |
404 | + | |
405 | + # The script's parameter validation does not seem to be enforced (probably because this is inside a function), so re-enforce it here. | |
406 | + $rxVersionNumberValidation = [regex] '(?i)(^\d+(\.\d+){1,3}(-[a-zA-Z0-9\-\.\+]+)?$)|(^(\$version\$)$)|(^$)' # This validation is duplicated in the script's $Version parameter validation, so update it in both places. This regex does not represent Sematic Versioning, but the versioning that NuGet.exe allows. | |
407 | + | |
408 | + # If the user cancelled the prompt or did not provide a valid version number, exit the script. | |
409 | + if ((Test-StringIsNullOrWhitespace $VersionNumber) -or !$rxVersionNumberValidation.IsMatch($VersionNumber)) | |
410 | + { | |
411 | + throw "A valid version number to use for the NuGet package was not provided, so exiting script. The version number provided was '$VersionNumber', which does not conform to the Semantic Versioning guidelines specified at http://semver.org." | |
412 | + } | |
413 | + } | |
414 | + | |
415 | + # Insert the given version number into the .nuspec file, if it is different. | |
416 | + if ($currentVersionNumber -ne $VersionNumber) | |
417 | + { | |
418 | + Set-NuSpecVersionNumber -NuSpecFilePath $NuSpecFilePath -NewVersionNumber $VersionNumber | |
419 | + } | |
420 | + | |
421 | + # Get the current release notes from the .nuspec file. | |
422 | + $currentReleaseNotes = Get-NuSpecReleaseNotes -NuSpecFilePath $NuSpecFilePath | |
423 | + | |
424 | + # If the Release Notes were not provided, prompt for them. | |
425 | + if (Test-StringIsNullOrWhitespace $ReleaseNotes) | |
426 | + { | |
427 | + # If we shouldn't prompt for the release notes, just use the existing ones from the NuSpec file (if it exists). | |
428 | + if ($NoPromptForReleaseNotes) | |
429 | + { | |
430 | + $ReleaseNotes = $currentReleaseNotes | |
431 | + } | |
432 | + # Else prompt the user for the Release Notes to add to the .nuspec file. | |
433 | + else | |
434 | + { | |
435 | + $promptMessage = "Please enter the release notes to include in the new NuGet package" | |
436 | + | |
437 | + # If we should prompt directly from PowerShell. | |
438 | + if ($UsePowerShellPrompts) | |
439 | + { | |
440 | + $ReleaseNotes = Read-Host "$promptMessage. Current value in the .nuspec file is:`n$currentReleaseNotes`n" | |
441 | + } | |
442 | + # Else use a nice GUI prompt. | |
443 | + else | |
444 | + { | |
445 | + $ReleaseNotes = Read-MultiLineInputBoxDialog -Message "$promptMessage`:" -WindowTitle "Enter Release Notes For New Package" -DefaultText $currentReleaseNotes | |
446 | + } | |
447 | + | |
448 | + # If the user cancelled the release notes prompt, exit the script. | |
449 | + if ($ReleaseNotes -eq $null) | |
450 | + { | |
451 | + throw "User cancelled the Release Notes prompt, so exiting script." | |
452 | + } | |
453 | + } | |
454 | + } | |
455 | + | |
456 | + # Insert the given Release Notes into the .nuspec file if some were provided, and they are different than the current ones. | |
457 | + if ($currentReleaseNotes -ne $ReleaseNotes) | |
458 | + { | |
459 | + Set-NuSpecReleaseNotes -NuSpecFilePath $NuSpecFilePath -NewReleaseNotes $ReleaseNotes | |
460 | + } | |
461 | + | |
462 | + Write-Verbose "Finished process to update the nuspec file '$NuSpecFilePath'." | |
463 | +} | |
464 | + | |
465 | +function Get-NuSpecVersionNumber([parameter(Position=1,Mandatory=$true)][ValidateScript({Test-Path $_ -PathType Leaf})][string] $NuSpecFilePath) | |
466 | +{ | |
467 | + # Read in the file contents and return the version element's value. | |
468 | + $fileContents = New-Object System.Xml.XmlDocument | |
469 | + $fileContents.Load($NuSpecFilePath) | |
470 | + return Get-XmlElementsTextValue -XmlDocument $fileContents -ElementPath "package.metadata.version" | |
471 | +} | |
472 | + | |
473 | +function Set-NuSpecVersionNumber([parameter(Position=1,Mandatory=$true)][ValidateScript({Test-Path $_ -PathType Leaf})][string] $NuSpecFilePath, [parameter(Position=2,Mandatory=$true)][string] $NewVersionNumber) | |
474 | +{ | |
475 | + # Read in the file contents, update the version element's value, and save the file. | |
476 | + $fileContents = New-Object System.Xml.XmlDocument | |
477 | + $fileContents.Load($NuSpecFilePath) | |
478 | + Set-XmlElementsTextValue -XmlDocument $fileContents -ElementPath "package.metadata.version" -TextValue $NewVersionNumber | |
479 | + $fileContents.Save($NuSpecFilePath) | |
480 | +} | |
481 | + | |
482 | +function Get-NuSpecReleaseNotes([parameter(Position=1,Mandatory=$true)][ValidateScript({Test-Path $_ -PathType Leaf})][string] $NuSpecFilePath) | |
483 | +{ | |
484 | + # Read in the file contents and return the version element's value. | |
485 | + $fileContents = New-Object System.Xml.XmlDocument | |
486 | + $fileContents.Load($NuSpecFilePath) | |
487 | + return Get-XmlElementsTextValue -XmlDocument $fileContents -ElementPath "package.metadata.releaseNotes" | |
488 | +} | |
489 | + | |
490 | +function Set-NuSpecReleaseNotes([parameter(Position=1,Mandatory=$true)][ValidateScript({Test-Path $_ -PathType Leaf})][string] $NuSpecFilePath, [parameter(Position=2)][string] $NewReleaseNotes) | |
491 | +{ | |
492 | + # Read in the file contents, update the version element's value, and save the file. | |
493 | + $fileContents = New-Object System.Xml.XmlDocument | |
494 | + $fileContents.Load($NuSpecFilePath) | |
495 | + Set-XmlElementsTextValue -XmlDocument $fileContents -ElementPath "package.metadata.releaseNotes" -TextValue $NewReleaseNotes | |
496 | + $fileContents.Save($NuSpecFilePath) | |
497 | +} | |
498 | + | |
499 | +function Get-XmlNamespaceManager([xml]$XmlDocument, [string]$NamespaceURI = "") | |
500 | +{ | |
501 | + # If a Namespace URI was not given, use the Xml document's default namespace. | |
502 | + if ([string]::IsNullOrEmpty($NamespaceURI)) { $NamespaceURI = $XmlDocument.DocumentElement.NamespaceURI } | |
503 | + | |
504 | + # In order for SelectSingleNode() to actually work, we need to use the fully qualified node path along with an Xml Namespace Manager, so set them up. | |
505 | + [System.Xml.XmlNamespaceManager]$xmlNsManager = New-Object System.Xml.XmlNamespaceManager($XmlDocument.NameTable) | |
506 | + $xmlNsManager.AddNamespace("ns", $NamespaceURI) | |
507 | + return ,$xmlNsManager # Need to put the comma before the variable name so that PowerShell doesn't convert it into an Object[]. | |
508 | +} | |
509 | + | |
510 | +function Get-FullyQualifiedXmlNodePath([string]$NodePath, [string]$NodeSeparatorCharacter = '.') | |
511 | +{ | |
512 | + return "/ns:$($NodePath.Replace($($NodeSeparatorCharacter), '/ns:'))" | |
513 | +} | |
514 | + | |
515 | +function Get-XmlNode([xml]$XmlDocument, [string]$NodePath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
516 | +{ | |
517 | + $xmlNsManager = Get-XmlNamespaceManager -XmlDocument $XmlDocument -NamespaceURI $NamespaceURI | |
518 | + [string]$fullyQualifiedNodePath = Get-FullyQualifiedXmlNodePath -NodePath $NodePath -NodeSeparatorCharacter $NodeSeparatorCharacter | |
519 | + | |
520 | + # Try and get the node, then return it. Returns $null if the node was not found. | |
521 | + $node = $XmlDocument.SelectSingleNode($fullyQualifiedNodePath, $xmlNsManager) | |
522 | + return $node | |
523 | +} | |
524 | + | |
525 | +function Get-XmlNodes([xml]$XmlDocument, [string]$NodePath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
526 | +{ | |
527 | + $xmlNsManager = Get-XmlNamespaceManager -XmlDocument $XmlDocument -NamespaceURI $NamespaceURI | |
528 | + [string]$fullyQualifiedNodePath = Get-FullyQualifiedXmlNodePath -NodePath $NodePath -NodeSeparatorCharacter $NodeSeparatorCharacter | |
529 | + | |
530 | + # Try and get the nodes, then return them. Returns $null if no nodes were found. | |
531 | + $nodes = $XmlDocument.SelectNodes($fullyQualifiedNodePath, $xmlNsManager) | |
532 | + return $nodes | |
533 | +} | |
534 | + | |
535 | +function Get-XmlElementsTextValue([xml]$XmlDocument, [string]$ElementPath, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
536 | +{ | |
537 | + # Try and get the node. | |
538 | + $node = Get-XmlNode -XmlDocument $XmlDocument -NodePath $ElementPath -NamespaceURI $NamespaceURI -NodeSeparatorCharacter $NodeSeparatorCharacter | |
539 | + | |
540 | + # If the node already exists, return its value, otherwise return null. | |
541 | + if ($node) { return $node.InnerText } else { return $null } | |
542 | +} | |
543 | + | |
544 | +function Set-XmlElementsTextValue([xml]$XmlDocument, [string]$ElementPath, [string]$TextValue, [string]$NamespaceURI = "", [string]$NodeSeparatorCharacter = '.') | |
545 | +{ | |
546 | + # Try and get the node. | |
547 | + $node = Get-XmlNode -XmlDocument $XmlDocument -NodePath $ElementPath -NamespaceURI $NamespaceURI -NodeSeparatorCharacter $NodeSeparatorCharacter | |
548 | + | |
549 | + # If the node already exists, update its value. | |
550 | + if ($node) | |
551 | + { | |
552 | + $node.InnerText = $TextValue | |
553 | + } | |
554 | + # Else the node doesn't exist yet, so create it with the given value. | |
555 | + else | |
556 | + { | |
557 | + # Create the new element with the given value. | |
558 | + $elementName = $ElementPath.Substring($ElementPath.LastIndexOf($NodeSeparatorCharacter) + 1) | |
559 | + $element = $XmlDocument.CreateElement($elementName, $XmlDocument.DocumentElement.NamespaceURI) | |
560 | + $textNode = $XmlDocument.CreateTextNode($TextValue) | |
561 | + $element.AppendChild($textNode) > $null | |
562 | + | |
563 | + # Try and get the parent node. | |
564 | + $parentNodePath = $ElementPath.Substring(0, $ElementPath.LastIndexOf($NodeSeparatorCharacter)) | |
565 | + $parentNode = Get-XmlNode -XmlDocument $XmlDocument -NodePath $parentNodePath -NamespaceURI $NamespaceURI -NodeSeparatorCharacter $NodeSeparatorCharacter | |
566 | + | |
567 | + if ($parentNode) | |
568 | + { | |
569 | + $parentNode.AppendChild($element) > $null | |
570 | + } | |
571 | + else | |
572 | + { | |
573 | + throw "$parentNodePath does not exist in the xml." | |
574 | + } | |
575 | + } | |
576 | +} | |
577 | + | |
578 | +# Show an Open File Dialog and return the file selected by the user. | |
579 | +function Read-OpenFileDialog([string]$WindowTitle, [string]$InitialDirectory, [string]$Filter = "All files (*.*)|*.*", [switch]$AllowMultiSelect) | |
580 | +{ | |
581 | + Add-Type -AssemblyName System.Windows.Forms | |
582 | + $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog | |
583 | + $openFileDialog.Title = $WindowTitle | |
584 | + if (!(Test-StringIsNullOrWhitespace $InitialDirectory)) { $openFileDialog.InitialDirectory = $InitialDirectory } | |
585 | + $openFileDialog.Filter = $Filter | |
586 | + if ($AllowMultiSelect) { $openFileDialog.MultiSelect = $true } | |
587 | + $openFileDialog.ShowHelp = $true # Without this line the ShowDialog() function may hang depending on system configuration and running from console vs. ISE. | |
588 | + $openFileDialog.ShowDialog() > $null | |
589 | + if ($AllowMultiSelect) { return $openFileDialog.Filenames } else { return $openFileDialog.Filename } | |
590 | +} | |
591 | + | |
592 | +# Show message box popup and return the button clicked by the user. | |
593 | +function Read-MessageBoxDialog([string]$Message, [string]$WindowTitle, [System.Windows.Forms.MessageBoxButtons]$Buttons = [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]$Icon = [System.Windows.Forms.MessageBoxIcon]::None) | |
594 | +{ | |
595 | + Add-Type -AssemblyName System.Windows.Forms | |
596 | + return [System.Windows.Forms.MessageBox]::Show($Message, $WindowTitle, $Buttons, $Icon) | |
597 | +} | |
598 | + | |
599 | +# Show input box popup and return the value entered by the user. | |
600 | +function Read-InputBoxDialog([string]$Message, [string]$WindowTitle, [string]$DefaultText) | |
601 | +{ | |
602 | + Add-Type -AssemblyName Microsoft.VisualBasic | |
603 | + return [Microsoft.VisualBasic.Interaction]::InputBox($Message, $WindowTitle, $DefaultText) | |
604 | +} | |
605 | + | |
606 | +function Read-MultiLineInputBoxDialog([string]$Message, [string]$WindowTitle, [string]$DefaultText) | |
607 | +{ | |
608 | +<# | |
609 | + .SYNOPSIS | |
610 | + Prompts the user with a multi-line input box and returns the text they enter, or null if they cancelled the prompt. | |
611 | + | |
612 | + .DESCRIPTION | |
613 | + Prompts the user with a multi-line input box and returns the text they enter, or null if they cancelled the prompt. | |
614 | + | |
615 | + .PARAMETER Message | |
616 | + The message to display to the user explaining what text we are asking them to enter. | |
617 | + | |
618 | + .PARAMETER WindowTitle | |
619 | + The text to display on the prompt window's title. | |
620 | + | |
621 | + .PARAMETER DefaultText | |
622 | + The default text to show in the input box. | |
623 | + | |
624 | + .EXAMPLE | |
625 | + $userText = Read-MultiLineInputDialog "Input some text please:" "Get User's Input" | |
626 | + | |
627 | + Shows how to create a simple prompt to get mutli-line input from a user. | |
628 | + | |
629 | + .EXAMPLE | |
630 | + # Setup the default multi-line address to fill the input box with. | |
631 | + $defaultAddress = @' | |
632 | + John Doe | |
633 | + 123 St. | |
634 | + Some Town, SK, Canada | |
635 | + A1B 2C3 | |
636 | + '@ | |
637 | + | |
638 | + $address = Read-MultiLineInputDialog "Please enter your full address, including name, street, city, and postal code:" "Get User's Address" $defaultAddress | |
639 | + if ($address -eq $null) | |
640 | + { | |
641 | + Write-Error "You pressed the Cancel button on the multi-line input box." | |
642 | + } | |
643 | + | |
644 | + Prompts the user for their address and stores it in a variable, pre-filling the input box with a default multi-line address. | |
645 | + If the user pressed the Cancel button an error is written to the console. | |
646 | + | |
647 | + .EXAMPLE | |
648 | + $inputText = Read-MultiLineInputDialog -Message "If you have a really long message you can break it apart`nover two lines with the powershell newline character:" -WindowTitle "Window Title" -DefaultText "Default text for the input box." | |
649 | + | |
650 | + Shows how to break the second parameter (Message) up onto two lines using the powershell newline character (`n). | |
651 | + If you break the message up into more than two lines the extra lines will be hidden behind or show ontop of the TextBox. | |
652 | + | |
653 | + .NOTES | |
654 | + Name: Show-MultiLineInputDialog | |
655 | + Author: Daniel Schroeder (originally based on the code shown at http://technet.microsoft.com/en-us/library/ff730941.aspx) | |
656 | + Version: 1.0 | |
657 | +#> | |
658 | + Add-Type -AssemblyName System.Drawing | |
659 | + Add-Type -AssemblyName System.Windows.Forms | |
660 | + | |
661 | + # Create the Label. | |
662 | + $label = New-Object System.Windows.Forms.Label | |
663 | + $label.Location = New-Object System.Drawing.Size(10,10) | |
664 | + $label.Size = New-Object System.Drawing.Size(280,20) | |
665 | + $label.AutoSize = $true | |
666 | + $label.Text = $Message | |
667 | + | |
668 | + # Create the TextBox used to capture the user's text. | |
669 | + $textBox = New-Object System.Windows.Forms.TextBox | |
670 | + $textBox.Location = New-Object System.Drawing.Size(10,40) | |
671 | + $textBox.Size = New-Object System.Drawing.Size(575,200) | |
672 | + $textBox.AcceptsReturn = $true | |
673 | + $textBox.AcceptsTab = $false | |
674 | + $textBox.Multiline = $true | |
675 | + $textBox.ScrollBars = 'Both' | |
676 | + $textBox.Text = $DefaultText | |
677 | + | |
678 | + # Create the OK button. | |
679 | + $okButton = New-Object System.Windows.Forms.Button | |
680 | + $okButton.Location = New-Object System.Drawing.Size(415,250) | |
681 | + $okButton.Size = New-Object System.Drawing.Size(75,25) | |
682 | + $okButton.Text = "OK" | |
683 | + $okButton.Add_Click({ $form.Tag = $textBox.Text; $form.Close() }) | |
684 | + | |
685 | + # Create the Cancel button. | |
686 | + $cancelButton = New-Object System.Windows.Forms.Button | |
687 | + $cancelButton.Location = New-Object System.Drawing.Size(510,250) | |
688 | + $cancelButton.Size = New-Object System.Drawing.Size(75,25) | |
689 | + $cancelButton.Text = "Cancel" | |
690 | + $cancelButton.Add_Click({ $form.Tag = $null; $form.Close() }) | |
691 | + | |
692 | + # Create the form. | |
693 | + $form = New-Object System.Windows.Forms.Form | |
694 | + $form.Text = $WindowTitle | |
695 | + $form.Size = New-Object System.Drawing.Size(610,320) | |
696 | + $form.FormBorderStyle = 'FixedSingle' | |
697 | + $form.StartPosition = "CenterScreen" | |
698 | + $form.AutoSizeMode = 'GrowAndShrink' | |
699 | + $form.Topmost = $True | |
700 | + $form.AcceptButton = $okButton | |
701 | + $form.CancelButton = $cancelButton | |
702 | + $form.ShowInTaskbar = $true | |
703 | + | |
704 | + # Add all of the controls to the form. | |
705 | + $form.Controls.Add($label) | |
706 | + $form.Controls.Add($textBox) | |
707 | + $form.Controls.Add($okButton) | |
708 | + $form.Controls.Add($cancelButton) | |
709 | + | |
710 | + # Initialize and show the form. | |
711 | + $form.Add_Shown({$form.Activate()}) | |
712 | + $form.ShowDialog() > $null # Trash the text of the button that was clicked. | |
713 | + | |
714 | + # Return the text that the user entered. | |
715 | + return $form.Tag | |
716 | +} | |
717 | + | |
718 | +function Get-TfExecutablePath | |
719 | +{ | |
720 | + # Get the latest visual studio IDE path. | |
721 | + $vsIdePath = "" | |
722 | + $vsCommonToolsPaths = @($env:VS140COMNTOOLS,$env:VS120COMNTOOLS,$env:VS110COMNTOOLS,$env:VS100COMNTOOLS) | |
723 | + $vsCommonToolsPaths = @($VsCommonToolsPaths | Where-Object {$_ -ne $null}) | |
724 | + | |
725 | + # Loop through each version from largest to smallest. | |
726 | + foreach ($vsCommonToolsPath in $vsCommonToolsPaths) | |
727 | + { | |
728 | + if ($vsCommonToolsPath -ne $null) | |
729 | + { | |
730 | + $vsIdePath = "${vsCommonToolsPath}..\IDE\" | |
731 | + break | |
732 | + } | |
733 | + } | |
734 | + | |
735 | + # Get the path to tf.exe, and return an empty string if the file does not exist. | |
736 | + $tfPath = "${vsIdePath}tf.exe" | |
737 | + if (!(Test-Path -Path $tfPath)) | |
738 | + { | |
739 | + Write-Verbose "Unable to find Visual Studio Common Tool Path, which is used to locate TF.exe." | |
740 | + return "" | |
741 | + } | |
742 | + | |
743 | + # Return the absolute path to tf.exe. | |
744 | + $tfPath = Resolve-Path $tfPath | |
745 | + return $tfPath | |
746 | +} | |
747 | + | |
748 | +function Tfs-Checkout | |
749 | +{ | |
750 | + [CmdletBinding()] | |
751 | + param | |
752 | + ( | |
753 | + [Parameter(Mandatory=$true, Position=0, HelpMessage="The local path to the file or folder to checkout from TFS source control.")] | |
754 | + [string]$Path, | |
755 | + | |
756 | + [switch]$Recursive | |
757 | + ) | |
758 | + | |
759 | + $tfPath = Get-TfExecutablePath | |
760 | + | |
761 | + # If we couldn't find TF.exe, just return without doing anything. | |
762 | + if (Test-StringIsNullOrWhitespace $tfPath) | |
763 | + { | |
764 | + Write-Verbose "Unable to locate TF.exe, so will skip attempting to check '$Path' out of TFS source control." | |
765 | + return | |
766 | + } | |
767 | + | |
768 | + # Construct the checkout command to run. | |
769 | + $tfCheckoutCommand = "& ""$tfPath"" checkout /lock:none ""$Path""" | |
770 | + if ($Recursive) { $tfCheckoutCommand += " /recursive" } | |
771 | + | |
772 | + # Check the file out of TFS, eating any output and errors. | |
773 | + Write-Verbose "About to run command '$tfCheckoutCommand'." | |
774 | + Invoke-Expression -Command $tfCheckoutCommand 2>&1 > $null | |
775 | +} | |
776 | + | |
777 | +function Tfs-IsItemCheckedOut | |
778 | +{ | |
779 | + [CmdletBinding()] | |
780 | + param | |
781 | + ( | |
782 | + [Parameter(Mandatory=$true, Position=0, HelpMessage="The local path to the file or folder to checkout from TFS source control.")] | |
783 | + [string]$Path, | |
784 | + | |
785 | + [switch]$Recursive | |
786 | + ) | |
787 | + | |
788 | + $tfPath = Get-TfExecutablePath | |
789 | + | |
790 | + # If we couldn't find TF.exe, just return without doing anything. | |
791 | + if (Test-StringIsNullOrWhitespace $tfPath) | |
792 | + { | |
793 | + Write-Verbose "Unable to locate TF.exe, so will skip attempting to check if '$Path' is checked out of TFS source control." | |
794 | + return $null | |
795 | + } | |
796 | + | |
797 | + # Construct the status command to run. | |
798 | + $tfStatusCommand = "& ""$tfPath"" status ""$Path""" | |
799 | + if ($Recursive) { $tfStatusCommand += " /recursive" } | |
800 | + | |
801 | + # Check the file out of TFS, capturing the output and errors. | |
802 | + Write-Verbose "About to run command '$tfStatusCommand'." | |
803 | + $status = (Invoke-Expression -Command $tfStatusCommand 2>&1) | |
804 | + | |
805 | + # Get the escaped path of the file or directory to search the status output for. | |
806 | + $escapedPath = $Path.Replace('\', '\\') | |
807 | + | |
808 | + # Examine the returned text to return if the given Path is checked out or not. | |
809 | + if ((Test-StringIsNullOrWhitespace $status) -or ($status -imatch $TF_EXE_NO_WORKING_FOLDER_MAPPING_ERROR_MESSAGE)) { return $null } # An error was returned, so likely TFS is not used for this item. | |
810 | + elseif ($status -imatch $TF_EXE_NO_PENDING_CHANGES_MESSAGE) { return $false } # The item was found in TFS, but is not checked out. | |
811 | + elseif ($status -imatch $escapedPath -and $status -imatch $TF_EXE_KEYWORD_IN_PENDING_CHANGES_MESSAGE) { return $true } # If the file path and "change(s)" are in the message then it means the path is checked out. | |
812 | + else { return $false } # Else we're not sure, so return that it is not checked out. | |
813 | +} | |
814 | + | |
815 | +function Tfs-Undo | |
816 | +{ | |
817 | + [CmdletBinding()] | |
818 | + param | |
819 | + ( | |
820 | + [Parameter(Mandatory=$true, Position=0, HelpMessage="The local path to the file or folder to undo from TFS source control.")] | |
821 | + [string]$Path, | |
822 | + | |
823 | + [switch]$Recursive | |
824 | + ) | |
825 | + | |
826 | + $tfPath = Get-TfExecutablePath | |
827 | + | |
828 | + # If we couldn't find TF.exe, just return without doing anything. | |
829 | + if (Test-StringIsNullOrWhitespace $tfPath) | |
830 | + { | |
831 | + Write-Verbose "Unable to locate TF.exe, so will skip attempting to undo '$Path' from TFS source control." | |
832 | + return | |
833 | + } | |
834 | + | |
835 | + # Construct the undo command to run. | |
836 | + $tfCheckoutCommand = "& ""$tfPath"" undo ""$Path"" /noprompt" | |
837 | + if ($Recursive) { $tfCheckoutCommand += " /recursive" } | |
838 | + | |
839 | + # Check the file out of TFS, eating any output and errors. | |
840 | + Write-Verbose "About to run command '$tfCheckoutCommand'." | |
841 | + Invoke-Expression -Command $tfCheckoutCommand 2>&1 > $null | |
842 | +} | |
843 | + | |
844 | +function Get-ProjectsAssociatedNuSpecFilePath([parameter(Position=1,Mandatory=$true)][ValidateScript({Test-Path $_ -PathType Leaf})][string]$ProjectFilePath) | |
845 | +{ | |
846 | + # Construct what the project's nuspec file path would be if it has one (i.e. a [Project File Name].nupsec file in the same directory as the project file). | |
847 | + $projectsNuSpecFilePath = Join-Path ([System.IO.Path]::GetDirectoryName($ProjectFilePath)) ([System.IO.Path]::GetFileNameWithoutExtension($ProjectFilePath)) | |
848 | + $projectsNuSpecFilePath += ".nuspec" | |
849 | + | |
850 | + # If this Project has a .nuspec that will be used to package with. | |
851 | + if (Test-Path $projectsNuSpecFilePath -PathType Leaf) | |
852 | + { | |
853 | + return $projectsNuSpecFilePath | |
854 | + } | |
855 | + return $null | |
856 | +} | |
857 | + | |
858 | +function Get-NuSpecsAssociatedProjectFilePath([parameter(Position=1,Mandatory=$true)][ValidateScript({Test-Path $_ -PathType Leaf})][string]$NuSpecFilePath) | |
859 | +{ | |
860 | + # Construct what the nuspec's associated project file path would be if it has one (i.e. a [NuSpec File Name].[project extension] file in the same directory as the .nuspec file). | |
861 | + $nuSpecsProjectFilePath = Join-Path ([System.IO.Path]::GetDirectoryName($NuSpecFilePath)) ([System.IO.Path]::GetFileNameWithoutExtension($NuSpecFilePath)) | |
862 | + | |
863 | + # Loop through each possible project extension type to see if it exists in the | |
864 | + foreach ($extension in $VALID_NUGET_PROJECT_TYPE_EXTENSIONS_ARRAY) | |
865 | + { | |
866 | + # If this .nuspec file has an associated Project that can be used to pack with, return the project's file path. | |
867 | + $nuSpecsProjectFilePath += $extension | |
868 | + if (Test-Path $nuSpecsProjectFilePath -PathType Leaf) | |
869 | + { | |
870 | + return $nuSpecsProjectFilePath | |
871 | + } | |
872 | + } | |
873 | + return $null | |
874 | +} | |
875 | + | |
876 | + | |
877 | +#========================================================== | |
878 | +# Perform the script tasks. | |
879 | +#========================================================== | |
880 | + | |
881 | +# Define some variables that we need to access within both the Try and Finally blocks of the script. | |
882 | +$script:nuSpecFileWasAlreadyCheckedOut = $false | |
883 | +$script:nuSpecFileContentsBeforeCheckout = $null | |
884 | +$script:nuSpecLastWriteTimeBeforeCheckout = $null | |
885 | + | |
886 | +# Display the time that this script started running. | |
887 | +$scriptStartTime = Get-Date | |
888 | +Write-Verbose "New-NuGetPackage script started running at $($scriptStartTime.TimeOfDay.ToString())." | |
889 | + | |
890 | +# Display the version of PowerShell being used to run the script, as this can help solve some problems that are hard to reproduce on other machines. | |
891 | +Write-Verbose "Using PowerShell Version: $($PSVersionTable.PSVersion.ToString())." | |
892 | + | |
893 | +try | |
894 | +{ | |
895 | + # If we should not show any prompts, disable them all. | |
896 | + if ($NoPrompt -or $NoPromptExceptOnError) | |
897 | + { | |
898 | + if ($NoPrompt) { $NoPromptForInputOnError = $true } | |
899 | + $NoPromptForPushPackageToNuGetGallery = $true | |
900 | + $NoPromptForReleaseNotes = $true | |
901 | + $NoPromptForVersionNumber = $true | |
902 | + } | |
903 | + | |
904 | + # If a path to a NuSpec, Project, or Package file to use was not provided, look for one in the same directory as this script or prompt for one. | |
905 | + if ((Test-StringIsNullOrWhitespace $NuSpecFilePath) -and (Test-StringIsNullOrWhitespace $ProjectFilePath) -and (Test-StringIsNullOrWhitespace $PackageFilePath)) | |
906 | + { | |
907 | + # Get all of the .nuspec files in the script's directory. | |
908 | + $nuSpecFiles = Get-ChildItem "$THIS_SCRIPTS_DIRECTORY_PATH\*" -Include "*.nuspec" -Name | |
909 | + | |
910 | + # Get all of the project files in the script's directory. | |
911 | + $projectFiles = Get-ChildItem "$THIS_SCRIPTS_DIRECTORY_PATH\*" -Include $VALID_NUGET_PROJECT_TYPE_EXTENSIONS_WITH_WILDCARD_ARRAY -Name | |
912 | + | |
913 | + # Get all of the NuGet package files in this script's directory. | |
914 | + $packageFiles = Get-ChildItem "$THIS_SCRIPTS_DIRECTORY_PATH\*" -Include "*.nupkg" -Name | |
915 | + | |
916 | + # Get the number of files found. | |
917 | + $numberOfNuSpecFilesFound = @($nuSpecFiles).Length | |
918 | + $numberOfProjectFilesFound = @($projectFiles).Length | |
919 | + $numberOfPackageFilesFound = @($packageFiles).Length | |
920 | + | |
921 | + # If we only found one project file and no package files, see if we should use the project file. | |
922 | + if (($numberOfProjectFilesFound -eq 1) -and ($numberOfPackageFilesFound -eq 0)) | |
923 | + { | |
924 | + $projectPath = Join-Path $THIS_SCRIPTS_DIRECTORY_PATH ($projectFiles | Select-Object -First 1) | |
925 | + $projectsNuSpecFilePath = Get-ProjectsAssociatedNuSpecFilePath -ProjectFilePath $projectPath | |
926 | + | |
927 | + # If we didn't find any .nuspec files, then use this project file. | |
928 | + if ($numberOfNuSpecFilesFound -eq 0) | |
929 | + { | |
930 | + $ProjectFilePath = $projectPath | |
931 | + } | |
932 | + # Else if we found one .nuspec file, see if we should use this project file. | |
933 | + elseif ($numberOfNuSpecFilesFound -eq 1) | |
934 | + { | |
935 | + # If the .nuspec file belongs to this project file, use this project file. | |
936 | + $nuSpecFilePathInThisScriptsDirectory = Join-Path $THIS_SCRIPTS_DIRECTORY_PATH ($nuSpecFiles | Select-Object -First 1) | |
937 | + if ((!(Test-StringIsNullOrWhitespace $projectsNuSpecFilePath)) -and ($projectsNuSpecFilePath -eq $nuSpecFilePathInThisScriptsDirectory)) | |
938 | + { | |
939 | + $ProjectFilePath = $projectPath | |
940 | + } | |
941 | + } | |
942 | + } | |
943 | + # Else if we only found one .nuspec file and no project or package files, use the .nuspec file. | |
944 | + elseif (($numberOfNuSpecFilesFound -eq 1) -and ($numberOfProjectFilesFound -eq 0) -and ($numberOfPackageFilesFound -eq 0)) | |
945 | + { | |
946 | + $NuSpecFilePath = Join-Path $THIS_SCRIPTS_DIRECTORY_PATH ($nuSpecFiles | Select-Object -First 1) | |
947 | + } | |
948 | + # Else if we only found one package file and no .nuspec or project files, use the package file. | |
949 | + elseif (($numberOfPackageFilesFound -eq 1) -and ($numberOfNuSpecFilesFound -eq 0) -and ($numberOfProjectFilesFound -eq 0)) | |
950 | + { | |
951 | + $PackageFilePath = Join-Path $THIS_SCRIPTS_DIRECTORY_PATH ($packageFiles | Select-Object -First 1) | |
952 | + } | |
953 | + | |
954 | + # If we didn't find a clear .nuspec, project, or package file to use, prompt for one. | |
955 | + if ((Test-StringIsNullOrWhitespace $NuSpecFilePath) -and (Test-StringIsNullOrWhitespace $ProjectFilePath) -and (Test-StringIsNullOrWhitespace $PackageFilePath)) | |
956 | + { | |
957 | + # If we should prompt directly from PowerShell. | |
958 | + if ($UsePowerShellPrompts) | |
959 | + { | |
960 | + # Construct the prompt message with all of the supported project extensions. | |
961 | + # $promptmessage should end up looking like: "Enter the path to the .nuspec or project file (.csproj, .vbproj, .fsproj) to pack, or the package file (.nupkg) to push" | |
962 | + $promptMessage = "Enter the path to the .nuspec or project file (" | |
963 | + foreach ($extension in $VALID_NUGET_PROJECT_TYPE_EXTENSIONS_ARRAY) | |
964 | + { | |
965 | + $promptMessage += "$extension, " | |
966 | + } | |
967 | + $promptMessage = $promptMessage.Substring(0, $promptMessage.Length - 2) # Trim off the last character, as it will be a ", ". | |
968 | + $promptMessage += ") to pack, or .nupkg file to push" | |
969 | + | |
970 | + $filePathToUse = Read-Host $promptMessage | |
971 | + $filePathToUse = $filePathToUse.Trim('"') | |
972 | + } | |
973 | + # Else use a nice GUI prompt. | |
974 | + else | |
975 | + { | |
976 | + # Construct the strings to use in the OpenFileDialog filter to allow all of the supported project file types. | |
977 | + # $filter should end up looking like: "NuSpec, package, and project files (*.nuspec, *.nupkg, *.csproj, *.vbproj, *.fsproj)|*.nuspec;*.nupkg;*.csproj;*.vbproj;*.fsproj" | |
978 | + $filterMessage = "NuSpec and project files (*.nuspec, " | |
979 | + $filterTypes = "*.nuspec;*.nupkg;" | |
980 | + foreach ($extension in $VALID_NUGET_PROJECT_TYPE_EXTENSIONS_ARRAY) | |
981 | + { | |
982 | + $filterMessage += "*$extension, " | |
983 | + $filterTypes += "*$extension;" | |
984 | + } | |
985 | + $filterMessage = $filterMessage.Substring(0, $filterMessage.Length - 2) # Trim off the last 2 characters, as they will be a ", ". | |
986 | + $filterMessage += ")" | |
987 | + $filterTypes = $filterTypes.Substring(0, $filterTypes.Length - 1) # Trim off the last character, as it will be a ";". | |
988 | + $filter = "$filterMessage|$filterTypes" | |
989 | + | |
990 | + $filePathToUse = Read-OpenFileDialog -WindowTitle "Select the .nuspec or project file to pack, or the package file (.nupkg) to push..." -InitialDirectory $THIS_SCRIPTS_DIRECTORY_PATH -Filter $filter | |
991 | + } | |
992 | + | |
993 | + # If the user cancelled the file dialog, throw an error since we don't have a .nuspec file to use. | |
994 | + if (Test-StringIsNullOrWhitespace $filePathToUse) | |
995 | + { | |
996 | + throw "No .nuspec, project, or package file was specified. You must specify a valid file to use." | |
997 | + } | |
998 | + | |
999 | + # If a .nuspec file was specified, double check that we should use it. | |
1000 | + if ([System.IO.Path]::GetExtension($filePathToUse) -eq ".nuspec") | |
1001 | + { | |
1002 | + # If this .nuspec file is associated with a project file, prompt to see if they want to pack the project instead (as that is preferred). | |
1003 | + $projectPath = Get-NuSpecsAssociatedProjectFilePath -NuSpecFilePath $filePathToUse | |
1004 | + if (!(Test-StringIsNullOrWhitespace $projectPath)) | |
1005 | + { | |
1006 | + # If we are not allowed to prompt the user, just assume we should only use the .nuspec file. | |
1007 | + if ($NoPrompt) | |
1008 | + { | |
1009 | + $answer = "No" | |
1010 | + } | |
1011 | + # Else prompt the user if they want to pack the project file instead. | |
1012 | + else | |
1013 | + { | |
1014 | + $promptMessage = "The selected .nuspec file appears to be associated with the project file:`n`n$projectPath`n`nIt is generally preferred to pack the project file, and the .nuspec file will automatically get picked up.`nDo you want to pack the project file instead?" | |
1015 | + | |
1016 | + # If we should prompt directly from PowerShell. | |
1017 | + if ($UsePowerShellPrompts) | |
1018 | + { | |
1019 | + $promptMessage += " (Yes|No|Cancel)" | |
1020 | + $answer = Read-Host $promptMessage | |
1021 | + } | |
1022 | + # Else use a nice GUI prompt. | |
1023 | + else | |
1024 | + { | |
1025 | + $answer = Read-MessageBoxDialog -Message $promptMessage -WindowTitle "Pack using the Project file instead?" -Buttons YesNoCancel -Icon Question | |
1026 | + } | |
1027 | + } | |
1028 | + | |
1029 | + # If the user wants to use the Project file, use it. | |
1030 | + if (($answer -is [string] -and $answer.StartsWith("Y", [System.StringComparison]::InvariantCultureIgnoreCase)) -or $answer -eq [System.Windows.Forms.DialogResult]::Yes) | |
1031 | + { | |
1032 | + $ProjectFilePath = $projectPath | |
1033 | + } | |
1034 | + # Else if the user wants to use the .nuspec file, use it. | |
1035 | + elseif (($answer -is [string] -and $answer.StartsWith("N", [System.StringComparison]::InvariantCultureIgnoreCase)) -or $answer -eq [System.Windows.Forms.DialogResult]::No) | |
1036 | + { | |
1037 | + $NuSpecFilePath = $filePathToUse | |
1038 | + } | |
1039 | + # Else the user cancelled the prompt, so exit the script. | |
1040 | + else | |
1041 | + { | |
1042 | + throw "User cancelled the .nuspec or project file prompt, so exiting script." | |
1043 | + } | |
1044 | + } | |
1045 | + # Else this .nuspec file is not associated with a project file, so use the .nuspec file. | |
1046 | + else | |
1047 | + { | |
1048 | + $NuSpecFilePath = $filePathToUse | |
1049 | + } | |
1050 | + } | |
1051 | + # Else if a package file was specified. | |
1052 | + elseif ([System.IO.Path]::GetExtension($filePathToUse) -eq ".nupkg") | |
1053 | + { | |
1054 | + $PackageFilePath = $filePathToUse | |
1055 | + } | |
1056 | + # Else a .nuspec or package file was not specified, so assume it is a project file. | |
1057 | + else | |
1058 | + { | |
1059 | + $ProjectFilePath = $filePathToUse | |
1060 | + } | |
1061 | + } | |
1062 | + } | |
1063 | + | |
1064 | + # Make sure we have the absolute file paths. | |
1065 | + if (!(Test-StringIsNullOrWhitespace $NuSpecFilePath)) { $NuSpecFilePath = Resolve-Path $NuSpecFilePath } | |
1066 | + if (!(Test-StringIsNullOrWhitespace $ProjectFilePath)) { $ProjectFilePath = Resolve-Path $ProjectFilePath } | |
1067 | + if (!(Test-StringIsNullOrWhitespace $PackageFilePath)) { $PackageFilePath = Resolve-Path $PackageFilePath } | |
1068 | + | |
1069 | + # If a path to the NuGet executable was not provided, try and find it. | |
1070 | + if (Test-StringIsNullOrWhitespace $NuGetExecutableFilePath) | |
1071 | + { | |
1072 | + # If the NuGet executable is in the same directory as this script, use it. | |
1073 | + $nuGetExecutablePathInThisDirectory = Join-Path $THIS_SCRIPTS_DIRECTORY_PATH "NuGet.exe" | |
1074 | + if (Test-Path $nuGetExecutablePathInThisDirectory) | |
1075 | + { | |
1076 | + $NuGetExecutableFilePath = $nuGetExecutablePathInThisDirectory | |
1077 | + } | |
1078 | + # Else we don't know where the executable is, so assume it has been added to the PATH. | |
1079 | + else | |
1080 | + { | |
1081 | + $NuGetExecutableFilePath = "NuGet.exe" | |
1082 | + } | |
1083 | + } | |
1084 | + | |
1085 | + # If we should try and update the NuGet executable. | |
1086 | + if ($UpdateNuGetExecutable) | |
1087 | + { | |
1088 | + # If we have the path to the NuGet executable, try and check it out of TFS before having it update itself. | |
1089 | + if (Test-Path $NuGetExecutableFilePath) | |
1090 | + { | |
1091 | + # Try and check the NuGet executable out of TFS if needed. | |
1092 | + $nuGetExecutableWasAlreadyCheckedOut = Tfs-IsItemCheckedOut -Path $NuGetExecutableFilePath | |
1093 | + if ($nuGetExecutableWasAlreadyCheckedOut -eq $false) { Tfs-Checkout -Path $NuGetExecutableFilePath } | |
1094 | + } | |
1095 | + | |
1096 | + # Create the command to use to update NuGet.exe. | |
1097 | + $updateCommand = "& ""$NuGetExecutableFilePath"" update -self" | |
1098 | + | |
1099 | + # Have the NuGet executable try and auto-update itself. | |
1100 | + Write-Verbose "About to run Update command '$updateCommand'." | |
1101 | + $updateOutput = (Invoke-Expression -Command $updateCommand | Out-String).Trim() | |
1102 | + | |
1103 | + # Write the output of the above command to the Verbose stream. | |
1104 | + Write-Verbose $updateOutput | |
1105 | + | |
1106 | + # If we have the path to the NuGet executable, we checked it out of TFS, and it did not auto-update itself, then undo the changes from TFS. | |
1107 | + if ((Test-Path $NuGetExecutableFilePath) -and ($nuGetExecutableWasAlreadyCheckedOut -eq $false) -and !$updateOutput.EndsWith($NUGET_EXE_SUCCESSFULLY_UPDATED_TO_NEW_VERSION.Trim())) | |
1108 | + { | |
1109 | + Tfs-Undo -Path $NuGetExecutableFilePath | |
1110 | + } | |
1111 | + } | |
1112 | + | |
1113 | + # Get and display the version of NuGet.exe that will be used. If NuGet.exe is not found an exception will be thrown automatically. | |
1114 | + # Create the command to use to get the Nuget Help info. | |
1115 | + $helpCommand = "& ""$NuGetExecutableFilePath""" | |
1116 | + | |
1117 | + # Get the NuGet.exe Help output. | |
1118 | + Write-Verbose "About to run Help command '$helpCommand'." | |
1119 | + $helpOutput = (Invoke-Expression -Command $helpCommand | Out-String).Trim() | |
1120 | + | |
1121 | + # If no Help output was retrieved, the NuGet.exe likely returned an error. | |
1122 | + if (Test-StringIsNullOrWhitespace $helpOutput) | |
1123 | + { | |
1124 | + # Get the error information returned by NuGet.exe, and throw an error that we could not run NuGet.exe as expected. | |
1125 | + $helpError = (Invoke-Expression -Command $helpCommand 2>&1 | Out-String).Trim() | |
1126 | + throw "NuGet information could not be retrieved by running '$NuGetExecutableFilePath'.`r`n`r`nRunning '$NuGetExecutableFilePath' returns the following information:`r`n`r`n$helpError" | |
1127 | + } | |
1128 | + | |
1129 | + # Display the version of the NuGet.exe. This information is the first line of the NuGet Help output. | |
1130 | + $nuGetVersionLine = ($helpOutput -split "`r`n")[0] | |
1131 | + Write-Verbose "Using $($nuGetVersionLine)." | |
1132 | + | |
1133 | + # Force NuGet.exe to output English so that we can properly parse and match against it's output. | |
1134 | + # The -ForceEnglishOutput switch was only added in NuGet.exe v3.5, so default to using it, and remove it if the version is less than v3.5. | |
1135 | + $nuGetForceEnglishOutputSwitch = " -ForceEnglishOutput" | |
1136 | + $PackOptions += $nuGetForceEnglishOutputSwitch | |
1137 | + [array]$nuGetVersionParts = $null | |
1138 | + $nugetVersionMatch = $NUGET_EXE_VERSION_NUMBER_REGEX.Match($nuGetVersionLine) | |
1139 | + if ($nugetVersionMatch.Success) | |
1140 | + { | |
1141 | + # Get the version of NuGet.exe being used. | |
1142 | + $nuGetVersionString = $nugetVersionMatch.Groups["Version"].Value | |
1143 | + | |
1144 | + if (!(Test-StringIsNullOrWhitespace $nuGetVersionString)) | |
1145 | + { | |
1146 | + # If we are using a version of NuGet.exe less than v3.5, remove the switch to force English output. | |
1147 | + $nuGetVersionParts = $nuGetVersionString -split "\." | |
1148 | + if ($nuGetVersionParts.Count -ge 2) | |
1149 | + { | |
1150 | + if ($nuGetVersionParts[0] -le 2 -or ($nuGetVersionParts[0] -eq 3 -and $nuGetVersionParts[1] -lt 5)) | |
1151 | + { | |
1152 | + $PackOptions = $PackOptions.Replace($nuGetForceEnglishOutputSwitch, [string]::Empty) | |
1153 | + } | |
1154 | + } | |
1155 | + } | |
1156 | + } | |
1157 | + | |
1158 | + # If we weren't actually able to determine which version of NuGet.exe is being used, display a warning. | |
1159 | + if ($nuGetVersionParts -eq $null -or $nuGetVersionParts.Count -lt 2) | |
1160 | + { | |
1161 | + Write-Warning "Could not determine which version of NuGet.exe is being used." | |
1162 | + } | |
1163 | + | |
1164 | + # Declare the backup directory to create the NuGet Package in, as not all code paths will set it (i.e. when pushing an existing package), but we check it later. | |
1165 | + $defaultDirectoryPathToPutNuGetPackageIn = $null | |
1166 | + | |
1167 | + # If we were not given a package file, then we need to pack something. | |
1168 | + if (Test-StringIsNullOrWhitespace $PackageFilePath) | |
1169 | + { | |
1170 | + # If we were given a Project to package. | |
1171 | + if (!(Test-StringIsNullOrWhitespace $ProjectFilePath)) | |
1172 | + { | |
1173 | + # Get the project's .nuspec file path, if it has a .nuspec file. | |
1174 | + $projectNuSpecFilePath = Get-ProjectsAssociatedNuSpecFilePath -ProjectFilePath $ProjectFilePath | |
1175 | + | |
1176 | + # If this Project has a .nuspec that will be used to package with. | |
1177 | + if (!(Test-StringIsNullOrWhitespace $projectNuSpecFilePath)) | |
1178 | + { | |
1179 | + # Update .nuspec file based on user input. | |
1180 | + $NuSpecFilePath = $projectNuSpecFilePath | |
1181 | + Update-NuSpecFile | |
1182 | + } | |
1183 | + # Else we aren't using a .nuspec file, so if a Version Number was given in the script parameters but not the pack parameters, add it to the pack parameters. | |
1184 | + elseif (!(Test-StringIsNullOrWhitespace $VersionNumber) -and $PackOptions -notmatch '-Version') | |
1185 | + { | |
1186 | + $PackOptions += " -Version ""$VersionNumber""" | |
1187 | + } | |
1188 | + | |
1189 | + # Save the directory that the project file is in as the directory to create the package in. | |
1190 | + $defaultDirectoryPathToPutNuGetPackageIn = [System.IO.Path]::GetDirectoryName($ProjectFilePath) | |
1191 | + | |
1192 | + # Record that we want to pack using the project file, not a NuSpec file. | |
1193 | + $fileToPack = $ProjectFilePath | |
1194 | + } | |
1195 | + # Else we are supposed to package using just a NuSpec. | |
1196 | + else | |
1197 | + { | |
1198 | + # Update .nuspec file based on user input. | |
1199 | + Update-NuSpecFile | |
1200 | + | |
1201 | + # Save the directory that the .nuspec file is in as the directory to create the package in. | |
1202 | + $defaultDirectoryPathToPutNuGetPackageIn = [System.IO.Path]::GetDirectoryName($NuSpecFilePath) | |
1203 | + | |
1204 | + # Record that we want to pack using the NuSpec file, not a project file. | |
1205 | + $fileToPack = $NuSpecFilePath | |
1206 | + } | |
1207 | + | |
1208 | + # Make sure our backup Output Directory is an absolute path. | |
1209 | + if (![System.IO.Path]::IsPathRooted($defaultDirectoryPathToPutNuGetPackageIn)) | |
1210 | + { | |
1211 | + $defaultDirectoryPathToPutNuGetPackageIn = Resolve-Path $directoryToPackFrom | |
1212 | + } | |
1213 | + | |
1214 | + # When an Output Directory is not explicitly provided, we want to put generated packages into their own directory. | |
1215 | + $defaultDirectoryPathToPutNuGetPackageIn = Join-Path $defaultDirectoryPathToPutNuGetPackageIn $DEFAULT_DIRECTORY_TO_PUT_NUGET_PACKAGES_IN | |
1216 | + | |
1217 | + # If the user did not specify an Output Directory. | |
1218 | + if ($PackOptions -notmatch '-OutputDirectory') | |
1219 | + { | |
1220 | + # Insert our default Output Directory into the Additional Pack Options. | |
1221 | + Write-Verbose "Specifying to use the default Output Directory '$defaultDirectoryPathToPutNuGetPackageIn'." | |
1222 | + $PackOptions += " -OutputDirectory ""$defaultDirectoryPathToPutNuGetPackageIn""" | |
1223 | + | |
1224 | + # Make sure the Output Directory we are adding exists. | |
1225 | + if (!(Test-Path -Path $defaultDirectoryPathToPutNuGetPackageIn)) | |
1226 | + { | |
1227 | + New-Item -Path $defaultDirectoryPathToPutNuGetPackageIn -ItemType Directory > $null | |
1228 | + } | |
1229 | + } | |
1230 | + | |
1231 | + # Create the command to use to create the package. | |
1232 | + $packCommand = "& ""$NuGetExecutableFilePath"" pack ""$fileToPack"" $PackOptions" | |
1233 | + $packCommand = $packCommand -ireplace ';', '`;' # Escape any semicolons so they are not interpreted as the start of a new command. | |
1234 | + | |
1235 | + # Create the package. | |
1236 | + Write-Verbose "About to run Pack command '$packCommand'." | |
1237 | + $packOutput = (Invoke-Expression -Command $packCommand | Out-String).Trim() | |
1238 | + | |
1239 | + # Write the output of the above command to the Verbose stream. | |
1240 | + Write-Verbose $packOutput | |
1241 | + | |
1242 | + # Get the path the NuGet Package was created to, and write it to the output stream. | |
1243 | + $match = $NUGET_EXE_SUCCESSFULLY_CREATED_PACKAGE_MESSAGE_REGEX.Match($packOutput) | |
1244 | + if ($match.Success) | |
1245 | + { | |
1246 | + $nuGetPackageFilePath = $match.Groups["FilePath"].Value | |
1247 | + | |
1248 | + # Have this cmdlet return the path that the new NuGet Package was created to. | |
1249 | + # This should be the only code that uses Write-Output, as it is the only thing that should be returned by the cmdlet. | |
1250 | + Write-Output $nuGetPackageFilePath | |
1251 | + } | |
1252 | + else | |
1253 | + { | |
1254 | + throw "Could not determine where NuGet Package was created to. This typically means that an error occurred while NuGet.exe was packing it. Look for errors from NuGet.exe above (in the console window), or in the following NuGet.exe output. You can also try running this command with the -Verbose switch for more information:{0}{1}" -f [Environment]::NewLine, $packOutput | |
1255 | + } | |
1256 | + } | |
1257 | + # Else we were given a Package file to push. | |
1258 | + else | |
1259 | + { | |
1260 | + # Save the Package file path to push. | |
1261 | + $nuGetPackageFilePath = $PackageFilePath | |
1262 | + } | |
1263 | + | |
1264 | + # Get the Source to push the package to. | |
1265 | + # If the user explicitly provided the Source to push the package to, get it. | |
1266 | + $rxSourceToPushPackageTo = [regex] "(?i)((-Source|-src)\s+(?<Source>.*?)(\s+|$))" | |
1267 | + $match = $rxSourceToPushPackageTo.Match($PushOptions) | |
1268 | + if ($match.Success) | |
1269 | + { | |
1270 | + $sourceToPushPackageTo = $match.Groups["Source"].Value | |
1271 | + | |
1272 | + # Strip off any single or double quotes around the address. | |
1273 | + $sourceToPushPackageTo = $sourceToPushPackageTo.Trim([char[]]@("'", '"')) | |
1274 | + } | |
1275 | + # Else they did not provide an explicit source to push to, so set it to the default. | |
1276 | + else | |
1277 | + { | |
1278 | + # Assume they are pushing to the typical default source. | |
1279 | + $sourceToPushPackageTo = $DEFAULT_NUGET_SOURCE_TO_PUSH_TO | |
1280 | + | |
1281 | + # Update the PushOptions to include the default source (as -Source is now a required parameter as of NuGet.exe v3.4.2). | |
1282 | + $PushOptions = $PushOptions.Trim() + " -Source $sourceToPushPackageTo" | |
1283 | + } | |
1284 | + | |
1285 | + # If the switch to push the package to the gallery was not provided and we are allowed to prompt, prompt the user if they want to push the package. | |
1286 | + if (!$PushPackageToNuGetGallery -and !$NoPromptForPushPackageToNuGetGallery) | |
1287 | + { | |
1288 | + $promptMessage = "Do you want to push this package:`n'$nuGetPackageFilePath'`nto the NuGet Gallery '$sourceToPushPackageTo'?" | |
1289 | + | |
1290 | + # If we should prompt directly from PowerShell. | |
1291 | + if ($UsePowerShellPrompts) | |
1292 | + { | |
1293 | + $promptMessage += " (Yes|No)" | |
1294 | + $answer = Read-Host $promptMessage | |
1295 | + } | |
1296 | + # Else use a nice GUI prompt. | |
1297 | + else | |
1298 | + { | |
1299 | + $answer = Read-MessageBoxDialog -Message $promptMessage -WindowTitle "Push Package To Gallery?" -Buttons YesNo -Icon Question | |
1300 | + } | |
1301 | + | |
1302 | + # If the user wants to push the new package, record it. | |
1303 | + if (($answer -is [string] -and $answer.StartsWith("Y", [System.StringComparison]::InvariantCultureIgnoreCase)) -or $answer -eq [System.Windows.Forms.DialogResult]::Yes) | |
1304 | + { | |
1305 | + $PushPackageToNuGetGallery = $true | |
1306 | + } | |
1307 | + } | |
1308 | + | |
1309 | + # If we should push the Nuget package to the gallery. | |
1310 | + if ($PushPackageToNuGetGallery) | |
1311 | + { | |
1312 | + # If the user has not provided an API key. | |
1313 | + $UserProvidedApiKeyUsingPrompt = $false | |
1314 | + if ($PushOptions -notmatch '-ApiKey') | |
1315 | + { | |
1316 | + # Get the NuGet.config file contents as Xml. | |
1317 | + $nuGetConfigXml = New-Object System.Xml.XmlDocument | |
1318 | + $nuGetConfigXml.Load($NUGET_CONFIG_FILE_PATH) | |
1319 | + | |
1320 | + # If the user does not have an API key saved on this PC for the Source to push to, and prompts are allowed, prompt them for one. | |
1321 | + if (((Get-XmlNodes -XmlDocument $nuGetConfigXml -NodePath "configuration.apikeys.add" | Where-Object { $_.key -eq $sourceToPushPackageTo }) -eq $null) -and !$NoPrompt) | |
1322 | + { | |
1323 | + $promptMessage = "It appears that you do not have an API key saved on this PC for the source to push the package to '$sourceToPushPackageTo'.`n`nYou must provide an API key to push this package to the NuGet Gallery.`n`nPlease enter your API key" | |
1324 | + | |
1325 | + # If we should prompt directly from PowerShell. | |
1326 | + if ($UsePowerShellPrompts) | |
1327 | + { | |
1328 | + $apiKey = Read-Host $promptMessage | |
1329 | + } | |
1330 | + # Else use a nice GUI prompt. | |
1331 | + else | |
1332 | + { | |
1333 | + $apiKey = Read-InputBoxDialog -Message "$promptMessage`:" -WindowTitle "Enter Your API Key" | |
1334 | + } | |
1335 | + | |
1336 | + # If the user supplied an Api Key. | |
1337 | + if (!(Test-StringIsNullOrWhitespace $apiKey)) | |
1338 | + { | |
1339 | + # Add the given Api Key to the Push Options. | |
1340 | + $PushOptions += " -ApiKey $apiKey" | |
1341 | + | |
1342 | + # Record that the user provided the Api Key via a prompt. | |
1343 | + $UserProvidedApiKeyUsingPrompt = $true | |
1344 | + } | |
1345 | + } | |
1346 | + } | |
1347 | + | |
1348 | + # Create the command to use to push the package to the gallery. | |
1349 | + $pushCommand = "& ""$NuGetExecutableFilePath"" push ""$nuGetPackageFilePath"" $PushOptions" | |
1350 | + $pushCommand = $pushCommand -ireplace ';', '`;' # Escape any semicolons so they are not interpreted as the start of a new command. | |
1351 | + | |
1352 | + # Push the package to the gallery. | |
1353 | + Write-Verbose "About to run Push command '$pushCommand'." | |
1354 | + $pushOutput = (Invoke-Expression -Command $pushCommand | Out-String).Trim() | |
1355 | + | |
1356 | + # Write the output of the above command to the Verbose stream. | |
1357 | + Write-Verbose $pushOutput | |
1358 | + | |
1359 | + # If an error occurred while pushing the package, throw and error. Else it was pushed successfully. | |
1360 | + if (!$pushOutput.EndsWith($NUGET_EXE_SUCCESSFULLY_PUSHED_PACKAGE_MESSAGE.Trim())) | |
1361 | + { | |
1362 | + throw "Could not determine if package was pushed to gallery successfully. Perhaps an error occurred while pushing it. Look for errors from NuGet.exe above (in the console window), or in the following NuGet.exe output. You can also try running this command with the -Verbose switch for more information:{0}{1}" -f [Environment]::NewLine, $pushOutput | |
1363 | + } | |
1364 | + | |
1365 | + # If the package should be deleted. | |
1366 | + if ($DeletePackageAfterPush -and (Test-Path $nuGetPackageFilePath)) | |
1367 | + { | |
1368 | + # Delete the package. | |
1369 | + Write-Verbose "Deleting NuGet Package '$nuGetPackageFilePath'." | |
1370 | + Remove-Item -Path $nuGetPackageFilePath -Force | |
1371 | + | |
1372 | + # If the package was output to the default directory, and the directory is now empty, delete the default directory too since we would have created it above. | |
1373 | + if (!(Test-StringIsNullOrWhitespace $defaultDirectoryPathToPutNuGetPackageIn) -and (Test-Path -Path $defaultDirectoryPathToPutNuGetPackageIn)) | |
1374 | + { | |
1375 | + [int]$numberOfFilesInDefaultOutputDirectory = ((Get-ChildItem -Path $defaultDirectoryPathToPutNuGetPackageIn -Force) | Measure-Object).Count | |
1376 | + if ((Split-Path -Path $nuGetPackageFilePath -Parent) -eq $defaultDirectoryPathToPutNuGetPackageIn -and $numberOfFilesInDefaultOutputDirectory -eq 0) | |
1377 | + { | |
1378 | + Write-Verbose "Deleting empty default NuGet package directory '$defaultDirectoryPathToPutNuGetPackageIn'." | |
1379 | + Remove-Item -Path $defaultDirectoryPathToPutNuGetPackageIn -Force | |
1380 | + } | |
1381 | + } | |
1382 | + } | |
1383 | + | |
1384 | + # If the user provided the Api Key via a prompt from this script, prompt them for if they want to save the given API key on this PC. | |
1385 | + if ($UserProvidedApiKeyUsingPrompt) | |
1386 | + { | |
1387 | + # If we are not allowed to prompt the user, just assume they don't want to save the key on this PC. | |
1388 | + if ($NoPrompt) | |
1389 | + { | |
1390 | + $answer = "No" | |
1391 | + } | |
1392 | + # Else prompt the user if they want to save the given API key on this PC. | |
1393 | + else | |
1394 | + { | |
1395 | + $promptMessage = "Do you want to save the API key you provided on this PC so that you don't have to enter it again next time?" | |
1396 | + | |
1397 | + # If we should prompt directly from PowerShell. | |
1398 | + if ($UsePowerShellPrompts) | |
1399 | + { | |
1400 | + $promptMessage += " (Yes|No)" | |
1401 | + $answer = Read-Host $promptMessage | |
1402 | + } | |
1403 | + # Else use a nice GUI prompt. | |
1404 | + else | |
1405 | + { | |
1406 | + $answer = Read-MessageBoxDialog -Message $promptMessage -WindowTitle "Save API Key On This PC?" -Buttons YesNo -Icon Question | |
1407 | + } | |
1408 | + } | |
1409 | + | |
1410 | + # If the user wants to save the API key. | |
1411 | + if (($answer -is [string] -and $answer.StartsWith("Y", [System.StringComparison]::InvariantCultureIgnoreCase)) -or $answer -eq [System.Windows.Forms.DialogResult]::Yes) | |
1412 | + { | |
1413 | + # Create the command to use to save the Api key on this PC. | |
1414 | + $setApiKeyCommand = "& ""$NuGetExecutableFilePath"" setApiKey ""$apiKey"" -Source ""$sourceToPushPackageTo""" | |
1415 | + $setApiKeyCommand = $setApiKeyCommand -ireplace ';', '`;' # Escape any semicolons so they are not interpreted as the start of a new command. | |
1416 | + | |
1417 | + # Save the Api key on this PC. | |
1418 | + Write-Verbose "About to run command '$setApiKeyCommand'." | |
1419 | + $setApiKeyOutput = (Invoke-Expression -Command $setApiKeyCommand | Out-String).Trim() | |
1420 | + | |
1421 | + # Write the output of the above command to the Verbose stream. | |
1422 | + Write-Verbose $setApiKeyOutput | |
1423 | + | |
1424 | + # Determine if the API Key was saved successfully, and throw an error if it wasn't. | |
1425 | + $expectedSuccessfulNuGetSetApiKeyOutput = ($NUGET_EXE_SUCCESSFULLY_SAVED_API_KEY_MESSAGE -f $apiKey, $sourceToPushPackageTo) # "The API Key '$apiKey' was saved for '$sourceToPushPackageTo'." | |
1426 | + if ($setApiKeyOutput -ne $expectedSuccessfulNuGetSetApiKeyOutput.Trim()) | |
1427 | + { | |
1428 | + throw "Could not determine if the API key was saved successfully. Perhaps an error occurred while saving it. Look for errors from NuGet.exe above (in the console window), or in the following NuGet.exe output. You can also try running this command with the -Verbose switch for more information:{0}{1}" -f [Environment]::NewLine, $packOutput | |
1429 | + } | |
1430 | + } | |
1431 | + } | |
1432 | + } | |
1433 | +} | |
1434 | +finally | |
1435 | +{ | |
1436 | + Write-Verbose "Performing any required New-NuGetPackage script cleanup..." | |
1437 | + | |
1438 | + # If we have a NuSpec file path. | |
1439 | + if (!(Test-StringIsNullOrWhitespace $NuSpecFilePath)) | |
1440 | + { | |
1441 | + # If we should revert any changes we made to the NuSpec file. | |
1442 | + if ($DoNotUpdateNuSpecFile) | |
1443 | + { | |
1444 | + # If we created a backup of the NuSpec file before updating it, restore the backed up version. | |
1445 | + $backupNuSpecFilePath = Get-NuSpecBackupFilePath | |
1446 | + if (Test-Path $backupNuSpecFilePath -PathType Leaf) | |
1447 | + { | |
1448 | + Copy-Item -Path $backupNuSpecFilePath -Destination $NuSpecFilePath -Force | |
1449 | + Remove-Item -Path $backupNuSpecFilePath -Force | |
1450 | + } | |
1451 | + } | |
1452 | + | |
1453 | + # If we checked the NuSpec file out from TFS. | |
1454 | + if ((Test-Path $NuSpecFilePath) -and ($script:nuSpecFileWasAlreadyCheckedOut -eq $false)) | |
1455 | + { | |
1456 | + # If the NuSpec file should not be updated, or the contents have not been changed. | |
1457 | + $newNuSpecFileContents = [System.IO.File]::ReadAllText($NuSpecFilePath) | |
1458 | + if ($DoNotUpdateNuSpecFile -or ($script:nuSpecFileContentsBeforeCheckout -eq $newNuSpecFileContents)) | |
1459 | + { | |
1460 | + # Try and undo our checkout from TFS. | |
1461 | + Tfs-Undo -Path $NuSpecFilePath | |
1462 | + | |
1463 | + # Also reset the file's LastWriteTime so that MSBuild does not always rebuild the project because it thinks the .nuspec file was modified after the project's .pdb file. | |
1464 | + # If we recorded the NuSpec file's last write time, then reset it. | |
1465 | + if ($script:nuSpecLastWriteTimeBeforeCheckout -ne $null) | |
1466 | + { | |
1467 | + # We first have to make sure the file is writable before trying to set the LastWriteTime, and then restore the Read-Only attribute if it was set before. | |
1468 | + $nuspecFileInfo = New-Object System.IO.FileInfo($NuSpecFilePath) | |
1469 | + $nuspecFileIsReadOnly = $nuspecFileInfo.IsReadOnly | |
1470 | + $nuspecFileInfo.IsReadOnly = $false | |
1471 | + [System.IO.File]::SetLastWriteTime($NuSpecFilePath, $script:nuSpecLastWriteTimeBeforeCheckout) | |
1472 | + if ($nuspecFileIsReadOnly) { $nuspecFileInfo.IsReadOnly = $true } | |
1473 | + } | |
1474 | + } | |
1475 | + } | |
1476 | + } | |
1477 | +} | |
1478 | + | |
1479 | +# Display the time that this script finished running, and how long it took to run. | |
1480 | +$scriptFinishTime = Get-Date | |
1481 | +$scriptElapsedTimeInSeconds = ($scriptFinishTime - $scriptStartTime).TotalSeconds.ToString() | |
1482 | +Write-Verbose "New-NuGetPackage script finished running at $($scriptFinishTime.TimeOfDay.ToString()). Completed in $scriptElapsedTimeInSeconds seconds." | ... | ... |
Vrh.Web.Reporting/_CreateNewNuGetPackage/DoNotModify/UploadNuGetPackage.ps1
0 → 100644
... | ... | @@ -0,0 +1,46 @@ |
1 | +#========================================================== | |
2 | +# DO NOT EDIT THIS FILE. | |
3 | +# If you want to configure how your package is uploaded, modify the Config.ps1 file. | |
4 | +# To run this script from inside Visual Studio, right-click on the "RunMeToUploadNuGetPackage.cmd" file and choose "Run". | |
5 | +#========================================================== | |
6 | + | |
7 | +# Turn on Strict Mode to help catch syntax-related errors. | |
8 | +# This must come after a script's/function's param section. | |
9 | +# Forces a function to be the first non-comment code to appear in a PowerShell Module. | |
10 | +Set-StrictMode -Version Latest | |
11 | + | |
12 | +# PowerShell v2.0 compatible version of [string]::IsNullOrWhitespace. | |
13 | +function Test-StringIsNullOrWhitespace([string]$string) | |
14 | +{ | |
15 | + if ($string -ne $null) { $string = $string.Trim() } | |
16 | + return [string]::IsNullOrEmpty($string) | |
17 | +} | |
18 | + | |
19 | +# Get the directory that this script is in. | |
20 | +$THIS_SCRIPTS_DIRECTORY_PATH = Split-Path $script:MyInvocation.MyCommand.Path | |
21 | + | |
22 | +# Get the path to the Config file and dot source it into this script. | |
23 | +# The variables below should be defined in the Config file, but if they aren't we initialize them with default values. | |
24 | +$CONFIG_FILE_PATH = Join-Path -Path (Split-Path -Path $THIS_SCRIPTS_DIRECTORY_PATH -Parent) -ChildPath 'Config.ps1' | |
25 | +if (Test-Path -Path $CONFIG_FILE_PATH) { . $CONFIG_FILE_PATH } | |
26 | +else { Write-Warning "Could not find Config file at '$CONFIG_FILE_PATH'. Default values will be used instead." } | |
27 | + | |
28 | +# The NuGet gallery to upload to. If not provided, the DefaultPushSource in your NuGet.config file is used (typically nuget.org). | |
29 | +if (!(Test-Path Variable:Private:sourceToUploadTo) -or (Test-StringIsNullOrWhitespace $sourceToUploadTo)) { $sourceToUploadTo = ""; Write-Output "Using default Source To Upload To value." } | |
30 | +else { Write-Output "Using user-specified Source To Update To value '$sourceToUploadTo'." } | |
31 | + | |
32 | +# The API Key to use to upload the package to the gallery. If not provided and a system-level one does not exist for the specified Source, you will be prompted for it. | |
33 | +if (!(Test-Path Variable:Private:apiKey) -or (Test-StringIsNullOrWhitespace $apiKey)) { $apiKey = ""; Write-Output "Using default API Key value." } | |
34 | +else { Write-Output "Using user-specified API Key value [value not shown here for security purposes]." } | |
35 | + | |
36 | +# Specify any NuGet Push options to pass to nuget.exe. | |
37 | +# Do not specify the "-Source" or "-ApiKey" here; use the variables above. | |
38 | +if (!(Test-Path Variable:Private:pushOptions) -or (Test-StringIsNullOrWhitespace $pushOptions)) { $pushOptions = ""; Write-Output "Using default Push Options value." } | |
39 | +else { Write-Output "Using user-specified Push Options value '$pushOptions'." } | |
40 | + | |
41 | +# Add the Source and ApiKey to the Push Options if there were provided. | |
42 | +if (!(Test-StringIsNullOrWhitespace $sourceToUploadTo)) { $pushOptions += " -Source ""$sourceToUploadTo"" " } | |
43 | +if (!(Test-StringIsNullOrWhitespace $apiKey)) { $pushOptions += " -ApiKey ""$apiKey"" " } | |
44 | + | |
45 | +# Upload the new NuGet package. | |
46 | +& "$THIS_SCRIPTS_DIRECTORY_PATH\New-NuGetPackage.ps1" -PushOptions "$pushOptions" -Verbose | |
0 | 47 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/_CreateNewNuGetPackage/RunMeToUploadNuGetPackage.cmd
0 → 100644
... | ... | @@ -0,0 +1,9 @@ |
1 | +@ECHO OFF | |
2 | +REM === DO NOT EDIT THIS FILE === | |
3 | +REM Run this script to upload a NuGet package to the NuGet gallery. | |
4 | +REM When you run this script it will prompt you for a NuGet package file (.nupkg) and then upload it to the NuGet gallery. | |
5 | +REM The project's .nupkg file should be in the same directory as the project's .dll/.exe file (typically bin\Debug or bin\Release). | |
6 | +REM You may edit the Config.ps1 file to adjust the settings used to upload the package to the NuGet gallery. | |
7 | +REM To run this script from within Visual Studio, right-click on this file from the Solution Explorer and choose Run. | |
8 | +SET THIS_SCRIPTS_DIRECTORY=%~dp0 | |
9 | +PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%THIS_SCRIPTS_DIRECTORY%DoNotModify\UploadNuGetPackage.ps1'" | |
0 | 10 | \ No newline at end of file | ... | ... |
Vrh.Web.Reporting/packages.config
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | <package id="jQuery.Ajax.Unobtrusive" version="2.0.20710.0" targetFramework="net45" /> |
15 | 15 | <package id="jquery.datatables" version="1.10.15" targetFramework="net451" /> |
16 | 16 | <package id="jQuery.Fullcalendar" version="3.9.0" targetFramework="net451" /> |
17 | - <package id="jQuery.UI.Combined" version="1.12.1" targetFramework="net451" /> | |
17 | + <package id="jQuery.UI.Combined" version="1.13.2" targetFramework="net462" /> | |
18 | 18 | <package id="jQuery.Validation" version="1.19.5" targetFramework="net461" /> |
19 | 19 | <package id="jQuery.Validation.Unobtrusive" version="2.0.20710.0" targetFramework="net45" /> |
20 | 20 | <package id="Microsoft.AspNet.Mvc" version="5.2.9" targetFramework="net461" /> |
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | <package id="Microsoft.Owin" version="3.0.0" targetFramework="net461" /> |
35 | 35 | <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.0" targetFramework="net461" /> |
36 | 36 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net45" /> |
37 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net451" /> | |
37 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
38 | 38 | <package id="Microsoft.Web.Administration" version="11.1.0" targetFramework="net462" /> |
39 | 39 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net472" /> |
40 | 40 | <package id="Microsoft.Win32.Primitives" version="4.0.1" targetFramework="net462" /> |
... | ... | @@ -104,12 +104,12 @@ |
104 | 104 | <package id="System.Xml.XDocument" version="4.0.11" targetFramework="net462" /> |
105 | 105 | <package id="VRH.Common" version="3.0.0" targetFramework="net472" /> |
106 | 106 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net461" /> |
107 | - <package id="VRH.Log4Pro.WebTools" version="1.11.1" targetFramework="net472" /> | |
108 | - <package id="Vrh.Logger" version="2.10.0" targetFramework="net462" /> | |
109 | - <package id="Vrh.Membership" version="4.11.0" targetFramework="net461" /> | |
110 | - <package id="Vrh.Web.Common.Lib" version="2.19.3" targetFramework="net462" /> | |
107 | + <package id="VRH.Log4Pro.WebTools" version="1.12.5" targetFramework="net462" /> | |
108 | + <package id="Vrh.Logger" version="2.11.1" targetFramework="net462" /> | |
109 | + <package id="Vrh.Membership" version="4.13.0" targetFramework="net462" /> | |
110 | + <package id="Vrh.Web.Common.Lib" version="2.20.1" targetFramework="net462" /> | |
111 | 111 | <package id="Vrh.Web.FileManager" version="1.5.1" targetFramework="net472" /> |
112 | - <package id="Vrh.Web.Membership" version="4.8.2" targetFramework="net462" /> | |
112 | + <package id="Vrh.Web.Membership" version="4.10.0" targetFramework="net462" /> | |
113 | 113 | <package id="Vrh.Web.Menu" version="1.28.5" targetFramework="net461" /> |
114 | 114 | <package id="VRH.Web.Providers" version="2.0.2" targetFramework="net451" requireReinstallation="true" /> |
115 | 115 | <package id="Vrh.WebForm" version="2.7.1" targetFramework="net472" /> | ... | ... |
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.Web.iScheduler.Lib/Vrh.NugetModuls.Documentations/Vrh.Web.Common.Lib/ReadMe.md
... | ... | @@ -469,6 +469,19 @@ public RedisConnection(string redisConnectionString, bool isRequired = true) |
469 | 469 | |
470 | 470 | *** |
471 | 471 | ### Version History: |
472 | +#### 2.20.1 (2023.09.19) Patches: | |
473 | +- WebCommon.ErrorListBuilder mostantól saját kódot használ, nem a VRH.Common.ErrorListBuilder-ét. A VRH.Common.EF.ErrorListBuilder kód tartalmát használja, ami meg valamiért nem elérhető. | |
474 | + | |
475 | +#### 2.20.0 (2023.09.07) Compatible changes: | |
476 | +- DataTablesIn.DTColumn osztály kibővült egy OrderField nevű tulajdonsággal. | |
477 | +- DataTables.Order metódus módosítása, hogy ha ki van töltve az OrderField, akkor a rendezés arra történik. | |
478 | + | |
479 | +#### 2.19.5 (2023.08.10) Patches: | |
480 | +- DataTables.Filter metódus módosítása. Nullozható enumokra is helyesen működik. | |
481 | + | |
482 | +#### 2.19.4 (2023.07.18) Patches: | |
483 | +- DataTables.Filter metódus módosítása. Most már Guid típusú mező szűrésekor is helyesen működik. | |
484 | + | |
472 | 485 | #### 2.19.3 (2023.06.05) Patches: |
473 | 486 | - DataTables.Filter metódus módosítása. Enum összehasonlításkor volt típus konfliktus. |
474 | 487 | ... | ... |
Vrh.Web.iScheduler.Lib/Vrh.Web.iScheduler.Lib.csproj
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
141 | 141 | </Reference> |
142 | 142 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
143 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
143 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
144 | 144 | </Reference> |
145 | 145 | <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
146 | 146 | <HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.1\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
... | ... | @@ -259,11 +259,11 @@ |
259 | 259 | <Reference Include="VRH.Log4Pro.MultiLanguageManager, Version=3.21.3.0, Culture=neutral, processorArchitecture=MSIL"> |
260 | 260 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
261 | 261 | </Reference> |
262 | - <Reference Include="Vrh.Membership, Version=4.11.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
263 | - <HintPath>..\packages\Vrh.Membership.4.11.0\lib\net451\Vrh.Membership.dll</HintPath> | |
262 | + <Reference Include="Vrh.Membership, Version=4.13.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
263 | + <HintPath>..\packages\Vrh.Membership.4.13.0\lib\net451\Vrh.Membership.dll</HintPath> | |
264 | 264 | </Reference> |
265 | - <Reference Include="Vrh.Web.Common.Lib, Version=2.19.3.0, Culture=neutral, processorArchitecture=MSIL"> | |
266 | - <HintPath>..\packages\Vrh.Web.Common.Lib.2.19.3\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
265 | + <Reference Include="Vrh.Web.Common.Lib, Version=2.20.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
266 | + <HintPath>..\packages\Vrh.Web.Common.Lib.2.20.1\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
267 | 267 | </Reference> |
268 | 268 | <Reference Include="Vrh.Web.Providers, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL"> |
269 | 269 | <HintPath>..\packages\VRH.Web.Providers.2.0.2\lib\net451\Vrh.Web.Providers.dll</HintPath> |
... | ... | @@ -282,6 +282,7 @@ |
282 | 282 | <Compile Include="Attributes.cs" /> |
283 | 283 | <Compile Include="FullCalendarEvent.cs" /> |
284 | 284 | <Compile Include="ManagerCols.cs" /> |
285 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
285 | 286 | <Compile Include="StateTrans.cs" /> |
286 | 287 | <Compile Include="Properties\AssemblyInfo.cs" /> |
287 | 288 | </ItemGroup> |
... | ... | @@ -304,6 +305,15 @@ |
304 | 305 | <None Include="_CreateNewNuGetPackage\RunMeToUploadNuGetPackage.cmd" /> |
305 | 306 | </ItemGroup> |
306 | 307 | <ItemGroup> |
308 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
309 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
310 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
311 | + </Content> | |
312 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
313 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
314 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
315 | + </Content> | |
316 | + <Content Include="SqlServerTypes\readme.htm" /> | |
307 | 317 | <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> |
308 | 318 | <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> |
309 | 319 | <None Include="XmlParser.xml"> | ... | ... |
Vrh.Web.iScheduler.Lib/packages.config
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | <package id="Microsoft.Owin" version="3.0.0" targetFramework="net461" /> |
38 | 38 | <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.0" targetFramework="net461" /> |
39 | 39 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net451" /> |
40 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net451" /> | |
40 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
41 | 41 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net462" /> |
42 | 42 | <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" /> |
43 | 43 | <package id="PagedList" version="1.17.0.0" targetFramework="net451" /> |
... | ... | @@ -59,8 +59,8 @@ |
59 | 59 | <package id="System.ValueTuple" version="4.5.0" targetFramework="net461" /> |
60 | 60 | <package id="VRH.Common" version="3.0.0" targetFramework="net461" /> |
61 | 61 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net461" /> |
62 | - <package id="Vrh.Membership" version="4.11.0" targetFramework="net461" /> | |
63 | - <package id="Vrh.Web.Common.Lib" version="2.19.3" targetFramework="net462" /> | |
62 | + <package id="Vrh.Membership" version="4.13.0" targetFramework="net462" /> | |
63 | + <package id="Vrh.Web.Common.Lib" version="2.20.1" targetFramework="net462" /> | |
64 | 64 | <package id="VRH.Web.Providers" version="2.0.2" targetFramework="net451" requireReinstallation="true" /> |
65 | 65 | <package id="Vrh.XmlProcessing" version="1.32.0" targetFramework="net462" /> |
66 | 66 | <package id="WebGrease" version="1.6.0" targetFramework="net45" /> | ... | ... |
Vrh.Web.iScheduler.Report.Lib/SqlServerTypes/Loader.cs
0 → 100644
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
Vrh.Web.iScheduler.Report.Lib/SqlServerTypes/readme.htm
0 → 100644
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.Web.iScheduler.Report.Lib/Vrh.NugetModuls.Documentations/Vrh.Web.Common.Lib/ReadMe.md
... | ... | @@ -469,6 +469,19 @@ public RedisConnection(string redisConnectionString, bool isRequired = true) |
469 | 469 | |
470 | 470 | *** |
471 | 471 | ### Version History: |
472 | +#### 2.20.1 (2023.09.19) Patches: | |
473 | +- WebCommon.ErrorListBuilder mostantól saját kódot használ, nem a VRH.Common.ErrorListBuilder-ét. A VRH.Common.EF.ErrorListBuilder kód tartalmát használja, ami meg valamiért nem elérhető. | |
474 | + | |
475 | +#### 2.20.0 (2023.09.07) Compatible changes: | |
476 | +- DataTablesIn.DTColumn osztály kibővült egy OrderField nevű tulajdonsággal. | |
477 | +- DataTables.Order metódus módosítása, hogy ha ki van töltve az OrderField, akkor a rendezés arra történik. | |
478 | + | |
479 | +#### 2.19.5 (2023.08.10) Patches: | |
480 | +- DataTables.Filter metódus módosítása. Nullozható enumokra is helyesen működik. | |
481 | + | |
482 | +#### 2.19.4 (2023.07.18) Patches: | |
483 | +- DataTables.Filter metódus módosítása. Most már Guid típusú mező szűrésekor is helyesen működik. | |
484 | + | |
472 | 485 | #### 2.19.3 (2023.06.05) Patches: |
473 | 486 | - DataTables.Filter metódus módosítása. Enum összehasonlításkor volt típus konfliktus. |
474 | 487 | ... | ... |
Vrh.Web.iScheduler.Report.Lib/Vrh.Web.iScheduler.Report.Lib.csproj
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
56 | 56 | </Reference> |
57 | 57 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
58 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
58 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
59 | 59 | </Reference> |
60 | 60 | <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
61 | 61 | <HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.1\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
... | ... | @@ -113,11 +113,11 @@ |
113 | 113 | <Reference Include="VRH.Log4Pro.MultiLanguageManager, Version=3.21.3.0, Culture=neutral, processorArchitecture=MSIL"> |
114 | 114 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
115 | 115 | </Reference> |
116 | - <Reference Include="Vrh.Membership, Version=4.11.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
117 | - <HintPath>..\packages\Vrh.Membership.4.11.0\lib\net451\Vrh.Membership.dll</HintPath> | |
116 | + <Reference Include="Vrh.Membership, Version=4.13.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
117 | + <HintPath>..\packages\Vrh.Membership.4.13.0\lib\net451\Vrh.Membership.dll</HintPath> | |
118 | 118 | </Reference> |
119 | - <Reference Include="Vrh.Web.Common.Lib, Version=2.19.3.0, Culture=neutral, processorArchitecture=MSIL"> | |
120 | - <HintPath>..\packages\Vrh.Web.Common.Lib.2.19.3\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
119 | + <Reference Include="Vrh.Web.Common.Lib, Version=2.20.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
120 | + <HintPath>..\packages\Vrh.Web.Common.Lib.2.20.1\lib\net451\Vrh.Web.Common.Lib.dll</HintPath> | |
121 | 121 | </Reference> |
122 | 122 | <Reference Include="Vrh.Web.Providers, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL"> |
123 | 123 | <HintPath>..\packages\VRH.Web.Providers.2.0.2\lib\net451\Vrh.Web.Providers.dll</HintPath> |
... | ... | @@ -137,6 +137,7 @@ |
137 | 137 | <Compile Include="PackageCols.cs" /> |
138 | 138 | <Compile Include="Properties\AssemblyInfo.cs" /> |
139 | 139 | <Compile Include="Properties\CommonAssemblyInfo.cs" /> |
140 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
140 | 141 | </ItemGroup> |
141 | 142 | <ItemGroup> |
142 | 143 | <None Include="App.config" /> |
... | ... | @@ -154,9 +155,24 @@ |
154 | 155 | <None Include="_CreateNewNuGetPackage\DoNotModify\CreateNuGetPackage.ps1" /> |
155 | 156 | </ItemGroup> |
156 | 157 | <ItemGroup> |
158 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
159 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
160 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
161 | + </Content> | |
162 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\SqlServerSpatial110.dll"> | |
163 | + <Link>SqlServerTypes\x64\SqlServerSpatial110.dll</Link> | |
164 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
165 | + </Content> | |
166 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
167 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
168 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
169 | + </Content> | |
170 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\SqlServerSpatial110.dll"> | |
171 | + <Link>SqlServerTypes\x86\SqlServerSpatial110.dll</Link> | |
172 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
173 | + </Content> | |
157 | 174 | <Content Include="Content\PagedList.css" /> |
158 | - <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> | |
159 | - <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> | |
175 | + <Content Include="SqlServerTypes\readme.htm" /> | |
160 | 176 | <None Include="XmlParser.xml"> |
161 | 177 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
162 | 178 | </None> | ... | ... |
Vrh.Web.iScheduler.Report.Lib/packages.config
... | ... | @@ -7,15 +7,15 @@ |
7 | 7 | <package id="Microsoft.AspNet.Razor" version="3.2.9" targetFramework="net451" /> |
8 | 8 | <package id="Microsoft.AspNet.WebPages" version="3.2.9" targetFramework="net451" /> |
9 | 9 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net451" /> |
10 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net451" /> | |
10 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
11 | 11 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net451" /> |
12 | 12 | <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net451" /> |
13 | 13 | <package id="PagedList" version="1.17.0.0" targetFramework="net451" /> |
14 | 14 | <package id="PagedList.Mvc" version="4.5.0.0" targetFramework="net451" /> |
15 | 15 | <package id="VRH.Common" version="3.0.0" targetFramework="net451" /> |
16 | 16 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net451" /> |
17 | - <package id="Vrh.Membership" version="4.11.0" targetFramework="net451" /> | |
18 | - <package id="Vrh.Web.Common.Lib" version="2.19.3" targetFramework="net462" /> | |
17 | + <package id="Vrh.Membership" version="4.13.0" targetFramework="net462" /> | |
18 | + <package id="Vrh.Web.Common.Lib" version="2.20.1" targetFramework="net462" /> | |
19 | 19 | <package id="VRH.Web.Providers" version="2.0.2" targetFramework="net451" requireReinstallation="true" /> |
20 | 20 | <package id="Vrh.XmlProcessing" version="1.32.0" targetFramework="net462" /> |
21 | 21 | </packages> |
22 | 22 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.iScheduler.Report/Vrh.iScheduler.Report.csproj
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
54 | 54 | </Reference> |
55 | 55 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
56 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
56 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
57 | 57 | </Reference> |
58 | 58 | <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
59 | 59 | <HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.1\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
... | ... | @@ -111,8 +111,8 @@ |
111 | 111 | <Reference Include="VRH.Log4Pro.MultiLanguageManager, Version=3.21.3.0, Culture=neutral, processorArchitecture=MSIL"> |
112 | 112 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
113 | 113 | </Reference> |
114 | - <Reference Include="Vrh.Membership, Version=4.11.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
115 | - <HintPath>..\packages\Vrh.Membership.4.11.0\lib\net451\Vrh.Membership.dll</HintPath> | |
114 | + <Reference Include="Vrh.Membership, Version=4.13.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
115 | + <HintPath>..\packages\Vrh.Membership.4.13.0\lib\net451\Vrh.Membership.dll</HintPath> | |
116 | 116 | </Reference> |
117 | 117 | <Reference Include="Vrh.Web.Providers, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL"> |
118 | 118 | <HintPath>..\packages\VRH.Web.Providers.2.0.2\lib\net451\Vrh.Web.Providers.dll</HintPath> |
... | ... | @@ -149,6 +149,7 @@ |
149 | 149 | <Compile Include="Properties\AssemblyInfo.cs" /> |
150 | 150 | <Compile Include="ScheduleReportVariables.cs" /> |
151 | 151 | <Compile Include="SchedulerPlugin.cs" /> |
152 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
152 | 153 | <Compile Include="SRConstants.cs" /> |
153 | 154 | <Compile Include="SRGlobal.cs" /> |
154 | 155 | <Compile Include="SRWordCodes.cs" /> |
... | ... | @@ -181,9 +182,24 @@ |
181 | 182 | <None Include="Vrh.NugetModuls.Documentations\Vrh.XmlProcessing\ReadMe.md" /> |
182 | 183 | </ItemGroup> |
183 | 184 | <ItemGroup> |
185 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
186 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
187 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
188 | + </Content> | |
189 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\SqlServerSpatial110.dll"> | |
190 | + <Link>SqlServerTypes\x64\SqlServerSpatial110.dll</Link> | |
191 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
192 | + </Content> | |
193 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
194 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
195 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
196 | + </Content> | |
197 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\SqlServerSpatial110.dll"> | |
198 | + <Link>SqlServerTypes\x86\SqlServerSpatial110.dll</Link> | |
199 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
200 | + </Content> | |
184 | 201 | <Content Include="Content\PagedList.css" /> |
185 | - <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> | |
186 | - <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> | |
202 | + <Content Include="SqlServerTypes\readme.htm" /> | |
187 | 203 | <None Include="XmlParser.xml"> |
188 | 204 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
189 | 205 | </None> | ... | ... |
Vrh.iScheduler.Report/packages.config
... | ... | @@ -7,14 +7,14 @@ |
7 | 7 | <package id="Microsoft.AspNet.Razor" version="3.2.9" targetFramework="net451" /> |
8 | 8 | <package id="Microsoft.AspNet.WebPages" version="3.2.9" targetFramework="net451" /> |
9 | 9 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net451" /> |
10 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net451" /> | |
10 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
11 | 11 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net451" /> |
12 | 12 | <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net451" /> |
13 | 13 | <package id="PagedList" version="1.17.0.0" targetFramework="net451" /> |
14 | 14 | <package id="PagedList.Mvc" version="4.5.0.0" targetFramework="net451" /> |
15 | 15 | <package id="VRH.Common" version="3.0.0" targetFramework="net451" /> |
16 | 16 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net451" /> |
17 | - <package id="Vrh.Membership" version="4.11.0" targetFramework="net451" /> | |
17 | + <package id="Vrh.Membership" version="4.13.0" targetFramework="net462" /> | |
18 | 18 | <package id="VRH.Web.Providers" version="2.0.2" targetFramework="net451" requireReinstallation="true" /> |
19 | 19 | <package id="Vrh.XmlProcessing" version="1.32.0" targetFramework="net462" /> |
20 | 20 | </packages> |
21 | 21 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,45 @@ |
1 | +using System; | |
2 | +using System.IO; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +namespace SqlServerTypes | |
6 | +{ | |
7 | + /// <summary> | |
8 | + /// Utility methods related to CLR Types for SQL Server | |
9 | + /// </summary> | |
10 | + internal class Utilities | |
11 | + { | |
12 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] | |
13 | + private static extern IntPtr LoadLibrary(string libname); | |
14 | + | |
15 | + /// <summary> | |
16 | + /// Loads the required native assemblies for the current architecture (x86 or x64) | |
17 | + /// </summary> | |
18 | + /// <param name="rootApplicationPath"> | |
19 | + /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications | |
20 | + /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications. | |
21 | + /// </param> | |
22 | + public static void LoadNativeAssemblies(string rootApplicationPath) | |
23 | + { | |
24 | + var nativeBinaryPath = IntPtr.Size > 4 | |
25 | + ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\") | |
26 | + : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\"); | |
27 | + | |
28 | + LoadNativeAssembly(nativeBinaryPath, "msvcr100.dll"); | |
29 | + LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial110.dll"); | |
30 | + } | |
31 | + | |
32 | + private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName) | |
33 | + { | |
34 | + var path = Path.Combine(nativeBinaryPath, assemblyName); | |
35 | + var ptr = LoadLibrary(path); | |
36 | + if (ptr == IntPtr.Zero) | |
37 | + { | |
38 | + throw new Exception(string.Format( | |
39 | + "Error loading {0} (ErrorCode: {1})", | |
40 | + assemblyName, | |
41 | + Marshal.GetLastWin32Error())); | |
42 | + } | |
43 | + } | |
44 | + } | |
45 | +} | |
0 | 46 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,39 @@ |
1 | +<html lang="en-US"> | |
2 | +<head> | |
3 | + <meta charset="utf-8" /> | |
4 | + <title>Microsoft.SqlServer.Types</title> | |
5 | + <style> | |
6 | + body { | |
7 | + background: #fff; | |
8 | + color: #505050; | |
9 | + margin: 20px; | |
10 | + } | |
11 | + | |
12 | + #main { | |
13 | + background: #efefef; | |
14 | + padding: 5px 30px; | |
15 | + } | |
16 | + </style> | |
17 | +</head> | |
18 | +<body> | |
19 | + <div id="main"> | |
20 | + <h1>Action required to load native assemblies</h1> | |
21 | + <p> | |
22 | + To deploy an application that uses spatial data types to a machine that does not have 'System CLR Types for SQL Server' installed you also need to deploy the native assembly SqlServerSpatial110.dll. Both x86 (32 bit) and x64 (64 bit) versions of this assembly have been added to your project under the SqlServerTypes\x86 and SqlServerTypes\x64 subdirectories. The native assembly msvcr100.dll is also included in case the C++ runtime is not installed. | |
23 | + </p> | |
24 | + <p> | |
25 | + You need to add code to load the correct one of these assemblies at runtime (depending on the current architecture). | |
26 | + </p> | |
27 | + <h2>ASP.NET applications</h2> | |
28 | + <p> | |
29 | + For ASP.NET applications, add the following line of code to the Application_Start method in Global.asax.cs: | |
30 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(Server.MapPath("~/bin"));</pre> | |
31 | + </p> | |
32 | + <h2>Desktop applications</h2> | |
33 | + <p> | |
34 | + For desktop applications, add the following line of code to run before any spatial operations are performed: | |
35 | + <pre> SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);</pre> | |
36 | + </p> | |
37 | + </div> | |
38 | +</body> | |
39 | +</html> | |
0 | 40 | \ No newline at end of file | ... | ... |
Vrh.iScheduler/Vrh.iScheduler.csproj
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | <HintPath>..\packages\Microsoft.Report.Viewer.11.0.0.0\lib\net\Microsoft.ReportViewer.WebForms.DLL</HintPath> |
64 | 64 | </Reference> |
65 | 65 | <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL"> |
66 | - <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.0\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
66 | + <HintPath>..\packages\Microsoft.SqlServer.Types.11.0.2\lib\net20\Microsoft.SqlServer.Types.dll</HintPath> | |
67 | 67 | </Reference> |
68 | 68 | <Reference Include="Microsoft.Web.Infrastructure, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
69 | 69 | <HintPath>..\packages\Microsoft.Web.Infrastructure.2.0.1\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
... | ... | @@ -124,11 +124,11 @@ |
124 | 124 | <Reference Include="VRH.Log4Pro.MultiLanguageManager, Version=3.21.3.0, Culture=neutral, processorArchitecture=MSIL"> |
125 | 125 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
126 | 126 | </Reference> |
127 | - <Reference Include="Vrh.Logger, Version=2.10.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
128 | - <HintPath>..\packages\Vrh.Logger.2.10.0\lib\net451\Vrh.Logger.dll</HintPath> | |
127 | + <Reference Include="Vrh.Logger, Version=2.11.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
128 | + <HintPath>..\packages\Vrh.Logger.2.11.1\lib\net451\Vrh.Logger.dll</HintPath> | |
129 | 129 | </Reference> |
130 | - <Reference Include="Vrh.Membership, Version=4.11.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
131 | - <HintPath>..\packages\Vrh.Membership.4.11.0\lib\net451\Vrh.Membership.dll</HintPath> | |
130 | + <Reference Include="Vrh.Membership, Version=4.13.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
131 | + <HintPath>..\packages\Vrh.Membership.4.13.0\lib\net451\Vrh.Membership.dll</HintPath> | |
132 | 132 | </Reference> |
133 | 133 | <Reference Include="Vrh.Web.Providers, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL"> |
134 | 134 | <HintPath>..\packages\VRH.Web.Providers.2.0.2\lib\net451\Vrh.Web.Providers.dll</HintPath> |
... | ... | @@ -159,6 +159,7 @@ |
159 | 159 | <Compile Include="ScheduleExecute.cs" /> |
160 | 160 | <Compile Include="SchedulerDB.cs" /> |
161 | 161 | <Compile Include="SchedulerWordCodes.cs" /> |
162 | + <Compile Include="SqlServerTypes\Loader.cs" /> | |
162 | 163 | <Compile Include="XmlProcessing\ButtonElement.cs" /> |
163 | 164 | <Compile Include="XmlProcessing\iSchedulerXmlParser.cs" /> |
164 | 165 | <Compile Include="XmlProcessing\ManagerElement.cs" /> |
... | ... | @@ -187,6 +188,15 @@ |
187 | 188 | <None Include="_CreateNewNuGetPackage\Config.ps1" /> |
188 | 189 | </ItemGroup> |
189 | 190 | <ItemGroup> |
191 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> | |
192 | + <Link>SqlServerTypes\x64\msvcr100.dll</Link> | |
193 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
194 | + </Content> | |
195 | + <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x86\msvcr100.dll"> | |
196 | + <Link>SqlServerTypes\x86\msvcr100.dll</Link> | |
197 | + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |
198 | + </Content> | |
199 | + <Content Include="SqlServerTypes\readme.htm" /> | |
190 | 200 | <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> |
191 | 201 | <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> |
192 | 202 | <None Include="XmlParser.xml"> | ... | ... |
Vrh.iScheduler/packages.config
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <package id="Microsoft.Owin" version="3.0.0" targetFramework="net462" /> |
13 | 13 | <package id="Microsoft.Owin.Host.SystemWeb" version="3.0.0" targetFramework="net462" /> |
14 | 14 | <package id="Microsoft.Report.Viewer" version="11.0.0.0" targetFramework="net451" /> |
15 | - <package id="Microsoft.SqlServer.Types" version="11.0.0" targetFramework="net451" /> | |
15 | + <package id="Microsoft.SqlServer.Types" version="11.0.2" targetFramework="net462" /> | |
16 | 16 | <package id="Microsoft.Web.Infrastructure" version="2.0.1" targetFramework="net451" /> |
17 | 17 | <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net451" /> |
18 | 18 | <package id="Owin" version="1.0" targetFramework="net462" /> |
... | ... | @@ -20,8 +20,8 @@ |
20 | 20 | <package id="PagedList.Mvc" version="4.5.0.0" targetFramework="net451" /> |
21 | 21 | <package id="VRH.Common" version="3.0.0" targetFramework="net451" /> |
22 | 22 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net451" /> |
23 | - <package id="Vrh.Logger" version="2.10.0" targetFramework="net462" /> | |
24 | - <package id="Vrh.Membership" version="4.11.0" targetFramework="net451" /> | |
23 | + <package id="Vrh.Logger" version="2.11.1" targetFramework="net462" /> | |
24 | + <package id="Vrh.Membership" version="4.13.0" targetFramework="net462" /> | |
25 | 25 | <package id="VRH.Web.Providers" version="2.0.2" targetFramework="net451" requireReinstallation="true" /> |
26 | 26 | <package id="Vrh.XmlProcessing" version="1.32.0" targetFramework="net462" /> |
27 | 27 | </packages> |
28 | 28 | \ No newline at end of file | ... | ... |
iSchedulerMonitor/iSchedulerMonitor.ACPlugin.csproj
... | ... | @@ -118,11 +118,11 @@ |
118 | 118 | <Reference Include="VRH.Log4Pro.MultiLanguageManager, Version=3.21.3.0, Culture=neutral, processorArchitecture=MSIL"> |
119 | 119 | <HintPath>..\packages\VRH.Log4Pro.MultiLanguageManager.3.21.3\lib\net45\VRH.Log4Pro.MultiLanguageManager.dll</HintPath> |
120 | 120 | </Reference> |
121 | - <Reference Include="Vrh.Logger, Version=2.10.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
122 | - <HintPath>..\packages\Vrh.Logger.2.10.0\lib\net451\Vrh.Logger.dll</HintPath> | |
121 | + <Reference Include="Vrh.Logger, Version=2.11.1.0, Culture=neutral, processorArchitecture=MSIL"> | |
122 | + <HintPath>..\packages\Vrh.Logger.2.11.1\lib\net451\Vrh.Logger.dll</HintPath> | |
123 | 123 | </Reference> |
124 | - <Reference Include="Vrh.Membership, Version=4.11.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
125 | - <HintPath>..\packages\Vrh.Membership.4.11.0\lib\net451\Vrh.Membership.dll</HintPath> | |
124 | + <Reference Include="Vrh.Membership, Version=4.13.0.0, Culture=neutral, processorArchitecture=MSIL"> | |
125 | + <HintPath>..\packages\Vrh.Membership.4.13.0\lib\net451\Vrh.Membership.dll</HintPath> | |
126 | 126 | </Reference> |
127 | 127 | <Reference Include="VRH.Mockable.TimeProvider, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
128 | 128 | <HintPath>..\packages\VRH.Mockable.TimeProvider.1.0.0\lib\net45\VRH.Mockable.TimeProvider.dll</HintPath> |
... | ... | @@ -163,9 +163,6 @@ |
163 | 163 | <None Include="ApplicationContainer.Config.xml"> |
164 | 164 | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
165 | 165 | </None> |
166 | - <None Include="LogConfig.xml"> | |
167 | - <CopyToOutputDirectory>Always</CopyToOutputDirectory> | |
168 | - </None> | |
169 | 166 | <Content Include="..\packages\Microsoft.SqlServer.Types.11.0.2\nativeBinaries\x64\msvcr100.dll"> |
170 | 167 | <Link>SqlServerTypes\x64\msvcr100.dll</Link> |
171 | 168 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
... | ... | @@ -174,6 +171,9 @@ |
174 | 171 | <Link>SqlServerTypes\x86\msvcr100.dll</Link> |
175 | 172 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |
176 | 173 | </Content> |
174 | + <None Include="LogConfig.xml"> | |
175 | + <CopyToOutputDirectory>Always</CopyToOutputDirectory> | |
176 | + </None> | |
177 | 177 | <Content Include="SqlServerTypes\readme.htm" /> |
178 | 178 | <Content Include="SqlServerTypes\x64\SqlServerSpatial110.dll" /> |
179 | 179 | <Content Include="SqlServerTypes\x86\SqlServerSpatial110.dll" /> | ... | ... |
iSchedulerMonitor/packages.config
... | ... | @@ -16,8 +16,8 @@ |
16 | 16 | <package id="Vrh.ApplicationContainer.Control.Contract" version="0.1.0" targetFramework="net451" /> |
17 | 17 | <package id="VRH.Common" version="3.0.0" targetFramework="net451" /> |
18 | 18 | <package id="VRH.Log4Pro.MultiLanguageManager" version="3.21.3" targetFramework="net451" /> |
19 | - <package id="Vrh.Logger" version="2.10.0" targetFramework="net462" /> | |
20 | - <package id="Vrh.Membership" version="4.11.0" targetFramework="net451" /> | |
19 | + <package id="Vrh.Logger" version="2.11.1" targetFramework="net462" /> | |
20 | + <package id="Vrh.Membership" version="4.13.0" targetFramework="net462" /> | |
21 | 21 | <package id="VRH.Mockable.TimeProvider" version="1.0.0" targetFramework="net45" /> |
22 | 22 | <package id="VRH.Web.Providers" version="2.0.2" targetFramework="net451" requireReinstallation="true" /> |
23 | 23 | <package id="Vrh.XmlProcessing" version="1.32.0" targetFramework="net462" /> | ... | ... |