Add project files.
This commit is contained in:
parent
a5bad4fab0
commit
5ce3d1ce00
ISPChk.sln
ISPChk
Controllers
INetworkTest.csISPChk.csprojModels
NetworkTest.csProgram.csProperties
Startup.csWeatherForecast.csappsettings.Development.jsonappsettings.jsonispchk.dblibman.jsonwwwroot/bootstrap
LICENSEREADME.md
dist
css
bootstrap-grid.cssbootstrap-grid.css.mapbootstrap-grid.min.cssbootstrap-grid.min.css.mapbootstrap-reboot.cssbootstrap-reboot.css.mapbootstrap-reboot.min.cssbootstrap-reboot.min.css.mapbootstrap.cssbootstrap.css.mapbootstrap.min.cssbootstrap.min.css.map
js
js
dist
alert.jsalert.js.mapalert.min.jsbutton.jsbutton.js.mapbutton.min.jscarousel.jscarousel.js.mapcarousel.min.jscollapse.jscollapse.js.mapcollapse.min.jsdropdown.jsdropdown.js.mapdropdown.min.jsindex.jsindex.min.jsmodal.jsmodal.js.mapmodal.min.jspopover.jspopover.js.mappopover.min.jsscrollspy.jsscrollspy.js.mapscrollspy.min.jstab.jstab.js.maptab.min.jstoast.jstoast.js.maptoast.min.jstooltip.jstooltip.js.maptooltip.min.jsutil.jsutil.js.maputil.min.js
src
25
ISPChk.sln
Normal file
25
ISPChk.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30717.126
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISPChk", "ISPChk\ISPChk.csproj", "{351CDD95-2E5C-4F1B-83DC-C30113681710}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{351CDD95-2E5C-4F1B-83DC-C30113681710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{351CDD95-2E5C-4F1B-83DC-C30113681710}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{351CDD95-2E5C-4F1B-83DC-C30113681710}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{351CDD95-2E5C-4F1B-83DC-C30113681710}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {36EA520D-86A9-46B4-AFA7-8C00821B305B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
107
ISPChk/Controllers/HostController.cs
Normal file
107
ISPChk/Controllers/HostController.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ISPChk.Models;
|
||||
|
||||
namespace ISPChk.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class HostController : ControllerBase
|
||||
{
|
||||
private readonly ISPChkContext _context;
|
||||
|
||||
public HostController(ISPChkContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: api/Host
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<Host>>> GetHosts()
|
||||
{
|
||||
return await _context.Hosts.ToListAsync();
|
||||
}
|
||||
|
||||
// GET: api/Host/5
|
||||
[HttpGet("{id}")]
|
||||
public async Task<ActionResult<Host>> GetHost(long id)
|
||||
{
|
||||
var host = await _context.Hosts.FindAsync(id);
|
||||
|
||||
if (host == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return host;
|
||||
}
|
||||
|
||||
// PUT: api/Host/5
|
||||
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
|
||||
[HttpPut("{id}")]
|
||||
public async Task<IActionResult> PutHost(long id, Host host)
|
||||
{
|
||||
if (id != host.Id)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
_context.Entry(host).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!HostExists(id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
// POST: api/Host
|
||||
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<Host>> PostHost(Host host)
|
||||
{
|
||||
_context.Hosts.Add(host);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return CreatedAtAction("GetHost", new { id = host.Id }, host);
|
||||
}
|
||||
|
||||
// DELETE: api/Host/5
|
||||
[HttpDelete("{id}")]
|
||||
public async Task<IActionResult> DeleteHost(long id)
|
||||
{
|
||||
var host = await _context.Hosts.FindAsync(id);
|
||||
if (host == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
_context.Hosts.Remove(host);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
private bool HostExists(long id)
|
||||
{
|
||||
return _context.Hosts.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
39
ISPChk/Controllers/WeatherForecastController.cs
Normal file
39
ISPChk/Controllers/WeatherForecastController.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
private readonly ILogger<WeatherForecastController> _logger;
|
||||
|
||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
var rng = new Random();
|
||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = DateTime.Now.AddDays(index),
|
||||
TemperatureC = rng.Next(-20, 55),
|
||||
Summary = Summaries[rng.Next(Summaries.Length)]
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
11
ISPChk/INetworkTest.cs
Normal file
11
ISPChk/INetworkTest.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk
|
||||
{
|
||||
interface INetworkTest
|
||||
{
|
||||
}
|
||||
}
|
20
ISPChk/ISPChk.csproj
Normal file
20
ISPChk/ISPChk.csproj
Normal file
@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" NoWarn="NU1605" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.0" NoWarn="NU1605" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
14
ISPChk/Models/Host.cs
Normal file
14
ISPChk/Models/Host.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk.Models
|
||||
{
|
||||
public class Host
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string HostName { get; set; }
|
||||
}
|
||||
}
|
19
ISPChk/Models/ISPChkContext.cs
Normal file
19
ISPChk/Models/ISPChkContext.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk.Models
|
||||
{
|
||||
public class ISPChkContext : DbContext
|
||||
{
|
||||
public ISPChkContext(DbContextOptions<ISPChkContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<Host> Hosts { get; set; }
|
||||
public DbSet<PingItem> PingItems { get; set; }
|
||||
}
|
||||
}
|
17
ISPChk/Models/PingItem.cs
Normal file
17
ISPChk/Models/PingItem.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk.Models
|
||||
{
|
||||
public class PingItem
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long HostId { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public float Min { get; set; }
|
||||
public float Max { get; set; }
|
||||
public float Avg { get; set; }
|
||||
}
|
||||
}
|
19
ISPChk/NetworkTest.cs
Normal file
19
ISPChk/NetworkTest.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using ISPChk.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk
|
||||
{
|
||||
public class NetworkTest : INetworkTest
|
||||
{
|
||||
private ISPChkContext _context;
|
||||
|
||||
public NetworkTest()
|
||||
{
|
||||
//_context = new ISPChkContext("Data Source=ispchk.db");
|
||||
}
|
||||
}
|
||||
}
|
26
ISPChk/Program.cs
Normal file
26
ISPChk/Program.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>();
|
||||
});
|
||||
}
|
||||
}
|
31
ISPChk/Properties/launchSettings.json
Normal file
31
ISPChk/Properties/launchSettings.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:65025",
|
||||
"sslPort": 0
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "/",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"ISPChk": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "/",
|
||||
"applicationUrl": "http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
65
ISPChk/Startup.cs
Normal file
65
ISPChk/Startup.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using ISPChk.Models;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ISPChk
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddDbContext<ISPChkContext>(opt =>
|
||||
opt.UseSqlite("Data Source=ispchk.db"));
|
||||
services.AddControllers();
|
||||
services.AddSingleton<INetworkTest, NetworkTest>();
|
||||
services.AddSwaggerGen(c =>
|
||||
{
|
||||
c.SwaggerDoc("v1", new OpenApiInfo { Title = "ISPChk", Version = "v1" });
|
||||
});
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ISPChkContext context)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "ISPChk v1"));
|
||||
}
|
||||
|
||||
context.Database.EnsureCreated();
|
||||
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
15
ISPChk/WeatherForecast.cs
Normal file
15
ISPChk/WeatherForecast.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace ISPChk
|
||||
{
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string Summary { get; set; }
|
||||
}
|
||||
}
|
9
ISPChk/appsettings.Development.json
Normal file
9
ISPChk/appsettings.Development.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
10
ISPChk/appsettings.json
Normal file
10
ISPChk/appsettings.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
BIN
ISPChk/ispchk.db
Normal file
BIN
ISPChk/ispchk.db
Normal file
Binary file not shown.
15
ISPChk/libman.json
Normal file
15
ISPChk/libman.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"defaultProvider": "cdnjs",
|
||||
"libraries": [
|
||||
{
|
||||
"library": "jquery@3.5.1",
|
||||
"destination": "wwwroot/jquery/"
|
||||
},
|
||||
{
|
||||
"provider": "jsdelivr",
|
||||
"library": "bootstrap@4.6.0",
|
||||
"destination": "wwwroot/bootstrap/"
|
||||
}
|
||||
]
|
||||
}
|
22
ISPChk/wwwroot/bootstrap/LICENSE
Normal file
22
ISPChk/wwwroot/bootstrap/LICENSE
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2021 Twitter, Inc.
|
||||
Copyright (c) 2011-2021 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
209
ISPChk/wwwroot/bootstrap/README.md
Normal file
209
ISPChk/wwwroot/bootstrap/README.md
Normal file
@ -0,0 +1,209 @@
|
||||
<p align="center">
|
||||
<a href="https://getbootstrap.com/">
|
||||
<img src="https://getbootstrap.com/docs/4.6/assets/brand/bootstrap-solid.svg" alt="Bootstrap logo" width="72" height="72">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h3 align="center">Bootstrap</h3>
|
||||
|
||||
<p align="center">
|
||||
Sleek, intuitive, and powerful front-end framework for faster and easier web development.
|
||||
<br>
|
||||
<a href="https://getbootstrap.com/docs/4.6/"><strong>Explore Bootstrap docs »</strong></a>
|
||||
<br>
|
||||
<br>
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=bug_report.md">Report bug</a>
|
||||
·
|
||||
<a href="https://github.com/twbs/bootstrap/issues/new?template=feature_request.md">Request feature</a>
|
||||
·
|
||||
<a href="https://themes.getbootstrap.com/">Themes</a>
|
||||
·
|
||||
<a href="https://blog.getbootstrap.com/">Blog</a>
|
||||
</p>
|
||||
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Quick start](#quick-start)
|
||||
- [Status](#status)
|
||||
- [What's included](#whats-included)
|
||||
- [Bugs and feature requests](#bugs-and-feature-requests)
|
||||
- [Documentation](#documentation)
|
||||
- [Contributing](#contributing)
|
||||
- [Community](#community)
|
||||
- [Versioning](#versioning)
|
||||
- [Creators](#creators)
|
||||
- [Thanks](#thanks)
|
||||
- [Copyright and license](#copyright-and-license)
|
||||
|
||||
|
||||
## Quick start
|
||||
|
||||
Several quick start options are available:
|
||||
|
||||
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.6.0.zip)
|
||||
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`
|
||||
- Install with [npm](https://www.npmjs.com/): `npm install bootstrap`
|
||||
- Install with [yarn](https://yarnpkg.com/): `yarn add bootstrap@4.6.0`
|
||||
- Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.6.0`
|
||||
- Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass`
|
||||
|
||||
Read the [Getting started page](https://getbootstrap.com/docs/4.6/getting-started/introduction/) for information on the framework contents, templates and examples, and more.
|
||||
|
||||
|
||||
## Status
|
||||
|
||||
[](https://bootstrap-slack.herokuapp.com/)
|
||||
[](https://github.com/twbs/bootstrap/actions?query=workflow%3AJS+Tests+branch%3Av4-dev)
|
||||
[](https://www.npmjs.com/package/bootstrap)
|
||||
[](https://rubygems.org/gems/bootstrap)
|
||||
[](https://atmospherejs.com/twbs/bootstrap)
|
||||
[](https://packagist.org/packages/twbs/bootstrap)
|
||||
[](https://www.nuget.org/packages/bootstrap/absoluteLatest)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=peer)
|
||||
[](https://david-dm.org/twbs/bootstrap?type=dev)
|
||||
[](https://coveralls.io/github/twbs/bootstrap?branch=v4-dev)
|
||||
[](https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap.min.css)
|
||||
[](https://github.com/twbs/bootstrap/blob/v4-dev/dist/js/bootstrap.min.js)
|
||||
[](https://www.browserstack.com/automate/public-build/SkxZcStBeExEdVJqQ2hWYnlWckpkNmNEY213SFp6WHFETWk2bGFuY3pCbz0tLXhqbHJsVlZhQnRBdEpod3NLSDMzaHc9PQ==--3d0b75245708616eb93113221beece33e680b229)
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
|
||||
## What's included
|
||||
|
||||
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
|
||||
|
||||
```text
|
||||
bootstrap/
|
||||
└── dist/
|
||||
├── css/
|
||||
│ ├── bootstrap-grid.css
|
||||
│ ├── bootstrap-grid.css.map
|
||||
│ ├── bootstrap-grid.min.css
|
||||
│ ├── bootstrap-grid.min.css.map
|
||||
│ ├── bootstrap-reboot.css
|
||||
│ ├── bootstrap-reboot.css.map
|
||||
│ ├── bootstrap-reboot.min.css
|
||||
│ ├── bootstrap-reboot.min.css.map
|
||||
│ ├── bootstrap.css
|
||||
│ ├── bootstrap.css.map
|
||||
│ ├── bootstrap.min.css
|
||||
│ └── bootstrap.min.css.map
|
||||
└── js/
|
||||
├── bootstrap.bundle.js
|
||||
├── bootstrap.bundle.js.map
|
||||
├── bootstrap.bundle.min.js
|
||||
├── bootstrap.bundle.min.js.map
|
||||
├── bootstrap.js
|
||||
├── bootstrap.js.map
|
||||
├── bootstrap.min.js
|
||||
└── bootstrap.min.js.map
|
||||
```
|
||||
|
||||
We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). [source maps](https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Bundled JS files (`bootstrap.bundle.js` and minified `bootstrap.bundle.min.js`) include [Popper](https://popper.js.org/), but not [jQuery](https://jquery.com/).
|
||||
|
||||
|
||||
## Bugs and feature requests
|
||||
|
||||
Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Bootstrap's documentation, included in this repo in the root directory, is built with [Hugo](https://gohugo.io/) and publicly hosted on GitHub Pages at <https://getbootstrap.com/>. The docs may also be run locally.
|
||||
|
||||
Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). Working on our search? Be sure to set `debug: true` in `site/assets/js/search.js`.
|
||||
|
||||
### Running documentation locally
|
||||
|
||||
1. Run `npm install` to install the Node.js dependencies, including Hugo (the site builder).
|
||||
2. Run `npm run test` (or a specific npm script) to rebuild distributed CSS and JavaScript files, as well as our docs assets.
|
||||
3. Run `npm start` to compile CSS and JavaScript files, generate our docs, and watch for changes.
|
||||
4. Open `http://localhost:9001/` in your browser, and voilà.
|
||||
|
||||
Learn more about using Hugo by reading its [documentation](https://gohugo.io/documentation/).
|
||||
|
||||
### Documentation for previous releases
|
||||
|
||||
You can find all our previous releases docs on <https://getbootstrap.com/docs/versions/>.
|
||||
|
||||
[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/v4-dev/.github/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
|
||||
|
||||
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/v4-dev/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
|
||||
|
||||
Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/v4-dev/.editorconfig) for easy use in common text editors. Read more and download plugins at <https://editorconfig.org/>.
|
||||
|
||||
|
||||
## Community
|
||||
|
||||
Get updates on Bootstrap's development and chat with the project maintainers and community members.
|
||||
|
||||
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
|
||||
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com/).
|
||||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com/).
|
||||
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
|
||||
- Implementation help may be found at Stack Overflow (tagged [`bootstrap-4`](https://stackoverflow.com/questions/tagged/bootstrap-4)).
|
||||
- Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.
|
||||
|
||||
|
||||
## Versioning
|
||||
|
||||
For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](https://semver.org/). Sometimes we screw up, but we adhere to those rules whenever possible.
|
||||
|
||||
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com/) contain summaries of the most noteworthy changes made in each release.
|
||||
|
||||
|
||||
## Creators
|
||||
|
||||
**Mark Otto**
|
||||
|
||||
- <https://twitter.com/mdo>
|
||||
- <https://github.com/mdo>
|
||||
|
||||
**Jacob Thornton**
|
||||
|
||||
- <https://twitter.com/fat>
|
||||
- <https://github.com/fat>
|
||||
|
||||
|
||||
## Thanks
|
||||
|
||||
<a href="https://www.browserstack.com/">
|
||||
<img src="https://live.browserstack.com/images/opensource/browserstack-logo.svg" alt="BrowserStack Logo" width="192" height="42">
|
||||
</a>
|
||||
|
||||
Thanks to [BrowserStack](https://www.browserstack.com/) for providing the infrastructure that allows us to test in real browsers!
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/bootstrap#sponsor)]
|
||||
|
||||
[](https://opencollective.com/bootstrap/sponsor/0/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/1/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/2/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/3/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/4/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/5/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/6/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/7/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/8/website)
|
||||
[](https://opencollective.com/bootstrap/sponsor/9/website)
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/bootstrap#backer)]
|
||||
|
||||
[](https://opencollective.com/bootstrap#backers)
|
||||
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Code and documentation copyright 2011-2021 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/main/LICENSE). Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).
|
3872
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.css
vendored
Normal file
3872
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.css.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.min.css
vendored
Normal file
7
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.min.css.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-grid.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
325
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.css
vendored
Normal file
325
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.css
vendored
Normal file
@ -0,0 +1,325 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
line-height: 1.15;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
text-align: left;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
border-bottom: 0;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus:not(:focus-visible) {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button:not(:disabled),
|
||||
[type="button"]:not(:disabled),
|
||||
[type="reset"]:not(:disabled),
|
||||
[type="submit"]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.css.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
8
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.min.css
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors
|
||||
* Copyright 2011-2021 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.min.css.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap-reboot.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
10298
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.css
vendored
Normal file
10298
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.css.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.min.css
vendored
Normal file
7
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.min.css.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/css/bootstrap.min.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7045
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.js
vendored
Normal file
7045
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.min.js
vendored
Normal file
7
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.min.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.bundle.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4432
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.js
vendored
Normal file
4432
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.min.js
vendored
Normal file
7
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.min.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/dist/js/bootstrap.min.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
192
ISPChk/wwwroot/bootstrap/js/dist/alert.js
vendored
Normal file
192
ISPChk/wwwroot/bootstrap/js/dist/alert.js
vendored
Normal file
@ -0,0 +1,192 @@
|
||||
/*!
|
||||
* Bootstrap alert.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
|
||||
var EVENT_CLOSE = "close" + EVENT_KEY;
|
||||
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_ALERT = 'alert';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Alert = /*#__PURE__*/function () {
|
||||
function Alert(element) {
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Alert.prototype;
|
||||
|
||||
// Public
|
||||
_proto.close = function close(element) {
|
||||
var rootElement = this._element;
|
||||
|
||||
if (element) {
|
||||
rootElement = this._getRootElement(element);
|
||||
}
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._removeElement(rootElement);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getRootElement = function _getRootElement(element) {
|
||||
var selector = Util__default['default'].getSelectorFromElement(element);
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $__default['default'](element).closest("." + CLASS_NAME_ALERT)[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
};
|
||||
|
||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||
var closeEvent = $__default['default'].Event(EVENT_CLOSE);
|
||||
$__default['default'](element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
};
|
||||
|
||||
_proto._removeElement = function _removeElement(element) {
|
||||
var _this = this;
|
||||
|
||||
$__default['default'](element).removeClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (!$__default['default'](element).hasClass(CLASS_NAME_FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(element);
|
||||
$__default['default'](element).one(Util__default['default'].TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
};
|
||||
|
||||
_proto._destroyElement = function _destroyElement(element) {
|
||||
$__default['default'](element).detach().trigger(EVENT_CLOSED).remove();
|
||||
} // Static
|
||||
;
|
||||
|
||||
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default['default'](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
data[config](this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Alert._handleDismiss = function _handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
alertInstance.close(this);
|
||||
};
|
||||
};
|
||||
|
||||
_createClass(Alert, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Alert;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Alert._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Alert;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert._jQueryInterface;
|
||||
};
|
||||
|
||||
return Alert;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=alert.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/alert.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/alert.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/alert.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/alert.min.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/alert.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap alert.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Alert=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e),l=n(t);function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a="bs.alert",o=r.default.fn.alert,i=function(){function e(e){this._element=e}var t,n,o,i=e.prototype;return i.close=function(e){var t=this._element;e&&(t=this._getRootElement(e)),this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},i.dispose=function(){r.default.removeData(this._element,a),this._element=null},i._getRootElement=function(e){var t=l.default.getSelectorFromElement(e),n=!1;return t&&(n=document.querySelector(t)),n||(n=r.default(e).closest(".alert")[0]),n},i._triggerCloseEvent=function(e){var t=r.default.Event("close.bs.alert");return r.default(e).trigger(t),t},i._removeElement=function(e){var t=this;if(r.default(e).removeClass("show"),r.default(e).hasClass("fade")){var n=l.default.getTransitionDurationFromElement(e);r.default(e).one(l.default.TRANSITION_END,(function(n){return t._destroyElement(e,n)})).emulateTransitionEnd(n)}else this._destroyElement(e)},i._destroyElement=function(e){r.default(e).detach().trigger("closed.bs.alert").remove()},e._jQueryInterface=function(t){return this.each((function(){var n=r.default(this),l=n.data(a);l||(l=new e(this),n.data(a,l)),"close"===t&&l[t](this)}))},e._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},t=e,o=[{key:"VERSION",get:function(){return"4.6.0"}}],(n=null)&&u(t.prototype,n),o&&u(t,o),e}();return r.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',i._handleDismiss(new i)),r.default.fn.alert=i._jQueryInterface,r.default.fn.alert.Constructor=i,r.default.fn.alert.noConflict=function(){return r.default.fn.alert=o,i._jQueryInterface},i}));
|
||||
//# sourceMappingURL=/sm/f306c04a8600407ce207ec429f53c00135e5396d28453c3d62089a9a5fc94d17.map
|
234
ISPChk/wwwroot/bootstrap/js/dist/button.js
vendored
Normal file
234
ISPChk/wwwroot/bootstrap/js/dist/button.js
vendored
Normal file
@ -0,0 +1,234 @@
|
||||
/*!
|
||||
* Bootstrap button.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.jQuery));
|
||||
}(this, (function ($) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_BUTTON = 'btn';
|
||||
var CLASS_NAME_FOCUS = 'focus';
|
||||
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
|
||||
var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
|
||||
var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
|
||||
var SELECTOR_INPUT = 'input:not([type="hidden"])';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_BUTTON = '.btn';
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Button = /*#__PURE__*/function () {
|
||||
function Button(element) {
|
||||
this._element = element;
|
||||
this.shouldAvoidTriggerChange = false;
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Button.prototype;
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = $__default['default'](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
|
||||
|
||||
if (rootElement) {
|
||||
var input = this._element.querySelector(SELECTOR_INPUT);
|
||||
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
triggerChangeEvent = false;
|
||||
} else {
|
||||
var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
|
||||
|
||||
if (activeElement) {
|
||||
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
|
||||
if (input.type === 'checkbox' || input.type === 'radio') {
|
||||
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
if (!this.shouldAvoidTriggerChange) {
|
||||
$__default['default'](input).trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
input.focus();
|
||||
addAriaPressed = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
$__default['default'](this._element).toggleClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
|
||||
return this.each(function () {
|
||||
var $element = $__default['default'](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Button(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
data.shouldAvoidTriggerChange = avoidTriggerChange;
|
||||
|
||||
if (config === 'toggle') {
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Button, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Button;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = event.target;
|
||||
var initialButton = button;
|
||||
|
||||
if (!$__default['default'](button).hasClass(CLASS_NAME_BUTTON)) {
|
||||
button = $__default['default'](button).closest(SELECTOR_BUTTON)[0];
|
||||
}
|
||||
|
||||
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
|
||||
event.preventDefault(); // work around Firefox bug #1540995
|
||||
} else {
|
||||
var inputBtn = button.querySelector(SELECTOR_INPUT);
|
||||
|
||||
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
|
||||
event.preventDefault(); // work around Firefox bug #1540995
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
|
||||
Button._jQueryInterface.call($__default['default'](button), 'toggle', initialButton.tagName === 'INPUT');
|
||||
}
|
||||
}
|
||||
}).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = $__default['default'](event.target).closest(SELECTOR_BUTTON)[0];
|
||||
$__default['default'](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
|
||||
});
|
||||
$__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
|
||||
// ensure correct active class is set to match the controls' actual values/states
|
||||
// find all checkboxes/readio buttons inside data-toggle groups
|
||||
var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
|
||||
|
||||
for (var i = 0, len = buttons.length; i < len; i++) {
|
||||
var button = buttons[i];
|
||||
var input = button.querySelector(SELECTOR_INPUT);
|
||||
|
||||
if (input.checked || input.hasAttribute('checked')) {
|
||||
button.classList.add(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
button.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
} // find all button toggles
|
||||
|
||||
|
||||
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||
|
||||
for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
|
||||
var _button = buttons[_i];
|
||||
|
||||
if (_button.getAttribute('aria-pressed') === 'true') {
|
||||
_button.classList.add(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
_button.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Button._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Button;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Button._jQueryInterface;
|
||||
};
|
||||
|
||||
return Button;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=button.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/button.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/button.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/button.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/button.min.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/button.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap button.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Button=t(e.jQuery)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e);function n(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s="button",l="bs.button",i=a.default.fn[s],o="active",r='[data-toggle^="button"]',u='input:not([type="hidden"])',c=".btn",d=function(){function e(e){this._element=e,this.shouldAvoidTriggerChange=!1}var t,s,i,r=e.prototype;return r.toggle=function(){var e=!0,t=!0,n=a.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var s=this._element.querySelector(u);if(s){if("radio"===s.type)if(s.checked&&this._element.classList.contains(o))e=!1;else{var l=n.querySelector(".active");l&&a.default(l).removeClass(o)}e&&("checkbox"!==s.type&&"radio"!==s.type||(s.checked=!this._element.classList.contains(o)),this.shouldAvoidTriggerChange||a.default(s).trigger("change")),s.focus(),t=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(t&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(o)),e&&a.default(this._element).toggleClass(o))},r.dispose=function(){a.default.removeData(this._element,l),this._element=null},e._jQueryInterface=function(t,n){return this.each((function(){var s=a.default(this),i=s.data(l);i||(i=new e(this),s.data(l,i)),i.shouldAvoidTriggerChange=n,"toggle"===t&&i[t]()}))},t=e,i=[{key:"VERSION",get:function(){return"4.6.0"}}],(s=null)&&n(t.prototype,s),i&&n(t,i),e}();return a.default(document).on("click.bs.button.data-api",r,(function(e){var t=e.target,n=t;if(a.default(t).hasClass("btn")||(t=a.default(t).closest(c)[0]),!t||t.hasAttribute("disabled")||t.classList.contains("disabled"))e.preventDefault();else{var s=t.querySelector(u);if(s&&(s.hasAttribute("disabled")||s.classList.contains("disabled")))return void e.preventDefault();"INPUT"!==n.tagName&&"LABEL"===t.tagName||d._jQueryInterface.call(a.default(t),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",r,(function(e){var t=a.default(e.target).closest(c)[0];a.default(t).toggleClass("focus",/^focus(in)?$/.test(e.type))})),a.default(window).on("load.bs.button.data-api",(function(){for(var e=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),t=0,a=e.length;t<a;t++){var n=e[t],s=n.querySelector(u);s.checked||s.hasAttribute("checked")?n.classList.add(o):n.classList.remove(o)}for(var l=0,i=(e=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;l<i;l++){var r=e[l];"true"===r.getAttribute("aria-pressed")?r.classList.add(o):r.classList.remove(o)}})),a.default.fn[s]=d._jQueryInterface,a.default.fn[s].Constructor=d,a.default.fn[s].noConflict=function(){return a.default.fn[s]=i,d._jQueryInterface},d}));
|
||||
//# sourceMappingURL=/sm/8ae40b6e223460601201fa36a049eb3f846736e442acbb0827aef92605532e81.map
|
653
ISPChk/wwwroot/bootstrap/js/dist/carousel.js
vendored
Normal file
653
ISPChk/wwwroot/bootstrap/js/dist/carousel.js
vendored
Normal file
@ -0,0 +1,653 @@
|
||||
/*!
|
||||
* Bootstrap carousel.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'carousel';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.carousel';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
|
||||
|
||||
var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
|
||||
|
||||
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
|
||||
|
||||
var SWIPE_THRESHOLD = 40;
|
||||
var Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
slide: false,
|
||||
pause: 'hover',
|
||||
wrap: true,
|
||||
touch: true
|
||||
};
|
||||
var DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
keyboard: 'boolean',
|
||||
slide: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
};
|
||||
var DIRECTION_NEXT = 'next';
|
||||
var DIRECTION_PREV = 'prev';
|
||||
var DIRECTION_LEFT = 'left';
|
||||
var DIRECTION_RIGHT = 'right';
|
||||
var EVENT_SLIDE = "slide" + EVENT_KEY;
|
||||
var EVENT_SLID = "slid" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
|
||||
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
|
||||
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
|
||||
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
|
||||
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
|
||||
var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
|
||||
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
|
||||
var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
|
||||
var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_CAROUSEL = 'carousel';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_SLIDE = 'slide';
|
||||
var CLASS_NAME_RIGHT = 'carousel-item-right';
|
||||
var CLASS_NAME_LEFT = 'carousel-item-left';
|
||||
var CLASS_NAME_NEXT = 'carousel-item-next';
|
||||
var CLASS_NAME_PREV = 'carousel-item-prev';
|
||||
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
|
||||
var SELECTOR_ITEM = '.carousel-item';
|
||||
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
||||
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
||||
var SELECTOR_INDICATORS = '.carousel-indicators';
|
||||
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
|
||||
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
|
||||
var PointerType = {
|
||||
TOUCH: 'touch',
|
||||
PEN: 'pen'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Carousel = /*#__PURE__*/function () {
|
||||
function Carousel(element, config) {
|
||||
this._items = null;
|
||||
this._interval = null;
|
||||
this._activeElement = null;
|
||||
this._isPaused = false;
|
||||
this._isSliding = false;
|
||||
this.touchTimeout = null;
|
||||
this.touchStartX = 0;
|
||||
this.touchDeltaX = 0;
|
||||
this._config = this._getConfig(config);
|
||||
this._element = element;
|
||||
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
|
||||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
|
||||
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
|
||||
|
||||
this._addEventListeners();
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Carousel.prototype;
|
||||
|
||||
// Public
|
||||
_proto.next = function next() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(DIRECTION_NEXT);
|
||||
}
|
||||
};
|
||||
|
||||
_proto.nextWhenVisible = function nextWhenVisible() {
|
||||
var $element = $__default['default'](this._element); // Don't call next when the page isn't visible
|
||||
// or the carousel or its parent isn't visible
|
||||
|
||||
if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
|
||||
this.next();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.prev = function prev() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(DIRECTION_PREV);
|
||||
}
|
||||
};
|
||||
|
||||
_proto.pause = function pause(event) {
|
||||
if (!event) {
|
||||
this._isPaused = true;
|
||||
}
|
||||
|
||||
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
|
||||
Util__default['default'].triggerTransitionEnd(this._element);
|
||||
this.cycle(true);
|
||||
}
|
||||
|
||||
clearInterval(this._interval);
|
||||
this._interval = null;
|
||||
};
|
||||
|
||||
_proto.cycle = function cycle(event) {
|
||||
if (!event) {
|
||||
this._isPaused = false;
|
||||
}
|
||||
|
||||
if (this._interval) {
|
||||
clearInterval(this._interval);
|
||||
this._interval = null;
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._updateInterval();
|
||||
|
||||
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
|
||||
}
|
||||
};
|
||||
|
||||
_proto.to = function to(index) {
|
||||
var _this = this;
|
||||
|
||||
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
|
||||
|
||||
var activeIndex = this._getItemIndex(this._activeElement);
|
||||
|
||||
if (index > this._items.length - 1 || index < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
$__default['default'](this._element).one(EVENT_SLID, function () {
|
||||
return _this.to(index);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (activeIndex === index) {
|
||||
this.pause();
|
||||
this.cycle();
|
||||
return;
|
||||
}
|
||||
|
||||
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
|
||||
|
||||
this._slide(direction, this._items[index]);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'](this._element).off(EVENT_KEY);
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._items = null;
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
this._interval = null;
|
||||
this._isPaused = null;
|
||||
this._isSliding = null;
|
||||
this._activeElement = null;
|
||||
this._indicatorsElement = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._handleSwipe = function _handleSwipe() {
|
||||
var absDeltax = Math.abs(this.touchDeltaX);
|
||||
|
||||
if (absDeltax <= SWIPE_THRESHOLD) {
|
||||
return;
|
||||
}
|
||||
|
||||
var direction = absDeltax / this.touchDeltaX;
|
||||
this.touchDeltaX = 0; // swipe left
|
||||
|
||||
if (direction > 0) {
|
||||
this.prev();
|
||||
} // swipe right
|
||||
|
||||
|
||||
if (direction < 0) {
|
||||
this.next();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._config.keyboard) {
|
||||
$__default['default'](this._element).on(EVENT_KEYDOWN, function (event) {
|
||||
return _this2._keydown(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
$__default['default'](this._element).on(EVENT_MOUSEENTER, function (event) {
|
||||
return _this2.pause(event);
|
||||
}).on(EVENT_MOUSELEAVE, function (event) {
|
||||
return _this2.cycle(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
this._addTouchEventListeners();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||
var _this3 = this;
|
||||
|
||||
if (!this._touchSupported) {
|
||||
return;
|
||||
}
|
||||
|
||||
var start = function start(event) {
|
||||
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||
_this3.touchStartX = event.originalEvent.clientX;
|
||||
} else if (!_this3._pointerEvent) {
|
||||
_this3.touchStartX = event.originalEvent.touches[0].clientX;
|
||||
}
|
||||
};
|
||||
|
||||
var move = function move(event) {
|
||||
// ensure swiping with one touch and not pinching
|
||||
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||
_this3.touchDeltaX = 0;
|
||||
} else {
|
||||
_this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
|
||||
}
|
||||
};
|
||||
|
||||
var end = function end(event) {
|
||||
if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||
_this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
|
||||
}
|
||||
|
||||
_this3._handleSwipe();
|
||||
|
||||
if (_this3._config.pause === 'hover') {
|
||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
_this3.pause();
|
||||
|
||||
if (_this3.touchTimeout) {
|
||||
clearTimeout(_this3.touchTimeout);
|
||||
}
|
||||
|
||||
_this3.touchTimeout = setTimeout(function (event) {
|
||||
return _this3.cycle(event);
|
||||
}, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
|
||||
}
|
||||
};
|
||||
|
||||
$__default['default'](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
|
||||
return e.preventDefault();
|
||||
});
|
||||
|
||||
if (this._pointerEvent) {
|
||||
$__default['default'](this._element).on(EVENT_POINTERDOWN, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
$__default['default'](this._element).on(EVENT_POINTERUP, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
|
||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
||||
} else {
|
||||
$__default['default'](this._element).on(EVENT_TOUCHSTART, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
$__default['default'](this._element).on(EVENT_TOUCHMOVE, function (event) {
|
||||
return move(event);
|
||||
});
|
||||
$__default['default'](this._element).on(EVENT_TOUCHEND, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_proto._keydown = function _keydown(event) {
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (event.which) {
|
||||
case ARROW_LEFT_KEYCODE:
|
||||
event.preventDefault();
|
||||
this.prev();
|
||||
break;
|
||||
|
||||
case ARROW_RIGHT_KEYCODE:
|
||||
event.preventDefault();
|
||||
this.next();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._getItemIndex = function _getItemIndex(element) {
|
||||
this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
|
||||
return this._items.indexOf(element);
|
||||
};
|
||||
|
||||
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
|
||||
var isNextDirection = direction === DIRECTION_NEXT;
|
||||
var isPrevDirection = direction === DIRECTION_PREV;
|
||||
|
||||
var activeIndex = this._getItemIndex(activeElement);
|
||||
|
||||
var lastItemIndex = this._items.length - 1;
|
||||
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
|
||||
|
||||
if (isGoingToWrap && !this._config.wrap) {
|
||||
return activeElement;
|
||||
}
|
||||
|
||||
var delta = direction === DIRECTION_PREV ? -1 : 1;
|
||||
var itemIndex = (activeIndex + delta) % this._items.length;
|
||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
||||
};
|
||||
|
||||
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
var targetIndex = this._getItemIndex(relatedTarget);
|
||||
|
||||
var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
|
||||
|
||||
var slideEvent = $__default['default'].Event(EVENT_SLIDE, {
|
||||
relatedTarget: relatedTarget,
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
});
|
||||
$__default['default'](this._element).trigger(slideEvent);
|
||||
return slideEvent;
|
||||
};
|
||||
|
||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||
if (this._indicatorsElement) {
|
||||
var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
|
||||
$__default['default'](indicators).removeClass(CLASS_NAME_ACTIVE);
|
||||
|
||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
||||
|
||||
if (nextIndicator) {
|
||||
$__default['default'](nextIndicator).addClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto._updateInterval = function _updateInterval() {
|
||||
var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
|
||||
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
|
||||
|
||||
if (elementInterval) {
|
||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
|
||||
this._config.interval = elementInterval;
|
||||
} else {
|
||||
this._config.interval = this._config.defaultInterval || this._config.interval;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._slide = function _slide(direction, element) {
|
||||
var _this4 = this;
|
||||
|
||||
var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
|
||||
|
||||
var activeElementIndex = this._getItemIndex(activeElement);
|
||||
|
||||
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
|
||||
|
||||
var nextElementIndex = this._getItemIndex(nextElement);
|
||||
|
||||
var isCycling = Boolean(this._interval);
|
||||
var directionalClassName;
|
||||
var orderClassName;
|
||||
var eventDirectionName;
|
||||
|
||||
if (direction === DIRECTION_NEXT) {
|
||||
directionalClassName = CLASS_NAME_LEFT;
|
||||
orderClassName = CLASS_NAME_NEXT;
|
||||
eventDirectionName = DIRECTION_LEFT;
|
||||
} else {
|
||||
directionalClassName = CLASS_NAME_RIGHT;
|
||||
orderClassName = CLASS_NAME_PREV;
|
||||
eventDirectionName = DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
if (nextElement && $__default['default'](nextElement).hasClass(CLASS_NAME_ACTIVE)) {
|
||||
this._isSliding = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
|
||||
|
||||
if (slideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!activeElement || !nextElement) {
|
||||
// Some weirdness is happening, so we bail
|
||||
return;
|
||||
}
|
||||
|
||||
this._isSliding = true;
|
||||
|
||||
if (isCycling) {
|
||||
this.pause();
|
||||
}
|
||||
|
||||
this._setActiveIndicatorElement(nextElement);
|
||||
|
||||
this._activeElement = nextElement;
|
||||
var slidEvent = $__default['default'].Event(EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
});
|
||||
|
||||
if ($__default['default'](this._element).hasClass(CLASS_NAME_SLIDE)) {
|
||||
$__default['default'](nextElement).addClass(orderClassName);
|
||||
Util__default['default'].reflow(nextElement);
|
||||
$__default['default'](activeElement).addClass(directionalClassName);
|
||||
$__default['default'](nextElement).addClass(directionalClassName);
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(activeElement);
|
||||
$__default['default'](activeElement).one(Util__default['default'].TRANSITION_END, function () {
|
||||
$__default['default'](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
|
||||
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
|
||||
_this4._isSliding = false;
|
||||
setTimeout(function () {
|
||||
return $__default['default'](_this4._element).trigger(slidEvent);
|
||||
}, 0);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
$__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
|
||||
$__default['default'](nextElement).addClass(CLASS_NAME_ACTIVE);
|
||||
this._isSliding = false;
|
||||
$__default['default'](this._element).trigger(slidEvent);
|
||||
}
|
||||
|
||||
if (isCycling) {
|
||||
this.cycle();
|
||||
}
|
||||
} // Static
|
||||
;
|
||||
|
||||
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $__default['default'](this).data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $__default['default'](this).data());
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = _extends({}, _config, config);
|
||||
}
|
||||
|
||||
var action = typeof config === 'string' ? config : _config.slide;
|
||||
|
||||
if (!data) {
|
||||
data = new Carousel(this, _config);
|
||||
$__default['default'](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'number') {
|
||||
data.to(config);
|
||||
} else if (typeof action === 'string') {
|
||||
if (typeof data[action] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + action + "\"");
|
||||
}
|
||||
|
||||
data[action]();
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause();
|
||||
data.cycle();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
|
||||
var selector = Util__default['default'].getSelectorFromElement(this);
|
||||
|
||||
if (!selector) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target = $__default['default'](selector)[0];
|
||||
|
||||
if (!target || !$__default['default'](target).hasClass(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var config = _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
|
||||
|
||||
var slideIndex = this.getAttribute('data-slide-to');
|
||||
|
||||
if (slideIndex) {
|
||||
config.interval = false;
|
||||
}
|
||||
|
||||
Carousel._jQueryInterface.call($__default['default'](target), config);
|
||||
|
||||
if (slideIndex) {
|
||||
$__default['default'](target).data(DATA_KEY).to(slideIndex);
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
_createClass(Carousel, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Carousel;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
|
||||
$__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
|
||||
var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
|
||||
|
||||
for (var i = 0, len = carousels.length; i < len; i++) {
|
||||
var $carousel = $__default['default'](carousels[i]);
|
||||
|
||||
Carousel._jQueryInterface.call($carousel, $carousel.data());
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Carousel._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Carousel;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Carousel._jQueryInterface;
|
||||
};
|
||||
|
||||
return Carousel;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=carousel.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/carousel.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/carousel.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/carousel.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
403
ISPChk/wwwroot/bootstrap/js/dist/collapse.js
vendored
Normal file
403
ISPChk/wwwroot/bootstrap/js/dist/collapse.js
vendored
Normal file
@ -0,0 +1,403 @@
|
||||
/*!
|
||||
* Bootstrap collapse.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.collapse';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
};
|
||||
var DefaultType = {
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_COLLAPSE = 'collapse';
|
||||
var CLASS_NAME_COLLAPSING = 'collapsing';
|
||||
var CLASS_NAME_COLLAPSED = 'collapsed';
|
||||
var DIMENSION_WIDTH = 'width';
|
||||
var DIMENSION_HEIGHT = 'height';
|
||||
var SELECTOR_ACTIVES = '.show, .collapsing';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Collapse = /*#__PURE__*/function () {
|
||||
function Collapse(element, config) {
|
||||
this._isTransitioning = false;
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
|
||||
var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||
|
||||
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||
var elem = toggleList[i];
|
||||
var selector = Util__default['default'].getSelectorFromElement(elem);
|
||||
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
|
||||
return foundElem === element;
|
||||
});
|
||||
|
||||
if (selector !== null && filterElement.length > 0) {
|
||||
this._selector = selector;
|
||||
|
||||
this._triggerArray.push(elem);
|
||||
}
|
||||
}
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Collapse.prototype;
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if ($__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || $__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var actives;
|
||||
var activesData;
|
||||
|
||||
if (this._parent) {
|
||||
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
|
||||
if (typeof _this._config.parent === 'string') {
|
||||
return elem.getAttribute('data-parent') === _this._config.parent;
|
||||
}
|
||||
|
||||
return elem.classList.contains(CLASS_NAME_COLLAPSE);
|
||||
});
|
||||
|
||||
if (actives.length === 0) {
|
||||
actives = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
activesData = $__default['default'](actives).not(this._selector).data(DATA_KEY);
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var startEvent = $__default['default'].Event(EVENT_SHOW);
|
||||
$__default['default'](this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call($__default['default'](actives).not(this._selector), 'hide');
|
||||
|
||||
if (!activesData) {
|
||||
$__default['default'](actives).data(DATA_KEY, null);
|
||||
}
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
$__default['default'](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
|
||||
this._element.style[dimension] = 0;
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
$__default['default'](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
$__default['default'](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
|
||||
_this._element.style[dimension] = '';
|
||||
|
||||
_this.setTransitioning(false);
|
||||
|
||||
$__default['default'](_this._element).trigger(EVENT_SHOWN);
|
||||
};
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
var scrollSize = "scroll" + capitalizedDimension;
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
this._element.style[dimension] = this._element[scrollSize] + "px";
|
||||
};
|
||||
|
||||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !$__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = $__default['default'].Event(EVENT_HIDE);
|
||||
$__default['default'](this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
||||
Util__default['default'].reflow(this._element);
|
||||
$__default['default'](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
|
||||
var triggerArrayLength = this._triggerArray.length;
|
||||
|
||||
if (triggerArrayLength > 0) {
|
||||
for (var i = 0; i < triggerArrayLength; i++) {
|
||||
var trigger = this._triggerArray[i];
|
||||
var selector = Util__default['default'].getSelectorFromElement(trigger);
|
||||
|
||||
if (selector !== null) {
|
||||
var $elem = $__default['default']([].slice.call(document.querySelectorAll(selector)));
|
||||
|
||||
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
|
||||
$__default['default'](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
_this2.setTransitioning(false);
|
||||
|
||||
$__default['default'](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
|
||||
};
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
};
|
||||
|
||||
_proto.setTransitioning = function setTransitioning(isTransitioning) {
|
||||
this._isTransitioning = isTransitioning;
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._element = null;
|
||||
this._triggerArray = null;
|
||||
this._isTransitioning = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getDimension = function _getDimension() {
|
||||
var hasWidth = $__default['default'](this._element).hasClass(DIMENSION_WIDTH);
|
||||
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
|
||||
};
|
||||
|
||||
_proto._getParent = function _getParent() {
|
||||
var _this3 = this;
|
||||
|
||||
var parent;
|
||||
|
||||
if (Util__default['default'].isElement(this._config.parent)) {
|
||||
parent = this._config.parent; // It's a jQuery object
|
||||
|
||||
if (typeof this._config.parent.jquery !== 'undefined') {
|
||||
parent = this._config.parent[0];
|
||||
}
|
||||
} else {
|
||||
parent = document.querySelector(this._config.parent);
|
||||
}
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
|
||||
var children = [].slice.call(parent.querySelectorAll(selector));
|
||||
$__default['default'](children).each(function (i, element) {
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||
});
|
||||
return parent;
|
||||
};
|
||||
|
||||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||
var isOpen = $__default['default'](element).hasClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (triggerArray.length) {
|
||||
$__default['default'](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||
}
|
||||
} // Static
|
||||
;
|
||||
|
||||
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
|
||||
var selector = Util__default['default'].getSelectorFromElement(element);
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
};
|
||||
|
||||
Collapse._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default['default'](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $element.data(), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Collapse, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Collapse;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.currentTarget.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $trigger = $__default['default'](this);
|
||||
var selector = Util__default['default'].getSelectorFromElement(this);
|
||||
var selectors = [].slice.call(document.querySelectorAll(selector));
|
||||
$__default['default'](selectors).each(function () {
|
||||
var $target = $__default['default'](this);
|
||||
var data = $target.data(DATA_KEY);
|
||||
var config = data ? 'toggle' : $trigger.data();
|
||||
|
||||
Collapse._jQueryInterface.call($target, config);
|
||||
});
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Collapse._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Collapse;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Collapse._jQueryInterface;
|
||||
};
|
||||
|
||||
return Collapse;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=collapse.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/collapse.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/collapse.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/collapse.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/collapse.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
569
ISPChk/wwwroot/bootstrap/js/dist/dropdown.js
vendored
Normal file
569
ISPChk/wwwroot/bootstrap/js/dist/dropdown.js
vendored
Normal file
@ -0,0 +1,569 @@
|
||||
/*!
|
||||
* Bootstrap dropdown.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
|
||||
}(this, (function ($, Popper, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'dropdown';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.dropdown';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
|
||||
|
||||
var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
|
||||
|
||||
var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
|
||||
|
||||
var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
|
||||
|
||||
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
|
||||
|
||||
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_CLICK = "click" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_DROPUP = 'dropup';
|
||||
var CLASS_NAME_DROPRIGHT = 'dropright';
|
||||
var CLASS_NAME_DROPLEFT = 'dropleft';
|
||||
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
|
||||
var CLASS_NAME_POSITION_STATIC = 'position-static';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
|
||||
var SELECTOR_FORM_CHILD = '.dropdown form';
|
||||
var SELECTOR_MENU = '.dropdown-menu';
|
||||
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
|
||||
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
|
||||
var PLACEMENT_TOP = 'top-start';
|
||||
var PLACEMENT_TOPEND = 'top-end';
|
||||
var PLACEMENT_BOTTOM = 'bottom-start';
|
||||
var PLACEMENT_BOTTOMEND = 'bottom-end';
|
||||
var PLACEMENT_RIGHT = 'right-start';
|
||||
var PLACEMENT_LEFT = 'left-start';
|
||||
var Default = {
|
||||
offset: 0,
|
||||
flip: true,
|
||||
boundary: 'scrollParent',
|
||||
reference: 'toggle',
|
||||
display: 'dynamic',
|
||||
popperConfig: null
|
||||
};
|
||||
var DefaultType = {
|
||||
offset: '(number|string|function)',
|
||||
flip: 'boolean',
|
||||
boundary: '(string|element)',
|
||||
reference: '(string|element)',
|
||||
display: 'string',
|
||||
popperConfig: '(null|object)'
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Dropdown = /*#__PURE__*/function () {
|
||||
function Dropdown(element, config) {
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
this._config = this._getConfig(config);
|
||||
this._menu = this._getMenuElement();
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
this._addEventListeners();
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Dropdown.prototype;
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isActive = $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.show(true);
|
||||
};
|
||||
|
||||
_proto.show = function show(usePopper) {
|
||||
if (usePopper === void 0) {
|
||||
usePopper = false;
|
||||
}
|
||||
|
||||
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $__default['default'].Event(EVENT_SHOW, relatedTarget);
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
$__default['default'](parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
} // Totally disable Popper for Dropdowns in Navbar
|
||||
|
||||
|
||||
if (!this._inNavbar && usePopper) {
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper__default['default'] === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
|
||||
}
|
||||
|
||||
var referenceElement = this._element;
|
||||
|
||||
if (this._config.reference === 'parent') {
|
||||
referenceElement = parent;
|
||||
} else if (Util__default['default'].isElement(this._config.reference)) {
|
||||
referenceElement = this._config.reference; // Check if it's jQuery element
|
||||
|
||||
if (typeof this._config.reference.jquery !== 'undefined') {
|
||||
referenceElement = this._config.reference[0];
|
||||
}
|
||||
} // If boundary is not `scrollParent`, then set position to `static`
|
||||
// to allow the menu to "escape" the scroll parent's boundaries
|
||||
// https://github.com/twbs/bootstrap/issues/24251
|
||||
|
||||
|
||||
if (this._config.boundary !== 'scrollParent') {
|
||||
$__default['default'](parent).addClass(CLASS_NAME_POSITION_STATIC);
|
||||
}
|
||||
|
||||
this._popper = new Popper__default['default'](referenceElement, this._menu, this._getPopperConfig());
|
||||
} // If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement && $__default['default'](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
|
||||
$__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
|
||||
}
|
||||
|
||||
this._element.focus();
|
||||
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
$__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
|
||||
$__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_SHOWN, relatedTarget));
|
||||
};
|
||||
|
||||
_proto.hide = function hide() {
|
||||
if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
$__default['default'](parent).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._popper) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
|
||||
$__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
|
||||
$__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
$__default['default'](this._element).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._menu = null;
|
||||
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
|
||||
this._popper = null;
|
||||
}
|
||||
};
|
||||
|
||||
_proto.update = function update() {
|
||||
this._inNavbar = this._detectNavbar();
|
||||
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this = this;
|
||||
|
||||
$__default['default'](this._element).on(EVENT_CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
_this.toggle();
|
||||
});
|
||||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, this.constructor.Default, $__default['default'](this._element).data(), config);
|
||||
Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getMenuElement = function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
|
||||
if (parent) {
|
||||
this._menu = parent.querySelector(SELECTOR_MENU);
|
||||
}
|
||||
}
|
||||
|
||||
return this._menu;
|
||||
};
|
||||
|
||||
_proto._getPlacement = function _getPlacement() {
|
||||
var $parentDropdown = $__default['default'](this._element.parentNode);
|
||||
var placement = PLACEMENT_BOTTOM; // Handle dropup
|
||||
|
||||
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
|
||||
placement = $__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
|
||||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
|
||||
placement = PLACEMENT_RIGHT;
|
||||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
|
||||
placement = PLACEMENT_LEFT;
|
||||
} else if ($__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_BOTTOMEND;
|
||||
}
|
||||
|
||||
return placement;
|
||||
};
|
||||
|
||||
_proto._detectNavbar = function _detectNavbar() {
|
||||
return $__default['default'](this._element).closest('.navbar').length > 0;
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
var _this2 = this;
|
||||
|
||||
var offset = {};
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
offset.offset = this._config.offset;
|
||||
}
|
||||
|
||||
return offset;
|
||||
};
|
||||
|
||||
_proto._getPopperConfig = function _getPopperConfig() {
|
||||
var popperConfig = {
|
||||
placement: this._getPlacement(),
|
||||
modifiers: {
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this._config.boundary
|
||||
}
|
||||
}
|
||||
}; // Disable Popper if we have a static display
|
||||
|
||||
if (this._config.display === 'static') {
|
||||
popperConfig.modifiers.applyStyle = {
|
||||
enabled: false
|
||||
};
|
||||
}
|
||||
|
||||
return _extends({}, popperConfig, this._config.popperConfig);
|
||||
} // Static
|
||||
;
|
||||
|
||||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $__default['default'](this).data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this, _config);
|
||||
$__default['default'](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Dropdown._clearMenus = function _clearMenus(event) {
|
||||
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
|
||||
|
||||
for (var i = 0, len = toggles.length; i < len; i++) {
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||
|
||||
var context = $__default['default'](toggles[i]).data(DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
|
||||
if (event && event.type === 'click') {
|
||||
relatedTarget.clickEvent = event;
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var dropdownMenu = context._menu;
|
||||
|
||||
if (!$__default['default'](parent).hasClass(CLASS_NAME_SHOW)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default['default'].contains(parent, event.target)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
|
||||
$__default['default'](parent).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
continue;
|
||||
} // If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
|
||||
if (context._popper) {
|
||||
context._popper.destroy();
|
||||
}
|
||||
|
||||
$__default['default'](dropdownMenu).removeClass(CLASS_NAME_SHOW);
|
||||
$__default['default'](parent).removeClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
|
||||
}
|
||||
};
|
||||
|
||||
Dropdown._getParentFromElement = function _getParentFromElement(element) {
|
||||
var parent;
|
||||
var selector = Util__default['default'].getSelectorFromElement(element);
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
return parent || element.parentNode;
|
||||
} // eslint-disable-next-line complexity
|
||||
;
|
||||
|
||||
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
|
||||
// If not input/textarea:
|
||||
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
|
||||
// If input/textarea:
|
||||
// - If space key => not a dropdown command
|
||||
// - If key is other than escape
|
||||
// - If key is not up or down => not a dropdown command
|
||||
// - If trigger inside the menu => not a dropdown command
|
||||
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default['default'](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.disabled || $__default['default'](this).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
|
||||
var isActive = $__default['default'](parent).hasClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (!isActive && event.which === ESCAPE_KEYCODE) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
$__default['default'](parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
|
||||
}
|
||||
|
||||
$__default['default'](this).trigger('click');
|
||||
return;
|
||||
}
|
||||
|
||||
var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
|
||||
return $__default['default'](item).is(':visible');
|
||||
});
|
||||
|
||||
if (items.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var index = items.indexOf(event.target);
|
||||
|
||||
if (event.which === ARROW_UP_KEYCODE && index > 0) {
|
||||
// Up
|
||||
index--;
|
||||
}
|
||||
|
||||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
|
||||
// Down
|
||||
index++;
|
||||
}
|
||||
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
items[index].focus();
|
||||
};
|
||||
|
||||
_createClass(Dropdown, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Dropdown;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
Dropdown._jQueryInterface.call($__default['default'](this), 'toggle');
|
||||
}).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Dropdown._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Dropdown;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Dropdown._jQueryInterface;
|
||||
};
|
||||
|
||||
return Dropdown;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=dropdown.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/dropdown.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/dropdown.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/dropdown.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/dropdown.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
22
ISPChk/wwwroot/bootstrap/js/dist/index.js
vendored
Normal file
22
ISPChk/wwwroot/bootstrap/js/dist/index.js
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
(function ($) {
|
||||
if (typeof $ === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
||||
}
|
||||
|
||||
var version = $.fn.jquery.split(' ')[0].split('.');
|
||||
var minMajor = 1;
|
||||
var ltMajor = 2;
|
||||
var minMinor = 9;
|
||||
var minPatch = 1;
|
||||
var maxMajor = 4;
|
||||
|
||||
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
||||
}
|
||||
})($);
|
8
ISPChk/wwwroot/bootstrap/js/dist/index.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/dist/index.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/index.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
!function(r){if(void 0===r)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=r.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}($);
|
||||
//# sourceMappingURL=/sm/56dc4e953c19117f273d1cab00acb6257a9284c09657d8a0ad7fd2bc73afbfa7.map
|
669
ISPChk/wwwroot/bootstrap/js/dist/modal.js
vendored
Normal file
669
ISPChk/wwwroot/bootstrap/js/dist/modal.js
vendored
Normal file
@ -0,0 +1,669 @@
|
||||
/*!
|
||||
* Bootstrap modal.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'modal';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.modal';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
var Default = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
focus: true,
|
||||
show: true
|
||||
};
|
||||
var DefaultType = {
|
||||
backdrop: '(boolean|string)',
|
||||
keyboard: 'boolean',
|
||||
focus: 'boolean',
|
||||
show: 'boolean'
|
||||
};
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
|
||||
var EVENT_RESIZE = "resize" + EVENT_KEY;
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
|
||||
var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
|
||||
var CLASS_NAME_BACKDROP = 'modal-backdrop';
|
||||
var CLASS_NAME_OPEN = 'modal-open';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_STATIC = 'modal-static';
|
||||
var SELECTOR_DIALOG = '.modal-dialog';
|
||||
var SELECTOR_MODAL_BODY = '.modal-body';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
|
||||
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
||||
var SELECTOR_STICKY_CONTENT = '.sticky-top';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Modal = /*#__PURE__*/function () {
|
||||
function Modal(element, config) {
|
||||
this._config = this._getConfig(config);
|
||||
this._element = element;
|
||||
this._dialog = element.querySelector(SELECTOR_DIALOG);
|
||||
this._backdrop = null;
|
||||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
this._ignoreBackdropClick = false;
|
||||
this._isTransitioning = false;
|
||||
this._scrollbarWidth = 0;
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Modal.prototype;
|
||||
|
||||
// Public
|
||||
_proto.toggle = function toggle(relatedTarget) {
|
||||
return this._isShown ? this.hide() : this.show(relatedTarget);
|
||||
};
|
||||
|
||||
_proto.show = function show(relatedTarget) {
|
||||
var _this = this;
|
||||
|
||||
if (this._isShown || this._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = $__default['default'].Event(EVENT_SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
$__default['default'](this._element).trigger(showEvent);
|
||||
|
||||
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._isShown = true;
|
||||
|
||||
this._checkScrollbar();
|
||||
|
||||
this._setScrollbar();
|
||||
|
||||
this._adjustDialog();
|
||||
|
||||
this._setEscapeEvent();
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
|
||||
return _this.hide(event);
|
||||
});
|
||||
$__default['default'](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
|
||||
$__default['default'](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
|
||||
if ($__default['default'](event.target).is(_this._element)) {
|
||||
_this._ignoreBackdropClick = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this._showBackdrop(function () {
|
||||
return _this._showElement(relatedTarget);
|
||||
});
|
||||
};
|
||||
|
||||
_proto.hide = function hide(event) {
|
||||
var _this2 = this;
|
||||
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (!this._isShown || this._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = $__default['default'].Event(EVENT_HIDE);
|
||||
$__default['default'](this._element).trigger(hideEvent);
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._isShown = false;
|
||||
var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
this._setEscapeEvent();
|
||||
|
||||
this._setResizeEvent();
|
||||
|
||||
$__default['default'](document).off(EVENT_FOCUSIN);
|
||||
$__default['default'](this._element).removeClass(CLASS_NAME_SHOW);
|
||||
$__default['default'](this._element).off(EVENT_CLICK_DISMISS);
|
||||
$__default['default'](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function (event) {
|
||||
return _this2._hideModal(event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
this._hideModal();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
[window, this._element, this._dialog].forEach(function (htmlElement) {
|
||||
return $__default['default'](htmlElement).off(EVENT_KEY);
|
||||
});
|
||||
/**
|
||||
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
|
||||
* Do not move `document` in `htmlElements` array
|
||||
* It will remove `EVENT_CLICK_DATA_API` event that should remain
|
||||
*/
|
||||
|
||||
$__default['default'](document).off(EVENT_FOCUSIN);
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
this._dialog = null;
|
||||
this._backdrop = null;
|
||||
this._isShown = null;
|
||||
this._isBodyOverflowing = null;
|
||||
this._ignoreBackdropClick = null;
|
||||
this._isTransitioning = null;
|
||||
this._scrollbarWidth = null;
|
||||
};
|
||||
|
||||
_proto.handleUpdate = function handleUpdate() {
|
||||
this._adjustDialog();
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._triggerBackdropTransition = function _triggerBackdropTransition() {
|
||||
var _this3 = this;
|
||||
|
||||
var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED);
|
||||
$__default['default'](this._element).trigger(hideEventPrevented);
|
||||
|
||||
if (hideEventPrevented.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
||||
if (!isModalOverflowing) {
|
||||
this._element.style.overflowY = 'hidden';
|
||||
}
|
||||
|
||||
this._element.classList.add(CLASS_NAME_STATIC);
|
||||
|
||||
var modalTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
|
||||
$__default['default'](this._element).off(Util__default['default'].TRANSITION_END);
|
||||
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function () {
|
||||
_this3._element.classList.remove(CLASS_NAME_STATIC);
|
||||
|
||||
if (!isModalOverflowing) {
|
||||
$__default['default'](_this3._element).one(Util__default['default'].TRANSITION_END, function () {
|
||||
_this3._element.style.overflowY = '';
|
||||
}).emulateTransitionEnd(_this3._element, modalTransitionDuration);
|
||||
}
|
||||
}).emulateTransitionEnd(modalTransitionDuration);
|
||||
|
||||
this._element.focus();
|
||||
};
|
||||
|
||||
_proto._showElement = function _showElement(relatedTarget) {
|
||||
var _this4 = this;
|
||||
|
||||
var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
|
||||
var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
|
||||
|
||||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// Don't move modal's DOM position
|
||||
document.body.appendChild(this._element);
|
||||
}
|
||||
|
||||
this._element.style.display = 'block';
|
||||
|
||||
this._element.removeAttribute('aria-hidden');
|
||||
|
||||
this._element.setAttribute('aria-modal', true);
|
||||
|
||||
this._element.setAttribute('role', 'dialog');
|
||||
|
||||
if ($__default['default'](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
|
||||
modalBody.scrollTop = 0;
|
||||
} else {
|
||||
this._element.scrollTop = 0;
|
||||
}
|
||||
|
||||
if (transition) {
|
||||
Util__default['default'].reflow(this._element);
|
||||
}
|
||||
|
||||
$__default['default'](this._element).addClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (this._config.focus) {
|
||||
this._enforceFocus();
|
||||
}
|
||||
|
||||
var shownEvent = $__default['default'].Event(EVENT_SHOWN, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
if (_this4._config.focus) {
|
||||
_this4._element.focus();
|
||||
}
|
||||
|
||||
_this4._isTransitioning = false;
|
||||
$__default['default'](_this4._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
|
||||
$__default['default'](this._dialog).one(Util__default['default'].TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
transitionComplete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._enforceFocus = function _enforceFocus() {
|
||||
var _this5 = this;
|
||||
|
||||
$__default['default'](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
|
||||
.on(EVENT_FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this5._element !== event.target && $__default['default'](_this5._element).has(event.target).length === 0) {
|
||||
_this5._element.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_proto._setEscapeEvent = function _setEscapeEvent() {
|
||||
var _this6 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$__default['default'](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
|
||||
if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault();
|
||||
|
||||
_this6.hide();
|
||||
} else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
_this6._triggerBackdropTransition();
|
||||
}
|
||||
});
|
||||
} else if (!this._isShown) {
|
||||
$__default['default'](this._element).off(EVENT_KEYDOWN_DISMISS);
|
||||
}
|
||||
};
|
||||
|
||||
_proto._setResizeEvent = function _setResizeEvent() {
|
||||
var _this7 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$__default['default'](window).on(EVENT_RESIZE, function (event) {
|
||||
return _this7.handleUpdate(event);
|
||||
});
|
||||
} else {
|
||||
$__default['default'](window).off(EVENT_RESIZE);
|
||||
}
|
||||
};
|
||||
|
||||
_proto._hideModal = function _hideModal() {
|
||||
var _this8 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
|
||||
this._element.removeAttribute('aria-modal');
|
||||
|
||||
this._element.removeAttribute('role');
|
||||
|
||||
this._isTransitioning = false;
|
||||
|
||||
this._showBackdrop(function () {
|
||||
$__default['default'](document.body).removeClass(CLASS_NAME_OPEN);
|
||||
|
||||
_this8._resetAdjustments();
|
||||
|
||||
_this8._resetScrollbar();
|
||||
|
||||
$__default['default'](_this8._element).trigger(EVENT_HIDDEN);
|
||||
});
|
||||
};
|
||||
|
||||
_proto._removeBackdrop = function _removeBackdrop() {
|
||||
if (this._backdrop) {
|
||||
$__default['default'](this._backdrop).remove();
|
||||
this._backdrop = null;
|
||||
}
|
||||
};
|
||||
|
||||
_proto._showBackdrop = function _showBackdrop(callback) {
|
||||
var _this9 = this;
|
||||
|
||||
var animate = $__default['default'](this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
this._backdrop = document.createElement('div');
|
||||
this._backdrop.className = CLASS_NAME_BACKDROP;
|
||||
|
||||
if (animate) {
|
||||
this._backdrop.classList.add(animate);
|
||||
}
|
||||
|
||||
$__default['default'](this._backdrop).appendTo(document.body);
|
||||
$__default['default'](this._element).on(EVENT_CLICK_DISMISS, function (event) {
|
||||
if (_this9._ignoreBackdropClick) {
|
||||
_this9._ignoreBackdropClick = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.target !== event.currentTarget) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_this9._config.backdrop === 'static') {
|
||||
_this9._triggerBackdropTransition();
|
||||
} else {
|
||||
_this9.hide();
|
||||
}
|
||||
});
|
||||
|
||||
if (animate) {
|
||||
Util__default['default'].reflow(this._backdrop);
|
||||
}
|
||||
|
||||
$__default['default'](this._backdrop).addClass(CLASS_NAME_SHOW);
|
||||
|
||||
if (!callback) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!animate) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
|
||||
var backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
|
||||
$__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$__default['default'](this._backdrop).removeClass(CLASS_NAME_SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this9._removeBackdrop();
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
|
||||
var _backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
|
||||
|
||||
$__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
|
||||
} else {
|
||||
callbackRemove();
|
||||
}
|
||||
} else if (callback) {
|
||||
callback();
|
||||
}
|
||||
} // ----------------------------------------------------------------------
|
||||
// the following methods are used to handle overflowing modals
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
;
|
||||
|
||||
_proto._adjustDialog = function _adjustDialog() {
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||
this._element.style.paddingLeft = this._scrollbarWidth + "px";
|
||||
}
|
||||
|
||||
if (this._isBodyOverflowing && !isModalOverflowing) {
|
||||
this._element.style.paddingRight = this._scrollbarWidth + "px";
|
||||
}
|
||||
};
|
||||
|
||||
_proto._resetAdjustments = function _resetAdjustments() {
|
||||
this._element.style.paddingLeft = '';
|
||||
this._element.style.paddingRight = '';
|
||||
};
|
||||
|
||||
_proto._checkScrollbar = function _checkScrollbar() {
|
||||
var rect = document.body.getBoundingClientRect();
|
||||
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
|
||||
this._scrollbarWidth = this._getScrollbarWidth();
|
||||
};
|
||||
|
||||
_proto._setScrollbar = function _setScrollbar() {
|
||||
var _this10 = this;
|
||||
|
||||
if (this._isBodyOverflowing) {
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
|
||||
var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
|
||||
|
||||
$__default['default'](fixedContent).each(function (index, element) {
|
||||
var actualPadding = element.style.paddingRight;
|
||||
var calculatedPadding = $__default['default'](element).css('padding-right');
|
||||
$__default['default'](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
|
||||
}); // Adjust sticky content margin
|
||||
|
||||
$__default['default'](stickyContent).each(function (index, element) {
|
||||
var actualMargin = element.style.marginRight;
|
||||
var calculatedMargin = $__default['default'](element).css('margin-right');
|
||||
$__default['default'](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
|
||||
}); // Adjust body padding
|
||||
|
||||
var actualPadding = document.body.style.paddingRight;
|
||||
var calculatedPadding = $__default['default'](document.body).css('padding-right');
|
||||
$__default['default'](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
|
||||
}
|
||||
|
||||
$__default['default'](document.body).addClass(CLASS_NAME_OPEN);
|
||||
};
|
||||
|
||||
_proto._resetScrollbar = function _resetScrollbar() {
|
||||
// Restore fixed content padding
|
||||
var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
|
||||
$__default['default'](fixedContent).each(function (index, element) {
|
||||
var padding = $__default['default'](element).data('padding-right');
|
||||
$__default['default'](element).removeData('padding-right');
|
||||
element.style.paddingRight = padding ? padding : '';
|
||||
}); // Restore sticky content
|
||||
|
||||
var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
|
||||
$__default['default'](elements).each(function (index, element) {
|
||||
var margin = $__default['default'](element).data('margin-right');
|
||||
|
||||
if (typeof margin !== 'undefined') {
|
||||
$__default['default'](element).css('margin-right', margin).removeData('margin-right');
|
||||
}
|
||||
}); // Restore body padding
|
||||
|
||||
var padding = $__default['default'](document.body).data('padding-right');
|
||||
$__default['default'](document.body).removeData('padding-right');
|
||||
document.body.style.paddingRight = padding ? padding : '';
|
||||
};
|
||||
|
||||
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
||||
// thx d.walsh
|
||||
var scrollDiv = document.createElement('div');
|
||||
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
|
||||
document.body.appendChild(scrollDiv);
|
||||
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
return scrollbarWidth;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
var data = $__default['default'](this).data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $__default['default'](this).data(), typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (!data) {
|
||||
data = new Modal(this, _config);
|
||||
$__default['default'](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config](relatedTarget);
|
||||
} else if (_config.show) {
|
||||
data.show(relatedTarget);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Modal, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Modal;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
var _this11 = this;
|
||||
|
||||
var target;
|
||||
var selector = Util__default['default'].getSelectorFromElement(this);
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector);
|
||||
}
|
||||
|
||||
var config = $__default['default'](target).data(DATA_KEY) ? 'toggle' : _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
|
||||
|
||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $target = $__default['default'](target).one(EVENT_SHOW, function (showEvent) {
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
// Only register focus restorer if modal will actually get shown
|
||||
return;
|
||||
}
|
||||
|
||||
$target.one(EVENT_HIDDEN, function () {
|
||||
if ($__default['default'](_this11).is(':visible')) {
|
||||
_this11.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Modal._jQueryInterface.call($__default['default'](target), config, this);
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Modal._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Modal;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Modal._jQueryInterface;
|
||||
};
|
||||
|
||||
return Modal;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=modal.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/modal.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/modal.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/modal.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/modal.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
240
ISPChk/wwwroot/bootstrap/js/dist/popover.js
vendored
Normal file
240
ISPChk/wwwroot/bootstrap/js/dist/popover.js
vendored
Normal file
@ -0,0 +1,240 @@
|
||||
/*!
|
||||
* Bootstrap popover.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './tooltip'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip));
|
||||
}(this, (function ($, Tooltip) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
subClass.__proto__ = superClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
|
||||
var Default = _extends({}, Tooltip__default['default'].Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = _extends({}, Tooltip__default['default'].DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_TITLE = '.popover-header';
|
||||
var SELECTOR_CONTENT = '.popover-body';
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
INSERTED: "inserted" + EVENT_KEY,
|
||||
CLICK: "click" + EVENT_KEY,
|
||||
FOCUSIN: "focusin" + EVENT_KEY,
|
||||
FOCUSOUT: "focusout" + EVENT_KEY,
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
||||
};
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Popover = /*#__PURE__*/function (_Tooltip) {
|
||||
_inheritsLoose(Popover, _Tooltip);
|
||||
|
||||
function Popover() {
|
||||
return _Tooltip.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Popover.prototype;
|
||||
|
||||
// Overrides
|
||||
_proto.isWithContent = function isWithContent() {
|
||||
return this.getTitle() || this._getContent();
|
||||
};
|
||||
|
||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto.getTipElement = function getTipElement() {
|
||||
this.tip = this.tip || $__default['default'](this.config.template)[0];
|
||||
return this.tip;
|
||||
};
|
||||
|
||||
_proto.setContent = function setContent() {
|
||||
var $tip = $__default['default'](this.getTipElement()); // We use append for html objects to maintain js events
|
||||
|
||||
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
|
||||
|
||||
var content = this._getContent();
|
||||
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element);
|
||||
}
|
||||
|
||||
this.setElementContent($tip.find(SELECTOR_CONTENT), content);
|
||||
$tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getContent = function _getContent() {
|
||||
return this.element.getAttribute('data-content') || this.config.content;
|
||||
};
|
||||
|
||||
_proto._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $__default['default'](this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
} // Static
|
||||
;
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $__default['default'](this).data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' ? config : null;
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Popover(this, _config);
|
||||
$__default['default'](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Popover, null, [{
|
||||
key: "VERSION",
|
||||
// Getters
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Popover;
|
||||
}(Tooltip__default['default']);
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'].fn[NAME] = Popover._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Popover;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover._jQueryInterface;
|
||||
};
|
||||
|
||||
return Popover;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=popover.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/popover.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/popover.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/popover.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/popover.min.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/popover.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap popover.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery"),require("./tooltip.js")):"function"==typeof define&&define.amd?define(["jquery","./tooltip"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).Popover=e(t.jQuery,t.Tooltip)}(this,(function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=n(t),r=n(e);function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}var f="popover",a="bs.popover",l="."+a,s=o.default.fn[f],c=new RegExp("(^|\\s)bs-popover\\S+","g"),p=u({},r.default.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),d=u({},r.default.DefaultType,{content:"(string|element|function)"}),h={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},y=function(t){var e,n;function r(){return t.apply(this,arguments)||this}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var u,s,y,v=r.prototype;return v.isWithContent=function(){return this.getTitle()||this._getContent()},v.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},v.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},v.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},v._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},v._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(c);null!==e&&e.length>0&&t.removeClass(e.join(""))},r._jQueryInterface=function(t){return this.each((function(){var e=o.default(this).data(a),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new r(this,n),o.default(this).data(a,e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},u=r,y=[{key:"VERSION",get:function(){return"4.6.0"}},{key:"Default",get:function(){return p}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return a}},{key:"Event",get:function(){return h}},{key:"EVENT_KEY",get:function(){return l}},{key:"DefaultType",get:function(){return d}}],(s=null)&&i(u.prototype,s),y&&i(u,y),r}(r.default);return o.default.fn[f]=y._jQueryInterface,o.default.fn[f].Constructor=y,o.default.fn[f].noConflict=function(){return o.default.fn[f]=s,y._jQueryInterface},y}));
|
||||
//# sourceMappingURL=/sm/25b7a705d8733b14f10f5c5511fd7190dbed6ed3ee253336c94a384071c1ba67.map
|
346
ISPChk/wwwroot/bootstrap/js/dist/scrollspy.js
vendored
Normal file
346
ISPChk/wwwroot/bootstrap/js/dist/scrollspy.js
vendored
Normal file
@ -0,0 +1,346 @@
|
||||
/*!
|
||||
* Bootstrap scrollspy.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'scrollspy';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.scrollspy';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var Default = {
|
||||
offset: 10,
|
||||
method: 'auto',
|
||||
target: ''
|
||||
};
|
||||
var DefaultType = {
|
||||
offset: 'number',
|
||||
method: 'string',
|
||||
target: '(string|element)'
|
||||
};
|
||||
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
|
||||
var EVENT_SCROLL = "scroll" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_NAV_LINKS = '.nav-link';
|
||||
var SELECTOR_NAV_ITEMS = '.nav-item';
|
||||
var SELECTOR_LIST_ITEMS = '.list-group-item';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var METHOD_OFFSET = 'offset';
|
||||
var METHOD_POSITION = 'position';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var ScrollSpy = /*#__PURE__*/function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this = this;
|
||||
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
this._config = this._getConfig(config);
|
||||
this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = 0;
|
||||
$__default['default'](this._scrollElement).on(EVENT_SCROLL, function (event) {
|
||||
return _this._process(event);
|
||||
});
|
||||
this.refresh();
|
||||
|
||||
this._process();
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = ScrollSpy.prototype;
|
||||
|
||||
// Public
|
||||
_proto.refresh = function refresh() {
|
||||
var _this2 = this;
|
||||
|
||||
var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
|
||||
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
|
||||
var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._scrollHeight = this._getScrollHeight();
|
||||
var targets = [].slice.call(document.querySelectorAll(this._selector));
|
||||
targets.map(function (element) {
|
||||
var target;
|
||||
var targetSelector = Util__default['default'].getSelectorFromElement(element);
|
||||
|
||||
if (targetSelector) {
|
||||
target = document.querySelector(targetSelector);
|
||||
}
|
||||
|
||||
if (target) {
|
||||
var targetBCR = target.getBoundingClientRect();
|
||||
|
||||
if (targetBCR.width || targetBCR.height) {
|
||||
// TODO (fat): remove sketch reliance on jQuery position/offset
|
||||
return [$__default['default'](target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(function (item) {
|
||||
return item;
|
||||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this2._offsets.push(item[0]);
|
||||
|
||||
_this2._targets.push(item[1]);
|
||||
});
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
$__default['default'](this._scrollElement).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._scrollElement = null;
|
||||
this._config = null;
|
||||
this._selector = null;
|
||||
this._offsets = null;
|
||||
this._targets = null;
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.target !== 'string' && Util__default['default'].isElement(config.target)) {
|
||||
var id = $__default['default'](config.target).attr('id');
|
||||
|
||||
if (!id) {
|
||||
id = Util__default['default'].getUID(NAME);
|
||||
$__default['default'](config.target).attr('id', id);
|
||||
}
|
||||
|
||||
config.target = "#" + id;
|
||||
}
|
||||
|
||||
Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getScrollTop = function _getScrollTop() {
|
||||
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
|
||||
};
|
||||
|
||||
_proto._getScrollHeight = function _getScrollHeight() {
|
||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||
};
|
||||
|
||||
_proto._getOffsetHeight = function _getOffsetHeight() {
|
||||
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
|
||||
};
|
||||
|
||||
_proto._process = function _process() {
|
||||
var scrollTop = this._getScrollTop() + this._config.offset;
|
||||
|
||||
var scrollHeight = this._getScrollHeight();
|
||||
|
||||
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
|
||||
|
||||
if (this._scrollHeight !== scrollHeight) {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
if (scrollTop >= maxScroll) {
|
||||
var target = this._targets[this._targets.length - 1];
|
||||
|
||||
if (this._activeTarget !== target) {
|
||||
this._activate(target);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
|
||||
this._activeTarget = null;
|
||||
|
||||
this._clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = this._offsets.length; i--;) {
|
||||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
|
||||
|
||||
if (isActiveTarget) {
|
||||
this._activate(this._targets[i]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto._activate = function _activate(target) {
|
||||
this._activeTarget = target;
|
||||
|
||||
this._clear();
|
||||
|
||||
var queries = this._selector.split(',').map(function (selector) {
|
||||
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
|
||||
});
|
||||
|
||||
var $link = $__default['default']([].slice.call(document.querySelectorAll(queries.join(','))));
|
||||
|
||||
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
|
||||
$link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);
|
||||
$link.addClass(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
// Set triggered link as active
|
||||
$link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
|
||||
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item
|
||||
|
||||
$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
$__default['default'](this._scrollElement).trigger(EVENT_ACTIVATE, {
|
||||
relatedTarget: target
|
||||
});
|
||||
};
|
||||
|
||||
_proto._clear = function _clear() {
|
||||
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
|
||||
return node.classList.contains(CLASS_NAME_ACTIVE);
|
||||
}).forEach(function (node) {
|
||||
return node.classList.remove(CLASS_NAME_ACTIVE);
|
||||
});
|
||||
} // Static
|
||||
;
|
||||
|
||||
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $__default['default'](this).data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config);
|
||||
$__default['default'](this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(ScrollSpy, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ScrollSpy;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
|
||||
var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
|
||||
var scrollSpysLength = scrollSpys.length;
|
||||
|
||||
for (var i = scrollSpysLength; i--;) {
|
||||
var $spy = $__default['default'](scrollSpys[i]);
|
||||
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = ScrollSpy._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = ScrollSpy;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return ScrollSpy._jQueryInterface;
|
||||
};
|
||||
|
||||
return ScrollSpy;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=scrollspy.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/scrollspy.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/scrollspy.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/scrollspy.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/scrollspy.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
262
ISPChk/wwwroot/bootstrap/js/dist/tab.js
vendored
Normal file
262
ISPChk/wwwroot/bootstrap/js/dist/tab.js
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
/*!
|
||||
* Bootstrap tab.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'tab';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_ACTIVE_UL = '> li > .active';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tab = /*#__PURE__*/function () {
|
||||
function Tab(element) {
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Tab.prototype;
|
||||
|
||||
// Public
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default['default'](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target;
|
||||
var previous;
|
||||
var listElement = $__default['default'](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
|
||||
var selector = Util__default['default'].getSelectorFromElement(this._element);
|
||||
|
||||
if (listElement) {
|
||||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
|
||||
previous = $__default['default'].makeArray($__default['default'](listElement).find(itemSelector));
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
|
||||
var hideEvent = $__default['default'].Event(EVENT_HIDE, {
|
||||
relatedTarget: this._element
|
||||
});
|
||||
var showEvent = $__default['default'].Event(EVENT_SHOW, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
|
||||
if (previous) {
|
||||
$__default['default'](previous).trigger(hideEvent);
|
||||
}
|
||||
|
||||
$__default['default'](this._element).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector);
|
||||
}
|
||||
|
||||
this._activate(this._element, listElement);
|
||||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = $__default['default'].Event(EVENT_HIDDEN, {
|
||||
relatedTarget: _this._element
|
||||
});
|
||||
var shownEvent = $__default['default'].Event(EVENT_SHOWN, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
$__default['default'](previous).trigger(hiddenEvent);
|
||||
$__default['default'](_this._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (target) {
|
||||
this._activate(target, target.parentNode, complete);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._activate = function _activate(element, container, callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default['default'](container).find(SELECTOR_ACTIVE_UL) : $__default['default'](container).children(SELECTOR_ACTIVE);
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && active && $__default['default'](active).hasClass(CLASS_NAME_FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(active);
|
||||
$__default['default'](active).removeClass(CLASS_NAME_SHOW).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
$__default['default'](active).removeClass(CLASS_NAME_ACTIVE);
|
||||
var dropdownChild = $__default['default'](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
|
||||
|
||||
if (dropdownChild) {
|
||||
$__default['default'](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
active.setAttribute('aria-selected', false);
|
||||
}
|
||||
}
|
||||
|
||||
$__default['default'](element).addClass(CLASS_NAME_ACTIVE);
|
||||
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true);
|
||||
}
|
||||
|
||||
Util__default['default'].reflow(element);
|
||||
|
||||
if (element.classList.contains(CLASS_NAME_FADE)) {
|
||||
element.classList.add(CLASS_NAME_SHOW);
|
||||
}
|
||||
|
||||
if (element.parentNode && $__default['default'](element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
var dropdownElement = $__default['default'](element).closest(SELECTOR_DROPDOWN)[0];
|
||||
|
||||
if (dropdownElement) {
|
||||
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
|
||||
$__default['default'](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
element.setAttribute('aria-expanded', true);
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
} // Static
|
||||
;
|
||||
|
||||
Tab._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $__default['default'](this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Tab(this);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Tab, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Tab;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
Tab._jQueryInterface.call($__default['default'](this), 'show');
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$__default['default'].fn[NAME] = Tab._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Tab;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tab._jQueryInterface;
|
||||
};
|
||||
|
||||
return Tab;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=tab.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/tab.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/tab.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/tab.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/tab.min.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/tab.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap tab.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Tab=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e),l=a(t);function r(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i="bs.tab",d=n.default.fn.tab,o="active",u="fade",f="show",s=".active",c="> li > .active",m=function(){function e(e){this._element=e}var t,a,d,m=e.prototype;return m.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&n.default(this._element).hasClass(o)||n.default(this._element).hasClass("disabled"))){var t,a,r=n.default(this._element).closest(".nav, .list-group")[0],i=l.default.getSelectorFromElement(this._element);if(r){var d="UL"===r.nodeName||"OL"===r.nodeName?c:s;a=(a=n.default.makeArray(n.default(r).find(d)))[a.length-1]}var u=n.default.Event("hide.bs.tab",{relatedTarget:this._element}),f=n.default.Event("show.bs.tab",{relatedTarget:a});if(a&&n.default(a).trigger(u),n.default(this._element).trigger(f),!f.isDefaultPrevented()&&!u.isDefaultPrevented()){i&&(t=document.querySelector(i)),this._activate(this._element,r);var m=function(){var t=n.default.Event("hidden.bs.tab",{relatedTarget:e._element}),l=n.default.Event("shown.bs.tab",{relatedTarget:a});n.default(a).trigger(t),n.default(e._element).trigger(l)};t?this._activate(t,t.parentNode,m):m()}}},m.dispose=function(){n.default.removeData(this._element,i),this._element=null},m._activate=function(e,t,a){var r=this,i=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?n.default(t).children(s):n.default(t).find(c))[0],d=a&&i&&n.default(i).hasClass(u),o=function(){return r._transitionComplete(e,i,a)};if(i&&d){var m=l.default.getTransitionDurationFromElement(i);n.default(i).removeClass(f).one(l.default.TRANSITION_END,o).emulateTransitionEnd(m)}else o()},m._transitionComplete=function(e,t,a){if(t){n.default(t).removeClass(o);var r=n.default(t.parentNode).find("> .dropdown-menu .active")[0];r&&n.default(r).removeClass(o),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}if(n.default(e).addClass(o),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),l.default.reflow(e),e.classList.contains(u)&&e.classList.add(f),e.parentNode&&n.default(e.parentNode).hasClass("dropdown-menu")){var i=n.default(e).closest(".dropdown")[0];if(i){var d=[].slice.call(i.querySelectorAll(".dropdown-toggle"));n.default(d).addClass(o)}e.setAttribute("aria-expanded",!0)}a&&a()},e._jQueryInterface=function(t){return this.each((function(){var a=n.default(this),l=a.data(i);if(l||(l=new e(this),a.data(i,l)),"string"==typeof t){if(void 0===l[t])throw new TypeError('No method named "'+t+'"');l[t]()}}))},t=e,d=[{key:"VERSION",get:function(){return"4.6.0"}}],(a=null)&&r(t.prototype,a),d&&r(t,d),e}();return n.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(e){e.preventDefault(),m._jQueryInterface.call(n.default(this),"show")})),n.default.fn.tab=m._jQueryInterface,n.default.fn.tab.Constructor=m,n.default.fn.tab.noConflict=function(){return n.default.fn.tab=d,m._jQueryInterface},m}));
|
||||
//# sourceMappingURL=/sm/d8098eb34f0f0a355cb6e7b83e9e3c7e74385ccdd121e4015710eea939e5d196.map
|
272
ISPChk/wwwroot/bootstrap/js/dist/toast.js
vendored
Normal file
272
ISPChk/wwwroot/bootstrap/js/dist/toast.js
vendored
Normal file
@ -0,0 +1,272 @@
|
||||
/*!
|
||||
* Bootstrap toast.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.jQuery, global.Util));
|
||||
}(this, (function ($, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'toast';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.toast';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_HIDE = 'hide';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_SHOWING = 'showing';
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
autohide: 'boolean',
|
||||
delay: 'number'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
autohide: true,
|
||||
delay: 500
|
||||
};
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Toast = /*#__PURE__*/function () {
|
||||
function Toast(element, config) {
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._timeout = null;
|
||||
|
||||
this._setListeners();
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Toast.prototype;
|
||||
|
||||
// Public
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
var showEvent = $__default['default'].Event(EVENT_SHOW);
|
||||
$__default['default'](this._element).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._clearTimeout();
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(CLASS_NAME_FADE);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
_this._element.classList.remove(CLASS_NAME_SHOWING);
|
||||
|
||||
_this._element.classList.add(CLASS_NAME_SHOW);
|
||||
|
||||
$__default['default'](_this._element).trigger(EVENT_SHOWN);
|
||||
|
||||
if (_this._config.autohide) {
|
||||
_this._timeout = setTimeout(function () {
|
||||
_this.hide();
|
||||
}, _this._config.delay);
|
||||
}
|
||||
};
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_HIDE);
|
||||
|
||||
Util__default['default'].reflow(this._element);
|
||||
|
||||
this._element.classList.add(CLASS_NAME_SHOWING);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto.hide = function hide() {
|
||||
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = $__default['default'].Event(EVENT_HIDE);
|
||||
$__default['default'](this._element).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._close();
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
this._clearTimeout();
|
||||
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
}
|
||||
|
||||
$__default['default'](this._element).off(EVENT_CLICK_DISMISS);
|
||||
$__default['default'].removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
this._config = null;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _extends({}, Default, $__default['default'](this._element).data(), typeof config === 'object' && config ? config : {});
|
||||
Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._setListeners = function _setListeners() {
|
||||
var _this2 = this;
|
||||
|
||||
$__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
|
||||
return _this2.hide();
|
||||
});
|
||||
};
|
||||
|
||||
_proto._close = function _close() {
|
||||
var _this3 = this;
|
||||
|
||||
var complete = function complete() {
|
||||
_this3._element.classList.add(CLASS_NAME_HIDE);
|
||||
|
||||
$__default['default'](_this3._element).trigger(EVENT_HIDDEN);
|
||||
};
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
|
||||
$__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._clearTimeout = function _clearTimeout() {
|
||||
clearTimeout(this._timeout);
|
||||
this._timeout = null;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Toast._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default['default'](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new Toast(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config](this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Toast, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Toast;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'].fn[NAME] = Toast._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Toast;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Toast._jQueryInterface;
|
||||
};
|
||||
|
||||
return Toast;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=toast.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/toast.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/toast.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/toast.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/toast.min.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/toast.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap toast.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Toast=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),o=n(t);function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var l="toast",u="bs.toast",r=i.default.fn.toast,f="click.dismiss.bs.toast",d="hide",c="show",h="showing",m={animation:"boolean",autohide:"boolean",delay:"number"},_={animation:!0,autohide:!0,delay:500},g=function(){function e(e,t){this._element=e,this._config=this._getConfig(t),this._timeout=null,this._setListeners()}var t,n,r,g=e.prototype;return g.show=function(){var e=this,t=i.default.Event("show.bs.toast");if(i.default(this._element).trigger(t),!t.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){e._element.classList.remove(h),e._element.classList.add(c),i.default(e._element).trigger("shown.bs.toast"),e._config.autohide&&(e._timeout=setTimeout((function(){e.hide()}),e._config.delay))};if(this._element.classList.remove(d),o.default.reflow(this._element),this._element.classList.add(h),this._config.animation){var s=o.default.getTransitionDurationFromElement(this._element);i.default(this._element).one(o.default.TRANSITION_END,n).emulateTransitionEnd(s)}else n()}},g.hide=function(){if(this._element.classList.contains(c)){var e=i.default.Event("hide.bs.toast");i.default(this._element).trigger(e),e.isDefaultPrevented()||this._close()}},g.dispose=function(){this._clearTimeout(),this._element.classList.contains(c)&&this._element.classList.remove(c),i.default(this._element).off(f),i.default.removeData(this._element,u),this._element=null,this._config=null},g._getConfig=function(e){return e=a({},_,i.default(this._element).data(),"object"==typeof e&&e?e:{}),o.default.typeCheckConfig(l,e,this.constructor.DefaultType),e},g._setListeners=function(){var e=this;i.default(this._element).on(f,'[data-dismiss="toast"]',(function(){return e.hide()}))},g._close=function(){var e=this,t=function(){e._element.classList.add(d),i.default(e._element).trigger("hidden.bs.toast")};if(this._element.classList.remove(c),this._config.animation){var n=o.default.getTransitionDurationFromElement(this._element);i.default(this._element).one(o.default.TRANSITION_END,t).emulateTransitionEnd(n)}else t()},g._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},e._jQueryInterface=function(t){return this.each((function(){var n=i.default(this),o=n.data(u);if(o||(o=new e(this,"object"==typeof t&&t),n.data(u,o)),"string"==typeof t){if(void 0===o[t])throw new TypeError('No method named "'+t+'"');o[t](this)}}))},t=e,r=[{key:"VERSION",get:function(){return"4.6.0"}},{key:"DefaultType",get:function(){return m}},{key:"Default",get:function(){return _}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();return i.default.fn.toast=g._jQueryInterface,i.default.fn.toast.Constructor=g,i.default.fn.toast.noConflict=function(){return i.default.fn.toast=r,g._jQueryInterface},g}));
|
||||
//# sourceMappingURL=/sm/69b5368ca5f0751f22325daee389fb04805d70e4493b5fd3a9bdbd447bf69cef.map
|
892
ISPChk/wwwroot/bootstrap/js/dist/tooltip.js
vendored
Normal file
892
ISPChk/wwwroot/bootstrap/js/dist/tooltip.js
vendored
Normal file
@ -0,0 +1,892 @@
|
||||
/*!
|
||||
* Bootstrap tooltip.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
|
||||
}(this, (function ($, Popper, Util) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
|
||||
var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): tools/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
|
||||
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
||||
var DefaultWhitelist = {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
||||
a: ['target', 'href', 'title', 'rel'],
|
||||
area: [],
|
||||
b: [],
|
||||
br: [],
|
||||
col: [],
|
||||
code: [],
|
||||
div: [],
|
||||
em: [],
|
||||
hr: [],
|
||||
h1: [],
|
||||
h2: [],
|
||||
h3: [],
|
||||
h4: [],
|
||||
h5: [],
|
||||
h6: [],
|
||||
i: [],
|
||||
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
|
||||
li: [],
|
||||
ol: [],
|
||||
p: [],
|
||||
pre: [],
|
||||
s: [],
|
||||
small: [],
|
||||
span: [],
|
||||
sub: [],
|
||||
sup: [],
|
||||
strong: [],
|
||||
u: [],
|
||||
ul: []
|
||||
};
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
||||
|
||||
function allowedAttribute(attr, allowedAttributeList) {
|
||||
var attrName = attr.nodeName.toLowerCase();
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var regExp = allowedAttributeList.filter(function (attrRegex) {
|
||||
return attrRegex instanceof RegExp;
|
||||
}); // Check if a regular expression validates the attribute.
|
||||
|
||||
for (var i = 0, len = regExp.length; i < len; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
if (unsafeHtml.length === 0) {
|
||||
return unsafeHtml;
|
||||
}
|
||||
|
||||
if (sanitizeFn && typeof sanitizeFn === 'function') {
|
||||
return sanitizeFn(unsafeHtml);
|
||||
}
|
||||
|
||||
var domParser = new window.DOMParser();
|
||||
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
|
||||
var whitelistKeys = Object.keys(whiteList);
|
||||
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
|
||||
|
||||
var _loop = function _loop(i, len) {
|
||||
var el = elements[i];
|
||||
var elName = el.nodeName.toLowerCase();
|
||||
|
||||
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
|
||||
el.parentNode.removeChild(el);
|
||||
return "continue";
|
||||
}
|
||||
|
||||
var attributeList = [].slice.call(el.attributes);
|
||||
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
|
||||
attributeList.forEach(function (attr) {
|
||||
if (!allowedAttribute(attr, whitelistedAttributes)) {
|
||||
el.removeAttribute(attr.nodeName);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
var _ret = _loop(i);
|
||||
|
||||
if (_ret === "continue") continue;
|
||||
}
|
||||
|
||||
return createdDocument.body.innerHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var NAME = 'tooltip';
|
||||
var VERSION = '4.6.0';
|
||||
var DATA_KEY = 'bs.tooltip';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
title: '(string|element|function)',
|
||||
trigger: 'string',
|
||||
delay: '(number|object)',
|
||||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: '(number|string|function)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)',
|
||||
boundary: '(string|element)',
|
||||
customClass: '(string|function)',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
whiteList: 'object',
|
||||
popperConfig: '(null|object)'
|
||||
};
|
||||
var AttachmentMap = {
|
||||
AUTO: 'auto',
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip',
|
||||
boundary: 'scrollParent',
|
||||
customClass: '',
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
whiteList: DefaultWhitelist,
|
||||
popperConfig: null
|
||||
};
|
||||
var HOVER_STATE_SHOW = 'show';
|
||||
var HOVER_STATE_OUT = 'out';
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
INSERTED: "inserted" + EVENT_KEY,
|
||||
CLICK: "click" + EVENT_KEY,
|
||||
FOCUSIN: "focusin" + EVENT_KEY,
|
||||
FOCUSOUT: "focusout" + EVENT_KEY,
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
||||
};
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
||||
var SELECTOR_ARROW = '.arrow';
|
||||
var TRIGGER_HOVER = 'hover';
|
||||
var TRIGGER_FOCUS = 'focus';
|
||||
var TRIGGER_CLICK = 'click';
|
||||
var TRIGGER_MANUAL = 'manual';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tooltip = /*#__PURE__*/function () {
|
||||
function Tooltip(element, config) {
|
||||
if (typeof Popper__default['default'] === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
|
||||
} // private
|
||||
|
||||
|
||||
this._isEnabled = true;
|
||||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._popper = null; // Protected
|
||||
|
||||
this.element = element;
|
||||
this.config = this._getConfig(config);
|
||||
this.tip = null;
|
||||
|
||||
this._setListeners();
|
||||
} // Getters
|
||||
|
||||
|
||||
var _proto = Tooltip.prototype;
|
||||
|
||||
// Public
|
||||
_proto.enable = function enable() {
|
||||
this._isEnabled = true;
|
||||
};
|
||||
|
||||
_proto.disable = function disable() {
|
||||
this._isEnabled = false;
|
||||
};
|
||||
|
||||
_proto.toggleEnabled = function toggleEnabled() {
|
||||
this._isEnabled = !this._isEnabled;
|
||||
};
|
||||
|
||||
_proto.toggle = function toggle(event) {
|
||||
if (!this._isEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
var context = $__default['default'](event.currentTarget).data(dataKey);
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||
$__default['default'](event.currentTarget).data(dataKey, context);
|
||||
}
|
||||
|
||||
context._activeTrigger.click = !context._activeTrigger.click;
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
context._enter(null, context);
|
||||
} else {
|
||||
context._leave(null, context);
|
||||
}
|
||||
} else {
|
||||
if ($__default['default'](this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
|
||||
this._leave(null, this);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this._enter(null, this);
|
||||
}
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
$__default['default'].removeData(this.element, this.constructor.DATA_KEY);
|
||||
$__default['default'](this.element).off(this.constructor.EVENT_KEY);
|
||||
$__default['default'](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.tip) {
|
||||
$__default['default'](this.tip).remove();
|
||||
}
|
||||
|
||||
this._isEnabled = null;
|
||||
this._timeout = null;
|
||||
this._hoverState = null;
|
||||
this._activeTrigger = null;
|
||||
|
||||
if (this._popper) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
|
||||
this._popper = null;
|
||||
this.element = null;
|
||||
this.config = null;
|
||||
this.tip = null;
|
||||
};
|
||||
|
||||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if ($__default['default'](this.element).css('display') === 'none') {
|
||||
throw new Error('Please use show on visible elements');
|
||||
}
|
||||
|
||||
var showEvent = $__default['default'].Event(this.constructor.Event.SHOW);
|
||||
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
$__default['default'](this.element).trigger(showEvent);
|
||||
var shadowRoot = Util__default['default'].findShadowRoot(this.element);
|
||||
var isInTheDom = $__default['default'].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
||||
return;
|
||||
}
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var tipId = Util__default['default'].getUID(this.constructor.NAME);
|
||||
tip.setAttribute('id', tipId);
|
||||
this.element.setAttribute('aria-describedby', tipId);
|
||||
this.setContent();
|
||||
|
||||
if (this.config.animation) {
|
||||
$__default['default'](tip).addClass(CLASS_NAME_FADE);
|
||||
}
|
||||
|
||||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
|
||||
this.addAttachmentClass(attachment);
|
||||
|
||||
var container = this._getContainer();
|
||||
|
||||
$__default['default'](tip).data(this.constructor.DATA_KEY, this);
|
||||
|
||||
if (!$__default['default'].contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$__default['default'](tip).appendTo(container);
|
||||
}
|
||||
|
||||
$__default['default'](this.element).trigger(this.constructor.Event.INSERTED);
|
||||
this._popper = new Popper__default['default'](this.element, tip, this._getPopperConfig(attachment));
|
||||
$__default['default'](tip).addClass(CLASS_NAME_SHOW);
|
||||
$__default['default'](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this.config.animation) {
|
||||
_this._fixTransition();
|
||||
}
|
||||
|
||||
var prevHoverState = _this._hoverState;
|
||||
_this._hoverState = null;
|
||||
$__default['default'](_this.element).trigger(_this.constructor.Event.SHOWN);
|
||||
|
||||
if (prevHoverState === HOVER_STATE_OUT) {
|
||||
_this._leave(null, _this);
|
||||
}
|
||||
};
|
||||
|
||||
if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this.tip);
|
||||
$__default['default'](this.tip).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto.hide = function hide(callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $__default['default'].Event(this.constructor.Event.HIDE);
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
}
|
||||
|
||||
_this2._cleanTipClass();
|
||||
|
||||
_this2.element.removeAttribute('aria-describedby');
|
||||
|
||||
$__default['default'](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
||||
|
||||
if (_this2._popper !== null) {
|
||||
_this2._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
$__default['default'](this.element).trigger(hideEvent);
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$__default['default'](tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
|
||||
}
|
||||
|
||||
this._activeTrigger[TRIGGER_CLICK] = false;
|
||||
this._activeTrigger[TRIGGER_FOCUS] = false;
|
||||
this._activeTrigger[TRIGGER_HOVER] = false;
|
||||
|
||||
if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = Util__default['default'].getTransitionDurationFromElement(tip);
|
||||
$__default['default'](tip).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
this._hoverState = '';
|
||||
};
|
||||
|
||||
_proto.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
} // Protected
|
||||
;
|
||||
|
||||
_proto.isWithContent = function isWithContent() {
|
||||
return Boolean(this.getTitle());
|
||||
};
|
||||
|
||||
_proto.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
|
||||
};
|
||||
|
||||
_proto.getTipElement = function getTipElement() {
|
||||
this.tip = this.tip || $__default['default'](this.config.template)[0];
|
||||
return this.tip;
|
||||
};
|
||||
|
||||
_proto.setContent = function setContent() {
|
||||
var tip = this.getTipElement();
|
||||
this.setElementContent($__default['default'](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
|
||||
$__default['default'](tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
|
||||
};
|
||||
|
||||
_proto.setElementContent = function setElementContent($element, content) {
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// Content is a DOM node or a jQuery
|
||||
if (this.config.html) {
|
||||
if (!$__default['default'](content).parent().is($element)) {
|
||||
$element.empty().append(content);
|
||||
}
|
||||
} else {
|
||||
$element.text($__default['default'](content).text());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.config.html) {
|
||||
if (this.config.sanitize) {
|
||||
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
|
||||
}
|
||||
|
||||
$element.html(content);
|
||||
} else {
|
||||
$element.text(content);
|
||||
}
|
||||
};
|
||||
|
||||
_proto.getTitle = function getTitle() {
|
||||
var title = this.element.getAttribute('data-original-title');
|
||||
|
||||
if (!title) {
|
||||
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
|
||||
}
|
||||
|
||||
return title;
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getPopperConfig = function _getPopperConfig(attachment) {
|
||||
var _this3 = this;
|
||||
|
||||
var defaultBsConfig = {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
arrow: {
|
||||
element: SELECTOR_ARROW
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this.config.boundary
|
||||
}
|
||||
},
|
||||
onCreate: function onCreate(data) {
|
||||
if (data.originalPlacement !== data.placement) {
|
||||
_this3._handlePopperPlacementChange(data);
|
||||
}
|
||||
},
|
||||
onUpdate: function onUpdate(data) {
|
||||
return _this3._handlePopperPlacementChange(data);
|
||||
}
|
||||
};
|
||||
return _extends({}, defaultBsConfig, this.config.popperConfig);
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
var _this4 = this;
|
||||
|
||||
var offset = {};
|
||||
|
||||
if (typeof this.config.offset === 'function') {
|
||||
offset.fn = function (data) {
|
||||
data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
|
||||
return data;
|
||||
};
|
||||
} else {
|
||||
offset.offset = this.config.offset;
|
||||
}
|
||||
|
||||
return offset;
|
||||
};
|
||||
|
||||
_proto._getContainer = function _getContainer() {
|
||||
if (this.config.container === false) {
|
||||
return document.body;
|
||||
}
|
||||
|
||||
if (Util__default['default'].isElement(this.config.container)) {
|
||||
return $__default['default'](this.config.container);
|
||||
}
|
||||
|
||||
return $__default['default'](document).find(this.config.container);
|
||||
};
|
||||
|
||||
_proto._getAttachment = function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
};
|
||||
|
||||
_proto._setListeners = function _setListeners() {
|
||||
var _this5 = this;
|
||||
|
||||
var triggers = this.config.trigger.split(' ');
|
||||
triggers.forEach(function (trigger) {
|
||||
if (trigger === 'click') {
|
||||
$__default['default'](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
|
||||
return _this5.toggle(event);
|
||||
});
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
|
||||
$__default['default'](_this5.element).on(eventIn, _this5.config.selector, function (event) {
|
||||
return _this5._enter(event);
|
||||
}).on(eventOut, _this5.config.selector, function (event) {
|
||||
return _this5._leave(event);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this._hideModalHandler = function () {
|
||||
if (_this5.element) {
|
||||
_this5.hide();
|
||||
}
|
||||
};
|
||||
|
||||
$__default['default'](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = _extends({}, this.config, {
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
});
|
||||
} else {
|
||||
this._fixTitle();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._fixTitle = function _fixTitle() {
|
||||
var titleType = typeof this.element.getAttribute('data-original-title');
|
||||
|
||||
if (this.element.getAttribute('title') || titleType !== 'string') {
|
||||
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
|
||||
this.element.setAttribute('title', '');
|
||||
}
|
||||
};
|
||||
|
||||
_proto._enter = function _enter(event, context) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
context = context || $__default['default'](event.currentTarget).data(dataKey);
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||
$__default['default'](event.currentTarget).data(dataKey, context);
|
||||
}
|
||||
|
||||
if (event) {
|
||||
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
|
||||
}
|
||||
|
||||
if ($__default['default'](context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
|
||||
context._hoverState = HOVER_STATE_SHOW;
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout);
|
||||
context._hoverState = HOVER_STATE_SHOW;
|
||||
|
||||
if (!context.config.delay || !context.config.delay.show) {
|
||||
context.show();
|
||||
return;
|
||||
}
|
||||
|
||||
context._timeout = setTimeout(function () {
|
||||
if (context._hoverState === HOVER_STATE_SHOW) {
|
||||
context.show();
|
||||
}
|
||||
}, context.config.delay.show);
|
||||
};
|
||||
|
||||
_proto._leave = function _leave(event, context) {
|
||||
var dataKey = this.constructor.DATA_KEY;
|
||||
context = context || $__default['default'](event.currentTarget).data(dataKey);
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
|
||||
$__default['default'](event.currentTarget).data(dataKey, context);
|
||||
}
|
||||
|
||||
if (event) {
|
||||
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
|
||||
}
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout);
|
||||
context._hoverState = HOVER_STATE_OUT;
|
||||
|
||||
if (!context.config.delay || !context.config.delay.hide) {
|
||||
context.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
context._timeout = setTimeout(function () {
|
||||
if (context._hoverState === HOVER_STATE_OUT) {
|
||||
context.hide();
|
||||
}
|
||||
}, context.config.delay.hide);
|
||||
};
|
||||
|
||||
_proto._isWithActiveTrigger = function _isWithActiveTrigger() {
|
||||
for (var trigger in this._activeTrigger) {
|
||||
if (this._activeTrigger[trigger]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
var dataAttributes = $__default['default'](this.element).data();
|
||||
Object.keys(dataAttributes).forEach(function (dataAttr) {
|
||||
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
|
||||
delete dataAttributes[dataAttr];
|
||||
}
|
||||
});
|
||||
config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
show: config.delay,
|
||||
hide: config.delay
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
}
|
||||
|
||||
if (typeof config.content === 'number') {
|
||||
config.content = config.content.toString();
|
||||
}
|
||||
|
||||
Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
if (config.sanitize) {
|
||||
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._getDelegateConfig = function _getDelegateConfig() {
|
||||
var config = {};
|
||||
|
||||
if (this.config) {
|
||||
for (var key in this.config) {
|
||||
if (this.constructor.Default[key] !== this.config[key]) {
|
||||
config[key] = this.config[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
_proto._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $__default['default'](this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
|
||||
this.tip = popperData.instance.popper;
|
||||
|
||||
this._cleanTipClass();
|
||||
|
||||
this.addAttachmentClass(this._getAttachment(popperData.placement));
|
||||
};
|
||||
|
||||
_proto._fixTransition = function _fixTransition() {
|
||||
var tip = this.getTipElement();
|
||||
var initConfigAnimation = this.config.animation;
|
||||
|
||||
if (tip.getAttribute('x-placement') !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
$__default['default'](tip).removeClass(CLASS_NAME_FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
} // Static
|
||||
;
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $__default['default'](this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
var _config = typeof config === 'object' && config;
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Tooltip(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"" + config + "\"");
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_createClass(Tooltip, null, [{
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Tooltip;
|
||||
}();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
$__default['default'].fn[NAME] = Tooltip._jQueryInterface;
|
||||
$__default['default'].fn[NAME].Constructor = Tooltip;
|
||||
|
||||
$__default['default'].fn[NAME].noConflict = function () {
|
||||
$__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tooltip._jQueryInterface;
|
||||
};
|
||||
|
||||
return Tooltip;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=tooltip.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/tooltip.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/tooltip.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/tooltip.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/tooltip.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
193
ISPChk/wwwroot/bootstrap/js/dist/util.js
vendored
Normal file
193
ISPChk/wwwroot/bootstrap/js/dist/util.js
vendored
Normal file
@ -0,0 +1,193 @@
|
||||
/*!
|
||||
* Bootstrap util.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery));
|
||||
}(this, (function ($) { 'use strict';
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var $__default = /*#__PURE__*/_interopDefaultLegacy($);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): util.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Private TransitionEnd Helpers
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var TRANSITION_END = 'transitionend';
|
||||
var MAX_UID = 1000000;
|
||||
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
function toType(obj) {
|
||||
if (obj === null || typeof obj === 'undefined') {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
}
|
||||
|
||||
function getSpecialTransitionEndEvent() {
|
||||
return {
|
||||
bindType: TRANSITION_END,
|
||||
delegateType: TRANSITION_END,
|
||||
handle: function handle(event) {
|
||||
if ($__default['default'](event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndEmulator(duration) {
|
||||
var _this = this;
|
||||
|
||||
var called = false;
|
||||
$__default['default'](this).one(Util.TRANSITION_END, function () {
|
||||
called = true;
|
||||
});
|
||||
setTimeout(function () {
|
||||
if (!called) {
|
||||
Util.triggerTransitionEnd(_this);
|
||||
}
|
||||
}, duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
function setTransitionEndSupport() {
|
||||
$__default['default'].fn.emulateTransitionEnd = transitionEndEmulator;
|
||||
$__default['default'].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var Util = {
|
||||
TRANSITION_END: 'bsTransitionEnd',
|
||||
getUID: function getUID(prefix) {
|
||||
do {
|
||||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
},
|
||||
getSelectorFromElement: function getSelectorFromElement(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||
}
|
||||
|
||||
try {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var transitionDuration = $__default['default'](element).css('transition-duration');
|
||||
var transitionDelay = $__default['default'](element).css('transition-delay');
|
||||
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
transitionDelay = transitionDelay.split(',')[0];
|
||||
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||
},
|
||||
reflow: function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
},
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||
$__default['default'](element).trigger(TRANSITION_END);
|
||||
},
|
||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||
return Boolean(TRANSITION_END);
|
||||
},
|
||||
isElement: function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
},
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
||||
for (var property in configTypes) {
|
||||
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
findShadowRoot: function findShadowRoot(element) {
|
||||
if (!document.documentElement.attachShadow) {
|
||||
return null;
|
||||
} // Can find the shadow root otherwise it'll return the document
|
||||
|
||||
|
||||
if (typeof element.getRootNode === 'function') {
|
||||
var root = element.getRootNode();
|
||||
return root instanceof ShadowRoot ? root : null;
|
||||
}
|
||||
|
||||
if (element instanceof ShadowRoot) {
|
||||
return element;
|
||||
} // when we don't find a shadow root
|
||||
|
||||
|
||||
if (!element.parentNode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Util.findShadowRoot(element.parentNode);
|
||||
},
|
||||
jQueryDetection: function jQueryDetection() {
|
||||
if (typeof $__default['default'] === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
||||
}
|
||||
|
||||
var version = $__default['default'].fn.jquery.split(' ')[0].split('.');
|
||||
var minMajor = 1;
|
||||
var ltMajor = 2;
|
||||
var minMinor = 9;
|
||||
var minPatch = 1;
|
||||
var maxMajor = 4;
|
||||
|
||||
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
||||
}
|
||||
}
|
||||
};
|
||||
Util.jQueryDetection();
|
||||
setTransitionEndSupport();
|
||||
|
||||
return Util;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=util.js.map
|
1
ISPChk/wwwroot/bootstrap/js/dist/util.js.map
vendored
Normal file
1
ISPChk/wwwroot/bootstrap/js/dist/util.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
13
ISPChk/wwwroot/bootstrap/js/dist/util.min.js
vendored
Normal file
13
ISPChk/wwwroot/bootstrap/js/dist/util.min.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/dist/util.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap util.js v4.6.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).Util=e(t.jQuery)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r="transitionend";function o(t){var e=this,r=!1;return n.default(this).one(i.TRANSITION_END,(function(){r=!0})),setTimeout((function(){r||i.triggerTransitionEnd(e)}),t),this}var i={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=n.default(t).css("transition-duration"),r=n.default(t).css("transition-delay"),o=parseFloat(e),i=parseFloat(r);return o||i?(e=e.split(",")[0],r=r.split(",")[0],1e3*(parseFloat(e)+parseFloat(r))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){n.default(t).trigger(r)},supportsTransitionEnd:function(){return Boolean(r)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r],a=e[r],u=a&&i.isElement(a)?"element":null==(l=a)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(u))throw new Error(t.toUpperCase()+': Option "'+r+'" provided type "'+u+'" but expected type "'+o+'".')}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?i.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if(void 0===n.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=n.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};return i.jQueryDetection(),n.default.fn.emulateTransitionEnd=o,n.default.event.special[i.TRANSITION_END]={bindType:r,delegateType:r,handle:function(t){if(n.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},i}));
|
||||
//# sourceMappingURL=/sm/fa8d64f75c3310a5e940b6ad60859aa8af05e5b41ba3b48a3235caea70d7da98.map
|
173
ISPChk/wwwroot/bootstrap/js/src/alert.js
Normal file
173
ISPChk/wwwroot/bootstrap/js/src/alert.js
Normal file
@ -0,0 +1,173 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'alert'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.alert'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const SELECTOR_DISMISS = '[data-dismiss="alert"]'
|
||||
|
||||
const EVENT_CLOSE = `close${EVENT_KEY}`
|
||||
const EVENT_CLOSED = `closed${EVENT_KEY}`
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_ALERT = 'alert'
|
||||
const CLASS_NAME_FADE = 'fade'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Alert {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
close(element) {
|
||||
let rootElement = this._element
|
||||
if (element) {
|
||||
rootElement = this._getRootElement(element)
|
||||
}
|
||||
|
||||
const customEvent = this._triggerCloseEvent(rootElement)
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
this._removeElement(rootElement)
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
this._element = null
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getRootElement(element) {
|
||||
const selector = Util.getSelectorFromElement(element)
|
||||
let parent = false
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector)
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0]
|
||||
}
|
||||
|
||||
return parent
|
||||
}
|
||||
|
||||
_triggerCloseEvent(element) {
|
||||
const closeEvent = $.Event(EVENT_CLOSE)
|
||||
|
||||
$(element).trigger(closeEvent)
|
||||
return closeEvent
|
||||
}
|
||||
|
||||
_removeElement(element) {
|
||||
$(element).removeClass(CLASS_NAME_SHOW)
|
||||
|
||||
if (!$(element).hasClass(CLASS_NAME_FADE)) {
|
||||
this._destroyElement(element)
|
||||
return
|
||||
}
|
||||
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(element)
|
||||
|
||||
$(element)
|
||||
.one(Util.TRANSITION_END, event => this._destroyElement(element, event))
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
}
|
||||
|
||||
_destroyElement(element) {
|
||||
$(element)
|
||||
.detach()
|
||||
.trigger(EVENT_CLOSED)
|
||||
.remove()
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
const $element = $(this)
|
||||
let data = $element.data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this)
|
||||
$element.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
data[config](this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static _handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
alertInstance.close(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(
|
||||
EVENT_CLICK_DATA_API,
|
||||
SELECTOR_DISMISS,
|
||||
Alert._handleDismiss(new Alert())
|
||||
)
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Alert._jQueryInterface
|
||||
$.fn[NAME].Constructor = Alert
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Alert._jQueryInterface
|
||||
}
|
||||
|
||||
export default Alert
|
8
ISPChk/wwwroot/bootstrap/js/src/alert.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/alert.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/alert.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
import $ from"jquery";import Util from"./util";const NAME="alert",VERSION="4.6.0",DATA_KEY="bs.alert",EVENT_KEY=".bs.alert",DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn.alert,SELECTOR_DISMISS='[data-dismiss="alert"]',EVENT_CLOSE="close.bs.alert",EVENT_CLOSED="closed.bs.alert",EVENT_CLICK_DATA_API="click.bs.alert.data-api",CLASS_NAME_ALERT="alert",CLASS_NAME_FADE="fade",CLASS_NAME_SHOW="show";class Alert{constructor(e){this._element=e}static get VERSION(){return"4.6.0"}close(e){let t=this._element;e&&(t=this._getRootElement(e));this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)}dispose(){$.removeData(this._element,DATA_KEY),this._element=null}_getRootElement(e){const t=Util.getSelectorFromElement(e);let r=!1;return t&&(r=document.querySelector(t)),r||(r=$(e).closest(".alert")[0]),r}_triggerCloseEvent(e){const t=$.Event(EVENT_CLOSE);return $(e).trigger(t),t}_removeElement(e){if($(e).removeClass("show"),!$(e).hasClass("fade"))return void this._destroyElement(e);const t=Util.getTransitionDurationFromElement(e);$(e).one(Util.TRANSITION_END,(t=>this._destroyElement(e,t))).emulateTransitionEnd(t)}_destroyElement(e){$(e).detach().trigger(EVENT_CLOSED).remove()}static _jQueryInterface(e){return this.each((function(){const t=$(this);let r=t.data(DATA_KEY);r||(r=new Alert(this),t.data(DATA_KEY,r)),"close"===e&&r[e](this)}))}static _handleDismiss(e){return function(t){t&&t.preventDefault(),e.close(this)}}}$(document).on(EVENT_CLICK_DATA_API,SELECTOR_DISMISS,Alert._handleDismiss(new Alert)),$.fn.alert=Alert._jQueryInterface,$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=()=>($.fn.alert=JQUERY_NO_CONFLICT,Alert._jQueryInterface);export default Alert;
|
||||
//# sourceMappingURL=/sm/87b8de175964f44f905bdb68fcab227e161d9a0b18e54c57a7c492170942d7f5.map
|
209
ISPChk/wwwroot/bootstrap/js/src/button.js
Normal file
209
ISPChk/wwwroot/bootstrap/js/src/button.js
Normal file
@ -0,0 +1,209 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'button'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.button'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const CLASS_NAME_ACTIVE = 'active'
|
||||
const CLASS_NAME_BUTTON = 'btn'
|
||||
const CLASS_NAME_FOCUS = 'focus'
|
||||
|
||||
const SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'
|
||||
const SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-toggle="button"]'
|
||||
const SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'
|
||||
const SELECTOR_INPUT = 'input:not([type="hidden"])'
|
||||
const SELECTOR_ACTIVE = '.active'
|
||||
const SELECTOR_BUTTON = '.btn'
|
||||
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
const EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` +
|
||||
`blur${EVENT_KEY}${DATA_API_KEY}`
|
||||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Button {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
this.shouldAvoidTriggerChange = false
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggle() {
|
||||
let triggerChangeEvent = true
|
||||
let addAriaPressed = true
|
||||
const rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]
|
||||
|
||||
if (rootElement) {
|
||||
const input = this._element.querySelector(SELECTOR_INPUT)
|
||||
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
triggerChangeEvent = false
|
||||
} else {
|
||||
const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)
|
||||
|
||||
if (activeElement) {
|
||||
$(activeElement).removeClass(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
// if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
|
||||
if (input.type === 'checkbox' || input.type === 'radio') {
|
||||
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
|
||||
if (!this.shouldAvoidTriggerChange) {
|
||||
$(input).trigger('change')
|
||||
}
|
||||
}
|
||||
|
||||
input.focus()
|
||||
addAriaPressed = false
|
||||
}
|
||||
}
|
||||
|
||||
if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE))
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
$(this._element).toggleClass(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
this._element = null
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config, avoidTriggerChange) {
|
||||
return this.each(function () {
|
||||
const $element = $(this)
|
||||
let data = $element.data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new Button(this)
|
||||
$element.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
data.shouldAvoidTriggerChange = avoidTriggerChange
|
||||
|
||||
if (config === 'toggle') {
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document)
|
||||
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {
|
||||
let button = event.target
|
||||
const initialButton = button
|
||||
|
||||
if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
|
||||
button = $(button).closest(SELECTOR_BUTTON)[0]
|
||||
}
|
||||
|
||||
if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
|
||||
event.preventDefault() // work around Firefox bug #1540995
|
||||
} else {
|
||||
const inputBtn = button.querySelector(SELECTOR_INPUT)
|
||||
|
||||
if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
|
||||
event.preventDefault() // work around Firefox bug #1540995
|
||||
return
|
||||
}
|
||||
|
||||
if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
|
||||
Button._jQueryInterface.call($(button), 'toggle', initialButton.tagName === 'INPUT')
|
||||
}
|
||||
}
|
||||
})
|
||||
.on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {
|
||||
const button = $(event.target).closest(SELECTOR_BUTTON)[0]
|
||||
$(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type))
|
||||
})
|
||||
|
||||
$(window).on(EVENT_LOAD_DATA_API, () => {
|
||||
// ensure correct active class is set to match the controls' actual values/states
|
||||
|
||||
// find all checkboxes/readio buttons inside data-toggle groups
|
||||
let buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS))
|
||||
for (let i = 0, len = buttons.length; i < len; i++) {
|
||||
const button = buttons[i]
|
||||
const input = button.querySelector(SELECTOR_INPUT)
|
||||
if (input.checked || input.hasAttribute('checked')) {
|
||||
button.classList.add(CLASS_NAME_ACTIVE)
|
||||
} else {
|
||||
button.classList.remove(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
}
|
||||
|
||||
// find all button toggles
|
||||
buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
|
||||
for (let i = 0, len = buttons.length; i < len; i++) {
|
||||
const button = buttons[i]
|
||||
if (button.getAttribute('aria-pressed') === 'true') {
|
||||
button.classList.add(CLASS_NAME_ACTIVE)
|
||||
} else {
|
||||
button.classList.remove(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Button._jQueryInterface
|
||||
$.fn[NAME].Constructor = Button
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Button._jQueryInterface
|
||||
}
|
||||
|
||||
export default Button
|
8
ISPChk/wwwroot/bootstrap/js/src/button.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/button.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/button.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
import $ from"jquery";const NAME="button",VERSION="4.6.0",DATA_KEY="bs.button",EVENT_KEY=".bs.button",DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],CLASS_NAME_ACTIVE="active",CLASS_NAME_BUTTON="btn",CLASS_NAME_FOCUS="focus",SELECTOR_DATA_TOGGLE_CARROT='[data-toggle^="button"]',SELECTOR_DATA_TOGGLES='[data-toggle="buttons"]',SELECTOR_DATA_TOGGLE='[data-toggle="button"]',SELECTOR_DATA_TOGGLES_BUTTONS='[data-toggle="buttons"] .btn',SELECTOR_INPUT='input:not([type="hidden"])',SELECTOR_ACTIVE=".active",SELECTOR_BUTTON=".btn",EVENT_CLICK_DATA_API="click.bs.button.data-api",EVENT_FOCUS_BLUR_DATA_API="focus.bs.button.data-api blur.bs.button.data-api",EVENT_LOAD_DATA_API="load.bs.button.data-api";class Button{constructor(t){this._element=t,this.shouldAvoidTriggerChange=!1}static get VERSION(){return"4.6.0"}toggle(){let t=!0,e=!0;const s=$(this._element).closest(SELECTOR_DATA_TOGGLES)[0];if(s){const a=this._element.querySelector(SELECTOR_INPUT);if(a){if("radio"===a.type)if(a.checked&&this._element.classList.contains("active"))t=!1;else{const t=s.querySelector(".active");t&&$(t).removeClass("active")}t&&("checkbox"!==a.type&&"radio"!==a.type||(a.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||$(a).trigger("change")),a.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&$(this._element).toggleClass("active"))}dispose(){$.removeData(this._element,DATA_KEY),this._element=null}static _jQueryInterface(t,e){return this.each((function(){const s=$(this);let a=s.data(DATA_KEY);a||(a=new Button(this),s.data(DATA_KEY,a)),a.shouldAvoidTriggerChange=e,"toggle"===t&&a[t]()}))}}$(document).on(EVENT_CLICK_DATA_API,'[data-toggle^="button"]',(t=>{let e=t.target;const s=e;if($(e).hasClass("btn")||(e=$(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{const a=e.querySelector(SELECTOR_INPUT);if(a&&(a.hasAttribute("disabled")||a.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==s.tagName&&"LABEL"===e.tagName||Button._jQueryInterface.call($(e),"toggle","INPUT"===s.tagName)}})).on(EVENT_FOCUS_BLUR_DATA_API,'[data-toggle^="button"]',(t=>{const e=$(t.target).closest(".btn")[0];$(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),$(window).on(EVENT_LOAD_DATA_API,(()=>{let t=[].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));for(let e=0,s=t.length;e<s;e++){const s=t[e],a=s.querySelector(SELECTOR_INPUT);a.checked||a.hasAttribute("checked")?s.classList.add("active"):s.classList.remove("active")}t=[].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));for(let e=0,s=t.length;e<s;e++){const s=t[e];"true"===s.getAttribute("aria-pressed")?s.classList.add("active"):s.classList.remove("active")}})),$.fn[NAME]=Button._jQueryInterface,$.fn[NAME].Constructor=Button,$.fn[NAME].noConflict=()=>($.fn[NAME]=JQUERY_NO_CONFLICT,Button._jQueryInterface);export default Button;
|
||||
//# sourceMappingURL=/sm/db3d18b2646c694debf11b6e49cb71f128d9ff735b40ace8e60d042cb44d80c4.map
|
613
ISPChk/wwwroot/bootstrap/js/src/carousel.js
Normal file
613
ISPChk/wwwroot/bootstrap/js/src/carousel.js
Normal file
@ -0,0 +1,613 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'carousel'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.carousel'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key
|
||||
const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key
|
||||
const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch
|
||||
const SWIPE_THRESHOLD = 40
|
||||
|
||||
const Default = {
|
||||
interval: 5000,
|
||||
keyboard: true,
|
||||
slide: false,
|
||||
pause: 'hover',
|
||||
wrap: true,
|
||||
touch: true
|
||||
}
|
||||
|
||||
const DefaultType = {
|
||||
interval: '(number|boolean)',
|
||||
keyboard: 'boolean',
|
||||
slide: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
}
|
||||
|
||||
const DIRECTION_NEXT = 'next'
|
||||
const DIRECTION_PREV = 'prev'
|
||||
const DIRECTION_LEFT = 'left'
|
||||
const DIRECTION_RIGHT = 'right'
|
||||
|
||||
const EVENT_SLIDE = `slide${EVENT_KEY}`
|
||||
const EVENT_SLID = `slid${EVENT_KEY}`
|
||||
const EVENT_KEYDOWN = `keydown${EVENT_KEY}`
|
||||
const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`
|
||||
const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`
|
||||
const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`
|
||||
const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`
|
||||
const EVENT_TOUCHEND = `touchend${EVENT_KEY}`
|
||||
const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`
|
||||
const EVENT_POINTERUP = `pointerup${EVENT_KEY}`
|
||||
const EVENT_DRAG_START = `dragstart${EVENT_KEY}`
|
||||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_CAROUSEL = 'carousel'
|
||||
const CLASS_NAME_ACTIVE = 'active'
|
||||
const CLASS_NAME_SLIDE = 'slide'
|
||||
const CLASS_NAME_RIGHT = 'carousel-item-right'
|
||||
const CLASS_NAME_LEFT = 'carousel-item-left'
|
||||
const CLASS_NAME_NEXT = 'carousel-item-next'
|
||||
const CLASS_NAME_PREV = 'carousel-item-prev'
|
||||
const CLASS_NAME_POINTER_EVENT = 'pointer-event'
|
||||
|
||||
const SELECTOR_ACTIVE = '.active'
|
||||
const SELECTOR_ACTIVE_ITEM = '.active.carousel-item'
|
||||
const SELECTOR_ITEM = '.carousel-item'
|
||||
const SELECTOR_ITEM_IMG = '.carousel-item img'
|
||||
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
|
||||
const SELECTOR_INDICATORS = '.carousel-indicators'
|
||||
const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'
|
||||
const SELECTOR_DATA_RIDE = '[data-ride="carousel"]'
|
||||
|
||||
const PointerType = {
|
||||
TOUCH: 'touch',
|
||||
PEN: 'pen'
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
class Carousel {
|
||||
constructor(element, config) {
|
||||
this._items = null
|
||||
this._interval = null
|
||||
this._activeElement = null
|
||||
this._isPaused = false
|
||||
this._isSliding = false
|
||||
this.touchTimeout = null
|
||||
this.touchStartX = 0
|
||||
this.touchDeltaX = 0
|
||||
|
||||
this._config = this._getConfig(config)
|
||||
this._element = element
|
||||
this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS)
|
||||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
|
||||
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)
|
||||
|
||||
this._addEventListeners()
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
next() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(DIRECTION_NEXT)
|
||||
}
|
||||
}
|
||||
|
||||
nextWhenVisible() {
|
||||
const $element = $(this._element)
|
||||
// Don't call next when the page isn't visible
|
||||
// or the carousel or its parent isn't visible
|
||||
if (!document.hidden &&
|
||||
($element.is(':visible') && $element.css('visibility') !== 'hidden')) {
|
||||
this.next()
|
||||
}
|
||||
}
|
||||
|
||||
prev() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(DIRECTION_PREV)
|
||||
}
|
||||
}
|
||||
|
||||
pause(event) {
|
||||
if (!event) {
|
||||
this._isPaused = true
|
||||
}
|
||||
|
||||
if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
|
||||
Util.triggerTransitionEnd(this._element)
|
||||
this.cycle(true)
|
||||
}
|
||||
|
||||
clearInterval(this._interval)
|
||||
this._interval = null
|
||||
}
|
||||
|
||||
cycle(event) {
|
||||
if (!event) {
|
||||
this._isPaused = false
|
||||
}
|
||||
|
||||
if (this._interval) {
|
||||
clearInterval(this._interval)
|
||||
this._interval = null
|
||||
}
|
||||
|
||||
if (this._config.interval && !this._isPaused) {
|
||||
this._updateInterval()
|
||||
|
||||
this._interval = setInterval(
|
||||
(document.visibilityState ? this.nextWhenVisible : this.next).bind(this),
|
||||
this._config.interval
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
to(index) {
|
||||
this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
|
||||
|
||||
const activeIndex = this._getItemIndex(this._activeElement)
|
||||
|
||||
if (index > this._items.length - 1 || index < 0) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
$(this._element).one(EVENT_SLID, () => this.to(index))
|
||||
return
|
||||
}
|
||||
|
||||
if (activeIndex === index) {
|
||||
this.pause()
|
||||
this.cycle()
|
||||
return
|
||||
}
|
||||
|
||||
const direction = index > activeIndex ?
|
||||
DIRECTION_NEXT :
|
||||
DIRECTION_PREV
|
||||
|
||||
this._slide(direction, this._items[index])
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$(this._element).off(EVENT_KEY)
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
|
||||
this._items = null
|
||||
this._config = null
|
||||
this._element = null
|
||||
this._interval = null
|
||||
this._isPaused = null
|
||||
this._isSliding = null
|
||||
this._activeElement = null
|
||||
this._indicatorsElement = null
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...Default,
|
||||
...config
|
||||
}
|
||||
Util.typeCheckConfig(NAME, config, DefaultType)
|
||||
return config
|
||||
}
|
||||
|
||||
_handleSwipe() {
|
||||
const absDeltax = Math.abs(this.touchDeltaX)
|
||||
|
||||
if (absDeltax <= SWIPE_THRESHOLD) {
|
||||
return
|
||||
}
|
||||
|
||||
const direction = absDeltax / this.touchDeltaX
|
||||
|
||||
this.touchDeltaX = 0
|
||||
|
||||
// swipe left
|
||||
if (direction > 0) {
|
||||
this.prev()
|
||||
}
|
||||
|
||||
// swipe right
|
||||
if (direction < 0) {
|
||||
this.next()
|
||||
}
|
||||
}
|
||||
|
||||
_addEventListeners() {
|
||||
if (this._config.keyboard) {
|
||||
$(this._element).on(EVENT_KEYDOWN, event => this._keydown(event))
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
$(this._element)
|
||||
.on(EVENT_MOUSEENTER, event => this.pause(event))
|
||||
.on(EVENT_MOUSELEAVE, event => this.cycle(event))
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
this._addTouchEventListeners()
|
||||
}
|
||||
}
|
||||
|
||||
_addTouchEventListeners() {
|
||||
if (!this._touchSupported) {
|
||||
return
|
||||
}
|
||||
|
||||
const start = event => {
|
||||
if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||
this.touchStartX = event.originalEvent.clientX
|
||||
} else if (!this._pointerEvent) {
|
||||
this.touchStartX = event.originalEvent.touches[0].clientX
|
||||
}
|
||||
}
|
||||
|
||||
const move = event => {
|
||||
// ensure swiping with one touch and not pinching
|
||||
if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
|
||||
this.touchDeltaX = 0
|
||||
} else {
|
||||
this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX
|
||||
}
|
||||
}
|
||||
|
||||
const end = event => {
|
||||
if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
|
||||
this.touchDeltaX = event.originalEvent.clientX - this.touchStartX
|
||||
}
|
||||
|
||||
this._handleSwipe()
|
||||
if (this._config.pause === 'hover') {
|
||||
// If it's a touch-enabled device, mouseenter/leave are fired as
|
||||
// part of the mouse compatibility events on first tap - the carousel
|
||||
// would stop cycling until user tapped out of it;
|
||||
// here, we listen for touchend, explicitly pause the carousel
|
||||
// (as if it's the second time we tap on it, mouseenter compat event
|
||||
// is NOT fired) and after a timeout (to allow for mouse compatibility
|
||||
// events to fire) we explicitly restart cycling
|
||||
|
||||
this.pause()
|
||||
if (this.touchTimeout) {
|
||||
clearTimeout(this.touchTimeout)
|
||||
}
|
||||
|
||||
this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)
|
||||
}
|
||||
}
|
||||
|
||||
$(this._element.querySelectorAll(SELECTOR_ITEM_IMG))
|
||||
.on(EVENT_DRAG_START, e => e.preventDefault())
|
||||
|
||||
if (this._pointerEvent) {
|
||||
$(this._element).on(EVENT_POINTERDOWN, event => start(event))
|
||||
$(this._element).on(EVENT_POINTERUP, event => end(event))
|
||||
|
||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT)
|
||||
} else {
|
||||
$(this._element).on(EVENT_TOUCHSTART, event => start(event))
|
||||
$(this._element).on(EVENT_TOUCHMOVE, event => move(event))
|
||||
$(this._element).on(EVENT_TOUCHEND, event => end(event))
|
||||
}
|
||||
}
|
||||
|
||||
_keydown(event) {
|
||||
if (/input|textarea/i.test(event.target.tagName)) {
|
||||
return
|
||||
}
|
||||
|
||||
switch (event.which) {
|
||||
case ARROW_LEFT_KEYCODE:
|
||||
event.preventDefault()
|
||||
this.prev()
|
||||
break
|
||||
case ARROW_RIGHT_KEYCODE:
|
||||
event.preventDefault()
|
||||
this.next()
|
||||
break
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
_getItemIndex(element) {
|
||||
this._items = element && element.parentNode ?
|
||||
[].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) :
|
||||
[]
|
||||
return this._items.indexOf(element)
|
||||
}
|
||||
|
||||
_getItemByDirection(direction, activeElement) {
|
||||
const isNextDirection = direction === DIRECTION_NEXT
|
||||
const isPrevDirection = direction === DIRECTION_PREV
|
||||
const activeIndex = this._getItemIndex(activeElement)
|
||||
const lastItemIndex = this._items.length - 1
|
||||
const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
|
||||
isNextDirection && activeIndex === lastItemIndex
|
||||
|
||||
if (isGoingToWrap && !this._config.wrap) {
|
||||
return activeElement
|
||||
}
|
||||
|
||||
const delta = direction === DIRECTION_PREV ? -1 : 1
|
||||
const itemIndex = (activeIndex + delta) % this._items.length
|
||||
|
||||
return itemIndex === -1 ?
|
||||
this._items[this._items.length - 1] : this._items[itemIndex]
|
||||
}
|
||||
|
||||
_triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
const targetIndex = this._getItemIndex(relatedTarget)
|
||||
const fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM))
|
||||
const slideEvent = $.Event(EVENT_SLIDE, {
|
||||
relatedTarget,
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
to: targetIndex
|
||||
})
|
||||
|
||||
$(this._element).trigger(slideEvent)
|
||||
|
||||
return slideEvent
|
||||
}
|
||||
|
||||
_setActiveIndicatorElement(element) {
|
||||
if (this._indicatorsElement) {
|
||||
const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE))
|
||||
$(indicators).removeClass(CLASS_NAME_ACTIVE)
|
||||
|
||||
const nextIndicator = this._indicatorsElement.children[
|
||||
this._getItemIndex(element)
|
||||
]
|
||||
|
||||
if (nextIndicator) {
|
||||
$(nextIndicator).addClass(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_updateInterval() {
|
||||
const element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM)
|
||||
|
||||
if (!element) {
|
||||
return
|
||||
}
|
||||
|
||||
const elementInterval = parseInt(element.getAttribute('data-interval'), 10)
|
||||
|
||||
if (elementInterval) {
|
||||
this._config.defaultInterval = this._config.defaultInterval || this._config.interval
|
||||
this._config.interval = elementInterval
|
||||
} else {
|
||||
this._config.interval = this._config.defaultInterval || this._config.interval
|
||||
}
|
||||
}
|
||||
|
||||
_slide(direction, element) {
|
||||
const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
|
||||
const activeElementIndex = this._getItemIndex(activeElement)
|
||||
const nextElement = element || activeElement &&
|
||||
this._getItemByDirection(direction, activeElement)
|
||||
const nextElementIndex = this._getItemIndex(nextElement)
|
||||
const isCycling = Boolean(this._interval)
|
||||
|
||||
let directionalClassName
|
||||
let orderClassName
|
||||
let eventDirectionName
|
||||
|
||||
if (direction === DIRECTION_NEXT) {
|
||||
directionalClassName = CLASS_NAME_LEFT
|
||||
orderClassName = CLASS_NAME_NEXT
|
||||
eventDirectionName = DIRECTION_LEFT
|
||||
} else {
|
||||
directionalClassName = CLASS_NAME_RIGHT
|
||||
orderClassName = CLASS_NAME_PREV
|
||||
eventDirectionName = DIRECTION_RIGHT
|
||||
}
|
||||
|
||||
if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
|
||||
this._isSliding = false
|
||||
return
|
||||
}
|
||||
|
||||
const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)
|
||||
if (slideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!activeElement || !nextElement) {
|
||||
// Some weirdness is happening, so we bail
|
||||
return
|
||||
}
|
||||
|
||||
this._isSliding = true
|
||||
|
||||
if (isCycling) {
|
||||
this.pause()
|
||||
}
|
||||
|
||||
this._setActiveIndicatorElement(nextElement)
|
||||
this._activeElement = nextElement
|
||||
|
||||
const slidEvent = $.Event(EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
to: nextElementIndex
|
||||
})
|
||||
|
||||
if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
|
||||
$(nextElement).addClass(orderClassName)
|
||||
|
||||
Util.reflow(nextElement)
|
||||
|
||||
$(activeElement).addClass(directionalClassName)
|
||||
$(nextElement).addClass(directionalClassName)
|
||||
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(activeElement)
|
||||
|
||||
$(activeElement)
|
||||
.one(Util.TRANSITION_END, () => {
|
||||
$(nextElement)
|
||||
.removeClass(`${directionalClassName} ${orderClassName}`)
|
||||
.addClass(CLASS_NAME_ACTIVE)
|
||||
|
||||
$(activeElement).removeClass(`${CLASS_NAME_ACTIVE} ${orderClassName} ${directionalClassName}`)
|
||||
|
||||
this._isSliding = false
|
||||
|
||||
setTimeout(() => $(this._element).trigger(slidEvent), 0)
|
||||
})
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
$(activeElement).removeClass(CLASS_NAME_ACTIVE)
|
||||
$(nextElement).addClass(CLASS_NAME_ACTIVE)
|
||||
|
||||
this._isSliding = false
|
||||
$(this._element).trigger(slidEvent)
|
||||
}
|
||||
|
||||
if (isCycling) {
|
||||
this.cycle()
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
let _config = {
|
||||
...Default,
|
||||
...$(this).data()
|
||||
}
|
||||
|
||||
if (typeof config === 'object') {
|
||||
_config = {
|
||||
..._config,
|
||||
...config
|
||||
}
|
||||
}
|
||||
|
||||
const action = typeof config === 'string' ? config : _config.slide
|
||||
|
||||
if (!data) {
|
||||
data = new Carousel(this, _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'number') {
|
||||
data.to(config)
|
||||
} else if (typeof action === 'string') {
|
||||
if (typeof data[action] === 'undefined') {
|
||||
throw new TypeError(`No method named "${action}"`)
|
||||
}
|
||||
|
||||
data[action]()
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause()
|
||||
data.cycle()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static _dataApiClickHandler(event) {
|
||||
const selector = Util.getSelectorFromElement(this)
|
||||
|
||||
if (!selector) {
|
||||
return
|
||||
}
|
||||
|
||||
const target = $(selector)[0]
|
||||
|
||||
if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
|
||||
return
|
||||
}
|
||||
|
||||
const config = {
|
||||
...$(target).data(),
|
||||
...$(this).data()
|
||||
}
|
||||
const slideIndex = this.getAttribute('data-slide-to')
|
||||
|
||||
if (slideIndex) {
|
||||
config.interval = false
|
||||
}
|
||||
|
||||
Carousel._jQueryInterface.call($(target), config)
|
||||
|
||||
if (slideIndex) {
|
||||
$(target).data(DATA_KEY).to(slideIndex)
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler)
|
||||
|
||||
$(window).on(EVENT_LOAD_DATA_API, () => {
|
||||
const carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE))
|
||||
for (let i = 0, len = carousels.length; i < len; i++) {
|
||||
const $carousel = $(carousels[i])
|
||||
Carousel._jQueryInterface.call($carousel, $carousel.data())
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Carousel._jQueryInterface
|
||||
$.fn[NAME].Constructor = Carousel
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Carousel._jQueryInterface
|
||||
}
|
||||
|
||||
export default Carousel
|
8
ISPChk/wwwroot/bootstrap/js/src/carousel.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
392
ISPChk/wwwroot/bootstrap/js/src/collapse.js
Normal file
392
ISPChk/wwwroot/bootstrap/js/src/collapse.js
Normal file
@ -0,0 +1,392 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'collapse'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.collapse'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
}
|
||||
|
||||
const DefaultType = {
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
}
|
||||
|
||||
const EVENT_SHOW = `show${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
const EVENT_HIDE = `hide${EVENT_KEY}`
|
||||
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
const CLASS_NAME_COLLAPSE = 'collapse'
|
||||
const CLASS_NAME_COLLAPSING = 'collapsing'
|
||||
const CLASS_NAME_COLLAPSED = 'collapsed'
|
||||
|
||||
const DIMENSION_WIDTH = 'width'
|
||||
const DIMENSION_HEIGHT = 'height'
|
||||
|
||||
const SELECTOR_ACTIVES = '.show, .collapsing'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Collapse {
|
||||
constructor(element, config) {
|
||||
this._isTransitioning = false
|
||||
this._element = element
|
||||
this._config = this._getConfig(config)
|
||||
this._triggerArray = [].slice.call(document.querySelectorAll(
|
||||
`[data-toggle="collapse"][href="#${element.id}"],` +
|
||||
`[data-toggle="collapse"][data-target="#${element.id}"]`
|
||||
))
|
||||
|
||||
const toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
|
||||
for (let i = 0, len = toggleList.length; i < len; i++) {
|
||||
const elem = toggleList[i]
|
||||
const selector = Util.getSelectorFromElement(elem)
|
||||
const filterElement = [].slice.call(document.querySelectorAll(selector))
|
||||
.filter(foundElem => foundElem === element)
|
||||
|
||||
if (selector !== null && filterElement.length > 0) {
|
||||
this._selector = selector
|
||||
this._triggerArray.push(elem)
|
||||
}
|
||||
}
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray)
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
this.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggle() {
|
||||
if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
this.hide()
|
||||
} else {
|
||||
this.show()
|
||||
}
|
||||
}
|
||||
|
||||
show() {
|
||||
if (this._isTransitioning ||
|
||||
$(this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
return
|
||||
}
|
||||
|
||||
let actives
|
||||
let activesData
|
||||
|
||||
if (this._parent) {
|
||||
actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES))
|
||||
.filter(elem => {
|
||||
if (typeof this._config.parent === 'string') {
|
||||
return elem.getAttribute('data-parent') === this._config.parent
|
||||
}
|
||||
|
||||
return elem.classList.contains(CLASS_NAME_COLLAPSE)
|
||||
})
|
||||
|
||||
if (actives.length === 0) {
|
||||
actives = null
|
||||
}
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
activesData = $(actives).not(this._selector).data(DATA_KEY)
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const startEvent = $.Event(EVENT_SHOW)
|
||||
$(this._element).trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')
|
||||
if (!activesData) {
|
||||
$(actives).data(DATA_KEY, null)
|
||||
}
|
||||
}
|
||||
|
||||
const dimension = this._getDimension()
|
||||
|
||||
$(this._element)
|
||||
.removeClass(CLASS_NAME_COLLAPSE)
|
||||
.addClass(CLASS_NAME_COLLAPSING)
|
||||
|
||||
this._element.style[dimension] = 0
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
$(this._triggerArray)
|
||||
.removeClass(CLASS_NAME_COLLAPSED)
|
||||
.attr('aria-expanded', true)
|
||||
}
|
||||
|
||||
this.setTransitioning(true)
|
||||
|
||||
const complete = () => {
|
||||
$(this._element)
|
||||
.removeClass(CLASS_NAME_COLLAPSING)
|
||||
.addClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)
|
||||
|
||||
this._element.style[dimension] = ''
|
||||
|
||||
this.setTransitioning(false)
|
||||
|
||||
$(this._element).trigger(EVENT_SHOWN)
|
||||
}
|
||||
|
||||
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
|
||||
const scrollSize = `scroll${capitalizedDimension}`
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
|
||||
this._element.style[dimension] = `${this._element[scrollSize]}px`
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (this._isTransitioning ||
|
||||
!$(this._element).hasClass(CLASS_NAME_SHOW)) {
|
||||
return
|
||||
}
|
||||
|
||||
const startEvent = $.Event(EVENT_HIDE)
|
||||
$(this._element).trigger(startEvent)
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
const dimension = this._getDimension()
|
||||
|
||||
this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`
|
||||
|
||||
Util.reflow(this._element)
|
||||
|
||||
$(this._element)
|
||||
.addClass(CLASS_NAME_COLLAPSING)
|
||||
.removeClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)
|
||||
|
||||
const triggerArrayLength = this._triggerArray.length
|
||||
if (triggerArrayLength > 0) {
|
||||
for (let i = 0; i < triggerArrayLength; i++) {
|
||||
const trigger = this._triggerArray[i]
|
||||
const selector = Util.getSelectorFromElement(trigger)
|
||||
|
||||
if (selector !== null) {
|
||||
const $elem = $([].slice.call(document.querySelectorAll(selector)))
|
||||
if (!$elem.hasClass(CLASS_NAME_SHOW)) {
|
||||
$(trigger).addClass(CLASS_NAME_COLLAPSED)
|
||||
.attr('aria-expanded', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setTransitioning(true)
|
||||
|
||||
const complete = () => {
|
||||
this.setTransitioning(false)
|
||||
$(this._element)
|
||||
.removeClass(CLASS_NAME_COLLAPSING)
|
||||
.addClass(CLASS_NAME_COLLAPSE)
|
||||
.trigger(EVENT_HIDDEN)
|
||||
}
|
||||
|
||||
this._element.style[dimension] = ''
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
}
|
||||
|
||||
setTransitioning(isTransitioning) {
|
||||
this._isTransitioning = isTransitioning
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
|
||||
this._config = null
|
||||
this._parent = null
|
||||
this._element = null
|
||||
this._triggerArray = null
|
||||
this._isTransitioning = null
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...Default,
|
||||
...config
|
||||
}
|
||||
config.toggle = Boolean(config.toggle) // Coerce string values
|
||||
Util.typeCheckConfig(NAME, config, DefaultType)
|
||||
return config
|
||||
}
|
||||
|
||||
_getDimension() {
|
||||
const hasWidth = $(this._element).hasClass(DIMENSION_WIDTH)
|
||||
return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT
|
||||
}
|
||||
|
||||
_getParent() {
|
||||
let parent
|
||||
|
||||
if (Util.isElement(this._config.parent)) {
|
||||
parent = this._config.parent
|
||||
|
||||
// It's a jQuery object
|
||||
if (typeof this._config.parent.jquery !== 'undefined') {
|
||||
parent = this._config.parent[0]
|
||||
}
|
||||
} else {
|
||||
parent = document.querySelector(this._config.parent)
|
||||
}
|
||||
|
||||
const selector = `[data-toggle="collapse"][data-parent="${this._config.parent}"]`
|
||||
const children = [].slice.call(parent.querySelectorAll(selector))
|
||||
|
||||
$(children).each((i, element) => {
|
||||
this._addAriaAndCollapsedClass(
|
||||
Collapse._getTargetFromElement(element),
|
||||
[element]
|
||||
)
|
||||
})
|
||||
|
||||
return parent
|
||||
}
|
||||
|
||||
_addAriaAndCollapsedClass(element, triggerArray) {
|
||||
const isOpen = $(element).hasClass(CLASS_NAME_SHOW)
|
||||
|
||||
if (triggerArray.length) {
|
||||
$(triggerArray)
|
||||
.toggleClass(CLASS_NAME_COLLAPSED, !isOpen)
|
||||
.attr('aria-expanded', isOpen)
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _getTargetFromElement(element) {
|
||||
const selector = Util.getSelectorFromElement(element)
|
||||
return selector ? document.querySelector(selector) : null
|
||||
}
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
const $element = $(this)
|
||||
let data = $element.data(DATA_KEY)
|
||||
const _config = {
|
||||
...Default,
|
||||
...$element.data(),
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
|
||||
_config.toggle = false
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(this, _config)
|
||||
$element.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.currentTarget.tagName === 'A') {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
const $trigger = $(this)
|
||||
const selector = Util.getSelectorFromElement(this)
|
||||
const selectors = [].slice.call(document.querySelectorAll(selector))
|
||||
|
||||
$(selectors).each(function () {
|
||||
const $target = $(this)
|
||||
const data = $target.data(DATA_KEY)
|
||||
const config = data ? 'toggle' : $trigger.data()
|
||||
Collapse._jQueryInterface.call($target, config)
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Collapse._jQueryInterface
|
||||
$.fn[NAME].Constructor = Collapse
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Collapse._jQueryInterface
|
||||
}
|
||||
|
||||
export default Collapse
|
8
ISPChk/wwwroot/bootstrap/js/src/collapse.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/collapse.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
538
ISPChk/wwwroot/bootstrap/js/src/dropdown.js
Normal file
538
ISPChk/wwwroot/bootstrap/js/src/dropdown.js
Normal file
@ -0,0 +1,538 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Popper from 'popper.js'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'dropdown'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.dropdown'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
|
||||
const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key
|
||||
const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key
|
||||
const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key
|
||||
const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key
|
||||
const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)
|
||||
const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)
|
||||
|
||||
const EVENT_HIDE = `hide${EVENT_KEY}`
|
||||
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
|
||||
const EVENT_SHOW = `show${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
const EVENT_CLICK = `click${EVENT_KEY}`
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`
|
||||
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_DISABLED = 'disabled'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
const CLASS_NAME_DROPUP = 'dropup'
|
||||
const CLASS_NAME_DROPRIGHT = 'dropright'
|
||||
const CLASS_NAME_DROPLEFT = 'dropleft'
|
||||
const CLASS_NAME_MENURIGHT = 'dropdown-menu-right'
|
||||
const CLASS_NAME_POSITION_STATIC = 'position-static'
|
||||
|
||||
const SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]'
|
||||
const SELECTOR_FORM_CHILD = '.dropdown form'
|
||||
const SELECTOR_MENU = '.dropdown-menu'
|
||||
const SELECTOR_NAVBAR_NAV = '.navbar-nav'
|
||||
const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
|
||||
|
||||
const PLACEMENT_TOP = 'top-start'
|
||||
const PLACEMENT_TOPEND = 'top-end'
|
||||
const PLACEMENT_BOTTOM = 'bottom-start'
|
||||
const PLACEMENT_BOTTOMEND = 'bottom-end'
|
||||
const PLACEMENT_RIGHT = 'right-start'
|
||||
const PLACEMENT_LEFT = 'left-start'
|
||||
|
||||
const Default = {
|
||||
offset: 0,
|
||||
flip: true,
|
||||
boundary: 'scrollParent',
|
||||
reference: 'toggle',
|
||||
display: 'dynamic',
|
||||
popperConfig: null
|
||||
}
|
||||
|
||||
const DefaultType = {
|
||||
offset: '(number|string|function)',
|
||||
flip: 'boolean',
|
||||
boundary: '(string|element)',
|
||||
reference: '(string|element)',
|
||||
display: 'string',
|
||||
popperConfig: '(null|object)'
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Dropdown {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._popper = null
|
||||
this._config = this._getConfig(config)
|
||||
this._menu = this._getMenuElement()
|
||||
this._inNavbar = this._detectNavbar()
|
||||
|
||||
this._addEventListeners()
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
static get DefaultType() {
|
||||
return DefaultType
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggle() {
|
||||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return
|
||||
}
|
||||
|
||||
const isActive = $(this._menu).hasClass(CLASS_NAME_SHOW)
|
||||
|
||||
Dropdown._clearMenus()
|
||||
|
||||
if (isActive) {
|
||||
return
|
||||
}
|
||||
|
||||
this.show(true)
|
||||
}
|
||||
|
||||
show(usePopper = false) {
|
||||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||
return
|
||||
}
|
||||
|
||||
const relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
}
|
||||
const showEvent = $.Event(EVENT_SHOW, relatedTarget)
|
||||
const parent = Dropdown._getParentFromElement(this._element)
|
||||
|
||||
$(parent).trigger(showEvent)
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
// Totally disable Popper for Dropdowns in Navbar
|
||||
if (!this._inNavbar && usePopper) {
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)')
|
||||
}
|
||||
|
||||
let referenceElement = this._element
|
||||
|
||||
if (this._config.reference === 'parent') {
|
||||
referenceElement = parent
|
||||
} else if (Util.isElement(this._config.reference)) {
|
||||
referenceElement = this._config.reference
|
||||
|
||||
// Check if it's jQuery element
|
||||
if (typeof this._config.reference.jquery !== 'undefined') {
|
||||
referenceElement = this._config.reference[0]
|
||||
}
|
||||
}
|
||||
|
||||
// If boundary is not `scrollParent`, then set position to `static`
|
||||
// to allow the menu to "escape" the scroll parent's boundaries
|
||||
// https://github.com/twbs/bootstrap/issues/24251
|
||||
if (this._config.boundary !== 'scrollParent') {
|
||||
$(parent).addClass(CLASS_NAME_POSITION_STATIC)
|
||||
}
|
||||
|
||||
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())
|
||||
}
|
||||
|
||||
// If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement &&
|
||||
$(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
|
||||
$(document.body).children().on('mouseover', null, $.noop)
|
||||
}
|
||||
|
||||
this._element.focus()
|
||||
this._element.setAttribute('aria-expanded', true)
|
||||
|
||||
$(this._menu).toggleClass(CLASS_NAME_SHOW)
|
||||
$(parent)
|
||||
.toggleClass(CLASS_NAME_SHOW)
|
||||
.trigger($.Event(EVENT_SHOWN, relatedTarget))
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {
|
||||
return
|
||||
}
|
||||
|
||||
const relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
}
|
||||
const hideEvent = $.Event(EVENT_HIDE, relatedTarget)
|
||||
const parent = Dropdown._getParentFromElement(this._element)
|
||||
|
||||
$(parent).trigger(hideEvent)
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this._popper) {
|
||||
this._popper.destroy()
|
||||
}
|
||||
|
||||
$(this._menu).toggleClass(CLASS_NAME_SHOW)
|
||||
$(parent)
|
||||
.toggleClass(CLASS_NAME_SHOW)
|
||||
.trigger($.Event(EVENT_HIDDEN, relatedTarget))
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
$(this._element).off(EVENT_KEY)
|
||||
this._element = null
|
||||
this._menu = null
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy()
|
||||
this._popper = null
|
||||
}
|
||||
}
|
||||
|
||||
update() {
|
||||
this._inNavbar = this._detectNavbar()
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_addEventListeners() {
|
||||
$(this._element).on(EVENT_CLICK, event => {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
this.toggle()
|
||||
})
|
||||
}
|
||||
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...this.constructor.Default,
|
||||
...$(this._element).data(),
|
||||
...config
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(
|
||||
NAME,
|
||||
config,
|
||||
this.constructor.DefaultType
|
||||
)
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
_getMenuElement() {
|
||||
if (!this._menu) {
|
||||
const parent = Dropdown._getParentFromElement(this._element)
|
||||
|
||||
if (parent) {
|
||||
this._menu = parent.querySelector(SELECTOR_MENU)
|
||||
}
|
||||
}
|
||||
|
||||
return this._menu
|
||||
}
|
||||
|
||||
_getPlacement() {
|
||||
const $parentDropdown = $(this._element.parentNode)
|
||||
let placement = PLACEMENT_BOTTOM
|
||||
|
||||
// Handle dropup
|
||||
if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
|
||||
placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ?
|
||||
PLACEMENT_TOPEND :
|
||||
PLACEMENT_TOP
|
||||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
|
||||
placement = PLACEMENT_RIGHT
|
||||
} else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
|
||||
placement = PLACEMENT_LEFT
|
||||
} else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_BOTTOMEND
|
||||
}
|
||||
|
||||
return placement
|
||||
}
|
||||
|
||||
_detectNavbar() {
|
||||
return $(this._element).closest('.navbar').length > 0
|
||||
}
|
||||
|
||||
_getOffset() {
|
||||
const offset = {}
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offset.fn = data => {
|
||||
data.offsets = {
|
||||
...data.offsets,
|
||||
...(this._config.offset(data.offsets, this._element) || {})
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
} else {
|
||||
offset.offset = this._config.offset
|
||||
}
|
||||
|
||||
return offset
|
||||
}
|
||||
|
||||
_getPopperConfig() {
|
||||
const popperConfig = {
|
||||
placement: this._getPlacement(),
|
||||
modifiers: {
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this._config.boundary
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Disable Popper if we have a static display
|
||||
if (this._config.display === 'static') {
|
||||
popperConfig.modifiers.applyStyle = {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...popperConfig,
|
||||
...this._config.popperConfig
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = typeof config === 'object' ? config : null
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this, _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static _clearMenus(event) {
|
||||
if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||
|
||||
event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
|
||||
return
|
||||
}
|
||||
|
||||
const toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
|
||||
|
||||
for (let i = 0, len = toggles.length; i < len; i++) {
|
||||
const parent = Dropdown._getParentFromElement(toggles[i])
|
||||
const context = $(toggles[i]).data(DATA_KEY)
|
||||
const relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
}
|
||||
|
||||
if (event && event.type === 'click') {
|
||||
relatedTarget.clickEvent = event
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
continue
|
||||
}
|
||||
|
||||
const dropdownMenu = context._menu
|
||||
if (!$(parent).hasClass(CLASS_NAME_SHOW)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (event && (event.type === 'click' &&
|
||||
/input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&
|
||||
$.contains(parent, event.target)) {
|
||||
continue
|
||||
}
|
||||
|
||||
const hideEvent = $.Event(EVENT_HIDE, relatedTarget)
|
||||
$(parent).trigger(hideEvent)
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
continue
|
||||
}
|
||||
|
||||
// If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(document.body).children().off('mouseover', null, $.noop)
|
||||
}
|
||||
|
||||
toggles[i].setAttribute('aria-expanded', 'false')
|
||||
|
||||
if (context._popper) {
|
||||
context._popper.destroy()
|
||||
}
|
||||
|
||||
$(dropdownMenu).removeClass(CLASS_NAME_SHOW)
|
||||
$(parent)
|
||||
.removeClass(CLASS_NAME_SHOW)
|
||||
.trigger($.Event(EVENT_HIDDEN, relatedTarget))
|
||||
}
|
||||
}
|
||||
|
||||
static _getParentFromElement(element) {
|
||||
let parent
|
||||
const selector = Util.getSelectorFromElement(element)
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector)
|
||||
}
|
||||
|
||||
return parent || element.parentNode
|
||||
}
|
||||
|
||||
// eslint-disable-next-line complexity
|
||||
static _dataApiKeydownHandler(event) {
|
||||
// If not input/textarea:
|
||||
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
|
||||
// If input/textarea:
|
||||
// - If space key => not a dropdown command
|
||||
// - If key is other than escape
|
||||
// - If key is not up or down => not a dropdown command
|
||||
// - If trigger inside the menu => not a dropdown command
|
||||
if (/input|textarea/i.test(event.target.tagName) ?
|
||||
event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&
|
||||
(event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||
|
||||
$(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return
|
||||
}
|
||||
|
||||
const parent = Dropdown._getParentFromElement(this)
|
||||
const isActive = $(parent).hasClass(CLASS_NAME_SHOW)
|
||||
|
||||
if (!isActive && event.which === ESCAPE_KEYCODE) {
|
||||
return
|
||||
}
|
||||
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
$(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')
|
||||
}
|
||||
|
||||
$(this).trigger('click')
|
||||
return
|
||||
}
|
||||
|
||||
const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS))
|
||||
.filter(item => $(item).is(':visible'))
|
||||
|
||||
if (items.length === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
let index = items.indexOf(event.target)
|
||||
|
||||
if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up
|
||||
index--
|
||||
}
|
||||
|
||||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down
|
||||
index++
|
||||
}
|
||||
|
||||
if (index < 0) {
|
||||
index = 0
|
||||
}
|
||||
|
||||
items[index].focus()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document)
|
||||
.on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler)
|
||||
.on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler)
|
||||
.on(`${EVENT_CLICK_DATA_API} ${EVENT_KEYUP_DATA_API}`, Dropdown._clearMenus)
|
||||
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
Dropdown._jQueryInterface.call($(this), 'toggle')
|
||||
})
|
||||
.on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => {
|
||||
e.stopPropagation()
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Dropdown._jQueryInterface
|
||||
$.fn[NAME].Constructor = Dropdown
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Dropdown._jQueryInterface
|
||||
}
|
||||
|
||||
export default Dropdown
|
8
ISPChk/wwwroot/bootstrap/js/src/dropdown.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/dropdown.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
629
ISPChk/wwwroot/bootstrap/js/src/modal.js
Normal file
629
ISPChk/wwwroot/bootstrap/js/src/modal.js
Normal file
@ -0,0 +1,629 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'modal'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.modal'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
|
||||
|
||||
const Default = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
focus: true,
|
||||
show: true
|
||||
}
|
||||
|
||||
const DefaultType = {
|
||||
backdrop: '(boolean|string)',
|
||||
keyboard: 'boolean',
|
||||
focus: 'boolean',
|
||||
show: 'boolean'
|
||||
}
|
||||
|
||||
const EVENT_HIDE = `hide${EVENT_KEY}`
|
||||
const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`
|
||||
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
|
||||
const EVENT_SHOW = `show${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
const EVENT_FOCUSIN = `focusin${EVENT_KEY}`
|
||||
const EVENT_RESIZE = `resize${EVENT_KEY}`
|
||||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
|
||||
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
|
||||
const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
|
||||
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'
|
||||
const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'
|
||||
const CLASS_NAME_BACKDROP = 'modal-backdrop'
|
||||
const CLASS_NAME_OPEN = 'modal-open'
|
||||
const CLASS_NAME_FADE = 'fade'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
const CLASS_NAME_STATIC = 'modal-static'
|
||||
|
||||
const SELECTOR_DIALOG = '.modal-dialog'
|
||||
const SELECTOR_MODAL_BODY = '.modal-body'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]'
|
||||
const SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]'
|
||||
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
|
||||
const SELECTOR_STICKY_CONTENT = '.sticky-top'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Modal {
|
||||
constructor(element, config) {
|
||||
this._config = this._getConfig(config)
|
||||
this._element = element
|
||||
this._dialog = element.querySelector(SELECTOR_DIALOG)
|
||||
this._backdrop = null
|
||||
this._isShown = false
|
||||
this._isBodyOverflowing = false
|
||||
this._ignoreBackdropClick = false
|
||||
this._isTransitioning = false
|
||||
this._scrollbarWidth = 0
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
toggle(relatedTarget) {
|
||||
return this._isShown ? this.hide() : this.show(relatedTarget)
|
||||
}
|
||||
|
||||
show(relatedTarget) {
|
||||
if (this._isShown || this._isTransitioning) {
|
||||
return
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
|
||||
this._isTransitioning = true
|
||||
}
|
||||
|
||||
const showEvent = $.Event(EVENT_SHOW, {
|
||||
relatedTarget
|
||||
})
|
||||
|
||||
$(this._element).trigger(showEvent)
|
||||
|
||||
if (this._isShown || showEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
this._isShown = true
|
||||
|
||||
this._checkScrollbar()
|
||||
this._setScrollbar()
|
||||
|
||||
this._adjustDialog()
|
||||
|
||||
this._setEscapeEvent()
|
||||
this._setResizeEvent()
|
||||
|
||||
$(this._element).on(
|
||||
EVENT_CLICK_DISMISS,
|
||||
SELECTOR_DATA_DISMISS,
|
||||
event => this.hide(event)
|
||||
)
|
||||
|
||||
$(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => {
|
||||
$(this._element).one(EVENT_MOUSEUP_DISMISS, event => {
|
||||
if ($(event.target).is(this._element)) {
|
||||
this._ignoreBackdropClick = true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
this._showBackdrop(() => this._showElement(relatedTarget))
|
||||
}
|
||||
|
||||
hide(event) {
|
||||
if (event) {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
if (!this._isShown || this._isTransitioning) {
|
||||
return
|
||||
}
|
||||
|
||||
const hideEvent = $.Event(EVENT_HIDE)
|
||||
|
||||
$(this._element).trigger(hideEvent)
|
||||
|
||||
if (!this._isShown || hideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
this._isShown = false
|
||||
const transition = $(this._element).hasClass(CLASS_NAME_FADE)
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true
|
||||
}
|
||||
|
||||
this._setEscapeEvent()
|
||||
this._setResizeEvent()
|
||||
|
||||
$(document).off(EVENT_FOCUSIN)
|
||||
|
||||
$(this._element).removeClass(CLASS_NAME_SHOW)
|
||||
|
||||
$(this._element).off(EVENT_CLICK_DISMISS)
|
||||
$(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)
|
||||
|
||||
if (transition) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, event => this._hideModal(event))
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
this._hideModal()
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
[window, this._element, this._dialog]
|
||||
.forEach(htmlElement => $(htmlElement).off(EVENT_KEY))
|
||||
|
||||
/**
|
||||
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
|
||||
* Do not move `document` in `htmlElements` array
|
||||
* It will remove `EVENT_CLICK_DATA_API` event that should remain
|
||||
*/
|
||||
$(document).off(EVENT_FOCUSIN)
|
||||
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
|
||||
this._config = null
|
||||
this._element = null
|
||||
this._dialog = null
|
||||
this._backdrop = null
|
||||
this._isShown = null
|
||||
this._isBodyOverflowing = null
|
||||
this._ignoreBackdropClick = null
|
||||
this._isTransitioning = null
|
||||
this._scrollbarWidth = null
|
||||
}
|
||||
|
||||
handleUpdate() {
|
||||
this._adjustDialog()
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...Default,
|
||||
...config
|
||||
}
|
||||
Util.typeCheckConfig(NAME, config, DefaultType)
|
||||
return config
|
||||
}
|
||||
|
||||
_triggerBackdropTransition() {
|
||||
const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
|
||||
|
||||
$(this._element).trigger(hideEventPrevented)
|
||||
if (hideEventPrevented.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
|
||||
|
||||
if (!isModalOverflowing) {
|
||||
this._element.style.overflowY = 'hidden'
|
||||
}
|
||||
|
||||
this._element.classList.add(CLASS_NAME_STATIC)
|
||||
|
||||
const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)
|
||||
$(this._element).off(Util.TRANSITION_END)
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, () => {
|
||||
this._element.classList.remove(CLASS_NAME_STATIC)
|
||||
if (!isModalOverflowing) {
|
||||
$(this._element).one(Util.TRANSITION_END, () => {
|
||||
this._element.style.overflowY = ''
|
||||
})
|
||||
.emulateTransitionEnd(this._element, modalTransitionDuration)
|
||||
}
|
||||
})
|
||||
.emulateTransitionEnd(modalTransitionDuration)
|
||||
this._element.focus()
|
||||
}
|
||||
|
||||
_showElement(relatedTarget) {
|
||||
const transition = $(this._element).hasClass(CLASS_NAME_FADE)
|
||||
const modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null
|
||||
|
||||
if (!this._element.parentNode ||
|
||||
this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
|
||||
// Don't move modal's DOM position
|
||||
document.body.appendChild(this._element)
|
||||
}
|
||||
|
||||
this._element.style.display = 'block'
|
||||
this._element.removeAttribute('aria-hidden')
|
||||
this._element.setAttribute('aria-modal', true)
|
||||
this._element.setAttribute('role', 'dialog')
|
||||
|
||||
if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
|
||||
modalBody.scrollTop = 0
|
||||
} else {
|
||||
this._element.scrollTop = 0
|
||||
}
|
||||
|
||||
if (transition) {
|
||||
Util.reflow(this._element)
|
||||
}
|
||||
|
||||
$(this._element).addClass(CLASS_NAME_SHOW)
|
||||
|
||||
if (this._config.focus) {
|
||||
this._enforceFocus()
|
||||
}
|
||||
|
||||
const shownEvent = $.Event(EVENT_SHOWN, {
|
||||
relatedTarget
|
||||
})
|
||||
|
||||
const transitionComplete = () => {
|
||||
if (this._config.focus) {
|
||||
this._element.focus()
|
||||
}
|
||||
|
||||
this._isTransitioning = false
|
||||
$(this._element).trigger(shownEvent)
|
||||
}
|
||||
|
||||
if (transition) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)
|
||||
|
||||
$(this._dialog)
|
||||
.one(Util.TRANSITION_END, transitionComplete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
transitionComplete()
|
||||
}
|
||||
}
|
||||
|
||||
_enforceFocus() {
|
||||
$(document)
|
||||
.off(EVENT_FOCUSIN) // Guard against infinite focus loop
|
||||
.on(EVENT_FOCUSIN, event => {
|
||||
if (document !== event.target &&
|
||||
this._element !== event.target &&
|
||||
$(this._element).has(event.target).length === 0) {
|
||||
this._element.focus()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
_setEscapeEvent() {
|
||||
if (this._isShown) {
|
||||
$(this._element).on(EVENT_KEYDOWN_DISMISS, event => {
|
||||
if (this._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault()
|
||||
this.hide()
|
||||
} else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
this._triggerBackdropTransition()
|
||||
}
|
||||
})
|
||||
} else if (!this._isShown) {
|
||||
$(this._element).off(EVENT_KEYDOWN_DISMISS)
|
||||
}
|
||||
}
|
||||
|
||||
_setResizeEvent() {
|
||||
if (this._isShown) {
|
||||
$(window).on(EVENT_RESIZE, event => this.handleUpdate(event))
|
||||
} else {
|
||||
$(window).off(EVENT_RESIZE)
|
||||
}
|
||||
}
|
||||
|
||||
_hideModal() {
|
||||
this._element.style.display = 'none'
|
||||
this._element.setAttribute('aria-hidden', true)
|
||||
this._element.removeAttribute('aria-modal')
|
||||
this._element.removeAttribute('role')
|
||||
this._isTransitioning = false
|
||||
this._showBackdrop(() => {
|
||||
$(document.body).removeClass(CLASS_NAME_OPEN)
|
||||
this._resetAdjustments()
|
||||
this._resetScrollbar()
|
||||
$(this._element).trigger(EVENT_HIDDEN)
|
||||
})
|
||||
}
|
||||
|
||||
_removeBackdrop() {
|
||||
if (this._backdrop) {
|
||||
$(this._backdrop).remove()
|
||||
this._backdrop = null
|
||||
}
|
||||
}
|
||||
|
||||
_showBackdrop(callback) {
|
||||
const animate = $(this._element).hasClass(CLASS_NAME_FADE) ?
|
||||
CLASS_NAME_FADE : ''
|
||||
|
||||
if (this._isShown && this._config.backdrop) {
|
||||
this._backdrop = document.createElement('div')
|
||||
this._backdrop.className = CLASS_NAME_BACKDROP
|
||||
|
||||
if (animate) {
|
||||
this._backdrop.classList.add(animate)
|
||||
}
|
||||
|
||||
$(this._backdrop).appendTo(document.body)
|
||||
|
||||
$(this._element).on(EVENT_CLICK_DISMISS, event => {
|
||||
if (this._ignoreBackdropClick) {
|
||||
this._ignoreBackdropClick = false
|
||||
return
|
||||
}
|
||||
|
||||
if (event.target !== event.currentTarget) {
|
||||
return
|
||||
}
|
||||
|
||||
if (this._config.backdrop === 'static') {
|
||||
this._triggerBackdropTransition()
|
||||
} else {
|
||||
this.hide()
|
||||
}
|
||||
})
|
||||
|
||||
if (animate) {
|
||||
Util.reflow(this._backdrop)
|
||||
}
|
||||
|
||||
$(this._backdrop).addClass(CLASS_NAME_SHOW)
|
||||
|
||||
if (!callback) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!animate) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
|
||||
const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
|
||||
|
||||
$(this._backdrop)
|
||||
.one(Util.TRANSITION_END, callback)
|
||||
.emulateTransitionEnd(backdropTransitionDuration)
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
$(this._backdrop).removeClass(CLASS_NAME_SHOW)
|
||||
|
||||
const callbackRemove = () => {
|
||||
this._removeBackdrop()
|
||||
if (callback) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
if ($(this._element).hasClass(CLASS_NAME_FADE)) {
|
||||
const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
|
||||
|
||||
$(this._backdrop)
|
||||
.one(Util.TRANSITION_END, callbackRemove)
|
||||
.emulateTransitionEnd(backdropTransitionDuration)
|
||||
} else {
|
||||
callbackRemove()
|
||||
}
|
||||
} else if (callback) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// the following methods are used to handle overflowing modals
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
_adjustDialog() {
|
||||
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
|
||||
|
||||
if (!this._isBodyOverflowing && isModalOverflowing) {
|
||||
this._element.style.paddingLeft = `${this._scrollbarWidth}px`
|
||||
}
|
||||
|
||||
if (this._isBodyOverflowing && !isModalOverflowing) {
|
||||
this._element.style.paddingRight = `${this._scrollbarWidth}px`
|
||||
}
|
||||
}
|
||||
|
||||
_resetAdjustments() {
|
||||
this._element.style.paddingLeft = ''
|
||||
this._element.style.paddingRight = ''
|
||||
}
|
||||
|
||||
_checkScrollbar() {
|
||||
const rect = document.body.getBoundingClientRect()
|
||||
this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth
|
||||
this._scrollbarWidth = this._getScrollbarWidth()
|
||||
}
|
||||
|
||||
_setScrollbar() {
|
||||
if (this._isBodyOverflowing) {
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||
const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))
|
||||
const stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT))
|
||||
|
||||
// Adjust fixed content padding
|
||||
$(fixedContent).each((index, element) => {
|
||||
const actualPadding = element.style.paddingRight
|
||||
const calculatedPadding = $(element).css('padding-right')
|
||||
$(element)
|
||||
.data('padding-right', actualPadding)
|
||||
.css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
|
||||
})
|
||||
|
||||
// Adjust sticky content margin
|
||||
$(stickyContent).each((index, element) => {
|
||||
const actualMargin = element.style.marginRight
|
||||
const calculatedMargin = $(element).css('margin-right')
|
||||
$(element)
|
||||
.data('margin-right', actualMargin)
|
||||
.css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)
|
||||
})
|
||||
|
||||
// Adjust body padding
|
||||
const actualPadding = document.body.style.paddingRight
|
||||
const calculatedPadding = $(document.body).css('padding-right')
|
||||
$(document.body)
|
||||
.data('padding-right', actualPadding)
|
||||
.css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
|
||||
}
|
||||
|
||||
$(document.body).addClass(CLASS_NAME_OPEN)
|
||||
}
|
||||
|
||||
_resetScrollbar() {
|
||||
// Restore fixed content padding
|
||||
const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))
|
||||
$(fixedContent).each((index, element) => {
|
||||
const padding = $(element).data('padding-right')
|
||||
$(element).removeData('padding-right')
|
||||
element.style.paddingRight = padding ? padding : ''
|
||||
})
|
||||
|
||||
// Restore sticky content
|
||||
const elements = [].slice.call(document.querySelectorAll(`${SELECTOR_STICKY_CONTENT}`))
|
||||
$(elements).each((index, element) => {
|
||||
const margin = $(element).data('margin-right')
|
||||
if (typeof margin !== 'undefined') {
|
||||
$(element).css('margin-right', margin).removeData('margin-right')
|
||||
}
|
||||
})
|
||||
|
||||
// Restore body padding
|
||||
const padding = $(document.body).data('padding-right')
|
||||
$(document.body).removeData('padding-right')
|
||||
document.body.style.paddingRight = padding ? padding : ''
|
||||
}
|
||||
|
||||
_getScrollbarWidth() { // thx d.walsh
|
||||
const scrollDiv = document.createElement('div')
|
||||
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER
|
||||
document.body.appendChild(scrollDiv)
|
||||
const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth
|
||||
document.body.removeChild(scrollDiv)
|
||||
return scrollbarWidth
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = {
|
||||
...Default,
|
||||
...$(this).data(),
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Modal(this, _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config](relatedTarget)
|
||||
} else if (_config.show) {
|
||||
data.show(relatedTarget)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
let target
|
||||
const selector = Util.getSelectorFromElement(this)
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector)
|
||||
}
|
||||
|
||||
const config = $(target).data(DATA_KEY) ?
|
||||
'toggle' : {
|
||||
...$(target).data(),
|
||||
...$(this).data()
|
||||
}
|
||||
|
||||
if (this.tagName === 'A' || this.tagName === 'AREA') {
|
||||
event.preventDefault()
|
||||
}
|
||||
|
||||
const $target = $(target).one(EVENT_SHOW, showEvent => {
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
// Only register focus restorer if modal will actually get shown
|
||||
return
|
||||
}
|
||||
|
||||
$target.one(EVENT_HIDDEN, () => {
|
||||
if ($(this).is(':visible')) {
|
||||
this.focus()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Modal._jQueryInterface.call($(target), config, this)
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Modal._jQueryInterface
|
||||
$.fn[NAME].Constructor = Modal
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Modal._jQueryInterface
|
||||
}
|
||||
|
||||
export default Modal
|
8
ISPChk/wwwroot/bootstrap/js/src/modal.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/modal.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
182
ISPChk/wwwroot/bootstrap/js/src/popover.js
Normal file
182
ISPChk/wwwroot/bootstrap/js/src/popover.js
Normal file
@ -0,0 +1,182 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Tooltip from './tooltip'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'popover'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.popover'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const CLASS_PREFIX = 'bs-popover'
|
||||
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
|
||||
|
||||
const Default = {
|
||||
...Tooltip.Default,
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' +
|
||||
'<div class="arrow"></div>' +
|
||||
'<h3 class="popover-header"></h3>' +
|
||||
'<div class="popover-body"></div></div>'
|
||||
}
|
||||
|
||||
const DefaultType = {
|
||||
...Tooltip.DefaultType,
|
||||
content: '(string|element|function)'
|
||||
}
|
||||
|
||||
const CLASS_NAME_FADE = 'fade'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
|
||||
const SELECTOR_TITLE = '.popover-header'
|
||||
const SELECTOR_CONTENT = '.popover-body'
|
||||
|
||||
const Event = {
|
||||
HIDE: `hide${EVENT_KEY}`,
|
||||
HIDDEN: `hidden${EVENT_KEY}`,
|
||||
SHOW: `show${EVENT_KEY}`,
|
||||
SHOWN: `shown${EVENT_KEY}`,
|
||||
INSERTED: `inserted${EVENT_KEY}`,
|
||||
CLICK: `click${EVENT_KEY}`,
|
||||
FOCUSIN: `focusin${EVENT_KEY}`,
|
||||
FOCUSOUT: `focusout${EVENT_KEY}`,
|
||||
MOUSEENTER: `mouseenter${EVENT_KEY}`,
|
||||
MOUSELEAVE: `mouseleave${EVENT_KEY}`
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Popover extends Tooltip {
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
static get NAME() {
|
||||
return NAME
|
||||
}
|
||||
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY
|
||||
}
|
||||
|
||||
static get Event() {
|
||||
return Event
|
||||
}
|
||||
|
||||
static get EVENT_KEY() {
|
||||
return EVENT_KEY
|
||||
}
|
||||
|
||||
static get DefaultType() {
|
||||
return DefaultType
|
||||
}
|
||||
|
||||
// Overrides
|
||||
|
||||
isWithContent() {
|
||||
return this.getTitle() || this._getContent()
|
||||
}
|
||||
|
||||
addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)
|
||||
}
|
||||
|
||||
getTipElement() {
|
||||
this.tip = this.tip || $(this.config.template)[0]
|
||||
return this.tip
|
||||
}
|
||||
|
||||
setContent() {
|
||||
const $tip = $(this.getTipElement())
|
||||
|
||||
// We use append for html objects to maintain js events
|
||||
this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle())
|
||||
let content = this._getContent()
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element)
|
||||
}
|
||||
|
||||
this.setElementContent($tip.find(SELECTOR_CONTENT), content)
|
||||
|
||||
$tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getContent() {
|
||||
return this.element.getAttribute('data-content') ||
|
||||
this.config.content
|
||||
}
|
||||
|
||||
_cleanTipClass() {
|
||||
const $tip = $(this.getTipElement())
|
||||
const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''))
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = typeof config === 'object' ? config : null
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Popover(this, _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Popover._jQueryInterface
|
||||
$.fn[NAME].Constructor = Popover
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Popover._jQueryInterface
|
||||
}
|
||||
|
||||
export default Popover
|
8
ISPChk/wwwroot/bootstrap/js/src/popover.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/popover.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/popover.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
import $ from"jquery";import Tooltip from"./tooltip";const NAME="popover",VERSION="4.6.0",DATA_KEY="bs.popover",EVENT_KEY=".bs.popover",JQUERY_NO_CONFLICT=$.fn[NAME],CLASS_PREFIX="bs-popover",BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)bs-popover\\S+","g"),Default={...Tooltip.Default,placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},DefaultType={...Tooltip.DefaultType,content:"(string|element|function)"},CLASS_NAME_FADE="fade",CLASS_NAME_SHOW="show",SELECTOR_TITLE=".popover-header",SELECTOR_CONTENT=".popover-body",Event={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Popover extends Tooltip{static get VERSION(){return"4.6.0"}static get Default(){return Default}static get NAME(){return NAME}static get DATA_KEY(){return DATA_KEY}static get Event(){return Event}static get EVENT_KEY(){return EVENT_KEY}static get DefaultType(){return DefaultType}isWithContent(){return this.getTitle()||this._getContent()}addAttachmentClass(t){$(this.getTipElement()).addClass("bs-popover-"+t)}getTipElement(){return this.tip=this.tip||$(this.config.template)[0],this.tip}setContent(){const t=$(this.getTipElement());this.setElementContent(t.find(SELECTOR_TITLE),this.getTitle());let e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")}_getContent(){return this.element.getAttribute("data-content")||this.config.content}_cleanTipClass(){const t=$(this.getTipElement()),e=t.attr("class").match(BSCLS_PREFIX_REGEX);null!==e&&e.length>0&&t.removeClass(e.join(""))}static _jQueryInterface(t){return this.each((function(){let e=$(this).data(DATA_KEY);const o="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new Popover(this,o),$(this).data(DATA_KEY,e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.fn[NAME]=Popover._jQueryInterface,$.fn[NAME].Constructor=Popover,$.fn[NAME].noConflict=()=>($.fn[NAME]=JQUERY_NO_CONFLICT,Popover._jQueryInterface);export default Popover;
|
||||
//# sourceMappingURL=/sm/bd1fcde3b50f9682a6f115404014ae7bc4a555448a10731877c6c1f27cb0f8e8.map
|
324
ISPChk/wwwroot/bootstrap/js/src/scrollspy.js
Normal file
324
ISPChk/wwwroot/bootstrap/js/src/scrollspy.js
Normal file
@ -0,0 +1,324 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'scrollspy'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.scrollspy'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const Default = {
|
||||
offset: 10,
|
||||
method: 'auto',
|
||||
target: ''
|
||||
}
|
||||
|
||||
const DefaultType = {
|
||||
offset: 'number',
|
||||
method: 'string',
|
||||
target: '(string|element)'
|
||||
}
|
||||
|
||||
const EVENT_ACTIVATE = `activate${EVENT_KEY}`
|
||||
const EVENT_SCROLL = `scroll${EVENT_KEY}`
|
||||
const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'
|
||||
const CLASS_NAME_ACTIVE = 'active'
|
||||
|
||||
const SELECTOR_DATA_SPY = '[data-spy="scroll"]'
|
||||
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
|
||||
const SELECTOR_NAV_LINKS = '.nav-link'
|
||||
const SELECTOR_NAV_ITEMS = '.nav-item'
|
||||
const SELECTOR_LIST_ITEMS = '.list-group-item'
|
||||
const SELECTOR_DROPDOWN = '.dropdown'
|
||||
const SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
|
||||
|
||||
const METHOD_OFFSET = 'offset'
|
||||
const METHOD_POSITION = 'position'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class ScrollSpy {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element
|
||||
this._config = this._getConfig(config)
|
||||
this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +
|
||||
`${this._config.target} ${SELECTOR_LIST_ITEMS},` +
|
||||
`${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}`
|
||||
this._offsets = []
|
||||
this._targets = []
|
||||
this._activeTarget = null
|
||||
this._scrollHeight = 0
|
||||
|
||||
$(this._scrollElement).on(EVENT_SCROLL, event => this._process(event))
|
||||
|
||||
this.refresh()
|
||||
this._process()
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
refresh() {
|
||||
const autoMethod = this._scrollElement === this._scrollElement.window ?
|
||||
METHOD_OFFSET : METHOD_POSITION
|
||||
|
||||
const offsetMethod = this._config.method === 'auto' ?
|
||||
autoMethod : this._config.method
|
||||
|
||||
const offsetBase = offsetMethod === METHOD_POSITION ?
|
||||
this._getScrollTop() : 0
|
||||
|
||||
this._offsets = []
|
||||
this._targets = []
|
||||
|
||||
this._scrollHeight = this._getScrollHeight()
|
||||
|
||||
const targets = [].slice.call(document.querySelectorAll(this._selector))
|
||||
|
||||
targets
|
||||
.map(element => {
|
||||
let target
|
||||
const targetSelector = Util.getSelectorFromElement(element)
|
||||
|
||||
if (targetSelector) {
|
||||
target = document.querySelector(targetSelector)
|
||||
}
|
||||
|
||||
if (target) {
|
||||
const targetBCR = target.getBoundingClientRect()
|
||||
if (targetBCR.width || targetBCR.height) {
|
||||
// TODO (fat): remove sketch reliance on jQuery position/offset
|
||||
return [
|
||||
$(target)[offsetMethod]().top + offsetBase,
|
||||
targetSelector
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
})
|
||||
.filter(item => item)
|
||||
.sort((a, b) => a[0] - b[0])
|
||||
.forEach(item => {
|
||||
this._offsets.push(item[0])
|
||||
this._targets.push(item[1])
|
||||
})
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
$(this._scrollElement).off(EVENT_KEY)
|
||||
|
||||
this._element = null
|
||||
this._scrollElement = null
|
||||
this._config = null
|
||||
this._selector = null
|
||||
this._offsets = null
|
||||
this._targets = null
|
||||
this._activeTarget = null
|
||||
this._scrollHeight = null
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...Default,
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (typeof config.target !== 'string' && Util.isElement(config.target)) {
|
||||
let id = $(config.target).attr('id')
|
||||
if (!id) {
|
||||
id = Util.getUID(NAME)
|
||||
$(config.target).attr('id', id)
|
||||
}
|
||||
|
||||
config.target = `#${id}`
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(NAME, config, DefaultType)
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
_getScrollTop() {
|
||||
return this._scrollElement === window ?
|
||||
this._scrollElement.pageYOffset : this._scrollElement.scrollTop
|
||||
}
|
||||
|
||||
_getScrollHeight() {
|
||||
return this._scrollElement.scrollHeight || Math.max(
|
||||
document.body.scrollHeight,
|
||||
document.documentElement.scrollHeight
|
||||
)
|
||||
}
|
||||
|
||||
_getOffsetHeight() {
|
||||
return this._scrollElement === window ?
|
||||
window.innerHeight : this._scrollElement.getBoundingClientRect().height
|
||||
}
|
||||
|
||||
_process() {
|
||||
const scrollTop = this._getScrollTop() + this._config.offset
|
||||
const scrollHeight = this._getScrollHeight()
|
||||
const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()
|
||||
|
||||
if (this._scrollHeight !== scrollHeight) {
|
||||
this.refresh()
|
||||
}
|
||||
|
||||
if (scrollTop >= maxScroll) {
|
||||
const target = this._targets[this._targets.length - 1]
|
||||
|
||||
if (this._activeTarget !== target) {
|
||||
this._activate(target)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
|
||||
this._activeTarget = null
|
||||
this._clear()
|
||||
return
|
||||
}
|
||||
|
||||
for (let i = this._offsets.length; i--;) {
|
||||
const isActiveTarget = this._activeTarget !== this._targets[i] &&
|
||||
scrollTop >= this._offsets[i] &&
|
||||
(typeof this._offsets[i + 1] === 'undefined' ||
|
||||
scrollTop < this._offsets[i + 1])
|
||||
|
||||
if (isActiveTarget) {
|
||||
this._activate(this._targets[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_activate(target) {
|
||||
this._activeTarget = target
|
||||
|
||||
this._clear()
|
||||
|
||||
const queries = this._selector
|
||||
.split(',')
|
||||
.map(selector => `${selector}[data-target="${target}"],${selector}[href="${target}"]`)
|
||||
|
||||
const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))
|
||||
|
||||
if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
|
||||
$link.closest(SELECTOR_DROPDOWN)
|
||||
.find(SELECTOR_DROPDOWN_TOGGLE)
|
||||
.addClass(CLASS_NAME_ACTIVE)
|
||||
$link.addClass(CLASS_NAME_ACTIVE)
|
||||
} else {
|
||||
// Set triggered link as active
|
||||
$link.addClass(CLASS_NAME_ACTIVE)
|
||||
// Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
$link.parents(SELECTOR_NAV_LIST_GROUP)
|
||||
.prev(`${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)
|
||||
.addClass(CLASS_NAME_ACTIVE)
|
||||
// Handle special case when .nav-link is inside .nav-item
|
||||
$link.parents(SELECTOR_NAV_LIST_GROUP)
|
||||
.prev(SELECTOR_NAV_ITEMS)
|
||||
.children(SELECTOR_NAV_LINKS)
|
||||
.addClass(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
|
||||
$(this._scrollElement).trigger(EVENT_ACTIVATE, {
|
||||
relatedTarget: target
|
||||
})
|
||||
}
|
||||
|
||||
_clear() {
|
||||
[].slice.call(document.querySelectorAll(this._selector))
|
||||
.filter(node => node.classList.contains(CLASS_NAME_ACTIVE))
|
||||
.forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
let data = $(this).data(DATA_KEY)
|
||||
const _config = typeof config === 'object' && config
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config)
|
||||
$(this).data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(window).on(EVENT_LOAD_DATA_API, () => {
|
||||
const scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY))
|
||||
const scrollSpysLength = scrollSpys.length
|
||||
|
||||
for (let i = scrollSpysLength; i--;) {
|
||||
const $spy = $(scrollSpys[i])
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data())
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = ScrollSpy._jQueryInterface
|
||||
$.fn[NAME].Constructor = ScrollSpy
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return ScrollSpy._jQueryInterface
|
||||
}
|
||||
|
||||
export default ScrollSpy
|
8
ISPChk/wwwroot/bootstrap/js/src/scrollspy.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/scrollspy.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/scrollspy.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
import $ from"jquery";import Util from"./util";const NAME="scrollspy",VERSION="4.6.0",DATA_KEY="bs.scrollspy",EVENT_KEY="."+DATA_KEY,DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],Default={offset:10,method:"auto",target:""},DefaultType={offset:"number",method:"string",target:"(string|element)"},EVENT_ACTIVATE="activate"+EVENT_KEY,EVENT_SCROLL="scroll"+EVENT_KEY,EVENT_LOAD_DATA_API=`load${EVENT_KEY}.data-api`,CLASS_NAME_DROPDOWN_ITEM="dropdown-item",CLASS_NAME_ACTIVE="active",SELECTOR_DATA_SPY='[data-spy="scroll"]',SELECTOR_NAV_LIST_GROUP=".nav, .list-group",SELECTOR_NAV_LINKS=".nav-link",SELECTOR_NAV_ITEMS=".nav-item",SELECTOR_LIST_ITEMS=".list-group-item",SELECTOR_DROPDOWN=".dropdown",SELECTOR_DROPDOWN_ITEMS=".dropdown-item",SELECTOR_DROPDOWN_TOGGLE=".dropdown-toggle",METHOD_OFFSET="offset",METHOD_POSITION="position";class ScrollSpy{constructor(t,e){this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,$(this._scrollElement).on(EVENT_SCROLL,(t=>this._process(t))),this.refresh(),this._process()}static get VERSION(){return"4.6.0"}static get Default(){return Default}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":"position",e="auto"===this._config.method?t:this._config.method,s="position"===e?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();[].slice.call(document.querySelectorAll(this._selector)).map((t=>{let i;const l=Util.getSelectorFromElement(t);if(l&&(i=document.querySelector(l)),i){const t=i.getBoundingClientRect();if(t.width||t.height)return[$(i)[e]().top+s,l]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){$.removeData(this._element,DATA_KEY),$(this._scrollElement).off(EVENT_KEY),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}_getConfig(t){if("string"!=typeof(t={...Default,..."object"==typeof t&&t?t:{}}).target&&Util.isElement(t.target)){let e=$(t.target).attr("id");e||(e=Util.getUID(NAME),$(t.target).attr("id",e)),t.target="#"+e}return Util.typeCheckConfig(NAME,t,DefaultType),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),s=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=s){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;){this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}}_activate(t){this._activeTarget=t,this._clear();const e=this._selector.split(",").map((e=>`${e}[data-target="${t}"],${e}[href="${t}"]`)),s=$([].slice.call(document.querySelectorAll(e.join(","))));s.hasClass("dropdown-item")?(s.closest(".dropdown").find(".dropdown-toggle").addClass("active"),s.addClass("active")):(s.addClass("active"),s.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),s.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),$(this._scrollElement).trigger(EVENT_ACTIVATE,{relatedTarget:t})}_clear(){[].slice.call(document.querySelectorAll(this._selector)).filter((t=>t.classList.contains("active"))).forEach((t=>t.classList.remove("active")))}static _jQueryInterface(t){return this.each((function(){let e=$(this).data(DATA_KEY);if(e||(e=new ScrollSpy(this,"object"==typeof t&&t),$(this).data(DATA_KEY,e)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$(window).on(EVENT_LOAD_DATA_API,(()=>{const t=[].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));for(let e=t.length;e--;){const s=$(t[e]);ScrollSpy._jQueryInterface.call(s,s.data())}})),$.fn[NAME]=ScrollSpy._jQueryInterface,$.fn[NAME].Constructor=ScrollSpy,$.fn[NAME].noConflict=()=>($.fn[NAME]=JQUERY_NO_CONFLICT,ScrollSpy._jQueryInterface);export default ScrollSpy;
|
||||
//# sourceMappingURL=/sm/563185cf3146e0791a99f00f2de7d11c0dd16d978d1d08872c48b73bc18305a6.map
|
255
ISPChk/wwwroot/bootstrap/js/src/tab.js
Normal file
255
ISPChk/wwwroot/bootstrap/js/src/tab.js
Normal file
@ -0,0 +1,255 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'tab'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.tab'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_HIDE = `hide${EVENT_KEY}`
|
||||
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
|
||||
const EVENT_SHOW = `show${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
|
||||
|
||||
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
|
||||
const CLASS_NAME_ACTIVE = 'active'
|
||||
const CLASS_NAME_DISABLED = 'disabled'
|
||||
const CLASS_NAME_FADE = 'fade'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
|
||||
const SELECTOR_DROPDOWN = '.dropdown'
|
||||
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
|
||||
const SELECTOR_ACTIVE = '.active'
|
||||
const SELECTOR_ACTIVE_UL = '> li > .active'
|
||||
const SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'
|
||||
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
|
||||
const SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Tab {
|
||||
constructor(element) {
|
||||
this._element = element
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
show() {
|
||||
if (this._element.parentNode &&
|
||||
this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
|
||||
$(this._element).hasClass(CLASS_NAME_ACTIVE) ||
|
||||
$(this._element).hasClass(CLASS_NAME_DISABLED)) {
|
||||
return
|
||||
}
|
||||
|
||||
let target
|
||||
let previous
|
||||
const listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]
|
||||
const selector = Util.getSelectorFromElement(this._element)
|
||||
|
||||
if (listElement) {
|
||||
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE
|
||||
previous = $.makeArray($(listElement).find(itemSelector))
|
||||
previous = previous[previous.length - 1]
|
||||
}
|
||||
|
||||
const hideEvent = $.Event(EVENT_HIDE, {
|
||||
relatedTarget: this._element
|
||||
})
|
||||
|
||||
const showEvent = $.Event(EVENT_SHOW, {
|
||||
relatedTarget: previous
|
||||
})
|
||||
|
||||
if (previous) {
|
||||
$(previous).trigger(hideEvent)
|
||||
}
|
||||
|
||||
$(this._element).trigger(showEvent)
|
||||
|
||||
if (showEvent.isDefaultPrevented() ||
|
||||
hideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector)
|
||||
}
|
||||
|
||||
this._activate(
|
||||
this._element,
|
||||
listElement
|
||||
)
|
||||
|
||||
const complete = () => {
|
||||
const hiddenEvent = $.Event(EVENT_HIDDEN, {
|
||||
relatedTarget: this._element
|
||||
})
|
||||
|
||||
const shownEvent = $.Event(EVENT_SHOWN, {
|
||||
relatedTarget: previous
|
||||
})
|
||||
|
||||
$(previous).trigger(hiddenEvent)
|
||||
$(this._element).trigger(shownEvent)
|
||||
}
|
||||
|
||||
if (target) {
|
||||
this._activate(target, target.parentNode, complete)
|
||||
} else {
|
||||
complete()
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
this._element = null
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_activate(element, container, callback) {
|
||||
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?
|
||||
$(container).find(SELECTOR_ACTIVE_UL) :
|
||||
$(container).children(SELECTOR_ACTIVE)
|
||||
|
||||
const active = activeElements[0]
|
||||
const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE))
|
||||
const complete = () => this._transitionComplete(
|
||||
element,
|
||||
active,
|
||||
callback
|
||||
)
|
||||
|
||||
if (active && isTransitioning) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(active)
|
||||
|
||||
$(active)
|
||||
.removeClass(CLASS_NAME_SHOW)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
complete()
|
||||
}
|
||||
}
|
||||
|
||||
_transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
$(active).removeClass(CLASS_NAME_ACTIVE)
|
||||
|
||||
const dropdownChild = $(active.parentNode).find(
|
||||
SELECTOR_DROPDOWN_ACTIVE_CHILD
|
||||
)[0]
|
||||
|
||||
if (dropdownChild) {
|
||||
$(dropdownChild).removeClass(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
active.setAttribute('aria-selected', false)
|
||||
}
|
||||
}
|
||||
|
||||
$(element).addClass(CLASS_NAME_ACTIVE)
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true)
|
||||
}
|
||||
|
||||
Util.reflow(element)
|
||||
|
||||
if (element.classList.contains(CLASS_NAME_FADE)) {
|
||||
element.classList.add(CLASS_NAME_SHOW)
|
||||
}
|
||||
|
||||
if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]
|
||||
|
||||
if (dropdownElement) {
|
||||
const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE))
|
||||
|
||||
$(dropdownToggleList).addClass(CLASS_NAME_ACTIVE)
|
||||
}
|
||||
|
||||
element.setAttribute('aria-expanded', true)
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
const $this = $(this)
|
||||
let data = $this.data(DATA_KEY)
|
||||
|
||||
if (!data) {
|
||||
data = new Tab(this)
|
||||
$this.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document)
|
||||
.on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault()
|
||||
Tab._jQueryInterface.call($(this), 'show')
|
||||
})
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Tab._jQueryInterface
|
||||
$.fn[NAME].Constructor = Tab
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Tab._jQueryInterface
|
||||
}
|
||||
|
||||
export default Tab
|
8
ISPChk/wwwroot/bootstrap/js/src/tab.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/tab.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/tab.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
import $ from"jquery";import Util from"./util";const NAME="tab",VERSION="4.6.0",DATA_KEY="bs.tab",EVENT_KEY=".bs.tab",DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn.tab,EVENT_HIDE="hide.bs.tab",EVENT_HIDDEN="hidden.bs.tab",EVENT_SHOW="show.bs.tab",EVENT_SHOWN="shown.bs.tab",EVENT_CLICK_DATA_API="click.bs.tab.data-api",CLASS_NAME_DROPDOWN_MENU="dropdown-menu",CLASS_NAME_ACTIVE="active",CLASS_NAME_DISABLED="disabled",CLASS_NAME_FADE="fade",CLASS_NAME_SHOW="show",SELECTOR_DROPDOWN=".dropdown",SELECTOR_NAV_LIST_GROUP=".nav, .list-group",SELECTOR_ACTIVE=".active",SELECTOR_ACTIVE_UL="> li > .active",SELECTOR_DATA_TOGGLE='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',SELECTOR_DROPDOWN_TOGGLE=".dropdown-toggle",SELECTOR_DROPDOWN_ACTIVE_CHILD="> .dropdown-menu .active";class Tab{constructor(e){this._element=e}static get VERSION(){return"4.6.0"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass("active")||$(this._element).hasClass("disabled"))return;let e,t;const a=$(this._element).closest(".nav, .list-group")[0],n=Util.getSelectorFromElement(this._element);if(a){const e="UL"===a.nodeName||"OL"===a.nodeName?"> li > .active":".active";t=$.makeArray($(a).find(e)),t=t[t.length-1]}const s=$.Event(EVENT_HIDE,{relatedTarget:this._element}),i=$.Event(EVENT_SHOW,{relatedTarget:t});if(t&&$(t).trigger(s),$(this._element).trigger(i),i.isDefaultPrevented()||s.isDefaultPrevented())return;n&&(e=document.querySelector(n)),this._activate(this._element,a);const o=()=>{const e=$.Event(EVENT_HIDDEN,{relatedTarget:this._element}),a=$.Event(EVENT_SHOWN,{relatedTarget:t});$(t).trigger(e),$(this._element).trigger(a)};e?this._activate(e,e.parentNode,o):o()}dispose(){$.removeData(this._element,"bs.tab"),this._element=null}_activate(e,t,a){const n=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?$(t).children(".active"):$(t).find("> li > .active"))[0],s=a&&n&&$(n).hasClass("fade"),i=()=>this._transitionComplete(e,n,a);if(n&&s){const e=Util.getTransitionDurationFromElement(n);$(n).removeClass("show").one(Util.TRANSITION_END,i).emulateTransitionEnd(e)}else i()}_transitionComplete(e,t,a){if(t){$(t).removeClass("active");const e=$(t.parentNode).find("> .dropdown-menu .active")[0];e&&$(e).removeClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}if($(e).addClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),Util.reflow(e),e.classList.contains("fade")&&e.classList.add("show"),e.parentNode&&$(e.parentNode).hasClass("dropdown-menu")){const t=$(e).closest(".dropdown")[0];if(t){const e=[].slice.call(t.querySelectorAll(".dropdown-toggle"));$(e).addClass("active")}e.setAttribute("aria-expanded",!0)}a&&a()}static _jQueryInterface(e){return this.each((function(){const t=$(this);let a=t.data("bs.tab");if(a||(a=new Tab(this),t.data("bs.tab",a)),"string"==typeof e){if(void 0===a[e])throw new TypeError(`No method named "${e}"`);a[e]()}}))}}$(document).on(EVENT_CLICK_DATA_API,SELECTOR_DATA_TOGGLE,(function(e){e.preventDefault(),Tab._jQueryInterface.call($(this),"show")})),$.fn.tab=Tab._jQueryInterface,$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=()=>($.fn.tab=JQUERY_NO_CONFLICT,Tab._jQueryInterface);export default Tab;
|
||||
//# sourceMappingURL=/sm/4a96c71ac5cffc14e45c83f2d88c3d9a3f95b8232cca33f3b708d6b35757802c.map
|
230
ISPChk/wwwroot/bootstrap/js/src/toast.js
Normal file
230
ISPChk/wwwroot/bootstrap/js/src/toast.js
Normal file
@ -0,0 +1,230 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import $ from 'jquery'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'toast'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.toast'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
||||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
|
||||
const EVENT_HIDE = `hide${EVENT_KEY}`
|
||||
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
|
||||
const EVENT_SHOW = `show${EVENT_KEY}`
|
||||
const EVENT_SHOWN = `shown${EVENT_KEY}`
|
||||
|
||||
const CLASS_NAME_FADE = 'fade'
|
||||
const CLASS_NAME_HIDE = 'hide'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
const CLASS_NAME_SHOWING = 'showing'
|
||||
|
||||
const DefaultType = {
|
||||
animation: 'boolean',
|
||||
autohide: 'boolean',
|
||||
delay: 'number'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
animation: true,
|
||||
autohide: true,
|
||||
delay: 500
|
||||
}
|
||||
|
||||
const SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Toast {
|
||||
constructor(element, config) {
|
||||
this._element = element
|
||||
this._config = this._getConfig(config)
|
||||
this._timeout = null
|
||||
this._setListeners()
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get DefaultType() {
|
||||
return DefaultType
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
show() {
|
||||
const showEvent = $.Event(EVENT_SHOW)
|
||||
|
||||
$(this._element).trigger(showEvent)
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
this._clearTimeout()
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(CLASS_NAME_FADE)
|
||||
}
|
||||
|
||||
const complete = () => {
|
||||
this._element.classList.remove(CLASS_NAME_SHOWING)
|
||||
this._element.classList.add(CLASS_NAME_SHOW)
|
||||
|
||||
$(this._element).trigger(EVENT_SHOWN)
|
||||
|
||||
if (this._config.autohide) {
|
||||
this._timeout = setTimeout(() => {
|
||||
this.hide()
|
||||
}, this._config.delay)
|
||||
}
|
||||
}
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_HIDE)
|
||||
Util.reflow(this._element)
|
||||
this._element.classList.add(CLASS_NAME_SHOWING)
|
||||
if (this._config.animation) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
complete()
|
||||
}
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return
|
||||
}
|
||||
|
||||
const hideEvent = $.Event(EVENT_HIDE)
|
||||
|
||||
$(this._element).trigger(hideEvent)
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
this._close()
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this._clearTimeout()
|
||||
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
this._element.classList.remove(CLASS_NAME_SHOW)
|
||||
}
|
||||
|
||||
$(this._element).off(EVENT_CLICK_DISMISS)
|
||||
|
||||
$.removeData(this._element, DATA_KEY)
|
||||
this._element = null
|
||||
this._config = null
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getConfig(config) {
|
||||
config = {
|
||||
...Default,
|
||||
...$(this._element).data(),
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(
|
||||
NAME,
|
||||
config,
|
||||
this.constructor.DefaultType
|
||||
)
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
_setListeners() {
|
||||
$(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())
|
||||
}
|
||||
|
||||
_close() {
|
||||
const complete = () => {
|
||||
this._element.classList.add(CLASS_NAME_HIDE)
|
||||
$(this._element).trigger(EVENT_HIDDEN)
|
||||
}
|
||||
|
||||
this._element.classList.remove(CLASS_NAME_SHOW)
|
||||
if (this._config.animation) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this._element)
|
||||
|
||||
$(this._element)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
complete()
|
||||
}
|
||||
}
|
||||
|
||||
_clearTimeout() {
|
||||
clearTimeout(this._timeout)
|
||||
this._timeout = null
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
const $element = $(this)
|
||||
let data = $element.data(DATA_KEY)
|
||||
const _config = typeof config === 'object' && config
|
||||
|
||||
if (!data) {
|
||||
data = new Toast(this, _config)
|
||||
$element.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config](this)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Toast._jQueryInterface
|
||||
$.fn[NAME].Constructor = Toast
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Toast._jQueryInterface
|
||||
}
|
||||
|
||||
export default Toast
|
8
ISPChk/wwwroot/bootstrap/js/src/toast.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/toast.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/toast.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
import $ from"jquery";import Util from"./util";const NAME="toast",VERSION="4.6.0",DATA_KEY="bs.toast",EVENT_KEY=".bs.toast",JQUERY_NO_CONFLICT=$.fn.toast,EVENT_CLICK_DISMISS="click.dismiss.bs.toast",EVENT_HIDE="hide.bs.toast",EVENT_HIDDEN="hidden.bs.toast",EVENT_SHOW="show.bs.toast",EVENT_SHOWN="shown.bs.toast",CLASS_NAME_FADE="fade",CLASS_NAME_HIDE="hide",CLASS_NAME_SHOW="show",CLASS_NAME_SHOWING="showing",DefaultType={animation:"boolean",autohide:"boolean",delay:"number"},Default={animation:!0,autohide:!0,delay:500},SELECTOR_DATA_DISMISS='[data-dismiss="toast"]';class Toast{constructor(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}static get VERSION(){return"4.6.0"}static get DefaultType(){return DefaultType}static get Default(){return Default}show(){const t=$.Event(EVENT_SHOW);if($(this._element).trigger(t),t.isDefaultPrevented())return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");const e=()=>{this._element.classList.remove("showing"),this._element.classList.add("show"),$(this._element).trigger(EVENT_SHOWN),this._config.autohide&&(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay))};if(this._element.classList.remove("hide"),Util.reflow(this._element),this._element.classList.add("showing"),this._config.animation){const t=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,e).emulateTransitionEnd(t)}else e()}hide(){if(!this._element.classList.contains("show"))return;const t=$.Event(EVENT_HIDE);$(this._element).trigger(t),t.isDefaultPrevented()||this._close()}dispose(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),$(this._element).off(EVENT_CLICK_DISMISS),$.removeData(this._element,DATA_KEY),this._element=null,this._config=null}_getConfig(t){return t={...Default,...$(this._element).data(),..."object"==typeof t&&t?t:{}},Util.typeCheckConfig(NAME,t,this.constructor.DefaultType),t}_setListeners(){$(this._element).on(EVENT_CLICK_DISMISS,SELECTOR_DATA_DISMISS,(()=>this.hide()))}_close(){const t=()=>{this._element.classList.add("hide"),$(this._element).trigger(EVENT_HIDDEN)};if(this._element.classList.remove("show"),this._config.animation){const e=Util.getTransitionDurationFromElement(this._element);$(this._element).one(Util.TRANSITION_END,t).emulateTransitionEnd(e)}else t()}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static _jQueryInterface(t){return this.each((function(){const e=$(this);let s=e.data(DATA_KEY);if(s||(s=new Toast(this,"object"==typeof t&&t),e.data(DATA_KEY,s)),"string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](this)}}))}}$.fn.toast=Toast._jQueryInterface,$.fn.toast.Constructor=Toast,$.fn.toast.noConflict=()=>($.fn.toast=JQUERY_NO_CONFLICT,Toast._jQueryInterface);export default Toast;
|
||||
//# sourceMappingURL=/sm/2b5ed07442293f269cf9a24eb9687c8709b168afd1d657a00a89fc92e8db11c2.map
|
127
ISPChk/wwwroot/bootstrap/js/src/tools/sanitizer.js
Normal file
127
ISPChk/wwwroot/bootstrap/js/src/tools/sanitizer.js
Normal file
@ -0,0 +1,127 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): tools/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const uriAttrs = [
|
||||
'background',
|
||||
'cite',
|
||||
'href',
|
||||
'itemtype',
|
||||
'longdesc',
|
||||
'poster',
|
||||
'src',
|
||||
'xlink:href'
|
||||
]
|
||||
|
||||
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
|
||||
|
||||
export const DefaultWhitelist = {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
||||
a: ['target', 'href', 'title', 'rel'],
|
||||
area: [],
|
||||
b: [],
|
||||
br: [],
|
||||
col: [],
|
||||
code: [],
|
||||
div: [],
|
||||
em: [],
|
||||
hr: [],
|
||||
h1: [],
|
||||
h2: [],
|
||||
h3: [],
|
||||
h4: [],
|
||||
h5: [],
|
||||
h6: [],
|
||||
i: [],
|
||||
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
|
||||
li: [],
|
||||
ol: [],
|
||||
p: [],
|
||||
pre: [],
|
||||
s: [],
|
||||
small: [],
|
||||
span: [],
|
||||
sub: [],
|
||||
sup: [],
|
||||
strong: [],
|
||||
u: [],
|
||||
ul: []
|
||||
}
|
||||
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi
|
||||
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i
|
||||
|
||||
function allowedAttribute(attr, allowedAttributeList) {
|
||||
const attrName = attr.nodeName.toLowerCase()
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)
|
||||
|
||||
// Check if a regular expression validates the attribute.
|
||||
for (let i = 0, len = regExp.length; i < len; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
export function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
if (unsafeHtml.length === 0) {
|
||||
return unsafeHtml
|
||||
}
|
||||
|
||||
if (sanitizeFn && typeof sanitizeFn === 'function') {
|
||||
return sanitizeFn(unsafeHtml)
|
||||
}
|
||||
|
||||
const domParser = new window.DOMParser()
|
||||
const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')
|
||||
const whitelistKeys = Object.keys(whiteList)
|
||||
const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))
|
||||
|
||||
for (let i = 0, len = elements.length; i < len; i++) {
|
||||
const el = elements[i]
|
||||
const elName = el.nodeName.toLowerCase()
|
||||
|
||||
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
|
||||
el.parentNode.removeChild(el)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
const attributeList = [].slice.call(el.attributes)
|
||||
const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
|
||||
|
||||
attributeList.forEach(attr => {
|
||||
if (!allowedAttribute(attr, whitelistedAttributes)) {
|
||||
el.removeAttribute(attr.nodeName)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return createdDocument.body.innerHTML
|
||||
}
|
8
ISPChk/wwwroot/bootstrap/js/src/tools/sanitizer.min.js
vendored
Normal file
8
ISPChk/wwwroot/bootstrap/js/src/tools/sanitizer.min.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.5.
|
||||
* Original file: /npm/bootstrap@4.6.0/js/src/tools/sanitizer.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
const uriAttrs=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i;export const DefaultWhitelist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};const SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function allowedAttribute(e,t){const o=e.nodeName.toLowerCase();if(-1!==t.indexOf(o))return-1===uriAttrs.indexOf(o)||Boolean(e.nodeValue.match(SAFE_URL_PATTERN)||e.nodeValue.match(DATA_URL_PATTERN));const r=t.filter((e=>e instanceof RegExp));for(let e=0,t=r.length;e<t;e++)if(o.match(r[e]))return!0;return!1}export function sanitizeHtml(e,t,o){if(0===e.length)return e;if(o&&"function"==typeof o)return o(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=Object.keys(t),n=[].slice.call(r.body.querySelectorAll("*"));for(let e=0,o=n.length;e<o;e++){const o=n[e],r=o.nodeName.toLowerCase();if(-1===i.indexOf(o.nodeName.toLowerCase())){o.parentNode.removeChild(o);continue}const a=[].slice.call(o.attributes),l=[].concat(t["*"]||[],t[r]||[]);a.forEach((e=>{allowedAttribute(e,l)||o.removeAttribute(e.nodeName)}))}return r.body.innerHTML}
|
||||
//# sourceMappingURL=/sm/ddbc6b36d7a40e60f55d8348519be9caf7312d1156555f6f4489f3170892880f.map
|
778
ISPChk/wwwroot/bootstrap/js/src/tooltip.js
Normal file
778
ISPChk/wwwroot/bootstrap/js/src/tooltip.js
Normal file
@ -0,0 +1,778 @@
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.6.0): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import {
|
||||
DefaultWhitelist,
|
||||
sanitizeHtml
|
||||
} from './tools/sanitizer'
|
||||
import $ from 'jquery'
|
||||
import Popper from 'popper.js'
|
||||
import Util from './util'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const NAME = 'tooltip'
|
||||
const VERSION = '4.6.0'
|
||||
const DATA_KEY = 'bs.tooltip'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const CLASS_PREFIX = 'bs-tooltip'
|
||||
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
|
||||
const DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
|
||||
|
||||
const DefaultType = {
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
title: '(string|element|function)',
|
||||
trigger: 'string',
|
||||
delay: '(number|object)',
|
||||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: '(number|string|function)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)',
|
||||
boundary: '(string|element)',
|
||||
customClass: '(string|function)',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
whiteList: 'object',
|
||||
popperConfig: '(null|object)'
|
||||
}
|
||||
|
||||
const AttachmentMap = {
|
||||
AUTO: 'auto',
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
}
|
||||
|
||||
const Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' +
|
||||
'<div class="arrow"></div>' +
|
||||
'<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip',
|
||||
boundary: 'scrollParent',
|
||||
customClass: '',
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
whiteList: DefaultWhitelist,
|
||||
popperConfig: null
|
||||
}
|
||||
|
||||
const HOVER_STATE_SHOW = 'show'
|
||||
const HOVER_STATE_OUT = 'out'
|
||||
|
||||
const Event = {
|
||||
HIDE: `hide${EVENT_KEY}`,
|
||||
HIDDEN: `hidden${EVENT_KEY}`,
|
||||
SHOW: `show${EVENT_KEY}`,
|
||||
SHOWN: `shown${EVENT_KEY}`,
|
||||
INSERTED: `inserted${EVENT_KEY}`,
|
||||
CLICK: `click${EVENT_KEY}`,
|
||||
FOCUSIN: `focusin${EVENT_KEY}`,
|
||||
FOCUSOUT: `focusout${EVENT_KEY}`,
|
||||
MOUSEENTER: `mouseenter${EVENT_KEY}`,
|
||||
MOUSELEAVE: `mouseleave${EVENT_KEY}`
|
||||
}
|
||||
|
||||
const CLASS_NAME_FADE = 'fade'
|
||||
const CLASS_NAME_SHOW = 'show'
|
||||
|
||||
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'
|
||||
const SELECTOR_ARROW = '.arrow'
|
||||
|
||||
const TRIGGER_HOVER = 'hover'
|
||||
const TRIGGER_FOCUS = 'focus'
|
||||
const TRIGGER_CLICK = 'click'
|
||||
const TRIGGER_MANUAL = 'manual'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class Tooltip {
|
||||
constructor(element, config) {
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)')
|
||||
}
|
||||
|
||||
// private
|
||||
this._isEnabled = true
|
||||
this._timeout = 0
|
||||
this._hoverState = ''
|
||||
this._activeTrigger = {}
|
||||
this._popper = null
|
||||
|
||||
// Protected
|
||||
this.element = element
|
||||
this.config = this._getConfig(config)
|
||||
this.tip = null
|
||||
|
||||
this._setListeners()
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
static get VERSION() {
|
||||
return VERSION
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
static get NAME() {
|
||||
return NAME
|
||||
}
|
||||
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY
|
||||
}
|
||||
|
||||
static get Event() {
|
||||
return Event
|
||||
}
|
||||
|
||||
static get EVENT_KEY() {
|
||||
return EVENT_KEY
|
||||
}
|
||||
|
||||
static get DefaultType() {
|
||||
return DefaultType
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
enable() {
|
||||
this._isEnabled = true
|
||||
}
|
||||
|
||||
disable() {
|
||||
this._isEnabled = false
|
||||
}
|
||||
|
||||
toggleEnabled() {
|
||||
this._isEnabled = !this._isEnabled
|
||||
}
|
||||
|
||||
toggle(event) {
|
||||
if (!this._isEnabled) {
|
||||
return
|
||||
}
|
||||
|
||||
if (event) {
|
||||
const dataKey = this.constructor.DATA_KEY
|
||||
let context = $(event.currentTarget).data(dataKey)
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(
|
||||
event.currentTarget,
|
||||
this._getDelegateConfig()
|
||||
)
|
||||
$(event.currentTarget).data(dataKey, context)
|
||||
}
|
||||
|
||||
context._activeTrigger.click = !context._activeTrigger.click
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
context._enter(null, context)
|
||||
} else {
|
||||
context._leave(null, context)
|
||||
}
|
||||
} else {
|
||||
if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
|
||||
this._leave(null, this)
|
||||
return
|
||||
}
|
||||
|
||||
this._enter(null, this)
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
clearTimeout(this._timeout)
|
||||
|
||||
$.removeData(this.element, this.constructor.DATA_KEY)
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY)
|
||||
$(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler)
|
||||
|
||||
if (this.tip) {
|
||||
$(this.tip).remove()
|
||||
}
|
||||
|
||||
this._isEnabled = null
|
||||
this._timeout = null
|
||||
this._hoverState = null
|
||||
this._activeTrigger = null
|
||||
if (this._popper) {
|
||||
this._popper.destroy()
|
||||
}
|
||||
|
||||
this._popper = null
|
||||
this.element = null
|
||||
this.config = null
|
||||
this.tip = null
|
||||
}
|
||||
|
||||
show() {
|
||||
if ($(this.element).css('display') === 'none') {
|
||||
throw new Error('Please use show on visible elements')
|
||||
}
|
||||
|
||||
const showEvent = $.Event(this.constructor.Event.SHOW)
|
||||
if (this.isWithContent() && this._isEnabled) {
|
||||
$(this.element).trigger(showEvent)
|
||||
|
||||
const shadowRoot = Util.findShadowRoot(this.element)
|
||||
const isInTheDom = $.contains(
|
||||
shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,
|
||||
this.element
|
||||
)
|
||||
|
||||
if (showEvent.isDefaultPrevented() || !isInTheDom) {
|
||||
return
|
||||
}
|
||||
|
||||
const tip = this.getTipElement()
|
||||
const tipId = Util.getUID(this.constructor.NAME)
|
||||
|
||||
tip.setAttribute('id', tipId)
|
||||
this.element.setAttribute('aria-describedby', tipId)
|
||||
|
||||
this.setContent()
|
||||
|
||||
if (this.config.animation) {
|
||||
$(tip).addClass(CLASS_NAME_FADE)
|
||||
}
|
||||
|
||||
const placement = typeof this.config.placement === 'function' ?
|
||||
this.config.placement.call(this, tip, this.element) :
|
||||
this.config.placement
|
||||
|
||||
const attachment = this._getAttachment(placement)
|
||||
this.addAttachmentClass(attachment)
|
||||
|
||||
const container = this._getContainer()
|
||||
$(tip).data(this.constructor.DATA_KEY, this)
|
||||
|
||||
if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
|
||||
$(tip).appendTo(container)
|
||||
}
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED)
|
||||
|
||||
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))
|
||||
|
||||
$(tip).addClass(CLASS_NAME_SHOW)
|
||||
$(tip).addClass(this.config.customClass)
|
||||
|
||||
// If this is a touch-enabled device we add extra
|
||||
// empty mouseover listeners to the body's immediate children;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(document.body).children().on('mouseover', null, $.noop)
|
||||
}
|
||||
|
||||
const complete = () => {
|
||||
if (this.config.animation) {
|
||||
this._fixTransition()
|
||||
}
|
||||
|
||||
const prevHoverState = this._hoverState
|
||||
this._hoverState = null
|
||||
|
||||
$(this.element).trigger(this.constructor.Event.SHOWN)
|
||||
|
||||
if (prevHoverState === HOVER_STATE_OUT) {
|
||||
this._leave(null, this)
|
||||
}
|
||||
}
|
||||
|
||||
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(this.tip)
|
||||
|
||||
$(this.tip)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
complete()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hide(callback) {
|
||||
const tip = this.getTipElement()
|
||||
const hideEvent = $.Event(this.constructor.Event.HIDE)
|
||||
const complete = () => {
|
||||
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip)
|
||||
}
|
||||
|
||||
this._cleanTipClass()
|
||||
this.element.removeAttribute('aria-describedby')
|
||||
$(this.element).trigger(this.constructor.Event.HIDDEN)
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy()
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
$(this.element).trigger(hideEvent)
|
||||
|
||||
if (hideEvent.isDefaultPrevented()) {
|
||||
return
|
||||
}
|
||||
|
||||
$(tip).removeClass(CLASS_NAME_SHOW)
|
||||
|
||||
// If this is a touch-enabled device we remove the extra
|
||||
// empty mouseover listeners we added for iOS support
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
$(document.body).children().off('mouseover', null, $.noop)
|
||||
}
|
||||
|
||||
this._activeTrigger[TRIGGER_CLICK] = false
|
||||
this._activeTrigger[TRIGGER_FOCUS] = false
|
||||
this._activeTrigger[TRIGGER_HOVER] = false
|
||||
|
||||
if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
|
||||
const transitionDuration = Util.getTransitionDurationFromElement(tip)
|
||||
|
||||
$(tip)
|
||||
.one(Util.TRANSITION_END, complete)
|
||||
.emulateTransitionEnd(transitionDuration)
|
||||
} else {
|
||||
complete()
|
||||
}
|
||||
|
||||
this._hoverState = ''
|
||||
}
|
||||
|
||||
update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// Protected
|
||||
|
||||
isWithContent() {
|
||||
return Boolean(this.getTitle())
|
||||
}
|
||||
|
||||
addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)
|
||||
}
|
||||
|
||||
getTipElement() {
|
||||
this.tip = this.tip || $(this.config.template)[0]
|
||||
return this.tip
|
||||
}
|
||||
|
||||
setContent() {
|
||||
const tip = this.getTipElement()
|
||||
this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle())
|
||||
$(tip).removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
|
||||
}
|
||||
|
||||
setElementContent($element, content) {
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// Content is a DOM node or a jQuery
|
||||
if (this.config.html) {
|
||||
if (!$(content).parent().is($element)) {
|
||||
$element.empty().append(content)
|
||||
}
|
||||
} else {
|
||||
$element.text($(content).text())
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (this.config.html) {
|
||||
if (this.config.sanitize) {
|
||||
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn)
|
||||
}
|
||||
|
||||
$element.html(content)
|
||||
} else {
|
||||
$element.text(content)
|
||||
}
|
||||
}
|
||||
|
||||
getTitle() {
|
||||
let title = this.element.getAttribute('data-original-title')
|
||||
|
||||
if (!title) {
|
||||
title = typeof this.config.title === 'function' ?
|
||||
this.config.title.call(this.element) :
|
||||
this.config.title
|
||||
}
|
||||
|
||||
return title
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
_getPopperConfig(attachment) {
|
||||
const defaultBsConfig = {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
arrow: {
|
||||
element: SELECTOR_ARROW
|
||||
},
|
||||
preventOverflow: {
|
||||
boundariesElement: this.config.boundary
|
||||
}
|
||||
},
|
||||
onCreate: data => {
|
||||
if (data.originalPlacement !== data.placement) {
|
||||
this._handlePopperPlacementChange(data)
|
||||
}
|
||||
},
|
||||
onUpdate: data => this._handlePopperPlacementChange(data)
|
||||
}
|
||||
|
||||
return {
|
||||
...defaultBsConfig,
|
||||
...this.config.popperConfig
|
||||
}
|
||||
}
|
||||
|
||||
_getOffset() {
|
||||
const offset = {}
|
||||
|
||||
if (typeof this.config.offset === 'function') {
|
||||
offset.fn = data => {
|
||||
data.offsets = {
|
||||
...data.offsets,
|
||||
...(this.config.offset(data.offsets, this.element) || {})
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
} else {
|
||||
offset.offset = this.config.offset
|
||||
}
|
||||
|
||||
return offset
|
||||
}
|
||||
|
||||
_getContainer() {
|
||||
if (this.config.container === false) {
|
||||
return document.body
|
||||
}
|
||||
|
||||
if (Util.isElement(this.config.container)) {
|
||||
return $(this.config.container)
|
||||
}
|
||||
|
||||
return $(document).find(this.config.container)
|
||||
}
|
||||
|
||||
_getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()]
|
||||
}
|
||||
|
||||
_setListeners() {
|
||||
const triggers = this.config.trigger.split(' ')
|
||||
|
||||
triggers.forEach(trigger => {
|
||||
if (trigger === 'click') {
|
||||
$(this.element).on(
|
||||
this.constructor.Event.CLICK,
|
||||
this.config.selector,
|
||||
event => this.toggle(event)
|
||||
)
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
const eventIn = trigger === TRIGGER_HOVER ?
|
||||
this.constructor.Event.MOUSEENTER :
|
||||
this.constructor.Event.FOCUSIN
|
||||
const eventOut = trigger === TRIGGER_HOVER ?
|
||||
this.constructor.Event.MOUSELEAVE :
|
||||
this.constructor.Event.FOCUSOUT
|
||||
|
||||
$(this.element)
|
||||
.on(eventIn, this.config.selector, event => this._enter(event))
|
||||
.on(eventOut, this.config.selector, event => this._leave(event))
|
||||
}
|
||||
})
|
||||
|
||||
this._hideModalHandler = () => {
|
||||
if (this.element) {
|
||||
this.hide()
|
||||
}
|
||||
}
|
||||
|
||||
$(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler)
|
||||
|
||||
if (this.config.selector) {
|
||||
this.config = {
|
||||
...this.config,
|
||||
trigger: 'manual',
|
||||
selector: ''
|
||||
}
|
||||
} else {
|
||||
this._fixTitle()
|
||||
}
|
||||
}
|
||||
|
||||
_fixTitle() {
|
||||
const titleType = typeof this.element.getAttribute('data-original-title')
|
||||
|
||||
if (this.element.getAttribute('title') || titleType !== 'string') {
|
||||
this.element.setAttribute(
|
||||
'data-original-title',
|
||||
this.element.getAttribute('title') || ''
|
||||
)
|
||||
|
||||
this.element.setAttribute('title', '')
|
||||
}
|
||||
}
|
||||
|
||||
_enter(event, context) {
|
||||
const dataKey = this.constructor.DATA_KEY
|
||||
context = context || $(event.currentTarget).data(dataKey)
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(
|
||||
event.currentTarget,
|
||||
this._getDelegateConfig()
|
||||
)
|
||||
$(event.currentTarget).data(dataKey, context)
|
||||
}
|
||||
|
||||
if (event) {
|
||||
context._activeTrigger[
|
||||
event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER
|
||||
] = true
|
||||
}
|
||||
|
||||
if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
|
||||
context._hoverState = HOVER_STATE_SHOW
|
||||
return
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout)
|
||||
|
||||
context._hoverState = HOVER_STATE_SHOW
|
||||
|
||||
if (!context.config.delay || !context.config.delay.show) {
|
||||
context.show()
|
||||
return
|
||||
}
|
||||
|
||||
context._timeout = setTimeout(() => {
|
||||
if (context._hoverState === HOVER_STATE_SHOW) {
|
||||
context.show()
|
||||
}
|
||||
}, context.config.delay.show)
|
||||
}
|
||||
|
||||
_leave(event, context) {
|
||||
const dataKey = this.constructor.DATA_KEY
|
||||
context = context || $(event.currentTarget).data(dataKey)
|
||||
|
||||
if (!context) {
|
||||
context = new this.constructor(
|
||||
event.currentTarget,
|
||||
this._getDelegateConfig()
|
||||
)
|
||||
$(event.currentTarget).data(dataKey, context)
|
||||
}
|
||||
|
||||
if (event) {
|
||||
context._activeTrigger[
|
||||
event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER
|
||||
] = false
|
||||
}
|
||||
|
||||
if (context._isWithActiveTrigger()) {
|
||||
return
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout)
|
||||
|
||||
context._hoverState = HOVER_STATE_OUT
|
||||
|
||||
if (!context.config.delay || !context.config.delay.hide) {
|
||||
context.hide()
|
||||
return
|
||||
}
|
||||
|
||||
context._timeout = setTimeout(() => {
|
||||
if (context._hoverState === HOVER_STATE_OUT) {
|
||||
context.hide()
|
||||
}
|
||||
}, context.config.delay.hide)
|
||||
}
|
||||
|
||||
_isWithActiveTrigger() {
|
||||
for (const trigger in this._activeTrigger) {
|
||||
if (this._activeTrigger[trigger]) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
_getConfig(config) {
|
||||
const dataAttributes = $(this.element).data()
|
||||
|
||||
Object.keys(dataAttributes)
|
||||
.forEach(dataAttr => {
|
||||
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
|
||||
delete dataAttributes[dataAttr]
|
||||
}
|
||||
})
|
||||
|
||||
config = {
|
||||
...this.constructor.Default,
|
||||
...dataAttributes,
|
||||
...(typeof config === 'object' && config ? config : {})
|
||||
}
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
show: config.delay,
|
||||
hide: config.delay
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString()
|
||||
}
|
||||
|
||||
if (typeof config.content === 'number') {
|
||||
config.content = config.content.toString()
|
||||
}
|
||||
|
||||
Util.typeCheckConfig(
|
||||
NAME,
|
||||
config,
|
||||
this.constructor.DefaultType
|
||||
)
|
||||
|
||||
if (config.sanitize) {
|
||||
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
_getDelegateConfig() {
|
||||
const config = {}
|
||||
|
||||
if (this.config) {
|
||||
for (const key in this.config) {
|
||||
if (this.constructor.Default[key] !== this.config[key]) {
|
||||
config[key] = this.config[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
_cleanTipClass() {
|
||||
const $tip = $(this.getTipElement())
|
||||
const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)
|
||||
if (tabClass !== null && tabClass.length) {
|
||||
$tip.removeClass(tabClass.join(''))
|
||||
}
|
||||
}
|
||||
|
||||
_handlePopperPlacementChange(popperData) {
|
||||
this.tip = popperData.instance.popper
|
||||
this._cleanTipClass()
|
||||
this.addAttachmentClass(this._getAttachment(popperData.placement))
|
||||
}
|
||||
|
||||
_fixTransition() {
|
||||
const tip = this.getTipElement()
|
||||
const initConfigAnimation = this.config.animation
|
||||
|
||||
if (tip.getAttribute('x-placement') !== null) {
|
||||
return
|
||||
}
|
||||
|
||||
$(tip).removeClass(CLASS_NAME_FADE)
|
||||
this.config.animation = false
|
||||
this.hide()
|
||||
this.show()
|
||||
this.config.animation = initConfigAnimation
|
||||
}
|
||||
|
||||
// Static
|
||||
|
||||
static _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
const $element = $(this)
|
||||
let data = $element.data(DATA_KEY)
|
||||
const _config = typeof config === 'object' && config
|
||||
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Tooltip(this, _config)
|
||||
$element.data(DATA_KEY, data)
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError(`No method named "${config}"`)
|
||||
}
|
||||
|
||||
data[config]()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Tooltip._jQueryInterface
|
||||
$.fn[NAME].Constructor = Tooltip
|
||||
$.fn[NAME].noConflict = () => {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT
|
||||
return Tooltip._jQueryInterface
|
||||
}
|
||||
|
||||
export default Tooltip
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user