commit 0190563c9a947e0c441495e2588982ba3f219e21 Author: marszayn Date: Sun Jul 27 20:34:25 2025 +0700 Initial commit - Upload .NET MVC Project diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cb00ca7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +bin/ +obj/ +publish/ +wwwroot/lib/ +appsettings.Development.json +*.user +*.db +node_modules/ \ No newline at end of file diff --git a/Controllers/DetailController.cs b/Controllers/DetailController.cs new file mode 100644 index 0000000..30ded0c --- /dev/null +++ b/Controllers/DetailController.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc; + +namespace eSPJ.Controllers +{ + [Route("detail-penjemputan")] + public class DetailPenjemputanController : Controller + { + + [HttpGet("")] + public IActionResult Index() + { + return View(); + } + + + } +} diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs new file mode 100644 index 0000000..1158a48 --- /dev/null +++ b/Controllers/HomeController.cs @@ -0,0 +1,31 @@ +using System.Diagnostics; +using Microsoft.AspNetCore.Mvc; +using eSPJ.Models; + +namespace eSPJ.Controllers; + +public class HomeController : Controller +{ + private readonly ILogger _logger; + + public HomeController(ILogger logger) + { + _logger = logger; + } + + public IActionResult Index() + { + return View(); + } + + public IActionResult Privacy() + { + return View(); + } + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } +} diff --git a/Controllers/ProfilController.cs b/Controllers/ProfilController.cs new file mode 100644 index 0000000..cbc0eaf --- /dev/null +++ b/Controllers/ProfilController.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc; + +namespace eSPJ.Controllers +{ + [Route("profil")] + public class ProfilController : Controller + { + + [HttpGet("")] + public IActionResult Index() + { + return View(); + } + + + } +} diff --git a/Models/ErrorViewModel.cs b/Models/ErrorViewModel.cs new file mode 100644 index 0000000..14c5fc3 --- /dev/null +++ b/Models/ErrorViewModel.cs @@ -0,0 +1,8 @@ +namespace eSPJ.Models; + +public class ErrorViewModel +{ + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); +} diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..1510d12 --- /dev/null +++ b/Program.cs @@ -0,0 +1,29 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddControllersWithViews(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Home/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseRouting(); + +app.UseAuthorization(); + +app.MapStaticAssets(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}") + .WithStaticAssets(); + + +app.Run(); diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..46efbe1 --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5002", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7193;http://localhost:5002", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Views/DetailPenjemputan/Index.cshtml b/Views/DetailPenjemputan/Index.cshtml new file mode 100644 index 0000000..277052f --- /dev/null +++ b/Views/DetailPenjemputan/Index.cshtml @@ -0,0 +1,87 @@ +@{ + ViewData["Title"] = "Detail Penjemputan"; +} + +
+ +
+
+ + + + + +

Detail Lokasi

+
+
+ + +
+
+ B 9632 TOR + (JRC 005) +
+
+ + +
+ +
+ + PENGANGKUTAN + +
+ + +
+

CV Tri Berkah Sejahtera

+

SPJ/07-2025/PKM/000476

+
+ + +
+

Alamat

+

+ Kp. Pertanian II Rt.004 Rw.001 Kel. Klender Kec, Duren Sawit, Kota Adm. Jakarta Timur 13470 +

+
+ + +
+

Masukkan Odometer

+
+
+ + +
+ +
+
+
+
+ + +
+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml new file mode 100644 index 0000000..5380ce7 --- /dev/null +++ b/Views/Home/Index.cshtml @@ -0,0 +1,167 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +
+ + +
+
+ @*
+ Hallo + 👋 +
+

Bonny Agung Putra

+

Driver UPST

*@ + +

Your Location:

+

+ Mendeteksi lokasi... +

+
+
+
+ Profile +
+
+
+ + +
+ +
+ tree +
+
+
+

Data SPJ

+
+
+ B 9632 TOR +
+
(JRC 005)
+
+
+
+

No. SPJ

+

SPJ/07-2025/PKM/000476

+

Tujuan Pembuangan

+

Taman Barito

+
+ +
+ DLH Logo +
+
+
+ + +
+
+

Lokasi Pengangkutan

+ +
+ + + +
+
+
+ Sudah Diangkut +

CV Tri Berkah Sejahtera

+

Alamat

+

+ Kp. Pertanian II Rt.004 Rw.001 Kel. Klender Kec, Duren Sawit, Kota Adm. Jakarta Timur 13470 +

+
+
+
+ +
+
+
+
+
+ + +
+
+
+ Pengangkutan +

CV Tri Mitra Utama

+

Shell Radio Dalam

+

Alamat

+

+ Jl. Radio Dalam Raya No.6C Gandaria Utara, Kecamatan Kebayoran Baru, Kota Jakarta Selatan 12140 +

+
+
+
+ +
+
+
+
+
+ + + + +
+ + + + + \ No newline at end of file diff --git a/Views/Home/Privacy.cshtml b/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..af4fb19 --- /dev/null +++ b/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/Views/Profil/Index.cshtml b/Views/Profil/Index.cshtml new file mode 100644 index 0000000..f15494b --- /dev/null +++ b/Views/Profil/Index.cshtml @@ -0,0 +1,103 @@ +@{ + ViewData["Title"] = "Profil Page"; +} + +
+ +
+
+ +

Profil

+
+
+
+ + +
+
+ +
+ Profile Picture +
+ + + +
+
+ + +
+ +
+

Info Akun

+ +
+ + +
+ +
+
+ +
+
+

Nama

+

Bonny Agung Putra

+
+
+ + +
+
+ +
+
+

E-mail

+

bonny@gmail.com

+
+
+ + +
+
+ +
+
+

No. HP

+

+6285777777777

+
+
+ + +
+
+ +
+
+

Alamat

+

+ Kp. Pertanian II Rt 004 Rw 001 Kel. Klender Kec, Duren Swakit, Kota Adm. Jakarta Timur 13470 +

+
+
+
+ + +
+ +
+ +
+ + +
\ No newline at end of file diff --git a/Views/Shared/Components/_ModalSPJ.cshtml b/Views/Shared/Components/_ModalSPJ.cshtml new file mode 100644 index 0000000..e69de29 diff --git a/Views/Shared/Components/_Navigation.cshtml b/Views/Shared/Components/_Navigation.cshtml new file mode 100644 index 0000000..8ce0ffe --- /dev/null +++ b/Views/Shared/Components/_Navigation.cshtml @@ -0,0 +1,129 @@ +
+ +
+ +
+
+ +
+ +
+
+
+ + + +
+ + +
+ +
+
+ +
+ + + + + + + + diff --git a/Views/Shared/Components/_StatusBar.cshtml b/Views/Shared/Components/_StatusBar.cshtml new file mode 100644 index 0000000..19e8f8f --- /dev/null +++ b/Views/Shared/Components/_StatusBar.cshtml @@ -0,0 +1,26 @@ + +
+
+ 13:33 +
+ + + + + + +
+
+
+ 4G +
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/Views/Shared/Error.cshtml b/Views/Shared/Error.cshtml new file mode 100644 index 0000000..a1e0478 --- /dev/null +++ b/Views/Shared/Error.cshtml @@ -0,0 +1,25 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..b1e5d55 --- /dev/null +++ b/Views/Shared/_Layout.cshtml @@ -0,0 +1,63 @@ + + + + + + @ViewData["Title"] - eSPJ + + + + + + + + + + + + + + + + + + + + + + + @* *@ + + + + + + + @await RenderSectionAsync("Styles", required: false) + + + + @RenderBody() + + + + + + + + @await RenderSectionAsync("Scripts", required: false) + + + + + + diff --git a/Views/Shared/_Layout.cshtml.css b/Views/Shared/_Layout.cshtml.css new file mode 100644 index 0000000..c187c02 --- /dev/null +++ b/Views/Shared/_Layout.cshtml.css @@ -0,0 +1,48 @@ +/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +a { + color: #0077cc; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; +} diff --git a/Views/Shared/_ValidationScriptsPartial.cshtml b/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..5d1f685 --- /dev/null +++ b/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/Views/_ViewImports.cshtml b/Views/_ViewImports.cshtml new file mode 100644 index 0000000..e119faf --- /dev/null +++ b/Views/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@using eSPJ +@using eSPJ.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, DynamicSections \ No newline at end of file diff --git a/Views/_ViewStart.cshtml b/Views/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/appsettings.json b/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/eSPJ.csproj b/eSPJ.csproj new file mode 100644 index 0000000..fa7b0d8 --- /dev/null +++ b/eSPJ.csproj @@ -0,0 +1,13 @@ + + + + net9.0 + enable + enable + + + + + + + diff --git a/eSPJ.sln b/eSPJ.sln new file mode 100644 index 0000000..fa25d88 --- /dev/null +++ b/eSPJ.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.2.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eSPJ", "eSPJ.csproj", "{B8539925-B145-B609-A063-20B0D85C7150}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B8539925-B145-B609-A063-20B0D85C7150}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8539925-B145-B609-A063-20B0D85C7150}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8539925-B145-B609-A063-20B0D85C7150}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8539925-B145-B609-A063-20B0D85C7150}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {88CB0BDE-3A27-4073-9743-BF4F7AE7EB9C} + EndGlobalSection +EndGlobal diff --git a/node_modules/.bin/detect-libc b/node_modules/.bin/detect-libc new file mode 100644 index 0000000..76becf3 --- /dev/null +++ b/node_modules/.bin/detect-libc @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../detect-libc/bin/detect-libc.js" "$@" +else + exec node "$basedir/../detect-libc/bin/detect-libc.js" "$@" +fi diff --git a/node_modules/.bin/detect-libc.cmd b/node_modules/.bin/detect-libc.cmd new file mode 100644 index 0000000..1c5d86d --- /dev/null +++ b/node_modules/.bin/detect-libc.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\detect-libc\bin\detect-libc.js" %* diff --git a/node_modules/.bin/detect-libc.ps1 b/node_modules/.bin/detect-libc.ps1 new file mode 100644 index 0000000..5ebeae1 --- /dev/null +++ b/node_modules/.bin/detect-libc.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } else { + & "$basedir/node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } else { + & "node$exe" "$basedir/../detect-libc/bin/detect-libc.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/jiti b/node_modules/.bin/jiti new file mode 100644 index 0000000..f4ef06f --- /dev/null +++ b/node_modules/.bin/jiti @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../jiti/lib/jiti-cli.mjs" "$@" +else + exec node "$basedir/../jiti/lib/jiti-cli.mjs" "$@" +fi diff --git a/node_modules/.bin/jiti.cmd b/node_modules/.bin/jiti.cmd new file mode 100644 index 0000000..b2360f3 --- /dev/null +++ b/node_modules/.bin/jiti.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jiti\lib\jiti-cli.mjs" %* diff --git a/node_modules/.bin/jiti.ps1 b/node_modules/.bin/jiti.ps1 new file mode 100644 index 0000000..baf5345 --- /dev/null +++ b/node_modules/.bin/jiti.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args + } else { + & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args + } else { + & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 100644 index 0000000..df9a9a4 --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../mkdirp/dist/cjs/src/bin.js" "$@" +else + exec node "$basedir/../mkdirp/dist/cjs/src/bin.js" "$@" +fi diff --git a/node_modules/.bin/mkdirp.cmd b/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..90e19d5 --- /dev/null +++ b/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\dist\cjs\src\bin.js" %* diff --git a/node_modules/.bin/mkdirp.ps1 b/node_modules/.bin/mkdirp.ps1 new file mode 100644 index 0000000..6d3467b --- /dev/null +++ b/node_modules/.bin/mkdirp.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../mkdirp/dist/cjs/src/bin.js" $args + } else { + & "$basedir/node$exe" "$basedir/../mkdirp/dist/cjs/src/bin.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../mkdirp/dist/cjs/src/bin.js" $args + } else { + & "node$exe" "$basedir/../mkdirp/dist/cjs/src/bin.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.bin/tailwindcss b/node_modules/.bin/tailwindcss new file mode 100644 index 0000000..5fd5a4b --- /dev/null +++ b/node_modules/.bin/tailwindcss @@ -0,0 +1,16 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) + if command -v cygpath > /dev/null 2>&1; then + basedir=`cygpath -w "$basedir"` + fi + ;; +esac + +if [ -x "$basedir/node" ]; then + exec "$basedir/node" "$basedir/../@tailwindcss/cli/dist/index.mjs" "$@" +else + exec node "$basedir/../@tailwindcss/cli/dist/index.mjs" "$@" +fi diff --git a/node_modules/.bin/tailwindcss.cmd b/node_modules/.bin/tailwindcss.cmd new file mode 100644 index 0000000..4739657 --- /dev/null +++ b/node_modules/.bin/tailwindcss.cmd @@ -0,0 +1,17 @@ +@ECHO off +GOTO start +:find_dp0 +SET dp0=%~dp0 +EXIT /b +:start +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@tailwindcss\cli\dist\index.mjs" %* diff --git a/node_modules/.bin/tailwindcss.ps1 b/node_modules/.bin/tailwindcss.ps1 new file mode 100644 index 0000000..66d83e7 --- /dev/null +++ b/node_modules/.bin/tailwindcss.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../@tailwindcss/cli/dist/index.mjs" $args + } else { + & "$basedir/node$exe" "$basedir/../@tailwindcss/cli/dist/index.mjs" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../@tailwindcss/cli/dist/index.mjs" $args + } else { + & "node$exe" "$basedir/../@tailwindcss/cli/dist/index.mjs" $args + } + $ret=$LASTEXITCODE +} +exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..1d65e98 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,521 @@ +{ + "name": "eSPJ", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@tailwindcss/cli": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.11.tgz", + "integrity": "sha512-7RAFOrVaXCFz5ooEG36Kbh+sMJiI2j4+Ozp71smgjnLfBRu7DTfoq8DsTvzse2/6nDeo2M3vS/FGaxfDgr3rtQ==", + "license": "MIT", + "dependencies": { + "@parcel/watcher": "^2.5.1", + "@tailwindcss/node": "4.1.11", + "@tailwindcss/oxide": "4.1.11", + "enhanced-resolve": "^5.18.1", + "mri": "^1.2.0", + "picocolors": "^1.1.1", + "tailwindcss": "4.1.11" + }, + "bin": { + "tailwindcss": "dist/index.mjs" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.11.tgz", + "integrity": "sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==", + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.11" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.11.tgz", + "integrity": "sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.4", + "tar": "^7.4.3" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.11", + "@tailwindcss/oxide-darwin-arm64": "4.1.11", + "@tailwindcss/oxide-darwin-x64": "4.1.11", + "@tailwindcss/oxide-freebsd-x64": "4.1.11", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.11", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-x64-musl": "4.1.11", + "@tailwindcss/oxide-wasm32-wasi": "4.1.11", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.11" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.11.tgz", + "integrity": "sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide/node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", + "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz", + "integrity": "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/lightningcss": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", + "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.30.1", + "lightningcss-darwin-x64": "1.30.1", + "lightningcss-freebsd-x64": "1.30.1", + "lightningcss-linux-arm-gnueabihf": "1.30.1", + "lightningcss-linux-arm64-gnu": "1.30.1", + "lightningcss-linux-arm64-musl": "1.30.1", + "lightningcss-linux-x64-gnu": "1.30.1", + "lightningcss-linux-x64-musl": "1.30.1", + "lightningcss-win32-arm64-msvc": "1.30.1", + "lightningcss-win32-x64-msvc": "1.30.1" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.1.tgz", + "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss/node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.11.tgz", + "integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + } + } +} diff --git a/node_modules/@ampproject/remapping/LICENSE b/node_modules/@ampproject/remapping/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/node_modules/@ampproject/remapping/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@ampproject/remapping/README.md b/node_modules/@ampproject/remapping/README.md new file mode 100644 index 0000000..1463c9f --- /dev/null +++ b/node_modules/@ampproject/remapping/README.md @@ -0,0 +1,218 @@ +# @ampproject/remapping + +> Remap sequential sourcemaps through transformations to point at the original source code + +Remapping allows you to take the sourcemaps generated through transforming your code and "remap" +them to the original source locations. Think "my minified code, transformed with babel and bundled +with webpack", all pointing to the correct location in your original source code. + +With remapping, none of your source code transformations need to be aware of the input's sourcemap, +they only need to generate an output sourcemap. This greatly simplifies building custom +transformations (think a find-and-replace). + +## Installation + +```sh +npm install @ampproject/remapping +``` + +## Usage + +```typescript +function remapping( + map: SourceMap | SourceMap[], + loader: (file: string, ctx: LoaderContext) => (SourceMap | null | undefined), + options?: { excludeContent: boolean, decodedMappings: boolean } +): SourceMap; + +// LoaderContext gives the loader the importing sourcemap, tree depth, the ability to override the +// "source" location (where child sources are resolved relative to, or the location of original +// source), and the ability to override the "content" of an original source for inclusion in the +// output sourcemap. +type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; +} +``` + +`remapping` takes the final output sourcemap, and a `loader` function. For every source file pointer +in the sourcemap, the `loader` will be called with the resolved path. If the path itself represents +a transformed file (it has a sourcmap associated with it), then the `loader` should return that +sourcemap. If not, the path will be treated as an original, untransformed source code. + +```js +// Babel transformed "helloworld.js" into "transformed.js" +const transformedMap = JSON.stringify({ + file: 'transformed.js', + // 1st column of 2nd line of output file translates into the 1st source + // file, line 3, column 2 + mappings: ';CAEE', + sources: ['helloworld.js'], + version: 3, +}); + +// Uglify minified "transformed.js" into "transformed.min.js" +const minifiedTransformedMap = JSON.stringify({ + file: 'transformed.min.js', + // 0th column of 1st line of output file translates into the 1st source + // file, line 2, column 1. + mappings: 'AACC', + names: [], + sources: ['transformed.js'], + version: 3, +}); + +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + // The "transformed.js" file is an transformed file. + if (file === 'transformed.js') { + // The root importer is empty. + console.assert(ctx.importer === ''); + // The depth in the sourcemap tree we're currently loading. + // The root `minifiedTransformedMap` is depth 0, and its source children are depth 1, etc. + console.assert(ctx.depth === 1); + + return transformedMap; + } + + // Loader will be called to load transformedMap's source file pointers as well. + console.assert(file === 'helloworld.js'); + // `transformed.js`'s sourcemap points into `helloworld.js`. + console.assert(ctx.importer === 'transformed.js'); + // This is a source child of `transformed`, which is a source child of `minifiedTransformedMap`. + console.assert(ctx.depth === 2); + return null; + } +); + +console.log(remapped); +// { +// file: 'transpiled.min.js', +// mappings: 'AAEE', +// sources: ['helloworld.js'], +// version: 3, +// }; +``` + +In this example, `loader` will be called twice: + +1. `"transformed.js"`, the first source file pointer in the `minifiedTransformedMap`. We return the + associated sourcemap for it (its a transformed file, after all) so that sourcemap locations can + be traced through it into the source files it represents. +2. `"helloworld.js"`, our original, unmodified source code. This file does not have a sourcemap, so + we return `null`. + +The `remapped` sourcemap now points from `transformed.min.js` into locations in `helloworld.js`. If +you were to read the `mappings`, it says "0th column of the first line output line points to the 1st +column of the 2nd line of the file `helloworld.js`". + +### Multiple transformations of a file + +As a convenience, if you have multiple single-source transformations of a file, you may pass an +array of sourcemap files in the order of most-recent transformation sourcemap first. Note that this +changes the `importer` and `depth` of each call to our loader. So our above example could have been +written as: + +```js +const remapped = remapping( + [minifiedTransformedMap, transformedMap], + () => null +); + +console.log(remapped); +// { +// file: 'transpiled.min.js', +// mappings: 'AAEE', +// sources: ['helloworld.js'], +// version: 3, +// }; +``` + +### Advanced control of the loading graph + +#### `source` + +The `source` property can overridden to any value to change the location of the current load. Eg, +for an original source file, it allows us to change the location to the original source regardless +of what the sourcemap source entry says. And for transformed files, it allows us to change the +relative resolving location for child sources of the loaded sourcemap. + +```js +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + if (file === 'transformed.js') { + // We pretend the transformed.js file actually exists in the 'src/' directory. When the nested + // source files are loaded, they will now be relative to `src/`. + ctx.source = 'src/transformed.js'; + return transformedMap; + } + + console.assert(file === 'src/helloworld.js'); + // We could futher change the source of this original file, eg, to be inside a nested directory + // itself. This will be reflected in the remapped sourcemap. + ctx.source = 'src/nested/transformed.js'; + return null; + } +); + +console.log(remapped); +// { +// …, +// sources: ['src/nested/helloworld.js'], +// }; +``` + + +#### `content` + +The `content` property can be overridden when we encounter an original source file. Eg, this allows +you to manually provide the source content of the original file regardless of whether the +`sourcesContent` field is present in the parent sourcemap. It can also be set to `null` to remove +the source content. + +```js +const remapped = remapping( + minifiedTransformedMap, + (file, ctx) => { + + if (file === 'transformed.js') { + // transformedMap does not include a `sourcesContent` field, so usually the remapped sourcemap + // would not include any `sourcesContent` values. + return transformedMap; + } + + console.assert(file === 'helloworld.js'); + // We can read the file to provide the source content. + ctx.content = fs.readFileSync(file, 'utf8'); + return null; + } +); + +console.log(remapped); +// { +// …, +// sourcesContent: [ +// 'console.log("Hello world!")', +// ], +// }; +``` + +### Options + +#### excludeContent + +By default, `excludeContent` is `false`. Passing `{ excludeContent: true }` will exclude the +`sourcesContent` field from the returned sourcemap. This is mainly useful when you want to reduce +the size out the sourcemap. + +#### decodedMappings + +By default, `decodedMappings` is `false`. Passing `{ decodedMappings: true }` will leave the +`mappings` field in a [decoded state](https://github.com/rich-harris/sourcemap-codec) instead of +encoding into a VLQ string. diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs b/node_modules/@ampproject/remapping/dist/remapping.mjs new file mode 100644 index 0000000..f387599 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs @@ -0,0 +1,197 @@ +import { decodedMappings, traceSegment, TraceMap } from '@jridgewell/trace-mapping'; +import { GenMapping, maybeAddSegment, setSourceContent, setIgnore, toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping'; + +const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); +const EMPTY_SOURCES = []; +function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; +} +function Source(map, sources, source, content, ignore) { + return { + map, + sources, + source, + content, + ignore, + }; +} +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +function MapSource(map, sources) { + return Source(map, sources, '', null, false); +} +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); +} +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source, ignore } = traced; + maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + setSourceContent(gen, source, content); + if (ignore) + setIgnore(gen, source, true); + } + } + return gen; +} +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content, source.ignore); + } + const segment = traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); +} + +function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; +} +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; +} +function build(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent, ignoreList } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + ignore: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source, content, ignore } = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build(new TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; + const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); + }); + return MapSource(map, children); +} + +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.ignoreList = out.ignoreList; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } +} + +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +function remapping(input, loader, options) { + const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); +} + +export { remapping as default }; +//# sourceMappingURL=remapping.mjs.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.mjs.map b/node_modules/@ampproject/remapping/dist/remapping.mjs.map new file mode 100644 index 0000000..0eb007b --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.mjs","sources":["../src/source-map-tree.ts","../src/build-source-map-tree.ts","../src/source-map.ts","../src/remapping.ts"],"sourcesContent":["import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from '@jridgewell/gen-mapping';\nimport { traceSegment, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport type { TraceMap } from '@jridgewell/trace-mapping';\n\nexport type SourceMapSegmentObject = {\n column: number;\n line: number;\n name: string;\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type OriginalSource = {\n map: null;\n sources: Sources[];\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type MapSource = {\n map: TraceMap;\n sources: Sources[];\n source: string;\n content: null;\n ignore: false;\n};\n\nexport type Sources = OriginalSource | MapSource;\n\nconst SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);\nconst EMPTY_SOURCES: Sources[] = [];\n\nfunction SegmentObject(\n source: string,\n line: number,\n column: number,\n name: string,\n content: string | null,\n ignore: boolean\n): SourceMapSegmentObject {\n return { source, line, column, name, content, ignore };\n}\n\nfunction Source(\n map: TraceMap,\n sources: Sources[],\n source: '',\n content: null,\n ignore: false\n): MapSource;\nfunction Source(\n map: null,\n sources: Sources[],\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource;\nfunction Source(\n map: TraceMap | null,\n sources: Sources[],\n source: string | '',\n content: string | null,\n ignore: boolean\n): Sources {\n return {\n map,\n sources,\n source,\n content,\n ignore,\n } as any;\n}\n\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nexport function MapSource(map: TraceMap, sources: Sources[]): MapSource {\n return Source(map, sources, '', null, false);\n}\n\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nexport function OriginalSource(\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource {\n return Source(null, EMPTY_SOURCES, source, content, ignore);\n}\n\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nexport function traceMappings(tree: MapSource): GenMapping {\n // TODO: Eventually support sourceRoot, which has to be removed because the sources are already\n // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING;\n\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(\n source,\n segment[2],\n segment[3],\n segment.length === 5 ? rootNames[segment[4]] : ''\n );\n\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null) continue;\n }\n\n const { column, line, name, content, source, ignore } = traced;\n\n maybeAddSegment(gen, i, genCol, source, line, column, name);\n if (source && content != null) setSourceContent(gen, source, content);\n if (ignore) setIgnore(gen, source, true);\n }\n }\n\n return gen;\n}\n\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nexport function originalPositionFor(\n source: Sources,\n line: number,\n column: number,\n name: string\n): SourceMapSegmentObject | null {\n if (!source.map) {\n return SegmentObject(source.source, line, column, name, source.content, source.ignore);\n }\n\n const segment = traceSegment(source.map, line, column);\n\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null) return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1) return SOURCELESS_MAPPING;\n\n return originalPositionFor(\n source.sources[segment[1]],\n segment[2],\n segment[3],\n segment.length === 5 ? source.map.names[segment[4]] : name\n );\n}\n","import { TraceMap } from '@jridgewell/trace-mapping';\n\nimport { OriginalSource, MapSource } from './source-map-tree';\n\nimport type { Sources, MapSource as MapSourceType } from './source-map-tree';\nimport type { SourceMapInput, SourceMapLoader, LoaderContext } from './types';\n\nfunction asArray(value: T | T[]): T[] {\n if (Array.isArray(value)) return value;\n return [value];\n}\n\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nexport default function buildSourceMapTree(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader\n): MapSourceType {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop()!;\n\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(\n `Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?'\n );\n }\n }\n\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\n\nfunction build(\n map: TraceMap,\n loader: SourceMapLoader,\n importer: string,\n importerDepth: number\n): MapSourceType {\n const { resolvedSources, sourcesContent, ignoreList } = map;\n\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx: LoaderContext = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n ignore: undefined,\n };\n\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n\n const { source, content, ignore } = ctx;\n\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);\n\n // Else, it's an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent =\n content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;\n return OriginalSource(source, sourceContent, ignored);\n });\n\n return MapSource(map, children);\n}\n","import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';\n\nimport type { GenMapping } from '@jridgewell/gen-mapping';\nimport type { DecodedSourceMap, EncodedSourceMap, Options } from './types';\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nexport default class SourceMap {\n declare file?: string | null;\n declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];\n declare sourceRoot?: string;\n declare names: string[];\n declare sources: (string | null)[];\n declare sourcesContent?: (string | null)[];\n declare version: 3;\n declare ignoreList: number[] | undefined;\n\n constructor(map: GenMapping, options: Options) {\n const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings as SourceMap['mappings'];\n this.names = out.names as SourceMap['names'];\n this.ignoreList = out.ignoreList as SourceMap['ignoreList'];\n this.sourceRoot = out.sourceRoot;\n\n this.sources = out.sources as SourceMap['sources'];\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent'];\n }\n }\n\n toString(): string {\n return JSON.stringify(this);\n }\n}\n","import buildSourceMapTree from './build-source-map-tree';\nimport { traceMappings } from './source-map-tree';\nimport SourceMap from './source-map';\n\nimport type { SourceMapInput, SourceMapLoader, Options } from './types';\nexport type {\n SourceMapSegment,\n EncodedSourceMap,\n EncodedSourceMap as RawSourceMap,\n DecodedSourceMap,\n SourceMapInput,\n SourceMapLoader,\n LoaderContext,\n Options,\n} from './types';\nexport type { SourceMap };\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nexport default function remapping(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader,\n options?: boolean | Options\n): SourceMap {\n const opts =\n typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n"],"names":[],"mappings":";;;AAgCA,MAAM,kBAAkB,mBAAmB,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACtF,MAAM,aAAa,GAAc,EAAE,CAAC;AAEpC,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,OAAsB,EACtB,MAAe,EAAA;AAEf,IAAA,OAA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F;IAED,QAAQ,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;AACF;;ACpBD;;;;;;;;;;;;;;AAcG;AACqB,SAAA,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B,EAAA;IAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;IAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;AAClD;;;;"} \ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js b/node_modules/@ampproject/remapping/dist/remapping.umd.js new file mode 100644 index 0000000..6b7b3bb --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js @@ -0,0 +1,202 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@jridgewell/trace-mapping'), require('@jridgewell/gen-mapping')) : + typeof define === 'function' && define.amd ? define(['@jridgewell/trace-mapping', '@jridgewell/gen-mapping'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.remapping = factory(global.traceMapping, global.genMapping)); +})(this, (function (traceMapping, genMapping) { 'use strict'; + + const SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false); + const EMPTY_SOURCES = []; + function SegmentObject(source, line, column, name, content, ignore) { + return { source, line, column, name, content, ignore }; + } + function Source(map, sources, source, content, ignore) { + return { + map, + sources, + source, + content, + ignore, + }; + } + /** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ + function MapSource(map, sources) { + return Source(map, sources, '', null, false); + } + /** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ + function OriginalSource(source, content, ignore) { + return Source(null, EMPTY_SOURCES, source, content, ignore); + } + /** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ + function traceMappings(tree) { + // TODO: Eventually support sourceRoot, which has to be removed because the sources are already + // fully resolved. We'll need to make sources relative to the sourceRoot before adding them. + const gen = new genMapping.GenMapping({ file: tree.map.file }); + const { sources: rootSources, map } = tree; + const rootNames = map.names; + const rootMappings = traceMapping.decodedMappings(map); + for (let i = 0; i < rootMappings.length; i++) { + const segments = rootMappings[i]; + for (let j = 0; j < segments.length; j++) { + const segment = segments[j]; + const genCol = segment[0]; + let traced = SOURCELESS_MAPPING; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length !== 1) { + const source = rootSources[segment[1]]; + traced = originalPositionFor(source, segment[2], segment[3], segment.length === 5 ? rootNames[segment[4]] : ''); + // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a + // respective segment into an original source. + if (traced == null) + continue; + } + const { column, line, name, content, source, ignore } = traced; + genMapping.maybeAddSegment(gen, i, genCol, source, line, column, name); + if (source && content != null) + genMapping.setSourceContent(gen, source, content); + if (ignore) + genMapping.setIgnore(gen, source, true); + } + } + return gen; + } + /** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ + function originalPositionFor(source, line, column, name) { + if (!source.map) { + return SegmentObject(source.source, line, column, name, source.content, source.ignore); + } + const segment = traceMapping.traceSegment(source.map, line, column); + // If we couldn't find a segment, then this doesn't exist in the sourcemap. + if (segment == null) + return null; + // 1-length segments only move the current generated column, there's no source information + // to gather from it. + if (segment.length === 1) + return SOURCELESS_MAPPING; + return originalPositionFor(source.sources[segment[1]], segment[2], segment[3], segment.length === 5 ? source.map.names[segment[4]] : name); + } + + function asArray(value) { + if (Array.isArray(value)) + return value; + return [value]; + } + /** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ + function buildSourceMapTree(input, loader) { + const maps = asArray(input).map((m) => new traceMapping.TraceMap(m, '')); + const map = maps.pop(); + for (let i = 0; i < maps.length; i++) { + if (maps[i].sources.length > 1) { + throw new Error(`Transformation map ${i} must have exactly one source file.\n` + + 'Did you specify these with the most recent transformation maps first?'); + } + } + let tree = build(map, loader, '', 0); + for (let i = maps.length - 1; i >= 0; i--) { + tree = MapSource(maps[i], [tree]); + } + return tree; + } + function build(map, loader, importer, importerDepth) { + const { resolvedSources, sourcesContent, ignoreList } = map; + const depth = importerDepth + 1; + const children = resolvedSources.map((sourceFile, i) => { + // The loading context gives the loader more information about why this file is being loaded + // (eg, from which importer). It also allows the loader to override the location of the loaded + // sourcemap/original source, or to override the content in the sourcesContent field if it's + // an unmodified source file. + const ctx = { + importer, + depth, + source: sourceFile || '', + content: undefined, + ignore: undefined, + }; + // Use the provided loader callback to retrieve the file's sourcemap. + // TODO: We should eventually support async loading of sourcemap files. + const sourceMap = loader(ctx.source, ctx); + const { source, content, ignore } = ctx; + // If there is a sourcemap, then we need to recurse into it to load its source files. + if (sourceMap) + return build(new traceMapping.TraceMap(sourceMap, source), loader, source, depth); + // Else, it's an unmodified source file. + // The contents of this unmodified source file can be overridden via the loader context, + // allowing it to be explicitly null or a string. If it remains undefined, we fall back to + // the importing sourcemap's `sourcesContent` field. + const sourceContent = content !== undefined ? content : sourcesContent ? sourcesContent[i] : null; + const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false; + return OriginalSource(source, sourceContent, ignored); + }); + return MapSource(map, children); + } + + /** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ + class SourceMap { + constructor(map, options) { + const out = options.decodedMappings ? genMapping.toDecodedMap(map) : genMapping.toEncodedMap(map); + this.version = out.version; // SourceMap spec says this should be first. + this.file = out.file; + this.mappings = out.mappings; + this.names = out.names; + this.ignoreList = out.ignoreList; + this.sourceRoot = out.sourceRoot; + this.sources = out.sources; + if (!options.excludeContent) { + this.sourcesContent = out.sourcesContent; + } + } + toString() { + return JSON.stringify(this); + } + } + + /** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ + function remapping(input, loader, options) { + const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false }; + const tree = buildSourceMapTree(input, loader); + return new SourceMap(traceMappings(tree), opts); + } + + return remapping; + +})); +//# sourceMappingURL=remapping.umd.js.map diff --git a/node_modules/@ampproject/remapping/dist/remapping.umd.js.map b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map new file mode 100644 index 0000000..d3f0f87 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/remapping.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"remapping.umd.js","sources":["../src/source-map-tree.ts","../src/build-source-map-tree.ts","../src/source-map.ts","../src/remapping.ts"],"sourcesContent":["import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from '@jridgewell/gen-mapping';\nimport { traceSegment, decodedMappings } from '@jridgewell/trace-mapping';\n\nimport type { TraceMap } from '@jridgewell/trace-mapping';\n\nexport type SourceMapSegmentObject = {\n column: number;\n line: number;\n name: string;\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type OriginalSource = {\n map: null;\n sources: Sources[];\n source: string;\n content: string | null;\n ignore: boolean;\n};\n\nexport type MapSource = {\n map: TraceMap;\n sources: Sources[];\n source: string;\n content: null;\n ignore: false;\n};\n\nexport type Sources = OriginalSource | MapSource;\n\nconst SOURCELESS_MAPPING = /* #__PURE__ */ SegmentObject('', -1, -1, '', null, false);\nconst EMPTY_SOURCES: Sources[] = [];\n\nfunction SegmentObject(\n source: string,\n line: number,\n column: number,\n name: string,\n content: string | null,\n ignore: boolean\n): SourceMapSegmentObject {\n return { source, line, column, name, content, ignore };\n}\n\nfunction Source(\n map: TraceMap,\n sources: Sources[],\n source: '',\n content: null,\n ignore: false\n): MapSource;\nfunction Source(\n map: null,\n sources: Sources[],\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource;\nfunction Source(\n map: TraceMap | null,\n sources: Sources[],\n source: string | '',\n content: string | null,\n ignore: boolean\n): Sources {\n return {\n map,\n sources,\n source,\n content,\n ignore,\n } as any;\n}\n\n/**\n * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes\n * (which may themselves be SourceMapTrees).\n */\nexport function MapSource(map: TraceMap, sources: Sources[]): MapSource {\n return Source(map, sources, '', null, false);\n}\n\n/**\n * A \"leaf\" node in the sourcemap tree, representing an original, unmodified source file. Recursive\n * segment tracing ends at the `OriginalSource`.\n */\nexport function OriginalSource(\n source: string,\n content: string | null,\n ignore: boolean\n): OriginalSource {\n return Source(null, EMPTY_SOURCES, source, content, ignore);\n}\n\n/**\n * traceMappings is only called on the root level SourceMapTree, and begins the process of\n * resolving each mapping in terms of the original source files.\n */\nexport function traceMappings(tree: MapSource): GenMapping {\n // TODO: Eventually support sourceRoot, which has to be removed because the sources are already\n // fully resolved. We'll need to make sources relative to the sourceRoot before adding them.\n const gen = new GenMapping({ file: tree.map.file });\n const { sources: rootSources, map } = tree;\n const rootNames = map.names;\n const rootMappings = decodedMappings(map);\n\n for (let i = 0; i < rootMappings.length; i++) {\n const segments = rootMappings[i];\n\n for (let j = 0; j < segments.length; j++) {\n const segment = segments[j];\n const genCol = segment[0];\n let traced: SourceMapSegmentObject | null = SOURCELESS_MAPPING;\n\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length !== 1) {\n const source = rootSources[segment[1]];\n traced = originalPositionFor(\n source,\n segment[2],\n segment[3],\n segment.length === 5 ? rootNames[segment[4]] : ''\n );\n\n // If the trace is invalid, then the trace ran into a sourcemap that doesn't contain a\n // respective segment into an original source.\n if (traced == null) continue;\n }\n\n const { column, line, name, content, source, ignore } = traced;\n\n maybeAddSegment(gen, i, genCol, source, line, column, name);\n if (source && content != null) setSourceContent(gen, source, content);\n if (ignore) setIgnore(gen, source, true);\n }\n }\n\n return gen;\n}\n\n/**\n * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own\n * child SourceMapTrees, until we find the original source map.\n */\nexport function originalPositionFor(\n source: Sources,\n line: number,\n column: number,\n name: string\n): SourceMapSegmentObject | null {\n if (!source.map) {\n return SegmentObject(source.source, line, column, name, source.content, source.ignore);\n }\n\n const segment = traceSegment(source.map, line, column);\n\n // If we couldn't find a segment, then this doesn't exist in the sourcemap.\n if (segment == null) return null;\n // 1-length segments only move the current generated column, there's no source information\n // to gather from it.\n if (segment.length === 1) return SOURCELESS_MAPPING;\n\n return originalPositionFor(\n source.sources[segment[1]],\n segment[2],\n segment[3],\n segment.length === 5 ? source.map.names[segment[4]] : name\n );\n}\n","import { TraceMap } from '@jridgewell/trace-mapping';\n\nimport { OriginalSource, MapSource } from './source-map-tree';\n\nimport type { Sources, MapSource as MapSourceType } from './source-map-tree';\nimport type { SourceMapInput, SourceMapLoader, LoaderContext } from './types';\n\nfunction asArray(value: T | T[]): T[] {\n if (Array.isArray(value)) return value;\n return [value];\n}\n\n/**\n * Recursively builds a tree structure out of sourcemap files, with each node\n * being either an `OriginalSource` \"leaf\" or a `SourceMapTree` composed of\n * `OriginalSource`s and `SourceMapTree`s.\n *\n * Every sourcemap is composed of a collection of source files and mappings\n * into locations of those source files. When we generate a `SourceMapTree` for\n * the sourcemap, we attempt to load each source file's own sourcemap. If it\n * does not have an associated sourcemap, it is considered an original,\n * unmodified source file.\n */\nexport default function buildSourceMapTree(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader\n): MapSourceType {\n const maps = asArray(input).map((m) => new TraceMap(m, ''));\n const map = maps.pop()!;\n\n for (let i = 0; i < maps.length; i++) {\n if (maps[i].sources.length > 1) {\n throw new Error(\n `Transformation map ${i} must have exactly one source file.\\n` +\n 'Did you specify these with the most recent transformation maps first?'\n );\n }\n }\n\n let tree = build(map, loader, '', 0);\n for (let i = maps.length - 1; i >= 0; i--) {\n tree = MapSource(maps[i], [tree]);\n }\n return tree;\n}\n\nfunction build(\n map: TraceMap,\n loader: SourceMapLoader,\n importer: string,\n importerDepth: number\n): MapSourceType {\n const { resolvedSources, sourcesContent, ignoreList } = map;\n\n const depth = importerDepth + 1;\n const children = resolvedSources.map((sourceFile: string | null, i: number): Sources => {\n // The loading context gives the loader more information about why this file is being loaded\n // (eg, from which importer). It also allows the loader to override the location of the loaded\n // sourcemap/original source, or to override the content in the sourcesContent field if it's\n // an unmodified source file.\n const ctx: LoaderContext = {\n importer,\n depth,\n source: sourceFile || '',\n content: undefined,\n ignore: undefined,\n };\n\n // Use the provided loader callback to retrieve the file's sourcemap.\n // TODO: We should eventually support async loading of sourcemap files.\n const sourceMap = loader(ctx.source, ctx);\n\n const { source, content, ignore } = ctx;\n\n // If there is a sourcemap, then we need to recurse into it to load its source files.\n if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);\n\n // Else, it's an unmodified source file.\n // The contents of this unmodified source file can be overridden via the loader context,\n // allowing it to be explicitly null or a string. If it remains undefined, we fall back to\n // the importing sourcemap's `sourcesContent` field.\n const sourceContent =\n content !== undefined ? content : sourcesContent ? sourcesContent[i] : null;\n const ignored = ignore !== undefined ? ignore : ignoreList ? ignoreList.includes(i) : false;\n return OriginalSource(source, sourceContent, ignored);\n });\n\n return MapSource(map, children);\n}\n","import { toDecodedMap, toEncodedMap } from '@jridgewell/gen-mapping';\n\nimport type { GenMapping } from '@jridgewell/gen-mapping';\nimport type { DecodedSourceMap, EncodedSourceMap, Options } from './types';\n\n/**\n * A SourceMap v3 compatible sourcemap, which only includes fields that were\n * provided to it.\n */\nexport default class SourceMap {\n declare file?: string | null;\n declare mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings'];\n declare sourceRoot?: string;\n declare names: string[];\n declare sources: (string | null)[];\n declare sourcesContent?: (string | null)[];\n declare version: 3;\n declare ignoreList: number[] | undefined;\n\n constructor(map: GenMapping, options: Options) {\n const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);\n this.version = out.version; // SourceMap spec says this should be first.\n this.file = out.file;\n this.mappings = out.mappings as SourceMap['mappings'];\n this.names = out.names as SourceMap['names'];\n this.ignoreList = out.ignoreList as SourceMap['ignoreList'];\n this.sourceRoot = out.sourceRoot;\n\n this.sources = out.sources as SourceMap['sources'];\n if (!options.excludeContent) {\n this.sourcesContent = out.sourcesContent as SourceMap['sourcesContent'];\n }\n }\n\n toString(): string {\n return JSON.stringify(this);\n }\n}\n","import buildSourceMapTree from './build-source-map-tree';\nimport { traceMappings } from './source-map-tree';\nimport SourceMap from './source-map';\n\nimport type { SourceMapInput, SourceMapLoader, Options } from './types';\nexport type {\n SourceMapSegment,\n EncodedSourceMap,\n EncodedSourceMap as RawSourceMap,\n DecodedSourceMap,\n SourceMapInput,\n SourceMapLoader,\n LoaderContext,\n Options,\n} from './types';\nexport type { SourceMap };\n\n/**\n * Traces through all the mappings in the root sourcemap, through the sources\n * (and their sourcemaps), all the way back to the original source location.\n *\n * `loader` will be called every time we encounter a source file. If it returns\n * a sourcemap, we will recurse into that sourcemap to continue the trace. If\n * it returns a falsey value, that source file is treated as an original,\n * unmodified source file.\n *\n * Pass `excludeContent` to exclude any self-containing source file content\n * from the output sourcemap.\n *\n * Pass `decodedMappings` to receive a SourceMap with decoded (instead of\n * VLQ encoded) mappings.\n */\nexport default function remapping(\n input: SourceMapInput | SourceMapInput[],\n loader: SourceMapLoader,\n options?: boolean | Options\n): SourceMap {\n const opts =\n typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}\n"],"names":["GenMapping","decodedMappings","maybeAddSegment","setSourceContent","setIgnore","traceSegment","TraceMap","toDecodedMap","toEncodedMap"],"mappings":";;;;;;IAgCA,MAAM,kBAAkB,mBAAmB,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACtF,MAAM,aAAa,GAAc,EAAE,CAAC;IAEpC,SAAS,aAAa,CACpB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,OAAsB,EACtB,MAAe,EAAA;IAEf,IAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IACzD,CAAC;IAgBD,SAAS,MAAM,CACb,GAAoB,EACpB,OAAkB,EAClB,MAAmB,EACnB,OAAsB,EACtB,MAAe,EAAA;QAEf,OAAO;YACL,GAAG;YACH,OAAO;YACP,MAAM;YACN,OAAO;YACP,MAAM;SACA,CAAC;IACX,CAAC;IAED;;;IAGG;IACa,SAAA,SAAS,CAAC,GAAa,EAAE,OAAkB,EAAA;IACzD,IAAA,OAAO,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED;;;IAGG;aACa,cAAc,CAC5B,MAAc,EACd,OAAsB,EACtB,MAAe,EAAA;IAEf,IAAA,OAAO,MAAM,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED;;;IAGG;IACG,SAAU,aAAa,CAAC,IAAe,EAAA;;;IAG3C,IAAA,MAAM,GAAG,GAAG,IAAIA,qBAAU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I,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC3B,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACrB,QAAA,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAiC,CAAC;IACtD,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAA2B,CAAC;IAC7C,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAqC,CAAC;IAC5D,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC;IAEjC,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAA+B,CAAC;IACnD,QAAA,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE;IAC3B,YAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAA6C,CAAC;IACzE,SAAA;SACF;QAED,QAAQ,GAAA;IACN,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SAC7B;IACF;;ICpBD;;;;;;;;;;;;;;IAcG;IACqB,SAAA,SAAS,CAC/B,KAAwC,EACxC,MAAuB,EACvB,OAA2B,EAAA;QAE3B,MAAM,IAAI,GACR,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;QAChG,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC/C,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAClD;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts new file mode 100644 index 0000000..f87fcea --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/build-source-map-tree.d.ts @@ -0,0 +1,14 @@ +import type { MapSource as MapSourceType } from './source-map-tree'; +import type { SourceMapInput, SourceMapLoader } from './types'; +/** + * Recursively builds a tree structure out of sourcemap files, with each node + * being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of + * `OriginalSource`s and `SourceMapTree`s. + * + * Every sourcemap is composed of a collection of source files and mappings + * into locations of those source files. When we generate a `SourceMapTree` for + * the sourcemap, we attempt to load each source file's own sourcemap. If it + * does not have an associated sourcemap, it is considered an original, + * unmodified source file. + */ +export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType; diff --git a/node_modules/@ampproject/remapping/dist/types/remapping.d.ts b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts new file mode 100644 index 0000000..771fe30 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/remapping.d.ts @@ -0,0 +1,20 @@ +import SourceMap from './source-map'; +import type { SourceMapInput, SourceMapLoader, Options } from './types'; +export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types'; +export type { SourceMap }; +/** + * Traces through all the mappings in the root sourcemap, through the sources + * (and their sourcemaps), all the way back to the original source location. + * + * `loader` will be called every time we encounter a source file. If it returns + * a sourcemap, we will recurse into that sourcemap to continue the trace. If + * it returns a falsey value, that source file is treated as an original, + * unmodified source file. + * + * Pass `excludeContent` to exclude any self-containing source file content + * from the output sourcemap. + * + * Pass `decodedMappings` to receive a SourceMap with decoded (instead of + * VLQ encoded) mappings. + */ +export default function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts new file mode 100644 index 0000000..935bc69 --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map-tree.d.ts @@ -0,0 +1,45 @@ +import { GenMapping } from '@jridgewell/gen-mapping'; +import type { TraceMap } from '@jridgewell/trace-mapping'; +export declare type SourceMapSegmentObject = { + column: number; + line: number; + name: string; + source: string; + content: string | null; + ignore: boolean; +}; +export declare type OriginalSource = { + map: null; + sources: Sources[]; + source: string; + content: string | null; + ignore: boolean; +}; +export declare type MapSource = { + map: TraceMap; + sources: Sources[]; + source: string; + content: null; + ignore: false; +}; +export declare type Sources = OriginalSource | MapSource; +/** + * MapSource represents a single sourcemap, with the ability to trace mappings into its child nodes + * (which may themselves be SourceMapTrees). + */ +export declare function MapSource(map: TraceMap, sources: Sources[]): MapSource; +/** + * A "leaf" node in the sourcemap tree, representing an original, unmodified source file. Recursive + * segment tracing ends at the `OriginalSource`. + */ +export declare function OriginalSource(source: string, content: string | null, ignore: boolean): OriginalSource; +/** + * traceMappings is only called on the root level SourceMapTree, and begins the process of + * resolving each mapping in terms of the original source files. + */ +export declare function traceMappings(tree: MapSource): GenMapping; +/** + * originalPositionFor is only called on children SourceMapTrees. It recurses down into its own + * child SourceMapTrees, until we find the original source map. + */ +export declare function originalPositionFor(source: Sources, line: number, column: number, name: string): SourceMapSegmentObject | null; diff --git a/node_modules/@ampproject/remapping/dist/types/source-map.d.ts b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts new file mode 100644 index 0000000..cbd7f0a --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/source-map.d.ts @@ -0,0 +1,18 @@ +import type { GenMapping } from '@jridgewell/gen-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Options } from './types'; +/** + * A SourceMap v3 compatible sourcemap, which only includes fields that were + * provided to it. + */ +export default class SourceMap { + file?: string | null; + mappings: EncodedSourceMap['mappings'] | DecodedSourceMap['mappings']; + sourceRoot?: string; + names: string[]; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList: number[] | undefined; + constructor(map: GenMapping, options: Options); + toString(): string; +} diff --git a/node_modules/@ampproject/remapping/dist/types/types.d.ts b/node_modules/@ampproject/remapping/dist/types/types.d.ts new file mode 100644 index 0000000..4d78c4b --- /dev/null +++ b/node_modules/@ampproject/remapping/dist/types/types.d.ts @@ -0,0 +1,15 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +export type { SourceMapSegment, DecodedSourceMap, EncodedSourceMap, } from '@jridgewell/trace-mapping'; +export type { SourceMapInput }; +export declare type LoaderContext = { + readonly importer: string; + readonly depth: number; + source: string; + content: string | null | undefined; + ignore: boolean | undefined; +}; +export declare type SourceMapLoader = (file: string, ctx: LoaderContext) => SourceMapInput | null | undefined | void; +export declare type Options = { + excludeContent?: boolean; + decodedMappings?: boolean; +}; diff --git a/node_modules/@ampproject/remapping/package.json b/node_modules/@ampproject/remapping/package.json new file mode 100644 index 0000000..091224c --- /dev/null +++ b/node_modules/@ampproject/remapping/package.json @@ -0,0 +1,75 @@ +{ + "name": "@ampproject/remapping", + "version": "2.3.0", + "description": "Remap sequential sourcemaps through transformations to point at the original source code", + "keywords": [ + "source", + "map", + "remap" + ], + "main": "dist/remapping.umd.js", + "module": "dist/remapping.mjs", + "types": "dist/types/remapping.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/remapping.d.ts", + "browser": "./dist/remapping.umd.js", + "require": "./dist/remapping.umd.js", + "import": "./dist/remapping.mjs" + }, + "./dist/remapping.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "author": "Justin Ridgewell ", + "repository": { + "type": "git", + "url": "git+https://github.com/ampproject/remapping.git" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "test": "run-s -n test:lint test:only", + "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "jest --coverage", + "test:watch": "jest --coverage --watch" + }, + "devDependencies": { + "@rollup/plugin-typescript": "8.3.2", + "@types/jest": "27.4.1", + "@typescript-eslint/eslint-plugin": "5.20.0", + "@typescript-eslint/parser": "5.20.0", + "eslint": "8.14.0", + "eslint-config-prettier": "8.5.0", + "jest": "27.5.1", + "jest-config": "27.5.1", + "npm-run-all": "4.1.5", + "prettier": "2.6.2", + "rollup": "2.70.2", + "ts-jest": "27.1.4", + "tslib": "2.4.0", + "typescript": "4.6.3" + }, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } +} diff --git a/node_modules/@isaacs/fs-minipass/LICENSE b/node_modules/@isaacs/fs-minipass/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@isaacs/fs-minipass/README.md b/node_modules/@isaacs/fs-minipass/README.md new file mode 100644 index 0000000..dac96e7 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/README.md @@ -0,0 +1,71 @@ +# fs-minipass + +Filesystem streams based on [minipass](http://npm.im/minipass). + +4 classes are exported: + +- ReadStream +- ReadStreamSync +- WriteStream +- WriteStreamSync + +When using `ReadStreamSync`, all of the data is made available +immediately upon consuming the stream. Nothing is buffered in memory +when the stream is constructed. If the stream is piped to a writer, +then it will synchronously `read()` and emit data into the writer as +fast as the writer can consume it. (That is, it will respect +backpressure.) If you call `stream.read()` then it will read the +entire file and return the contents. + +When using `WriteStreamSync`, every write is flushed to the file +synchronously. If your writes all come in a single tick, then it'll +write it all out in a single tick. It's as synchronous as you are. + +The async versions work much like their node builtin counterparts, +with the exception of introducing significantly less Stream machinery +overhead. + +## USAGE + +It's just streams, you pipe them or read() them or write() to them. + +```js +import { ReadStream, WriteStream } from 'fs-minipass' +// or: const { ReadStream, WriteStream } = require('fs-minipass') +const readStream = new ReadStream('file.txt') +const writeStream = new WriteStream('output.txt') +writeStream.write('some file header or whatever\n') +readStream.pipe(writeStream) +``` + +## ReadStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `readSize` The size of reads to do, defaults to 16MB +- `size` The size of the file, if known. Prevents zero-byte read() + call at the end. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the file is done being read. + +## WriteStream(path, options) + +Path string is required, but somewhat irrelevant if an open file +descriptor is passed in as an option. + +Options: + +- `fd` Pass in a numeric file descriptor, if the file is already open. +- `mode` The mode to create the file with. Defaults to `0o666`. +- `start` The position in the file to start reading. If not + specified, then the file will start writing at position zero, and be + truncated by default. +- `autoClose` Set to `false` to prevent the file descriptor from being + closed when the stream is ended. +- `flags` Flags to use when opening the file. Irrelevant if `fd` is + passed in, since file won't be opened in that case. Defaults to + `'a'` if a `pos` is specified, or `'w'` otherwise. diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts new file mode 100644 index 0000000..38e8ccd --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts @@ -0,0 +1,118 @@ +/// +/// +/// +import EE from 'events'; +import { Minipass } from 'minipass'; +declare const _autoClose: unique symbol; +declare const _close: unique symbol; +declare const _ended: unique symbol; +declare const _fd: unique symbol; +declare const _finished: unique symbol; +declare const _flags: unique symbol; +declare const _flush: unique symbol; +declare const _handleChunk: unique symbol; +declare const _makeBuf: unique symbol; +declare const _mode: unique symbol; +declare const _needDrain: unique symbol; +declare const _onerror: unique symbol; +declare const _onopen: unique symbol; +declare const _onread: unique symbol; +declare const _onwrite: unique symbol; +declare const _open: unique symbol; +declare const _path: unique symbol; +declare const _pos: unique symbol; +declare const _queue: unique symbol; +declare const _read: unique symbol; +declare const _readSize: unique symbol; +declare const _reading: unique symbol; +declare const _remain: unique symbol; +declare const _size: unique symbol; +declare const _write: unique symbol; +declare const _writing: unique symbol; +declare const _defaultFlag: unique symbol; +declare const _errored: unique symbol; +export type ReadStreamOptions = Minipass.Options & { + fd?: number; + readSize?: number; + size?: number; + autoClose?: boolean; +}; +export type ReadStreamEvents = Minipass.Events & { + open: [fd: number]; +}; +export declare class ReadStream extends Minipass { + [_errored]: boolean; + [_fd]?: number; + [_path]: string; + [_readSize]: number; + [_reading]: boolean; + [_size]: number; + [_remain]: number; + [_autoClose]: boolean; + constructor(path: string, opt: ReadStreamOptions); + get fd(): number | undefined; + get path(): string; + write(): void; + end(): void; + [_open](): void; + [_onopen](er?: NodeJS.ErrnoException | null, fd?: number): void; + [_makeBuf](): Buffer; + [_read](): void; + [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer): void; + [_close](): void; + [_onerror](er: NodeJS.ErrnoException): void; + [_handleChunk](br: number, buf: Buffer): boolean; + emit(ev: Event, ...args: ReadStreamEvents[Event]): boolean; +} +export declare class ReadStreamSync extends ReadStream { + [_open](): void; + [_read](): void; + [_close](): void; +} +export type WriteStreamOptions = { + fd?: number; + autoClose?: boolean; + mode?: number; + captureRejections?: boolean; + start?: number; + flags?: string; +}; +export declare class WriteStream extends EE { + readable: false; + writable: boolean; + [_errored]: boolean; + [_writing]: boolean; + [_ended]: boolean; + [_queue]: Buffer[]; + [_needDrain]: boolean; + [_path]: string; + [_mode]: number; + [_autoClose]: boolean; + [_fd]?: number; + [_defaultFlag]: boolean; + [_flags]: string; + [_finished]: boolean; + [_pos]?: number; + constructor(path: string, opt: WriteStreamOptions); + emit(ev: string, ...args: any[]): boolean; + get fd(): number | undefined; + get path(): string; + [_onerror](er: NodeJS.ErrnoException): void; + [_open](): void; + [_onopen](er?: null | NodeJS.ErrnoException, fd?: number): void; + end(buf: string, enc?: BufferEncoding): this; + end(buf?: Buffer, enc?: undefined): this; + write(buf: string, enc?: BufferEncoding): boolean; + write(buf: Buffer, enc?: undefined): boolean; + [_write](buf: Buffer): void; + [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number): void; + [_flush](): void; + [_close](): void; +} +export declare class WriteStreamSync extends WriteStream { + [_open](): void; + [_close](): void; + [_write](buf: Buffer): void; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..3e2c703 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC,QAAA,MAAM,UAAU,eAAuB,CAAA;AACvC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,GAAG,eAAgB,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EL;IAED,IAAI,IAAI,WAEP;IAED,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,cAAc;IAMpC,CAAC,KAAK,CAAC;IAMP,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAoBxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,IAAI;IAC5C,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI;IAoBxC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,OAAO;IACjD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO;IAsB5C,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;IAWpB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAwBzD,CAAC,MAAM,CAAC;IAgBR,CAAC,MAAM,CAAC;CAST;AAED,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,CAAC,KAAK,CAAC,IAAI,IAAI;IAsBf,CAAC,MAAM,CAAC;IASR,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;CAmBrB"} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js new file mode 100644 index 0000000..2b3178c --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js @@ -0,0 +1,430 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteStreamSync = exports.WriteStream = exports.ReadStreamSync = exports.ReadStream = void 0; +const events_1 = __importDefault(require("events")); +const fs_1 = __importDefault(require("fs")); +const minipass_1 = require("minipass"); +const writev = fs_1.default.writev; +const _autoClose = Symbol('_autoClose'); +const _close = Symbol('_close'); +const _ended = Symbol('_ended'); +const _fd = Symbol('_fd'); +const _finished = Symbol('_finished'); +const _flags = Symbol('_flags'); +const _flush = Symbol('_flush'); +const _handleChunk = Symbol('_handleChunk'); +const _makeBuf = Symbol('_makeBuf'); +const _mode = Symbol('_mode'); +const _needDrain = Symbol('_needDrain'); +const _onerror = Symbol('_onerror'); +const _onopen = Symbol('_onopen'); +const _onread = Symbol('_onread'); +const _onwrite = Symbol('_onwrite'); +const _open = Symbol('_open'); +const _path = Symbol('_path'); +const _pos = Symbol('_pos'); +const _queue = Symbol('_queue'); +const _read = Symbol('_read'); +const _readSize = Symbol('_readSize'); +const _reading = Symbol('_reading'); +const _remain = Symbol('_remain'); +const _size = Symbol('_size'); +const _write = Symbol('_write'); +const _writing = Symbol('_writing'); +const _defaultFlag = Symbol('_defaultFlag'); +const _errored = Symbol('_errored'); +class ReadStream extends minipass_1.Minipass { + [_errored] = false; + [_fd]; + [_path]; + [_readSize]; + [_reading] = false; + [_size]; + [_remain]; + [_autoClose]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this.readable = true; + this.writable = false; + if (typeof path !== 'string') { + throw new TypeError('path must be a string'); + } + this[_errored] = false; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_path] = path; + this[_readSize] = opt.readSize || 16 * 1024 * 1024; + this[_reading] = false; + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity; + this[_remain] = this[_size]; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + if (typeof this[_fd] === 'number') { + this[_read](); + } + else { + this[_open](); + } + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + //@ts-ignore + write() { + throw new TypeError('this is a readable stream'); + } + //@ts-ignore + end() { + throw new TypeError('this is a readable stream'); + } + [_open]() { + fs_1.default.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + this[_read](); + } + } + [_makeBuf]() { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])); + } + [_read]() { + if (!this[_reading]) { + this[_reading] = true; + const buf = this[_makeBuf](); + /* c8 ignore start */ + if (buf.length === 0) { + return process.nextTick(() => this[_onread](null, 0, buf)); + } + /* c8 ignore stop */ + fs_1.default.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); + } + } + [_onread](er, br, buf) { + this[_reading] = false; + if (er) { + this[_onerror](er); + } + else if (this[_handleChunk](br, buf)) { + this[_read](); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } + [_onerror](er) { + this[_reading] = true; + this[_close](); + this.emit('error', er); + } + [_handleChunk](br, buf) { + let ret = false; + // no effect if infinite + this[_remain] -= br; + if (br > 0) { + ret = super.write(br < buf.length ? buf.subarray(0, br) : buf); + } + if (br === 0 || this[_remain] <= 0) { + ret = false; + this[_close](); + super.end(); + } + return ret; + } + emit(ev, ...args) { + switch (ev) { + case 'prefinish': + case 'finish': + return false; + case 'drain': + if (typeof this[_fd] === 'number') { + this[_read](); + } + return false; + case 'error': + if (this[_errored]) { + return false; + } + this[_errored] = true; + return super.emit(ev, ...args); + default: + return super.emit(ev, ...args); + } + } +} +exports.ReadStream = ReadStream; +class ReadStreamSync extends ReadStream { + [_open]() { + let threw = true; + try { + this[_onopen](null, fs_1.default.openSync(this[_path], 'r')); + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_read]() { + let threw = true; + try { + if (!this[_reading]) { + this[_reading] = true; + do { + const buf = this[_makeBuf](); + /* c8 ignore start */ + const br = buf.length === 0 + ? 0 + : fs_1.default.readSync(this[_fd], buf, 0, buf.length, null); + /* c8 ignore stop */ + if (!this[_handleChunk](br, buf)) { + break; + } + } while (true); + this[_reading] = false; + } + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.closeSync(fd); + this.emit('close'); + } + } +} +exports.ReadStreamSync = ReadStreamSync; +class WriteStream extends events_1.default { + readable = false; + writable = true; + [_errored] = false; + [_writing] = false; + [_ended] = false; + [_queue] = []; + [_needDrain] = false; + [_path]; + [_mode]; + [_autoClose]; + [_fd]; + [_defaultFlag]; + [_flags]; + [_finished] = false; + [_pos]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this[_path] = path; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode; + this[_pos] = typeof opt.start === 'number' ? opt.start : undefined; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'; + this[_defaultFlag] = opt.flags === undefined; + this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags; + if (this[_fd] === undefined) { + this[_open](); + } + } + emit(ev, ...args) { + if (ev === 'error') { + if (this[_errored]) { + return false; + } + this[_errored] = true; + } + return super.emit(ev, ...args); + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + [_onerror](er) { + this[_close](); + this[_writing] = true; + this.emit('error', er); + } + [_open]() { + fs_1.default.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && + er.code === 'ENOENT') { + this[_flags] = 'w'; + this[_open](); + } + else if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + if (!this[_writing]) { + this[_flush](); + } + } + } + end(buf, enc) { + if (buf) { + //@ts-ignore + this.write(buf, enc); + } + this[_ended] = true; + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && + !this[_queue].length && + typeof this[_fd] === 'number') { + this[_onwrite](null, 0); + } + return this; + } + write(buf, enc) { + if (typeof buf === 'string') { + buf = Buffer.from(buf, enc); + } + if (this[_ended]) { + this.emit('error', new Error('write() after end()')); + return false; + } + if (this[_fd] === undefined || this[_writing] || this[_queue].length) { + this[_queue].push(buf); + this[_needDrain] = true; + return false; + } + this[_writing] = true; + this[_write](buf); + return true; + } + [_write](buf) { + fs_1.default.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + [_onwrite](er, bw) { + if (er) { + this[_onerror](er); + } + else { + if (this[_pos] !== undefined && typeof bw === 'number') { + this[_pos] += bw; + } + if (this[_queue].length) { + this[_flush](); + } + else { + this[_writing] = false; + if (this[_ended] && !this[_finished]) { + this[_finished] = true; + this[_close](); + this.emit('finish'); + } + else if (this[_needDrain]) { + this[_needDrain] = false; + this.emit('drain'); + } + } + } + } + [_flush]() { + if (this[_queue].length === 0) { + if (this[_ended]) { + this[_onwrite](null, 0); + } + } + else if (this[_queue].length === 1) { + this[_write](this[_queue].pop()); + } + else { + const iovec = this[_queue]; + this[_queue] = []; + writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } +} +exports.WriteStream = WriteStream; +class WriteStreamSync extends WriteStream { + [_open]() { + let fd; + // only wrap in a try{} block if we know we'll retry, to avoid + // the rethrow obscuring the error's source frame in most cases. + if (this[_defaultFlag] && this[_flags] === 'r+') { + try { + fd = fs_1.default.openSync(this[_path], this[_flags], this[_mode]); + } + catch (er) { + if (er?.code === 'ENOENT') { + this[_flags] = 'w'; + return this[_open](); + } + else { + throw er; + } + } + } + else { + fd = fs_1.default.openSync(this[_path], this[_flags], this[_mode]); + } + this[_onopen](null, fd); + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs_1.default.closeSync(fd); + this.emit('close'); + } + } + [_write](buf) { + // throw the original, but try to close if it fails + let threw = true; + try { + this[_onwrite](null, fs_1.default.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); + threw = false; + } + finally { + if (threw) { + try { + this[_close](); + } + catch { + // ok error + } + } + } + } +} +exports.WriteStreamSync = WriteStreamSync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map new file mode 100644 index 0000000..caee495 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,4CAAmB;AACnB,uCAAmC;AAEnC,MAAM,MAAM,GAAG,YAAE,CAAC,MAAM,CAAA;AAExB,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;AACzB,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AACnC,MAAM,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QACN,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;YACtD,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;YACpB,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAA;YACrB,YAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YAChB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACpB,CAAC;IACH,CAAC;IAED,CAAC,MAAM,CAAC,CAAC,GAAW;QAClB,mDAAmD;QACnD,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,CACZ,IAAI,EACJ,YAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAClE,CAAA;YACD,KAAK,GAAG,KAAK,CAAA;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC;oBACH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACP,WAAW;gBACb,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAnDD,0CAmDC","sourcesContent":["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n default:\n return super.emit(ev, ...args)\n }\n }\n}\n\nexport class ReadStreamSync extends ReadStream {\n [_open]() {\n let threw = true\n try {\n this[_onopen](null, fs.openSync(this[_path], 'r'))\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_read]() {\n let threw = true\n try {\n if (!this[_reading]) {\n this[_reading] = true\n do {\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n const br =\n buf.length === 0\n ? 0\n : fs.readSync(this[_fd] as number, buf, 0, buf.length, null)\n /* c8 ignore stop */\n if (!this[_handleChunk](br, buf)) {\n break\n }\n } while (true)\n this[_reading] = false\n }\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n}\n\nexport type WriteStreamOptions = {\n fd?: number\n autoClose?: boolean\n mode?: number\n captureRejections?: boolean\n start?: number\n flags?: string\n}\n\nexport class WriteStream extends EE {\n readable: false = false\n writable: boolean = true;\n [_errored]: boolean = false;\n [_writing]: boolean = false;\n [_ended]: boolean = false;\n [_queue]: Buffer[] = [];\n [_needDrain]: boolean = false;\n [_path]: string;\n [_mode]: number;\n [_autoClose]: boolean;\n [_fd]?: number;\n [_defaultFlag]: boolean;\n [_flags]: string;\n [_finished]: boolean = false;\n [_pos]?: number\n\n constructor(path: string, opt: WriteStreamOptions) {\n opt = opt || {}\n super(opt)\n this[_path] = path\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_mode] = opt.mode === undefined ? 0o666 : opt.mode\n this[_pos] = typeof opt.start === 'number' ? opt.start : undefined\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n // truncating makes no sense when writing into the middle\n const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'\n this[_defaultFlag] = opt.flags === undefined\n this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags\n\n if (this[_fd] === undefined) {\n this[_open]()\n }\n }\n\n emit(ev: string, ...args: any[]) {\n if (ev === 'error') {\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n }\n return super.emit(ev, ...args)\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_close]()\n this[_writing] = true\n this.emit('error', er)\n }\n\n [_open]() {\n fs.open(this[_path], this[_flags], this[_mode], (er, fd) =>\n this[_onopen](er, fd),\n )\n }\n\n [_onopen](er?: null | NodeJS.ErrnoException, fd?: number) {\n if (\n this[_defaultFlag] &&\n this[_flags] === 'r+' &&\n er &&\n er.code === 'ENOENT'\n ) {\n this[_flags] = 'w'\n this[_open]()\n } else if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd)\n if (!this[_writing]) {\n this[_flush]()\n }\n }\n }\n\n end(buf: string, enc?: BufferEncoding): this\n end(buf?: Buffer, enc?: undefined): this\n end(buf?: Buffer | string, enc?: BufferEncoding): this {\n if (buf) {\n //@ts-ignore\n this.write(buf, enc)\n }\n\n this[_ended] = true\n\n // synthetic after-write logic, where drain/finish live\n if (\n !this[_writing] &&\n !this[_queue].length &&\n typeof this[_fd] === 'number'\n ) {\n this[_onwrite](null, 0)\n }\n return this\n }\n\n write(buf: string, enc?: BufferEncoding): boolean\n write(buf: Buffer, enc?: undefined): boolean\n write(buf: Buffer | string, enc?: BufferEncoding): boolean {\n if (typeof buf === 'string') {\n buf = Buffer.from(buf, enc)\n }\n\n if (this[_ended]) {\n this.emit('error', new Error('write() after end()'))\n return false\n }\n\n if (this[_fd] === undefined || this[_writing] || this[_queue].length) {\n this[_queue].push(buf)\n this[_needDrain] = true\n return false\n }\n\n this[_writing] = true\n this[_write](buf)\n return true\n }\n\n [_write](buf: Buffer) {\n fs.write(\n this[_fd] as number,\n buf,\n 0,\n buf.length,\n this[_pos],\n (er, bw) => this[_onwrite](er, bw),\n )\n }\n\n [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n if (this[_pos] !== undefined && typeof bw === 'number') {\n this[_pos] += bw\n }\n if (this[_queue].length) {\n this[_flush]()\n } else {\n this[_writing] = false\n\n if (this[_ended] && !this[_finished]) {\n this[_finished] = true\n this[_close]()\n this.emit('finish')\n } else if (this[_needDrain]) {\n this[_needDrain] = false\n this.emit('drain')\n }\n }\n }\n }\n\n [_flush]() {\n if (this[_queue].length === 0) {\n if (this[_ended]) {\n this[_onwrite](null, 0)\n }\n } else if (this[_queue].length === 1) {\n this[_write](this[_queue].pop() as Buffer)\n } else {\n const iovec = this[_queue]\n this[_queue] = []\n writev(this[_fd] as number, iovec, this[_pos] as number, (er, bw) =>\n this[_onwrite](er, bw),\n )\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n}\n\nexport class WriteStreamSync extends WriteStream {\n [_open](): void {\n let fd\n // only wrap in a try{} block if we know we'll retry, to avoid\n // the rethrow obscuring the error's source frame in most cases.\n if (this[_defaultFlag] && this[_flags] === 'r+') {\n try {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n this[_flags] = 'w'\n return this[_open]()\n } else {\n throw er\n }\n }\n } else {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n }\n\n this[_onopen](null, fd)\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n\n [_write](buf: Buffer) {\n // throw the original, but try to close if it fails\n let threw = true\n try {\n this[_onwrite](\n null,\n fs.writeSync(this[_fd] as number, buf, 0, buf.length, this[_pos]),\n )\n threw = false\n } finally {\n if (threw) {\n try {\n this[_close]()\n } catch {\n // ok error\n }\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json b/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts new file mode 100644 index 0000000..54aebe1 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts @@ -0,0 +1,118 @@ +/// +/// +/// +import EE from 'events'; +import { Minipass } from 'minipass'; +declare const _autoClose: unique symbol; +declare const _close: unique symbol; +declare const _ended: unique symbol; +declare const _fd: unique symbol; +declare const _finished: unique symbol; +declare const _flags: unique symbol; +declare const _flush: unique symbol; +declare const _handleChunk: unique symbol; +declare const _makeBuf: unique symbol; +declare const _mode: unique symbol; +declare const _needDrain: unique symbol; +declare const _onerror: unique symbol; +declare const _onopen: unique symbol; +declare const _onread: unique symbol; +declare const _onwrite: unique symbol; +declare const _open: unique symbol; +declare const _path: unique symbol; +declare const _pos: unique symbol; +declare const _queue: unique symbol; +declare const _read: unique symbol; +declare const _readSize: unique symbol; +declare const _reading: unique symbol; +declare const _remain: unique symbol; +declare const _size: unique symbol; +declare const _write: unique symbol; +declare const _writing: unique symbol; +declare const _defaultFlag: unique symbol; +declare const _errored: unique symbol; +export type ReadStreamOptions = Minipass.Options & { + fd?: number; + readSize?: number; + size?: number; + autoClose?: boolean; +}; +export type ReadStreamEvents = Minipass.Events & { + open: [fd: number]; +}; +export declare class ReadStream extends Minipass { + [_errored]: boolean; + [_fd]?: number; + [_path]: string; + [_readSize]: number; + [_reading]: boolean; + [_size]: number; + [_remain]: number; + [_autoClose]: boolean; + constructor(path: string, opt: ReadStreamOptions); + get fd(): number | undefined; + get path(): string; + write(): void; + end(): void; + [_open](): void; + [_onopen](er?: NodeJS.ErrnoException | null, fd?: number): void; + [_makeBuf](): Buffer; + [_read](): void; + [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer): void; + [_close](): void; + [_onerror](er: NodeJS.ErrnoException): void; + [_handleChunk](br: number, buf: Buffer): boolean; + emit(ev: Event, ...args: ReadStreamEvents[Event]): boolean; +} +export declare class ReadStreamSync extends ReadStream { + [_open](): void; + [_read](): void; + [_close](): void; +} +export type WriteStreamOptions = { + fd?: number; + autoClose?: boolean; + mode?: number; + captureRejections?: boolean; + start?: number; + flags?: string; +}; +export declare class WriteStream extends EE { + readable: false; + writable: boolean; + [_errored]: boolean; + [_writing]: boolean; + [_ended]: boolean; + [_queue]: Buffer[]; + [_needDrain]: boolean; + [_path]: string; + [_mode]: number; + [_autoClose]: boolean; + [_fd]?: number; + [_defaultFlag]: boolean; + [_flags]: string; + [_finished]: boolean; + [_pos]?: number; + constructor(path: string, opt: WriteStreamOptions); + emit(ev: string, ...args: any[]): boolean; + get fd(): number | undefined; + get path(): string; + [_onerror](er: NodeJS.ErrnoException): void; + [_open](): void; + [_onopen](er?: null | NodeJS.ErrnoException, fd?: number): void; + end(buf: string, enc?: BufferEncoding): this; + end(buf?: Buffer, enc?: undefined): this; + write(buf: string, enc?: BufferEncoding): boolean; + write(buf: Buffer, enc?: undefined): boolean; + [_write](buf: Buffer): void; + [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number): void; + [_flush](): void; + [_close](): void; +} +export declare class WriteStreamSync extends WriteStream { + [_open](): void; + [_close](): void; + [_write](buf: Buffer): void; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map new file mode 100644 index 0000000..3e2c703 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAInC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AAI,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB;IAoBjD,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAU/B,IAAI,EAAE,uBAEL;IAED,IAAI,IAAI,WAEP;IAED,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,cAAc;IAMpC,CAAC,KAAK,CAAC;IAMP,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAoBxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,IAAI;IAC5C,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,IAAI;IAoBxC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,GAAG,OAAO;IACjD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO;IAsB5C,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;IAWpB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM;IAwBzD,CAAC,MAAM,CAAC;IAgBR,CAAC,MAAM,CAAC;CAST;AAED,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,CAAC,KAAK,CAAC,IAAI,IAAI;IAsBf,CAAC,MAAM,CAAC;IASR,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM;CAmBrB"} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.js b/node_modules/@isaacs/fs-minipass/dist/esm/index.js new file mode 100644 index 0000000..287a0f6 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.js @@ -0,0 +1,420 @@ +import EE from 'events'; +import fs from 'fs'; +import { Minipass } from 'minipass'; +const writev = fs.writev; +const _autoClose = Symbol('_autoClose'); +const _close = Symbol('_close'); +const _ended = Symbol('_ended'); +const _fd = Symbol('_fd'); +const _finished = Symbol('_finished'); +const _flags = Symbol('_flags'); +const _flush = Symbol('_flush'); +const _handleChunk = Symbol('_handleChunk'); +const _makeBuf = Symbol('_makeBuf'); +const _mode = Symbol('_mode'); +const _needDrain = Symbol('_needDrain'); +const _onerror = Symbol('_onerror'); +const _onopen = Symbol('_onopen'); +const _onread = Symbol('_onread'); +const _onwrite = Symbol('_onwrite'); +const _open = Symbol('_open'); +const _path = Symbol('_path'); +const _pos = Symbol('_pos'); +const _queue = Symbol('_queue'); +const _read = Symbol('_read'); +const _readSize = Symbol('_readSize'); +const _reading = Symbol('_reading'); +const _remain = Symbol('_remain'); +const _size = Symbol('_size'); +const _write = Symbol('_write'); +const _writing = Symbol('_writing'); +const _defaultFlag = Symbol('_defaultFlag'); +const _errored = Symbol('_errored'); +export class ReadStream extends Minipass { + [_errored] = false; + [_fd]; + [_path]; + [_readSize]; + [_reading] = false; + [_size]; + [_remain]; + [_autoClose]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this.readable = true; + this.writable = false; + if (typeof path !== 'string') { + throw new TypeError('path must be a string'); + } + this[_errored] = false; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_path] = path; + this[_readSize] = opt.readSize || 16 * 1024 * 1024; + this[_reading] = false; + this[_size] = typeof opt.size === 'number' ? opt.size : Infinity; + this[_remain] = this[_size]; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + if (typeof this[_fd] === 'number') { + this[_read](); + } + else { + this[_open](); + } + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + //@ts-ignore + write() { + throw new TypeError('this is a readable stream'); + } + //@ts-ignore + end() { + throw new TypeError('this is a readable stream'); + } + [_open]() { + fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + this[_read](); + } + } + [_makeBuf]() { + return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])); + } + [_read]() { + if (!this[_reading]) { + this[_reading] = true; + const buf = this[_makeBuf](); + /* c8 ignore start */ + if (buf.length === 0) { + return process.nextTick(() => this[_onread](null, 0, buf)); + } + /* c8 ignore stop */ + fs.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => this[_onread](er, br, b)); + } + } + [_onread](er, br, buf) { + this[_reading] = false; + if (er) { + this[_onerror](er); + } + else if (this[_handleChunk](br, buf)) { + this[_read](); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } + [_onerror](er) { + this[_reading] = true; + this[_close](); + this.emit('error', er); + } + [_handleChunk](br, buf) { + let ret = false; + // no effect if infinite + this[_remain] -= br; + if (br > 0) { + ret = super.write(br < buf.length ? buf.subarray(0, br) : buf); + } + if (br === 0 || this[_remain] <= 0) { + ret = false; + this[_close](); + super.end(); + } + return ret; + } + emit(ev, ...args) { + switch (ev) { + case 'prefinish': + case 'finish': + return false; + case 'drain': + if (typeof this[_fd] === 'number') { + this[_read](); + } + return false; + case 'error': + if (this[_errored]) { + return false; + } + this[_errored] = true; + return super.emit(ev, ...args); + default: + return super.emit(ev, ...args); + } + } +} +export class ReadStreamSync extends ReadStream { + [_open]() { + let threw = true; + try { + this[_onopen](null, fs.openSync(this[_path], 'r')); + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_read]() { + let threw = true; + try { + if (!this[_reading]) { + this[_reading] = true; + do { + const buf = this[_makeBuf](); + /* c8 ignore start */ + const br = buf.length === 0 + ? 0 + : fs.readSync(this[_fd], buf, 0, buf.length, null); + /* c8 ignore stop */ + if (!this[_handleChunk](br, buf)) { + break; + } + } while (true); + this[_reading] = false; + } + threw = false; + } + finally { + if (threw) { + this[_close](); + } + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.closeSync(fd); + this.emit('close'); + } + } +} +export class WriteStream extends EE { + readable = false; + writable = true; + [_errored] = false; + [_writing] = false; + [_ended] = false; + [_queue] = []; + [_needDrain] = false; + [_path]; + [_mode]; + [_autoClose]; + [_fd]; + [_defaultFlag]; + [_flags]; + [_finished] = false; + [_pos]; + constructor(path, opt) { + opt = opt || {}; + super(opt); + this[_path] = path; + this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined; + this[_mode] = opt.mode === undefined ? 0o666 : opt.mode; + this[_pos] = typeof opt.start === 'number' ? opt.start : undefined; + this[_autoClose] = + typeof opt.autoClose === 'boolean' ? opt.autoClose : true; + // truncating makes no sense when writing into the middle + const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'; + this[_defaultFlag] = opt.flags === undefined; + this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags; + if (this[_fd] === undefined) { + this[_open](); + } + } + emit(ev, ...args) { + if (ev === 'error') { + if (this[_errored]) { + return false; + } + this[_errored] = true; + } + return super.emit(ev, ...args); + } + get fd() { + return this[_fd]; + } + get path() { + return this[_path]; + } + [_onerror](er) { + this[_close](); + this[_writing] = true; + this.emit('error', er); + } + [_open]() { + fs.open(this[_path], this[_flags], this[_mode], (er, fd) => this[_onopen](er, fd)); + } + [_onopen](er, fd) { + if (this[_defaultFlag] && + this[_flags] === 'r+' && + er && + er.code === 'ENOENT') { + this[_flags] = 'w'; + this[_open](); + } + else if (er) { + this[_onerror](er); + } + else { + this[_fd] = fd; + this.emit('open', fd); + if (!this[_writing]) { + this[_flush](); + } + } + } + end(buf, enc) { + if (buf) { + //@ts-ignore + this.write(buf, enc); + } + this[_ended] = true; + // synthetic after-write logic, where drain/finish live + if (!this[_writing] && + !this[_queue].length && + typeof this[_fd] === 'number') { + this[_onwrite](null, 0); + } + return this; + } + write(buf, enc) { + if (typeof buf === 'string') { + buf = Buffer.from(buf, enc); + } + if (this[_ended]) { + this.emit('error', new Error('write() after end()')); + return false; + } + if (this[_fd] === undefined || this[_writing] || this[_queue].length) { + this[_queue].push(buf); + this[_needDrain] = true; + return false; + } + this[_writing] = true; + this[_write](buf); + return true; + } + [_write](buf) { + fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + [_onwrite](er, bw) { + if (er) { + this[_onerror](er); + } + else { + if (this[_pos] !== undefined && typeof bw === 'number') { + this[_pos] += bw; + } + if (this[_queue].length) { + this[_flush](); + } + else { + this[_writing] = false; + if (this[_ended] && !this[_finished]) { + this[_finished] = true; + this[_close](); + this.emit('finish'); + } + else if (this[_needDrain]) { + this[_needDrain] = false; + this.emit('drain'); + } + } + } + } + [_flush]() { + if (this[_queue].length === 0) { + if (this[_ended]) { + this[_onwrite](null, 0); + } + } + else if (this[_queue].length === 1) { + this[_write](this[_queue].pop()); + } + else { + const iovec = this[_queue]; + this[_queue] = []; + writev(this[_fd], iovec, this[_pos], (er, bw) => this[_onwrite](er, bw)); + } + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')); + } + } +} +export class WriteStreamSync extends WriteStream { + [_open]() { + let fd; + // only wrap in a try{} block if we know we'll retry, to avoid + // the rethrow obscuring the error's source frame in most cases. + if (this[_defaultFlag] && this[_flags] === 'r+') { + try { + fd = fs.openSync(this[_path], this[_flags], this[_mode]); + } + catch (er) { + if (er?.code === 'ENOENT') { + this[_flags] = 'w'; + return this[_open](); + } + else { + throw er; + } + } + } + else { + fd = fs.openSync(this[_path], this[_flags], this[_mode]); + } + this[_onopen](null, fd); + } + [_close]() { + if (this[_autoClose] && typeof this[_fd] === 'number') { + const fd = this[_fd]; + this[_fd] = undefined; + fs.closeSync(fd); + this.emit('close'); + } + } + [_write](buf) { + // throw the original, but try to close if it fails + let threw = true; + try { + this[_onwrite](null, fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])); + threw = false; + } + finally { + if (threw) { + try { + this[_close](); + } + catch { + // ok error + } + } + } + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map b/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map new file mode 100644 index 0000000..2ef8b14 --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,QAAQ,CAAA;AACvB,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAA;AAExB,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;AACzB,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AACnC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CA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GAAG,CAAC,GAAG,SAAS,CAAA;YACrB,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;YAChB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACpB,CAAC;IACH,CAAC;IAED,CAAC,MAAM,CAAC,CAAC,GAAW;QAClB,mDAAmD;QACnD,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,CACZ,IAAI,EACJ,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAClE,CAAA;YACD,KAAK,GAAG,KAAK,CAAA;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,KAAK,EAAE,CAAC;gBACV,IAAI,CAAC;oBACH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAA;gBAChB,CAAC;gBAAC,MAAM,CAAC;oBACP,WAAW;gBACb,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF","sourcesContent":["import EE from 'events'\nimport fs from 'fs'\nimport { Minipass } from 'minipass'\n\nconst writev = fs.writev\n\nconst _autoClose = Symbol('_autoClose')\nconst _close = Symbol('_close')\nconst _ended = Symbol('_ended')\nconst _fd = Symbol('_fd')\nconst _finished = Symbol('_finished')\nconst _flags = Symbol('_flags')\nconst _flush = Symbol('_flush')\nconst _handleChunk = Symbol('_handleChunk')\nconst _makeBuf = Symbol('_makeBuf')\nconst _mode = Symbol('_mode')\nconst _needDrain = Symbol('_needDrain')\nconst _onerror = Symbol('_onerror')\nconst _onopen = Symbol('_onopen')\nconst _onread = Symbol('_onread')\nconst _onwrite = Symbol('_onwrite')\nconst _open = Symbol('_open')\nconst _path = Symbol('_path')\nconst _pos = Symbol('_pos')\nconst _queue = Symbol('_queue')\nconst _read = Symbol('_read')\nconst _readSize = Symbol('_readSize')\nconst _reading = Symbol('_reading')\nconst _remain = Symbol('_remain')\nconst _size = Symbol('_size')\nconst _write = Symbol('_write')\nconst _writing = Symbol('_writing')\nconst _defaultFlag = Symbol('_defaultFlag')\nconst _errored = Symbol('_errored')\n\nexport type ReadStreamOptions =\n Minipass.Options & {\n fd?: number\n readSize?: number\n size?: number\n autoClose?: boolean\n }\n\nexport type ReadStreamEvents = Minipass.Events & {\n open: [fd: number]\n}\n\nexport class ReadStream extends Minipass<\n Minipass.ContiguousData,\n Buffer,\n ReadStreamEvents\n> {\n [_errored]: boolean = false;\n [_fd]?: number;\n [_path]: string;\n [_readSize]: number;\n [_reading]: boolean = false;\n [_size]: number;\n [_remain]: number;\n [_autoClose]: boolean\n\n constructor(path: string, opt: ReadStreamOptions) {\n opt = opt || {}\n super(opt)\n\n this.readable = true\n this.writable = false\n\n if (typeof path !== 'string') {\n throw new TypeError('path must be a string')\n }\n\n this[_errored] = false\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_path] = path\n this[_readSize] = opt.readSize || 16 * 1024 * 1024\n this[_reading] = false\n this[_size] = typeof opt.size === 'number' ? opt.size : Infinity\n this[_remain] = this[_size]\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n if (typeof this[_fd] === 'number') {\n this[_read]()\n } else {\n this[_open]()\n }\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n //@ts-ignore\n write() {\n throw new TypeError('this is a readable stream')\n }\n\n //@ts-ignore\n end() {\n throw new TypeError('this is a readable stream')\n }\n\n [_open]() {\n fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))\n }\n\n [_onopen](er?: NodeJS.ErrnoException | null, fd?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd as number)\n this[_read]()\n }\n }\n\n [_makeBuf]() {\n return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))\n }\n\n [_read]() {\n if (!this[_reading]) {\n this[_reading] = true\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n if (buf.length === 0) {\n return process.nextTick(() => this[_onread](null, 0, buf))\n }\n /* c8 ignore stop */\n fs.read(this[_fd] as number, buf, 0, buf.length, null, (er, br, b) =>\n this[_onread](er, br, b),\n )\n }\n }\n\n [_onread](er?: NodeJS.ErrnoException | null, br?: number, buf?: Buffer) {\n this[_reading] = false\n if (er) {\n this[_onerror](er)\n } else if (this[_handleChunk](br as number, buf as Buffer)) {\n this[_read]()\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_reading] = true\n this[_close]()\n this.emit('error', er)\n }\n\n [_handleChunk](br: number, buf: Buffer) {\n let ret = false\n // no effect if infinite\n this[_remain] -= br\n if (br > 0) {\n ret = super.write(br < buf.length ? buf.subarray(0, br) : buf)\n }\n\n if (br === 0 || this[_remain] <= 0) {\n ret = false\n this[_close]()\n super.end()\n }\n\n return ret\n }\n\n emit(\n ev: Event,\n ...args: ReadStreamEvents[Event]\n ): boolean {\n switch (ev) {\n case 'prefinish':\n case 'finish':\n return false\n\n case 'drain':\n if (typeof this[_fd] === 'number') {\n this[_read]()\n }\n return false\n\n case 'error':\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n return super.emit(ev, ...args)\n\n default:\n return super.emit(ev, ...args)\n }\n }\n}\n\nexport class ReadStreamSync extends ReadStream {\n [_open]() {\n let threw = true\n try {\n this[_onopen](null, fs.openSync(this[_path], 'r'))\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_read]() {\n let threw = true\n try {\n if (!this[_reading]) {\n this[_reading] = true\n do {\n const buf = this[_makeBuf]()\n /* c8 ignore start */\n const br =\n buf.length === 0\n ? 0\n : fs.readSync(this[_fd] as number, buf, 0, buf.length, null)\n /* c8 ignore stop */\n if (!this[_handleChunk](br, buf)) {\n break\n }\n } while (true)\n this[_reading] = false\n }\n threw = false\n } finally {\n if (threw) {\n this[_close]()\n }\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n}\n\nexport type WriteStreamOptions = {\n fd?: number\n autoClose?: boolean\n mode?: number\n captureRejections?: boolean\n start?: number\n flags?: string\n}\n\nexport class WriteStream extends EE {\n readable: false = false\n writable: boolean = true;\n [_errored]: boolean = false;\n [_writing]: boolean = false;\n [_ended]: boolean = false;\n [_queue]: Buffer[] = [];\n [_needDrain]: boolean = false;\n [_path]: string;\n [_mode]: number;\n [_autoClose]: boolean;\n [_fd]?: number;\n [_defaultFlag]: boolean;\n [_flags]: string;\n [_finished]: boolean = false;\n [_pos]?: number\n\n constructor(path: string, opt: WriteStreamOptions) {\n opt = opt || {}\n super(opt)\n this[_path] = path\n this[_fd] = typeof opt.fd === 'number' ? opt.fd : undefined\n this[_mode] = opt.mode === undefined ? 0o666 : opt.mode\n this[_pos] = typeof opt.start === 'number' ? opt.start : undefined\n this[_autoClose] =\n typeof opt.autoClose === 'boolean' ? opt.autoClose : true\n\n // truncating makes no sense when writing into the middle\n const defaultFlag = this[_pos] !== undefined ? 'r+' : 'w'\n this[_defaultFlag] = opt.flags === undefined\n this[_flags] = opt.flags === undefined ? defaultFlag : opt.flags\n\n if (this[_fd] === undefined) {\n this[_open]()\n }\n }\n\n emit(ev: string, ...args: any[]) {\n if (ev === 'error') {\n if (this[_errored]) {\n return false\n }\n this[_errored] = true\n }\n return super.emit(ev, ...args)\n }\n\n get fd() {\n return this[_fd]\n }\n\n get path() {\n return this[_path]\n }\n\n [_onerror](er: NodeJS.ErrnoException) {\n this[_close]()\n this[_writing] = true\n this.emit('error', er)\n }\n\n [_open]() {\n fs.open(this[_path], this[_flags], this[_mode], (er, fd) =>\n this[_onopen](er, fd),\n )\n }\n\n [_onopen](er?: null | NodeJS.ErrnoException, fd?: number) {\n if (\n this[_defaultFlag] &&\n this[_flags] === 'r+' &&\n er &&\n er.code === 'ENOENT'\n ) {\n this[_flags] = 'w'\n this[_open]()\n } else if (er) {\n this[_onerror](er)\n } else {\n this[_fd] = fd\n this.emit('open', fd)\n if (!this[_writing]) {\n this[_flush]()\n }\n }\n }\n\n end(buf: string, enc?: BufferEncoding): this\n end(buf?: Buffer, enc?: undefined): this\n end(buf?: Buffer | string, enc?: BufferEncoding): this {\n if (buf) {\n //@ts-ignore\n this.write(buf, enc)\n }\n\n this[_ended] = true\n\n // synthetic after-write logic, where drain/finish live\n if (\n !this[_writing] &&\n !this[_queue].length &&\n typeof this[_fd] === 'number'\n ) {\n this[_onwrite](null, 0)\n }\n return this\n }\n\n write(buf: string, enc?: BufferEncoding): boolean\n write(buf: Buffer, enc?: undefined): boolean\n write(buf: Buffer | string, enc?: BufferEncoding): boolean {\n if (typeof buf === 'string') {\n buf = Buffer.from(buf, enc)\n }\n\n if (this[_ended]) {\n this.emit('error', new Error('write() after end()'))\n return false\n }\n\n if (this[_fd] === undefined || this[_writing] || this[_queue].length) {\n this[_queue].push(buf)\n this[_needDrain] = true\n return false\n }\n\n this[_writing] = true\n this[_write](buf)\n return true\n }\n\n [_write](buf: Buffer) {\n fs.write(\n this[_fd] as number,\n buf,\n 0,\n buf.length,\n this[_pos],\n (er, bw) => this[_onwrite](er, bw),\n )\n }\n\n [_onwrite](er?: null | NodeJS.ErrnoException, bw?: number) {\n if (er) {\n this[_onerror](er)\n } else {\n if (this[_pos] !== undefined && typeof bw === 'number') {\n this[_pos] += bw\n }\n if (this[_queue].length) {\n this[_flush]()\n } else {\n this[_writing] = false\n\n if (this[_ended] && !this[_finished]) {\n this[_finished] = true\n this[_close]()\n this.emit('finish')\n } else if (this[_needDrain]) {\n this[_needDrain] = false\n this.emit('drain')\n }\n }\n }\n }\n\n [_flush]() {\n if (this[_queue].length === 0) {\n if (this[_ended]) {\n this[_onwrite](null, 0)\n }\n } else if (this[_queue].length === 1) {\n this[_write](this[_queue].pop() as Buffer)\n } else {\n const iovec = this[_queue]\n this[_queue] = []\n writev(this[_fd] as number, iovec, this[_pos] as number, (er, bw) =>\n this[_onwrite](er, bw),\n )\n }\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.close(fd, er =>\n er ? this.emit('error', er) : this.emit('close'),\n )\n }\n }\n}\n\nexport class WriteStreamSync extends WriteStream {\n [_open](): void {\n let fd\n // only wrap in a try{} block if we know we'll retry, to avoid\n // the rethrow obscuring the error's source frame in most cases.\n if (this[_defaultFlag] && this[_flags] === 'r+') {\n try {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n this[_flags] = 'w'\n return this[_open]()\n } else {\n throw er\n }\n }\n } else {\n fd = fs.openSync(this[_path], this[_flags], this[_mode])\n }\n\n this[_onopen](null, fd)\n }\n\n [_close]() {\n if (this[_autoClose] && typeof this[_fd] === 'number') {\n const fd = this[_fd]\n this[_fd] = undefined\n fs.closeSync(fd)\n this.emit('close')\n }\n }\n\n [_write](buf: Buffer) {\n // throw the original, but try to close if it fails\n let threw = true\n try {\n this[_onwrite](\n null,\n fs.writeSync(this[_fd] as number, buf, 0, buf.length, this[_pos]),\n )\n threw = false\n } finally {\n if (threw) {\n try {\n this[_close]()\n } catch {\n // ok error\n }\n }\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/fs-minipass/dist/esm/package.json b/node_modules/@isaacs/fs-minipass/dist/esm/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/@isaacs/fs-minipass/package.json b/node_modules/@isaacs/fs-minipass/package.json new file mode 100644 index 0000000..cc4576c --- /dev/null +++ b/node_modules/@isaacs/fs-minipass/package.json @@ -0,0 +1,72 @@ +{ + "name": "@isaacs/fs-minipass", + "version": "4.0.1", + "main": "./dist/commonjs/index.js", + "scripts": { + "prepare": "tshy", + "pretest": "npm run prepare", + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "format": "prettier --write . --loglevel warn", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" + }, + "keywords": [], + "author": "Isaac Z. Schlueter", + "license": "ISC", + "repository": { + "type": "git", + "url": "https://github.com/npm/fs-minipass.git" + }, + "description": "fs read and write streams based on minipass", + "dependencies": { + "minipass": "^7.0.4" + }, + "devDependencies": { + "@types/node": "^20.11.30", + "mutate-fs": "^2.1.1", + "prettier": "^3.2.5", + "tap": "^18.7.1", + "tshy": "^1.12.0", + "typedoc": "^0.25.12" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=18.0.0" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "prettier": { + "semi": false, + "printWidth": 75, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + } +} diff --git a/node_modules/@jridgewell/gen-mapping/LICENSE b/node_modules/@jridgewell/gen-mapping/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +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. diff --git a/node_modules/@jridgewell/gen-mapping/README.md b/node_modules/@jridgewell/gen-mapping/README.md new file mode 100644 index 0000000..4066cdb --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/README.md @@ -0,0 +1,227 @@ +# @jridgewell/gen-mapping + +> Generate source maps + +`gen-mapping` allows you to generate a source map during transpilation or minification. +With a source map, you're able to trace the original location in the source file, either in Chrome's +DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping]. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This +provides the same `addMapping` and `setSourceContent` API. + +## Installation + +```sh +npm install @jridgewell/gen-mapping +``` + +## Usage + +```typescript +import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping'; + +const map = new GenMapping({ + file: 'output.js', + sourceRoot: 'https://example.com/', +}); + +setSourceContent(map, 'input.js', `function foo() {}`); + +addMapping(map, { + // Lines start at line 1, columns at column 0. + generated: { line: 1, column: 0 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +addMapping(map, { + generated: { line: 1, column: 9 }, + source: 'input.js', + original: { line: 1, column: 9 }, + name: 'foo', +}); + +assert.deepEqual(toDecodedMap(map), { + version: 3, + file: 'output.js', + names: ['foo'], + sourceRoot: 'https://example.com/', + sources: ['input.js'], + sourcesContent: ['function foo() {}'], + mappings: [ + [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ] + ], +}); + +assert.deepEqual(toEncodedMap(map), { + version: 3, + file: 'output.js', + names: ['foo'], + sourceRoot: 'https://example.com/', + sources: ['input.js'], + sourcesContent: ['function foo() {}'], + mappings: 'AAAA,SAASA', +}); +``` + +### Smaller Sourcemaps + +Not everything needs to be added to a sourcemap, and needless markings can cause signficantly +larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will +intelligently determine if this marking adds useful information. If not, the marking will be +skipped. + +```typescript +import { maybeAddMapping } from '@jridgewell/gen-mapping'; + +const map = new GenMapping(); + +// Adding a sourceless marking at the beginning of a line isn't useful. +maybeAddMapping(map, { + generated: { line: 1, column: 0 }, +}); + +// Adding a new source marking is useful. +maybeAddMapping(map, { + generated: { line: 1, column: 0 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +// But adding another marking pointing to the exact same original location isn't, even if the +// generated column changed. +maybeAddMapping(map, { + generated: { line: 1, column: 9 }, + source: 'input.js', + original: { line: 1, column: 0 }, +}); + +assert.deepEqual(toEncodedMap(map), { + version: 3, + names: [], + sources: ['input.js'], + sourcesContent: [null], + mappings: 'AAAA', +}); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map +Memory Usage: +gen-mapping: addSegment 5852872 bytes +gen-mapping: addMapping 7716042 bytes +source-map-js 6143250 bytes +source-map-0.6.1 6124102 bytes +source-map-0.8.0 6121173 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 441 ops/sec ±2.07% (90 runs sampled) +gen-mapping: addMapping x 350 ops/sec ±2.40% (86 runs sampled) +source-map-js: addMapping x 169 ops/sec ±2.42% (80 runs sampled) +source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled) +source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled) +gen-mapping: encoded output x 663 ops/sec ±0.22% (98 runs sampled) +source-map-js: encoded output x 197 ops/sec ±0.45% (84 runs sampled) +source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled) +source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +babel.min.js.map +Memory Usage: +gen-mapping: addSegment 37578063 bytes +gen-mapping: addMapping 37212897 bytes +source-map-js 47638527 bytes +source-map-0.6.1 47690503 bytes +source-map-0.8.0 47470188 bytes +Smallest memory usage is gen-mapping: addMapping + +Adding speed: +gen-mapping: addSegment x 31.05 ops/sec ±8.31% (43 runs sampled) +gen-mapping: addMapping x 29.83 ops/sec ±7.36% (51 runs sampled) +source-map-js: addMapping x 20.73 ops/sec ±6.22% (38 runs sampled) +source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled) +source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled) +gen-mapping: encoded output x 95.15 ops/sec ±2.98% (72 runs sampled) +source-map-js: encoded output x 15.20 ops/sec ±7.41% (33 runs sampled) +source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled) +source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +preact.js.map +Memory Usage: +gen-mapping: addSegment 416247 bytes +gen-mapping: addMapping 419824 bytes +source-map-js 1024619 bytes +source-map-0.6.1 1146004 bytes +source-map-0.8.0 1113250 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 13,755 ops/sec ±0.15% (98 runs sampled) +gen-mapping: addMapping x 13,013 ops/sec ±0.11% (101 runs sampled) +source-map-js: addMapping x 4,564 ops/sec ±0.21% (98 runs sampled) +source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled) +source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled) +gen-mapping: encoded output x 14,368 ops/sec ±4.07% (82 runs sampled) +source-map-js: encoded output x 5,261 ops/sec ±0.21% (99 runs sampled) +source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled) +source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled) +Fastest is gen-mapping: decoded output + + +*** + + +react.js.map +Memory Usage: +gen-mapping: addSegment 975096 bytes +gen-mapping: addMapping 1102981 bytes +source-map-js 2918836 bytes +source-map-0.6.1 2885435 bytes +source-map-0.8.0 2874336 bytes +Smallest memory usage is gen-mapping: addSegment + +Adding speed: +gen-mapping: addSegment x 4,772 ops/sec ±0.15% (100 runs sampled) +gen-mapping: addMapping x 4,456 ops/sec ±0.13% (97 runs sampled) +source-map-js: addMapping x 1,618 ops/sec ±0.24% (97 runs sampled) +source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled) +source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled) +Fastest is gen-mapping: addSegment + +Generate speed: +gen-mapping: decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled) +gen-mapping: encoded output x 5,421 ops/sec ±1.60% (89 runs sampled) +source-map-js: encoded output x 2,113 ops/sec ±1.81% (98 runs sampled) +source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled) +source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled) +Fastest is gen-mapping: decoded output +``` + +[source-map]: https://www.npmjs.com/package/source-map +[trace-mapping]: https://github.com/jridgewell/trace-mapping diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs new file mode 100644 index 0000000..bbb0cac --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs @@ -0,0 +1,292 @@ +// src/set-array.ts +var SetArray = class { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } +}; +function cast(set) { + return set; +} +function get(setarr, key) { + return cast(setarr)._indexes[key]; +} +function put(setarr, key) { + const index = get(setarr, key); + if (index !== void 0) return index; + const { array, _indexes: indexes } = cast(setarr); + const length = array.push(key); + return indexes[key] = length - 1; +} +function remove(setarr, key) { + const index = get(setarr, key); + if (index === void 0) return; + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = void 0; + array.pop(); +} + +// src/gen-mapping.ts +import { + encode +} from "@jridgewell/sourcemap-codec"; +import { TraceMap, decodedMappings } from "@jridgewell/trace-mapping"; + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; + +// src/gen-mapping.ts +var NO_NAME = -1; +var GenMapping = class { + constructor({ file, sourceRoot } = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +}; +function cast2(map) { + return map; +} +function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + return addSegmentInternal( + false, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +} +function addMapping(map, mapping) { + return addMappingInternal(false, map, mapping); +} +var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal( + true, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +}; +var maybeAddMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping); +}; +function setSourceContent(map, source, content) { + const { + _sources: sources, + _sourcesContent: sourcesContent + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + sourcesContent[index] = content; +} +function setIgnore(map, source, ignore = true) { + const { + _sources: sources, + _sourcesContent: sourcesContent, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (ignore) put(ignoreList, index); + else remove(ignoreList, index); +} +function toDecodedMap(map) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + // _generatedRanges: generatedRanges, + } = cast2(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || void 0, + names: names.array, + sourceRoot: map.sourceRoot || void 0, + sources: sources.array, + sourcesContent, + mappings, + // originalScopes, + // generatedRanges, + ignoreList: ignoreList.array + }; +} +function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign({}, decoded, { + // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), + // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), + mappings: encode(decoded.mappings) + }); +} +function fromMap(input) { + const map = new TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + putAll(cast2(gen)._names, map.names); + putAll(cast2(gen)._sources, map.sources); + cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast2(gen)._mappings = decodedMappings(map); + if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList); + return gen; +} +function allMappings(map) { + const out = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast2(map); + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generated = { line: i + 1, column: seg[COLUMN] }; + let source = void 0; + let original = void 0; + let name = void 0; + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; + } + out.push({ generated, source, original, name }); + } + } + return out; +} +function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names + // _originalScopes: originalScopes, + } = cast2(map); + const line = getIndex(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipable && skipSourceless(line, index)) return; + return insert(line, index, [genColumn]); + } + assert(sourceLine); + assert(sourceColumn); + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert( + line, + index, + name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn] + ); +} +function assert(_val) { +} +function getIndex(arr, index) { + for (let i = arr.length; i <= index; i++) { + arr[i] = []; + } + return arr[index]; +} +function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) break; + } + return index; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) break; + } + if (len < length) mappings.length = len; +} +function putAll(setarr, array) { + for (let i = 0; i < array.length; i++) put(setarr, array[i]); +} +function skipSourceless(line, index) { + if (index === 0) return true; + const prev = line[index - 1]; + return prev.length === 1; +} +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + if (index === 0) return false; + const prev = line[index - 1]; + if (prev.length === 1) return false; + return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); +} +function addMappingInternal(skipable, map, mapping) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + null, + null, + null, + null, + null + ); + } + assert(original); + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + source, + original.line - 1, + original.column, + name, + content + ); +} +export { + GenMapping, + addMapping, + addSegment, + allMappings, + fromMap, + maybeAddMapping, + maybeAddSegment, + setIgnore, + setSourceContent, + toDecodedMap, + toEncodedMap +}; +//# sourceMappingURL=gen-mapping.mjs.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map new file mode 100644 index 0000000..4e37e45 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/set-array.ts", "../src/gen-mapping.ts", "../src/sourcemap-segment.ts"], + "mappings": ";AAUO,IAAM,WAAN,MAAoC;AAAA,EAIzC,cAAc;AACZ,SAAK,WAAW,EAAE,WAAW,KAAK;AAClC,SAAK,QAAQ,CAAC;AAAA,EAChB;AACF;AAWA,SAAS,KAAoB,KAAgC;AAC3D,SAAO;AACT;AAKO,SAAS,IAAmB,QAAqB,KAA4B;AAClF,SAAO,KAAK,MAAM,EAAE,SAAS,GAAG;AAClC;AAMO,SAAS,IAAmB,QAAqB,KAAgB;AAEtE,QAAM,QAAQ,IAAI,QAAQ,GAAG;AAC7B,MAAI,UAAU,OAAW,QAAO;AAEhC,QAAM,EAAE,OAAO,UAAU,QAAQ,IAAI,KAAK,MAAM;AAEhD,QAAM,SAAS,MAAM,KAAK,GAAG;AAC7B,SAAQ,QAAQ,GAAG,IAAI,SAAS;AAClC;AAgBO,SAAS,OAAsB,QAAqB,KAAc;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,SAAS,OAAO;AAAA,IAChB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;", + "names": ["cast"] +} diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js new file mode 100644 index 0000000..119a0ab --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js @@ -0,0 +1,346 @@ +(function (global, factory, m) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(module, require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping')) : + typeof define === 'function' && define.amd ? define(['module', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(m = { exports: {} }, global.sourcemapCodec, global.traceMapping), global.genMapping = 'default' in m.exports ? m.exports.default : m.exports); +})(this, (function (module, require_sourcemapCodec, require_traceMapping) { +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// umd:@jridgewell/sourcemap-codec +var require_sourcemap_codec = __commonJS({ + "umd:@jridgewell/sourcemap-codec"(exports, module2) { + module2.exports = require_sourcemapCodec; + } +}); + +// umd:@jridgewell/trace-mapping +var require_trace_mapping = __commonJS({ + "umd:@jridgewell/trace-mapping"(exports, module2) { + module2.exports = require_traceMapping; + } +}); + +// src/gen-mapping.ts +var gen_mapping_exports = {}; +__export(gen_mapping_exports, { + GenMapping: () => GenMapping, + addMapping: () => addMapping, + addSegment: () => addSegment, + allMappings: () => allMappings, + fromMap: () => fromMap, + maybeAddMapping: () => maybeAddMapping, + maybeAddSegment: () => maybeAddSegment, + setIgnore: () => setIgnore, + setSourceContent: () => setSourceContent, + toDecodedMap: () => toDecodedMap, + toEncodedMap: () => toEncodedMap +}); +module.exports = __toCommonJS(gen_mapping_exports); + +// src/set-array.ts +var SetArray = class { + constructor() { + this._indexes = { __proto__: null }; + this.array = []; + } +}; +function cast(set) { + return set; +} +function get(setarr, key) { + return cast(setarr)._indexes[key]; +} +function put(setarr, key) { + const index = get(setarr, key); + if (index !== void 0) return index; + const { array, _indexes: indexes } = cast(setarr); + const length = array.push(key); + return indexes[key] = length - 1; +} +function remove(setarr, key) { + const index = get(setarr, key); + if (index === void 0) return; + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]--; + } + indexes[key] = void 0; + array.pop(); +} + +// src/gen-mapping.ts +var import_sourcemap_codec = __toESM(require_sourcemap_codec()); +var import_trace_mapping = __toESM(require_trace_mapping()); + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; + +// src/gen-mapping.ts +var NO_NAME = -1; +var GenMapping = class { + constructor({ file, sourceRoot } = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +}; +function cast2(map) { + return map; +} +function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + return addSegmentInternal( + false, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +} +function addMapping(map, mapping) { + return addMappingInternal(false, map, mapping); +} +var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => { + return addSegmentInternal( + true, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content + ); +}; +var maybeAddMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping); +}; +function setSourceContent(map, source, content) { + const { + _sources: sources, + _sourcesContent: sourcesContent + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + sourcesContent[index] = content; +} +function setIgnore(map, source, ignore = true) { + const { + _sources: sources, + _sourcesContent: sourcesContent, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + } = cast2(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (ignore) put(ignoreList, index); + else remove(ignoreList, index); +} +function toDecodedMap(map) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + _ignoreList: ignoreList + // _originalScopes: originalScopes, + // _generatedRanges: generatedRanges, + } = cast2(map); + removeEmptyFinalLines(mappings); + return { + version: 3, + file: map.file || void 0, + names: names.array, + sourceRoot: map.sourceRoot || void 0, + sources: sources.array, + sourcesContent, + mappings, + // originalScopes, + // generatedRanges, + ignoreList: ignoreList.array + }; +} +function toEncodedMap(map) { + const decoded = toDecodedMap(map); + return Object.assign({}, decoded, { + // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), + // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), + mappings: (0, import_sourcemap_codec.encode)(decoded.mappings) + }); +} +function fromMap(input) { + const map = new import_trace_mapping.TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + putAll(cast2(gen)._names, map.names); + putAll(cast2(gen)._sources, map.sources); + cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast2(gen)._mappings = (0, import_trace_mapping.decodedMappings)(map); + if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList); + return gen; +} +function allMappings(map) { + const out = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast2(map); + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generated = { line: i + 1, column: seg[COLUMN] }; + let source = void 0; + let original = void 0; + let name = void 0; + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; + } + out.push({ generated, source, original, name }); + } + } + return out; +} +function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names + // _originalScopes: originalScopes, + } = cast2(map); + const line = getIndex(mappings, genLine); + const index = getColumnIndex(line, genColumn); + if (!source) { + if (skipable && skipSourceless(line, index)) return; + return insert(line, index, [genColumn]); + } + assert(sourceLine); + assert(sourceColumn); + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null; + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + return insert( + line, + index, + name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn] + ); +} +function assert(_val) { +} +function getIndex(arr, index) { + for (let i = arr.length; i <= index; i++) { + arr[i] = []; + } + return arr[index]; +} +function getColumnIndex(line, genColumn) { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) break; + } + return index; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function removeEmptyFinalLines(mappings) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) break; + } + if (len < length) mappings.length = len; +} +function putAll(setarr, array) { + for (let i = 0; i < array.length; i++) put(setarr, array[i]); +} +function skipSourceless(line, index) { + if (index === 0) return true; + const prev = line[index - 1]; + return prev.length === 1; +} +function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { + if (index === 0) return false; + const prev = line[index - 1]; + if (prev.length === 1) return false; + return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME); +} +function addMappingInternal(skipable, map, mapping) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + null, + null, + null, + null, + null + ); + } + assert(original); + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + source, + original.line - 1, + original.column, + name, + content + ); +} +})); +//# sourceMappingURL=gen-mapping.umd.js.map diff --git a/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map new file mode 100644 index 0000000..f6f222b --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/trace-mapping", "../src/gen-mapping.ts", "../src/set-array.ts", "../src/sourcemap-segment.ts"], + "mappings": ";;;;;;;;;;;;;;;;;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I,UAAU,EAAG,QAAO;AAExB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAI3B,SAAO,KAAK,WAAW;AACzB;AAEA,SAAS,WACP,MACA,OACA,cACA,YACA,cACA,YACS;AAET,MAAI,UAAU,EAAG,QAAO;AAExB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAG3B,MAAI,KAAK,WAAW,EAAG,QAAO;AAI9B,SACE,iBAAiB,KAAK,aAAa,KACnC,eAAe,KAAK,WAAW,KAC/B,iBAAiB,KAAK,aAAa,KACnC,gBAAgB,KAAK,WAAW,IAAI,KAAK,WAAW,IAAI;AAE5D;AAEA,SAAS,mBACP,UACA,KACA,SAOA;AACA,QAAM,EAAE,WAAW,QAAQ,UAAU,MAAM,QAAQ,IAAI;AACvD,MAAI,CAAC,QAAQ;AACX,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU,OAAO;AAAA,MACjB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,SAAY,QAAQ;AACpB,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,UAAU,OAAO;AAAA,IACjB,UAAU;AAAA,IACV;AAAA,IACA,SAAS,OAAO;AAAA,IAChB,SAAS;AAAA,IACT;AAAA,IACA;AAAA,EACF;AACF;", + "names": ["module", "module", "cast"] +} diff --git a/node_modules/@jridgewell/gen-mapping/package.json b/node_modules/@jridgewell/gen-mapping/package.json new file mode 100644 index 0000000..b899b38 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/package.json @@ -0,0 +1,71 @@ +{ + "name": "@jridgewell/gen-mapping", + "version": "0.3.12", + "description": "Generate source maps", + "keywords": [ + "source", + "map" + ], + "main": "dist/gen-mapping.umd.js", + "module": "dist/gen-mapping.mjs", + "types": "types/gen-mapping.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/gen-mapping.d.mts", + "default": "./dist/gen-mapping.mjs" + }, + "require": { + "types": "./types/gen-mapping.d.cts", + "default": "./dist/gen-mapping.umd.js" + }, + "browser": { + "types": "./types/gen-mapping.d.cts", + "default": "./dist/gen-mapping.umd.js" + } + }, + "./dist/gen-mapping.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs gen-mapping.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/gen-mapping" + }, + "author": "Justin Ridgewell ", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } +} diff --git a/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts b/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts new file mode 100644 index 0000000..ecc878c --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts @@ -0,0 +1,614 @@ +import { SetArray, put, remove } from './set-array'; +import { + encode, + // encodeGeneratedRanges, + // encodeOriginalScopes +} from '@jridgewell/sourcemap-codec'; +import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping'; + +import { + COLUMN, + SOURCES_INDEX, + SOURCE_LINE, + SOURCE_COLUMN, + NAMES_INDEX, +} from './sourcemap-segment'; + +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +// import type { OriginalScope, GeneratedRange } from '@jridgewell/sourcemap-codec'; +import type { SourceMapSegment } from './sourcemap-segment'; +import type { + DecodedSourceMap, + EncodedSourceMap, + Pos, + Mapping, + // BindingExpressionRange, + // OriginalPos, + // OriginalScopeInfo, + // GeneratedRangeInfo, +} from './types'; + +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; + +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; + +const NO_NAME = -1; + +/** + * Provides the state to generate a sourcemap. + */ +export class GenMapping { + declare private _names: SetArray; + declare private _sources: SetArray; + declare private _sourcesContent: (string | null)[]; + declare private _mappings: SourceMapSegment[][]; + // private declare _originalScopes: OriginalScope[][]; + // private declare _generatedRanges: GeneratedRange[]; + declare private _ignoreList: SetArray; + declare file: string | null | undefined; + declare sourceRoot: string | null | undefined; + + constructor({ file, sourceRoot }: Options = {}) { + this._names = new SetArray(); + this._sources = new SetArray(); + this._sourcesContent = []; + this._mappings = []; + // this._originalScopes = []; + // this._generatedRanges = []; + this.file = file; + this.sourceRoot = sourceRoot; + this._ignoreList = new SetArray(); + } +} + +interface PublicMap { + _names: GenMapping['_names']; + _sources: GenMapping['_sources']; + _sourcesContent: GenMapping['_sourcesContent']; + _mappings: GenMapping['_mappings']; + // _originalScopes: GenMapping['_originalScopes']; + // _generatedRanges: GenMapping['_generatedRanges']; + _ignoreList: GenMapping['_ignoreList']; +} + +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map: unknown): PublicMap { + return map as any; +} + +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source?: null, + sourceLine?: null, + sourceColumn?: null, + name?: null, + content?: null, +): void; +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source: string, + sourceLine: number, + sourceColumn: number, + name?: null, + content?: string | null, +): void; +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source: string, + sourceLine: number, + sourceColumn: number, + name: string, + content?: string | null, +): void; +export function addSegment( + map: GenMapping, + genLine: number, + genColumn: number, + source?: string | null, + sourceLine?: number | null, + sourceColumn?: number | null, + name?: string | null, + content?: string | null, +): void { + return addSegmentInternal( + false, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content, + ); +} + +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; + }, +): void; +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; + }, +): void; +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; + }, +): void; +export function addMapping( + map: GenMapping, + mapping: { + generated: Pos; + source?: string | null; + original?: Pos | null; + name?: string | null; + content?: string | null; + }, +): void { + return addMappingInternal(false, map, mapping as Parameters[2]); +} + +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export const maybeAddSegment: typeof addSegment = ( + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content, +) => { + return addSegmentInternal( + true, + map, + genLine, + genColumn, + source, + sourceLine, + sourceColumn, + name, + content, + ); +}; + +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export const maybeAddMapping: typeof addMapping = (map, mapping) => { + return addMappingInternal(true, map, mapping as Parameters[2]); +}; + +/** + * Adds/removes the content of the source file to the source map. + */ +export function setSourceContent(map: GenMapping, source: string, content: string | null): void { + const { + _sources: sources, + _sourcesContent: sourcesContent, + // _originalScopes: originalScopes, + } = cast(map); + const index = put(sources, source); + sourcesContent[index] = content; + // if (index === originalScopes.length) originalScopes[index] = []; +} + +export function setIgnore(map: GenMapping, source: string, ignore = true) { + const { + _sources: sources, + _sourcesContent: sourcesContent, + _ignoreList: ignoreList, + // _originalScopes: originalScopes, + } = cast(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + // if (index === originalScopes.length) originalScopes[index] = []; + if (ignore) put(ignoreList, index); + else remove(ignoreList, index); +} + +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function toDecodedMap(map: GenMapping): DecodedSourceMap { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + _ignoreList: ignoreList, + // _originalScopes: originalScopes, + // _generatedRanges: generatedRanges, + } = cast(map); + removeEmptyFinalLines(mappings); + + return { + version: 3, + file: map.file || undefined, + names: names.array, + sourceRoot: map.sourceRoot || undefined, + sources: sources.array, + sourcesContent, + mappings, + // originalScopes, + // generatedRanges, + ignoreList: ignoreList.array, + }; +} + +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function toEncodedMap(map: GenMapping): EncodedSourceMap { + const decoded = toDecodedMap(map); + return Object.assign({}, decoded, { + // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)), + // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]), + mappings: encode(decoded.mappings as SourceMapSegment[][]), + }); +} + +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export function fromMap(input: SourceMapInput): GenMapping { + const map = new TraceMap(input); + const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); + + putAll(cast(gen)._names, map.names); + putAll(cast(gen)._sources, map.sources as string[]); + cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null); + cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings']; + // TODO: implement originalScopes/generatedRanges + if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList); + + return gen; +} + +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export function allMappings(map: GenMapping): Mapping[] { + const out: Mapping[] = []; + const { _mappings: mappings, _sources: sources, _names: names } = cast(map); + + for (let i = 0; i < mappings.length; i++) { + const line = mappings[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + + const generated = { line: i + 1, column: seg[COLUMN] }; + let source: string | undefined = undefined; + let original: Pos | undefined = undefined; + let name: string | undefined = undefined; + + if (seg.length !== 1) { + source = sources.array[seg[SOURCES_INDEX]]; + original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; + + if (seg.length === 5) name = names.array[seg[NAMES_INDEX]]; + } + + out.push({ generated, source, original, name } as Mapping); + } + } + + return out; +} + +// This split declaration is only so that terser can elminiate the static initialization block. +function addSegmentInternal( + skipable: boolean, + map: GenMapping, + genLine: number, + genColumn: number, + source: S, + sourceLine: S extends string ? number : null | undefined, + sourceColumn: S extends string ? number : null | undefined, + name: S extends string ? string | null | undefined : null | undefined, + content: S extends string ? string | null | undefined : null | undefined, +): void { + const { + _mappings: mappings, + _sources: sources, + _sourcesContent: sourcesContent, + _names: names, + // _originalScopes: originalScopes, + } = cast(map); + const line = getIndex(mappings, genLine); + const index = getColumnIndex(line, genColumn); + + if (!source) { + if (skipable && skipSourceless(line, index)) return; + return insert(line, index, [genColumn]); + } + + // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source + // isn't nullish. + assert(sourceLine); + assert(sourceColumn); + + const sourcesIndex = put(sources, source); + const namesIndex = name ? put(names, name) : NO_NAME; + if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null; + // if (sourcesIndex === originalScopes.length) originalScopes[sourcesIndex] = []; + + if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) { + return; + } + + return insert( + line, + index, + name + ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] + : [genColumn, sourcesIndex, sourceLine, sourceColumn], + ); +} + +function assert(_val: unknown): asserts _val is T { + // noop. +} + +function getIndex(arr: T[][], index: number): T[] { + for (let i = arr.length; i <= index; i++) { + arr[i] = []; + } + return arr[index]; +} + +function getColumnIndex(line: SourceMapSegment[], genColumn: number): number { + let index = line.length; + for (let i = index - 1; i >= 0; index = i--) { + const current = line[i]; + if (genColumn >= current[COLUMN]) break; + } + return index; +} + +function insert(array: T[], index: number, value: T) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} + +function removeEmptyFinalLines(mappings: SourceMapSegment[][]) { + const { length } = mappings; + let len = length; + for (let i = len - 1; i >= 0; len = i, i--) { + if (mappings[i].length > 0) break; + } + if (len < length) mappings.length = len; +} + +function putAll(setarr: SetArray, array: T[]) { + for (let i = 0; i < array.length; i++) put(setarr, array[i]); +} + +function skipSourceless(line: SourceMapSegment[], index: number): boolean { + // The start of a line is already sourceless, so adding a sourceless segment to the beginning + // doesn't generate any useful information. + if (index === 0) return true; + + const prev = line[index - 1]; + // If the previous segment is also sourceless, then adding another sourceless segment doesn't + // genrate any new information. Else, this segment will end the source/named segment and point to + // a sourceless position, which is useful. + return prev.length === 1; +} + +function skipSource( + line: SourceMapSegment[], + index: number, + sourcesIndex: number, + sourceLine: number, + sourceColumn: number, + namesIndex: number, +): boolean { + // A source/named segment at the start of a line gives position at that genColumn + if (index === 0) return false; + + const prev = line[index - 1]; + + // If the previous segment is sourceless, then we're transitioning to a source. + if (prev.length === 1) return false; + + // If the previous segment maps to the exact same source position, then this segment doesn't + // provide any new position information. + return ( + sourcesIndex === prev[SOURCES_INDEX] && + sourceLine === prev[SOURCE_LINE] && + sourceColumn === prev[SOURCE_COLUMN] && + namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME) + ); +} + +function addMappingInternal( + skipable: boolean, + map: GenMapping, + mapping: { + generated: Pos; + source: S; + original: S extends string ? Pos : null | undefined; + name: S extends string ? string | null | undefined : null | undefined; + content: S extends string ? string | null | undefined : null | undefined; + }, +) { + const { generated, source, original, name, content } = mapping; + if (!source) { + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + null, + null, + null, + null, + null, + ); + } + assert(original); + return addSegmentInternal( + skipable, + map, + generated.line - 1, + generated.column, + source as string, + original.line - 1, + original.column, + name, + content, + ); +} + +/* +export function addOriginalScope( + map: GenMapping, + data: { + start: Pos; + end: Pos; + source: string; + kind: string; + name?: string; + variables?: string[]; + }, +): OriginalScopeInfo { + const { start, end, source, kind, name, variables } = data; + const { + _sources: sources, + _sourcesContent: sourcesContent, + _originalScopes: originalScopes, + _names: names, + } = cast(map); + const index = put(sources, source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (index === originalScopes.length) originalScopes[index] = []; + + const kindIndex = put(names, kind); + const scope: OriginalScope = name + ? [start.line - 1, start.column, end.line - 1, end.column, kindIndex, put(names, name)] + : [start.line - 1, start.column, end.line - 1, end.column, kindIndex]; + if (variables) { + scope.vars = variables.map((v) => put(names, v)); + } + const len = originalScopes[index].push(scope); + return [index, len - 1, variables]; +} +*/ + +// Generated Ranges +/* +export function addGeneratedRange( + map: GenMapping, + data: { + start: Pos; + isScope: boolean; + originalScope?: OriginalScopeInfo; + callsite?: OriginalPos; + }, +): GeneratedRangeInfo { + const { start, isScope, originalScope, callsite } = data; + const { + _originalScopes: originalScopes, + _sources: sources, + _sourcesContent: sourcesContent, + _generatedRanges: generatedRanges, + } = cast(map); + + const range: GeneratedRange = [ + start.line - 1, + start.column, + 0, + 0, + originalScope ? originalScope[0] : -1, + originalScope ? originalScope[1] : -1, + ]; + if (originalScope?.[2]) { + range.bindings = originalScope[2].map(() => [[-1]]); + } + if (callsite) { + const index = put(sources, callsite.source); + if (index === sourcesContent.length) sourcesContent[index] = null; + if (index === originalScopes.length) originalScopes[index] = []; + range.callsite = [index, callsite.line - 1, callsite.column]; + } + if (isScope) range.isScope = true; + generatedRanges.push(range); + + return [range, originalScope?.[2]]; +} + +export function setEndPosition(range: GeneratedRangeInfo, pos: Pos) { + range[0][2] = pos.line - 1; + range[0][3] = pos.column; +} + +export function addBinding( + map: GenMapping, + range: GeneratedRangeInfo, + variable: string, + expression: string | BindingExpressionRange, +) { + const { _names: names } = cast(map); + const bindings = (range[0].bindings ||= []); + const vars = range[1]; + + const index = vars!.indexOf(variable); + const binding = getIndex(bindings, index); + + if (typeof expression === 'string') binding[0] = [put(names, expression)]; + else { + const { start } = expression; + binding.push([put(names, expression.expression), start.line - 1, start.column]); + } +} +*/ diff --git a/node_modules/@jridgewell/gen-mapping/src/set-array.ts b/node_modules/@jridgewell/gen-mapping/src/set-array.ts new file mode 100644 index 0000000..a2a73a5 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/set-array.ts @@ -0,0 +1,82 @@ +type Key = string | number | symbol; + +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export class SetArray { + declare private _indexes: Record; + declare array: readonly T[]; + + constructor() { + this._indexes = { __proto__: null } as any; + this.array = []; + } +} + +interface PublicSet { + array: T[]; + _indexes: SetArray['_indexes']; +} + +/** + * Typescript doesn't allow friend access to private fields, so this just casts the set into a type + * with public access modifiers. + */ +function cast(set: SetArray): PublicSet { + return set as any; +} + +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export function get(setarr: SetArray, key: T): number | undefined { + return cast(setarr)._indexes[key]; +} + +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export function put(setarr: SetArray, key: T): number { + // The key may or may not be present. If it is present, it's a number. + const index = get(setarr, key); + if (index !== undefined) return index; + + const { array, _indexes: indexes } = cast(setarr); + + const length = array.push(key); + return (indexes[key] = length - 1); +} + +/** + * Pops the last added item out of the SetArray. + */ +export function pop(setarr: SetArray): void { + const { array, _indexes: indexes } = cast(setarr); + if (array.length === 0) return; + + const last = array.pop()!; + indexes[last] = undefined; +} + +/** + * Removes the key, if it exists in the set. + */ +export function remove(setarr: SetArray, key: T): void { + const index = get(setarr, key); + if (index === undefined) return; + + const { array, _indexes: indexes } = cast(setarr); + for (let i = index + 1; i < array.length; i++) { + const k = array[i]; + array[i - 1] = k; + indexes[k]!--; + } + indexes[key] = undefined; + array.pop(); +} diff --git a/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts b/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts new file mode 100644 index 0000000..fb296dd --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts @@ -0,0 +1,16 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; + +export type SourceMapSegment = + | [GeneratedColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; + +export const COLUMN = 0; +export const SOURCES_INDEX = 1; +export const SOURCE_LINE = 2; +export const SOURCE_COLUMN = 3; +export const NAMES_INDEX = 4; diff --git a/node_modules/@jridgewell/gen-mapping/src/types.ts b/node_modules/@jridgewell/gen-mapping/src/types.ts new file mode 100644 index 0000000..b087f70 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/src/types.ts @@ -0,0 +1,61 @@ +// import type { GeneratedRange, OriginalScope } from '@jridgewell/sourcemap-codec'; +import type { SourceMapSegment } from './sourcemap-segment'; + +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} + +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; + // originalScopes: string[]; + // generatedRanges: string; +} + +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; + // originalScopes: readonly OriginalScope[][]; + // generatedRanges: readonly GeneratedRange[]; +} + +export interface Pos { + line: number; // 1-based + column: number; // 0-based +} + +export interface OriginalPos extends Pos { + source: string; +} + +export interface BindingExpressionRange { + start: Pos; + expression: string; +} + +// export type OriginalScopeInfo = [number, number, string[] | undefined]; +// export type GeneratedRangeInfo = [GeneratedRange, string[] | undefined]; + +export type Mapping = + | { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; + } + | { + generated: Pos; + source: string; + original: Pos; + name: string; + } + | { + generated: Pos; + source: string; + original: Pos; + name: undefined; + }; diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts new file mode 100644 index 0000000..7618d85 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts @@ -0,0 +1,89 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.cts'; +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; +/** + * Provides the state to generate a sourcemap. + */ +export declare class GenMapping { + private _names; + private _sources; + private _sourcesContent; + private _mappings; + private _ignoreList; + file: string | null | undefined; + sourceRoot: string | null | undefined; + constructor({ file, sourceRoot }?: Options); +} +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; +}): void; +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export declare const maybeAddSegment: typeof addSegment; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export declare const maybeAddMapping: typeof addMapping; +/** + * Adds/removes the content of the source file to the source map. + */ +export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; +export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export declare function fromMap(input: SourceMapInput): GenMapping; +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export declare function allMappings(map: GenMapping): Mapping[]; +//# sourceMappingURL=gen-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map new file mode 100644 index 0000000..8a2b183 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping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;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAS9F;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAO,QAYvE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAwB9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAO9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAYzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts new file mode 100644 index 0000000..bbc0d89 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts @@ -0,0 +1,89 @@ +import type { SourceMapInput } from '@jridgewell/trace-mapping'; +import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.mts'; +export type { DecodedSourceMap, EncodedSourceMap, Mapping }; +export type Options = { + file?: string | null; + sourceRoot?: string | null; +}; +/** + * Provides the state to generate a sourcemap. + */ +export declare class GenMapping { + private _names; + private _sources; + private _sourcesContent; + private _mappings; + private _ignoreList; + file: string | null | undefined; + sourceRoot: string | null | undefined; + constructor({ file, sourceRoot }?: Options); +} +/** + * A low-level API to associate a generated position with an original source position. Line and + * column here are 0-based, unlike `addMapping`. + */ +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void; +export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void; +/** + * A high-level API to associate a generated position with an original source position. Line is + * 1-based, but column is 0-based, due to legacy behavior in `source-map` library. + */ +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source?: null; + original?: null; + name?: null; + content?: null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name?: null; + content?: string | null; +}): void; +export declare function addMapping(map: GenMapping, mapping: { + generated: Pos; + source: string; + original: Pos; + name: string; + content?: string | null; +}): void; +/** + * Same as `addSegment`, but will only add the segment if it generates useful information in the + * resulting map. This only works correctly if segments are added **in order**, meaning you should + * not add a segment with a lower generated line/column than one that came before. + */ +export declare const maybeAddSegment: typeof addSegment; +/** + * Same as `addMapping`, but will only add the mapping if it generates useful information in the + * resulting map. This only works correctly if mappings are added **in order**, meaning you should + * not add a mapping with a lower generated line/column than one that came before. + */ +export declare const maybeAddMapping: typeof addMapping; +/** + * Adds/removes the content of the source file to the source map. + */ +export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void; +export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toDecodedMap(map: GenMapping): DecodedSourceMap; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function toEncodedMap(map: GenMapping): EncodedSourceMap; +/** + * Constructs a new GenMapping, using the already present mappings of the input. + */ +export declare function fromMap(input: SourceMapInput): GenMapping; +/** + * Returns an array of high-level mapping objects for every recorded segment, which could then be + * passed to the `source-map` library. + */ +export declare function allMappings(map: GenMapping): Mapping[]; +//# sourceMappingURL=gen-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map new file mode 100644 index 0000000..8a2b183 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"gen-mapping.d.ts","sourceRoot":"","sources":["../src/gen-mapping.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,GAAG,EACH,OAAO,EAKR,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAIF;;GAEG;AACH,qBAAa,UAAU;IACrB,QAAgB,MAAM,CAAmB;IACzC,QAAgB,QAAQ,CAAmB;IAC3C,QAAgB,eAAe,CAAoB;IACnD,QAAgB,SAAS,CAAuB;IAGhD,QAAgB,WAAW,CAAmB;IACtC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;gBAElC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAE,OAAY;CAW/C;AAoBD;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,IAAI,EACb,UAAU,CAAC,EAAE,IAAI,EACjB,YAAY,CAAC,EAAE,IAAI,EACnB,IAAI,CAAC,EAAE,IAAI,EACX,OAAO,CAAC,EAAE,IAAI,GACb,IAAI,CAAC;AACR,wBAAgB,UAAU,CACxB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,MAAM,EACf,SAA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E,OAAO,UAqBpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,OAAO,UAEpC,CAAC;AAEF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAS9F;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAO,QAYvE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAwB9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAO9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAYzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts new file mode 100644 index 0000000..5d8cda3 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts @@ -0,0 +1,33 @@ +type Key = string | number | symbol; +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export declare class SetArray { + private _indexes; + array: readonly T[]; + constructor(); +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export declare function get(setarr: SetArray, key: T): number | undefined; +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare function put(setarr: SetArray, key: T): number; +/** + * Pops the last added item out of the SetArray. + */ +export declare function pop(setarr: SetArray): void; +/** + * Removes the key, if it exists in the set. + */ +export declare function remove(setarr: SetArray, key: T): void; +export {}; +//# sourceMappingURL=set-array.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map new file mode 100644 index 0000000..c52b8bc --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts new file mode 100644 index 0000000..5d8cda3 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts @@ -0,0 +1,33 @@ +type Key = string | number | symbol; +/** + * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the + * index of the `key` in the backing array. + * + * This is designed to allow synchronizing a second array with the contents of the backing array, + * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`, + * and there are never duplicates. + */ +export declare class SetArray { + private _indexes; + array: readonly T[]; + constructor(); +} +/** + * Gets the index associated with `key` in the backing array, if it is already present. + */ +export declare function get(setarr: SetArray, key: T): number | undefined; +/** + * Puts `key` into the backing array, if it is not already present. Returns + * the index of the `key` in the backing array. + */ +export declare function put(setarr: SetArray, key: T): number; +/** + * Pops the last added item out of the SetArray. + */ +export declare function pop(setarr: SetArray): void; +/** + * Removes the key, if it exists in the set. + */ +export declare function remove(setarr: SetArray, key: T): void; +export {}; +//# sourceMappingURL=set-array.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map new file mode 100644 index 0000000..c52b8bc --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts new file mode 100644 index 0000000..6886295 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts @@ -0,0 +1,13 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map new file mode 100644 index 0000000..23cdc45 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts new file mode 100644 index 0000000..6886295 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts @@ -0,0 +1,13 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map new file mode 100644 index 0000000..23cdc45 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.cts b/node_modules/@jridgewell/gen-mapping/types/types.d.cts new file mode 100644 index 0000000..58da00a --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.cts @@ -0,0 +1,44 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; +} +export interface Pos { + line: number; + column: number; +} +export interface OriginalPos extends Pos { + source: string; +} +export interface BindingExpressionRange { + start: Pos; + expression: string; +} +export type Mapping = { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; +} | { + generated: Pos; + source: string; + original: Pos; + name: string; +} | { + generated: Pos; + source: string; + original: Pos; + name: undefined; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map b/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map new file mode 100644 index 0000000..159e734 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.mts b/node_modules/@jridgewell/gen-mapping/types/types.d.mts new file mode 100644 index 0000000..e9837eb --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.mts @@ -0,0 +1,44 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +export interface SourceMapV3 { + file?: string | null; + names: readonly string[]; + sourceRoot?: string; + sources: readonly (string | null)[]; + sourcesContent?: readonly (string | null)[]; + version: 3; + ignoreList?: readonly number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: readonly SourceMapSegment[][]; +} +export interface Pos { + line: number; + column: number; +} +export interface OriginalPos extends Pos { + source: string; +} +export interface BindingExpressionRange { + start: Pos; + expression: string; +} +export type Mapping = { + generated: Pos; + source: undefined; + original: undefined; + name: undefined; +} | { + generated: Pos; + source: string; + original: Pos; + name: string; +} | { + generated: Pos; + source: string; + original: Pos; + name: undefined; +}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map b/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map new file mode 100644 index 0000000..159e734 --- /dev/null +++ b/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings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;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE new file mode 100644 index 0000000..0a81b2a --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/LICENSE @@ -0,0 +1,19 @@ +Copyright 2019 Justin Ridgewell + +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. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md new file mode 100644 index 0000000..2fe70df --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/README.md @@ -0,0 +1,40 @@ +# @jridgewell/resolve-uri + +> Resolve a URI relative to an optional base URI + +Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. + +## Installation + +```sh +npm install @jridgewell/resolve-uri +``` + +## Usage + +```typescript +function resolve(input: string, base?: string): string; +``` + +```js +import resolve from '@jridgewell/resolve-uri'; + +resolve('foo', 'https://example.com'); // => 'https://example.com/foo' +``` + +| Input | Base | Resolution | Explanation | +|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| +| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | +| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | +| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | +| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | +| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | +| `/example` | _rest_ | `/example` | Input is normalized only | +| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | +| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | +| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | +| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | +| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | +| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | +| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | +| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs new file mode 100644 index 0000000..e958e88 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs @@ -0,0 +1,232 @@ +// Matches the scheme of a URL, eg "http://" +const schemeRegex = /^[\w+.-]+:\/\//; +/** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ +const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; +/** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ +const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; +function isAbsoluteUrl(input) { + return schemeRegex.test(input); +} +function isSchemeRelativeUrl(input) { + return input.startsWith('//'); +} +function isAbsolutePath(input) { + return input.startsWith('/'); +} +function isFileUrl(input) { + return input.startsWith('file:'); +} +function isRelative(input) { + return /^[.?#]/.test(input); +} +function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); +} +function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); +} +function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; +} +function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; +} +function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} +function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } +} +/** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ +function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; +} +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } +} + +export { resolve as default }; +//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map new file mode 100644 index 0000000..1de97d0 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAA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,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;IACvC,QAAQ,SAAS;;;QAIf,kBAAkB;QAClB;YACE,OAAO,SAAS,CAAC;QAEnB,2BAA2B;;YAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,CAAC,IAAI;gBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;YAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;gBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;aAChC;YAED,OAAO,IAAI,GAAG,SAAS,CAAC;SACzB;QAED;YACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js new file mode 100644 index 0000000..a783049 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js @@ -0,0 +1,240 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); +})(this, (function () { 'use strict'; + + // Matches the scheme of a URL, eg "http://" + const schemeRegex = /^[\w+.-]+:\/\//; + /** + * Matches the parts of a URL: + * 1. Scheme, including ":", guaranteed. + * 2. User/password, including "@", optional. + * 3. Host, guaranteed. + * 4. Port, including ":", optional. + * 5. Path, including "/", optional. + * 6. Query, including "?", optional. + * 7. Hash, including "#", optional. + */ + const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; + /** + * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start + * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). + * + * 1. Host, optional. + * 2. Path, which may include "/", guaranteed. + * 3. Query, including "?", optional. + * 4. Hash, including "#", optional. + */ + const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; + function isAbsoluteUrl(input) { + return schemeRegex.test(input); + } + function isSchemeRelativeUrl(input) { + return input.startsWith('//'); + } + function isAbsolutePath(input) { + return input.startsWith('/'); + } + function isFileUrl(input) { + return input.startsWith('file:'); + } + function isRelative(input) { + return /^[.?#]/.test(input); + } + function parseAbsoluteUrl(input) { + const match = urlRegex.exec(input); + return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); + } + function parseFileUrl(input) { + const match = fileRegex.exec(input); + const path = match[2]; + return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); + } + function makeUrl(scheme, user, host, port, path, query, hash) { + return { + scheme, + user, + host, + port, + path, + query, + hash, + type: 7 /* Absolute */, + }; + } + function parseUrl(input) { + if (isSchemeRelativeUrl(input)) { + const url = parseAbsoluteUrl('http:' + input); + url.scheme = ''; + url.type = 6 /* SchemeRelative */; + return url; + } + if (isAbsolutePath(input)) { + const url = parseAbsoluteUrl('http://foo.com' + input); + url.scheme = ''; + url.host = ''; + url.type = 5 /* AbsolutePath */; + return url; + } + if (isFileUrl(input)) + return parseFileUrl(input); + if (isAbsoluteUrl(input)) + return parseAbsoluteUrl(input); + const url = parseAbsoluteUrl('http://foo.com/' + input); + url.scheme = ''; + url.host = ''; + url.type = input + ? input.startsWith('?') + ? 3 /* Query */ + : input.startsWith('#') + ? 2 /* Hash */ + : 4 /* RelativePath */ + : 1 /* Empty */; + return url; + } + function stripPathFilename(path) { + // If a path ends with a parent directory "..", then it's a relative path with excess parent + // paths. It's not a file, so we can't strip it. + if (path.endsWith('/..')) + return path; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); + } + function mergePaths(url, base) { + normalizePath(base, base.type); + // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative + // path). + if (url.path === '/') { + url.path = base.path; + } + else { + // Resolution happens relative to the base path's directory, not the file. + url.path = stripPathFilename(base.path) + url.path; + } + } + /** + * The path can have empty directories "//", unneeded parents "foo/..", or current directory + * "foo/.". We need to normalize to a standard representation. + */ + function normalizePath(url, type) { + const rel = type <= 4 /* RelativePath */; + const pieces = url.path.split('/'); + // We need to preserve the first piece always, so that we output a leading slash. The item at + // pieces[0] is an empty string. + let pointer = 1; + // Positive is the number of real directories we've output, used for popping a parent directory. + // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". + let positive = 0; + // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will + // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a + // real directory, we won't need to append, unless the other conditions happen again. + let addTrailingSlash = false; + for (let i = 1; i < pieces.length; i++) { + const piece = pieces[i]; + // An empty directory, could be a trailing slash, or just a double "//" in the path. + if (!piece) { + addTrailingSlash = true; + continue; + } + // If we encounter a real directory, then we don't need to append anymore. + addTrailingSlash = false; + // A current directory, which we can always drop. + if (piece === '.') + continue; + // A parent directory, we need to see if there are any real directories we can pop. Else, we + // have an excess of parents, and we'll need to keep the "..". + if (piece === '..') { + if (positive) { + addTrailingSlash = true; + positive--; + pointer--; + } + else if (rel) { + // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute + // URL, protocol relative URL, or an absolute path, we don't need to keep excess. + pieces[pointer++] = piece; + } + continue; + } + // We've encountered a real directory. Move it to the next insertion pointer, which accounts for + // any popped or dropped directories. + pieces[pointer++] = piece; + positive++; + } + let path = ''; + for (let i = 1; i < pointer; i++) { + path += '/' + pieces[i]; + } + if (!path || (addTrailingSlash && !path.endsWith('/..'))) { + path += '/'; + } + url.path = path; + } + /** + * Attempts to resolve `input` URL/path relative to `base`. + */ + function resolve(input, base) { + if (!input && !base) + return ''; + const url = parseUrl(input); + let inputType = url.type; + if (base && inputType !== 7 /* Absolute */) { + const baseUrl = parseUrl(base); + const baseType = baseUrl.type; + switch (inputType) { + case 1 /* Empty */: + url.hash = baseUrl.hash; + // fall through + case 2 /* Hash */: + url.query = baseUrl.query; + // fall through + case 3 /* Query */: + case 4 /* RelativePath */: + mergePaths(url, baseUrl); + // fall through + case 5 /* AbsolutePath */: + // The host, user, and port are joined, you can't copy one without the others. + url.user = baseUrl.user; + url.host = baseUrl.host; + url.port = baseUrl.port; + // fall through + case 6 /* SchemeRelative */: + // The input doesn't have a schema at least, so we need to copy at least that over. + url.scheme = baseUrl.scheme; + } + if (baseType > inputType) + inputType = baseType; + } + normalizePath(url, inputType); + const queryHash = url.query + url.hash; + switch (inputType) { + // This is impossible, because of the empty checks at the start of the function. + // case UrlType.Empty: + case 2 /* Hash */: + case 3 /* Query */: + return queryHash; + case 4 /* RelativePath */: { + // The first char is always a "/", and we need it to be relative. + const path = url.path.slice(1); + if (!path) + return queryHash || '.'; + if (isRelative(base || input) && !isRelative(path)) { + // If base started with a leading ".", or there is no base and input started with a ".", + // then we need to ensure that the relative path starts with a ".". We don't know if + // relative starts with a "..", though, so check before prepending. + return './' + path + queryHash; + } + return path + queryHash; + } + case 5 /* AbsolutePath */: + return url.path + queryHash; + default: + return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; + } + } + + return resolve; + +})); +//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map new file mode 100644 index 0000000..70a37f2 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,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O,CAAC,IAAI,CAAC;oBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;gBAG1B;;oBAEE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;aAC/B;YACD,IAAI,QAAQ,GAAG,SAAS;gBAAE,SAAS,GAAG,QAAQ,CAAC;SAChD;QAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;QACvC,QAAQ,SAAS;;;YAIf,kBAAkB;YAClB;gBACE,OAAO,SAAS,CAAC;YAEnB,2BAA2B;;gBAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,IAAI;oBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;gBAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;oBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;iBAChC;gBAED,OAAO,IAAI,GAAG,SAAS,CAAC;aACzB;YAED;gBACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts new file mode 100644 index 0000000..b7f0b3b --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts @@ -0,0 +1,4 @@ +/** + * Attempts to resolve `input` URL/path relative to `base`. + */ +export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json new file mode 100644 index 0000000..02a4c51 --- /dev/null +++ b/node_modules/@jridgewell/resolve-uri/package.json @@ -0,0 +1,69 @@ +{ + "name": "@jridgewell/resolve-uri", + "version": "3.1.2", + "description": "Resolve a URI relative to an optional base URI", + "keywords": [ + "resolve", + "uri", + "url", + "path" + ], + "author": "Justin Ridgewell ", + "license": "MIT", + "repository": "https://github.com/jridgewell/resolve-uri", + "main": "dist/resolve-uri.umd.js", + "module": "dist/resolve-uri.mjs", + "types": "dist/types/resolve-uri.d.ts", + "exports": { + ".": [ + { + "types": "./dist/types/resolve-uri.d.ts", + "browser": "./dist/resolve-uri.umd.js", + "require": "./dist/resolve-uri.umd.js", + "import": "./dist/resolve-uri.mjs" + }, + "./dist/resolve-uri.umd.js" + ], + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "engines": { + "node": ">=6.0.0" + }, + "scripts": { + "prebuild": "rm -rf dist", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build" + }, + "devDependencies": { + "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", + "@rollup/plugin-typescript": "8.3.0", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "c8": "7.11.0", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.66.0", + "typescript": "4.5.5" + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +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. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 0000000..b3e0708 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,264 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +local code 5815135 bytes +@jridgewell/sourcemap-codec 1.4.15 5868160 bytes +sourcemap-codec 5492584 bytes +source-map-0.6.1 13569984 bytes +source-map-0.8.0 6390584 bytes +chrome dev tools 8011136 bytes +Smallest memory usage is sourcemap-codec + +Decode speed: +decode: local code x 492 ops/sec ±1.22% (90 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) +decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) +decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) +decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) +chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 444248 bytes +@jridgewell/sourcemap-codec 1.4.15 623024 bytes +sourcemap-codec 8696280 bytes +source-map-0.6.1 8745176 bytes +source-map-0.8.0 8736624 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 796 ops/sec ±0.11% (97 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) +encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) +encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) +encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) +Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +local code 35424960 bytes +@jridgewell/sourcemap-codec 1.4.15 35424696 bytes +sourcemap-codec 36033464 bytes +source-map-0.6.1 62253704 bytes +source-map-0.8.0 43843920 bytes +chrome dev tools 45111400 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Decode speed: +decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) +decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) +decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) +decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) +chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 2606016 bytes +@jridgewell/sourcemap-codec 1.4.15 2626440 bytes +sourcemap-codec 21152576 bytes +source-map-0.6.1 25023928 bytes +source-map-0.8.0 25256448 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 127 ops/sec ±0.18% (83 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) +encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) +encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) +encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +local code 261696 bytes +@jridgewell/sourcemap-codec 1.4.15 244296 bytes +sourcemap-codec 302816 bytes +source-map-0.6.1 939176 bytes +source-map-0.8.0 336 bytes +chrome dev tools 587368 bytes +Smallest memory usage is source-map-0.8.0 + +Decode speed: +decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) +decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) +decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) +decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) +chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 262944 bytes +@jridgewell/sourcemap-codec 1.4.15 25544 bytes +sourcemap-codec 323048 bytes +source-map-0.6.1 507808 bytes +source-map-0.8.0 507480 bytes +Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 + +Encode speed: +encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) +encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) +encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +local code 678816 bytes +@jridgewell/sourcemap-codec 1.4.15 678816 bytes +sourcemap-codec 816400 bytes +source-map-0.6.1 2288864 bytes +source-map-0.8.0 721360 bytes +chrome dev tools 1012512 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) +decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) +decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) +decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) +chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 + +Encode Memory Usage: +local code 140960 bytes +@jridgewell/sourcemap-codec 1.4.15 159808 bytes +sourcemap-codec 969304 bytes +source-map-0.6.1 930520 bytes +source-map-0.8.0 930248 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) +encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) +encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) +encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) +Fastest is encode: local code + + +*** + + +vscode.map - 2141001 segments + +Decode Memory Usage: +local code 198955264 bytes +@jridgewell/sourcemap-codec 1.4.15 199175352 bytes +sourcemap-codec 199102688 bytes +source-map-0.6.1 386323432 bytes +source-map-0.8.0 244116432 bytes +chrome dev tools 293734280 bytes +Smallest memory usage is local code + +Decode speed: +decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) +decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) +decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) +decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) +decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) +chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +local code 13509880 bytes +@jridgewell/sourcemap-codec 1.4.15 13537648 bytes +sourcemap-codec 32540104 bytes +source-map-0.6.1 127531040 bytes +source-map-0.8.0 127535312 bytes +Smallest memory usage is local code + +Encode speed: +encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) +encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) +encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) +encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) +encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 0000000..532bab3 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,423 @@ +// src/vlq.ts +var comma = ",".charCodeAt(0); +var semicolon = ";".charCodeAt(0); +var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var intToChar = new Uint8Array(64); +var charToInt = new Uint8Array(128); +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -2147483648 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? -delta << 1 | 1 : delta << 1; + do { + let clamped = delta & 31; + delta >>>= 5; + if (delta > 0) clamped |= 32; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} + +// src/strings.ts +var bufLength = 1024 * 16; +var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + } +} : { + decode(buf) { + let out = ""; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + } +}; +var StringWriter = class { + constructor() { + this.pos = 0; + this.out = ""; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +}; +var StringReader = class { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +}; + +// src/scopes.ts +var EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 1; + const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 1 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(";"); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 1; + const hasCallsite = fields & 2; + const hasScope = fields & 4; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger( + reader, + definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 + ); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger( + reader, + sameSource && prevLine === callsiteLine ? callsiteColumn : 0 + ); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings + } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +// src/sourcemap-codec.ts +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(";"); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} +export { + decode, + decodeGeneratedRanges, + decodeOriginalScopes, + encode, + encodeGeneratedRanges, + encodeOriginalScopes +}; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 0000000..c276844 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts", "../src/sourcemap-codec.ts"], + "mappings": ";AAEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,cAAc,QAAsB,UAA0B;AAC5E,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,KAAG;AACD,UAAM,IAAI,OAAO,KAAK;AACtB,cAAU,UAAU,CAAC;AACrB,cAAU,UAAU,OAAO;AAC3B,aAAS;AAAA,EACX,SAAS,UAAU;AAEnB,QAAM,eAAe,QAAQ;AAC7B,aAAW;AAEX,MAAI,cAAc;AAChB,YAAQ,cAAc,CAAC;AAAA,EACzB;AAEA,SAAO,WAAW;AACpB;AAEO,SAAS,cAAc,SAAuB,KAAa,UAA0B;AAC1F,MAAI,QAAQ,MAAM;AAElB,UAAQ,QAAQ,IAAK,CAAC,SAAS,IAAK,IAAI,SAAS;AACjD,KAAG;AACD,QAAI,UAAU,QAAQ;AACtB,eAAW;AACX,QAAI,QAAQ,EAAG,YAAW;AAC1B,YAAQ,MAAM,UAAU,OAAO,CAAC;AAAA,EAClC,SAAS,QAAQ;AAEjB,SAAO;AACT;AAEO,SAAS,WAAW,QAAsB,KAAa;AAC5D,M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AI,EAAG,QAAO,MAAM,KAAK;AAE7B,kBAAY,cAAc,QAAQ,QAAQ,CAAC,GAAG,SAAS;AAEvD,UAAI,QAAQ,WAAW,EAAG;AAC1B,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAC7D,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AACzD,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", + "names": [] +} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 0000000..7990627 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,452 @@ +(function (global, factory, m) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(module) : + typeof define === 'function' && define.amd ? define(['module'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(m = { exports: {} }), global.sourcemapCodec = 'default' in m.exports ? m.exports.default : m.exports); +})(this, (function (module) { +"use strict"; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/sourcemap-codec.ts +var sourcemap_codec_exports = {}; +__export(sourcemap_codec_exports, { + decode: () => decode, + decodeGeneratedRanges: () => decodeGeneratedRanges, + decodeOriginalScopes: () => decodeOriginalScopes, + encode: () => encode, + encodeGeneratedRanges: () => encodeGeneratedRanges, + encodeOriginalScopes: () => encodeOriginalScopes +}); +module.exports = __toCommonJS(sourcemap_codec_exports); + +// src/vlq.ts +var comma = ",".charCodeAt(0); +var semicolon = ";".charCodeAt(0); +var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +var intToChar = new Uint8Array(64); +var charToInt = new Uint8Array(128); +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +function decodeInteger(reader, relative) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -2147483648 | -value; + } + return relative + value; +} +function encodeInteger(builder, num, relative) { + let delta = num - relative; + delta = delta < 0 ? -delta << 1 | 1 : delta << 1; + do { + let clamped = delta & 31; + delta >>>= 5; + if (delta > 0) clamped |= 32; + builder.write(intToChar[clamped]); + } while (delta > 0); + return num; +} +function hasMoreVlq(reader, max) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} + +// src/strings.ts +var bufLength = 1024 * 16; +var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + } +} : { + decode(buf) { + let out = ""; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + } +}; +var StringWriter = class { + constructor() { + this.pos = 0; + this.out = ""; + this.buffer = new Uint8Array(bufLength); + } + write(v) { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + flush() { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +}; +var StringReader = class { + constructor(buffer) { + this.pos = 0; + this.buffer = buffer; + } + next() { + return this.buffer.charCodeAt(this.pos++); + } + peek() { + return this.buffer.charCodeAt(this.pos); + } + indexOf(char) { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +}; + +// src/scopes.ts +var EMPTY = []; +function decodeOriginalScopes(input) { + const { length } = input; + const reader = new StringReader(input); + const scopes = []; + const stack = []; + let line = 0; + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + if (!hasMoreVlq(reader, length)) { + const last = stack.pop(); + last[2] = line; + last[3] = column; + continue; + } + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 1; + const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; + let vars = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + scopes.push(scope); + stack.push(scope); + } + return scopes; +} +function encodeOriginalScopes(scopes) { + const writer = new StringWriter(); + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + return writer.flush(); +} +function _encodeOriginalScopes(scopes, index, writer, state) { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + if (index > 0) writer.write(comma); + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + const fields = scope.length === 6 ? 1 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) encodeInteger(writer, scope[5], 0); + for (const v of vars) { + encodeInteger(writer, v, 0); + } + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + return index; +} +function decodeGeneratedRanges(input) { + const { length } = input; + const reader = new StringReader(input); + const ranges = []; + const stack = []; + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + do { + const semi = reader.indexOf(";"); + let genColumn = 0; + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop(); + last[2] = genLine; + last[3] = genColumn; + continue; + } + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 1; + const hasCallsite = fields & 2; + const hasScope = fields & 4; + let callsite = null; + let bindings = EMPTY; + let range; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger( + reader, + definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 + ); + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; + } else { + range = [genLine, genColumn, 0, 0]; + } + range.isScope = !!hasScope; + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger( + reader, + sameSource && prevLine === callsiteLine ? callsiteColumn : 0 + ); + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + ranges.push(range); + stack.push(range); + } + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + return ranges; +} +function encodeGeneratedRanges(ranges) { + if (ranges.length === 0) return ""; + const writer = new StringWriter(); + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + return writer.flush(); +} +function _encodeGeneratedRanges(ranges, index, writer, state) { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings + } = range; + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + state[1] = encodeInteger(writer, range[1], state[1]); + const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); + encodeInteger(writer, fields, 0); + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); + encodeInteger(writer, expRange[0], 0); + } + } + } + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || l === endLine && c >= endColumn) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + return index; +} +function catchupLine(writer, lastLine, line) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} + +// src/sourcemap-codec.ts +function decode(mappings) { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + do { + const semi = reader.indexOf(";"); + const line = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + while (reader.pos < semi) { + let seg; + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + line.push(seg); + reader.pos++; + } + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + return decoded; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + let genColumn = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + genColumn = encodeInteger(writer, segment[0], genColumn); + if (segment.length === 1) continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + if (segment.length === 4) continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + return writer.flush(); +} +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 0000000..febda21 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/sourcemap-codec.ts", "../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,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GAAG;AACb,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,OAAQ,MAAK,IAAI;AACtB,YAAQ,KAAK,IAAI;AACjB,WAAO,MAAM,OAAO;AAAA,EACtB,SAAS,OAAO,OAAO;AAEvB,SAAO;AACT;AAEA,SAAS,KAAK,MAA0B;AACtC,OAAK,KAAK,cAAc;AAC1B;AAEA,SAAS,eAAe,GAAqB,GAA6B;AACxE,SAAO,EAAE,CAAC,IAAI,EAAE,CAAC;AACnB;AAIO,SAAS,OAAO,SAA8C;AACnE,QAAM,SAAS,IAAI,aAAa;AAChC,MAAI,eAAe;AACnB,MAAI,aAAa;AACjB,MAAI,eAAe;AACnB,MAAI,aAAa;AAEjB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,OAAO,QAAQ,CAAC;AACtB,QAAI,IAAI,EAAG,QAAO,MAAM,SAAS;AACjC,QAAI,KAAK,WAAW,EAAG;AAEvB,QAAI,YAAY;AAEhB,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,UAAU,KAAK,CAAC;AACtB,UAAI,IAAI,EAAG,QAAO,MAAM,KAAK;AAE7B,kBAAY,cAAc,QAAQ,QAAQ,CAAC,GAAG,SAAS;AAEvD,UAAI,QAAQ,WAAW,EAAG;AAC1B,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAC7D,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AACzD,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", + "names": [] +} diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 0000000..e414952 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,67 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.5.4", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "types/sourcemap-codec.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/sourcemap-codec.d.mts", + "default": "./dist/sourcemap-codec.mjs" + }, + "require": { + "types": "./types/sourcemap-codec.d.cts", + "default": "./dist/sourcemap-codec.umd.js" + }, + "browser": { + "types": "./types/sourcemap-codec.d.cts", + "default": "./dist/sourcemap-codec.umd.js" + } + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs sourcemap-codec.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/sourcemap-codec" + }, + "author": "Justin Ridgewell ", + "license": "MIT" +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts new file mode 100644 index 0000000..d194c2f --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts @@ -0,0 +1,345 @@ +import { StringReader, StringWriter } from './strings'; +import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; + +const EMPTY: any[] = []; + +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; + +type Mix = (A & O) | (B & O); + +export type OriginalScope = Mix< + [Line, Column, Line, Column, Kind], + [Line, Column, Line, Column, Kind, Name], + { vars: Var[] } +>; + +export type GeneratedRange = Mix< + [Line, Column, Line, Column], + [Line, Column, Line, Column, SourcesIndex, ScopesIndex], + { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; + } +>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; + +export function decodeOriginalScopes(input: string): OriginalScope[] { + const { length } = input; + const reader = new StringReader(input); + const scopes: OriginalScope[] = []; + const stack: OriginalScope[] = []; + let line = 0; + + for (; reader.pos < length; reader.pos++) { + line = decodeInteger(reader, line); + const column = decodeInteger(reader, 0); + + if (!hasMoreVlq(reader, length)) { + const last = stack.pop()!; + last[2] = line; + last[3] = column; + continue; + } + + const kind = decodeInteger(reader, 0); + const fields = decodeInteger(reader, 0); + const hasName = fields & 0b0001; + + const scope: OriginalScope = ( + hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind] + ) as OriginalScope; + + let vars: Var[] = EMPTY; + if (hasMoreVlq(reader, length)) { + vars = []; + do { + const varsIndex = decodeInteger(reader, 0); + vars.push(varsIndex); + } while (hasMoreVlq(reader, length)); + } + scope.vars = vars; + + scopes.push(scope); + stack.push(scope); + } + + return scopes; +} + +export function encodeOriginalScopes(scopes: OriginalScope[]): string { + const writer = new StringWriter(); + + for (let i = 0; i < scopes.length; ) { + i = _encodeOriginalScopes(scopes, i, writer, [0]); + } + + return writer.flush(); +} + +function _encodeOriginalScopes( + scopes: OriginalScope[], + index: number, + writer: StringWriter, + state: [ + number, // GenColumn + ], +): number { + const scope = scopes[index]; + const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; + + if (index > 0) writer.write(comma); + + state[0] = encodeInteger(writer, startLine, state[0]); + encodeInteger(writer, startColumn, 0); + encodeInteger(writer, kind, 0); + + const fields = scope.length === 6 ? 0b0001 : 0; + encodeInteger(writer, fields, 0); + if (scope.length === 6) encodeInteger(writer, scope[5], 0); + + for (const v of vars) { + encodeInteger(writer, v, 0); + } + + for (index++; index < scopes.length; ) { + const next = scopes[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeOriginalScopes(scopes, index, writer, state); + } + + writer.write(comma); + state[0] = encodeInteger(writer, endLine, state[0]); + encodeInteger(writer, endColumn, 0); + + return index; +} + +export function decodeGeneratedRanges(input: string): GeneratedRange[] { + const { length } = input; + const reader = new StringReader(input); + const ranges: GeneratedRange[] = []; + const stack: GeneratedRange[] = []; + + let genLine = 0; + let definitionSourcesIndex = 0; + let definitionScopeIndex = 0; + let callsiteSourcesIndex = 0; + let callsiteLine = 0; + let callsiteColumn = 0; + let bindingLine = 0; + let bindingColumn = 0; + + do { + const semi = reader.indexOf(';'); + let genColumn = 0; + + for (; reader.pos < semi; reader.pos++) { + genColumn = decodeInteger(reader, genColumn); + + if (!hasMoreVlq(reader, semi)) { + const last = stack.pop()!; + last[2] = genLine; + last[3] = genColumn; + continue; + } + + const fields = decodeInteger(reader, 0); + const hasDefinition = fields & 0b0001; + const hasCallsite = fields & 0b0010; + const hasScope = fields & 0b0100; + + let callsite: CallSite | null = null; + let bindings: Binding[] = EMPTY; + let range: GeneratedRange; + if (hasDefinition) { + const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); + definitionScopeIndex = decodeInteger( + reader, + definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0, + ); + + definitionSourcesIndex = defSourcesIndex; + range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange; + } else { + range = [genLine, genColumn, 0, 0] as GeneratedRange; + } + + range.isScope = !!hasScope; + + if (hasCallsite) { + const prevCsi = callsiteSourcesIndex; + const prevLine = callsiteLine; + callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); + const sameSource = prevCsi === callsiteSourcesIndex; + callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); + callsiteColumn = decodeInteger( + reader, + sameSource && prevLine === callsiteLine ? callsiteColumn : 0, + ); + + callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; + } + range.callsite = callsite; + + if (hasMoreVlq(reader, semi)) { + bindings = []; + do { + bindingLine = genLine; + bindingColumn = genColumn; + const expressionsCount = decodeInteger(reader, 0); + let expressionRanges: BindingExpressionRange[]; + if (expressionsCount < -1) { + expressionRanges = [[decodeInteger(reader, 0)]]; + for (let i = -1; i > expressionsCount; i--) { + const prevBl = bindingLine; + bindingLine = decodeInteger(reader, bindingLine); + bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); + const expression = decodeInteger(reader, 0); + expressionRanges.push([expression, bindingLine, bindingColumn]); + } + } else { + expressionRanges = [[expressionsCount]]; + } + bindings.push(expressionRanges); + } while (hasMoreVlq(reader, semi)); + } + range.bindings = bindings; + + ranges.push(range); + stack.push(range); + } + + genLine++; + reader.pos = semi + 1; + } while (reader.pos < length); + + return ranges; +} + +export function encodeGeneratedRanges(ranges: GeneratedRange[]): string { + if (ranges.length === 0) return ''; + + const writer = new StringWriter(); + + for (let i = 0; i < ranges.length; ) { + i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); + } + + return writer.flush(); +} + +function _encodeGeneratedRanges( + ranges: GeneratedRange[], + index: number, + writer: StringWriter, + state: [ + number, // GenLine + number, // GenColumn + number, // DefSourcesIndex + number, // DefScopesIndex + number, // CallSourcesIndex + number, // CallLine + number, // CallColumn + ], +): number { + const range = ranges[index]; + const { + 0: startLine, + 1: startColumn, + 2: endLine, + 3: endColumn, + isScope, + callsite, + bindings, + } = range; + + if (state[0] < startLine) { + catchupLine(writer, state[0], startLine); + state[0] = startLine; + state[1] = 0; + } else if (index > 0) { + writer.write(comma); + } + + state[1] = encodeInteger(writer, range[1], state[1]); + + const fields = + (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); + encodeInteger(writer, fields, 0); + + if (range.length === 6) { + const { 4: sourcesIndex, 5: scopesIndex } = range; + if (sourcesIndex !== state[2]) { + state[3] = 0; + } + state[2] = encodeInteger(writer, sourcesIndex, state[2]); + state[3] = encodeInteger(writer, scopesIndex, state[3]); + } + + if (callsite) { + const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!; + if (sourcesIndex !== state[4]) { + state[5] = 0; + state[6] = 0; + } else if (callLine !== state[5]) { + state[6] = 0; + } + state[4] = encodeInteger(writer, sourcesIndex, state[4]); + state[5] = encodeInteger(writer, callLine, state[5]); + state[6] = encodeInteger(writer, callColumn, state[6]); + } + + if (bindings) { + for (const binding of bindings) { + if (binding.length > 1) encodeInteger(writer, -binding.length, 0); + const expression = binding[0][0]; + encodeInteger(writer, expression, 0); + let bindingStartLine = startLine; + let bindingStartColumn = startColumn; + for (let i = 1; i < binding.length; i++) { + const expRange = binding[i]; + bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine); + bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn); + encodeInteger(writer, expRange[0]!, 0); + } + } + } + + for (index++; index < ranges.length; ) { + const next = ranges[index]; + const { 0: l, 1: c } = next; + if (l > endLine || (l === endLine && c >= endColumn)) { + break; + } + index = _encodeGeneratedRanges(ranges, index, writer, state); + } + + if (state[0] < endLine) { + catchupLine(writer, state[0], endLine); + state[0] = endLine; + state[1] = 0; + } else { + writer.write(comma); + } + state[1] = encodeInteger(writer, endColumn, state[1]); + + return index; +} + +function catchupLine(writer: StringWriter, lastLine: number, line: number) { + do { + writer.write(semicolon); + } while (++lastLine < line); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts new file mode 100644 index 0000000..a81f894 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts @@ -0,0 +1,111 @@ +import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; +import { StringWriter, StringReader } from './strings'; + +export { + decodeOriginalScopes, + encodeOriginalScopes, + decodeGeneratedRanges, + encodeGeneratedRanges, +} from './scopes'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; + +export type SourceMapSegment = + | [number] + | [number, number, number, number] + | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; + +export function decode(mappings: string): SourceMapMappings { + const { length } = mappings; + const reader = new StringReader(mappings); + const decoded: SourceMapMappings = []; + let genColumn = 0; + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + + do { + const semi = reader.indexOf(';'); + const line: SourceMapLine = []; + let sorted = true; + let lastCol = 0; + genColumn = 0; + + while (reader.pos < semi) { + let seg: SourceMapSegment; + + genColumn = decodeInteger(reader, genColumn); + if (genColumn < lastCol) sorted = false; + lastCol = genColumn; + + if (hasMoreVlq(reader, semi)) { + sourcesIndex = decodeInteger(reader, sourcesIndex); + sourceLine = decodeInteger(reader, sourceLine); + sourceColumn = decodeInteger(reader, sourceColumn); + + if (hasMoreVlq(reader, semi)) { + namesIndex = decodeInteger(reader, namesIndex); + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; + } else { + seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; + } + } else { + seg = [genColumn]; + } + + line.push(seg); + reader.pos++; + } + + if (!sorted) sort(line); + decoded.push(line); + reader.pos = semi + 1; + } while (reader.pos <= length); + + return decoded; +} + +function sort(line: SourceMapSegment[]) { + line.sort(sortComparator); +} + +function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { + return a[0] - b[0]; +} + +export function encode(decoded: SourceMapMappings): string; +export function encode(decoded: Readonly): string; +export function encode(decoded: Readonly): string { + const writer = new StringWriter(); + let sourcesIndex = 0; + let sourceLine = 0; + let sourceColumn = 0; + let namesIndex = 0; + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) writer.write(semicolon); + if (line.length === 0) continue; + + let genColumn = 0; + + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + if (j > 0) writer.write(comma); + + genColumn = encodeInteger(writer, segment[0], genColumn); + + if (segment.length === 1) continue; + sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); + sourceLine = encodeInteger(writer, segment[2], sourceLine); + sourceColumn = encodeInteger(writer, segment[3], sourceColumn); + + if (segment.length === 4) continue; + namesIndex = encodeInteger(writer, segment[4], namesIndex); + } + } + + return writer.flush(); +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts new file mode 100644 index 0000000..d161965 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts @@ -0,0 +1,65 @@ +const bufLength = 1024 * 16; + +// Provide a fallback for older environments. +const td = + typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf: Uint8Array): string { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf: Uint8Array): string { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + +export class StringWriter { + pos = 0; + private out = ''; + private buffer = new Uint8Array(bufLength); + + write(v: number): void { + const { buffer } = this; + buffer[this.pos++] = v; + if (this.pos === bufLength) { + this.out += td.decode(buffer); + this.pos = 0; + } + } + + flush(): string { + const { buffer, out, pos } = this; + return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; + } +} + +export class StringReader { + pos = 0; + declare private buffer: string; + + constructor(buffer: string) { + this.buffer = buffer; + } + + next(): number { + return this.buffer.charCodeAt(this.pos++); + } + + peek(): number { + return this.buffer.charCodeAt(this.pos); + } + + indexOf(char: string): number { + const { buffer, pos } = this; + const idx = buffer.indexOf(char, pos); + return idx === -1 ? buffer.length : idx; + } +} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts new file mode 100644 index 0000000..a42c681 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts @@ -0,0 +1,55 @@ +import type { StringReader, StringWriter } from './strings'; + +export const comma = ','.charCodeAt(0); +export const semicolon = ';'.charCodeAt(0); + +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII + +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} + +export function decodeInteger(reader: StringReader, relative: number): number { + let value = 0; + let shift = 0; + let integer = 0; + + do { + const c = reader.next(); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + + const shouldNegate = value & 1; + value >>>= 1; + + if (shouldNegate) { + value = -0x80000000 | -value; + } + + return relative + value; +} + +export function encodeInteger(builder: StringWriter, num: number, relative: number): number { + let delta = num - relative; + + delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; + do { + let clamped = delta & 0b011111; + delta >>>= 5; + if (delta > 0) clamped |= 0b100000; + builder.write(intToChar[clamped]); + } while (delta > 0); + + return num; +} + +export function hasMoreVlq(reader: StringReader, max: number) { + if (reader.pos >= max) return false; + return reader.peek() !== comma; +} diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts new file mode 100644 index 0000000..c583c75 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts @@ -0,0 +1,50 @@ +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; +type Mix = (A & O) | (B & O); +export type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; +//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map new file mode 100644 index 0000000..630e647 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AACl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AgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts new file mode 100644 index 0000000..c583c75 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts @@ -0,0 +1,50 @@ +type Line = number; +type Column = number; +type Kind = number; +type Name = number; +type Var = number; +type SourcesIndex = number; +type ScopesIndex = number; +type Mix = (A & O) | (B & O); +export type OriginalScope = Mix<[ + Line, + Column, + Line, + Column, + Kind +], [ + Line, + Column, + Line, + Column, + Kind, + Name +], { + vars: Var[]; +}>; +export type GeneratedRange = Mix<[ + Line, + Column, + Line, + Column +], [ + Line, + Column, + Line, + Column, + SourcesIndex, + ScopesIndex +], { + callsite: CallSite | null; + bindings: Binding[]; + isScope: boolean; +}>; +export type CallSite = [SourcesIndex, Line, Column]; +type Binding = BindingExpressionRange[]; +export type BindingExpressionRange = [Name] | [Name, Line, Column]; +export declare function decodeOriginalScopes(input: string): OriginalScope[]; +export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; +export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; +export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; +export {}; +//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map new file mode 100644 index 0000000..630e647 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MA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K,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts new file mode 100644 index 0000000..5f35e22 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts @@ -0,0 +1,9 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts'; +export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; +//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map new file mode 100644 index 0000000..7123d52 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts new file mode 100644 index 0000000..199fb9f --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts @@ -0,0 +1,9 @@ +export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.mts'; +export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.mts'; +export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; +export type SourceMapLine = SourceMapSegment[]; +export type SourceMapMappings = SourceMapLine[]; +export declare function decode(mappings: string): SourceMapMappings; +export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; +//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map new file mode 100644 index 0000000..7123d52 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts new file mode 100644 index 0000000..62faceb --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts @@ -0,0 +1,16 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map new file mode 100644 index 0000000..d3602da --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts new file mode 100644 index 0000000..62faceb --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts @@ -0,0 +1,16 @@ +export declare class StringWriter { + pos: number; + private out; + private buffer; + write(v: number): void; + flush(): string; +} +export declare class StringReader { + pos: number; + private buffer; + constructor(buffer: string); + next(): number; + peek(): number; + indexOf(char: string): number; +} +//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map new file mode 100644 index 0000000..d3602da --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts new file mode 100644 index 0000000..dbd6602 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts @@ -0,0 +1,7 @@ +import type { StringReader, StringWriter } from './strings.cts'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; +//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map new file mode 100644 index 0000000..6fdc356 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts new file mode 100644 index 0000000..2c739bc --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts @@ -0,0 +1,7 @@ +import type { StringReader, StringWriter } from './strings.mts'; +export declare const comma: number; +export declare const semicolon: number; +export declare function decodeInteger(reader: StringReader, relative: number): number; +export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; +export declare function hasMoreVlq(reader: StringReader, max: number): boolean; +//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map new file mode 100644 index 0000000..6fdc356 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE new file mode 100644 index 0000000..1f6ce94 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/LICENSE @@ -0,0 +1,19 @@ +Copyright 2024 Justin Ridgewell + +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. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md new file mode 100644 index 0000000..9fc0ed0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/README.md @@ -0,0 +1,348 @@ +# @jridgewell/trace-mapping + +> Trace the original position through a source map + +`trace-mapping` allows you to take the line and column of an output file and trace it to the +original location in the source file through a source map. + +You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This +provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. + +## Installation + +```sh +npm install @jridgewell/trace-mapping +``` + +## Usage + +```typescript +import { + TraceMap, + originalPositionFor, + generatedPositionFor, + sourceContentFor, + isIgnored, +} from '@jridgewell/trace-mapping'; + +const tracer = new TraceMap({ + version: 3, + sources: ['input.js'], + sourcesContent: ['content of input.js'], + names: ['foo'], + mappings: 'KAyCIA', + ignoreList: [], +}); + +// Lines start at line 1, columns at column 0. +const traced = originalPositionFor(tracer, { line: 1, column: 5 }); +assert.deepEqual(traced, { + source: 'input.js', + line: 42, + column: 4, + name: 'foo', +}); + +const content = sourceContentFor(tracer, traced.source); +assert.strictEqual(content, 'content for input.js'); + +const generated = generatedPositionFor(tracer, { + source: 'input.js', + line: 42, + column: 4, +}); +assert.deepEqual(generated, { + line: 1, + column: 5, +}); + +const ignored = isIgnored(tracer, 'input.js'); +assert.equal(ignored, false); +``` + +We also provide a lower level API to get the actual segment that matches our line and column. Unlike +`originalPositionFor`, `traceSegment` uses a 0-base for `line`: + +```typescript +import { traceSegment } from '@jridgewell/trace-mapping'; + +// line is 0-base. +const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); + +// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] +// Again, line is 0-base and so is sourceLine +assert.deepEqual(traced, [5, 0, 41, 4, 0]); +``` + +### SectionedSourceMaps + +The sourcemap spec defines a special `sections` field that's designed to handle concatenation of +output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool +produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` +helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a +`TraceMap` instance: + +```typescript +import { AnyMap } from '@jridgewell/trace-mapping'; +const fooOutput = 'foo'; +const barOutput = 'bar'; +const output = [fooOutput, barOutput].join('\n'); + +const sectioned = new AnyMap({ + version: 3, + sections: [ + { + // 0-base line and column + offset: { line: 0, column: 0 }, + // fooOutput's sourcemap + map: { + version: 3, + sources: ['foo.js'], + names: ['foo'], + mappings: 'AAAAA', + }, + }, + { + // barOutput's sourcemap will not affect the first line, only the second + offset: { line: 1, column: 0 }, + map: { + version: 3, + sources: ['bar.js'], + names: ['bar'], + mappings: 'AAAAA', + }, + }, + ], +}); + +const traced = originalPositionFor(sectioned, { + line: 2, + column: 0, +}); + +assert.deepEqual(traced, { + source: 'bar.js', + line: 1, + column: 0, + name: 'bar', +}); +``` + +## Benchmarks + +``` +node v20.10.0 + +amp.js.map - 45120 segments + +Memory Usage: +trace-mapping decoded 414164 bytes +trace-mapping encoded 6274352 bytes +source-map-js 10968904 bytes +source-map-0.6.1 17587160 bytes +source-map-0.8.0 8812155 bytes +Chrome dev tools 8672912 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 205 ops/sec ±0.19% (88 runs sampled) +trace-mapping: encoded JSON input x 405 ops/sec ±1.47% (88 runs sampled) +trace-mapping: decoded Object input x 4,645 ops/sec ±0.15% (98 runs sampled) +trace-mapping: encoded Object input x 458 ops/sec ±1.63% (91 runs sampled) +source-map-js: encoded Object input x 75.48 ops/sec ±1.64% (67 runs sampled) +source-map-0.6.1: encoded Object input x 39.37 ops/sec ±1.44% (53 runs sampled) +Chrome dev tools: encoded Object input x 150 ops/sec ±1.76% (79 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 44,946 ops/sec ±0.16% (99 runs sampled) +trace-mapping: encoded originalPositionFor x 37,995 ops/sec ±1.81% (89 runs sampled) +source-map-js: encoded originalPositionFor x 9,230 ops/sec ±1.36% (93 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 8,057 ops/sec ±0.84% (96 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 28,198 ops/sec ±1.12% (91 runs sampled) +Chrome dev tools: encoded originalPositionFor x 46,276 ops/sec ±1.35% (95 runs sampled) +Fastest is Chrome dev tools: encoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 204,406 ops/sec ±0.19% (97 runs sampled) +trace-mapping: encoded originalPositionFor x 196,695 ops/sec ±0.24% (99 runs sampled) +source-map-js: encoded originalPositionFor x 11,948 ops/sec ±0.94% (99 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 10,730 ops/sec ±0.36% (100 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 51,427 ops/sec ±0.21% (98 runs sampled) +Chrome dev tools: encoded originalPositionFor x 162,615 ops/sec ±0.18% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +babel.min.js.map - 347793 segments + +Memory Usage: +trace-mapping decoded 18504 bytes +trace-mapping encoded 35428008 bytes +source-map-js 51676808 bytes +source-map-0.6.1 63367136 bytes +source-map-0.8.0 43158400 bytes +Chrome dev tools 50721552 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 17.82 ops/sec ±6.35% (35 runs sampled) +trace-mapping: encoded JSON input x 31.57 ops/sec ±7.50% (43 runs sampled) +trace-mapping: decoded Object input x 867 ops/sec ±0.74% (94 runs sampled) +trace-mapping: encoded Object input x 33.83 ops/sec ±7.66% (46 runs sampled) +source-map-js: encoded Object input x 6.58 ops/sec ±3.31% (20 runs sampled) +source-map-0.6.1: encoded Object input x 4.23 ops/sec ±3.43% (15 runs sampled) +Chrome dev tools: encoded Object input x 22.14 ops/sec ±3.79% (41 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 78,234 ops/sec ±1.48% (29 runs sampled) +trace-mapping: encoded originalPositionFor x 60,761 ops/sec ±1.35% (21 runs sampled) +source-map-js: encoded originalPositionFor x 51,448 ops/sec ±2.17% (89 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 47,221 ops/sec ±1.99% (15 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 84,002 ops/sec ±1.45% (27 runs sampled) +Chrome dev tools: encoded originalPositionFor x 106,457 ops/sec ±1.38% (37 runs sampled) +Fastest is Chrome dev tools: encoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 930,943 ops/sec ±0.25% (99 runs sampled) +trace-mapping: encoded originalPositionFor x 843,545 ops/sec ±0.34% (97 runs sampled) +source-map-js: encoded originalPositionFor x 114,510 ops/sec ±1.37% (36 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 87,412 ops/sec ±0.72% (92 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 197,709 ops/sec ±0.89% (59 runs sampled) +Chrome dev tools: encoded originalPositionFor x 688,983 ops/sec ±0.33% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +preact.js.map - 1992 segments + +Memory Usage: +trace-mapping decoded 33136 bytes +trace-mapping encoded 254240 bytes +source-map-js 837488 bytes +source-map-0.6.1 961928 bytes +source-map-0.8.0 54384 bytes +Chrome dev tools 709680 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 3,709 ops/sec ±0.13% (99 runs sampled) +trace-mapping: encoded JSON input x 6,447 ops/sec ±0.22% (101 runs sampled) +trace-mapping: decoded Object input x 83,062 ops/sec ±0.23% (100 runs sampled) +trace-mapping: encoded Object input x 14,980 ops/sec ±0.28% (100 runs sampled) +source-map-js: encoded Object input x 2,544 ops/sec ±0.16% (99 runs sampled) +source-map-0.6.1: encoded Object input x 1,221 ops/sec ±0.37% (97 runs sampled) +Chrome dev tools: encoded Object input x 4,241 ops/sec ±0.39% (93 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 91,028 ops/sec ±0.14% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 84,348 ops/sec ±0.26% (98 runs sampled) +source-map-js: encoded originalPositionFor x 26,998 ops/sec ±0.23% (98 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 18,049 ops/sec ±0.26% (100 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 41,916 ops/sec ±0.28% (98 runs sampled) +Chrome dev tools: encoded originalPositionFor x 88,616 ops/sec ±0.14% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 319,960 ops/sec ±0.16% (100 runs sampled) +trace-mapping: encoded originalPositionFor x 302,153 ops/sec ±0.18% (100 runs sampled) +source-map-js: encoded originalPositionFor x 35,574 ops/sec ±0.19% (100 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 19,943 ops/sec ±0.12% (101 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 54,648 ops/sec ±0.20% (99 runs sampled) +Chrome dev tools: encoded originalPositionFor x 278,319 ops/sec ±0.17% (102 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +react.js.map - 5726 segments + +Memory Usage: +trace-mapping decoded 10872 bytes +trace-mapping encoded 681512 bytes +source-map-js 2563944 bytes +source-map-0.6.1 2150864 bytes +source-map-0.8.0 88680 bytes +Chrome dev tools 1149576 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 1,887 ops/sec ±0.28% (99 runs sampled) +trace-mapping: encoded JSON input x 4,749 ops/sec ±0.48% (97 runs sampled) +trace-mapping: decoded Object input x 74,236 ops/sec ±0.11% (99 runs sampled) +trace-mapping: encoded Object input x 5,752 ops/sec ±0.38% (100 runs sampled) +source-map-js: encoded Object input x 806 ops/sec ±0.19% (97 runs sampled) +source-map-0.6.1: encoded Object input x 418 ops/sec ±0.33% (94 runs sampled) +Chrome dev tools: encoded Object input x 1,524 ops/sec ±0.57% (92 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 620,201 ops/sec ±0.33% (96 runs sampled) +trace-mapping: encoded originalPositionFor x 579,548 ops/sec ±0.35% (97 runs sampled) +source-map-js: encoded originalPositionFor x 230,983 ops/sec ±0.62% (54 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 158,145 ops/sec ±0.80% (46 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 343,801 ops/sec ±0.55% (96 runs sampled) +Chrome dev tools: encoded originalPositionFor x 659,649 ops/sec ±0.49% (98 runs sampled) +Fastest is Chrome dev tools: encoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 2,368,079 ops/sec ±0.32% (98 runs sampled) +trace-mapping: encoded originalPositionFor x 2,134,039 ops/sec ±2.72% (87 runs sampled) +source-map-js: encoded originalPositionFor x 290,120 ops/sec ±2.49% (82 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 187,613 ops/sec ±0.86% (49 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 479,569 ops/sec ±0.65% (96 runs sampled) +Chrome dev tools: encoded originalPositionFor x 2,048,414 ops/sec ±0.24% (98 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + + +*** + + +vscode.map - 2141001 segments + +Memory Usage: +trace-mapping decoded 5206584 bytes +trace-mapping encoded 208370336 bytes +source-map-js 278493008 bytes +source-map-0.6.1 391564048 bytes +source-map-0.8.0 257508787 bytes +Chrome dev tools 291053000 bytes +Smallest memory usage is trace-mapping decoded + +Init speed: +trace-mapping: decoded JSON input x 1.63 ops/sec ±33.88% (9 runs sampled) +trace-mapping: encoded JSON input x 3.29 ops/sec ±36.13% (13 runs sampled) +trace-mapping: decoded Object input x 103 ops/sec ±0.93% (77 runs sampled) +trace-mapping: encoded Object input x 5.42 ops/sec ±28.54% (19 runs sampled) +source-map-js: encoded Object input x 1.07 ops/sec ±13.84% (7 runs sampled) +source-map-0.6.1: encoded Object input x 0.60 ops/sec ±2.43% (6 runs sampled) +Chrome dev tools: encoded Object input x 2.61 ops/sec ±22.00% (11 runs sampled) +Fastest is trace-mapping: decoded Object input + +Trace speed (random): +trace-mapping: decoded originalPositionFor x 257,019 ops/sec ±0.97% (93 runs sampled) +trace-mapping: encoded originalPositionFor x 179,163 ops/sec ±0.83% (92 runs sampled) +source-map-js: encoded originalPositionFor x 73,337 ops/sec ±1.35% (87 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 38,797 ops/sec ±1.66% (88 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 107,758 ops/sec ±1.94% (45 runs sampled) +Chrome dev tools: encoded originalPositionFor x 188,550 ops/sec ±1.85% (79 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor + +Trace speed (ascending): +trace-mapping: decoded originalPositionFor x 447,621 ops/sec ±3.64% (94 runs sampled) +trace-mapping: encoded originalPositionFor x 323,698 ops/sec ±5.20% (88 runs sampled) +source-map-js: encoded originalPositionFor x 78,387 ops/sec ±1.69% (89 runs sampled) +source-map-0.6.1: encoded originalPositionFor x 41,016 ops/sec ±3.01% (25 runs sampled) +source-map-0.8.0: encoded originalPositionFor x 124,204 ops/sec ±0.90% (92 runs sampled) +Chrome dev tools: encoded originalPositionFor x 230,087 ops/sec ±2.61% (93 runs sampled) +Fastest is trace-mapping: decoded originalPositionFor +``` + +[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs new file mode 100644 index 0000000..251117c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs @@ -0,0 +1,504 @@ +// src/trace-mapping.ts +import { encode, decode } from "@jridgewell/sourcemap-codec"; + +// src/resolve.ts +import resolveUri from "@jridgewell/resolve-uri"; + +// src/strip-filename.ts +function stripFilename(path) { + if (!path) return ""; + const index = path.lastIndexOf("/"); + return path.slice(0, index + 1); +} + +// src/resolve.ts +function resolver(mapUrl, sourceRoot) { + const from = stripFilename(mapUrl); + const prefix = sourceRoot ? sourceRoot + "/" : ""; + return (source) => resolveUri(prefix + (source || ""), from); +} + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; +var REV_GENERATED_LINE = 1; +var REV_GENERATED_COLUMN = 2; + +// src/sort.ts +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) return mappings; + if (!owned) mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +// src/binary-search.ts +var found = false; +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + (high - low >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1 + }; +} +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + low = lastIndex === -1 ? 0 : lastIndex; + } else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return state.lastIndex = binarySearch(haystack, needle, low, high); +} + +// src/by-source.ts +function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) continue; + const sourceIndex2 = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex2]; + const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []); + const memo = memos[sourceIndex2]; + let index = upperBound( + originalLine, + sourceColumn, + memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine) + ); + memo.lastIndex = ++index; + insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function buildNullArray() { + return { __proto__: null }; +} + +// src/types.ts +function parse(map) { + return typeof map === "string" ? JSON.parse(map) : map; +} + +// src/flatten-map.ts +var FlattenMap = function(map, mapUrl) { + const parsed = parse(map); + if (!("sections" in parsed)) { + return new TraceMap(parsed, mapUrl); + } + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const ignoreList = []; + recurse( + parsed, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + 0, + 0, + Infinity, + Infinity + ); + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList + }; + return presortedDecodedMap(joined); +}; +function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + addSection( + map, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + lineOffset + offset.line, + columnOffset + offset.column, + sl, + sc + ); + } +} +function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const parsed = parse(input); + if ("sections" in parsed) return recurse(...arguments); + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + append(sources, resolvedSources); + append(names, map.names); + if (contents) append(sourcesContent, contents); + else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); + if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + if (lineI > stopLine) return; + const out = getLine(mappings, lineI); + const cOffset = i === 0 ? columnOffset : 0; + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + if (lineI === stopLine && column >= stopColumn) return; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push( + seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]] + ); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) arr.push(other[i]); +} +function getLine(arr, index) { + for (let i = arr.length; i <= index; i++) arr[i] = []; + return arr[index]; +} + +// src/trace-mapping.ts +var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; +var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; +var LEAST_UPPER_BOUND = -1; +var GREATEST_LOWER_BOUND = 1; +var TraceMap = class { + constructor(map, mapUrl) { + const isString = typeof map === "string"; + if (!isString && map._decodedMemo) return map; + const parsed = parse(map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; + const resolve = resolver(mapUrl, sourceRoot); + this.resolvedSources = sources.map(resolve); + const { mappings } = parsed; + if (typeof mappings === "string") { + this._encoded = mappings; + this._decoded = void 0; + } else if (Array.isArray(mappings)) { + this._encoded = void 0; + this._decoded = maybeSort(mappings, isString); + } else if (parsed.sections) { + throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); + } else { + throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); + } + this._decodedMemo = memoizedState(); + this._bySources = void 0; + this._bySourceMemos = void 0; + } +}; +function cast(map) { + return map; +} +function encodedMappings(map) { + var _a, _b; + return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded); +} +function decodedMappings(map) { + var _a; + return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded)); +} +function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + if (line >= decoded.length) return null; + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + GREATEST_LOWER_BOUND + ); + return index === -1 ? null : segments[index]; +} +function originalPositionFor(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + if (line >= decoded.length) return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + bias || GREATEST_LOWER_BOUND + ); + if (index === -1) return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping( + resolvedSources[segment[SOURCES_INDEX]], + segment[SOURCE_LINE] + 1, + segment[SOURCE_COLUMN], + segment.length === 5 ? names[segment[NAMES_INDEX]] : null + ); +} +function generatedPositionFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} +function allGeneratedPositionsFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} +function eachMapping(map, cb) { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name + }); + } + } +} +function sourceIndex(map, source) { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) index = resolvedSources.indexOf(source); + return index; +} +function sourceContentFor(map, source) { + const { sourcesContent } = map; + if (sourcesContent == null) return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} +function isIgnored(map, source) { + const { ignoreList } = map; + if (ignoreList == null) return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} +function presortedDecodedMap(map, mapUrl) { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} +function decodedMap(map) { + return clone(map, decodedMappings(map)); +} +function encodedMap(map) { + return clone(map, encodedMappings(map)); +} +function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList + }; +} +function OMapping(source, line, column, name) { + return { source, line, column, name }; +} +function GMapping(line, column) { + return { line, column }; +} +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } else if (bias === LEAST_UPPER_BOUND) index++; + if (index === -1 || index === segments.length) return -1; + return index; +} +function sliceGeneratedPositions(segments, memo, line, column, bias) { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + if (!found && bias === LEAST_UPPER_BOUND) min++; + if (min === -1 || min === segments.length) return []; + const matchedColumn = found ? column : segments[min][COLUMN]; + if (!found) min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} +function generatedPosition(map, source, line, column, bias, all) { + var _a; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex2 = sources.indexOf(source); + if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source); + if (sourceIndex2 === -1) return all ? [] : GMapping(null, null); + const generated = (_a = cast(map))._bySources || (_a._bySources = buildBySources( + decodedMappings(map), + cast(map)._bySourceMemos = sources.map(memoizedState) + )); + const segments = generated[sourceIndex2][line]; + if (segments == null) return all ? [] : GMapping(null, null); + const memo = cast(map)._bySourceMemos[sourceIndex2]; + if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) return GMapping(null, null); + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} +export { + FlattenMap as AnyMap, + FlattenMap, + GREATEST_LOWER_BOUND, + LEAST_UPPER_BOUND, + TraceMap, + allGeneratedPositionsFor, + decodedMap, + decodedMappings, + eachMapping, + encodedMap, + encodedMappings, + generatedPositionFor, + isIgnored, + originalPositionFor, + presortedDecodedMap, + sourceContentFor, + traceSegment +}; +//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map new file mode 100644 index 0000000..a3cdb8f --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/binary-search.ts", "../src/by-source.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GAAI,CAAAA,eAAc,gBAAgB,QAAQ,MAAM;AACpE,MAAIA,iBAAgB,GAAI,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE7D,QAAM,aAAa,UAAK,GAAG,GAAE,eAAV,GAAU,aAAe;AAAA,IAC1C,gBAAgB,GAAG;AAAA,IAClB,KAAK,GAAG,EAAE,iBAAiB,QAAQ,IAAI,aAAa;AAAA,EACvD;AAEA,QAAM,WAAW,UAAUA,YAAW,EAAE,IAAI;AAC5C,MAAI,YAAY,KAAM,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE3D,QAAM,OAAO,KAAK,GAAG,EAAE,eAAgBA,YAAW;AAElD,MAAI,IAAK,QAAO,wBAAwB,UAAU,MAAM,MAAM,QAAQ,IAAI;AAE1E,QAAM,QAAQ,qBAAqB,UAAU,MAAM,MAAM,QAAQ,IAAI;AACrE,MAAI,UAAU,GAAI,QAAO,SAAS,MAAM,IAAI;AAE5C,QAAM,UAAU,SAAS,KAAK;AAC9B,SAAO,SAAS,QAAQ,kBAAkB,IAAI,GAAG,QAAQ,oBAAoB,CAAC;AAChF;", + "names": ["sourceIndex", "sourceIndex"] +} diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js new file mode 100644 index 0000000..b0c9a3b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js @@ -0,0 +1,558 @@ +(function (global, factory, m) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(module, require('@jridgewell/resolve-uri'), require('@jridgewell/sourcemap-codec')) : + typeof define === 'function' && define.amd ? define(['module', '@jridgewell/resolve-uri', '@jridgewell/sourcemap-codec'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(m = { exports: {} }, global.resolveURI, global.sourcemapCodec), global.traceMapping = 'default' in m.exports ? m.exports.default : m.exports); +})(this, (function (module, require_resolveURI, require_sourcemapCodec) { +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// umd:@jridgewell/sourcemap-codec +var require_sourcemap_codec = __commonJS({ + "umd:@jridgewell/sourcemap-codec"(exports, module2) { + module2.exports = require_sourcemapCodec; + } +}); + +// umd:@jridgewell/resolve-uri +var require_resolve_uri = __commonJS({ + "umd:@jridgewell/resolve-uri"(exports, module2) { + module2.exports = require_resolveURI; + } +}); + +// src/trace-mapping.ts +var trace_mapping_exports = {}; +__export(trace_mapping_exports, { + AnyMap: () => FlattenMap, + FlattenMap: () => FlattenMap, + GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND, + LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND, + TraceMap: () => TraceMap, + allGeneratedPositionsFor: () => allGeneratedPositionsFor, + decodedMap: () => decodedMap, + decodedMappings: () => decodedMappings, + eachMapping: () => eachMapping, + encodedMap: () => encodedMap, + encodedMappings: () => encodedMappings, + generatedPositionFor: () => generatedPositionFor, + isIgnored: () => isIgnored, + originalPositionFor: () => originalPositionFor, + presortedDecodedMap: () => presortedDecodedMap, + sourceContentFor: () => sourceContentFor, + traceSegment: () => traceSegment +}); +module.exports = __toCommonJS(trace_mapping_exports); +var import_sourcemap_codec = __toESM(require_sourcemap_codec()); + +// src/resolve.ts +var import_resolve_uri = __toESM(require_resolve_uri()); + +// src/strip-filename.ts +function stripFilename(path) { + if (!path) return ""; + const index = path.lastIndexOf("/"); + return path.slice(0, index + 1); +} + +// src/resolve.ts +function resolver(mapUrl, sourceRoot) { + const from = stripFilename(mapUrl); + const prefix = sourceRoot ? sourceRoot + "/" : ""; + return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from); +} + +// src/sourcemap-segment.ts +var COLUMN = 0; +var SOURCES_INDEX = 1; +var SOURCE_LINE = 2; +var SOURCE_COLUMN = 3; +var NAMES_INDEX = 4; +var REV_GENERATED_LINE = 1; +var REV_GENERATED_COLUMN = 2; + +// src/sort.ts +function maybeSort(mappings, owned) { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) return mappings; + if (!owned) mappings = mappings.slice(); + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} +function nextUnsortedSegmentLine(mappings, start) { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) return i; + } + return mappings.length; +} +function isSorted(line) { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} +function sortSegments(line, owned) { + if (!owned) line = line.slice(); + return line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[COLUMN] - b[COLUMN]; +} + +// src/binary-search.ts +var found = false; +function binarySearch(haystack, needle, low, high) { + while (low <= high) { + const mid = low + (high - low >> 1); + const cmp = haystack[mid][COLUMN] - needle; + if (cmp === 0) { + found = true; + return mid; + } + if (cmp < 0) { + low = mid + 1; + } else { + high = mid - 1; + } + } + found = false; + return low - 1; +} +function upperBound(haystack, needle, index) { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function lowerBound(haystack, needle, index) { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} +function memoizedState() { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1 + }; +} +function memoizedBinarySearch(haystack, needle, state, key) { + const { lastKey, lastNeedle, lastIndex } = state; + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + if (needle >= lastNeedle) { + low = lastIndex === -1 ? 0 : lastIndex; + } else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + return state.lastIndex = binarySearch(haystack, needle, low, high); +} + +// src/by-source.ts +function buildBySources(decoded, memos) { + const sources = memos.map(buildNullArray); + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) continue; + const sourceIndex2 = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex2]; + const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []); + const memo = memos[sourceIndex2]; + let index = upperBound( + originalLine, + sourceColumn, + memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine) + ); + memo.lastIndex = ++index; + insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); + } + } + return sources; +} +function insert(array, index, value) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} +function buildNullArray() { + return { __proto__: null }; +} + +// src/types.ts +function parse(map) { + return typeof map === "string" ? JSON.parse(map) : map; +} + +// src/flatten-map.ts +var FlattenMap = function(map, mapUrl) { + const parsed = parse(map); + if (!("sections" in parsed)) { + return new TraceMap(parsed, mapUrl); + } + const mappings = []; + const sources = []; + const sourcesContent = []; + const names = []; + const ignoreList = []; + recurse( + parsed, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + 0, + 0, + Infinity, + Infinity + ); + const joined = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList + }; + return presortedDecodedMap(joined); +}; +function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + addSection( + map, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + lineOffset + offset.line, + columnOffset + offset.column, + sl, + sc + ); + } +} +function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { + const parsed = parse(input); + if ("sections" in parsed) return recurse(...arguments); + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + append(sources, resolvedSources); + append(names, map.names); + if (contents) append(sourcesContent, contents); + else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); + if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + if (lineI > stopLine) return; + const out = getLine(mappings, lineI); + const cOffset = i === 0 ? columnOffset : 0; + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + if (lineI === stopLine && column >= stopColumn) return; + if (seg.length === 1) { + out.push([column]); + continue; + } + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push( + seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]] + ); + } + } +} +function append(arr, other) { + for (let i = 0; i < other.length; i++) arr.push(other[i]); +} +function getLine(arr, index) { + for (let i = arr.length; i <= index; i++) arr[i] = []; + return arr[index]; +} + +// src/trace-mapping.ts +var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)"; +var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)"; +var LEAST_UPPER_BOUND = -1; +var GREATEST_LOWER_BOUND = 1; +var TraceMap = class { + constructor(map, mapUrl) { + const isString = typeof map === "string"; + if (!isString && map._decodedMemo) return map; + const parsed = parse(map); + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0; + const resolve = resolver(mapUrl, sourceRoot); + this.resolvedSources = sources.map(resolve); + const { mappings } = parsed; + if (typeof mappings === "string") { + this._encoded = mappings; + this._decoded = void 0; + } else if (Array.isArray(mappings)) { + this._encoded = void 0; + this._decoded = maybeSort(mappings, isString); + } else if (parsed.sections) { + throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); + } else { + throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); + } + this._decodedMemo = memoizedState(); + this._bySources = void 0; + this._bySourceMemos = void 0; + } +}; +function cast(map) { + return map; +} +function encodedMappings(map) { + var _a, _b; + return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded); +} +function decodedMappings(map) { + var _a; + return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded)); +} +function traceSegment(map, line, column) { + const decoded = decodedMappings(map); + if (line >= decoded.length) return null; + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + GREATEST_LOWER_BOUND + ); + return index === -1 ? null : segments[index]; +} +function originalPositionFor(map, needle) { + let { line, column, bias } = needle; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const decoded = decodedMappings(map); + if (line >= decoded.length) return OMapping(null, null, null, null); + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + bias || GREATEST_LOWER_BOUND + ); + if (index === -1) return OMapping(null, null, null, null); + const segment = segments[index]; + if (segment.length === 1) return OMapping(null, null, null, null); + const { names, resolvedSources } = map; + return OMapping( + resolvedSources[segment[SOURCES_INDEX]], + segment[SOURCE_LINE] + 1, + segment[SOURCE_COLUMN], + segment.length === 5 ? names[segment[NAMES_INDEX]] : null + ); +} +function generatedPositionFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} +function allGeneratedPositionsFor(map, needle) { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} +function eachMapping(map, cb) { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) name = names[seg[4]]; + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name + }); + } + } +} +function sourceIndex(map, source) { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) index = resolvedSources.indexOf(source); + return index; +} +function sourceContentFor(map, source) { + const { sourcesContent } = map; + if (sourcesContent == null) return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} +function isIgnored(map, source) { + const { ignoreList } = map; + if (ignoreList == null) return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} +function presortedDecodedMap(map, mapUrl) { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} +function decodedMap(map) { + return clone(map, decodedMappings(map)); +} +function encodedMap(map) { + return clone(map, encodedMappings(map)); +} +function clone(map, mappings) { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || map.x_google_ignoreList + }; +} +function OMapping(source, line, column, name) { + return { source, line, column, name }; +} +function GMapping(line, column) { + return { line, column }; +} +function traceSegmentInternal(segments, memo, line, column, bias) { + let index = memoizedBinarySearch(segments, column, memo, line); + if (found) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } else if (bias === LEAST_UPPER_BOUND) index++; + if (index === -1 || index === segments.length) return -1; + return index; +} +function sliceGeneratedPositions(segments, memo, line, column, bias) { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + if (!found && bias === LEAST_UPPER_BOUND) min++; + if (min === -1 || min === segments.length) return []; + const matchedColumn = found ? column : segments[min][COLUMN]; + if (!found) min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} +function generatedPosition(map, source, line, column, bias, all) { + var _a; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + const { sources, resolvedSources } = map; + let sourceIndex2 = sources.indexOf(source); + if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source); + if (sourceIndex2 === -1) return all ? [] : GMapping(null, null); + const generated = (_a = cast(map))._bySources || (_a._bySources = buildBySources( + decodedMappings(map), + cast(map)._bySourceMemos = sources.map(memoizedState) + )); + const segments = generated[sourceIndex2][line]; + if (segments == null) return all ? [] : GMapping(null, null); + const memo = cast(map)._bySourceMemos[sourceIndex2]; + if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) return GMapping(null, null); + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} +})); +//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map new file mode 100644 index 0000000..a4c44fd --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map @@ -0,0 +1,6 @@ +{ + "version": 3, + "sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/resolve-uri", "../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/binary-search.ts", "../src/by-source.ts", "../src/types.ts", "../src/flatten-map.ts"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,6CAAAA,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA,yCAAAC,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA;AAAA;AAAA;AAAA;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,eAAc,QAAQ,QAAQ,MAAM;AACxC,MAAIA,iBAAgB,GAAI,CAAAA,eAAc,gBAAgB,QAAQ,MAAM;AACpE,MAAIA,iBAAgB,GAAI,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE7D,QAAM,aAAa,UAAK,GAAG,GAAE,eAAV,GAAU,aAAe;AAAA,IAC1C,gBAAgB,GAAG;AAAA,IAClB,KAAK,GAAG,EAAE,iBAAiB,QAAQ,IAAI,aAAa;AAAA,EACvD;AAEA,QAAM,WAAW,UAAUA,YAAW,EAAE,IAAI;AAC5C,MAAI,YAAY,KAAM,QAAO,MAAM,CAAC,IAAI,SAAS,MAAM,IAAI;AAE3D,QAAM,OAAO,KAAK,GAAG,EAAE,eAAgBA,YAAW;AAElD,MAAI,IAAK,QAAO,wBAAwB,UAAU,MAAM,MAAM,QAAQ,IAAI;AAE1E,QAAM,QAAQ,qBAAqB,UAAU,MAAM,MAAM,QAAQ,IAAI;AACrE,MAAI,UAAU,GAAI,QAAO,SAAS,MAAM,IAAI;AAE5C,QAAM,UAAU,SAAS,KAAK;AAC9B,SAAO,SAAS,QAAQ,kBAAkB,IAAI,GAAG,QAAQ,oBAAoB,CAAC;AAChF;", + "names": ["module", "module", "resolveUri", "sourceIndex", "sourceIndex"] +} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json new file mode 100644 index 0000000..f441d66 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/package.json @@ -0,0 +1,71 @@ +{ + "name": "@jridgewell/trace-mapping", + "version": "0.3.29", + "description": "Trace the original position through a source map", + "keywords": [ + "source", + "map" + ], + "main": "dist/trace-mapping.umd.js", + "module": "dist/trace-mapping.mjs", + "types": "types/trace-mapping.d.cts", + "files": [ + "dist", + "src", + "types" + ], + "exports": { + ".": [ + { + "import": { + "types": "./types/trace-mapping.d.mts", + "default": "./dist/trace-mapping.mjs" + }, + "require": { + "types": "./types/trace-mapping.d.cts", + "default": "./dist/trace-mapping.umd.js" + }, + "browser": { + "types": "./types/trace-mapping.d.cts", + "default": "./dist/trace-mapping.umd.js" + } + }, + "./dist/trace-mapping.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:code benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:code build:types", + "build:code": "node ../../esbuild.mjs trace-mapping.ts", + "build:types": "run-s build:types:force build:types:emit build:types:mts", + "build:types:force": "rimraf tsconfig.build.tsbuildinfo", + "build:types:emit": "tsc --project tsconfig.build.json", + "build:types:mts": "node ../../mts-types.mjs", + "clean": "run-s -n clean:code clean:types", + "clean:code": "tsc --build --clean tsconfig.build.json", + "clean:types": "rimraf dist types", + "test": "run-s -n test:types test:only test:format", + "test:format": "prettier --check '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:types": "eslint '{src,test}/**/*.ts'", + "lint": "run-s -n lint:types lint:format", + "lint:format": "npm run test:format -- --write", + "lint:types": "npm run test:types -- --fix", + "prepublishOnly": "npm run-s -n build test" + }, + "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping", + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemaps.git", + "directory": "packages/trace-mapping" + }, + "author": "Justin Ridgewell ", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } +} diff --git a/node_modules/@jridgewell/trace-mapping/src/binary-search.ts b/node_modules/@jridgewell/trace-mapping/src/binary-search.ts new file mode 100644 index 0000000..c1144ad --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/binary-search.ts @@ -0,0 +1,115 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +import { COLUMN } from './sourcemap-segment'; + +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; + +export let found = false; + +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export function binarySearch( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + low: number, + high: number, +): number { + while (low <= high) { + const mid = low + ((high - low) >> 1); + const cmp = haystack[mid][COLUMN] - needle; + + if (cmp === 0) { + found = true; + return mid; + } + + if (cmp < 0) { + low = mid + 1; + } else { + high = mid - 1; + } + } + + found = false; + return low - 1; +} + +export function upperBound( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + index: number, +): number { + for (let i = index + 1; i < haystack.length; index = i++) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} + +export function lowerBound( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + index: number, +): number { + for (let i = index - 1; i >= 0; index = i--) { + if (haystack[i][COLUMN] !== needle) break; + } + return index; +} + +export function memoizedState(): MemoState { + return { + lastKey: -1, + lastNeedle: -1, + lastIndex: -1, + }; +} + +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export function memoizedBinarySearch( + haystack: SourceMapSegment[] | ReverseSegment[], + needle: number, + state: MemoState, + key: number, +): number { + const { lastKey, lastNeedle, lastIndex } = state; + + let low = 0; + let high = haystack.length - 1; + if (key === lastKey) { + if (needle === lastNeedle) { + found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; + return lastIndex; + } + + if (needle >= lastNeedle) { + // lastIndex may be -1 if the previous needle was not found. + low = lastIndex === -1 ? 0 : lastIndex; + } else { + high = lastIndex; + } + } + state.lastKey = key; + state.lastNeedle = needle; + + return (state.lastIndex = binarySearch(haystack, needle, low, high)); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/by-source.ts b/node_modules/@jridgewell/trace-mapping/src/by-source.ts new file mode 100644 index 0000000..2af1cf0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/by-source.ts @@ -0,0 +1,65 @@ +import { COLUMN, SOURCES_INDEX, SOURCE_LINE, SOURCE_COLUMN } from './sourcemap-segment'; +import { memoizedBinarySearch, upperBound } from './binary-search'; + +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; +import type { MemoState } from './binary-search'; + +export type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; + +// Rebuilds the original source files, with mappings that are ordered by source line/column instead +// of generated line/column. +export default function buildBySources( + decoded: readonly SourceMapSegment[][], + memos: MemoState[], +): Source[] { + const sources: Source[] = memos.map(buildNullArray); + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + if (seg.length === 1) continue; + + const sourceIndex = seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + const originalSource = sources[sourceIndex]; + const originalLine = (originalSource[sourceLine] ||= []); + const memo = memos[sourceIndex]; + + // The binary search either found a match, or it found the left-index just before where the + // segment should go. Either way, we want to insert after that. And there may be multiple + // generated segments associated with an original location, so there may need to move several + // indexes before we find where we need to insert. + let index = upperBound( + originalLine, + sourceColumn, + memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine), + ); + + memo.lastIndex = ++index; + insert(originalLine, index, [sourceColumn, i, seg[COLUMN]]); + } + } + + return sources; +} + +function insert(array: T[], index: number, value: T) { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; +} + +// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like +// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. +// Numeric properties on objects are magically sorted in ascending order by the engine regardless of +// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending +// order when iterating with for-in. +function buildNullArray(): T { + return { __proto__: null } as T; +} diff --git a/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts b/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts new file mode 100644 index 0000000..61ac40c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/flatten-map.ts @@ -0,0 +1,192 @@ +import { TraceMap, presortedDecodedMap, decodedMappings } from './trace-mapping'; +import { + COLUMN, + SOURCES_INDEX, + SOURCE_LINE, + SOURCE_COLUMN, + NAMES_INDEX, +} from './sourcemap-segment'; +import { parse } from './types'; + +import type { + DecodedSourceMap, + DecodedSourceMapXInput, + EncodedSourceMapXInput, + SectionedSourceMapXInput, + SectionedSourceMapInput, + SectionXInput, + Ro, +} from './types'; +import type { SourceMapSegment } from './sourcemap-segment'; + +type FlattenMap = { + new (map: Ro, mapUrl?: string | null): TraceMap; + (map: Ro, mapUrl?: string | null): TraceMap; +}; + +export const FlattenMap: FlattenMap = function (map, mapUrl) { + const parsed = parse(map as SectionedSourceMapInput); + + if (!('sections' in parsed)) { + return new TraceMap(parsed as DecodedSourceMapXInput | EncodedSourceMapXInput, mapUrl); + } + + const mappings: SourceMapSegment[][] = []; + const sources: string[] = []; + const sourcesContent: (string | null)[] = []; + const names: string[] = []; + const ignoreList: number[] = []; + + recurse( + parsed, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + 0, + 0, + Infinity, + Infinity, + ); + + const joined: DecodedSourceMap = { + version: 3, + file: parsed.file, + names, + sources, + sourcesContent, + mappings, + ignoreList, + }; + + return presortedDecodedMap(joined); +} as FlattenMap; + +function recurse( + input: SectionedSourceMapXInput, + mapUrl: string | null | undefined, + mappings: SourceMapSegment[][], + sources: string[], + sourcesContent: (string | null)[], + names: string[], + ignoreList: number[], + lineOffset: number, + columnOffset: number, + stopLine: number, + stopColumn: number, +) { + const { sections } = input; + for (let i = 0; i < sections.length; i++) { + const { map, offset } = sections[i]; + + let sl = stopLine; + let sc = stopColumn; + if (i + 1 < sections.length) { + const nextOffset = sections[i + 1].offset; + sl = Math.min(stopLine, lineOffset + nextOffset.line); + + if (sl === stopLine) { + sc = Math.min(stopColumn, columnOffset + nextOffset.column); + } else if (sl < stopLine) { + sc = columnOffset + nextOffset.column; + } + } + + addSection( + map, + mapUrl, + mappings, + sources, + sourcesContent, + names, + ignoreList, + lineOffset + offset.line, + columnOffset + offset.column, + sl, + sc, + ); + } +} + +function addSection( + input: SectionXInput['map'], + mapUrl: string | null | undefined, + mappings: SourceMapSegment[][], + sources: string[], + sourcesContent: (string | null)[], + names: string[], + ignoreList: number[], + lineOffset: number, + columnOffset: number, + stopLine: number, + stopColumn: number, +) { + const parsed = parse(input); + if ('sections' in parsed) return recurse(...(arguments as unknown as Parameters)); + + const map = new TraceMap(parsed, mapUrl); + const sourcesOffset = sources.length; + const namesOffset = names.length; + const decoded = decodedMappings(map); + const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; + + append(sources, resolvedSources); + append(names, map.names); + + if (contents) append(sourcesContent, contents); + else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null); + + if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset); + + for (let i = 0; i < decoded.length; i++) { + const lineI = lineOffset + i; + + // We can only add so many lines before we step into the range that the next section's map + // controls. When we get to the last line, then we'll start checking the segments to see if + // they've crossed into the column range. But it may not have any columns that overstep, so we + // still need to check that we don't overstep lines, too. + if (lineI > stopLine) return; + + // The out line may already exist in mappings (if we're continuing the line started by a + // previous section). Or, we may have jumped ahead several lines to start this section. + const out = getLine(mappings, lineI); + // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the + // map can be multiple lines), it doesn't. + const cOffset = i === 0 ? columnOffset : 0; + + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + const column = cOffset + seg[COLUMN]; + + // If this segment steps into the column range that the next section's map controls, we need + // to stop early. + if (lineI === stopLine && column >= stopColumn) return; + + if (seg.length === 1) { + out.push([column]); + continue; + } + + const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; + const sourceLine = seg[SOURCE_LINE]; + const sourceColumn = seg[SOURCE_COLUMN]; + out.push( + seg.length === 4 + ? [column, sourcesIndex, sourceLine, sourceColumn] + : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]], + ); + } + } +} + +function append(arr: T[], other: T[]) { + for (let i = 0; i < other.length; i++) arr.push(other[i]); +} + +function getLine(arr: T[][], index: number): T[] { + for (let i = arr.length; i <= index; i++) arr[i] = []; + return arr[index]; +} diff --git a/node_modules/@jridgewell/trace-mapping/src/resolve.ts b/node_modules/@jridgewell/trace-mapping/src/resolve.ts new file mode 100644 index 0000000..30bfa3b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/resolve.ts @@ -0,0 +1,16 @@ +import resolveUri from '@jridgewell/resolve-uri'; +import stripFilename from './strip-filename'; + +type Resolve = (source: string | null) => string; +export default function resolver( + mapUrl: string | null | undefined, + sourceRoot: string | undefined, +): Resolve { + const from = stripFilename(mapUrl); + // The sourceRoot is always treated as a directory, if it's not empty. + // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 + // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 + const prefix = sourceRoot ? sourceRoot + '/' : ''; + + return (source) => resolveUri(prefix + (source || ''), from); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/sort.ts b/node_modules/@jridgewell/trace-mapping/src/sort.ts new file mode 100644 index 0000000..61213c8 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/sort.ts @@ -0,0 +1,45 @@ +import { COLUMN } from './sourcemap-segment'; + +import type { SourceMapSegment } from './sourcemap-segment'; + +export default function maybeSort( + mappings: SourceMapSegment[][], + owned: boolean, +): SourceMapSegment[][] { + const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); + if (unsortedIndex === mappings.length) return mappings; + + // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If + // not, we do not want to modify the consumer's input array. + if (!owned) mappings = mappings.slice(); + + for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { + mappings[i] = sortSegments(mappings[i], owned); + } + return mappings; +} + +function nextUnsortedSegmentLine(mappings: SourceMapSegment[][], start: number): number { + for (let i = start; i < mappings.length; i++) { + if (!isSorted(mappings[i])) return i; + } + return mappings.length; +} + +function isSorted(line: SourceMapSegment[]): boolean { + for (let j = 1; j < line.length; j++) { + if (line[j][COLUMN] < line[j - 1][COLUMN]) { + return false; + } + } + return true; +} + +function sortSegments(line: SourceMapSegment[], owned: boolean): SourceMapSegment[] { + if (!owned) line = line.slice(); + return line.sort(sortComparator); +} + +function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { + return a[COLUMN] - b[COLUMN]; +} diff --git a/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts b/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts new file mode 100644 index 0000000..94f1b6a --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/sourcemap-segment.ts @@ -0,0 +1,23 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; + +type GeneratedLine = number; + +export type SourceMapSegment = + | [GeneratedColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] + | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; + +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; + +export const COLUMN = 0; +export const SOURCES_INDEX = 1; +export const SOURCE_LINE = 2; +export const SOURCE_COLUMN = 3; +export const NAMES_INDEX = 4; + +export const REV_GENERATED_LINE = 1; +export const REV_GENERATED_COLUMN = 2; diff --git a/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts b/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts new file mode 100644 index 0000000..2c88980 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/strip-filename.ts @@ -0,0 +1,8 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string { + if (!path) return ''; + const index = path.lastIndexOf('/'); + return path.slice(0, index + 1); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts b/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts new file mode 100644 index 0000000..dea4c6c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/trace-mapping.ts @@ -0,0 +1,504 @@ +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +import resolver from './resolve'; +import maybeSort from './sort'; +import buildBySources from './by-source'; +import { + memoizedState, + memoizedBinarySearch, + upperBound, + lowerBound, + found as bsFound, +} from './binary-search'; +import { + COLUMN, + SOURCES_INDEX, + SOURCE_LINE, + SOURCE_COLUMN, + NAMES_INDEX, + REV_GENERATED_LINE, + REV_GENERATED_COLUMN, +} from './sourcemap-segment'; +import { parse } from './types'; + +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; +import type { + SourceMapV3, + DecodedSourceMap, + EncodedSourceMap, + InvalidOriginalMapping, + OriginalMapping, + InvalidGeneratedMapping, + GeneratedMapping, + SourceMapInput, + Needle, + SourceNeedle, + SourceMap, + EachMapping, + Bias, + XInput, + SectionedSourceMap, + Ro, +} from './types'; +import type { Source } from './by-source'; +import type { MemoState } from './binary-search'; + +export type { SourceMapSegment } from './sourcemap-segment'; +export type { + SourceMap, + DecodedSourceMap, + EncodedSourceMap, + Section, + SectionedSourceMap, + SourceMapV3, + Bias, + EachMapping, + GeneratedMapping, + InvalidGeneratedMapping, + InvalidOriginalMapping, + Needle, + OriginalMapping, + OriginalMapping as Mapping, + SectionedSourceMapInput, + SourceMapInput, + SourceNeedle, + XInput, + EncodedSourceMapXInput, + DecodedSourceMapXInput, + SectionedSourceMapXInput, + SectionXInput, +} from './types'; + +interface PublicMap { + _encoded: TraceMap['_encoded']; + _decoded: TraceMap['_decoded']; + _decodedMemo: TraceMap['_decodedMemo']; + _bySources: TraceMap['_bySources']; + _bySourceMemos: TraceMap['_bySourceMemos']; +} + +const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; +const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; + +export const LEAST_UPPER_BOUND = -1; +export const GREATEST_LOWER_BOUND = 1; + +export { FlattenMap, FlattenMap as AnyMap } from './flatten-map'; + +export class TraceMap implements SourceMap { + declare version: SourceMapV3['version']; + declare file: SourceMapV3['file']; + declare names: SourceMapV3['names']; + declare sourceRoot: SourceMapV3['sourceRoot']; + declare sources: SourceMapV3['sources']; + declare sourcesContent: SourceMapV3['sourcesContent']; + declare ignoreList: SourceMapV3['ignoreList']; + + declare resolvedSources: string[]; + declare private _encoded: string | undefined; + + declare private _decoded: SourceMapSegment[][] | undefined; + declare private _decodedMemo: MemoState; + + declare private _bySources: Source[] | undefined; + declare private _bySourceMemos: MemoState[] | undefined; + + constructor(map: Ro, mapUrl?: string | null) { + const isString = typeof map === 'string'; + if (!isString && (map as unknown as { _decodedMemo: any })._decodedMemo) return map as TraceMap; + + const parsed = parse(map as Exclude); + + const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; + this.version = version; + this.file = file; + this.names = names || []; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.ignoreList = parsed.ignoreList || (parsed as XInput).x_google_ignoreList || undefined; + + const resolve = resolver(mapUrl, sourceRoot); + this.resolvedSources = sources.map(resolve); + + const { mappings } = parsed; + if (typeof mappings === 'string') { + this._encoded = mappings; + this._decoded = undefined; + } else if (Array.isArray(mappings)) { + this._encoded = undefined; + this._decoded = maybeSort(mappings, isString); + } else if ((parsed as unknown as SectionedSourceMap).sections) { + throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`); + } else { + throw new Error(`invalid source map: ${JSON.stringify(parsed)}`); + } + + this._decodedMemo = memoizedState(); + this._bySources = undefined; + this._bySourceMemos = undefined; + } +} + +/** + * Typescript doesn't allow friend access to private fields, so this just casts the map into a type + * with public access modifiers. + */ +function cast(map: unknown): PublicMap { + return map as any; +} + +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export function encodedMappings(map: TraceMap): EncodedSourceMap['mappings'] { + return (cast(map)._encoded ??= encode(cast(map)._decoded!)); +} + +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export function decodedMappings(map: TraceMap): Readonly { + return (cast(map)._decoded ||= decode(cast(map)._encoded!)); +} + +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export function traceSegment( + map: TraceMap, + line: number, + column: number, +): Readonly | null { + const decoded = decodedMappings(map); + + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) return null; + + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + GREATEST_LOWER_BOUND, + ); + + return index === -1 ? null : segments[index]; +} + +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export function originalPositionFor( + map: TraceMap, + needle: Needle, +): OriginalMapping | InvalidOriginalMapping { + let { line, column, bias } = needle; + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + + const decoded = decodedMappings(map); + + // It's common for parent source maps to have pointers to lines that have no + // mapping (like a "//# sourceMappingURL=") at the end of the child file. + if (line >= decoded.length) return OMapping(null, null, null, null); + + const segments = decoded[line]; + const index = traceSegmentInternal( + segments, + cast(map)._decodedMemo, + line, + column, + bias || GREATEST_LOWER_BOUND, + ); + + if (index === -1) return OMapping(null, null, null, null); + + const segment = segments[index]; + if (segment.length === 1) return OMapping(null, null, null, null); + + const { names, resolvedSources } = map; + return OMapping( + resolvedSources[segment[SOURCES_INDEX]], + segment[SOURCE_LINE] + 1, + segment[SOURCE_COLUMN], + segment.length === 5 ? names[segment[NAMES_INDEX]] : null, + ); +} + +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export function generatedPositionFor( + map: TraceMap, + needle: SourceNeedle, +): GeneratedMapping | InvalidGeneratedMapping { + const { source, line, column, bias } = needle; + return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false); +} + +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[] { + const { source, line, column, bias } = needle; + // SourceMapConsumer uses LEAST_UPPER_BOUND for some reason, so we follow suit. + return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true); +} + +/** + * Iterates each mapping in generated position order. + */ +export function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void { + const decoded = decodedMappings(map); + const { names, resolvedSources } = map; + + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + for (let j = 0; j < line.length; j++) { + const seg = line[j]; + + const generatedLine = i + 1; + const generatedColumn = seg[0]; + let source = null; + let originalLine = null; + let originalColumn = null; + let name = null; + if (seg.length !== 1) { + source = resolvedSources[seg[1]]; + originalLine = seg[2] + 1; + originalColumn = seg[3]; + } + if (seg.length === 5) name = names[seg[4]]; + + cb({ + generatedLine, + generatedColumn, + source, + originalLine, + originalColumn, + name, + } as EachMapping); + } + } +} + +function sourceIndex(map: TraceMap, source: string): number { + const { sources, resolvedSources } = map; + let index = sources.indexOf(source); + if (index === -1) index = resolvedSources.indexOf(source); + return index; +} + +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export function sourceContentFor(map: TraceMap, source: string): string | null { + const { sourcesContent } = map; + if (sourcesContent == null) return null; + const index = sourceIndex(map, source); + return index === -1 ? null : sourcesContent[index]; +} + +/** + * Determines if the source is marked to ignore by the source map. + */ +export function isIgnored(map: TraceMap, source: string): boolean { + const { ignoreList } = map; + if (ignoreList == null) return false; + const index = sourceIndex(map, source); + return index === -1 ? false : ignoreList.includes(index); +} + +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap { + const tracer = new TraceMap(clone(map, []), mapUrl); + cast(tracer)._decoded = map.mappings; + return tracer; +} + +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function decodedMap( + map: TraceMap, +): Omit & { mappings: readonly SourceMapSegment[][] } { + return clone(map, decodedMappings(map)); +} + +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export function encodedMap(map: TraceMap): EncodedSourceMap { + return clone(map, encodedMappings(map)); +} + +function clone( + map: TraceMap | DecodedSourceMap, + mappings: T, +): T extends string ? EncodedSourceMap : DecodedSourceMap { + return { + version: map.version, + file: map.file, + names: map.names, + sourceRoot: map.sourceRoot, + sources: map.sources, + sourcesContent: map.sourcesContent, + mappings, + ignoreList: map.ignoreList || (map as XInput).x_google_ignoreList, + } as any; +} + +function OMapping(source: null, line: null, column: null, name: null): InvalidOriginalMapping; +function OMapping( + source: string, + line: number, + column: number, + name: string | null, +): OriginalMapping; +function OMapping( + source: string | null, + line: number | null, + column: number | null, + name: string | null, +): OriginalMapping | InvalidOriginalMapping { + return { source, line, column, name } as any; +} + +function GMapping(line: null, column: null): InvalidGeneratedMapping; +function GMapping(line: number, column: number): GeneratedMapping; +function GMapping( + line: number | null, + column: number | null, +): GeneratedMapping | InvalidGeneratedMapping { + return { line, column } as any; +} + +function traceSegmentInternal( + segments: SourceMapSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): number; +function traceSegmentInternal( + segments: ReverseSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): number; +function traceSegmentInternal( + segments: SourceMapSegment[] | ReverseSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): number { + let index = memoizedBinarySearch(segments, column, memo, line); + if (bsFound) { + index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); + } else if (bias === LEAST_UPPER_BOUND) index++; + + if (index === -1 || index === segments.length) return -1; + return index; +} + +function sliceGeneratedPositions( + segments: ReverseSegment[], + memo: MemoState, + line: number, + column: number, + bias: Bias, +): GeneratedMapping[] { + let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND); + + // We ignored the bias when tracing the segment so that we're guarnateed to find the first (in + // insertion order) segment that matched. Even if we did respect the bias when tracing, we would + // still need to call `lowerBound()` to find the first segment, which is slower than just looking + // for the GREATEST_LOWER_BOUND to begin with. The only difference that matters for us is when the + // binary search didn't match, in which case GREATEST_LOWER_BOUND just needs to increment to + // match LEAST_UPPER_BOUND. + if (!bsFound && bias === LEAST_UPPER_BOUND) min++; + + if (min === -1 || min === segments.length) return []; + + // We may have found the segment that started at an earlier column. If this is the case, then we + // need to slice all generated segments that match _that_ column, because all such segments span + // to our desired column. + const matchedColumn = bsFound ? column : segments[min][COLUMN]; + + // The binary search is not guaranteed to find the lower bound when a match wasn't found. + if (!bsFound) min = lowerBound(segments, matchedColumn, min); + const max = upperBound(segments, matchedColumn, min); + + const result = []; + for (; min <= max; min++) { + const segment = segments[min]; + result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN])); + } + return result; +} + +function generatedPosition( + map: TraceMap, + source: string, + line: number, + column: number, + bias: Bias, + all: false, +): GeneratedMapping | InvalidGeneratedMapping; +function generatedPosition( + map: TraceMap, + source: string, + line: number, + column: number, + bias: Bias, + all: true, +): GeneratedMapping[]; +function generatedPosition( + map: TraceMap, + source: string, + line: number, + column: number, + bias: Bias, + all: boolean, +): GeneratedMapping | InvalidGeneratedMapping | GeneratedMapping[] { + line--; + if (line < 0) throw new Error(LINE_GTR_ZERO); + if (column < 0) throw new Error(COL_GTR_EQ_ZERO); + + const { sources, resolvedSources } = map; + let sourceIndex = sources.indexOf(source); + if (sourceIndex === -1) sourceIndex = resolvedSources.indexOf(source); + if (sourceIndex === -1) return all ? [] : GMapping(null, null); + + const generated = (cast(map)._bySources ||= buildBySources( + decodedMappings(map), + (cast(map)._bySourceMemos = sources.map(memoizedState)), + )); + + const segments = generated[sourceIndex][line]; + if (segments == null) return all ? [] : GMapping(null, null); + + const memo = cast(map)._bySourceMemos![sourceIndex]; + + if (all) return sliceGeneratedPositions(segments, memo, line, column, bias); + + const index = traceSegmentInternal(segments, memo, line, column, bias); + if (index === -1) return GMapping(null, null); + + const segment = segments[index]; + return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]); +} diff --git a/node_modules/@jridgewell/trace-mapping/src/types.ts b/node_modules/@jridgewell/trace-mapping/src/types.ts new file mode 100644 index 0000000..730a61f --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/src/types.ts @@ -0,0 +1,114 @@ +import type { SourceMapSegment } from './sourcemap-segment'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping'; + +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} + +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} + +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} + +export interface Section { + offset: { line: number; column: number }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} + +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} + +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; + +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; + +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; + +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; + +export type XInput = { x_google_ignoreList?: SourceMapV3['ignoreList'] }; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; + +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; + +export type Needle = { line: number; column: number; bias?: Bias }; +export type SourceNeedle = { source: string; line: number; column: number; bias?: Bias }; + +export type EachMapping = + | { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; + } + | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; + }; + +export abstract class SourceMap { + declare version: SourceMapV3['version']; + declare file: SourceMapV3['file']; + declare names: SourceMapV3['names']; + declare sourceRoot: SourceMapV3['sourceRoot']; + declare sources: SourceMapV3['sources']; + declare sourcesContent: SourceMapV3['sourcesContent']; + declare resolvedSources: SourceMapV3['sources']; + declare ignoreList: SourceMapV3['ignoreList']; +} + +export type Ro = + T extends Array + ? V[] | Readonly | RoArray | Readonly> + : T extends object + ? T | Readonly | RoObject | Readonly> + : T; +type RoArray = Ro[]; +type RoObject = { [K in keyof T]: T[K] | Ro }; + +export function parse(map: T): Exclude { + return typeof map === 'string' ? JSON.parse(map) : (map as Exclude); +} diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts new file mode 100644 index 0000000..b7bb85c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts @@ -0,0 +1,33 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.cts'; +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; +//# sourceMappingURL=binary-search.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map new file mode 100644 index 0000000..648e84c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts new file mode 100644 index 0000000..19e1e6b --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts @@ -0,0 +1,33 @@ +import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment.mts'; +export type MemoState = { + lastKey: number; + lastNeedle: number; + lastIndex: number; +}; +export declare let found: boolean; +/** + * A binary search implementation that returns the index if a match is found. + * If no match is found, then the left-index (the index associated with the item that comes just + * before the desired index) is returned. To maintain proper sort order, a splice would happen at + * the next index: + * + * ```js + * const array = [1, 3]; + * const needle = 2; + * const index = binarySearch(array, needle, (item, needle) => item - needle); + * + * assert.equal(index, 0); + * array.splice(index + 1, 0, needle); + * assert.deepEqual(array, [1, 2, 3]); + * ``` + */ +export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; +export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; +export declare function memoizedState(): MemoState; +/** + * This overly complicated beast is just to record the last tested line/column and the resulting + * index, allowing us to skip a few tests if mappings are monotonically increasing. + */ +export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; +//# sourceMappingURL=binary-search.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map new file mode 100644 index 0000000..648e84c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"binary-search.d.ts","sourceRoot":"","sources":["../src/binary-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,IAAI,KAAK,SAAQ,CAAC;AAEzB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACX,MAAM,CAmBR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR;AAED,wBAAgB,aAAa,IAAI,SAAS,CAMzC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,cAAc,EAAE,EAC/C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAsBR"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts new file mode 100644 index 0000000..d474786 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts @@ -0,0 +1,8 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts'; +import type { MemoState } from './binary-search.cts'; +export type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; +export = function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; +//# sourceMappingURL=by-source.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map new file mode 100644 index 0000000..580fe96 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;CACrD,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,SAAS,EAAE,GACjB,MAAM,EAAE,CAgCV"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts new file mode 100644 index 0000000..d980c33 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts @@ -0,0 +1,8 @@ +import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts'; +import type { MemoState } from './binary-search.mts'; +export type Source = { + __proto__: null; + [line: number]: Exclude[]; +}; +export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; +//# sourceMappingURL=by-source.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map new file mode 100644 index 0000000..580fe96 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"by-source.d.ts","sourceRoot":"","sources":["../src/by-source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;CACrD,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,OAAO,EAAE,SAAS,gBAAgB,EAAE,EAAE,EACtC,KAAK,EAAE,SAAS,EAAE,GACjB,MAAM,EAAE,CAgCV"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts new file mode 100644 index 0000000..433d849 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts @@ -0,0 +1,9 @@ +import { TraceMap } from './trace-mapping.cts'; +import type { SectionedSourceMapInput, Ro } from './types.cts'; +type FlattenMap = { + new (map: Ro, mapUrl?: string | null): TraceMap; + (map: Ro, mapUrl?: string | null): TraceMap; +}; +export declare const FlattenMap: FlattenMap; +export {}; +//# sourceMappingURL=flatten-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map new file mode 100644 index 0000000..994b208 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts new file mode 100644 index 0000000..444a1be --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts @@ -0,0 +1,9 @@ +import { TraceMap } from './trace-mapping.mts'; +import type { SectionedSourceMapInput, Ro } from './types.mts'; +type FlattenMap = { + new (map: Ro, mapUrl?: string | null): TraceMap; + (map: Ro, mapUrl?: string | null): TraceMap; +}; +export declare const FlattenMap: FlattenMap; +export {}; +//# sourceMappingURL=flatten-map.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map new file mode 100644 index 0000000..994b208 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"flatten-map.d.ts","sourceRoot":"","sources":["../src/flatten-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAwC,MAAM,iBAAiB,CAAC;AAUjF,OAAO,KAAK,EAKV,uBAAuB,EAEvB,EAAE,EACH,MAAM,SAAS,CAAC;AAGjB,KAAK,UAAU,GAAG;IAChB,KAAK,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IACzE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;CACtE,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAsCV,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts new file mode 100644 index 0000000..62aeedb --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts @@ -0,0 +1,4 @@ +type Resolve = (source: string | null) => string; +export = function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve; +export {}; +//# sourceMappingURL=resolve.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map new file mode 100644 index 0000000..9f155ac --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts new file mode 100644 index 0000000..e2798a1 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts @@ -0,0 +1,4 @@ +type Resolve = (source: string | null) => string; +export default function resolver(mapUrl: string | null | undefined, sourceRoot: string | undefined): Resolve; +export {}; +//# sourceMappingURL=resolve.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map new file mode 100644 index 0000000..9f155ac --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/resolve.ts"],"names":[],"mappings":"AAGA,KAAK,OAAO,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC;AACjD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAQT"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts new file mode 100644 index 0000000..b364a6d --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts @@ -0,0 +1,3 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +export = function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; +//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map new file mode 100644 index 0000000..6859515 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts new file mode 100644 index 0000000..ffd1301 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts @@ -0,0 +1,3 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; +//# sourceMappingURL=sort.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map new file mode 100644 index 0000000..6859515 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sort.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../src/sort.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAC9B,KAAK,EAAE,OAAO,GACb,gBAAgB,EAAE,EAAE,CAYtB"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts new file mode 100644 index 0000000..8d3cabc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts @@ -0,0 +1,17 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +type GeneratedLine = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map new file mode 100644 index 0000000..0c94a46 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts new file mode 100644 index 0000000..8d3cabc --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts @@ -0,0 +1,17 @@ +type GeneratedColumn = number; +type SourcesIndex = number; +type SourceLine = number; +type SourceColumn = number; +type NamesIndex = number; +type GeneratedLine = number; +export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; +export type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; +export declare const COLUMN = 0; +export declare const SOURCES_INDEX = 1; +export declare const SOURCE_LINE = 2; +export declare const SOURCE_COLUMN = 3; +export declare const NAMES_INDEX = 4; +export declare const REV_GENERATED_LINE = 1; +export declare const REV_GENERATED_COLUMN = 2; +export {}; +//# sourceMappingURL=sourcemap-segment.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map new file mode 100644 index 0000000..0c94a46 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,KAAK,aAAa,GAAG,MAAM,CAAC;AAE5B,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,oBAAoB,IAAI,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts new file mode 100644 index 0000000..8b3c0e9 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts @@ -0,0 +1,5 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export = function stripFilename(path: string | undefined | null): string; +//# sourceMappingURL=strip-filename.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map new file mode 100644 index 0000000..17a25da --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts new file mode 100644 index 0000000..cbbaee0 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts @@ -0,0 +1,5 @@ +/** + * Removes everything after the last "/", but leaves the slash. + */ +export default function stripFilename(path: string | undefined | null): string; +//# sourceMappingURL=strip-filename.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map new file mode 100644 index 0000000..17a25da --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-filename.d.ts","sourceRoot":"","sources":["../src/strip-filename.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAI7E"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts new file mode 100644 index 0000000..a40f305 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts @@ -0,0 +1,80 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.cts'; +export type { SourceMapSegment } from './sourcemap-segment.cts'; +export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.cts'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.cts'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + ignoreList: SourceMapV3['ignoreList']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: Ro, mapUrl?: string | null); +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare function decodedMappings(map: TraceMap): Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; +/** + * Iterates each mapping in generated position order. + */ +export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export declare function sourceContentFor(map: TraceMap, source: string): string | null; +/** + * Determines if the source is marked to ignore by the source map. + */ +export declare function isIgnored(map: TraceMap, source: string): boolean; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function decodedMap(map: TraceMap): Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function encodedMap(map: TraceMap): EncodedSourceMap; +//# sourceMappingURL=trace-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map new file mode 100644 index 0000000..b5a874c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"trace-mapping.d.ts","sourceRoot":"","sources":["../src/trace-mapping.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,MAAM,EACN,YAAY,EACZ,SAAS,EACT,WAAW,EAIX,EAAE,EACH,MAAM,SAAS,CAAC;AAIjB,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EACV,SAAS,EACT,gBA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AU,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAE1D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts new file mode 100644 index 0000000..bc2ff0f --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts @@ -0,0 +1,80 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping, Ro } from './types.mts'; +export type { SourceMapSegment } from './sourcemap-segment.mts'; +export type { SourceMap, DecodedSourceMap, EncodedSourceMap, Section, SectionedSourceMap, SourceMapV3, Bias, EachMapping, GeneratedMapping, InvalidGeneratedMapping, InvalidOriginalMapping, Needle, OriginalMapping, OriginalMapping as Mapping, SectionedSourceMapInput, SourceMapInput, SourceNeedle, XInput, EncodedSourceMapXInput, DecodedSourceMapXInput, SectionedSourceMapXInput, SectionXInput, } from './types.mts'; +export declare const LEAST_UPPER_BOUND = -1; +export declare const GREATEST_LOWER_BOUND = 1; +export { FlattenMap, FlattenMap as AnyMap } from './flatten-map.mts'; +export declare class TraceMap implements SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + ignoreList: SourceMapV3['ignoreList']; + resolvedSources: string[]; + private _encoded; + private _decoded; + private _decodedMemo; + private _bySources; + private _bySourceMemos; + constructor(map: Ro, mapUrl?: string | null); +} +/** + * Returns the encoded (VLQ string) form of the SourceMap's mappings field. + */ +export declare function encodedMappings(map: TraceMap): EncodedSourceMap['mappings']; +/** + * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. + */ +export declare function decodedMappings(map: TraceMap): Readonly; +/** + * A low-level API to find the segment associated with a generated line/column (think, from a + * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. + */ +export declare function traceSegment(map: TraceMap, line: number, column: number): Readonly | null; +/** + * A higher-level API to find the source/line/column associated with a generated line/column + * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in + * `source-map` library. + */ +export declare function originalPositionFor(map: TraceMap, needle: Needle): OriginalMapping | InvalidOriginalMapping; +/** + * Finds the generated line/column position of the provided source/line/column source position. + */ +export declare function generatedPositionFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping | InvalidGeneratedMapping; +/** + * Finds all generated line/column positions of the provided source/line/column source position. + */ +export declare function allGeneratedPositionsFor(map: TraceMap, needle: SourceNeedle): GeneratedMapping[]; +/** + * Iterates each mapping in generated position order. + */ +export declare function eachMapping(map: TraceMap, cb: (mapping: EachMapping) => void): void; +/** + * Retrieves the source content for a particular source, if its found. Returns null if not. + */ +export declare function sourceContentFor(map: TraceMap, source: string): string | null; +/** + * Determines if the source is marked to ignore by the source map. + */ +export declare function isIgnored(map: TraceMap, source: string): boolean; +/** + * A helper that skips sorting of the input map's mappings array, which can be expensive for larger + * maps. + */ +export declare function presortedDecodedMap(map: DecodedSourceMap, mapUrl?: string): TraceMap; +/** + * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function decodedMap(map: TraceMap): Omit & { + mappings: readonly SourceMapSegment[][]; +}; +/** + * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects + * a sourcemap, or to JSON.stringify. + */ +export declare function encodedMap(map: TraceMap): EncodedSourceMap; +//# sourceMappingURL=trace-mapping.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map new file mode 100644 index 0000000..b5a874c --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts.map @@ -0,0 +1 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G,IAAI,CAK7E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAKhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAIpF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,QAAQ,GACZ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAAE,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAA;CAAE,CAElF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAE1D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.cts b/node_modules/@jridgewell/trace-mapping/types/types.d.cts new file mode 100644 index 0000000..729c2c3 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.cts @@ -0,0 +1,107 @@ +import type { SourceMapSegment } from './sourcemap-segment.cts'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.cts'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; +export type XInput = { + x_google_ignoreList?: SourceMapV3['ignoreList']; +}; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; +export type Needle = { + line: number; + column: number; + bias?: Bias; +}; +export type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: Bias; +}; +export type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; + ignoreList: SourceMapV3['ignoreList']; +} +export type Ro = T extends Array ? V[] | Readonly | RoArray | Readonly> : T extends object ? T | Readonly | RoObject | Readonly> : T; +type RoArray = Ro[]; +type RoObject = { + [K in keyof T]: T[K] | Ro; +}; +export declare function parse(map: T): Exclude; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map b/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map new file mode 100644 index 0000000..9224783 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.cts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAA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AAC,GACrD,CAAC,CAAC;AACV,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC1B,KAAK,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvD,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAEnD"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.mts b/node_modules/@jridgewell/trace-mapping/types/types.d.mts new file mode 100644 index 0000000..a26d186 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.mts @@ -0,0 +1,107 @@ +import type { SourceMapSegment } from './sourcemap-segment.mts'; +import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.mts'; +export interface SourceMapV3 { + file?: string | null; + names: string[]; + sourceRoot?: string; + sources: (string | null)[]; + sourcesContent?: (string | null)[]; + version: 3; + ignoreList?: number[]; +} +export interface EncodedSourceMap extends SourceMapV3 { + mappings: string; +} +export interface DecodedSourceMap extends SourceMapV3 { + mappings: SourceMapSegment[][]; +} +export interface Section { + offset: { + line: number; + column: number; + }; + map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; +} +export interface SectionedSourceMap { + file?: string | null; + sections: Section[]; + version: 3; +} +export type OriginalMapping = { + source: string | null; + line: number; + column: number; + name: string | null; +}; +export type InvalidOriginalMapping = { + source: null; + line: null; + column: null; + name: null; +}; +export type GeneratedMapping = { + line: number; + column: number; +}; +export type InvalidGeneratedMapping = { + line: null; + column: null; +}; +export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND; +export type XInput = { + x_google_ignoreList?: SourceMapV3['ignoreList']; +}; +export type EncodedSourceMapXInput = EncodedSourceMap & XInput; +export type DecodedSourceMapXInput = DecodedSourceMap & XInput; +export type SectionedSourceMapXInput = Omit & { + sections: SectionXInput[]; +}; +export type SectionXInput = Omit & { + map: SectionedSourceMapInput; +}; +export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap; +export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput; +export type Needle = { + line: number; + column: number; + bias?: Bias; +}; +export type SourceNeedle = { + source: string; + line: number; + column: number; + bias?: Bias; +}; +export type EachMapping = { + generatedLine: number; + generatedColumn: number; + source: null; + originalLine: null; + originalColumn: null; + name: null; +} | { + generatedLine: number; + generatedColumn: number; + source: string | null; + originalLine: number; + originalColumn: number; + name: string | null; +}; +export declare abstract class SourceMap { + version: SourceMapV3['version']; + file: SourceMapV3['file']; + names: SourceMapV3['names']; + sourceRoot: SourceMapV3['sourceRoot']; + sources: SourceMapV3['sources']; + sourcesContent: SourceMapV3['sourcesContent']; + resolvedSources: SourceMapV3['sources']; + ignoreList: SourceMapV3['ignoreList']; +} +export type Ro = T extends Array ? V[] | Readonly | RoArray | Readonly> : T extends object ? T | Readonly | RoObject | Readonly> : T; +type RoArray = Ro[]; +type RoObject = { + [K in keyof T]: T[K] | Ro; +}; +export declare function parse(map: T): Exclude; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map b/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map new file mode 100644 index 0000000..9224783 --- /dev/null +++ b/node_modules/@jridgewell/trace-mapping/types/types.d.mts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEzF,MAAM,WAAW,WAA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CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvD,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAEnD"} \ No newline at end of file diff --git a/node_modules/@parcel/watcher-win32-x64/LICENSE b/node_modules/@parcel/watcher-win32-x64/LICENSE new file mode 100644 index 0000000..7fb9bc9 --- /dev/null +++ b/node_modules/@parcel/watcher-win32-x64/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present Devon Govett + +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. diff --git a/node_modules/@parcel/watcher-win32-x64/README.md b/node_modules/@parcel/watcher-win32-x64/README.md new file mode 100644 index 0000000..7620831 --- /dev/null +++ b/node_modules/@parcel/watcher-win32-x64/README.md @@ -0,0 +1 @@ +This is the win32-x64 build of @parcel/watcher. See https://github.com/parcel-bundler/watcher for details. \ No newline at end of file diff --git a/node_modules/@parcel/watcher-win32-x64/package.json b/node_modules/@parcel/watcher-win32-x64/package.json new file mode 100644 index 0000000..dbbc6d1 --- /dev/null +++ b/node_modules/@parcel/watcher-win32-x64/package.json @@ -0,0 +1,30 @@ +{ + "name": "@parcel/watcher-win32-x64", + "version": "2.5.1", + "main": "watcher.node", + "repository": { + "type": "git", + "url": "https://github.com/parcel-bundler/watcher.git" + }, + "description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "files": [ + "watcher.node" + ], + "engines": { + "node": ">= 10.0.0" + }, + "os": [ + "win32" + ], + "cpu": [ + "x64" + ] +} diff --git a/node_modules/@parcel/watcher-win32-x64/watcher.node b/node_modules/@parcel/watcher-win32-x64/watcher.node new file mode 100644 index 0000000..3264889 Binary files /dev/null and b/node_modules/@parcel/watcher-win32-x64/watcher.node differ diff --git a/node_modules/@parcel/watcher/LICENSE b/node_modules/@parcel/watcher/LICENSE new file mode 100644 index 0000000..7fb9bc9 --- /dev/null +++ b/node_modules/@parcel/watcher/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present Devon Govett + +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. diff --git a/node_modules/@parcel/watcher/README.md b/node_modules/@parcel/watcher/README.md new file mode 100644 index 0000000..d212b93 --- /dev/null +++ b/node_modules/@parcel/watcher/README.md @@ -0,0 +1,135 @@ +# @parcel/watcher + +A native C++ Node module for querying and subscribing to filesystem events. Used by [Parcel 2](https://github.com/parcel-bundler/parcel). + +## Features + +- **Watch** - subscribe to realtime recursive directory change notifications when files or directories are created, updated, or deleted. +- **Query** - performantly query for historical change events in a directory, even when your program is not running. +- **Native** - implemented in C++ for performance and low-level integration with the operating system. +- **Cross platform** - includes backends for macOS, Linux, Windows, FreeBSD, and Watchman. +- **Performant** - events are throttled in C++ so the JavaScript thread is not overwhelmed during large filesystem changes (e.g. `git checkout` or `npm install`). +- **Scalable** - tens of thousands of files can be watched or queried at once with good performance. + +## Example + +```javascript +const watcher = require('@parcel/watcher'); +const path = require('path'); + +// Subscribe to events +let subscription = await watcher.subscribe(process.cwd(), (err, events) => { + console.log(events); +}); + +// later on... +await subscription.unsubscribe(); + +// Get events since some saved snapshot in the past +let snapshotPath = path.join(process.cwd(), 'snapshot.txt'); +let events = await watcher.getEventsSince(process.cwd(), snapshotPath); + +// Save a snapshot for later +await watcher.writeSnapshot(process.cwd(), snapshotPath); +``` + +## Watching + +`@parcel/watcher` supports subscribing to realtime notifications of changes in a directory. It works recursively, so changes in sub-directories will also be emitted. + +Events are throttled and coalesced for performance during large changes like `git checkout` or `npm install`, and a single notification will be emitted with all of the events at the end. + +Only one notification will be emitted per file. For example, if a file was both created and updated since the last event, you'll get only a `create` event. If a file is both created and deleted, you will not be notifed of that file. Renames cause two events: a `delete` for the old name, and a `create` for the new name. + +```javascript +let subscription = await watcher.subscribe(process.cwd(), (err, events) => { + console.log(events); +}); +``` + +Events have two properties: + +- `type` - the event type: `create`, `update`, or `delete`. +- `path` - the absolute path to the file or directory. + +To unsubscribe from change notifications, call the `unsubscribe` method on the returned subscription object. + +```javascript +await subscription.unsubscribe(); +``` + +`@parcel/watcher` has the following watcher backends, listed in priority order: + +- [FSEvents](https://developer.apple.com/documentation/coreservices/file_system_events) on macOS +- [Watchman](https://facebook.github.io/watchman/) if installed +- [inotify](http://man7.org/linux/man-pages/man7/inotify.7.html) on Linux +- [ReadDirectoryChangesW](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v%3Dvs.85%29.aspx) on Windows +- [kqueue](https://man.freebsd.org/cgi/man.cgi?kqueue) on FreeBSD, or as an alternative to FSEvents on macOS + +You can specify the exact backend you wish to use by passing the `backend` option. If that backend is not available on the current platform, the default backend will be used instead. See below for the list of backend names that can be passed to the options. + +## Querying + +`@parcel/watcher` also supports querying for historical changes made in a directory, even when your program is not running. This makes it easy to invalidate a cache and re-build only the files that have changed, for example. It can be **significantly** faster than traversing the entire filesystem to determine what files changed, depending on the platform. + +In order to query for historical changes, you first need a previous snapshot to compare to. This can be saved to a file with the `writeSnapshot` function, e.g. just before your program exits. + +```javascript +await watcher.writeSnapshot(dirPath, snapshotPath); +``` + +When your program starts up, you can query for changes that have occurred since that snapshot using the `getEventsSince` function. + +```javascript +let events = await watcher.getEventsSince(dirPath, snapshotPath); +``` + +The events returned are exactly the same as the events that would be passed to the `subscribe` callback (see above). + +`@parcel/watcher` has the following watcher backends, listed in priority order: + +- [FSEvents](https://developer.apple.com/documentation/coreservices/file_system_events) on macOS +- [Watchman](https://facebook.github.io/watchman/) if installed +- [fts](http://man7.org/linux/man-pages/man3/fts.3.html) (brute force) on Linux and FreeBSD +- [FindFirstFile](https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-findfirstfilea) (brute force) on Windows + +The FSEvents (macOS) and Watchman backends are significantly more performant than the brute force backends used by default on Linux and Windows, for example returning results in miliseconds instead of seconds for large directory trees. This is because a background daemon monitoring filesystem changes on those platforms allows us to query cached data rather than traversing the filesystem manually (brute force). + +macOS has good performance with FSEvents by default. For the best performance on other platforms, install [Watchman](https://facebook.github.io/watchman/) and it will be used by `@parcel/watcher` automatically. + +You can specify the exact backend you wish to use by passing the `backend` option. If that backend is not available on the current platform, the default backend will be used instead. See below for the list of backend names that can be passed to the options. + +## Options + +All of the APIs in `@parcel/watcher` support the following options, which are passed as an object as the last function argument. + +- `ignore` - an array of paths or glob patterns to ignore. uses [`is-glob`](https://github.com/micromatch/is-glob) to distinguish paths from globs. glob patterns are parsed with [`micromatch`](https://github.com/micromatch/micromatch) (see [features](https://github.com/micromatch/micromatch#matching-features)). + - paths can be relative or absolute and can either be files or directories. No events will be emitted about these files or directories or their children. + - glob patterns match on relative paths from the root that is watched. No events will be emitted for matching paths. +- `backend` - the name of an explicitly chosen backend to use. Allowed options are `"fs-events"`, `"watchman"`, `"inotify"`, `"kqueue"`, `"windows"`, or `"brute-force"` (only for querying). If the specified backend is not available on the current platform, the default backend will be used instead. + +## WASM + +The `@parcel/watcher-wasm` package can be used in place of `@parcel/watcher` on unsupported platforms. It relies on the Node `fs` module, so in non-Node environments such as browsers, an `fs` polyfill will be needed. + +**Note**: the WASM implementation is significantly less efficient than the native implementations because it must crawl the file system to watch each directory individually. Use the native `@parcel/watcher` package wherever possible. + +```js +import {subscribe} from '@parcel/watcher-wasm'; + +// Use the module as documented above. +subscribe(/* ... */); +``` + +## Who is using this? + +- [Parcel 2](https://parceljs.org/) +- [VSCode](https://code.visualstudio.com/updates/v1_62#_file-watching-changes) +- [Tailwind CSS Intellisense](https://github.com/tailwindlabs/tailwindcss-intellisense) +- [Gatsby Cloud](https://twitter.com/chatsidhartha/status/1435647412828196867) +- [Nx](https://nx.dev) +- [Nuxt](https://nuxt.com) + +## License + +MIT diff --git a/node_modules/@parcel/watcher/binding.gyp b/node_modules/@parcel/watcher/binding.gyp new file mode 100644 index 0000000..9b8f6ff --- /dev/null +++ b/node_modules/@parcel/watcher/binding.gyp @@ -0,0 +1,93 @@ +{ + "targets": [ + { + "target_name": "watcher", + "defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ], + "sources": [ "src/binding.cc", "src/Watcher.cc", "src/Backend.cc", "src/DirTree.cc", "src/Glob.cc", "src/Debounce.cc" ], + "include_dirs" : [" unknown; + export interface AsyncSubscription { + unsubscribe(): Promise; + } + export interface Event { + path: FilePath; + type: EventType; + } + export function getEventsSince( + dir: FilePath, + snapshot: FilePath, + opts?: Options + ): Promise; + export function subscribe( + dir: FilePath, + fn: SubscribeCallback, + opts?: Options + ): Promise; + export function unsubscribe( + dir: FilePath, + fn: SubscribeCallback, + opts?: Options + ): Promise; + export function writeSnapshot( + dir: FilePath, + snapshot: FilePath, + opts?: Options + ): Promise; +} + +export = ParcelWatcher; \ No newline at end of file diff --git a/node_modules/@parcel/watcher/index.js b/node_modules/@parcel/watcher/index.js new file mode 100644 index 0000000..8afb2b1 --- /dev/null +++ b/node_modules/@parcel/watcher/index.js @@ -0,0 +1,41 @@ +const {createWrapper} = require('./wrapper'); + +let name = `@parcel/watcher-${process.platform}-${process.arch}`; +if (process.platform === 'linux') { + const { MUSL, family } = require('detect-libc'); + if (family === MUSL) { + name += '-musl'; + } else { + name += '-glibc'; + } +} + +let binding; +try { + binding = require(name); +} catch (err) { + handleError(err); + try { + binding = require('./build/Release/watcher.node'); + } catch (err) { + handleError(err); + try { + binding = require('./build/Debug/watcher.node'); + } catch (err) { + handleError(err); + throw new Error(`No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`); + } + } +} + +function handleError(err) { + if (err?.code !== 'MODULE_NOT_FOUND') { + throw err; + } +} + +const wrapper = createWrapper(binding); +exports.writeSnapshot = wrapper.writeSnapshot; +exports.getEventsSince = wrapper.getEventsSince; +exports.subscribe = wrapper.subscribe; +exports.unsubscribe = wrapper.unsubscribe; diff --git a/node_modules/@parcel/watcher/index.js.flow b/node_modules/@parcel/watcher/index.js.flow new file mode 100644 index 0000000..d75da93 --- /dev/null +++ b/node_modules/@parcel/watcher/index.js.flow @@ -0,0 +1,48 @@ +// @flow +declare type FilePath = string; +declare type GlobPattern = string; + +export type BackendType = + | 'fs-events' + | 'watchman' + | 'inotify' + | 'windows' + | 'brute-force'; +export type EventType = 'create' | 'update' | 'delete'; +export interface Options { + ignore?: Array, + backend?: BackendType +} +export type SubscribeCallback = ( + err: ?Error, + events: Array +) => mixed; +export interface AsyncSubscription { + unsubscribe(): Promise +} +export interface Event { + path: FilePath, + type: EventType +} +declare module.exports: { + getEventsSince( + dir: FilePath, + snapshot: FilePath, + opts?: Options + ): Promise>, + subscribe( + dir: FilePath, + fn: SubscribeCallback, + opts?: Options + ): Promise, + unsubscribe( + dir: FilePath, + fn: SubscribeCallback, + opts?: Options + ): Promise, + writeSnapshot( + dir: FilePath, + snapshot: FilePath, + opts?: Options + ): Promise +} \ No newline at end of file diff --git a/node_modules/@parcel/watcher/package.json b/node_modules/@parcel/watcher/package.json new file mode 100644 index 0000000..dc41500 --- /dev/null +++ b/node_modules/@parcel/watcher/package.json @@ -0,0 +1,88 @@ +{ + "name": "@parcel/watcher", + "version": "2.5.1", + "main": "index.js", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/parcel-bundler/watcher.git" + }, + "description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "files": [ + "index.js", + "index.js.flow", + "index.d.ts", + "wrapper.js", + "package.json", + "README.md", + "LICENSE", + "src", + "scripts/build-from-source.js", + "binding.gyp" + ], + "scripts": { + "prebuild": "prebuildify --napi --strip --tag-libc", + "format": "prettier --write \"./**/*.{js,json,md}\"", + "build": "node-gyp rebuild", + "install": "node scripts/build-from-source.js", + "test": "mocha" + }, + "engines": { + "node": ">= 10.0.0" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.{js,json,md}": [ + "prettier --write", + "git add" + ] + }, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "devDependencies": { + "esbuild": "^0.19.8", + "fs-extra": "^10.0.0", + "husky": "^7.0.2", + "lint-staged": "^11.1.2", + "mocha": "^9.1.1", + "napi-wasm": "^1.1.0", + "prebuildify": "^6.0.1", + "prettier": "^2.3.2" + }, + "binary": { + "napi_versions": [ + 3 + ] + }, + "optionalDependencies": { + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1" + } +} diff --git a/node_modules/@parcel/watcher/scripts/build-from-source.js b/node_modules/@parcel/watcher/scripts/build-from-source.js new file mode 100644 index 0000000..4602008 --- /dev/null +++ b/node_modules/@parcel/watcher/scripts/build-from-source.js @@ -0,0 +1,13 @@ +#!/usr/bin/env node + +const {spawn} = require('child_process'); + +if (process.env.npm_config_build_from_source === 'true') { + build(); +} + +function build() { + spawn('node-gyp', ['rebuild'], { stdio: 'inherit', shell: true }).on('exit', function (code) { + process.exit(code); + }); +} diff --git a/node_modules/@parcel/watcher/src/Backend.cc b/node_modules/@parcel/watcher/src/Backend.cc new file mode 100644 index 0000000..fcf5544 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Backend.cc @@ -0,0 +1,182 @@ +#ifdef FS_EVENTS +#include "macos/FSEventsBackend.hh" +#endif +#ifdef WATCHMAN +#include "watchman/WatchmanBackend.hh" +#endif +#ifdef WINDOWS +#include "windows/WindowsBackend.hh" +#endif +#ifdef INOTIFY +#include "linux/InotifyBackend.hh" +#endif +#ifdef KQUEUE +#include "kqueue/KqueueBackend.hh" +#endif +#ifdef __wasm32__ +#include "wasm/WasmBackend.hh" +#endif +#include "shared/BruteForceBackend.hh" + +#include "Backend.hh" +#include + +static std::unordered_map> sharedBackends; + +std::shared_ptr getBackend(std::string backend) { + // Use FSEvents on macOS by default. + // Use watchman by default if available on other platforms. + // Fall back to brute force. + #ifdef FS_EVENTS + if (backend == "fs-events" || backend == "default") { + return std::make_shared(); + } + #endif + #ifdef WATCHMAN + if ((backend == "watchman" || backend == "default") && WatchmanBackend::checkAvailable()) { + return std::make_shared(); + } + #endif + #ifdef WINDOWS + if (backend == "windows" || backend == "default") { + return std::make_shared(); + } + #endif + #ifdef INOTIFY + if (backend == "inotify" || backend == "default") { + return std::make_shared(); + } + #endif + #ifdef KQUEUE + if (backend == "kqueue" || backend == "default") { + return std::make_shared(); + } + #endif + #ifdef __wasm32__ + if (backend == "wasm" || backend == "default") { + return std::make_shared(); + } + #endif + if (backend == "brute-force" || backend == "default") { + return std::make_shared(); + } + + return nullptr; +} + +std::shared_ptr Backend::getShared(std::string backend) { + auto found = sharedBackends.find(backend); + if (found != sharedBackends.end()) { + return found->second; + } + + auto result = getBackend(backend); + if (!result) { + return getShared("default"); + } + + result->run(); + sharedBackends.emplace(backend, result); + return result; +} + +void removeShared(Backend *backend) { + for (auto it = sharedBackends.begin(); it != sharedBackends.end(); it++) { + if (it->second.get() == backend) { + sharedBackends.erase(it); + break; + } + } + + // Free up memory. + if (sharedBackends.size() == 0) { + sharedBackends.rehash(0); + } +} + +void Backend::run() { + #ifndef __wasm32__ + mThread = std::thread([this] () { + try { + start(); + } catch (std::exception &err) { + handleError(err); + } + }); + + if (mThread.joinable()) { + mStartedSignal.wait(); + } + #else + try { + start(); + } catch (std::exception &err) { + handleError(err); + } + #endif +} + +void Backend::notifyStarted() { + mStartedSignal.notify(); +} + +void Backend::start() { + notifyStarted(); +} + +Backend::~Backend() { + #ifndef __wasm32__ + // Wait for thread to stop + if (mThread.joinable()) { + // If the backend is being destroyed from the thread itself, detach, otherwise join. + if (mThread.get_id() == std::this_thread::get_id()) { + mThread.detach(); + } else { + mThread.join(); + } + } + #endif +} + +void Backend::watch(WatcherRef watcher) { + std::unique_lock lock(mMutex); + auto res = mSubscriptions.find(watcher); + if (res == mSubscriptions.end()) { + try { + this->subscribe(watcher); + mSubscriptions.insert(watcher); + } catch (std::exception &err) { + unref(); + throw; + } + } +} + +void Backend::unwatch(WatcherRef watcher) { + std::unique_lock lock(mMutex); + size_t deleted = mSubscriptions.erase(watcher); + if (deleted > 0) { + this->unsubscribe(watcher); + unref(); + } +} + +void Backend::unref() { + if (mSubscriptions.size() == 0) { + removeShared(this); + } +} + +void Backend::handleWatcherError(WatcherError &err) { + unwatch(err.mWatcher); + err.mWatcher->notifyError(err); +} + +void Backend::handleError(std::exception &err) { + std::unique_lock lock(mMutex); + for (auto it = mSubscriptions.begin(); it != mSubscriptions.end(); it++) { + (*it)->notifyError(err); + } + + removeShared(this); +} diff --git a/node_modules/@parcel/watcher/src/Backend.hh b/node_modules/@parcel/watcher/src/Backend.hh new file mode 100644 index 0000000..d673bd1 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Backend.hh @@ -0,0 +1,37 @@ +#ifndef BACKEND_H +#define BACKEND_H + +#include "Event.hh" +#include "Watcher.hh" +#include "Signal.hh" +#include + +class Backend { +public: + virtual ~Backend(); + void run(); + void notifyStarted(); + + virtual void start(); + virtual void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) = 0; + virtual void getEventsSince(WatcherRef watcher, std::string *snapshotPath) = 0; + virtual void subscribe(WatcherRef watcher) = 0; + virtual void unsubscribe(WatcherRef watcher) = 0; + + static std::shared_ptr getShared(std::string backend); + + void watch(WatcherRef watcher); + void unwatch(WatcherRef watcher); + void unref(); + void handleWatcherError(WatcherError &err); + + std::mutex mMutex; + std::thread mThread; +private: + std::unordered_set mSubscriptions; + Signal mStartedSignal; + + void handleError(std::exception &err); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/Debounce.cc b/node_modules/@parcel/watcher/src/Debounce.cc new file mode 100644 index 0000000..be07e78 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Debounce.cc @@ -0,0 +1,113 @@ +#include "Debounce.hh" + +#ifdef __wasm32__ +extern "C" void on_timeout(void *ctx) { + Debounce *debounce = (Debounce *)ctx; + debounce->notify(); +} +#endif + +std::shared_ptr Debounce::getShared() { + static std::weak_ptr sharedInstance; + std::shared_ptr shared = sharedInstance.lock(); + if (!shared) { + shared = std::make_shared(); + sharedInstance = shared; + } + + return shared; +} + +Debounce::Debounce() { + mRunning = true; + #ifndef __wasm32__ + mThread = std::thread([this] () { + loop(); + }); + #endif +} + +Debounce::~Debounce() { + mRunning = false; + #ifndef __wasm32__ + mWaitSignal.notify(); + mThread.join(); + #endif +} + +void Debounce::add(void *key, std::function cb) { + std::unique_lock lock(mMutex); + mCallbacks.emplace(key, cb); +} + +void Debounce::remove(void *key) { + std::unique_lock lock(mMutex); + mCallbacks.erase(key); +} + +void Debounce::trigger() { + std::unique_lock lock(mMutex); + #ifdef __wasm32__ + notifyIfReady(); + #else + mWaitSignal.notify(); + #endif +} + +#ifndef __wasm32__ +void Debounce::loop() { + while (mRunning) { + mWaitSignal.wait(); + if (!mRunning) { + break; + } + + notifyIfReady(); + } +} +#endif + +void Debounce::notifyIfReady() { + if (!mRunning) { + return; + } + + // If we haven't seen an event in more than the maximum wait time, notify callbacks immediately + // to ensure that we don't wait forever. Otherwise, wait for the minimum wait time and batch + // subsequent fast changes. This also means the first file change in a batch is notified immediately, + // separately from the rest of the batch. This seems like an acceptable tradeoff if the common case + // is that only a single file was updated at a time. + auto time = std::chrono::steady_clock::now(); + if ((time - mLastTime) > std::chrono::milliseconds(MAX_WAIT_TIME)) { + mLastTime = time; + notify(); + } else { + wait(); + } +} + +void Debounce::wait() { + #ifdef __wasm32__ + clear_timeout(mTimeout); + mTimeout = set_timeout(MIN_WAIT_TIME, this); + #else + auto status = mWaitSignal.waitFor(std::chrono::milliseconds(MIN_WAIT_TIME)); + if (mRunning && (status == std::cv_status::timeout)) { + notify(); + } + #endif +} + +void Debounce::notify() { + std::unique_lock lock(mMutex); + + mLastTime = std::chrono::steady_clock::now(); + for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { + auto cb = it->second; + cb(); + } + + #ifndef __wasm32__ + mWaitSignal.reset(); + #endif +} diff --git a/node_modules/@parcel/watcher/src/Debounce.hh b/node_modules/@parcel/watcher/src/Debounce.hh new file mode 100644 index 0000000..a17fdef --- /dev/null +++ b/node_modules/@parcel/watcher/src/Debounce.hh @@ -0,0 +1,49 @@ +#ifndef DEBOUNCE_H +#define DEBOUNCE_H + +#include +#include +#include +#include "Signal.hh" + +#define MIN_WAIT_TIME 50 +#define MAX_WAIT_TIME 500 + +#ifdef __wasm32__ +extern "C" { + int set_timeout(int ms, void *ctx); + void clear_timeout(int timeout); + void on_timeout(void *ctx); +}; +#endif + +class Debounce { +public: + static std::shared_ptr getShared(); + + Debounce(); + ~Debounce(); + + void add(void *key, std::function cb); + void remove(void *key); + void trigger(); + void notify(); + +private: + bool mRunning; + std::mutex mMutex; + #ifdef __wasm32__ + int mTimeout; + #else + Signal mWaitSignal; + std::thread mThread; + #endif + std::unordered_map> mCallbacks; + std::chrono::time_point mLastTime; + + void loop(); + void notifyIfReady(); + void wait(); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/DirTree.cc b/node_modules/@parcel/watcher/src/DirTree.cc new file mode 100644 index 0000000..ac17c15 --- /dev/null +++ b/node_modules/@parcel/watcher/src/DirTree.cc @@ -0,0 +1,152 @@ +#include "DirTree.hh" +#include + +static std::mutex mDirCacheMutex; +static std::unordered_map> dirTreeCache; + +struct DirTreeDeleter { + void operator()(DirTree *tree) { + std::lock_guard lock(mDirCacheMutex); + dirTreeCache.erase(tree->root); + delete tree; + + // Free up memory. + if (dirTreeCache.size() == 0) { + dirTreeCache.rehash(0); + } + } +}; + +std::shared_ptr DirTree::getCached(std::string root) { + std::lock_guard lock(mDirCacheMutex); + + auto found = dirTreeCache.find(root); + std::shared_ptr tree; + + // Use cached tree, or create an empty one. + if (found != dirTreeCache.end()) { + tree = found->second.lock(); + } else { + tree = std::shared_ptr(new DirTree(root), DirTreeDeleter()); + dirTreeCache.emplace(root, tree); + } + + return tree; +} + +DirTree::DirTree(std::string root, FILE *f) : root(root), isComplete(true) { + size_t size; + if (fscanf(f, "%zu", &size)) { + for (size_t i = 0; i < size; i++) { + DirEntry entry(f); + entries.emplace(entry.path, entry); + } + } +} + +// Internal find method that has no lock +DirEntry *DirTree::_find(std::string path) { + auto found = entries.find(path); + if (found == entries.end()) { + return NULL; + } + + return &found->second; +} + +DirEntry *DirTree::add(std::string path, uint64_t mtime, bool isDir) { + std::lock_guard lock(mMutex); + + DirEntry entry(path, mtime, isDir); + auto it = entries.emplace(entry.path, entry); + return &it.first->second; +} + +DirEntry *DirTree::find(std::string path) { + std::lock_guard lock(mMutex); + return _find(path); +} + +DirEntry *DirTree::update(std::string path, uint64_t mtime) { + std::lock_guard lock(mMutex); + + DirEntry *found = _find(path); + if (found) { + found->mtime = mtime; + } + + return found; +} + +void DirTree::remove(std::string path) { + std::lock_guard lock(mMutex); + + DirEntry *found = _find(path); + + // Remove all sub-entries if this is a directory + if (found && found->isDir) { + std::string pathStart = path + DIR_SEP; + for (auto it = entries.begin(); it != entries.end();) { + if (it->first.rfind(pathStart, 0) == 0) { + it = entries.erase(it); + } else { + it++; + } + } + } + + entries.erase(path); +} + +void DirTree::write(FILE *f) { + std::lock_guard lock(mMutex); + + fprintf(f, "%zu\n", entries.size()); + for (auto it = entries.begin(); it != entries.end(); it++) { + it->second.write(f); + } +} + +void DirTree::getChanges(DirTree *snapshot, EventList &events) { + std::lock_guard lock(mMutex); + std::lock_guard snapshotLock(snapshot->mMutex); + + for (auto it = entries.begin(); it != entries.end(); it++) { + auto found = snapshot->entries.find(it->first); + if (found == snapshot->entries.end()) { + events.create(it->second.path); + } else if (found->second.mtime != it->second.mtime && !found->second.isDir && !it->second.isDir) { + events.update(it->second.path); + } + } + + for (auto it = snapshot->entries.begin(); it != snapshot->entries.end(); it++) { + size_t count = entries.count(it->first); + if (count == 0) { + events.remove(it->second.path); + } + } +} + +DirEntry::DirEntry(std::string p, uint64_t t, bool d) { + path = p; + mtime = t; + isDir = d; + state = NULL; +} + +DirEntry::DirEntry(FILE *f) { + size_t size; + if (fscanf(f, "%zu", &size)) { + path.resize(size); + if (fread(&path[0], sizeof(char), size, f)) { + int d = 0; + fscanf(f, "%" PRIu64 " %d\n", &mtime, &d); + isDir = d == 1; + } + } +} + +void DirEntry::write(FILE *f) const { + fprintf(f, "%zu%s%" PRIu64 " %d\n", path.size(), path.c_str(), mtime, isDir); +} diff --git a/node_modules/@parcel/watcher/src/DirTree.hh b/node_modules/@parcel/watcher/src/DirTree.hh new file mode 100644 index 0000000..328f469 --- /dev/null +++ b/node_modules/@parcel/watcher/src/DirTree.hh @@ -0,0 +1,50 @@ +#ifndef DIR_TREE_H +#define DIR_TREE_H + +#include +#include +#include +#include "Event.hh" + +#ifdef _WIN32 +#define DIR_SEP "\\" +#else +#define DIR_SEP "/" +#endif + +struct DirEntry { + std::string path; + uint64_t mtime; + bool isDir; + mutable void *state; + + DirEntry(std::string p, uint64_t t, bool d); + DirEntry(FILE *f); + void write(FILE *f) const; + bool operator==(const DirEntry &other) const { + return path == other.path; + } +}; + +class DirTree { +public: + static std::shared_ptr getCached(std::string root); + DirTree(std::string root) : root(root), isComplete(false) {} + DirTree(std::string root, FILE *f); + DirEntry *add(std::string path, uint64_t mtime, bool isDir); + DirEntry *find(std::string path); + DirEntry *update(std::string path, uint64_t mtime); + void remove(std::string path); + void write(FILE *f); + void getChanges(DirTree *snapshot, EventList &events); + + std::mutex mMutex; + std::string root; + bool isComplete; + std::unordered_map entries; + +private: + DirEntry *_find(std::string path); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/Event.hh b/node_modules/@parcel/watcher/src/Event.hh new file mode 100644 index 0000000..8d09712 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Event.hh @@ -0,0 +1,109 @@ +#ifndef EVENT_H +#define EVENT_H + +#include +#include +#include "wasm/include.h" +#include +#include +#include +#include + +using namespace Napi; + +struct Event { + std::string path; + bool isCreated; + bool isDeleted; + Event(std::string path) : path(path), isCreated(false), isDeleted(false) {} + + Value toJS(const Env& env) { + EscapableHandleScope scope(env); + Object res = Object::New(env); + std::string type = isCreated ? "create" : isDeleted ? "delete" : "update"; + res.Set(String::New(env, "path"), String::New(env, path.c_str())); + res.Set(String::New(env, "type"), String::New(env, type.c_str())); + return scope.Escape(res); + } +}; + +class EventList { +public: + void create(std::string path) { + std::lock_guard l(mMutex); + Event *event = internalUpdate(path); + if (event->isDeleted) { + // Assume update event when rapidly removed and created + // https://github.com/parcel-bundler/watcher/issues/72 + event->isDeleted = false; + } else { + event->isCreated = true; + } + } + + Event *update(std::string path) { + std::lock_guard l(mMutex); + return internalUpdate(path); + } + + void remove(std::string path) { + std::lock_guard l(mMutex); + Event *event = internalUpdate(path); + event->isDeleted = true; + } + + size_t size() { + std::lock_guard l(mMutex); + return mEvents.size(); + } + + std::vector getEvents() { + std::lock_guard l(mMutex); + std::vector eventsCloneVector; + for(auto it = mEvents.begin(); it != mEvents.end(); ++it) { + if (!(it->second.isCreated && it->second.isDeleted)) { + eventsCloneVector.push_back(it->second); + } + } + return eventsCloneVector; + } + + void clear() { + std::lock_guard l(mMutex); + mEvents.clear(); + mError.reset(); + } + + void error(std::string err) { + std::lock_guard l(mMutex); + if (!mError.has_value()) { + mError.emplace(err); + } + } + + bool hasError() { + std::lock_guard l(mMutex); + return mError.has_value(); + } + + std::string getError() { + std::lock_guard l(mMutex); + return mError.value_or(""); + } + +private: + mutable std::mutex mMutex; + std::map mEvents; + std::optional mError; + Event *internalUpdate(std::string path) { + auto found = mEvents.find(path); + if (found == mEvents.end()) { + auto it = mEvents.emplace(path, Event(path)); + return &it.first->second; + } + + return &found->second; + } +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/Glob.cc b/node_modules/@parcel/watcher/src/Glob.cc new file mode 100644 index 0000000..a4a1722 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Glob.cc @@ -0,0 +1,22 @@ +#include "Glob.hh" + +#ifdef __wasm32__ +extern "C" bool wasm_regex_match(const char *s, const char *regex); +#endif + +Glob::Glob(std::string raw) { + mRaw = raw; + mHash = std::hash()(raw); + #ifndef __wasm32__ + mRegex = std::regex(raw); + #endif +} + +bool Glob::isIgnored(std::string relative_path) const { + // Use native JS regex engine for wasm to reduce binary size. + #ifdef __wasm32__ + return wasm_regex_match(relative_path.c_str(), mRaw.c_str()); + #else + return std::regex_match(relative_path, mRegex); + #endif +} diff --git a/node_modules/@parcel/watcher/src/Glob.hh b/node_modules/@parcel/watcher/src/Glob.hh new file mode 100644 index 0000000..6e049e6 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Glob.hh @@ -0,0 +1,34 @@ +#ifndef GLOB_H +#define GLOB_H + +#include +#include + +struct Glob { + std::size_t mHash; + std::string mRaw; + #ifndef __wasm32__ + std::regex mRegex; + #endif + + Glob(std::string raw); + + bool operator==(const Glob &other) const { + return mHash == other.mHash; + } + + bool isIgnored(std::string relative_path) const; +}; + +namespace std +{ + template <> + struct hash + { + size_t operator()(const Glob& g) const { + return g.mHash; + } + }; +} + +#endif diff --git a/node_modules/@parcel/watcher/src/PromiseRunner.hh b/node_modules/@parcel/watcher/src/PromiseRunner.hh new file mode 100644 index 0000000..4ca3bb6 --- /dev/null +++ b/node_modules/@parcel/watcher/src/PromiseRunner.hh @@ -0,0 +1,101 @@ +#ifndef PROMISE_RUNNER_H +#define PROMISE_RUNNER_H + +#include +#include "wasm/include.h" +#include + +using namespace Napi; + +class PromiseRunner { +public: + const Env env; + Promise::Deferred deferred; + + PromiseRunner(Env env) : env(env), deferred(Promise::Deferred::New(env)) { + napi_status status = napi_create_async_work(env, nullptr, env.Undefined(), + onExecute, onWorkComplete, this, &work); + if (status != napi_ok) { + work = nullptr; + const napi_extended_error_info *error_info = 0; + napi_get_last_error_info(env, &error_info); + if (error_info->error_message) { + Error::New(env, error_info->error_message).ThrowAsJavaScriptException(); + } else { + Error::New(env).ThrowAsJavaScriptException(); + } + } + } + + virtual ~PromiseRunner() {} + + Value queue() { + if (work) { + napi_status status = napi_queue_async_work(env, work); + if (status != napi_ok) { + onError(Error::New(env)); + } + } + + return deferred.Promise(); + } + +private: + napi_async_work work; + std::string error; + + static void onExecute(napi_env env, void *this_pointer) { + PromiseRunner* self = (PromiseRunner*) this_pointer; + try { + self->execute(); + } catch (std::exception &err) { + self->error = err.what(); + } + } + + static void onWorkComplete(napi_env env, napi_status status, void *this_pointer) { + PromiseRunner* self = (PromiseRunner*) this_pointer; + if (status != napi_cancelled) { + HandleScope scope(self->env); + if (status == napi_ok) { + status = napi_delete_async_work(self->env, self->work); + if (status == napi_ok) { + if (self->error.size() == 0) { + self->onOK(); + } else { + self->onError(Error::New(self->env, self->error)); + } + delete self; + return; + } + } + } + + // fallthrough for error handling + const napi_extended_error_info *error_info = 0; + napi_get_last_error_info(env, &error_info); + if (error_info->error_message){ + self->onError(Error::New(env, error_info->error_message)); + } else { + self->onError(Error::New(env)); + } + delete self; + } + + virtual void execute() {} + virtual Value getResult() { + return env.Null(); + } + + void onOK() { + HandleScope scope(env); + Value result = getResult(); + deferred.Resolve(result); + } + + void onError(const Error &e) { + deferred.Reject(e.Value()); + } +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/Signal.hh b/node_modules/@parcel/watcher/src/Signal.hh new file mode 100644 index 0000000..e577319 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Signal.hh @@ -0,0 +1,46 @@ +#ifndef SIGNAL_H +#define SIGNAL_H + +#include +#include + +class Signal { +public: + Signal() : mFlag(false), mWaiting(false) {} + void wait() { + std::unique_lock lock(mMutex); + while (!mFlag) { + mWaiting = true; + mCond.wait(lock); + } + } + + std::cv_status waitFor(std::chrono::milliseconds ms) { + std::unique_lock lock(mMutex); + return mCond.wait_for(lock, ms); + } + + void notify() { + std::unique_lock lock(mMutex); + mFlag = true; + mCond.notify_all(); + } + + void reset() { + std::unique_lock lock(mMutex); + mFlag = false; + mWaiting = false; + } + + bool isWaiting() { + return mWaiting; + } + +private: + bool mFlag; + bool mWaiting; + std::mutex mMutex; + std::condition_variable mCond; +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/Watcher.cc b/node_modules/@parcel/watcher/src/Watcher.cc new file mode 100644 index 0000000..e9d7676 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Watcher.cc @@ -0,0 +1,237 @@ +#include "Watcher.hh" +#include + +using namespace Napi; + +struct WatcherHash { + std::size_t operator() (WatcherRef const &k) const { + return std::hash()(k->mDir); + } +}; + +struct WatcherCompare { + size_t operator() (WatcherRef const &a, WatcherRef const &b) const { + return *a == *b; + } +}; + +static std::unordered_set sharedWatchers; + +WatcherRef Watcher::getShared(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs) { + WatcherRef watcher = std::make_shared(dir, ignorePaths, ignoreGlobs); + auto found = sharedWatchers.find(watcher); + if (found != sharedWatchers.end()) { + return *found; + } + + sharedWatchers.insert(watcher); + return watcher; +} + +void removeShared(Watcher *watcher) { + for (auto it = sharedWatchers.begin(); it != sharedWatchers.end(); it++) { + if (it->get() == watcher) { + sharedWatchers.erase(it); + break; + } + } + + // Free up memory. + if (sharedWatchers.size() == 0) { + sharedWatchers.rehash(0); + } +} + +Watcher::Watcher(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs) + : mDir(dir), + mIgnorePaths(ignorePaths), + mIgnoreGlobs(ignoreGlobs) { + mDebounce = Debounce::getShared(); + mDebounce->add(this, [this] () { + triggerCallbacks(); + }); + } + +Watcher::~Watcher() { + mDebounce->remove(this); +} + +void Watcher::wait() { + std::unique_lock lk(mMutex); + mCond.wait(lk); +} + +void Watcher::notify() { + std::unique_lock lk(mMutex); + mCond.notify_all(); + + if (mCallbacks.size() > 0 && mEvents.size() > 0) { + // We must release our lock before calling into the debouncer + // to avoid a deadlock: the debouncer thread itself will require + // our lock from its thread when calling into `triggerCallbacks` + // while holding its own debouncer lock. + lk.unlock(); + mDebounce->trigger(); + } +} + +struct CallbackData { + std::string error; + std::vector events; + CallbackData(std::string error, std::vector events) : error(error), events(events) {} +}; + +Value callbackEventsToJS(const Env &env, std::vector &events) { + EscapableHandleScope scope(env); + Array arr = Array::New(env, events.size()); + size_t currentEventIndex = 0; + for (auto eventIterator = events.begin(); eventIterator != events.end(); eventIterator++) { + arr.Set(currentEventIndex++, eventIterator->toJS(env)); + } + return scope.Escape(arr); +} + +void callJSFunction(Napi::Env env, Function jsCallback, CallbackData *data) { + HandleScope scope(env); + auto err = data->error.size() > 0 ? Error::New(env, data->error).Value() : env.Null(); + auto events = callbackEventsToJS(env, data->events); + jsCallback.Call({err, events}); + delete data; + + // Throw errors from the callback as fatal exceptions + // If we don't handle these node segfaults... + if (env.IsExceptionPending()) { + Napi::Error err = env.GetAndClearPendingException(); + napi_fatal_exception(env, err.Value()); + } +} + +void Watcher::notifyError(std::exception &err) { + std::unique_lock lk(mMutex); + for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { + CallbackData *data = new CallbackData(err.what(), {}); + it->tsfn.BlockingCall(data, callJSFunction); + } + + clearCallbacks(); +} + +// This function is called from the debounce thread. +void Watcher::triggerCallbacks() { + std::unique_lock lk(mMutex); + if (mCallbacks.size() > 0 && (mEvents.size() > 0 || mEvents.hasError())) { + auto error = mEvents.getError(); + auto events = mEvents.getEvents(); + mEvents.clear(); + + for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { + it->tsfn.BlockingCall(new CallbackData(error, events), callJSFunction); + } + } +} + +// This should be called from the JavaScript thread. +bool Watcher::watch(Function callback) { + std::unique_lock lk(mMutex); + + auto it = findCallback(callback); + if (it != mCallbacks.end()) { + return false; + } + + auto tsfn = ThreadSafeFunction::New( + callback.Env(), + callback, + "Watcher callback", + 0, // Unlimited queue + 1 // Initial thread count + ); + + mCallbacks.push_back(Callback { + tsfn, + Napi::Persistent(callback), + std::this_thread::get_id() + }); + + return true; +} + +// This should be called from the JavaScript thread. +std::vector::iterator Watcher::findCallback(Function callback) { + for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { + // Only consider callbacks created by the same thread, or V8 will panic. + if (it->threadId == std::this_thread::get_id() && it->ref.Value() == callback) { + return it; + } + } + + return mCallbacks.end(); +} + +// This should be called from the JavaScript thread. +bool Watcher::unwatch(Function callback) { + std::unique_lock lk(mMutex); + + bool removed = false; + auto it = findCallback(callback); + if (it != mCallbacks.end()) { + it->tsfn.Release(); + it->ref.Unref(); + mCallbacks.erase(it); + removed = true; + } + + if (removed && mCallbacks.size() == 0) { + unref(); + return true; + } + + return false; +} + +void Watcher::unref() { + if (mCallbacks.size() == 0) { + removeShared(this); + } +} + +void Watcher::destroy() { + std::unique_lock lk(mMutex); + clearCallbacks(); +} + +// Private because it doesn't lock. +void Watcher::clearCallbacks() { + for (auto it = mCallbacks.begin(); it != mCallbacks.end(); it++) { + it->tsfn.Release(); + it->ref.Unref(); + } + + mCallbacks.clear(); + unref(); +} + +bool Watcher::isIgnored(std::string path) { + for (auto it = mIgnorePaths.begin(); it != mIgnorePaths.end(); it++) { + auto dir = *it + DIR_SEP; + if (*it == path || path.compare(0, dir.size(), dir) == 0) { + return true; + } + } + + auto basePath = mDir + DIR_SEP; + + if (path.rfind(basePath, 0) != 0) { + return false; + } + + auto relativePath = path.substr(basePath.size()); + + for (auto it = mIgnoreGlobs.begin(); it != mIgnoreGlobs.end(); it++) { + if (it->isIgnored(relativePath)) { + return true; + } + } + + return false; +} diff --git a/node_modules/@parcel/watcher/src/Watcher.hh b/node_modules/@parcel/watcher/src/Watcher.hh new file mode 100644 index 0000000..f89e9f5 --- /dev/null +++ b/node_modules/@parcel/watcher/src/Watcher.hh @@ -0,0 +1,73 @@ +#ifndef WATCHER_H +#define WATCHER_H + +#include +#include +#include +#include +#include "Glob.hh" +#include "Event.hh" +#include "Debounce.hh" +#include "DirTree.hh" +#include "Signal.hh" + +using namespace Napi; + +struct Watcher; +using WatcherRef = std::shared_ptr; + +struct Callback { + Napi::ThreadSafeFunction tsfn; + Napi::FunctionReference ref; + std::thread::id threadId; +}; + +class WatcherState { +public: + virtual ~WatcherState() = default; +}; + +struct Watcher { + std::string mDir; + std::unordered_set mIgnorePaths; + std::unordered_set mIgnoreGlobs; + EventList mEvents; + std::shared_ptr state; + + Watcher(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs); + ~Watcher(); + + bool operator==(const Watcher &other) const { + return mDir == other.mDir && mIgnorePaths == other.mIgnorePaths && mIgnoreGlobs == other.mIgnoreGlobs; + } + + void wait(); + void notify(); + void notifyError(std::exception &err); + bool watch(Function callback); + bool unwatch(Function callback); + void unref(); + bool isIgnored(std::string path); + void destroy(); + + static WatcherRef getShared(std::string dir, std::unordered_set ignorePaths, std::unordered_set ignoreGlobs); + +private: + std::mutex mMutex; + std::condition_variable mCond; + std::vector mCallbacks; + std::shared_ptr mDebounce; + + std::vector::iterator findCallback(Function callback); + void clearCallbacks(); + void triggerCallbacks(); +}; + +class WatcherError : public std::runtime_error { +public: + WatcherRef mWatcher; + WatcherError(std::string msg, WatcherRef watcher) : std::runtime_error(msg), mWatcher(watcher) {} + WatcherError(const char *msg, WatcherRef watcher) : std::runtime_error(msg), mWatcher(watcher) {} +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/binding.cc b/node_modules/@parcel/watcher/src/binding.cc new file mode 100644 index 0000000..e1506bc --- /dev/null +++ b/node_modules/@parcel/watcher/src/binding.cc @@ -0,0 +1,268 @@ +#include +#include +#include "wasm/include.h" +#include +#include "Glob.hh" +#include "Event.hh" +#include "Backend.hh" +#include "Watcher.hh" +#include "PromiseRunner.hh" + +using namespace Napi; + +std::unordered_set getIgnorePaths(Env env, Value opts) { + std::unordered_set result; + + if (opts.IsObject()) { + Value v = opts.As().Get(String::New(env, "ignorePaths")); + if (v.IsArray()) { + Array items = v.As(); + for (size_t i = 0; i < items.Length(); i++) { + Value item = items.Get(Number::New(env, i)); + if (item.IsString()) { + result.insert(std::string(item.As().Utf8Value().c_str())); + } + } + } + } + + return result; +} + +std::unordered_set getIgnoreGlobs(Env env, Value opts) { + std::unordered_set result; + + if (opts.IsObject()) { + Value v = opts.As().Get(String::New(env, "ignoreGlobs")); + if (v.IsArray()) { + Array items = v.As(); + for (size_t i = 0; i < items.Length(); i++) { + Value item = items.Get(Number::New(env, i)); + if (item.IsString()) { + auto key = item.As().Utf8Value(); + try { + result.emplace(key); + } catch (const std::regex_error& e) { + Error::New(env, e.what()).ThrowAsJavaScriptException(); + } + } + } + } + } + + return result; +} + +std::shared_ptr getBackend(Env env, Value opts) { + Value b = opts.As().Get(String::New(env, "backend")); + std::string backendName; + if (b.IsString()) { + backendName = std::string(b.As().Utf8Value().c_str()); + } + + return Backend::getShared(backendName); +} + +class WriteSnapshotRunner : public PromiseRunner { +public: + WriteSnapshotRunner(Env env, Value dir, Value snap, Value opts) + : PromiseRunner(env), + snapshotPath(std::string(snap.As().Utf8Value().c_str())) { + watcher = Watcher::getShared( + std::string(dir.As().Utf8Value().c_str()), + getIgnorePaths(env, opts), + getIgnoreGlobs(env, opts) + ); + + backend = getBackend(env, opts); + } + + ~WriteSnapshotRunner() { + watcher->unref(); + backend->unref(); + } +private: + std::shared_ptr backend; + WatcherRef watcher; + std::string snapshotPath; + + void execute() override { + backend->writeSnapshot(watcher, &snapshotPath); + } +}; + +class GetEventsSinceRunner : public PromiseRunner { +public: + GetEventsSinceRunner(Env env, Value dir, Value snap, Value opts) + : PromiseRunner(env), + snapshotPath(std::string(snap.As().Utf8Value().c_str())) { + watcher = std::make_shared( + std::string(dir.As().Utf8Value().c_str()), + getIgnorePaths(env, opts), + getIgnoreGlobs(env, opts) + ); + + backend = getBackend(env, opts); + } + + ~GetEventsSinceRunner() { + watcher->unref(); + backend->unref(); + } +private: + std::shared_ptr backend; + WatcherRef watcher; + std::string snapshotPath; + + void execute() override { + backend->getEventsSince(watcher, &snapshotPath); + if (watcher->mEvents.hasError()) { + throw std::runtime_error(watcher->mEvents.getError()); + } + } + + Value getResult() override { + std::vector events = watcher->mEvents.getEvents(); + Array eventsArray = Array::New(env, events.size()); + size_t i = 0; + for (auto it = events.begin(); it != events.end(); it++) { + eventsArray.Set(i++, it->toJS(env)); + } + return eventsArray; + } +}; + +template +Value queueSnapshotWork(const CallbackInfo& info) { + Env env = info.Env(); + if (info.Length() < 1 || !info[0].IsString()) { + TypeError::New(env, "Expected a string").ThrowAsJavaScriptException(); + return env.Null(); + } + + if (info.Length() < 2 || !info[1].IsString()) { + TypeError::New(env, "Expected a string").ThrowAsJavaScriptException(); + return env.Null(); + } + + if (info.Length() >= 3 && !info[2].IsObject()) { + TypeError::New(env, "Expected an object").ThrowAsJavaScriptException(); + return env.Null(); + } + + Runner *runner = new Runner(info.Env(), info[0], info[1], info[2]); + return runner->queue(); +} + +Value writeSnapshot(const CallbackInfo& info) { + return queueSnapshotWork(info); +} + +Value getEventsSince(const CallbackInfo& info) { + return queueSnapshotWork(info); +} + +class SubscribeRunner : public PromiseRunner { +public: + SubscribeRunner(Env env, Value dir, Value fn, Value opts) : PromiseRunner(env) { + watcher = Watcher::getShared( + std::string(dir.As().Utf8Value().c_str()), + getIgnorePaths(env, opts), + getIgnoreGlobs(env, opts) + ); + + backend = getBackend(env, opts); + watcher->watch(fn.As()); + } + +private: + WatcherRef watcher; + std::shared_ptr backend; + FunctionReference callback; + + void execute() override { + try { + backend->watch(watcher); + } catch (std::exception &err) { + watcher->destroy(); + throw; + } + } +}; + +class UnsubscribeRunner : public PromiseRunner { +public: + UnsubscribeRunner(Env env, Value dir, Value fn, Value opts) : PromiseRunner(env) { + watcher = Watcher::getShared( + std::string(dir.As().Utf8Value().c_str()), + getIgnorePaths(env, opts), + getIgnoreGlobs(env, opts) + ); + + backend = getBackend(env, opts); + shouldUnwatch = watcher->unwatch(fn.As()); + } + +private: + WatcherRef watcher; + std::shared_ptr backend; + bool shouldUnwatch; + + void execute() override { + if (shouldUnwatch) { + backend->unwatch(watcher); + } + } +}; + +template +Value queueSubscriptionWork(const CallbackInfo& info) { + Env env = info.Env(); + if (info.Length() < 1 || !info[0].IsString()) { + TypeError::New(env, "Expected a string").ThrowAsJavaScriptException(); + return env.Null(); + } + + if (info.Length() < 2 || !info[1].IsFunction()) { + TypeError::New(env, "Expected a function").ThrowAsJavaScriptException(); + return env.Null(); + } + + if (info.Length() >= 3 && !info[2].IsObject()) { + TypeError::New(env, "Expected an object").ThrowAsJavaScriptException(); + return env.Null(); + } + + Runner *runner = new Runner(info.Env(), info[0], info[1], info[2]); + return runner->queue(); +} + +Value subscribe(const CallbackInfo& info) { + return queueSubscriptionWork(info); +} + +Value unsubscribe(const CallbackInfo& info) { + return queueSubscriptionWork(info); +} + +Object Init(Env env, Object exports) { + exports.Set( + String::New(env, "writeSnapshot"), + Function::New(env, writeSnapshot) + ); + exports.Set( + String::New(env, "getEventsSince"), + Function::New(env, getEventsSince) + ); + exports.Set( + String::New(env, "subscribe"), + Function::New(env, subscribe) + ); + exports.Set( + String::New(env, "unsubscribe"), + Function::New(env, unsubscribe) + ); + return exports; +} + +NODE_API_MODULE(watcher, Init) diff --git a/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc b/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc new file mode 100644 index 0000000..2991c32 --- /dev/null +++ b/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc @@ -0,0 +1,306 @@ +#include +#include +#include +#include +#include +#include +#include +#include "KqueueBackend.hh" + +#if __APPLE__ +#define st_mtim st_mtimespec +#endif + +#if !defined(O_EVTONLY) +#define O_EVTONLY O_RDONLY +#endif + +#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) + +void KqueueBackend::start() { + if ((mKqueue = kqueue()) < 0) { + throw std::runtime_error(std::string("Unable to open kqueue: ") + strerror(errno)); + } + + // Create a pipe that we will write to when we want to end the thread. + int err = pipe(mPipe); + if (err == -1) { + throw std::runtime_error(std::string("Unable to open pipe: ") + strerror(errno)); + } + + // Subscribe kqueue to this pipe. + struct kevent ev; + EV_SET( + &ev, + mPipe[0], + EVFILT_READ, + EV_ADD | EV_CLEAR, + 0, + 0, + 0 + ); + + if (kevent(mKqueue, &ev, 1, NULL, 0, 0)) { + close(mPipe[0]); + close(mPipe[1]); + throw std::runtime_error(std::string("Unable to watch pipe: ") + strerror(errno)); + } + + notifyStarted(); + + struct kevent events[128]; + + while (true) { + int event_count = kevent(mKqueue, NULL, 0, events, 128, 0); + if (event_count < 0 || events[0].flags == EV_ERROR) { + throw std::runtime_error(std::string("kevent error: ") + strerror(errno)); + } + + // Track all of the watchers that are touched so we can notify them at the end of the events. + std::unordered_set watchers; + + for (int i = 0; i < event_count; i++) { + int flags = events[i].fflags; + int fd = events[i].ident; + if (fd == mPipe[0]) { + // pipe was written to. break out of the loop. + goto done; + } + + auto it = mFdToEntry.find(fd); + if (it == mFdToEntry.end()) { + // If fd wasn't in our map, we may have already stopped watching it. Ignore the event. + continue; + } + + DirEntry *entry = it->second; + + if (flags & NOTE_WRITE && entry && entry->isDir) { + // If a write occurred on a directory, we have to diff the contents of that + // directory to determine what file was added/deleted. + compareDir(fd, entry->path, watchers); + } else { + std::vector subs = findSubscriptions(entry->path); + for (auto it = subs.begin(); it != subs.end(); it++) { + KqueueSubscription *sub = *it; + watchers.insert(sub->watcher); + if (flags & (NOTE_DELETE | NOTE_RENAME | NOTE_REVOKE)) { + sub->watcher->mEvents.remove(sub->path); + sub->tree->remove(sub->path); + mFdToEntry.erase((int)(size_t)entry->state); + mSubscriptions.erase(sub->path); + } else if (flags & (NOTE_WRITE | NOTE_ATTRIB | NOTE_EXTEND)) { + struct stat st; + lstat(sub->path.c_str(), &st); + if (entry->mtime != CONVERT_TIME(st.st_mtim)) { + entry->mtime = CONVERT_TIME(st.st_mtim); + sub->watcher->mEvents.update(sub->path); + } + } + } + } + } + + for (auto it = watchers.begin(); it != watchers.end(); it++) { + (*it)->notify(); + } + } + +done: + close(mPipe[0]); + close(mPipe[1]); + mEndedSignal.notify(); +} + +KqueueBackend::~KqueueBackend() { + write(mPipe[1], "X", 1); + mEndedSignal.wait(); +} + +void KqueueBackend::subscribe(WatcherRef watcher) { + // Build a full directory tree recursively, and watch each directory. + std::shared_ptr tree = getTree(watcher); + + for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) { + bool success = watchDir(watcher, it->second.path, tree); + if (!success) { + throw WatcherError(std::string("error watching " + watcher->mDir + ": " + strerror(errno)), watcher); + } + } +} + +bool KqueueBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree) { + if (watcher->isIgnored(path)) { + return false; + } + + DirEntry *entry = tree->find(path); + if (!entry) { + return false; + } + + KqueueSubscription sub = { + .watcher = watcher, + .path = path, + .tree = tree + }; + + if (!entry->state) { + int fd = open(path.c_str(), O_EVTONLY); + if (fd <= 0) { + return false; + } + + struct kevent event; + EV_SET( + &event, + fd, + EVFILT_VNODE, + EV_ADD | EV_CLEAR | EV_ENABLE, + NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_RENAME | NOTE_REVOKE, + 0, + 0 + ); + + if (kevent(mKqueue, &event, 1, NULL, 0, 0)) { + close(fd); + return false; + } + + entry->state = (void *)(size_t)fd; + mFdToEntry.emplace(fd, entry); + } + + sub.fd = (int)(size_t)entry->state; + mSubscriptions.emplace(path, sub); + return true; +} + +std::vector KqueueBackend::findSubscriptions(std::string &path) { + // Find the subscriptions affected by this path. + // Copy pointers to them into a vector so that modifying mSubscriptions doesn't invalidate the iterator. + auto range = mSubscriptions.equal_range(path); + std::vector subs; + for (auto it = range.first; it != range.second; it++) { + subs.push_back(&it->second); + } + + return subs; +} + +bool KqueueBackend::compareDir(int fd, std::string &path, std::unordered_set &watchers) { + // macOS doesn't support fdclosedir, so we have to duplicate the file descriptor + // to ensure the closedir doesn't also stop watching. + #if __APPLE__ + fd = dup(fd); + #endif + + DIR *dir = fdopendir(fd); + if (dir == NULL) { + return false; + } + + // fdopendir doesn't rewind to the beginning. + rewinddir(dir); + + std::vector subs = findSubscriptions(path); + std::string dirStart = path + DIR_SEP; + + std::unordered_set> trees; + for (auto it = subs.begin(); it != subs.end(); it++) { + trees.emplace((*it)->tree); + } + + std::unordered_set entries; + struct dirent *entry; + while ((entry = readdir(dir))) { + if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) { + continue; + } + + std::string fullpath = dirStart + entry->d_name; + entries.emplace(fullpath); + + for (auto it = trees.begin(); it != trees.end(); it++) { + std::shared_ptr tree = *it; + if (!tree->find(fullpath)) { + struct stat st; + fstatat(fd, entry->d_name, &st, AT_SYMLINK_NOFOLLOW); + tree->add(fullpath, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode)); + + // Notify all watchers with the same tree. + for (auto i = subs.begin(); i != subs.end(); i++) { + KqueueSubscription *sub = *i; + if (sub->tree == tree) { + if (sub->watcher->isIgnored(fullpath)) { + continue; + } + + sub->watcher->mEvents.create(fullpath); + watchers.emplace(sub->watcher); + + bool success = watchDir(sub->watcher, fullpath, sub->tree); + if (!success) { + sub->tree->remove(fullpath); + return false; + } + } + } + } + } + } + + for (auto it = trees.begin(); it != trees.end(); it++) { + std::shared_ptr tree = *it; + for (auto entry = tree->entries.begin(); entry != tree->entries.end();) { + + if ( + entry->first.rfind(dirStart, 0) == 0 && + entry->first.find(DIR_SEP, dirStart.length()) == std::string::npos && + entries.count(entry->first) == 0 + ) { + // Notify all watchers with the same tree. + for (auto i = subs.begin(); i != subs.end(); i++) { + if ((*i)->tree == tree) { + KqueueSubscription *sub = *i; + if (!sub->watcher->isIgnored(entry->first)) { + sub->watcher->mEvents.remove(entry->first); + watchers.emplace(sub->watcher); + } + } + } + + mFdToEntry.erase((int)(size_t)entry->second.state); + mSubscriptions.erase(entry->first); + entry = tree->entries.erase(entry); + } else { + entry++; + } + } + } + + #if __APPLE__ + closedir(dir); + #else + fdclosedir(dir); + #endif + + return true; +} + +void KqueueBackend::unsubscribe(WatcherRef watcher) { + // Find any subscriptions pointing to this watcher, and remove them. + for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { + if (it->second.watcher.get() == watcher.get()) { + if (mSubscriptions.count(it->first) == 1) { + // Closing the file descriptor automatically unwatches it in the kqueue. + close(it->second.fd); + mFdToEntry.erase(it->second.fd); + } + + it = mSubscriptions.erase(it); + } else { + it++; + } + } +} diff --git a/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh b/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh new file mode 100644 index 0000000..3c6a9cd --- /dev/null +++ b/node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh @@ -0,0 +1,35 @@ +#ifndef KQUEUE_H +#define KQUEUE_H + +#include +#include +#include "../shared/BruteForceBackend.hh" +#include "../DirTree.hh" +#include "../Signal.hh" + +struct KqueueSubscription { + WatcherRef watcher; + std::string path; + std::shared_ptr tree; + int fd; +}; + +class KqueueBackend : public BruteForceBackend { +public: + void start() override; + ~KqueueBackend(); + void subscribe(WatcherRef watcher) override; + void unsubscribe(WatcherRef watcher) override; +private: + int mKqueue; + int mPipe[2]; + std::unordered_multimap mSubscriptions; + std::unordered_map mFdToEntry; + Signal mEndedSignal; + + bool watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree); + bool compareDir(int fd, std::string &dir, std::unordered_set &watchers); + std::vector findSubscriptions(std::string &path); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/linux/InotifyBackend.cc b/node_modules/@parcel/watcher/src/linux/InotifyBackend.cc new file mode 100644 index 0000000..ec92691 --- /dev/null +++ b/node_modules/@parcel/watcher/src/linux/InotifyBackend.cc @@ -0,0 +1,232 @@ +#include +#include +#include +#include +#include +#include "InotifyBackend.hh" + +#define INOTIFY_MASK \ + IN_ATTRIB | IN_CREATE | IN_DELETE | \ + IN_DELETE_SELF | IN_MODIFY | IN_MOVE_SELF | IN_MOVED_FROM | \ + IN_MOVED_TO | IN_DONT_FOLLOW | IN_ONLYDIR | IN_EXCL_UNLINK +#define BUFFER_SIZE 8192 +#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) + +void InotifyBackend::start() { + // Create a pipe that we will write to when we want to end the thread. + int err = pipe2(mPipe, O_CLOEXEC | O_NONBLOCK); + if (err == -1) { + throw std::runtime_error(std::string("Unable to open pipe: ") + strerror(errno)); + } + + // Init inotify file descriptor. + mInotify = inotify_init1(IN_NONBLOCK | IN_CLOEXEC); + if (mInotify == -1) { + throw std::runtime_error(std::string("Unable to initialize inotify: ") + strerror(errno)); + } + + pollfd pollfds[2]; + pollfds[0].fd = mPipe[0]; + pollfds[0].events = POLLIN; + pollfds[0].revents = 0; + pollfds[1].fd = mInotify; + pollfds[1].events = POLLIN; + pollfds[1].revents = 0; + + notifyStarted(); + + // Loop until we get an event from the pipe. + while (true) { + int result = poll(pollfds, 2, 500); + if (result < 0) { + throw std::runtime_error(std::string("Unable to poll: ") + strerror(errno)); + } + + if (pollfds[0].revents) { + break; + } + + if (pollfds[1].revents) { + handleEvents(); + } + } + + close(mPipe[0]); + close(mPipe[1]); + close(mInotify); + + mEndedSignal.notify(); +} + +InotifyBackend::~InotifyBackend() { + write(mPipe[1], "X", 1); + mEndedSignal.wait(); +} + +// This function is called by Backend::watch which takes a lock on mMutex +void InotifyBackend::subscribe(WatcherRef watcher) { + // Build a full directory tree recursively, and watch each directory. + std::shared_ptr tree = getTree(watcher); + + for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) { + if (it->second.isDir) { + bool success = watchDir(watcher, it->second.path, tree); + if (!success) { + throw WatcherError(std::string("inotify_add_watch on '") + it->second.path + std::string("' failed: ") + strerror(errno), watcher); + } + } + } +} + +bool InotifyBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree) { + int wd = inotify_add_watch(mInotify, path.c_str(), INOTIFY_MASK); + if (wd == -1) { + return false; + } + + std::shared_ptr sub = std::make_shared(); + sub->tree = tree; + sub->path = path; + sub->watcher = watcher; + mSubscriptions.emplace(wd, sub); + + return true; +} + +void InotifyBackend::handleEvents() { + char buf[BUFFER_SIZE] __attribute__ ((aligned(__alignof__(struct inotify_event))));; + struct inotify_event *event; + + // Track all of the watchers that are touched so we can notify them at the end of the events. + std::unordered_set watchers; + + while (true) { + int n = read(mInotify, &buf, BUFFER_SIZE); + if (n < 0) { + if (errno == EAGAIN || errno == EWOULDBLOCK) { + break; + } + + throw std::runtime_error(std::string("Error reading from inotify: ") + strerror(errno)); + } + + if (n == 0) { + break; + } + + for (char *ptr = buf; ptr < buf + n; ptr += sizeof(*event) + event->len) { + event = (struct inotify_event *)ptr; + + if ((event->mask & IN_Q_OVERFLOW) == IN_Q_OVERFLOW) { + // overflow + continue; + } + + handleEvent(event, watchers); + } + } + + for (auto it = watchers.begin(); it != watchers.end(); it++) { + (*it)->notify(); + } +} + +void InotifyBackend::handleEvent(struct inotify_event *event, std::unordered_set &watchers) { + std::unique_lock lock(mMutex); + + // Find the subscriptions for this watch descriptor + auto range = mSubscriptions.equal_range(event->wd); + std::unordered_set> set; + for (auto it = range.first; it != range.second; it++) { + set.insert(it->second); + } + + for (auto it = set.begin(); it != set.end(); it++) { + if (handleSubscription(event, *it)) { + watchers.insert((*it)->watcher); + } + } +} + +bool InotifyBackend::handleSubscription(struct inotify_event *event, std::shared_ptr sub) { + // Build full path and check if its in our ignore list. + std::shared_ptr watcher = sub->watcher; + std::string path = std::string(sub->path); + bool isDir = event->mask & IN_ISDIR; + + if (event->len > 0) { + path += "/" + std::string(event->name); + } + + if (watcher->isIgnored(path)) { + return false; + } + + // If this is a create, check if it's a directory and start watching if it is. + // In any case, keep the directory tree up to date. + if (event->mask & (IN_CREATE | IN_MOVED_TO)) { + watcher->mEvents.create(path); + + struct stat st; + // Use lstat to avoid resolving symbolic links that we cannot watch anyway + // https://github.com/parcel-bundler/watcher/issues/76 + lstat(path.c_str(), &st); + DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode)); + + if (entry->isDir) { + bool success = watchDir(watcher, path, sub->tree); + if (!success) { + sub->tree->remove(path); + return false; + } + } + } else if (event->mask & (IN_MODIFY | IN_ATTRIB)) { + watcher->mEvents.update(path); + + struct stat st; + stat(path.c_str(), &st); + sub->tree->update(path, CONVERT_TIME(st.st_mtim)); + } else if (event->mask & (IN_DELETE | IN_DELETE_SELF | IN_MOVED_FROM | IN_MOVE_SELF)) { + bool isSelfEvent = (event->mask & (IN_DELETE_SELF | IN_MOVE_SELF)); + // Ignore delete/move self events unless this is the recursive watch root + if (isSelfEvent && path != watcher->mDir) { + return false; + } + + // If the entry being deleted/moved is a directory, remove it from the list of subscriptions + // XXX: self events don't have the IN_ISDIR mask + if (isSelfEvent || isDir) { + for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { + if (it->second->path == path) { + it = mSubscriptions.erase(it); + } else { + ++it; + } + } + } + + watcher->mEvents.remove(path); + sub->tree->remove(path); + } + + return true; +} + +// This function is called by Backend::unwatch which takes a lock on mMutex +void InotifyBackend::unsubscribe(WatcherRef watcher) { + // Find any subscriptions pointing to this watcher, and remove them. + for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { + if (it->second->watcher.get() == watcher.get()) { + if (mSubscriptions.count(it->first) == 1) { + int err = inotify_rm_watch(mInotify, it->first); + if (err == -1) { + throw WatcherError(std::string("Unable to remove watcher: ") + strerror(errno), watcher); + } + } + + it = mSubscriptions.erase(it); + } else { + it++; + } + } +} diff --git a/node_modules/@parcel/watcher/src/linux/InotifyBackend.hh b/node_modules/@parcel/watcher/src/linux/InotifyBackend.hh new file mode 100644 index 0000000..f34cd1f --- /dev/null +++ b/node_modules/@parcel/watcher/src/linux/InotifyBackend.hh @@ -0,0 +1,34 @@ +#ifndef INOTIFY_H +#define INOTIFY_H + +#include +#include +#include "../shared/BruteForceBackend.hh" +#include "../DirTree.hh" +#include "../Signal.hh" + +struct InotifySubscription { + std::shared_ptr tree; + std::string path; + WatcherRef watcher; +}; + +class InotifyBackend : public BruteForceBackend { +public: + void start() override; + ~InotifyBackend(); + void subscribe(WatcherRef watcher) override; + void unsubscribe(WatcherRef watcher) override; +private: + int mPipe[2]; + int mInotify; + std::unordered_multimap> mSubscriptions; + Signal mEndedSignal; + + bool watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree); + void handleEvents(); + void handleEvent(struct inotify_event *event, std::unordered_set &watchers); + bool handleSubscription(struct inotify_event *event, std::shared_ptr sub); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc b/node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc new file mode 100644 index 0000000..cfda962 --- /dev/null +++ b/node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc @@ -0,0 +1,338 @@ +#include +#include +#include +#include +#include +#include "../Event.hh" +#include "../Backend.hh" +#include "./FSEventsBackend.hh" +#include "../Watcher.hh" + +#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) +#define IGNORED_FLAGS (kFSEventStreamEventFlagItemIsHardlink | kFSEventStreamEventFlagItemIsLastHardlink | kFSEventStreamEventFlagItemIsSymlink | kFSEventStreamEventFlagItemIsDir | kFSEventStreamEventFlagItemIsFile) + +void stopStream(FSEventStreamRef stream, CFRunLoopRef runLoop) { + FSEventStreamStop(stream); + FSEventStreamUnscheduleFromRunLoop(stream, runLoop, kCFRunLoopDefaultMode); + FSEventStreamInvalidate(stream); + FSEventStreamRelease(stream); +} + +// macOS has a case insensitive file system by default. In order to detect +// file renames that only affect case, we need to get the canonical path +// and compare it with the input path to determine if a file was created or deleted. +bool pathExists(char *path) { + int fd = open(path, O_RDONLY | O_SYMLINK); + if (fd == -1) { + return false; + } + + char buf[PATH_MAX]; + if (fcntl(fd, F_GETPATH, buf) == -1) { + close(fd); + return false; + } + + bool res = strncmp(path, buf, PATH_MAX) == 0; + close(fd); + return res; +} + +class State: public WatcherState { +public: + FSEventStreamRef stream; + std::shared_ptr tree; + uint64_t since; +}; + +void FSEventsCallback( + ConstFSEventStreamRef streamRef, + void *clientCallBackInfo, + size_t numEvents, + void *eventPaths, + const FSEventStreamEventFlags eventFlags[], + const FSEventStreamEventId eventIds[] +) { + char **paths = (char **)eventPaths; + std::shared_ptr& watcher = *static_cast *>(clientCallBackInfo); + + EventList& list = watcher->mEvents; + if (watcher->state == nullptr) { + return; + } + + auto stateGuard = watcher->state; + auto* state = static_cast(stateGuard.get()); + uint64_t since = state->since; + bool deletedRoot = false; + + for (size_t i = 0; i < numEvents; ++i) { + bool isCreated = (eventFlags[i] & kFSEventStreamEventFlagItemCreated) == kFSEventStreamEventFlagItemCreated; + bool isRemoved = (eventFlags[i] & kFSEventStreamEventFlagItemRemoved) == kFSEventStreamEventFlagItemRemoved; + bool isModified = (eventFlags[i] & kFSEventStreamEventFlagItemModified) == kFSEventStreamEventFlagItemModified || + (eventFlags[i] & kFSEventStreamEventFlagItemInodeMetaMod) == kFSEventStreamEventFlagItemInodeMetaMod || + (eventFlags[i] & kFSEventStreamEventFlagItemFinderInfoMod) == kFSEventStreamEventFlagItemFinderInfoMod || + (eventFlags[i] & kFSEventStreamEventFlagItemChangeOwner) == kFSEventStreamEventFlagItemChangeOwner || + (eventFlags[i] & kFSEventStreamEventFlagItemXattrMod) == kFSEventStreamEventFlagItemXattrMod; + bool isRenamed = (eventFlags[i] & kFSEventStreamEventFlagItemRenamed) == kFSEventStreamEventFlagItemRenamed; + bool isDone = (eventFlags[i] & kFSEventStreamEventFlagHistoryDone) == kFSEventStreamEventFlagHistoryDone; + bool isDir = (eventFlags[i] & kFSEventStreamEventFlagItemIsDir) == kFSEventStreamEventFlagItemIsDir; + + + if (eventFlags[i] & kFSEventStreamEventFlagMustScanSubDirs) { + if (eventFlags[i] & kFSEventStreamEventFlagUserDropped) { + list.error("Events were dropped by the FSEvents client. File system must be re-scanned."); + } else if (eventFlags[i] & kFSEventStreamEventFlagKernelDropped) { + list.error("Events were dropped by the kernel. File system must be re-scanned."); + } else { + list.error("Too many events. File system must be re-scanned."); + } + } + + if (isDone) { + watcher->notify(); + break; + } + + auto ignoredFlags = IGNORED_FLAGS; + if (__builtin_available(macOS 10.13, *)) { + ignoredFlags |= kFSEventStreamEventFlagItemCloned; + } + + // If we don't care about any of the flags that are set, ignore this event. + if ((eventFlags[i] & ~ignoredFlags) == 0) { + continue; + } + + // FSEvents exclusion paths only apply to files, not directories. + if (watcher->isIgnored(paths[i])) { + continue; + } + + // Handle unambiguous events first + if (isCreated && !(isRemoved || isModified || isRenamed)) { + state->tree->add(paths[i], 0, isDir); + list.create(paths[i]); + } else if (isRemoved && !(isCreated || isModified || isRenamed)) { + state->tree->remove(paths[i]); + list.remove(paths[i]); + if (paths[i] == watcher->mDir) { + deletedRoot = true; + } + } else if (isModified && !(isCreated || isRemoved || isRenamed)) { + struct stat file; + if (stat(paths[i], &file)) { + continue; + } + + // Ignore if mtime is the same as the last event. + // This prevents duplicate events from being emitted. + // If tv_nsec is zero, the file system probably only has second-level + // granularity so allow the even through in that case. + uint64_t mtime = CONVERT_TIME(file.st_mtimespec); + DirEntry *entry = state->tree->find(paths[i]); + if (entry && mtime == entry->mtime && file.st_mtimespec.tv_nsec != 0) { + continue; + } + + if (entry) { + // Update mtime. + entry->mtime = mtime; + } else { + // Add to tree if this path has not been discovered yet. + state->tree->add(paths[i], mtime, S_ISDIR(file.st_mode)); + } + + list.update(paths[i]); + } else { + // If multiple flags were set, then we need to call `stat` to determine if the file really exists. + // This helps disambiguate creates, updates, and deletes. + struct stat file; + if (stat(paths[i], &file) || !pathExists(paths[i])) { + // File does not exist, so we have to assume it was removed. This is not exact since the + // flags set by fsevents get coalesced together (e.g. created & deleted), so there is no way to + // know whether the create and delete both happened since our snapshot (in which case + // we'd rather ignore this event completely). This will result in some extra delete events + // being emitted for files we don't know about, but that is the best we can do. + state->tree->remove(paths[i]); + list.remove(paths[i]); + if (paths[i] == watcher->mDir) { + deletedRoot = true; + } + continue; + } + + // If the file was modified, and existed before, then this is an update, otherwise a create. + uint64_t ctime = CONVERT_TIME(file.st_birthtimespec); + uint64_t mtime = CONVERT_TIME(file.st_mtimespec); + DirEntry *entry = !since ? state->tree->find(paths[i]) : NULL; + if (entry && entry->mtime == mtime && file.st_mtimespec.tv_nsec != 0) { + continue; + } + + // Some mounted file systems report a creation time of 0/unix epoch which we special case. + if (isModified && (entry || (ctime <= since && ctime != 0))) { + state->tree->update(paths[i], mtime); + list.update(paths[i]); + } else { + state->tree->add(paths[i], mtime, S_ISDIR(file.st_mode)); + list.create(paths[i]); + } + } + } + + if (!since) { + watcher->notify(); + } + + // Stop watching if the root directory was deleted. + if (deletedRoot) { + stopStream((FSEventStreamRef)streamRef, CFRunLoopGetCurrent()); + watcher->state = nullptr; + } +} + +void checkWatcher(WatcherRef watcher) { + struct stat file; + if (stat(watcher->mDir.c_str(), &file)) { + throw WatcherError(strerror(errno), watcher); + } + + if (!S_ISDIR(file.st_mode)) { + throw WatcherError(strerror(ENOTDIR), watcher); + } +} + +void FSEventsBackend::startStream(WatcherRef watcher, FSEventStreamEventId id) { + checkWatcher(watcher); + + CFAbsoluteTime latency = 0.001; + CFStringRef fileWatchPath = CFStringCreateWithCString( + NULL, + watcher->mDir.c_str(), + kCFStringEncodingUTF8 + ); + + CFArrayRef pathsToWatch = CFArrayCreate( + NULL, + (const void **)&fileWatchPath, + 1, + NULL + ); + + // Make a watcher reference we can pass into the callback. This ensures bumped ref-count. + std::shared_ptr* callbackWatcher = new std::shared_ptr (watcher); + FSEventStreamContext callbackInfo {0, static_cast (callbackWatcher), nullptr, nullptr, nullptr}; + FSEventStreamRef stream = FSEventStreamCreate( + NULL, + &FSEventsCallback, + &callbackInfo, + pathsToWatch, + id, + latency, + kFSEventStreamCreateFlagFileEvents + ); + + CFMutableArrayRef exclusions = CFArrayCreateMutable(NULL, watcher->mIgnorePaths.size(), NULL); + for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) { + CFStringRef path = CFStringCreateWithCString( + NULL, + it->c_str(), + kCFStringEncodingUTF8 + ); + + CFArrayAppendValue(exclusions, (const void *)path); + } + + FSEventStreamSetExclusionPaths(stream, exclusions); + + FSEventStreamScheduleWithRunLoop(stream, mRunLoop, kCFRunLoopDefaultMode); + bool started = FSEventStreamStart(stream); + + CFRelease(pathsToWatch); + CFRelease(fileWatchPath); + + if (!started) { + FSEventStreamRelease(stream); + throw WatcherError("Error starting FSEvents stream", watcher); + } + + auto stateGuard = watcher->state; + State* s = static_cast(stateGuard.get()); + s->tree = std::make_shared(watcher->mDir); + s->stream = stream; +} + +void FSEventsBackend::start() { + mRunLoop = CFRunLoopGetCurrent(); + CFRetain(mRunLoop); + + // Unlock once run loop has started. + CFRunLoopPerformBlock(mRunLoop, kCFRunLoopDefaultMode, ^ { + notifyStarted(); + }); + + CFRunLoopWakeUp(mRunLoop); + CFRunLoopRun(); +} + +FSEventsBackend::~FSEventsBackend() { + std::unique_lock lock(mMutex); + CFRunLoopStop(mRunLoop); + CFRelease(mRunLoop); +} + +void FSEventsBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) { + std::unique_lock lock(mMutex); + checkWatcher(watcher); + + FSEventStreamEventId id = FSEventsGetCurrentEventId(); + std::ofstream ofs(*snapshotPath); + ofs << id; + ofs << "\n"; + + struct timespec now; + clock_gettime(CLOCK_REALTIME, &now); + ofs << CONVERT_TIME(now); +} + +void FSEventsBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) { + std::unique_lock lock(mMutex); + std::ifstream ifs(*snapshotPath); + if (ifs.fail()) { + return; + } + + FSEventStreamEventId id; + uint64_t since; + ifs >> id; + ifs >> since; + + auto s = std::make_shared(); + s->since = since; + watcher->state = s; + + startStream(watcher, id); + watcher->wait(); + stopStream(s->stream, mRunLoop); + + watcher->state = nullptr; +} + +// This function is called by Backend::watch which takes a lock on mMutex +void FSEventsBackend::subscribe(WatcherRef watcher) { + auto s = std::make_shared(); + s->since = 0; + watcher->state = s; + startStream(watcher, kFSEventStreamEventIdSinceNow); +} + +// This function is called by Backend::unwatch which takes a lock on mMutex +void FSEventsBackend::unsubscribe(WatcherRef watcher) { + auto stateGuard = watcher->state; + State* s = static_cast(stateGuard.get()); + if (s != nullptr) { + stopStream(s->stream, mRunLoop); + watcher->state = nullptr; + } +} diff --git a/node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh b/node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh new file mode 100644 index 0000000..57ded66 --- /dev/null +++ b/node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh @@ -0,0 +1,20 @@ +#ifndef FS_EVENTS_H +#define FS_EVENTS_H + +#include +#include "../Backend.hh" + +class FSEventsBackend : public Backend { +public: + void start() override; + ~FSEventsBackend(); + void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) override; + void getEventsSince(WatcherRef watcher, std::string *snapshotPath) override; + void subscribe(WatcherRef watcher) override; + void unsubscribe(WatcherRef watcher) override; +private: + void startStream(WatcherRef watcher, FSEventStreamEventId id); + CFRunLoopRef mRunLoop; +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc b/node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc new file mode 100644 index 0000000..0e9b84f --- /dev/null +++ b/node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc @@ -0,0 +1,41 @@ +#include +#include "../DirTree.hh" +#include "../Event.hh" +#include "./BruteForceBackend.hh" + +std::shared_ptr BruteForceBackend::getTree(WatcherRef watcher, bool shouldRead) { + auto tree = DirTree::getCached(watcher->mDir); + + // If the tree is not complete, read it if needed. + if (!tree->isComplete && shouldRead) { + readTree(watcher, tree); + tree->isComplete = true; + } + + return tree; +} + +void BruteForceBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) { + std::unique_lock lock(mMutex); + auto tree = getTree(watcher); + FILE *f = fopen(snapshotPath->c_str(), "w"); + if (!f) { + throw std::runtime_error(std::string("Unable to open snapshot file: ") + strerror(errno)); + } + + tree->write(f); + fclose(f); +} + +void BruteForceBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) { + std::unique_lock lock(mMutex); + FILE *f = fopen(snapshotPath->c_str(), "r"); + if (!f) { + throw std::runtime_error(std::string("Unable to open snapshot file: ") + strerror(errno)); + } + + DirTree snapshot{watcher->mDir, f}; + auto now = getTree(watcher); + now->getChanges(&snapshot, watcher->mEvents); + fclose(f); +} diff --git a/node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh b/node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh new file mode 100644 index 0000000..de7a73d --- /dev/null +++ b/node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh @@ -0,0 +1,25 @@ +#ifndef BRUTE_FORCE_H +#define BRUTE_FORCE_H + +#include "../Backend.hh" +#include "../DirTree.hh" +#include "../Watcher.hh" + +class BruteForceBackend : public Backend { +public: + void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) override; + void getEventsSince(WatcherRef watcher, std::string *snapshotPath) override; + void subscribe(WatcherRef watcher) override { + throw "Brute force backend doesn't support subscriptions."; + } + + void unsubscribe(WatcherRef watcher) override { + throw "Brute force backend doesn't support subscriptions."; + } + + std::shared_ptr getTree(WatcherRef watcher, bool shouldRead = true); +private: + void readTree(WatcherRef watcher, std::shared_ptr tree); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/unix/fts.cc b/node_modules/@parcel/watcher/src/unix/fts.cc new file mode 100644 index 0000000..d50c3e4 --- /dev/null +++ b/node_modules/@parcel/watcher/src/unix/fts.cc @@ -0,0 +1,50 @@ +#include + +// weird error on linux +#ifdef __THROW +#undef __THROW +#endif +#define __THROW + +#include +#include +#include "../DirTree.hh" +#include "../shared/BruteForceBackend.hh" + +#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) +#if __APPLE__ +#define st_mtim st_mtimespec +#endif + +void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr tree) { + char *paths[2] {(char *)watcher->mDir.c_str(), NULL}; + FTS *fts = fts_open(paths, FTS_NOCHDIR | FTS_PHYSICAL, NULL); + if (!fts) { + throw WatcherError(strerror(errno), watcher); + } + + FTSENT *node; + bool isRoot = true; + + while ((node = fts_read(fts)) != NULL) { + if (node->fts_errno) { + fts_close(fts); + throw WatcherError(strerror(node->fts_errno), watcher); + } + + if (isRoot && !(node->fts_info & FTS_D)) { + fts_close(fts); + throw WatcherError(strerror(ENOTDIR), watcher); + } + + if (watcher->isIgnored(std::string(node->fts_path))) { + fts_set(fts, node, FTS_SKIP); + continue; + } + + tree->add(node->fts_path, CONVERT_TIME(node->fts_statp->st_mtim), (node->fts_info & FTS_D) == FTS_D); + isRoot = false; + } + + fts_close(fts); +} diff --git a/node_modules/@parcel/watcher/src/unix/legacy.cc b/node_modules/@parcel/watcher/src/unix/legacy.cc new file mode 100644 index 0000000..60490c6 --- /dev/null +++ b/node_modules/@parcel/watcher/src/unix/legacy.cc @@ -0,0 +1,77 @@ +#include + +// weird error on linux +#ifdef __THROW +#undef __THROW +#endif +#define __THROW + +#ifdef _LIBC +# include +#else +# include +#endif +#include +#include +#include + +#include "../DirTree.hh" +#include "../shared/BruteForceBackend.hh" + +#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) +#if __APPLE__ +#define st_mtim st_mtimespec +#endif +#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) + +void iterateDir(WatcherRef watcher, const std::shared_ptr tree, const char *relative, int parent_fd, const std::string &dirname) { + int open_flags = (O_RDONLY | O_CLOEXEC | O_DIRECTORY | O_NOCTTY | O_NONBLOCK | O_NOFOLLOW); + int new_fd = openat(parent_fd, relative, open_flags); + if (new_fd == -1) { + if (errno == EACCES) { + return; // ignore insufficient permissions + } + + throw WatcherError(strerror(errno), watcher); + } + + struct stat rootAttributes; + fstatat(new_fd, ".", &rootAttributes, AT_SYMLINK_NOFOLLOW); + tree->add(dirname, CONVERT_TIME(rootAttributes.st_mtim), true); + + if (DIR *dir = fdopendir(new_fd)) { + while (struct dirent *ent = (errno = 0, readdir(dir))) { + if (ISDOT(ent->d_name)) continue; + + std::string fullPath = dirname + "/" + ent->d_name; + + if (!watcher->isIgnored(fullPath)) { + struct stat attrib; + fstatat(new_fd, ent->d_name, &attrib, AT_SYMLINK_NOFOLLOW); + bool isDir = ent->d_type == DT_DIR; + + if (isDir) { + iterateDir(watcher, tree, ent->d_name, new_fd, fullPath); + } else { + tree->add(fullPath, CONVERT_TIME(attrib.st_mtim), isDir); + } + } + } + + closedir(dir); + } else { + close(new_fd); + } + + if (errno) { + throw WatcherError(strerror(errno), watcher); + } +} + +void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr tree) { + int fd = open(watcher->mDir.c_str(), O_RDONLY); + if (fd) { + iterateDir(watcher, tree, ".", fd, watcher->mDir); + close(fd); + } +} diff --git a/node_modules/@parcel/watcher/src/wasm/WasmBackend.cc b/node_modules/@parcel/watcher/src/wasm/WasmBackend.cc new file mode 100644 index 0000000..9514109 --- /dev/null +++ b/node_modules/@parcel/watcher/src/wasm/WasmBackend.cc @@ -0,0 +1,132 @@ +#include +#include "WasmBackend.hh" + +#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) + +void WasmBackend::start() { + notifyStarted(); +} + +void WasmBackend::subscribe(WatcherRef watcher) { + // Build a full directory tree recursively, and watch each directory. + std::shared_ptr tree = getTree(watcher); + + for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) { + if (it->second.isDir) { + watchDir(watcher, it->second.path, tree); + } + } +} + +void WasmBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree) { + int wd = wasm_backend_add_watch(path.c_str(), (void *)this); + std::shared_ptr sub = std::make_shared(); + sub->tree = tree; + sub->path = path; + sub->watcher = watcher; + mSubscriptions.emplace(wd, sub); +} + +extern "C" void wasm_backend_event_handler(void *backend, int wd, int type, char *filename) { + WasmBackend *b = (WasmBackend *)(backend); + b->handleEvent(wd, type, filename); +} + +void WasmBackend::handleEvent(int wd, int type, char *filename) { + // Find the subscriptions for this watch descriptor + auto range = mSubscriptions.equal_range(wd); + std::unordered_set> set; + for (auto it = range.first; it != range.second; it++) { + set.insert(it->second); + } + + for (auto it = set.begin(); it != set.end(); it++) { + if (handleSubscription(type, filename, *it)) { + (*it)->watcher->notify(); + } + } +} + +bool WasmBackend::handleSubscription(int type, char *filename, std::shared_ptr sub) { + // Build full path and check if its in our ignore list. + WatcherRef watcher = sub->watcher; + std::string path = std::string(sub->path); + + if (filename[0] != '\0') { + path += "/" + std::string(filename); + } + + if (watcher->isIgnored(path)) { + return false; + } + + if (type == 1) { + struct stat st; + stat(path.c_str(), &st); + sub->tree->update(path, CONVERT_TIME(st.st_mtim)); + watcher->mEvents.update(path); + } else if (type == 2) { + // Determine if this is a create or delete depending on if the file exists or not. + struct stat st; + if (lstat(path.c_str(), &st)) { + // If the entry being deleted/moved is a directory, remove it from the list of subscriptions + DirEntry *entry = sub->tree->find(path); + if (!entry) { + return false; + } + + if (entry->isDir) { + std::string pathStart = path + DIR_SEP; + for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { + if (it->second->path == path || it->second->path.rfind(pathStart, 0) == 0) { + wasm_backend_remove_watch(it->first); + it = mSubscriptions.erase(it); + } else { + ++it; + } + } + + // Remove all sub-entries + for (auto it = sub->tree->entries.begin(); it != sub->tree->entries.end();) { + if (it->first.rfind(pathStart, 0) == 0) { + watcher->mEvents.remove(it->first); + it = sub->tree->entries.erase(it); + } else { + it++; + } + } + } + + watcher->mEvents.remove(path); + sub->tree->remove(path); + } else if (sub->tree->find(path)) { + sub->tree->update(path, CONVERT_TIME(st.st_mtim)); + watcher->mEvents.update(path); + } else { + watcher->mEvents.create(path); + + // If this is a create, check if it's a directory and start watching if it is. + DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode)); + if (entry->isDir) { + watchDir(watcher, path, sub->tree); + } + } + } + + return true; +} + +void WasmBackend::unsubscribe(WatcherRef watcher) { + // Find any subscriptions pointing to this watcher, and remove them. + for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) { + if (it->second->watcher.get() == watcher.get()) { + if (mSubscriptions.count(it->first) == 1) { + wasm_backend_remove_watch(it->first); + } + + it = mSubscriptions.erase(it); + } else { + it++; + } + } +} diff --git a/node_modules/@parcel/watcher/src/wasm/WasmBackend.hh b/node_modules/@parcel/watcher/src/wasm/WasmBackend.hh new file mode 100644 index 0000000..9facac8 --- /dev/null +++ b/node_modules/@parcel/watcher/src/wasm/WasmBackend.hh @@ -0,0 +1,34 @@ +#ifndef WASM_H +#define WASM_H + +#include +#include "../shared/BruteForceBackend.hh" +#include "../DirTree.hh" + +extern "C" { + int wasm_backend_add_watch(const char *filename, void *backend); + void wasm_backend_remove_watch(int wd); + void wasm_backend_event_handler(void *backend, int wd, int type, char *filename); +}; + +struct WasmSubscription { + std::shared_ptr tree; + std::string path; + WatcherRef watcher; +}; + +class WasmBackend : public BruteForceBackend { +public: + void start() override; + void subscribe(WatcherRef watcher) override; + void unsubscribe(WatcherRef watcher) override; + void handleEvent(int wd, int type, char *filename); +private: + int mWasm; + std::unordered_multimap> mSubscriptions; + + void watchDir(WatcherRef watcher, std::string path, std::shared_ptr tree); + bool handleSubscription(int type, char *filename, std::shared_ptr sub); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/wasm/include.h b/node_modules/@parcel/watcher/src/wasm/include.h new file mode 100644 index 0000000..60e4d65 --- /dev/null +++ b/node_modules/@parcel/watcher/src/wasm/include.h @@ -0,0 +1,74 @@ +/* +Copyright Node.js contributors. All rights reserved. + +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. +*/ + +// Node does not include the headers for these functions when compiling for WASM, so add them here. +#ifdef __wasm32__ +extern "C" { +NAPI_EXTERN napi_status NAPI_CDECL +napi_create_threadsafe_function(napi_env env, + napi_value func, + napi_value async_resource, + napi_value async_resource_name, + size_t max_queue_size, + size_t initial_thread_count, + void* thread_finalize_data, + napi_finalize thread_finalize_cb, + void* context, + napi_threadsafe_function_call_js call_js_cb, + napi_threadsafe_function* result); + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_threadsafe_function_context( + napi_threadsafe_function func, void** result); + +NAPI_EXTERN napi_status NAPI_CDECL +napi_call_threadsafe_function(napi_threadsafe_function func, + void* data, + napi_threadsafe_function_call_mode is_blocking); + +NAPI_EXTERN napi_status NAPI_CDECL +napi_acquire_threadsafe_function(napi_threadsafe_function func); + +NAPI_EXTERN napi_status NAPI_CDECL napi_release_threadsafe_function( + napi_threadsafe_function func, napi_threadsafe_function_release_mode mode); + +NAPI_EXTERN napi_status NAPI_CDECL +napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func); + +NAPI_EXTERN napi_status NAPI_CDECL +napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func); + +NAPI_EXTERN napi_status NAPI_CDECL +napi_create_async_work(napi_env env, + napi_value async_resource, + napi_value async_resource_name, + napi_async_execute_callback execute, + napi_async_complete_callback complete, + void* data, + napi_async_work* result); +NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work(napi_env env, + napi_async_work work); +NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env, + napi_async_work work); +NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env, + napi_async_work work); +} +#endif diff --git a/node_modules/@parcel/watcher/src/watchman/BSER.cc b/node_modules/@parcel/watcher/src/watchman/BSER.cc new file mode 100644 index 0000000..1fbcd45 --- /dev/null +++ b/node_modules/@parcel/watcher/src/watchman/BSER.cc @@ -0,0 +1,302 @@ +#include +#include "./BSER.hh" + +BSERType decodeType(std::istream &iss) { + int8_t type; + iss.read(reinterpret_cast(&type), sizeof(type)); + return (BSERType) type; +} + +void expectType(std::istream &iss, BSERType expected) { + BSERType got = decodeType(iss); + if (got != expected) { + throw std::runtime_error("Unexpected BSER type"); + } +} + +void encodeType(std::ostream &oss, BSERType type) { + int8_t t = (int8_t)type; + oss.write(reinterpret_cast(&t), sizeof(t)); +} + +template +class Value : public BSERValue { +public: + T value; + Value(T val) { + value = val; + } + + Value() {} +}; + +class BSERInteger : public Value { +public: + BSERInteger(int64_t value) : Value(value) {} + BSERInteger(std::istream &iss) { + int8_t int8; + int16_t int16; + int32_t int32; + int64_t int64; + + BSERType type = decodeType(iss); + + switch (type) { + case BSER_INT8: + iss.read(reinterpret_cast(&int8), sizeof(int8)); + value = int8; + break; + case BSER_INT16: + iss.read(reinterpret_cast(&int16), sizeof(int16)); + value = int16; + break; + case BSER_INT32: + iss.read(reinterpret_cast(&int32), sizeof(int32)); + value = int32; + break; + case BSER_INT64: + iss.read(reinterpret_cast(&int64), sizeof(int64)); + value = int64; + break; + default: + throw std::runtime_error("Invalid BSER int type"); + } + } + + int64_t intValue() override { + return value; + } + + void encode(std::ostream &oss) override { + if (value <= INT8_MAX) { + encodeType(oss, BSER_INT8); + int8_t v = (int8_t)value; + oss.write(reinterpret_cast(&v), sizeof(v)); + } else if (value <= INT16_MAX) { + encodeType(oss, BSER_INT16); + int16_t v = (int16_t)value; + oss.write(reinterpret_cast(&v), sizeof(v)); + } else if (value <= INT32_MAX) { + encodeType(oss, BSER_INT32); + int32_t v = (int32_t)value; + oss.write(reinterpret_cast(&v), sizeof(v)); + } else { + encodeType(oss, BSER_INT64); + oss.write(reinterpret_cast(&value), sizeof(value)); + } + } +}; + +class BSERArray : public Value { +public: + BSERArray() : Value() {} + BSERArray(BSER::Array value) : Value(value) {} + BSERArray(std::istream &iss) { + expectType(iss, BSER_ARRAY); + int64_t len = BSERInteger(iss).intValue(); + for (int64_t i = 0; i < len; i++) { + value.push_back(BSER(iss)); + } + } + + BSER::Array arrayValue() override { + return value; + } + + void encode(std::ostream &oss) override { + encodeType(oss, BSER_ARRAY); + BSERInteger(value.size()).encode(oss); + for (auto it = value.begin(); it != value.end(); it++) { + it->encode(oss); + } + } +}; + +class BSERString : public Value { +public: + BSERString(std::string value) : Value(value) {} + BSERString(std::istream &iss) { + expectType(iss, BSER_STRING); + int64_t len = BSERInteger(iss).intValue(); + value.resize(len); + iss.read(&value[0], len); + } + + std::string stringValue() override { + return value; + } + + void encode(std::ostream &oss) override { + encodeType(oss, BSER_STRING); + BSERInteger(value.size()).encode(oss); + oss << value; + } +}; + +class BSERObject : public Value { +public: + BSERObject() : Value() {} + BSERObject(BSER::Object value) : Value(value) {} + BSERObject(std::istream &iss) { + expectType(iss, BSER_OBJECT); + int64_t len = BSERInteger(iss).intValue(); + for (int64_t i = 0; i < len; i++) { + auto key = BSERString(iss).stringValue(); + auto val = BSER(iss); + value.emplace(key, val); + } + } + + BSER::Object objectValue() override { + return value; + } + + void encode(std::ostream &oss) override { + encodeType(oss, BSER_OBJECT); + BSERInteger(value.size()).encode(oss); + for (auto it = value.begin(); it != value.end(); it++) { + BSERString(it->first).encode(oss); + it->second.encode(oss); + } + } +}; + +class BSERDouble : public Value { +public: + BSERDouble(double value) : Value(value) {} + BSERDouble(std::istream &iss) { + expectType(iss, BSER_REAL); + iss.read(reinterpret_cast(&value), sizeof(value)); + } + + double doubleValue() override { + return value; + } + + void encode(std::ostream &oss) override { + encodeType(oss, BSER_REAL); + oss.write(reinterpret_cast(&value), sizeof(value)); + } +}; + +class BSERBoolean : public Value { +public: + BSERBoolean(bool value) : Value(value) {} + bool boolValue() override { return value; } + void encode(std::ostream &oss) override { + int8_t t = value == true ? BSER_BOOL_TRUE : BSER_BOOL_FALSE; + oss.write(reinterpret_cast(&t), sizeof(t)); + } +}; + +class BSERNull : public Value { +public: + BSERNull() : Value(false) {} + void encode(std::ostream &oss) override { + encodeType(oss, BSER_NULL); + } +}; + +std::shared_ptr decodeTemplate(std::istream &iss) { + expectType(iss, BSER_TEMPLATE); + auto keys = BSERArray(iss).arrayValue(); + auto len = BSERInteger(iss).intValue(); + std::shared_ptr arr = std::make_shared(); + for (int64_t i = 0; i < len; i++) { + BSER::Object obj; + for (auto it = keys.begin(); it != keys.end(); it++) { + if (iss.peek() == 0x0c) { + iss.ignore(1); + continue; + } + + auto val = BSER(iss); + obj.emplace(it->stringValue(), val); + } + arr->value.push_back(obj); + } + return arr; +} + +BSER::BSER(std::istream &iss) { + BSERType type = decodeType(iss); + iss.unget(); + + switch (type) { + case BSER_ARRAY: + m_ptr = std::make_shared(iss); + break; + case BSER_OBJECT: + m_ptr = std::make_shared(iss); + break; + case BSER_STRING: + m_ptr = std::make_shared(iss); + break; + case BSER_INT8: + case BSER_INT16: + case BSER_INT32: + case BSER_INT64: + m_ptr = std::make_shared(iss); + break; + case BSER_REAL: + m_ptr = std::make_shared(iss); + break; + case BSER_BOOL_TRUE: + iss.ignore(1); + m_ptr = std::make_shared(true); + break; + case BSER_BOOL_FALSE: + iss.ignore(1); + m_ptr = std::make_shared(false); + break; + case BSER_NULL: + iss.ignore(1); + m_ptr = std::make_shared(); + break; + case BSER_TEMPLATE: + m_ptr = decodeTemplate(iss); + break; + default: + throw std::runtime_error("unknown BSER type"); + } +} + +BSER::BSER() : m_ptr(std::make_shared()) {} +BSER::BSER(BSER::Array value) : m_ptr(std::make_shared(value)) {} +BSER::BSER(BSER::Object value) : m_ptr(std::make_shared(value)) {} +BSER::BSER(const char *value) : m_ptr(std::make_shared(value)) {} +BSER::BSER(std::string value) : m_ptr(std::make_shared(value)) {} +BSER::BSER(int64_t value) : m_ptr(std::make_shared(value)) {} +BSER::BSER(double value) : m_ptr(std::make_shared(value)) {} +BSER::BSER(bool value) : m_ptr(std::make_shared(value)) {} + +BSER::Array BSER::arrayValue() { return m_ptr->arrayValue(); } +BSER::Object BSER::objectValue() { return m_ptr->objectValue(); } +std::string BSER::stringValue() { return m_ptr->stringValue(); } +int64_t BSER::intValue() { return m_ptr->intValue(); } +double BSER::doubleValue() { return m_ptr->doubleValue(); } +bool BSER::boolValue() { return m_ptr->boolValue(); } +void BSER::encode(std::ostream &oss) { + m_ptr->encode(oss); +} + +int64_t BSER::decodeLength(std::istream &iss) { + char pdu[2]; + if (!iss.read(pdu, 2) || pdu[0] != 0 || pdu[1] != 1) { + throw std::runtime_error("Invalid BSER"); + } + + return BSERInteger(iss).intValue(); +} + +std::string BSER::encode() { + std::ostringstream oss(std::ios_base::binary); + encode(oss); + + std::ostringstream res(std::ios_base::binary); + res.write("\x00\x01", 2); + + BSERInteger(oss.str().size()).encode(res); + res << oss.str(); + return res.str(); +} diff --git a/node_modules/@parcel/watcher/src/watchman/BSER.hh b/node_modules/@parcel/watcher/src/watchman/BSER.hh new file mode 100644 index 0000000..6bd2025 --- /dev/null +++ b/node_modules/@parcel/watcher/src/watchman/BSER.hh @@ -0,0 +1,69 @@ +#ifndef BSER_H +#define BSER_H + +#include +#include +#include +#include +#include + +enum BSERType { + BSER_ARRAY = 0x00, + BSER_OBJECT = 0x01, + BSER_STRING = 0x02, + BSER_INT8 = 0x03, + BSER_INT16 = 0x04, + BSER_INT32 = 0x05, + BSER_INT64 = 0x06, + BSER_REAL = 0x07, + BSER_BOOL_TRUE = 0x08, + BSER_BOOL_FALSE = 0x09, + BSER_NULL = 0x0a, + BSER_TEMPLATE = 0x0b +}; + +class BSERValue; + +class BSER { +public: + typedef std::vector Array; + typedef std::unordered_map Object; + + BSER(); + BSER(BSER::Array value); + BSER(BSER::Object value); + BSER(std::string value); + BSER(const char *value); + BSER(int64_t value); + BSER(double value); + BSER(bool value); + BSER(std::istream &iss); + + BSER::Array arrayValue(); + BSER::Object objectValue(); + std::string stringValue(); + int64_t intValue(); + double doubleValue(); + bool boolValue(); + void encode(std::ostream &oss); + + static int64_t decodeLength(std::istream &iss); + std::string encode(); +private: + std::shared_ptr m_ptr; +}; + +class BSERValue { +protected: + friend class BSER; + virtual BSER::Array arrayValue() { return BSER::Array(); } + virtual BSER::Object objectValue() { return BSER::Object(); } + virtual std::string stringValue() { return std::string(); } + virtual int64_t intValue() { return 0; } + virtual double doubleValue() { return 0; } + virtual bool boolValue() { return false; } + virtual void encode(std::ostream &oss) {} + virtual ~BSERValue() {} +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/watchman/IPC.hh b/node_modules/@parcel/watcher/src/watchman/IPC.hh new file mode 100644 index 0000000..6e852c8 --- /dev/null +++ b/node_modules/@parcel/watcher/src/watchman/IPC.hh @@ -0,0 +1,175 @@ +#ifndef IPC_H +#define IPC_H + +#include +#include + +#ifdef _WIN32 +#include +#include +#else +#include +#include +#include +#endif + +class IPC { +public: + IPC(std::string path) { + mStopped = false; + #ifdef _WIN32 + while (true) { + mPipe = CreateFile( + path.data(), // pipe name + GENERIC_READ | GENERIC_WRITE, // read and write access + 0, // no sharing + NULL, // default security attributes + OPEN_EXISTING, // opens existing pipe + FILE_FLAG_OVERLAPPED, // attributes + NULL // no template file + ); + + if (mPipe != INVALID_HANDLE_VALUE) { + break; + } + + if (GetLastError() != ERROR_PIPE_BUSY) { + throw std::runtime_error("Could not open pipe"); + } + + // Wait for pipe to become available if it is busy + if (!WaitNamedPipe(path.data(), 30000)) { + throw std::runtime_error("Error waiting for pipe"); + } + } + + mReader = CreateEvent(NULL, true, false, NULL); + mWriter = CreateEvent(NULL, true, false, NULL); + #else + struct sockaddr_un addr; + memset(&addr, 0, sizeof(addr)); + addr.sun_family = AF_UNIX; + strncpy(addr.sun_path, path.c_str(), sizeof(addr.sun_path) - 1); + + mSock = socket(AF_UNIX, SOCK_STREAM, 0); + if (connect(mSock, (struct sockaddr *) &addr, sizeof(struct sockaddr_un))) { + throw std::runtime_error("Error connecting to socket"); + } + #endif + } + + ~IPC() { + mStopped = true; + #ifdef _WIN32 + CancelIo(mPipe); + CloseHandle(mPipe); + CloseHandle(mReader); + CloseHandle(mWriter); + #else + shutdown(mSock, SHUT_RDWR); + #endif + } + + void write(std::string buf) { + #ifdef _WIN32 + OVERLAPPED overlapped; + overlapped.hEvent = mWriter; + bool success = WriteFile( + mPipe, // pipe handle + buf.data(), // message + buf.size(), // message length + NULL, // bytes written + &overlapped // overlapped + ); + + if (mStopped) { + return; + } + + if (!success) { + if (GetLastError() != ERROR_IO_PENDING) { + throw std::runtime_error("Write error"); + } + } + + DWORD written; + success = GetOverlappedResult(mPipe, &overlapped, &written, true); + if (!success) { + throw std::runtime_error("GetOverlappedResult failed"); + } + + if (written != buf.size()) { + throw std::runtime_error("Wrong number of bytes written"); + } + #else + int r = 0; + for (unsigned int i = 0; i != buf.size(); i += r) { + r = ::write(mSock, &buf[i], buf.size() - i); + if (r == -1) { + if (errno == EAGAIN) { + r = 0; + } else if (mStopped) { + return; + } else { + throw std::runtime_error("Write error"); + } + } + } + #endif + } + + int read(char *buf, size_t len) { + #ifdef _WIN32 + OVERLAPPED overlapped; + overlapped.hEvent = mReader; + bool success = ReadFile( + mPipe, // pipe handle + buf, // buffer to receive reply + len, // size of buffer + NULL, // number of bytes read + &overlapped // overlapped + ); + + if (!success && !mStopped) { + if (GetLastError() != ERROR_IO_PENDING) { + throw std::runtime_error("Read error"); + } + } + + DWORD read = 0; + success = GetOverlappedResult(mPipe, &overlapped, &read, true); + if (!success && !mStopped) { + throw std::runtime_error("GetOverlappedResult failed"); + } + + return read; + #else + int r = ::read(mSock, buf, len); + if (r == 0 && !mStopped) { + throw std::runtime_error("Socket ended unexpectedly"); + } + + if (r < 0) { + if (mStopped) { + return 0; + } + + throw std::runtime_error(strerror(errno)); + } + + return r; + #endif + } + +private: + bool mStopped; + #ifdef _WIN32 + HANDLE mPipe; + HANDLE mReader; + HANDLE mWriter; + #else + int mSock; + #endif +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc b/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc new file mode 100644 index 0000000..82a23f5 --- /dev/null +++ b/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc @@ -0,0 +1,338 @@ +#include +#include +#include +#include +#include "../DirTree.hh" +#include "../Event.hh" +#include "./BSER.hh" +#include "./WatchmanBackend.hh" + +#ifdef _WIN32 +#include "../windows/win_utils.hh" +#define S_ISDIR(mode) ((mode & _S_IFDIR) == _S_IFDIR) +#define popen _popen +#define pclose _pclose +#else +#include +#define normalizePath(dir) dir +#endif + +template +BSER readBSER(T &&do_read) { + std::stringstream oss; + char buffer[256]; + int r; + int64_t len = -1; + do { + // Start by reading a minimal amount of data in order to decode the length. + // After that, attempt to read the remaining length, up to the buffer size. + r = do_read(buffer, len == -1 ? 20 : (len < 256 ? len : 256)); + oss << std::string(buffer, r); + + if (len == -1) { + uint64_t l = BSER::decodeLength(oss); + len = l + oss.tellg(); + } + + len -= r; + } while (len > 0); + + return BSER(oss); +} + +std::string getSockPath() { + auto var = getenv("WATCHMAN_SOCK"); + if (var && *var) { + return std::string(var); + } + + FILE *fp = popen("watchman --output-encoding=bser get-sockname", "r"); + if (fp == NULL || errno == ECHILD) { + throw std::runtime_error("Failed to execute watchman"); + } + + BSER b = readBSER([fp] (char *buf, size_t len) { + return fread(buf, sizeof(char), len, fp); + }); + + pclose(fp); + + auto objValue = b.objectValue(); + auto foundSockname = objValue.find("sockname"); + if (foundSockname == objValue.end()) { + throw std::runtime_error("sockname not found"); + } + return foundSockname->second.stringValue(); +} + +std::unique_ptr watchmanConnect() { + std::string path = getSockPath(); + return std::unique_ptr(new IPC(path)); +} + +BSER watchmanRead(IPC *ipc) { + return readBSER([ipc] (char *buf, size_t len) { + return ipc->read(buf, len); + }); +} + +BSER::Object WatchmanBackend::watchmanRequest(BSER b) { + std::string cmd = b.encode(); + mIPC->write(cmd); + mRequestSignal.notify(); + + mResponseSignal.wait(); + mResponseSignal.reset(); + + if (!mError.empty()) { + std::runtime_error err = std::runtime_error(mError); + mError = std::string(); + throw err; + } + + return mResponse; +} + +void WatchmanBackend::watchmanWatch(std::string dir) { + std::vector cmd; + cmd.push_back("watch"); + cmd.push_back(normalizePath(dir)); + watchmanRequest(cmd); +} + +bool WatchmanBackend::checkAvailable() { + try { + watchmanConnect(); + return true; + } catch (std::exception &err) { + return false; + } +} + +void handleFiles(WatcherRef watcher, BSER::Object obj) { + auto found = obj.find("files"); + if (found == obj.end()) { + throw WatcherError("Error reading changes from watchman", watcher); + } + + auto files = found->second.arrayValue(); + for (auto it = files.begin(); it != files.end(); it++) { + auto file = it->objectValue(); + auto name = file.find("name")->second.stringValue(); + #ifdef _WIN32 + std::replace(name.begin(), name.end(), '/', '\\'); + #endif + auto mode = file.find("mode")->second.intValue(); + auto isNew = file.find("new")->second.boolValue(); + auto exists = file.find("exists")->second.boolValue(); + auto path = watcher->mDir + DIR_SEP + name; + if (watcher->isIgnored(path)) { + continue; + } + + if (isNew && exists) { + watcher->mEvents.create(path); + } else if (exists && !S_ISDIR(mode)) { + watcher->mEvents.update(path); + } else if (!isNew && !exists) { + watcher->mEvents.remove(path); + } + } +} + +void WatchmanBackend::handleSubscription(BSER::Object obj) { + std::unique_lock lock(mMutex); + auto subscription = obj.find("subscription")->second.stringValue(); + auto it = mSubscriptions.find(subscription); + if (it == mSubscriptions.end()) { + return; + } + + auto watcher = it->second; + try { + handleFiles(watcher, obj); + watcher->notify(); + } catch (WatcherError &err) { + handleWatcherError(err); + } +} + +void WatchmanBackend::start() { + mIPC = watchmanConnect(); + notifyStarted(); + + while (true) { + // If there are no subscriptions we are reading, wait for a request. + if (mSubscriptions.size() == 0) { + mRequestSignal.wait(); + mRequestSignal.reset(); + } + + // Break out of loop if we are stopped. + if (mStopped) { + break; + } + + // Attempt to read from the socket. + // If there is an error and we are stopped, break. + BSER b; + try { + b = watchmanRead(&*mIPC); + } catch (std::exception &err) { + if (mStopped) { + break; + } else if (mResponseSignal.isWaiting()) { + mError = err.what(); + mResponseSignal.notify(); + } else { + // Throwing causes the backend to be destroyed, but we never reach the code below to notify the signal + mEndedSignal.notify(); + throw; + } + } + + auto obj = b.objectValue(); + auto error = obj.find("error"); + if (error != obj.end()) { + mError = error->second.stringValue(); + mResponseSignal.notify(); + continue; + } + + // If this message is for a subscription, handle it, otherwise notify the request. + auto subscription = obj.find("subscription"); + if (subscription != obj.end()) { + handleSubscription(obj); + } else { + mResponse = obj; + mResponseSignal.notify(); + } + } + + mEndedSignal.notify(); +} + +WatchmanBackend::~WatchmanBackend() { + // Mark the watcher as stopped, close the socket, and trigger the lock. + // This will cause the read loop to be broken and the thread to exit. + mStopped = true; + mIPC.reset(); + mRequestSignal.notify(); + + // If not ended yet, wait. + mEndedSignal.wait(); +} + +std::string WatchmanBackend::clock(WatcherRef watcher) { + BSER::Array cmd; + cmd.push_back("clock"); + cmd.push_back(normalizePath(watcher->mDir)); + + BSER::Object obj = watchmanRequest(cmd); + auto found = obj.find("clock"); + if (found == obj.end()) { + throw WatcherError("Error reading clock from watchman", watcher); + } + + return found->second.stringValue(); +} + +void WatchmanBackend::writeSnapshot(WatcherRef watcher, std::string *snapshotPath) { + std::unique_lock lock(mMutex); + watchmanWatch(watcher->mDir); + + std::ofstream ofs(*snapshotPath); + ofs << clock(watcher); +} + +void WatchmanBackend::getEventsSince(WatcherRef watcher, std::string *snapshotPath) { + std::unique_lock lock(mMutex); + std::ifstream ifs(*snapshotPath); + if (ifs.fail()) { + return; + } + + watchmanWatch(watcher->mDir); + + std::string clock; + ifs >> clock; + + BSER::Array cmd; + cmd.push_back("since"); + cmd.push_back(normalizePath(watcher->mDir)); + cmd.push_back(clock); + + BSER::Object obj = watchmanRequest(cmd); + handleFiles(watcher, obj); +} + +std::string getId(WatcherRef watcher) { + std::ostringstream id; + id << "parcel-"; + id << static_cast(watcher.get()); + return id.str(); +} + +// This function is called by Backend::watch which takes a lock on mMutex +void WatchmanBackend::subscribe(WatcherRef watcher) { + watchmanWatch(watcher->mDir); + + std::string id = getId(watcher); + BSER::Array cmd; + cmd.push_back("subscribe"); + cmd.push_back(normalizePath(watcher->mDir)); + cmd.push_back(id); + + BSER::Array fields; + fields.push_back("name"); + fields.push_back("mode"); + fields.push_back("exists"); + fields.push_back("new"); + + BSER::Object opts; + opts.emplace("fields", fields); + opts.emplace("since", clock(watcher)); + + if (watcher->mIgnorePaths.size() > 0) { + BSER::Array ignore; + BSER::Array anyOf; + anyOf.push_back("anyof"); + + for (auto it = watcher->mIgnorePaths.begin(); it != watcher->mIgnorePaths.end(); it++) { + std::string pathStart = watcher->mDir + DIR_SEP; + if (it->rfind(pathStart, 0) == 0) { + auto relative = it->substr(pathStart.size()); + BSER::Array dirname; + dirname.push_back("dirname"); + dirname.push_back(relative); + anyOf.push_back(dirname); + } + } + + ignore.push_back("not"); + ignore.push_back(anyOf); + + opts.emplace("expression", ignore); + } + + cmd.push_back(opts); + watchmanRequest(cmd); + + mSubscriptions.emplace(id, watcher); + mRequestSignal.notify(); +} + +// This function is called by Backend::unwatch which takes a lock on mMutex +void WatchmanBackend::unsubscribe(WatcherRef watcher) { + std::string id = getId(watcher); + auto erased = mSubscriptions.erase(id); + + if (erased) { + BSER::Array cmd; + cmd.push_back("unsubscribe"); + cmd.push_back(normalizePath(watcher->mDir)); + cmd.push_back(id); + + watchmanRequest(cmd); + } +} diff --git a/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh b/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh new file mode 100644 index 0000000..699cded --- /dev/null +++ b/node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh @@ -0,0 +1,35 @@ +#ifndef WATCHMAN_H +#define WATCHMAN_H + +#include "../Backend.hh" +#include "./BSER.hh" +#include "../Signal.hh" +#include "./IPC.hh" + +class WatchmanBackend : public Backend { +public: + static bool checkAvailable(); + void start() override; + WatchmanBackend() : mStopped(false) {}; + ~WatchmanBackend(); + void writeSnapshot(WatcherRef watcher, std::string *snapshotPath) override; + void getEventsSince(WatcherRef watcher, std::string *snapshotPath) override; + void subscribe(WatcherRef watcher) override; + void unsubscribe(WatcherRef watcher) override; +private: + std::unique_ptr mIPC; + Signal mRequestSignal; + Signal mResponseSignal; + BSER::Object mResponse; + std::string mError; + std::unordered_map mSubscriptions; + bool mStopped; + Signal mEndedSignal; + + std::string clock(WatcherRef watcher); + void watchmanWatch(std::string dir); + BSER::Object watchmanRequest(BSER cmd); + void handleSubscription(BSER::Object obj); +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/windows/WindowsBackend.cc b/node_modules/@parcel/watcher/src/windows/WindowsBackend.cc new file mode 100644 index 0000000..eabce1e --- /dev/null +++ b/node_modules/@parcel/watcher/src/windows/WindowsBackend.cc @@ -0,0 +1,282 @@ +#include +#include +#include "../DirTree.hh" +#include "../shared/BruteForceBackend.hh" +#include "./WindowsBackend.hh" +#include "./win_utils.hh" + +#define DEFAULT_BUF_SIZE 1024 * 1024 +#define NETWORK_BUF_SIZE 64 * 1024 +#define CONVERT_TIME(ft) ULARGE_INTEGER{ft.dwLowDateTime, ft.dwHighDateTime}.QuadPart + +void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr tree) { + std::stack directories; + + directories.push(watcher->mDir); + + while (!directories.empty()) { + HANDLE hFind = INVALID_HANDLE_VALUE; + + std::string path = directories.top(); + std::string spec = path + "\\*"; + directories.pop(); + + WIN32_FIND_DATA ffd; + hFind = FindFirstFile(spec.c_str(), &ffd); + + if (hFind == INVALID_HANDLE_VALUE) { + if (path == watcher->mDir) { + FindClose(hFind); + throw WatcherError("Error opening directory", watcher); + } + + tree->remove(path); + continue; + } + + do { + if (strcmp(ffd.cFileName, ".") != 0 && strcmp(ffd.cFileName, "..") != 0) { + std::string fullPath = path + "\\" + ffd.cFileName; + if (watcher->isIgnored(fullPath)) { + continue; + } + + tree->add(fullPath, CONVERT_TIME(ffd.ftLastWriteTime), ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + directories.push(fullPath); + } + } + } while (FindNextFile(hFind, &ffd) != 0); + + FindClose(hFind); + } +} + +void WindowsBackend::start() { + mRunning = true; + notifyStarted(); + + while (mRunning) { + SleepEx(INFINITE, true); + } +} + +WindowsBackend::~WindowsBackend() { + // Mark as stopped, and queue a noop function in the thread to break the loop + mRunning = false; + QueueUserAPC([](__in ULONG_PTR) {}, mThread.native_handle(), (ULONG_PTR)this); +} + +class Subscription: public WatcherState { +public: + Subscription(WindowsBackend *backend, WatcherRef watcher, std::shared_ptr tree) { + mRunning = true; + mBackend = backend; + mWatcher = watcher; + mTree = tree; + ZeroMemory(&mOverlapped, sizeof(OVERLAPPED)); + mOverlapped.hEvent = this; + mReadBuffer.resize(DEFAULT_BUF_SIZE); + mWriteBuffer.resize(DEFAULT_BUF_SIZE); + + mDirectoryHandle = CreateFileW( + utf8ToUtf16(watcher->mDir).data(), + FILE_LIST_DIRECTORY, + FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, + NULL + ); + + if (mDirectoryHandle == INVALID_HANDLE_VALUE) { + throw WatcherError("Invalid handle", mWatcher); + } + + // Ensure that the path is a directory + BY_HANDLE_FILE_INFORMATION info; + bool success = GetFileInformationByHandle( + mDirectoryHandle, + &info + ); + + if (!success) { + throw WatcherError("Could not get file information", mWatcher); + } + + if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + throw WatcherError("Not a directory", mWatcher); + } + } + + virtual ~Subscription() { + stop(); + } + + void run() { + try { + poll(); + } catch (WatcherError &err) { + mBackend->handleWatcherError(err); + } + } + + void stop() { + if (mRunning) { + mRunning = false; + CancelIo(mDirectoryHandle); + CloseHandle(mDirectoryHandle); + } + } + + void poll() { + if (!mRunning) { + return; + } + + // Asynchronously wait for changes. + int success = ReadDirectoryChangesW( + mDirectoryHandle, + mWriteBuffer.data(), + static_cast(mWriteBuffer.size()), + TRUE, // recursive + FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES + | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE, + NULL, + &mOverlapped, + [](DWORD errorCode, DWORD numBytes, LPOVERLAPPED overlapped) { + auto subscription = reinterpret_cast(overlapped->hEvent); + try { + subscription->processEvents(errorCode); + } catch (WatcherError &err) { + subscription->mBackend->handleWatcherError(err); + } + } + ); + + if (!success) { + throw WatcherError("Failed to read changes", mWatcher); + } + } + + void processEvents(DWORD errorCode) { + if (!mRunning) { + return; + } + + switch (errorCode) { + case ERROR_OPERATION_ABORTED: + return; + case ERROR_INVALID_PARAMETER: + // resize buffers to network size (64kb), and try again + mReadBuffer.resize(NETWORK_BUF_SIZE); + mWriteBuffer.resize(NETWORK_BUF_SIZE); + poll(); + return; + case ERROR_NOTIFY_ENUM_DIR: + throw WatcherError("Buffer overflow. Some events may have been lost.", mWatcher); + case ERROR_ACCESS_DENIED: { + // This can happen if the watched directory is deleted. Check if that is the case, + // and if so emit a delete event. Otherwise, fall through to default error case. + DWORD attrs = GetFileAttributesW(utf8ToUtf16(mWatcher->mDir).data()); + bool isDir = attrs != INVALID_FILE_ATTRIBUTES && (attrs & FILE_ATTRIBUTE_DIRECTORY); + if (!isDir) { + mWatcher->mEvents.remove(mWatcher->mDir); + mTree->remove(mWatcher->mDir); + mWatcher->notify(); + stop(); + return; + } + } + default: + if (errorCode != ERROR_SUCCESS) { + throw WatcherError("Unknown error", mWatcher); + } + } + + // Swap read and write buffers, and poll again + std::swap(mWriteBuffer, mReadBuffer); + poll(); + + // Read change events + BYTE *base = mReadBuffer.data(); + while (true) { + PFILE_NOTIFY_INFORMATION info = (PFILE_NOTIFY_INFORMATION)base; + processEvent(info); + + if (info->NextEntryOffset == 0) { + break; + } + + base += info->NextEntryOffset; + } + + mWatcher->notify(); + } + + void processEvent(PFILE_NOTIFY_INFORMATION info) { + std::string path = mWatcher->mDir + "\\" + utf16ToUtf8(info->FileName, info->FileNameLength / sizeof(WCHAR)); + if (mWatcher->isIgnored(path)) { + return; + } + + switch (info->Action) { + case FILE_ACTION_ADDED: + case FILE_ACTION_RENAMED_NEW_NAME: { + WIN32_FILE_ATTRIBUTE_DATA data; + if (GetFileAttributesExW(utf8ToUtf16(path).data(), GetFileExInfoStandard, &data)) { + mWatcher->mEvents.create(path); + mTree->add(path, CONVERT_TIME(data.ftLastWriteTime), data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); + } + break; + } + case FILE_ACTION_MODIFIED: { + WIN32_FILE_ATTRIBUTE_DATA data; + if (GetFileAttributesExW(utf8ToUtf16(path).data(), GetFileExInfoStandard, &data)) { + mTree->update(path, CONVERT_TIME(data.ftLastWriteTime)); + if (!(data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + mWatcher->mEvents.update(path); + } + } + break; + } + case FILE_ACTION_REMOVED: + case FILE_ACTION_RENAMED_OLD_NAME: + mWatcher->mEvents.remove(path); + mTree->remove(path); + break; + } + } + +private: + WindowsBackend *mBackend; + std::shared_ptr mWatcher; + std::shared_ptr mTree; + bool mRunning; + HANDLE mDirectoryHandle; + std::vector mReadBuffer; + std::vector mWriteBuffer; + OVERLAPPED mOverlapped; +}; + +// This function is called by Backend::watch which takes a lock on mMutex +void WindowsBackend::subscribe(WatcherRef watcher) { + // Create a subscription for this watcher + auto sub = std::make_shared(this, watcher, getTree(watcher, false)); + watcher->state = sub; + + // Queue polling for this subscription in the correct thread. + bool success = QueueUserAPC([](__in ULONG_PTR ptr) { + Subscription *sub = (Subscription *)ptr; + sub->run(); + }, mThread.native_handle(), (ULONG_PTR)sub.get()); + + if (!success) { + throw std::runtime_error("Unable to queue APC"); + } +} + +// This function is called by Backend::unwatch which takes a lock on mMutex +void WindowsBackend::unsubscribe(WatcherRef watcher) { + watcher->state = nullptr; +} diff --git a/node_modules/@parcel/watcher/src/windows/WindowsBackend.hh b/node_modules/@parcel/watcher/src/windows/WindowsBackend.hh new file mode 100644 index 0000000..d679782 --- /dev/null +++ b/node_modules/@parcel/watcher/src/windows/WindowsBackend.hh @@ -0,0 +1,18 @@ +#ifndef WINDOWS_H +#define WINDOWS_H + +#include +#include +#include "../shared/BruteForceBackend.hh" + +class WindowsBackend : public BruteForceBackend { +public: + void start() override; + ~WindowsBackend(); + void subscribe(WatcherRef watcher) override; + void unsubscribe(WatcherRef watcher) override; +private: + bool mRunning; +}; + +#endif diff --git a/node_modules/@parcel/watcher/src/windows/win_utils.cc b/node_modules/@parcel/watcher/src/windows/win_utils.cc new file mode 100644 index 0000000..986690f --- /dev/null +++ b/node_modules/@parcel/watcher/src/windows/win_utils.cc @@ -0,0 +1,44 @@ +#include "./win_utils.hh" + +std::wstring utf8ToUtf16(std::string input) { + unsigned int len = MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1, NULL, 0); + WCHAR *output = new WCHAR[len]; + MultiByteToWideChar(CP_UTF8, 0, input.c_str(), -1, output, len); + std::wstring res(output); + delete output; + return res; +} + +std::string utf16ToUtf8(const WCHAR *input, size_t length) { + unsigned int len = WideCharToMultiByte(CP_UTF8, 0, input, length, NULL, 0, NULL, NULL); + char *output = new char[len + 1]; + WideCharToMultiByte(CP_UTF8, 0, input, length, output, len, NULL, NULL); + output[len] = '\0'; + std::string res(output); + delete output; + return res; +} + +std::string normalizePath(std::string path) { + // Prevent truncation to MAX_PATH characters by adding the \\?\ prefix + std::wstring p = utf8ToUtf16("\\\\?\\" + path); + + // Get the required length for the output + unsigned int len = GetLongPathNameW(p.data(), NULL, 0); + if (!len) { + return path; + } + + // Allocate output array and get long path + WCHAR *output = new WCHAR[len]; + len = GetLongPathNameW(p.data(), output, len); + if (!len) { + delete output; + return path; + } + + // Convert back to utf8 + std::string res = utf16ToUtf8(output + 4, len - 4); + delete output; + return res; +} diff --git a/node_modules/@parcel/watcher/src/windows/win_utils.hh b/node_modules/@parcel/watcher/src/windows/win_utils.hh new file mode 100644 index 0000000..2313493 --- /dev/null +++ b/node_modules/@parcel/watcher/src/windows/win_utils.hh @@ -0,0 +1,11 @@ +#ifndef WIN_UTILS_H +#define WIN_UTILS_H + +#include +#include + +std::wstring utf8ToUtf16(std::string input); +std::string utf16ToUtf8(const WCHAR *input, size_t length); +std::string normalizePath(std::string path); + +#endif diff --git a/node_modules/@parcel/watcher/wrapper.js b/node_modules/@parcel/watcher/wrapper.js new file mode 100644 index 0000000..496d56b --- /dev/null +++ b/node_modules/@parcel/watcher/wrapper.js @@ -0,0 +1,77 @@ +const path = require('path'); +const micromatch = require('micromatch'); +const isGlob = require('is-glob'); + +function normalizeOptions(dir, opts = {}) { + const { ignore, ...rest } = opts; + + if (Array.isArray(ignore)) { + opts = { ...rest }; + + for (const value of ignore) { + if (isGlob(value)) { + if (!opts.ignoreGlobs) { + opts.ignoreGlobs = []; + } + + const regex = micromatch.makeRe(value, { + // We set `dot: true` to workaround an issue with the + // regular expression on Linux where the resulting + // negative lookahead `(?!(\\/|^)` was never matching + // in some cases. See also https://bit.ly/3UZlQDm + dot: true, + // C++ does not support lookbehind regex patterns, they + // were only added later to JavaScript engines + // (https://bit.ly/3V7S6UL) + lookbehinds: false + }); + opts.ignoreGlobs.push(regex.source); + } else { + if (!opts.ignorePaths) { + opts.ignorePaths = []; + } + + opts.ignorePaths.push(path.resolve(dir, value)); + } + } + } + + return opts; +} + +exports.createWrapper = (binding) => { + return { + writeSnapshot(dir, snapshot, opts) { + return binding.writeSnapshot( + path.resolve(dir), + path.resolve(snapshot), + normalizeOptions(dir, opts), + ); + }, + getEventsSince(dir, snapshot, opts) { + return binding.getEventsSince( + path.resolve(dir), + path.resolve(snapshot), + normalizeOptions(dir, opts), + ); + }, + async subscribe(dir, fn, opts) { + dir = path.resolve(dir); + opts = normalizeOptions(dir, opts); + await binding.subscribe(dir, fn, opts); + + return { + unsubscribe() { + return binding.unsubscribe(dir, fn, opts); + }, + }; + }, + unsubscribe(dir, fn, opts) { + return binding.unsubscribe( + path.resolve(dir), + fn, + normalizeOptions(dir, opts), + ); + } + }; +}; diff --git a/node_modules/@tailwindcss/cli/LICENSE b/node_modules/@tailwindcss/cli/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/@tailwindcss/cli/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +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. diff --git a/node_modules/@tailwindcss/cli/README.md b/node_modules/@tailwindcss/cli/README.md new file mode 100644 index 0000000..95ec9d8 --- /dev/null +++ b/node_modules/@tailwindcss/cli/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/node_modules/@tailwindcss/cli/dist/index.mjs b/node_modules/@tailwindcss/cli/dist/index.mjs new file mode 100644 index 0000000..d7cba08 --- /dev/null +++ b/node_modules/@tailwindcss/cli/dist/index.mjs @@ -0,0 +1,9 @@ +#!/usr/bin/env node +var se=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),le=e=>{throw TypeError(e)};var q=(e,t,n)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&le("Object expected");var i,o;n&&(i=t[se("asyncDispose")]),i===void 0&&(i=t[se("dispose")],n&&(o=i)),typeof i!="function"&&le("Object not disposable"),o&&(i=function(){try{o.call(this)}catch(r){return Promise.reject(r)}}),e.push([n,i,t])}else n&&e.push([n]);return t},K=(e,t,n)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(u,s,l,p){return p=Error(l),p.name="SuppressedError",p.error=u,p.suppressed=s,p},o=u=>t=n?new i(u,t,"An error was suppressed during disposal"):(n=!0,u),r=u=>{for(;u=e.pop();)try{var s=u[1]&&u[1].call(u[2]);if(u[0])return Promise.resolve(s).then(r,l=>(o(l),r()))}catch(l){o(l)}if(n)throw t};return r()};import Ae from"mri";function ue(e,t=process.argv.slice(2)){for(let[o,r]of t.entries())r==="-"&&(t[o]="__IO_DEFAULT_VALUE__");let n=Ae(t);for(let o in n)n[o]==="__IO_DEFAULT_VALUE__"&&(n[o]="-");let i={_:n._};for(let[o,{type:r,alias:u,default:s=r==="boolean"?!1:null}]of Object.entries(e)){if(i[o]=s,u){let l=u.slice(1);n[l]!==void 0&&(i[o]=ae(n[l],r))}{let l=o.slice(2);n[l]!==void 0&&(i[o]=ae(n[l],r))}}return i}function ae(e,t){switch(t){case"string":return W(e);case"boolean":return O(e);case"number":return R(e);case"boolean | string":return O(e)??W(e);case"number | string":return R(e)??W(e);case"boolean | number":return O(e)??R(e);case"boolean | number | string":return O(e)??R(e)??W(e);default:throw new Error(`Unhandled type: ${t}`)}}function O(e){if(e===!0||e===!1)return e;if(e==="true")return!0;if(e==="false")return!1}function R(e){if(typeof e=="number")return e;{let t=Number(e);if(!Number.isNaN(t))return t}}function W(e){return`${e}`}import De from"@parcel/watcher";import{compile as Ne,env as Ee,Instrumentation as me,optimize as Ue,toSourceMap as he}from"@tailwindcss/node";import{clearRequireCache as Le}from"@tailwindcss/node/require-cache";import{Scanner as je}from"@tailwindcss/oxide";import{existsSync as Ie}from"fs";import X from"fs/promises";import C from"path";var A=class{#e=new Set([]);queueMacrotask(t){let n=setTimeout(t,0);return this.add(()=>{clearTimeout(n)})}add(t){return this.#e.add(t),()=>{this.#e.delete(t),t()}}async dispose(){for(let t of this.#e)await t();this.#e.clear()}};import Oe from"fs";import de from"path";import{stripVTControlCharacters as Re}from"util";import w from"picocolors";import pe from"enhanced-resolve";import Fe from"fs";import{createRequire as Me}from"module";var Be=Me(import.meta.url).resolve;function ce(e){if(typeof globalThis.__tw_resolve=="function"){let t=globalThis.__tw_resolve(e);if(t)return t}return Be(e)}var He=pe.ResolverFactory.createResolver({fileSystem:new pe.CachedInputFileSystem(Fe,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"]});function fe(e){let t=typeof e=="number"?BigInt(e):e;return t<1000n?`${t}ns`:(t/=1000n,t<1000n?`${t}\xB5s`:(t/=1000n,t<1000n?`${t}ms`:(t/=1000n,t<60n?`${t}s`:(t/=60n,t<60n?`${t}m`:(t/=60n,t<24n?`${t}h`:(t/=24n,`${t}d`))))))}var z={indent:2};function D(){return`${w.italic(w.bold(w.blue("\u2248")))} tailwindcss ${w.blue(`v${We()}`)}`}function k(e){return`${w.dim(w.blue("`"))}${w.blue(e)}${w.dim(w.blue("`"))}`}function N(e,t=process.cwd(),{preferAbsoluteIfShorter:n=!0}={}){let i=de.relative(t,e);return i.startsWith("..")||(i=`.${de.sep}${i}`),n&&i.length>e.length?e:i}function G(e,t){let n=e.split(" "),i=[],o="",r=0;for(let u of n){let s=Re(u).length;r+s+1>t&&(i.push(o),o="",r=0),o+=(r?" ":"")+u,r+=s+(r?1:0)}return r&&i.push(o),i}function E(e){let t=fe(e);return e<=50*1e6?w.green(t):e<=300*1e6?w.blue(t):e<=1e3*1e6?w.yellow(t):w.red(t)}function F(e,t=0){return`${" ".repeat(t+z.indent)}${e}`}function g(e=""){process.stderr.write(`${e} +`)}function h(e=""){process.stdout.write(`${e} +`)}function We(){if(typeof globalThis.__tw_version=="string")return globalThis.__tw_version;let{version:e}=JSON.parse(Oe.readFileSync(ce("tailwindcss/package.json"),"utf-8"));return e}import J from"fs/promises";import ze from"path";function Q(){return new Promise((e,t)=>{let n="";process.stdin.on("data",i=>{n+=i}),process.stdin.on("end",()=>e(n)),process.stdin.on("error",i=>t(i))})}async function Y(e,t){try{if(await J.readFile(e,"utf8")===t)return}catch{}await J.mkdir(ze.dirname(e),{recursive:!0}),await J.writeFile(e,t,"utf8")}var ye=String.raw,a=Ee.DEBUG;function U(){return{"--input":{type:"string",description:"Input file",alias:"-i"},"--output":{type:"string",description:"Output file",alias:"-o",default:"-"},"--watch":{type:"boolean | string",description:"Watch for changes and rebuild as needed, and use `always` to keep watching when stdin is closed",alias:"-w",values:["always"]},"--minify":{type:"boolean",description:"Optimize and minify the output",alias:"-m"},"--optimize":{type:"boolean",description:"Optimize the output without minifying"},"--cwd":{type:"string",description:"The current working directory",default:"."},"--map":{type:"boolean | string",description:"Generate a source map",default:!1}}}async function H(e){try{return await e()}catch(t){t instanceof Error&&g(t.toString()),process.exit(1)}}async function ge(e){var ne=[];try{g(D());g();let t=q(ne,new me);a&&t.start("[@tailwindcss/cli] (initial build)");let n=C.resolve(e["--cwd"]);e["--output"]&&e["--output"]!=="-"&&(e["--output"]=C.resolve(n,e["--output"]));e["--input"]&&e["--input"]!=="-"&&(e["--input"]=C.resolve(n,e["--input"]),Ie(e["--input"])||(g(`Specified input file ${k(N(e["--input"]))} does not exist.`),process.exit(1)));e["--input"]===e["--output"]&&e["--input"]!=="-"&&(g(`Specified input file ${k(N(e["--input"]))} and output file ${k(N(e["--output"]))} are identical.`),process.exit(1));e["--map"]==="-"&&(g("Use --map without a value to inline the source map"),process.exit(1));e["--map"]&&e["--map"]!==!0&&(e["--map"]=C.resolve(n,e["--map"]));let i=process.hrtime.bigint();let o=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye` + @import 'tailwindcss'; + `;let r={css:"",optimizedCss:""};async function u(S,x,f,b){let $=S;if(f["--minify"]||f["--optimize"])if(S!==r.css){a&&b.start("Optimize CSS");let T=Ue(S,{file:f["--input"]??"input.css",minify:f["--minify"]??!1,map:x?.raw??void 0});a&&b.end("Optimize CSS"),r.css=S,r.optimizedCss=T.code,T.map&&(x=he(T.map)),$=T.code}else $=r.optimizedCss;x&&(f["--map"]===!0?($+=` +`,$+=x.inline):typeof f["--map"]=="string"&&(a&&b.start("Write source map"),await Y(f["--map"],x.raw),a&&b.end("Write source map"))),a&&b.start("Write output"),f["--output"]&&f["--output"]!=="-"?await Y(f["--output"],$):h($),a&&b.end("Write output")}let s=e["--input"]&&e["--input"]!=="-"?C.resolve(e["--input"]):null;let l=s?C.dirname(s):process.cwd();let p=s?[s]:[];async function m(S,x){a&&x.start("Setup compiler");let f=await Ne(S,{from:e["--output"]?s??"stdin.css":void 0,base:l,onDependency(T){p.push(T)}}),b=(f.root==="none"?[]:f.root===null?[{base:n,pattern:"**/*",negated:!1}]:[{...f.root,negated:!1}]).concat(f.sources),$=new je({sources:b});return a&&x.end("Setup compiler"),[f,$]}let[d,y]=await H(()=>m(o,t));if(e["--watch"]){let S=await we(be(y),async function x(f){try{var b=[];try{if(f.length===1&&f[0]===e["--output"])return;let c=q(b,new me);a&&c.start("[@tailwindcss/cli] (watcher)");let ie=process.hrtime.bigint();let re=[];let j="incremental";let oe=p;for(let _ of f){if(oe.includes(_)){j="full";break}re.push({file:_,extension:C.extname(_).slice(1)})}let I="";let P=null;if(j==="full"){let _=e["--input"]?e["--input"]==="-"?await Q():await X.readFile(e["--input"],"utf-8"):ye` + @import 'tailwindcss'; + `;Le(oe),p=s?[s]:[],[d,y]=await m(_,c),a&&c.start("Scan for candidates");let V=y.scan();a&&c.end("Scan for candidates"),a&&c.start("Setup new watchers");let ke=await we(be(y),x);a&&c.end("Setup new watchers"),a&&c.start("Cleanup old watchers"),await S(),a&&c.end("Cleanup old watchers"),S=ke,a&&c.start("Build CSS"),I=d.build(V),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),P=d.buildSourceMap(),a&&c.end("Build Source Map"))}else if(j==="incremental"){a&&c.start("Scan for candidates");let _=y.scanFiles(re);if(a&&c.end("Scan for candidates"),_.length<=0){let V=process.hrtime.bigint();g(`Done in ${E(V-ie)}`);return}a&&c.start("Build CSS"),I=d.build(_),a&&c.end("Build CSS"),e["--map"]&&(a&&c.start("Build Source Map"),P=d.buildSourceMap(),a&&c.end("Build Source Map"))}await u(I,P,e,c);let Ce=process.hrtime.bigint();g(`Done in ${E(Ce-ie)}`)}catch($){var T=$,ve=!0}finally{K(b,T,ve)}}catch(c){c instanceof Error&&g(c.toString())}});e["--watch"]!=="always"&&process.stdin.on("end",()=>{S().then(()=>process.exit(0),()=>process.exit(1))}),process.stdin.resume()}a&&t.start("Scan for candidates");let L=y.scan();a&&t.end("Scan for candidates");a&&t.start("Build CSS");let M=await H(()=>d.build(L));a&&t.end("Build CSS");let B=null;e["--map"]&&(a&&t.start("Build Source Map"),B=await H(()=>he(d.buildSourceMap())),a&&t.end("Build Source Map"));await u(M,B,e,t);let xe=process.hrtime.bigint();g(`Done in ${E(xe-i)}`)}catch($e){var Te=$e,_e=!0}finally{K(ne,Te,_e)}}async function we(e,t){e=e.sort((s,l)=>s.length-l.length);let n=[];for(let s=0;s!n.includes(s));let i=new A,o=new Set,r=new A;async function u(){await r.dispose(),r.queueMacrotask(()=>{t(Array.from(o)),o.clear()})}for(let s of e){let{unsubscribe:l}=await De.subscribe(s,async(p,m)=>{if(p){console.error(p);return}await Promise.all(m.map(async d=>{if(d.type==="delete")return;let y=null;try{y=await X.lstat(d.path)}catch{}!y?.isFile()&&!y?.isSymbolicLink()||o.add(d.path)})),await u()});i.add(l)}return async()=>{await i.dispose(),await r.dispose()}}function be(e){return[...new Set(e.normalizedSources.flatMap(t=>t.base))]}import v from"picocolors";function Z({invalid:e,usage:t,options:n}){let i=process.stdout.columns;if(h(D()),e&&(h(),h(`${v.dim("Invalid command:")} ${e}`)),t&&t.length>0){h(),h(v.dim("Usage:"));for(let[o,r]of t.entries()){let u=r.slice(0,r.indexOf("[")),s=r.slice(r.indexOf("["));s=s.replace(/\[.*?\]/g,m=>v.dim(m));let p=G(s,i-z.indent-u.length-1);p.length>1&&o!==0&&h(),h(F(`${u}${p.shift()}`));for(let m of p)h(F(m,u.length))}}if(n){let o=0;for(let{alias:l}of Object.values(n))l&&(o=Math.max(o,l.length));let r=[],u=0;for(let[l,{alias:p,values:m}]of Object.entries(n)){m?.length&&(l+=`[=${m.join(", ")}]`);let d=[p&&`${p.padStart(o)}`,p?l:" ".repeat(o+2)+l].filter(Boolean).join(", ");r.push(d),u=Math.max(u,d.length)}h(),h(v.dim("Options:"));let s=8;for(let{description:l,default:p=null}of Object.values(n)){let m=r.shift(),d=s+(u-m.length),y=2,L=i-m.length-d-y-z.indent,M=G(p!==null?`${l} ${v.dim(`[default:\u202F${k(`${p}`)}]`)}`:l,L);h(F(`${v.blue(m)} ${v.dim(v.gray("\xB7")).repeat(d)} ${M.shift()}`));for(let B of M)h(F(`${" ".repeat(m.length+d+y)}${B}`))}}}var ee={"--help":{type:"boolean",description:"Display usage information",alias:"-h"}},te=ue({...U(),...ee}),Se=te._[0];Se&&(Z({invalid:Se,usage:["tailwindcss [options]"],options:{...U(),...ee}}),process.exit(1));(process.stdout.isTTY&&process.argv[2]===void 0||te["--help"])&&(Z({usage:["tailwindcss [--input input.css] [--output output.css] [--watch] [options\u2026]"],options:{...U(),...ee}}),process.exit(0));ge(te); diff --git a/node_modules/@tailwindcss/cli/package.json b/node_modules/@tailwindcss/cli/package.json new file mode 100644 index 0000000..74f31d3 --- /dev/null +++ b/node_modules/@tailwindcss/cli/package.json @@ -0,0 +1,40 @@ +{ + "name": "@tailwindcss/cli", + "version": "4.1.11", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/@tailwindcss-cli" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "bin": { + "tailwindcss": "./dist/index.mjs" + }, + "exports": { + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "dependencies": { + "@parcel/watcher": "^2.5.1", + "enhanced-resolve": "^5.18.1", + "mri": "^1.2.0", + "picocolors": "^1.1.1", + "@tailwindcss/node": "4.1.11", + "@tailwindcss/oxide": "4.1.11", + "tailwindcss": "4.1.11" + }, + "scripts": { + "lint": "tsc --noEmit", + "build": "tsup-node", + "dev": "pnpm run build -- --watch" + } +} \ No newline at end of file diff --git a/node_modules/@tailwindcss/node/LICENSE b/node_modules/@tailwindcss/node/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/@tailwindcss/node/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +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. diff --git a/node_modules/@tailwindcss/node/README.md b/node_modules/@tailwindcss/node/README.md new file mode 100644 index 0000000..95ec9d8 --- /dev/null +++ b/node_modules/@tailwindcss/node/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts b/node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts new file mode 100644 index 0000000..55f2bad --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts @@ -0,0 +1,5 @@ +import { ResolveHook } from 'node:module'; + +declare let resolve: ResolveHook; + +export { resolve }; diff --git a/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs b/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs new file mode 100644 index 0000000..f9ae108 --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs @@ -0,0 +1 @@ +import{isBuiltin as i}from"module";var o=async(a,e,u)=>{let r=await u(a,e);if(r.url===import.meta.url||i(r.url)||!e.parentURL)return r;let t=new URL(e.parentURL).searchParams.get("id");if(t===null)return r;let l=new URL(r.url);return l.searchParams.set("id",t),{...r,url:`${l}`}};export{o as resolve}; diff --git a/node_modules/@tailwindcss/node/dist/index.d.mts b/node_modules/@tailwindcss/node/dist/index.d.mts new file mode 100644 index 0000000..a41e0a9 --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/index.d.mts @@ -0,0 +1,247 @@ +import { Candidate, Variant } from './candidate'; +import { compileAstNodes } from './compile'; +import { ClassEntry, VariantEntry } from './intellisense'; +import { Theme } from './theme'; +import { Utilities } from './utilities'; +import { Variants } from './variants'; +import * as tailwindcss from 'tailwindcss'; +import { Polyfills, Features } from 'tailwindcss'; +export { Features, Polyfills } from 'tailwindcss'; + +declare const DEBUG: boolean; + +declare const env_DEBUG: typeof DEBUG; +declare namespace env { + export { env_DEBUG as DEBUG }; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + printCandidate(candidate: Candidate): string; + printVariant(variant: Variant): string; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +/** + * Line offset tables are the key to generating our source maps. They allow us + * to store indexes with our AST nodes and later convert them into positions as + * when given the source that the indexes refer to. + */ +/** + * A position in source code + * + * https://tc39.es/ecma426/#sec-position-record-type + */ +interface Position { + /** The line number, one-based */ + line: number; + /** The column/character number, one-based */ + column: number; +} + +interface OriginalPosition extends Position { + source: DecodedSource; +} +/** + * A "decoded" sourcemap + * + * @see https://tc39.es/ecma426/#decoded-source-map-record + */ +interface DecodedSourceMap { + file: string | null; + sources: DecodedSource[]; + mappings: DecodedMapping[]; +} +/** + * A "decoded" source + * + * @see https://tc39.es/ecma426/#decoded-source-record + */ +interface DecodedSource { + url: string | null; + content: string | null; + ignore: boolean; +} +/** + * A "decoded" mapping + * + * @see https://tc39.es/ecma426/#decoded-mapping-record + */ +interface DecodedMapping { + originalPosition: OriginalPosition | null; + generatedPosition: Position; + name: string | null; +} + +/** + * The source code for one or more nodes in the AST + * + * This generally corresponds to a stylesheet + */ +interface Source { + /** + * The path to the file that contains the referenced source code + * + * If this references the *output* source code, this is `null`. + */ + file: string | null; + /** + * The referenced source code + */ + code: string; +} +/** + * The file and offsets within it that this node covers + * + * This can represent either: + * - A location in the original CSS which caused this node to be created + * - A location in the output CSS where this node resides + */ +type SourceLocation = [source: Source, start: number, end: number]; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Comment = { + kind: 'comment'; + value: string; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +type Resolver = (id: string, base: string) => Promise; +interface CompileOptions { + base: string; + from?: string; + onDependency: (path: string) => void; + shouldRewriteUrls?: boolean; + polyfills?: Polyfills; + customCssResolver?: Resolver; + customJsResolver?: Resolver; +} +declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): AstNode[]; +}>; +declare function compile(css: string, options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): string; + buildSourceMap(): tailwindcss.DecodedSourceMap; +}>; +declare function __unstable__loadDesignSystem(css: string, { base }: { + base: string; +}): Promise; +declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{ + path: string; + base: string; + module: any; +}>; + +declare class Instrumentation implements Disposable { + #private; + private defaultFlush; + constructor(defaultFlush?: (message: string) => undefined); + hit(label: string): void; + start(label: string): void; + end(label: string): void; + reset(): void; + report(flush?: (message: string) => undefined): void; + [Symbol.dispose](): void; +} + +declare function normalizePath(originalPath: string): string; + +interface OptimizeOptions { + /** + * The file being transformed + */ + file?: string; + /** + * Enabled minified output + */ + minify?: boolean; + /** + * The output source map before optimization + * + * If omitted a resulting source map will not be available + */ + map?: string; +} +interface TransformResult { + code: string; + map: string | undefined; +} +declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult; + +interface SourceMap { + readonly raw: string; + readonly inline: string; +} +declare function toSourceMap(map: DecodedSourceMap | string): SourceMap; + +export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap }; diff --git a/node_modules/@tailwindcss/node/dist/index.d.ts b/node_modules/@tailwindcss/node/dist/index.d.ts new file mode 100644 index 0000000..a41e0a9 --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/index.d.ts @@ -0,0 +1,247 @@ +import { Candidate, Variant } from './candidate'; +import { compileAstNodes } from './compile'; +import { ClassEntry, VariantEntry } from './intellisense'; +import { Theme } from './theme'; +import { Utilities } from './utilities'; +import { Variants } from './variants'; +import * as tailwindcss from 'tailwindcss'; +import { Polyfills, Features } from 'tailwindcss'; +export { Features, Polyfills } from 'tailwindcss'; + +declare const DEBUG: boolean; + +declare const env_DEBUG: typeof DEBUG; +declare namespace env { + export { env_DEBUG as DEBUG }; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + printCandidate(candidate: Candidate): string; + printVariant(variant: Variant): string; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +/** + * Line offset tables are the key to generating our source maps. They allow us + * to store indexes with our AST nodes and later convert them into positions as + * when given the source that the indexes refer to. + */ +/** + * A position in source code + * + * https://tc39.es/ecma426/#sec-position-record-type + */ +interface Position { + /** The line number, one-based */ + line: number; + /** The column/character number, one-based */ + column: number; +} + +interface OriginalPosition extends Position { + source: DecodedSource; +} +/** + * A "decoded" sourcemap + * + * @see https://tc39.es/ecma426/#decoded-source-map-record + */ +interface DecodedSourceMap { + file: string | null; + sources: DecodedSource[]; + mappings: DecodedMapping[]; +} +/** + * A "decoded" source + * + * @see https://tc39.es/ecma426/#decoded-source-record + */ +interface DecodedSource { + url: string | null; + content: string | null; + ignore: boolean; +} +/** + * A "decoded" mapping + * + * @see https://tc39.es/ecma426/#decoded-mapping-record + */ +interface DecodedMapping { + originalPosition: OriginalPosition | null; + generatedPosition: Position; + name: string | null; +} + +/** + * The source code for one or more nodes in the AST + * + * This generally corresponds to a stylesheet + */ +interface Source { + /** + * The path to the file that contains the referenced source code + * + * If this references the *output* source code, this is `null`. + */ + file: string | null; + /** + * The referenced source code + */ + code: string; +} +/** + * The file and offsets within it that this node covers + * + * This can represent either: + * - A location in the original CSS which caused this node to be created + * - A location in the output CSS where this node resides + */ +type SourceLocation = [source: Source, start: number, end: number]; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Comment = { + kind: 'comment'; + value: string; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +type Resolver = (id: string, base: string) => Promise; +interface CompileOptions { + base: string; + from?: string; + onDependency: (path: string) => void; + shouldRewriteUrls?: boolean; + polyfills?: Polyfills; + customCssResolver?: Resolver; + customJsResolver?: Resolver; +} +declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): AstNode[]; +}>; +declare function compile(css: string, options: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: "none" | { + base: string; + pattern: string; + } | null; + features: Features; + build(candidates: string[]): string; + buildSourceMap(): tailwindcss.DecodedSourceMap; +}>; +declare function __unstable__loadDesignSystem(css: string, { base }: { + base: string; +}): Promise; +declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{ + path: string; + base: string; + module: any; +}>; + +declare class Instrumentation implements Disposable { + #private; + private defaultFlush; + constructor(defaultFlush?: (message: string) => undefined); + hit(label: string): void; + start(label: string): void; + end(label: string): void; + reset(): void; + report(flush?: (message: string) => undefined): void; + [Symbol.dispose](): void; +} + +declare function normalizePath(originalPath: string): string; + +interface OptimizeOptions { + /** + * The file being transformed + */ + file?: string; + /** + * Enabled minified output + */ + minify?: boolean; + /** + * The output source map before optimization + * + * If omitted a resulting source map will not be available + */ + map?: string; +} +interface TransformResult { + code: string; + map: string | undefined; +} +declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult; + +interface SourceMap { + readonly raw: string; + readonly inline: string; +} +declare function toSourceMap(map: DecodedSourceMap | string): SourceMap; + +export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap }; diff --git a/node_modules/@tailwindcss/node/dist/index.js b/node_modules/@tailwindcss/node/dist/index.js new file mode 100644 index 0000000..8e40cfd --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/index.js @@ -0,0 +1,16 @@ +"use strict";var Ct=Object.create;var Q=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var St=Object.getOwnPropertyNames;var Nt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var Oe=(e,r)=>{for(var t in r)Q(e,t,{get:r[t],enumerable:!0})},_e=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of St(r))!Et.call(e,n)&&n!==t&&Q(e,n,{get:()=>r[n],enumerable:!(i=$t(r,n))||i.enumerable});return e};var x=(e,r,t)=>(t=e!=null?Ct(Nt(e)):{},_e(r||!e||!e.__esModule?Q(t,"default",{value:e,enumerable:!0}):t,e)),Vt=e=>_e(Q({},"__esModule",{value:!0}),e);var Br={};Oe(Br,{Features:()=>V.Features,Instrumentation:()=>Pe,Polyfills:()=>V.Polyfills,__unstable__loadDesignSystem:()=>Ur,compile:()=>Dr,compileAst:()=>_r,env:()=>X,loadModule:()=>Te,normalizePath:()=>ue,optimize:()=>jr,toSourceMap:()=>Wr});module.exports=Vt(Br);var xt=x(require("module")),At=require("url");var X={};Oe(X,{DEBUG:()=>pe});var pe=Tt(process.env.DEBUG);function Tt(e){if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}var L=x(require("enhanced-resolve")),mt=require("jiti"),ce=x(require("fs")),Ve=x(require("fs/promises")),M=x(require("path")),Ne=require("url"),V=require("tailwindcss");var ee=x(require("fs/promises")),F=x(require("path")),Rt=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Pt=[".js",".cjs",".mjs"],Ot=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],_t=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Dt(e,r){for(let t of r){let i=`${e}${t}`;if((await ee.default.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await ee.default.access(i).then(()=>!0,()=>!1))return i}return null}async function De(e,r,t,i){let n=Pt.includes(i)?Ot:_t,l=await Dt(F.default.resolve(t,r),n);if(l===null||e.has(l))return;e.add(l),t=F.default.dirname(l),i=F.default.extname(l);let o=await ee.default.readFile(l,"utf-8"),s=[];for(let a of Rt)for(let u of o.matchAll(a))u[1].startsWith(".")&&s.push(De(e,u[1],t,i));await Promise.all(s)}async function Ue(e){let r=new Set;return await De(r,e,F.default.dirname(e),F.default.extname(e)),Array.from(r)}var $e=x(require("path"));function de(e){return{kind:"word",value:e}}function Ut(e,r){return{kind:"function",value:e,nodes:r}}function Kt(e){return{kind:"separator",value:e}}function T(e,r,t=null){for(let i=0;i0){let c=de(n);i?i.nodes.push(c):r.push(c),n=""}let a=o,u=o+1;for(;u0){let u=de(n);a?.nodes.push(u),n=""}t.length>0?i=t[t.length-1]:i=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&r.push(de(n)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var Xr=new Uint8Array(256);var te=new Uint8Array(256);function k(e,r){let t=0,i=[],n=0,l=e.length,o=r.charCodeAt(0);for(let s=0;s0&&a===te[t-1]&&t--;break}}return i.push(e.slice(n)),i}var si=new g(e=>{let r=A(e),t=new Set;return T(r,(i,{parent:n})=>{let l=n===null?r:n.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let o=l.indexOf(i)??-1;if(o===-1)return;let s=l[o-1];if(s?.kind!=="separator"||s.value!==" ")return;let a=l[o+1];if(a?.kind!=="separator"||a.value!==" ")return;t.add(s),t.add(a)}else i.kind==="separator"&&i.value.trim()==="/"?i.value="/":i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(l[0]===i||l[l.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&T(r,(i,{replaceWith:n})=>{t.has(i)&&(t.delete(i),n([]))}),me(r),E(r)});var ui=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?E(r[2].nodes):e});function me(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=B(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=B(r.value);for(let t=0;t{let r=A(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function jt(e){throw new Error(`Unexpected value: ${e}`)}function B(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var R=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,ki=new RegExp(`^${R.source}$`);var yi=new RegExp(`^${R.source}%$`);var bi=new RegExp(`^${R.source}s*/s*${R.source}$`);var Mt=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],xi=new RegExp(`^${R.source}(${Mt.join("|")})$`);var Wt=["deg","rad","grad","turn"],Ai=new RegExp(`^${R.source}(${Wt.join("|")})$`);var Ci=new RegExp(`^${R.source} +${R.source} +${R.source}$`);function b(e){let r=Number(e);return Number.isInteger(r)&&r>=0&&String(r)===String(e)}function H(e,r){if(r===null)return e;let t=Number(r);return Number.isNaN(t)||(r=`${t*100}%`),r==="100%"?e:`color-mix(in oklab, ${e} ${r}, transparent)`}var Gt={"--alpha":qt,"--spacing":Jt,"--theme":Yt,theme:Zt};function qt(e,r,t,...i){let[n,l]=k(t,"/").map(o=>o.trim());if(!n||!l)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);if(i.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);return H(n,l)}function Jt(e,r,t,...i){if(!t)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(i.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${i.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${t})`}function Yt(e,r,t,...i){if(!t.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;t.endsWith(" inline")&&(n=!0,t=t.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let l=e.resolveThemeValue(t,n);if(!l){if(i.length>0)return i.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(i.length===0)return l;let o=i.join(", ");if(o==="initial")return l;if(l==="initial")return o;if(l.startsWith("var(")||l.startsWith("theme(")||l.startsWith("--theme(")){let s=A(l);return Xt(s,o),E(s)}return l}function Zt(e,r,t,...i){t=Qt(t);let n=e.resolveThemeValue(t);if(!n&&i.length>0)return i.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Mi=new RegExp(Object.keys(Gt).map(e=>`${e}\\(`).join("|"));function Qt(e){if(e[0]!=="'"&&e[0]!=='"')return e;let r="",t=e[0];for(let i=1;i{if(t.kind==="function"&&!(t.value!=="var"&&t.value!=="theme"&&t.value!=="--theme"))if(t.nodes.length===1)t.nodes.push({kind:"word",value:`, ${r}`});else{let i=t.nodes[t.nodes.length-1];i.kind==="word"&&i.value==="initial"&&(i.value=r)}})}var q=92,ie=47,ne=42,Ze=34,Qe=39,or=58,le=59,$=10,ae=13,J=32,oe=9,Xe=123,we=125,be=40,et=41,lr=91,ar=93,tt=45,ke=64,sr=33;function Z(e,r){let t=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let i=[],n=[],l=[],o=null,s=null,a="",u="",p=0,c;for(let f=0;f0&&e[v]===d[d.length-1]&&(d=d.slice(0,-1));let W=ye(a,h);if(!W)throw new Error("Invalid custom property, expected a value");t&&(W.src=[t,N,f],W.dst=[t,N,f]),o?o.nodes.push(W):i.push(W),a=""}else if(m===le&&a.charCodeAt(0)===ke)s=Y(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else if(m===le&&u[u.length-1]!==")"){let d=ye(a);if(!d)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);t&&(d.src=[t,p,f],d.dst=[t,p,f]),o?o.nodes.push(d):i.push(d),a=""}else if(m===Xe&&u[u.length-1]!==")")u+="}",s=O(a.trim()),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o&&o.nodes.push(s),l.push(o),o=s,a="",s=null;else if(m===we&&u[u.length-1]!==")"){if(u==="")throw new Error("Missing opening {");if(u=u.slice(0,-1),a.length>0)if(a.charCodeAt(0)===ke)s=Y(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else{let N=a.indexOf(":");if(o){let h=ye(a,N);if(!h)throw new Error(`Invalid declaration: \`${a.trim()}\``);t&&(h.src=[t,p,f],h.dst=[t,p,f]),o.nodes.push(h)}}let d=l.pop()??null;d===null&&o&&i.push(o),o=d,a="",s=null}else if(m===be)u+=")",a+="(";else if(m===et){if(u[u.length-1]!==")")throw new Error("Missing opening (");u=u.slice(0,-1),a+=")"}else{if(a.length===0&&(m===J||m===$||m===oe))continue;a===""&&(p=f),a+=String.fromCharCode(m)}}}if(a.charCodeAt(0)===ke){let f=Y(a);t&&(f.src=[t,p,e.length],f.dst=[t,p,e.length]),i.push(f)}if(u.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(i):i}function Y(e,r=[]){let t=e,i="";for(let n=5;n{if(b(e.value))return e.value}),w=K(e=>{if(b(e.value))return`${e.value}%`}),_=K(e=>{if(b(e.value))return`${e.value}px`}),nt=K(e=>{if(b(e.value))return`${e.value}ms`}),se=K(e=>{if(b(e.value))return`${e.value}deg`}),hr=K(e=>{if(e.fraction===null)return;let[r,t]=k(e.fraction,"/");if(!(!b(r)||!b(t)))return e.fraction}),ot=K(e=>{if(b(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),vr={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...hr},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...w}),backdropContrast:({theme:e})=>({...e("contrast"),...w}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...w}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...se}),backdropInvert:({theme:e})=>({...e("invert"),...w}),backdropOpacity:({theme:e})=>({...e("opacity"),...w}),backdropSaturate:({theme:e})=>({...e("saturate"),...w}),backdropSepia:({theme:e})=>({...e("sepia"),...w}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",..._},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...w},caretColor:({theme:e})=>e("colors"),colors:()=>({...Ce}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...S},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...w},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),..._}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...S},flexShrink:{0:"0",DEFAULT:"1",...S},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...w},grayscale:{0:"0",DEFAULT:"100%",...w},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...S},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ot},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ot},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...se},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...w},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...S},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...w},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...S},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...se},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...w},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...w},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...w},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...se},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...S},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",..._},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...nt},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...nt},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...S}};var wr=64;function z(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function C(e,r="",t=[]){return{kind:"at-rule",name:e,params:r,nodes:t}}function O(e,r=[]){return e.charCodeAt(0)===wr?Y(e,r):z(e,r)}function P(e,r,t=!1){return{kind:"declaration",property:e,value:r,important:t}}function Ae(e){return{kind:"comment",value:e}}function y(e,r,t=[],i={}){for(let n=0;n4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var l=e.split(/[/\\]+/);return r!==!1&&l[l.length-1]===""&&l.pop(),i+l.join("/")}function ue(e){let r=kr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Se=/(?[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?\w[^,]+))?(?:,|$)/g,$r=/(?br.test(e),Er=e=>xr.test(e);async function at({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=Z(e),n=[];function l(o){if(o[0]==="/")return o;let s=$e.posix.join(ue(r),o),a=$e.posix.relative(ue(t),s);return a.startsWith(".")||(a="./"+a),a}return y(i,o=>{if(o.kind!=="declaration"||!o.value)return;let s=Se.test(o.value),a=lt.test(o.value);if(s||a){let u=a?Vr:st;n.push(u(o.value,l).then(p=>{o.value=p}))}}),n.length&&await Promise.all(n),j(i)}function st(e,r){return ct(e,Se,async t=>{let[i,n]=t;return await ut(n.trim(),i,r)})}async function Vr(e,r){return await ct(e,lt,async t=>{let[,i]=t;return await Rr(i,async({url:l})=>Se.test(l)?await st(l,r):yr.test(l)?l:await ut(l,l,r))})}async function ut(e,r,t,i="url"){let n="",l=e[0];if((l==='"'||l==="'")&&(n=l,e=e.slice(1,-1)),Tr(e))return r;let o=await t(e);return n===""&&o!==encodeURI(o)&&(n='"'),n==="'"&&o.includes("'")&&(n='"'),n==='"'&&o.includes('"')&&(o=o.replace($r,'\\"')),`${i}(${n}${o}${n})`}function Tr(e,r){return Er(e)||Nr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||Ar.test(e)}function Rr(e,r){return Promise.all(Pr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Or)}function Pr(e){let r=e.trim().replace(Sr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(Cr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Or(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function ct(e,r,t){let i,n=e,l="";for(;i=r.exec(n);)l+=n.slice(0,i.index),l+=await t(i),n=n.slice(i.index+i[0].length);return l+=n,l}var zr={};function gt({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:n,customCssResolver:l,customJsResolver:o}){return{base:e,polyfills:t,from:r,async loadModule(s,a){return Te(s,a,i,o)},async loadStylesheet(s,a){let u=await vt(s,a,i,l);return n&&(u.content=await at({css:u.content,root:e,base:u.base})),u}}}async function ht(e,r){if(e.root&&e.root!=="none"){let t=/[*{]/,i=[];for(let l of e.root.pattern.split("/")){if(t.test(l))break;i.push(l)}if(!await Ve.default.stat(M.default.resolve(r,i.join("/"))).then(l=>l.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist`)}}async function _r(e,r){let t=await(0,V.compileAst)(e,gt(r));return await ht(t,r.base),t}async function Dr(e,r){let t=await(0,V.compile)(e,gt(r));return await ht(t,r.base),t}async function Ur(e,{base:r}){return(0,V.__unstable__loadDesignSystem)(e,{base:r,async loadModule(t,i){return Te(t,i,()=>{})},async loadStylesheet(t,i){return vt(t,i,()=>{})}})}async function Te(e,r,t,i){if(e[0]!=="."){let s=await dt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let a=await pt((0,Ne.pathToFileURL)(s).href);return{path:s,base:M.default.dirname(s),module:a.default??a}}let n=await dt(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);let[l,o]=await Promise.all([pt((0,Ne.pathToFileURL)(n).href+"?id="+Date.now()),Ue(n)]);for(let s of o)t(s);return{path:n,base:M.default.dirname(n),module:l.default??l}}async function vt(e,r,t,i){let n=await Lr(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);if(t(n),typeof globalThis.__tw_readFile=="function"){let o=await globalThis.__tw_readFile(n,"utf-8");if(o)return{path:n,base:M.default.dirname(n),content:o}}let l=await Ve.default.readFile(n,"utf-8");return{path:n,base:M.default.dirname(n),content:l}}var ft=null;async function pt(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return ft??=(0,mt.createJiti)(zr.url,{moduleCache:!1,fsCache:!1}),await ft.import(e)}}var Re=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],Kr=L.default.ResolverFactory.createResolver({fileSystem:new L.default.CachedInputFileSystem(ce.default,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:Re});async function Lr(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ee(Kr,e,r)}var Ir=L.default.ResolverFactory.createResolver({fileSystem:new L.default.CachedInputFileSystem(ce.default,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","import"],modules:Re}),Fr=L.default.ResolverFactory.createResolver({fileSystem:new L.default.CachedInputFileSystem(ce.default,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","require"],modules:Re});async function dt(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ee(Ir,e,r).catch(()=>Ee(Fr,e,r))}function Ee(e,r,t){return new Promise((i,n)=>e.resolve({},t,r,{},(l,o)=>{if(l)return n(l);i(o)}))}Symbol.dispose??=Symbol("Symbol.dispose");Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");var Pe=class{constructor(r=t=>void process.stderr.write(`${t} +`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(n=>n.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),n=t-i.value;this.#t.get(i.id).value+=n}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let o=this.#e.length-1;o>=0;o--)this.end(this.#e[o].label);for(let[o,{value:s}]of this.#r.entries()){if(this.#t.has(o))continue;t.length===0&&(i=!0,t.push("Hits:"));let a=o.split("//").length;t.push(`${" ".repeat(a)}${o} ${fe(wt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(` +Timers:`);let n=-1/0,l=new Map;for(let[o,{value:s}]of this.#t){let a=`${(Number(s)/1e6).toFixed(2)}ms`;l.set(o,a),n=Math.max(n,a.length)}for(let o of this.#t.keys()){let s=o.split("//").length;t.push(`${fe(`[${l.get(o).padStart(n," ")}]`)}${" ".repeat(s-1)}${s===1?" ":fe(" \u21B3 ")}${o.split("//").pop()} ${this.#r.get(o).value===1?"":fe(wt(`\xD7 ${this.#r.get(o).value}`))}`.trimEnd())}r(` +${t.join(` +`)} +`),this.reset()}[Symbol.dispose](){pe&&this.report()}};function fe(e){return`\x1B[2m${e}\x1B[22m`}function wt(e){return`\x1B[34m${e}\x1B[39m`}var kt=x(require("@ampproject/remapping")),D=require("lightningcss"),yt=x(require("magic-string"));function jr(e,{file:r="input.css",minify:t=!1,map:i}={}){function n(a,u){return(0,D.transform)({filename:r,code:a,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:D.Features.Nesting|D.Features.MediaQueries,exclude:D.Features.LogicalProperties|D.Features.DirSelector|D.Features.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let l=n(Buffer.from(e),i);i=l.map?.toString(),l=n(l.code,i),i=l.map?.toString();let o=l.code.toString(),s=new yt.default(o);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let a=s.generateMap({source:"original",hires:"boundary"}).toString();i=(0,kt.default)([a,i],()=>null).toString()}return o=s.toString(),{code:o,map:i}}var bt=require("source-map-js");function Mr(e){let r=new bt.SourceMapGenerator,t=1,i=new g(n=>({url:n?.url??``,content:n?.content??""}));for(let n of e.mappings){let l=i.get(n.originalPosition?.source??null);r.addMapping({generated:n.generatedPosition,original:n.originalPosition,source:l.url,name:n.name}),r.setSourceContent(l.url,l.content)}return r.toString()}function Wr(e){let r=typeof e=="string"?e:Mr(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */ +`,t}}}process.versions.bun||xt.register?.((0,At.pathToFileURL)(require.resolve("@tailwindcss/node/esm-cache-loader")));0&&(module.exports={Features,Instrumentation,Polyfills,__unstable__loadDesignSystem,compile,compileAst,env,loadModule,normalizePath,optimize,toSourceMap}); diff --git a/node_modules/@tailwindcss/node/dist/index.mjs b/node_modules/@tailwindcss/node/dist/index.mjs new file mode 100644 index 0000000..5af6f35 --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/index.mjs @@ -0,0 +1,16 @@ +var mt=Object.defineProperty;var gt=(e,r)=>{for(var t in r)mt(e,t,{get:r[t],enumerable:!0})};import*as oe from"module";import{pathToFileURL as Or}from"url";var ae={};gt(ae,{DEBUG:()=>le});var le=ht(process.env.DEBUG);function ht(e){if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}import L from"enhanced-resolve";import{createJiti as yr}from"jiti";import $e from"fs";import at from"fs/promises";import G from"path";import{pathToFileURL as it}from"url";import{__unstable__loadDesignSystem as br,compile as xr,compileAst as Ar,Features as ya,Polyfills as ba}from"tailwindcss";import se from"fs/promises";import F from"path";var vt=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],wt=[".js",".cjs",".mjs"],kt=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],yt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function bt(e,r){for(let t of r){let i=`${e}${t}`;if((await se.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await se.access(i).then(()=>!0,()=>!1))return i}return null}async function Ne(e,r,t,i){let n=wt.includes(i)?kt:yt,l=await bt(F.resolve(t,r),n);if(l===null||e.has(l))return;e.add(l),t=F.dirname(l),i=F.extname(l);let o=await se.readFile(l,"utf-8"),s=[];for(let a of vt)for(let u of o.matchAll(a))u[1].startsWith(".")&&s.push(Ne(e,u[1],t,i));await Promise.all(s)}async function Ee(e){let r=new Set;return await Ne(r,e,F.dirname(e),F.extname(e)),Array.from(r)}import*as xe from"path";function ue(e){return{kind:"word",value:e}}function xt(e,r){return{kind:"function",value:e,nodes:r}}function At(e){return{kind:"separator",value:e}}function E(e,r,t=null){for(let i=0;i0){let c=ue(n);i?i.nodes.push(c):r.push(c),n=""}let a=o,u=o+1;for(;u0){let u=ue(n);a?.nodes.push(u),n=""}t.length>0?i=t[t.length-1]:i=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&r.push(ue(n)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var Mr=new Uint8Array(256);var Y=new Uint8Array(256);function k(e,r){let t=0,i=[],n=0,l=e.length,o=r.charCodeAt(0);for(let s=0;s0&&a===Y[t-1]&&t--;break}}return i.push(e.slice(n)),i}var Qr=new g(e=>{let r=x(e),t=new Set;return E(r,(i,{parent:n})=>{let l=n===null?r:n.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let o=l.indexOf(i)??-1;if(o===-1)return;let s=l[o-1];if(s?.kind!=="separator"||s.value!==" ")return;let a=l[o+1];if(a?.kind!=="separator"||a.value!==" ")return;t.add(s),t.add(a)}else i.kind==="separator"&&i.value.trim()==="/"?i.value="/":i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(l[0]===i||l[l.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&E(r,(i,{replaceWith:n})=>{t.has(i)&&(t.delete(i),n([]))}),ce(r),N(r)});var Xr=new g(e=>{let r=x(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?N(r[2].nodes):e});function ce(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=z(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=z(r.value);for(let t=0;t{let r=x(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function Et(e){throw new Error(`Unexpected value: ${e}`)}function z(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var V=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,ui=new RegExp(`^${V.source}$`);var ci=new RegExp(`^${V.source}%$`);var fi=new RegExp(`^${V.source}s*/s*${V.source}$`);var Vt=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],pi=new RegExp(`^${V.source}(${Vt.join("|")})$`);var Tt=["deg","rad","grad","turn"],di=new RegExp(`^${V.source}(${Tt.join("|")})$`);var mi=new RegExp(`^${V.source} +${V.source} +${V.source}$`);function b(e){let r=Number(e);return Number.isInteger(r)&&r>=0&&String(r)===String(e)}function j(e,r){if(r===null)return e;let t=Number(r);return Number.isNaN(t)||(r=`${t*100}%`),r==="100%"?e:`color-mix(in oklab, ${e} ${r}, transparent)`}var Ot={"--alpha":_t,"--spacing":Dt,"--theme":Ut,theme:Kt};function _t(e,r,t,...i){let[n,l]=k(t,"/").map(o=>o.trim());if(!n||!l)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);if(i.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${l||"50%"})\``);return j(n,l)}function Dt(e,r,t,...i){if(!t)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(i.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${i.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${t})`}function Ut(e,r,t,...i){if(!t.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;t.endsWith(" inline")&&(n=!0,t=t.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let l=e.resolveThemeValue(t,n);if(!l){if(i.length>0)return i.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(i.length===0)return l;let o=i.join(", ");if(o==="initial")return l;if(l==="initial")return o;if(l.startsWith("var(")||l.startsWith("theme(")||l.startsWith("--theme(")){let s=x(l);return It(s,o),N(s)}return l}function Kt(e,r,t,...i){t=Lt(t);let n=e.resolveThemeValue(t);if(!n&&i.length>0)return i.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${t})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Oi=new RegExp(Object.keys(Ot).map(e=>`${e}\\(`).join("|"));function Lt(e){if(e[0]!=="'"&&e[0]!=='"')return e;let r="",t=e[0];for(let i=1;i{if(t.kind==="function"&&!(t.value!=="var"&&t.value!=="theme"&&t.value!=="--theme"))if(t.nodes.length===1)t.nodes.push({kind:"word",value:`, ${r}`});else{let i=t.nodes[t.nodes.length-1];i.kind==="word"&&i.value==="initial"&&(i.value=r)}})}var W=92,Q=47,X=42,Me=34,We=39,Bt=58,te=59,C=10,re=13,B=32,ee=9,Be=123,me=125,ve=40,He=41,Ht=91,qt=93,qe=45,ge=64,Gt=33;function q(e,r){let t=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let i=[],n=[],l=[],o=null,s=null,a="",u="",p=0,c;for(let f=0;f0&&e[v]===d[d.length-1]&&(d=d.slice(0,-1));let I=he(a,h);if(!I)throw new Error("Invalid custom property, expected a value");t&&(I.src=[t,S,f],I.dst=[t,S,f]),o?o.nodes.push(I):i.push(I),a=""}else if(m===te&&a.charCodeAt(0)===ge)s=H(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else if(m===te&&u[u.length-1]!==")"){let d=he(a);if(!d)throw a.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${a.trim()}\``);t&&(d.src=[t,p,f],d.dst=[t,p,f]),o?o.nodes.push(d):i.push(d),a=""}else if(m===Be&&u[u.length-1]!==")")u+="}",s=R(a.trim()),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o&&o.nodes.push(s),l.push(o),o=s,a="",s=null;else if(m===me&&u[u.length-1]!==")"){if(u==="")throw new Error("Missing opening {");if(u=u.slice(0,-1),a.length>0)if(a.charCodeAt(0)===ge)s=H(a),t&&(s.src=[t,p,f],s.dst=[t,p,f]),o?o.nodes.push(s):i.push(s),a="",s=null;else{let S=a.indexOf(":");if(o){let h=he(a,S);if(!h)throw new Error(`Invalid declaration: \`${a.trim()}\``);t&&(h.src=[t,p,f],h.dst=[t,p,f]),o.nodes.push(h)}}let d=l.pop()??null;d===null&&o&&i.push(o),o=d,a="",s=null}else if(m===ve)u+=")",a+="(";else if(m===He){if(u[u.length-1]!==")")throw new Error("Missing opening (");u=u.slice(0,-1),a+=")"}else{if(a.length===0&&(m===B||m===C||m===ee))continue;a===""&&(p=f),a+=String.fromCharCode(m)}}}if(a.charCodeAt(0)===ge){let f=H(a);t&&(f.src=[t,p,e.length],f.dst=[t,p,e.length]),i.push(f)}if(u.length>0&&o){if(o.kind==="rule")throw new Error(`Missing closing } at ${o.selector}`);if(o.kind==="at-rule")throw new Error(`Missing closing } at ${o.name} ${o.params}`)}return n.length>0?n.concat(i):i}function H(e,r=[]){let t=e,i="";for(let n=5;n{if(b(e.value))return e.value}),w=_(e=>{if(b(e.value))return`${e.value}%`}),P=_(e=>{if(b(e.value))return`${e.value}px`}),Ye=_(e=>{if(b(e.value))return`${e.value}ms`}),ie=_(e=>{if(b(e.value))return`${e.value}deg`}),rr=_(e=>{if(e.fraction===null)return;let[r,t]=k(e.fraction,"/");if(!(!b(r)||!b(t)))return e.fraction}),Ze=_(e=>{if(b(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),ir={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...rr},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...w}),backdropContrast:({theme:e})=>({...e("contrast"),...w}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...w}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...ie}),backdropInvert:({theme:e})=>({...e("invert"),...w}),backdropOpacity:({theme:e})=>({...e("opacity"),...w}),backdropSaturate:({theme:e})=>({...e("saturate"),...w}),backdropSepia:({theme:e})=>({...e("sepia"),...w}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...P},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...w},caretColor:({theme:e})=>e("colors"),colors:()=>({...ye}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...$},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...w},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...P}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...$},flexShrink:{0:"0",DEFAULT:"1",...$},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...w},grayscale:{0:"0",DEFAULT:"100%",...w},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...$},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...Ze},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...Ze},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...ie},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...w},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...$},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...w},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...$},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...ie},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...w},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...w},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...w},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...ie},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...$},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...P},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...Ye},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...Ye},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...$}};var nr=64;function U(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function A(e,r="",t=[]){return{kind:"at-rule",name:e,params:r,nodes:t}}function R(e,r=[]){return e.charCodeAt(0)===nr?H(e,r):U(e,r)}function T(e,r,t=!1){return{kind:"declaration",property:e,value:r,important:t}}function ke(e){return{kind:"comment",value:e}}function y(e,r,t=[],i={}){for(let n=0;n4&&e[3]==="\\"){var n=e[2];(n==="?"||n===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var l=e.split(/[/\\]+/);return r!==!1&&l[l.length-1]===""&&l.pop(),i+l.join("/")}function be(e){let r=or(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Ae=/(?[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?\w[^,]+))?(?:,|$)/g,fr=/(?ar.test(e),mr=e=>sr.test(e);async function Xe({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=q(e),n=[];function l(o){if(o[0]==="/")return o;let s=xe.posix.join(be(r),o),a=xe.posix.relative(be(t),s);return a.startsWith(".")||(a="./"+a),a}return y(i,o=>{if(o.kind!=="declaration"||!o.value)return;let s=Ae.test(o.value),a=Qe.test(o.value);if(s||a){let u=a?gr:et;n.push(u(o.value,l).then(p=>{o.value=p}))}}),n.length&&await Promise.all(n),K(i)}function et(e,r){return rt(e,Ae,async t=>{let[i,n]=t;return await tt(n.trim(),i,r)})}async function gr(e,r){return await rt(e,Qe,async t=>{let[,i]=t;return await vr(i,async({url:l})=>Ae.test(l)?await et(l,r):lr.test(l)?l:await tt(l,l,r))})}async function tt(e,r,t,i="url"){let n="",l=e[0];if((l==='"'||l==="'")&&(n=l,e=e.slice(1,-1)),hr(e))return r;let o=await t(e);return n===""&&o!==encodeURI(o)&&(n='"'),n==="'"&&o.includes("'")&&(n='"'),n==='"'&&o.includes('"')&&(o=o.replace(fr,'\\"')),`${i}(${n}${o}${n})`}function hr(e,r){return mr(e)||dr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||ur.test(e)}function vr(e,r){return Promise.all(wr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(kr)}function wr(e){let r=e.trim().replace(pr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(cr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function kr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function rt(e,r,t){let i,n=e,l="";for(;i=r.exec(n);)l+=n.slice(0,i.index),l+=await t(i),n=n.slice(i.index+i[0].length);return l+=n,l}function st({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:n,customCssResolver:l,customJsResolver:o}){return{base:e,polyfills:t,from:r,async loadModule(s,a){return ct(s,a,i,o)},async loadStylesheet(s,a){let u=await ft(s,a,i,l);return n&&(u.content=await Xe({css:u.content,root:e,base:u.base})),u}}}async function ut(e,r){if(e.root&&e.root!=="none"){let t=/[*{]/,i=[];for(let l of e.root.pattern.split("/")){if(t.test(l))break;i.push(l)}if(!await at.stat(G.resolve(r,i.join("/"))).then(l=>l.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist`)}}async function Ca(e,r){let t=await Ar(e,st(r));return await ut(t,r.base),t}async function $a(e,r){let t=await xr(e,st(r));return await ut(t,r.base),t}async function Sa(e,{base:r}){return br(e,{base:r,async loadModule(t,i){return ct(t,i,()=>{})},async loadStylesheet(t,i){return ft(t,i,()=>{})}})}async function ct(e,r,t,i){if(e[0]!=="."){let s=await lt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let a=await ot(it(s).href);return{path:s,base:G.dirname(s),module:a.default??a}}let n=await lt(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);let[l,o]=await Promise.all([ot(it(n).href+"?id="+Date.now()),Ee(n)]);for(let s of o)t(s);return{path:n,base:G.dirname(n),module:l.default??l}}async function ft(e,r,t,i){let n=await $r(e,r,i);if(!n)throw new Error(`Could not resolve '${e}' from '${r}'`);if(t(n),typeof globalThis.__tw_readFile=="function"){let o=await globalThis.__tw_readFile(n,"utf-8");if(o)return{path:n,base:G.dirname(n),content:o}}let l=await at.readFile(n,"utf-8");return{path:n,base:G.dirname(n),content:l}}var nt=null;async function ot(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return nt??=yr(import.meta.url,{moduleCache:!1,fsCache:!1}),await nt.import(e)}}var Se=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],Cr=L.ResolverFactory.createResolver({fileSystem:new L.CachedInputFileSystem($e,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:Se});async function $r(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ce(Cr,e,r)}var Sr=L.ResolverFactory.createResolver({fileSystem:new L.CachedInputFileSystem($e,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","import"],modules:Se}),Nr=L.ResolverFactory.createResolver({fileSystem:new L.CachedInputFileSystem($e,4e3),useSyncFileSystemCalls:!0,extensions:[".js",".json",".node",".ts"],conditionNames:["node","require"],modules:Se});async function lt(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ce(Sr,e,r).catch(()=>Ce(Nr,e,r))}function Ce(e,r,t){return new Promise((i,n)=>e.resolve({},t,r,{},(l,o)=>{if(l)return n(l);i(o)}))}Symbol.dispose??=Symbol("Symbol.dispose");Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");var pt=class{constructor(r=t=>void process.stderr.write(`${t} +`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(n=>n.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),n=t-i.value;this.#t.get(i.id).value+=n}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let o=this.#e.length-1;o>=0;o--)this.end(this.#e[o].label);for(let[o,{value:s}]of this.#r.entries()){if(this.#t.has(o))continue;t.length===0&&(i=!0,t.push("Hits:"));let a=o.split("//").length;t.push(`${" ".repeat(a)}${o} ${ne(dt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(` +Timers:`);let n=-1/0,l=new Map;for(let[o,{value:s}]of this.#t){let a=`${(Number(s)/1e6).toFixed(2)}ms`;l.set(o,a),n=Math.max(n,a.length)}for(let o of this.#t.keys()){let s=o.split("//").length;t.push(`${ne(`[${l.get(o).padStart(n," ")}]`)}${" ".repeat(s-1)}${s===1?" ":ne(" \u21B3 ")}${o.split("//").pop()} ${this.#r.get(o).value===1?"":ne(dt(`\xD7 ${this.#r.get(o).value}`))}`.trimEnd())}r(` +${t.join(` +`)} +`),this.reset()}[Symbol.dispose](){le&&this.report()}};function ne(e){return`\x1B[2m${e}\x1B[22m`}function dt(e){return`\x1B[34m${e}\x1B[39m`}import Er from"@ampproject/remapping";import{Features as J,transform as Vr}from"lightningcss";import Tr from"magic-string";function Oa(e,{file:r="input.css",minify:t=!1,map:i}={}){function n(a,u){return Vr({filename:r,code:a,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:J.Nesting|J.MediaQueries,exclude:J.LogicalProperties|J.DirSelector|J.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let l=n(Buffer.from(e),i);i=l.map?.toString(),l=n(l.code,i),i=l.map?.toString();let o=l.code.toString(),s=new Tr(o);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let a=s.generateMap({source:"original",hires:"boundary"}).toString();i=Er([a,i],()=>null).toString()}return o=s.toString(),{code:o,map:i}}import{SourceMapGenerator as Rr}from"source-map-js";function Pr(e){let r=new Rr,t=1,i=new g(n=>({url:n?.url??``,content:n?.content??""}));for(let n of e.mappings){let l=i.get(n.originalPosition?.source??null);r.addMapping({generated:n.generatedPosition,original:n.originalPosition,source:l.url,name:n.name}),r.setSourceContent(l.url,l.content)}return r.toString()}function Ka(e){let r=typeof e=="string"?e:Pr(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */ +`,t}}}if(!process.versions.bun){let e=oe.createRequire(import.meta.url);oe.register?.(Or(e.resolve("@tailwindcss/node/esm-cache-loader")))}export{ya as Features,pt as Instrumentation,ba as Polyfills,Sa as __unstable__loadDesignSystem,$a as compile,Ca as compileAst,ae as env,ct as loadModule,be as normalizePath,Oa as optimize,Ka as toSourceMap}; diff --git a/node_modules/@tailwindcss/node/dist/require-cache.d.ts b/node_modules/@tailwindcss/node/dist/require-cache.d.ts new file mode 100644 index 0000000..de970b9 --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/require-cache.d.ts @@ -0,0 +1,3 @@ +declare function clearRequireCache(files: string[]): void; + +export { clearRequireCache }; diff --git a/node_modules/@tailwindcss/node/dist/require-cache.js b/node_modules/@tailwindcss/node/dist/require-cache.js new file mode 100644 index 0000000..398995f --- /dev/null +++ b/node_modules/@tailwindcss/node/dist/require-cache.js @@ -0,0 +1 @@ +"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of f(e))!l.call(r,c)&&c!==t&&i(r,c,{get:()=>e[c],enumerable:!(o=a(e,c))||o.enumerable});return r};var h=r=>u(i({},"__esModule",{value:!0}),r);var d={};n(d,{clearRequireCache:()=>q});module.exports=h(d);function q(r){for(let e of r)delete require.cache[e]}0&&(module.exports={clearRequireCache}); diff --git a/node_modules/@tailwindcss/node/package.json b/node_modules/@tailwindcss/node/package.json new file mode 100644 index 0000000..4b45ce6 --- /dev/null +++ b/node_modules/@tailwindcss/node/package.json @@ -0,0 +1,48 @@ +{ + "name": "@tailwindcss/node", + "version": "4.1.11", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/@tailwindcss-node" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "files": [ + "dist/" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.js" + }, + "./require-cache": { + "types": "./dist/require-cache.d.ts", + "default": "./dist/require-cache.js" + }, + "./esm-cache-loader": { + "types": "./dist/esm-cache.loader.d.mts", + "default": "./dist/esm-cache.loader.mjs" + } + }, + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.11" + }, + "scripts": { + "build": "tsup-node", + "dev": "pnpm run build -- --watch" + } +} \ No newline at end of file diff --git a/node_modules/@tailwindcss/oxide-win32-x64-msvc/LICENSE b/node_modules/@tailwindcss/oxide-win32-x64-msvc/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/@tailwindcss/oxide-win32-x64-msvc/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +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. diff --git a/node_modules/@tailwindcss/oxide-win32-x64-msvc/README.md b/node_modules/@tailwindcss/oxide-win32-x64-msvc/README.md new file mode 100644 index 0000000..bb1c4ac --- /dev/null +++ b/node_modules/@tailwindcss/oxide-win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `@tailwindcss/oxide-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@tailwindcss/oxide` diff --git a/node_modules/@tailwindcss/oxide-win32-x64-msvc/package.json b/node_modules/@tailwindcss/oxide-win32-x64-msvc/package.json new file mode 100644 index 0000000..695c3ee --- /dev/null +++ b/node_modules/@tailwindcss/oxide-win32-x64-msvc/package.json @@ -0,0 +1,27 @@ +{ + "name": "@tailwindcss/oxide-win32-x64-msvc", + "version": "4.1.11", + "repository": { + "type": "git", + "url": "git+https://github.com/tailwindlabs/tailwindcss.git", + "directory": "crates/node/npm/win32-x64-msvc" + }, + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "tailwindcss-oxide.win32-x64-msvc.node", + "files": [ + "tailwindcss-oxide.win32-x64-msvc.node" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node b/node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node new file mode 100644 index 0000000..76b9de0 Binary files /dev/null and b/node_modules/@tailwindcss/oxide-win32-x64-msvc/tailwindcss-oxide.win32-x64-msvc.node differ diff --git a/node_modules/@tailwindcss/oxide/LICENSE b/node_modules/@tailwindcss/oxide/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +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. diff --git a/node_modules/@tailwindcss/oxide/index.d.ts b/node_modules/@tailwindcss/oxide/index.d.ts new file mode 100644 index 0000000..184e089 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/index.d.ts @@ -0,0 +1,48 @@ +/* auto-generated by NAPI-RS */ +/* eslint-disable */ +export declare class Scanner { + constructor(opts: ScannerOptions) + scan(): Array + scanFiles(input: Array): Array + getCandidatesWithPositions(input: ChangedContent): Array + get files(): Array + get globs(): Array + get normalizedSources(): Array +} + +export interface CandidateWithPosition { + /** The candidate string */ + candidate: string + /** The position of the candidate inside the content file */ + position: number +} + +export interface ChangedContent { + /** File path to the changed file */ + file?: string + /** Contents of the changed file */ + content?: string + /** File extension */ + extension: string +} + +export interface GlobEntry { + /** Base path of the glob */ + base: string + /** Glob pattern */ + pattern: string +} + +export interface ScannerOptions { + /** Glob sources */ + sources?: Array +} + +export interface SourceEntry { + /** Base path of the glob */ + base: string + /** Glob pattern */ + pattern: string + /** Negated flag */ + negated: boolean +} diff --git a/node_modules/@tailwindcss/oxide/index.js b/node_modules/@tailwindcss/oxide/index.js new file mode 100644 index 0000000..6fcf962 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/index.js @@ -0,0 +1,377 @@ +// prettier-ignore +/* eslint-disable */ +// @ts-nocheck +/* auto-generated by NAPI-RS */ + +const { createRequire } = require('node:module') +require = createRequire(__filename) + +const { readFileSync } = require('node:fs') +let nativeBinding = null +const loadErrors = [] + +const isMusl = () => { + let musl = false + if (process.platform === 'linux') { + musl = isMuslFromFilesystem() + if (musl === null) { + musl = isMuslFromReport() + } + if (musl === null) { + musl = isMuslFromChildProcess() + } + } + return musl +} + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-') + +const isMuslFromFilesystem = () => { + try { + return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl') + } catch { + return null + } +} + +const isMuslFromReport = () => { + let report = null + if (typeof process.report?.getReport === 'function') { + process.report.excludeNetwork = true + report = process.report.getReport() + } + if (!report) { + return null + } + if (report.header && report.header.glibcVersionRuntime) { + return false + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return true + } + } + return false +} + +const isMuslFromChildProcess = () => { + try { + return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl') + } catch (e) { + // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false + return false + } +} + +function requireNative() { + if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) { + try { + nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH); + } catch (err) { + loadErrors.push(err); + } + } else if (process.platform === 'android') { + if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.android-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-android-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm') { + try { + return require('./tailwindcss-oxide.android-arm-eabi.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-android-arm-eabi') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`)) + } + } else if (process.platform === 'win32') { + if (process.arch === 'x64') { + try { + return require('./tailwindcss-oxide.win32-x64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-win32-x64-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'ia32') { + try { + return require('./tailwindcss-oxide.win32-ia32-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-win32-ia32-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.win32-arm64-msvc.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-win32-arm64-msvc') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`)) + } + } else if (process.platform === 'darwin') { + try { + return require('./tailwindcss-oxide.darwin-universal.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-darwin-universal') + } catch (e) { + loadErrors.push(e) + } + + if (process.arch === 'x64') { + try { + return require('./tailwindcss-oxide.darwin-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-darwin-x64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.darwin-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-darwin-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`)) + } + } else if (process.platform === 'freebsd') { + if (process.arch === 'x64') { + try { + return require('./tailwindcss-oxide.freebsd-x64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-freebsd-x64') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 'arm64') { + try { + return require('./tailwindcss-oxide.freebsd-arm64.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-freebsd-arm64') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`)) + } + } else if (process.platform === 'linux') { + if (process.arch === 'x64') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-x64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-x64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-x64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-x64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'arm64') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-arm64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-arm64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'arm') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-arm-musleabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm-musleabihf') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-arm-gnueabihf.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-arm-gnueabihf') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'riscv64') { + if (isMusl()) { + try { + return require('./tailwindcss-oxide.linux-riscv64-musl.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-riscv64-musl') + } catch (e) { + loadErrors.push(e) + } + + } else { + try { + return require('./tailwindcss-oxide.linux-riscv64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-riscv64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } + } else if (process.arch === 'ppc64') { + try { + return require('./tailwindcss-oxide.linux-ppc64-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-ppc64-gnu') + } catch (e) { + loadErrors.push(e) + } + + } else if (process.arch === 's390x') { + try { + return require('./tailwindcss-oxide.linux-s390x-gnu.node') + } catch (e) { + loadErrors.push(e) + } + try { + return require('@tailwindcss/oxide-linux-s390x-gnu') + } catch (e) { + loadErrors.push(e) + } + + } else { + loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`)) + } + } else { + loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`)) + } +} + +nativeBinding = requireNative() + +if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { + try { + nativeBinding = require('./tailwindcss-oxide.wasi.cjs') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + if (!nativeBinding) { + try { + nativeBinding = require('@tailwindcss/oxide-wasm32-wasi') + } catch (err) { + if (process.env.NAPI_RS_FORCE_WASI) { + loadErrors.push(err) + } + } + } +} + +if (!nativeBinding) { + if (loadErrors.length > 0) { + // TODO Link to documentation with potential fixes + // - The package owner could build/publish bindings for this arch + // - The user may need to bundle the correct files + // - The user may need to re-install node_modules to get new packages + throw new Error('Failed to load native binding', { cause: loadErrors }) + } + throw new Error(`Failed to load native binding`) +} + +module.exports.Scanner = nativeBinding.Scanner diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/LICENSE b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/README.md b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/README.md new file mode 100644 index 0000000..23212fd --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/README.md @@ -0,0 +1,163 @@ +# detect-libc + +Node.js module to detect details of the C standard library (libc) +implementation provided by a given Linux system. + +Currently supports detection of GNU glibc and MUSL libc. + +Provides asychronous and synchronous functions for the +family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`). + +The version numbers of libc implementations +are not guaranteed to be semver-compliant. + +For previous v1.x releases, please see the +[v1](https://github.com/lovell/detect-libc/tree/v1) branch. + +## Install + +```sh +npm install detect-libc +``` + +## API + +### GLIBC + +```ts +const GLIBC: string = 'glibc'; +``` + +A String constant containing the value `glibc`. + +### MUSL + +```ts +const MUSL: string = 'musl'; +``` + +A String constant containing the value `musl`. + +### family + +```ts +function family(): Promise; +``` + +Resolves asychronously with: + +* `glibc` or `musl` when the libc family can be determined +* `null` when the libc family cannot be determined +* `null` when run on a non-Linux platform + +```js +const { family, GLIBC, MUSL } = require('detect-libc'); + +switch (await family()) { + case GLIBC: ... + case MUSL: ... + case null: ... +} +``` + +### familySync + +```ts +function familySync(): string | null; +``` + +Synchronous version of `family()`. + +```js +const { familySync, GLIBC, MUSL } = require('detect-libc'); + +switch (familySync()) { + case GLIBC: ... + case MUSL: ... + case null: ... +} +``` + +### version + +```ts +function version(): Promise; +``` + +Resolves asychronously with: + +* The version when it can be determined +* `null` when the libc family cannot be determined +* `null` when run on a non-Linux platform + +```js +const { version } = require('detect-libc'); + +const v = await version(); +if (v) { + const [major, minor, patch] = v.split('.'); +} +``` + +### versionSync + +```ts +function versionSync(): string | null; +``` + +Synchronous version of `version()`. + +```js +const { versionSync } = require('detect-libc'); + +const v = versionSync(); +if (v) { + const [major, minor, patch] = v.split('.'); +} +``` + +### isNonGlibcLinux + +```ts +function isNonGlibcLinux(): Promise; +``` + +Resolves asychronously with: + +* `false` when the libc family is `glibc` +* `true` when the libc family is not `glibc` +* `false` when run on a non-Linux platform + +```js +const { isNonGlibcLinux } = require('detect-libc'); + +if (await isNonGlibcLinux()) { ... } +``` + +### isNonGlibcLinuxSync + +```ts +function isNonGlibcLinuxSync(): boolean; +``` + +Synchronous version of `isNonGlibcLinux()`. + +```js +const { isNonGlibcLinuxSync } = require('detect-libc'); + +if (isNonGlibcLinuxSync()) { ... } +``` + +## Licensing + +Copyright 2017 Lovell Fuller and others. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/index.d.ts b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/index.d.ts new file mode 100644 index 0000000..4c0fb2b --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/index.d.ts @@ -0,0 +1,14 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +export const GLIBC: 'glibc'; +export const MUSL: 'musl'; + +export function family(): Promise; +export function familySync(): string | null; + +export function isNonGlibcLinux(): Promise; +export function isNonGlibcLinuxSync(): boolean; + +export function version(): Promise; +export function versionSync(): string | null; diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/detect-libc.js b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/detect-libc.js new file mode 100644 index 0000000..fe49987 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/detect-libc.js @@ -0,0 +1,267 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const childProcess = require('child_process'); +const { isLinux, getReport } = require('./process'); +const { LDD_PATH, readFile, readFileSync } = require('./filesystem'); + +let cachedFamilyFilesystem; +let cachedVersionFilesystem; + +const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true'; +let commandOut = ''; + +const safeCommand = () => { + if (!commandOut) { + return new Promise((resolve) => { + childProcess.exec(command, (err, out) => { + commandOut = err ? ' ' : out; + resolve(commandOut); + }); + }); + } + return commandOut; +}; + +const safeCommandSync = () => { + if (!commandOut) { + try { + commandOut = childProcess.execSync(command, { encoding: 'utf8' }); + } catch (_err) { + commandOut = ' '; + } + } + return commandOut; +}; + +/** + * A String constant containing the value `glibc`. + * @type {string} + * @public + */ +const GLIBC = 'glibc'; + +/** + * A Regexp constant to get the GLIBC Version. + * @type {string} + */ +const RE_GLIBC_VERSION = /LIBC[a-z0-9 \-).]*?(\d+\.\d+)/i; + +/** + * A String constant containing the value `musl`. + * @type {string} + * @public + */ +const MUSL = 'musl'; + +const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-'); + +const familyFromReport = () => { + const report = getReport(); + if (report.header && report.header.glibcVersionRuntime) { + return GLIBC; + } + if (Array.isArray(report.sharedObjects)) { + if (report.sharedObjects.some(isFileMusl)) { + return MUSL; + } + } + return null; +}; + +const familyFromCommand = (out) => { + const [getconf, ldd1] = out.split(/[\r\n]+/); + if (getconf && getconf.includes(GLIBC)) { + return GLIBC; + } + if (ldd1 && ldd1.includes(MUSL)) { + return MUSL; + } + return null; +}; + +const getFamilyFromLddContent = (content) => { + if (content.includes('musl')) { + return MUSL; + } + if (content.includes('GNU C Library')) { + return GLIBC; + } + return null; +}; + +const familyFromFilesystem = async () => { + if (cachedFamilyFilesystem !== undefined) { + return cachedFamilyFilesystem; + } + cachedFamilyFilesystem = null; + try { + const lddContent = await readFile(LDD_PATH); + cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); + } catch (e) {} + return cachedFamilyFilesystem; +}; + +const familyFromFilesystemSync = () => { + if (cachedFamilyFilesystem !== undefined) { + return cachedFamilyFilesystem; + } + cachedFamilyFilesystem = null; + try { + const lddContent = readFileSync(LDD_PATH); + cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); + } catch (e) {} + return cachedFamilyFilesystem; +}; + +/** + * Resolves with the libc family when it can be determined, `null` otherwise. + * @returns {Promise} + */ +const family = async () => { + let family = null; + if (isLinux()) { + family = await familyFromFilesystem(); + if (!family) { + family = familyFromReport(); + } + if (!family) { + const out = await safeCommand(); + family = familyFromCommand(out); + } + } + return family; +}; + +/** + * Returns the libc family when it can be determined, `null` otherwise. + * @returns {?string} + */ +const familySync = () => { + let family = null; + if (isLinux()) { + family = familyFromFilesystemSync(); + if (!family) { + family = familyFromReport(); + } + if (!family) { + const out = safeCommandSync(); + family = familyFromCommand(out); + } + } + return family; +}; + +/** + * Resolves `true` only when the platform is Linux and the libc family is not `glibc`. + * @returns {Promise} + */ +const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC; + +/** + * Returns `true` only when the platform is Linux and the libc family is not `glibc`. + * @returns {boolean} + */ +const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC; + +const versionFromFilesystem = async () => { + if (cachedVersionFilesystem !== undefined) { + return cachedVersionFilesystem; + } + cachedVersionFilesystem = null; + try { + const lddContent = await readFile(LDD_PATH); + const versionMatch = lddContent.match(RE_GLIBC_VERSION); + if (versionMatch) { + cachedVersionFilesystem = versionMatch[1]; + } + } catch (e) {} + return cachedVersionFilesystem; +}; + +const versionFromFilesystemSync = () => { + if (cachedVersionFilesystem !== undefined) { + return cachedVersionFilesystem; + } + cachedVersionFilesystem = null; + try { + const lddContent = readFileSync(LDD_PATH); + const versionMatch = lddContent.match(RE_GLIBC_VERSION); + if (versionMatch) { + cachedVersionFilesystem = versionMatch[1]; + } + } catch (e) {} + return cachedVersionFilesystem; +}; + +const versionFromReport = () => { + const report = getReport(); + if (report.header && report.header.glibcVersionRuntime) { + return report.header.glibcVersionRuntime; + } + return null; +}; + +const versionSuffix = (s) => s.trim().split(/\s+/)[1]; + +const versionFromCommand = (out) => { + const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/); + if (getconf && getconf.includes(GLIBC)) { + return versionSuffix(getconf); + } + if (ldd1 && ldd2 && ldd1.includes(MUSL)) { + return versionSuffix(ldd2); + } + return null; +}; + +/** + * Resolves with the libc version when it can be determined, `null` otherwise. + * @returns {Promise} + */ +const version = async () => { + let version = null; + if (isLinux()) { + version = await versionFromFilesystem(); + if (!version) { + version = versionFromReport(); + } + if (!version) { + const out = await safeCommand(); + version = versionFromCommand(out); + } + } + return version; +}; + +/** + * Returns the libc version when it can be determined, `null` otherwise. + * @returns {?string} + */ +const versionSync = () => { + let version = null; + if (isLinux()) { + version = versionFromFilesystemSync(); + if (!version) { + version = versionFromReport(); + } + if (!version) { + const out = safeCommandSync(); + version = versionFromCommand(out); + } + } + return version; +}; + +module.exports = { + GLIBC, + MUSL, + family, + familySync, + isNonGlibcLinux, + isNonGlibcLinuxSync, + version, + versionSync +}; diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/filesystem.js b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/filesystem.js new file mode 100644 index 0000000..de7e007 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/filesystem.js @@ -0,0 +1,41 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const fs = require('fs'); + +/** + * The path where we can find the ldd + */ +const LDD_PATH = '/usr/bin/ldd'; + +/** + * Read the content of a file synchronous + * + * @param {string} path + * @returns {string} + */ +const readFileSync = (path) => fs.readFileSync(path, 'utf-8'); + +/** + * Read the content of a file + * + * @param {string} path + * @returns {Promise} + */ +const readFile = (path) => new Promise((resolve, reject) => { + fs.readFile(path, 'utf-8', (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); +}); + +module.exports = { + LDD_PATH, + readFileSync, + readFile +}; diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/process.js b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/process.js new file mode 100644 index 0000000..ee78ad2 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/lib/process.js @@ -0,0 +1,24 @@ +// Copyright 2017 Lovell Fuller and others. +// SPDX-License-Identifier: Apache-2.0 + +'use strict'; + +const isLinux = () => process.platform === 'linux'; + +let report = null; +const getReport = () => { + if (!report) { + /* istanbul ignore next */ + if (isLinux() && process.report) { + const orig = process.report.excludeNetwork; + process.report.excludeNetwork = true; + report = process.report.getReport(); + process.report.excludeNetwork = orig; + } else { + report = {}; + } + } + return report; +}; + +module.exports = { isLinux, getReport }; diff --git a/node_modules/@tailwindcss/oxide/node_modules/detect-libc/package.json b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/package.json new file mode 100644 index 0000000..4b04ec8 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/node_modules/detect-libc/package.json @@ -0,0 +1,41 @@ +{ + "name": "detect-libc", + "version": "2.0.4", + "description": "Node.js module to detect the C standard library (libc) implementation family and version", + "main": "lib/detect-libc.js", + "files": [ + "lib/", + "index.d.ts" + ], + "scripts": { + "test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js", + "bench": "node benchmark/detect-libc", + "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/lovell/detect-libc" + }, + "keywords": [ + "libc", + "glibc", + "musl" + ], + "author": "Lovell Fuller ", + "contributors": [ + "Niklas Salmoukas ", + "Vinícius Lourenço " + ], + "license": "Apache-2.0", + "devDependencies": { + "ava": "^2.4.0", + "benchmark": "^2.1.4", + "nyc": "^15.1.0", + "proxyquire": "^2.1.3", + "semistandard": "^14.2.3" + }, + "engines": { + "node": ">=8" + }, + "types": "index.d.ts" +} diff --git a/node_modules/@tailwindcss/oxide/package.json b/node_modules/@tailwindcss/oxide/package.json new file mode 100644 index 0000000..c9b7bf0 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/package.json @@ -0,0 +1,82 @@ +{ + "name": "@tailwindcss/oxide", + "version": "4.1.11", + "repository": { + "type": "git", + "url": "git+https://github.com/tailwindlabs/tailwindcss.git", + "directory": "crates/node" + }, + "main": "index.js", + "types": "index.d.ts", + "napi": { + "binaryName": "tailwindcss-oxide", + "packageName": "@tailwindcss/oxide", + "targets": [ + "armv7-linux-androideabi", + "aarch64-linux-android", + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "armv7-unknown-linux-gnueabihf", + "x86_64-unknown-linux-musl", + "x86_64-unknown-freebsd", + "i686-pc-windows-msvc", + "aarch64-pc-windows-msvc", + "wasm32-wasip1-threads" + ], + "wasm": { + "initialMemory": 16384, + "browser": { + "fs": true + } + } + }, + "license": "MIT", + "dependencies": { + "tar": "^7.4.3", + "detect-libc": "^2.0.4" + }, + "devDependencies": { + "@napi-rs/cli": "^3.0.0-alpha.78", + "@napi-rs/wasm-runtime": "^0.2.11", + "emnapi": "1.4.3" + }, + "engines": { + "node": ">= 10" + }, + "files": [ + "index.js", + "index.d.ts", + "scripts/install.js" + ], + "publishConfig": { + "provenance": true, + "access": "public" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.11", + "@tailwindcss/oxide-freebsd-x64": "4.1.11", + "@tailwindcss/oxide-darwin-x64": "4.1.11", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.11", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-x64-musl": "4.1.11", + "@tailwindcss/oxide-wasm32-wasi": "4.1.11", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.11", + "@tailwindcss/oxide-darwin-arm64": "4.1.11" + }, + "scripts": { + "artifacts": "napi artifacts", + "build": "pnpm run build:platform && pnpm run build:wasm", + "build:platform": "napi build --platform --release --no-const-enum", + "postbuild:platform": "node ./scripts/move-artifacts.mjs", + "build:wasm": "napi build --release --target wasm32-wasip1-threads --no-const-enum", + "postbuild:wasm": "node ./scripts/move-artifacts.mjs", + "dev": "cargo watch --quiet --shell 'npm run build'", + "build:debug": "napi build --platform --no-const-enum", + "version": "napi version", + "postinstall": "node ./scripts/install.js" + } +} \ No newline at end of file diff --git a/node_modules/@tailwindcss/oxide/scripts/install.js b/node_modules/@tailwindcss/oxide/scripts/install.js new file mode 100644 index 0000000..f9cefe0 --- /dev/null +++ b/node_modules/@tailwindcss/oxide/scripts/install.js @@ -0,0 +1,143 @@ +#!/usr/bin/env node + +/** + * @tailwindcss/oxide postinstall script + * + * This script ensures that the correct binary for the current platform and + * architecture is downloaded and available. + */ + +const fs = require('fs') +const path = require('path') +const https = require('https') +const { extract } = require('tar') +const packageJson = require('../package.json') +const detectLibc = require('detect-libc') + +const version = packageJson.version + +function getPlatformPackageName() { + let platform = process.platform + let arch = process.arch + + let libc = '' + if (platform === 'linux') { + libc = detectLibc.isNonGlibcLinuxSync() ? 'musl' : 'gnu' + } + + // Map to our package naming conventions + switch (platform) { + case 'darwin': + return arch === 'arm64' ? '@tailwindcss/oxide-darwin-arm64' : '@tailwindcss/oxide-darwin-x64' + case 'win32': + if (arch === 'arm64') return '@tailwindcss/oxide-win32-arm64-msvc' + if (arch === 'ia32') return '@tailwindcss/oxide-win32-ia32-msvc' + return '@tailwindcss/oxide-win32-x64-msvc' + case 'linux': + if (arch === 'x64') { + return libc === 'musl' + ? '@tailwindcss/oxide-linux-x64-musl' + : '@tailwindcss/oxide-linux-x64-gnu' + } else if (arch === 'arm64') { + return libc === 'musl' + ? '@tailwindcss/oxide-linux-arm64-musl' + : '@tailwindcss/oxide-linux-arm64-gnu' + } else if (arch === 'arm') { + return '@tailwindcss/oxide-linux-arm-gnueabihf' + } + break + case 'freebsd': + return '@tailwindcss/oxide-freebsd-x64' + case 'android': + return '@tailwindcss/oxide-android-arm64' + default: + return '@tailwindcss/oxide-wasm32-wasi' + } +} + +function isPackageAvailable(packageName) { + try { + require.resolve(packageName) + return true + } catch (e) { + return false + } +} + +// Extract all files from a tarball to a destination directory +async function extractTarball(tarballStream, destDir) { + if (!fs.existsSync(destDir)) { + fs.mkdirSync(destDir, { recursive: true }) + } + + return new Promise((resolve, reject) => { + tarballStream + .pipe(extract({ cwd: destDir, strip: 1 })) + .on('error', (err) => reject(err)) + .on('end', () => resolve()) + }) +} + +async function downloadAndExtractBinary(packageName) { + let tarballUrl = `https://registry.npmjs.org/${packageName}/-/${packageName.replace('@tailwindcss/', '')}-${version}.tgz` + console.log(`Downloading ${tarballUrl}...`) + + return new Promise((resolve) => { + https + .get(tarballUrl, (response) => { + if (response.statusCode === 302 || response.statusCode === 301) { + // Handle redirects + https.get(response.headers.location, handleResponse).on('error', (err) => { + console.error('Download error:', err) + resolve() + }) + return + } + + handleResponse(response) + + async function handleResponse(response) { + try { + if (response.statusCode !== 200) { + throw new Error(`Download failed with status code: ${response.statusCode}`) + } + + await extractTarball( + response, + path.join(__dirname, '..', 'node_modules', ...packageName.split('/')), + ) + console.log(`Successfully downloaded and installed ${packageName}`) + } catch (error) { + console.error('Error during extraction:', error) + resolve() + } finally { + resolve() + } + } + }) + .on('error', (err) => { + console.error('Download error:', err) + resolve() + }) + }) +} + +async function main() { + // Don't run this script in the package source + try { + if (fs.existsSync(path.join(__dirname, '..', 'build.rs'))) { + return + } + + let packageName = getPlatformPackageName() + if (!packageName) return + if (isPackageAvailable(packageName)) return + + await downloadAndExtractBinary(packageName) + } catch (error) { + console.error(error) + return + } +} + +main() diff --git a/node_modules/braces/LICENSE b/node_modules/braces/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +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. diff --git a/node_modules/braces/README.md b/node_modules/braces/README.md new file mode 100644 index 0000000..f59dd60 --- /dev/null +++ b/node_modules/braces/README.md @@ -0,0 +1,586 @@ +# braces [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## v3.0.0 Released!! + +See the [changelog](CHANGELOG.md) for details. + +## Why use braces? + +Brace patterns make globs more powerful by adding the ability to match specific ranges and sequences of characters. + +- **Accurate** - complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +- **[fast and performant](#benchmarks)** - Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +- **Organized code base** - The parser and compiler are easy to maintain and update when edge cases crop up. +- **Well-tested** - Thousands of test assertions, and passes all of the Bash, minimatch, and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests (as of the date this was written). +- **Safer** - You shouldn't have to worry about users defining aggressive or malicious brace patterns that can break your application. Braces takes measures to prevent malicious regex that can be used for DDoS attacks (see [catastrophic backtracking](https://www.regular-expressions.info/catastrophic.html)). +- [Supports lists](#lists) - (aka "sets") `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +- [Supports sequences](#sequences) - (aka "ranges") `{01..03}` => `['01', '02', '03']` +- [Supports steps](#steps) - (aka "increments") `{2..10..2}` => `['2', '4', '6', '8', '10']` +- [Supports escaping](#escaping) - To prevent evaluation of special characters. + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +const braces = require('braces'); +// braces(patterns[, options]); + +console.log(braces(['{01..05}', '{a..e}'])); +//=> ['(0[1-5])', '([a-e])'] + +console.log(braces(['{01..05}', '{a..e}'], { expand: true })); +//=> ['01', '02', '03', '04', '05', 'a', 'b', 'c', 'd', 'e'] +``` + +### Brace Expansion vs. Compilation + +By default, brace patterns are compiled into strings that are optimized for creating regular expressions and matching. + +**Compiled** + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +console.log(braces(['a/{01..20}/b', 'a/{1..5}/b'])); +//=> [ 'a/(0[1-9]|1[0-9]|20)/b', 'a/([1-5])/b' ] +``` + +**Expanded** + +Enable brace expansion by setting the `expand` option to true, or by using [braces.expand()](#expand) (returns an array similar to what you'd expect from Bash, or `echo {1..5}`, or [minimatch](https://github.com/isaacs/minimatch)): + +```js +console.log(braces('a/{x,y,z}/b', { expand: true })); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] + +console.log(braces.expand('{01..10}')); +//=> ['01','02','03','04','05','06','07','08','09','10'] +``` + +### Lists + +Expand lists (like Bash "sets"): + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Expand ranges of characters (like Bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a/{1..3}/b')); // ['a/1/b', 'a/2/b', 'a/3/b'] +console.log(braces('{a..c}', { expand: true })); // ['a', 'b', 'c'] +console.log(braces('foo/{a..c}', { expand: true })); // ['foo/a', 'foo/b', 'foo/c'] + +// supports zero-padded ranges +console.log(braces('a/{01..03}/b')); //=> ['a/(0[1-3])/b'] +console.log(braces('a/{001..300}/b')); //=> ['a/(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)/b'] +``` + +See [fill-range](https://github.com/jonschlinkert/fill-range) for all available range-expansion options. + +### Steppped ranges + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `10,000` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (alternatively you can use the `braces.expand()` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', { expand: true })); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Remove duplicates from the returned array. + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `1000` + +**Description**: To prevent malicious patterns from being passed by users, an error is thrown when `braces.expand()` is used or `options.expand` is true and the generated range will exceed the `rangeLimit`. + +You can customize `options.rangeLimit` or set it to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +**Example: Transforming non-numeric values** + +```js +const alpha = braces.expand('x/{a..e}/y', { + transform(value, index) { + // When non-numeric values are passed, "value" is a character code. + return 'foo/' + String.fromCharCode(value) + '-' + index; + }, +}); +console.log(alpha); +//=> [ 'x/foo/a-0/y', 'x/foo/b-1/y', 'x/foo/c-2/y', 'x/foo/d-3/y', 'x/foo/e-4/y' ] +``` + +**Example: Transforming numeric values** + +```js +const numeric = braces.expand('{1..5}', { + transform(value) { + // when numeric values are passed, "value" is a number + return 'foo/' + value * 2; + }, +}); +console.log(numeric); +//=> [ 'foo/2', 'foo/4', 'foo/6', 'foo/8', 'foo/10' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +const braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true })); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', { quantifiers: true, expand: true })); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.keepEscaping + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Do not strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +- [brace expansion](#brace-expansion) is for generating new lists +- [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +- brace expansion can eat up a huge amount of processing resources +- as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +- users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +- [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +- [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +- [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch][]** | +| --------------------------- | ------------------- | ---------------------------- | +| `{1..9007199254740991}`[^1] | `298 B` (5ms 459μs) | N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch][]** | +| --------------- | --------------------------- | ---------------------------- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +Braces is more accurate, without sacrificing performance. + +```bash +● expand - range (expanded) + braces x 53,167 ops/sec ±0.12% (102 runs sampled) + minimatch x 11,378 ops/sec ±0.10% (102 runs sampled) +● expand - range (optimized for regex) + braces x 373,442 ops/sec ±0.04% (100 runs sampled) + minimatch x 3,262 ops/sec ±0.18% (100 runs sampled) +● expand - nested ranges (expanded) + braces x 33,921 ops/sec ±0.09% (99 runs sampled) + minimatch x 10,855 ops/sec ±0.28% (100 runs sampled) +● expand - nested ranges (optimized for regex) + braces x 287,479 ops/sec ±0.52% (98 runs sampled) + minimatch x 3,219 ops/sec ±0.28% (101 runs sampled) +● expand - set (expanded) + braces x 238,243 ops/sec ±0.19% (97 runs sampled) + minimatch x 538,268 ops/sec ±0.31% (96 runs sampled) +● expand - set (optimized for regex) + braces x 321,844 ops/sec ±0.10% (97 runs sampled) + minimatch x 140,600 ops/sec ±0.15% (100 runs sampled) +● expand - nested sets (expanded) + braces x 165,371 ops/sec ±0.42% (96 runs sampled) + minimatch x 337,720 ops/sec ±0.28% (100 runs sampled) +● expand - nested sets (optimized for regex) + braces x 242,948 ops/sec ±0.12% (99 runs sampled) + minimatch x 87,403 ops/sec ±0.79% (96 runs sampled) +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| ----------- | ------------------------------------------------------------- | +| 197 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +- [GitHub Profile](https://github.com/jonschlinkert) +- [Twitter Profile](https://twitter.com/jonschlinkert) +- [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +--- + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ diff --git a/node_modules/braces/index.js b/node_modules/braces/index.js new file mode 100644 index 0000000..d222c13 --- /dev/null +++ b/node_modules/braces/index.js @@ -0,0 +1,170 @@ +'use strict'; + +const stringify = require('./lib/stringify'); +const compile = require('./lib/compile'); +const expand = require('./lib/expand'); +const parse = require('./lib/parse'); + +/** + * Expand the given pattern or create a regex-compatible string. + * + * ```js + * const braces = require('braces'); + * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)'] + * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +const braces = (input, options = {}) => { + let output = []; + + if (Array.isArray(input)) { + for (const pattern of input) { + const result = braces.create(pattern, options); + if (Array.isArray(result)) { + output.push(...result); + } else { + output.push(result); + } + } + } else { + output = [].concat(braces.create(input, options)); + } + + if (options && options.expand === true && options.nodupes === true) { + output = [...new Set(output)]; + } + return output; +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * // braces.parse(pattern, [, options]); + * const ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * ``` + * @param {String} pattern Brace pattern to parse + * @param {Object} options + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = (input, options = {}) => parse(input, options); + +/** + * Creates a braces string from an AST, or an AST node. + * + * ```js + * const braces = require('braces'); + * let ast = braces.parse('foo/{a,b}/bar'); + * console.log(stringify(ast.nodes[2])); //=> '{a,b}' + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.stringify = (input, options = {}) => { + if (typeof input === 'string') { + return stringify(braces.parse(input, options), options); + } + return stringify(input, options); +}; + +/** + * Compiles a brace pattern into a regex-compatible, optimized string. + * This method is called by the main [braces](#braces) function by default. + * + * ```js + * const braces = require('braces'); + * console.log(braces.compile('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `input` Brace pattern or AST. + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.compile = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + return compile(input, options); +}; + +/** + * Expands a brace pattern into an array. This method is called by the + * main [braces](#braces) function when `options.expand` is true. Before + * using this method it's recommended that you read the [performance notes](#performance)) + * and advantages of using [.compile](#compile) instead. + * + * ```js + * const braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = (input, options = {}) => { + if (typeof input === 'string') { + input = braces.parse(input, options); + } + + let result = expand(input, options); + + // filter out empty strings if specified + if (options.noempty === true) { + result = result.filter(Boolean); + } + + // filter out duplicates if specified + if (options.nodupes === true) { + result = [...new Set(result)]; + } + + return result; +}; + +/** + * Processes a brace pattern and returns either an expanded array + * (if `options.expand` is true), a highly optimized regex-compatible string. + * This method is called by the main [braces](#braces) function. + * + * ```js + * const braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = (input, options = {}) => { + if (input === '' || input.length < 3) { + return [input]; + } + + return options.expand !== true + ? braces.compile(input, options) + : braces.expand(input, options); +}; + +/** + * Expose "braces" + */ + +module.exports = braces; diff --git a/node_modules/braces/lib/compile.js b/node_modules/braces/lib/compile.js new file mode 100644 index 0000000..dce69be --- /dev/null +++ b/node_modules/braces/lib/compile.js @@ -0,0 +1,60 @@ +'use strict'; + +const fill = require('fill-range'); +const utils = require('./utils'); + +const compile = (ast, options = {}) => { + const walk = (node, parent = {}) => { + const invalidBlock = utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + const invalid = invalidBlock === true || invalidNode === true; + const prefix = options.escapeInvalid === true ? '\\' : ''; + let output = ''; + + if (node.isOpen === true) { + return prefix + node.value; + } + + if (node.isClose === true) { + console.log('node.isClose', prefix, node.value); + return prefix + node.value; + } + + if (node.type === 'open') { + return invalid ? prefix + node.value : '('; + } + + if (node.type === 'close') { + return invalid ? prefix + node.value : ')'; + } + + if (node.type === 'comma') { + return node.prev.type === 'comma' ? '' : invalid ? node.value : '|'; + } + + if (node.value) { + return node.value; + } + + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); + + if (range.length !== 0) { + return args.length > 1 && range.length > 1 ? `(${range})` : range; + } + } + + if (node.nodes) { + for (const child of node.nodes) { + output += walk(child, node); + } + } + + return output; + }; + + return walk(ast); +}; + +module.exports = compile; diff --git a/node_modules/braces/lib/constants.js b/node_modules/braces/lib/constants.js new file mode 100644 index 0000000..2bb3b88 --- /dev/null +++ b/node_modules/braces/lib/constants.js @@ -0,0 +1,57 @@ +'use strict'; + +module.exports = { + MAX_LENGTH: 10000, + + // Digits + CHAR_0: '0', /* 0 */ + CHAR_9: '9', /* 9 */ + + // Alphabet chars. + CHAR_UPPERCASE_A: 'A', /* A */ + CHAR_LOWERCASE_A: 'a', /* a */ + CHAR_UPPERCASE_Z: 'Z', /* Z */ + CHAR_LOWERCASE_Z: 'z', /* z */ + + CHAR_LEFT_PARENTHESES: '(', /* ( */ + CHAR_RIGHT_PARENTHESES: ')', /* ) */ + + CHAR_ASTERISK: '*', /* * */ + + // Non-alphabetic chars. + CHAR_AMPERSAND: '&', /* & */ + CHAR_AT: '@', /* @ */ + CHAR_BACKSLASH: '\\', /* \ */ + CHAR_BACKTICK: '`', /* ` */ + CHAR_CARRIAGE_RETURN: '\r', /* \r */ + CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */ + CHAR_COLON: ':', /* : */ + CHAR_COMMA: ',', /* , */ + CHAR_DOLLAR: '$', /* . */ + CHAR_DOT: '.', /* . */ + CHAR_DOUBLE_QUOTE: '"', /* " */ + CHAR_EQUAL: '=', /* = */ + CHAR_EXCLAMATION_MARK: '!', /* ! */ + CHAR_FORM_FEED: '\f', /* \f */ + CHAR_FORWARD_SLASH: '/', /* / */ + CHAR_HASH: '#', /* # */ + CHAR_HYPHEN_MINUS: '-', /* - */ + CHAR_LEFT_ANGLE_BRACKET: '<', /* < */ + CHAR_LEFT_CURLY_BRACE: '{', /* { */ + CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */ + CHAR_LINE_FEED: '\n', /* \n */ + CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */ + CHAR_PERCENT: '%', /* % */ + CHAR_PLUS: '+', /* + */ + CHAR_QUESTION_MARK: '?', /* ? */ + CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */ + CHAR_RIGHT_CURLY_BRACE: '}', /* } */ + CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */ + CHAR_SEMICOLON: ';', /* ; */ + CHAR_SINGLE_QUOTE: '\'', /* ' */ + CHAR_SPACE: ' ', /* */ + CHAR_TAB: '\t', /* \t */ + CHAR_UNDERSCORE: '_', /* _ */ + CHAR_VERTICAL_LINE: '|', /* | */ + CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */ +}; diff --git a/node_modules/braces/lib/expand.js b/node_modules/braces/lib/expand.js new file mode 100644 index 0000000..35b2c41 --- /dev/null +++ b/node_modules/braces/lib/expand.js @@ -0,0 +1,113 @@ +'use strict'; + +const fill = require('fill-range'); +const stringify = require('./stringify'); +const utils = require('./utils'); + +const append = (queue = '', stash = '', enclose = false) => { + const result = []; + + queue = [].concat(queue); + stash = [].concat(stash); + + if (!stash.length) return queue; + if (!queue.length) { + return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash; + } + + for (const item of queue) { + if (Array.isArray(item)) { + for (const value of item) { + result.push(append(value, stash, enclose)); + } + } else { + for (let ele of stash) { + if (enclose === true && typeof ele === 'string') ele = `{${ele}}`; + result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); + } + } + } + return utils.flatten(result); +}; + +const expand = (ast, options = {}) => { + const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit; + + const walk = (node, parent = {}) => { + node.queue = []; + + let p = parent; + let q = parent.queue; + + while (p.type !== 'brace' && p.type !== 'root' && p.parent) { + p = p.parent; + q = p.queue; + } + + if (node.invalid || node.dollar) { + q.push(append(q.pop(), stringify(node, options))); + return; + } + + if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) { + q.push(append(q.pop(), ['{}'])); + return; + } + + if (node.nodes && node.ranges > 0) { + const args = utils.reduce(node.nodes); + + if (utils.exceedsLimit(...args, options.step, rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + + let range = fill(...args, options); + if (range.length === 0) { + range = stringify(node, options); + } + + q.push(append(q.pop(), range)); + node.nodes = []; + return; + } + + const enclose = utils.encloseBrace(node); + let queue = node.queue; + let block = node; + + while (block.type !== 'brace' && block.type !== 'root' && block.parent) { + block = block.parent; + queue = block.queue; + } + + for (let i = 0; i < node.nodes.length; i++) { + const child = node.nodes[i]; + + if (child.type === 'comma' && node.type === 'brace') { + if (i === 1) queue.push(''); + queue.push(''); + continue; + } + + if (child.type === 'close') { + q.push(append(q.pop(), queue, enclose)); + continue; + } + + if (child.value && child.type !== 'open') { + queue.push(append(queue.pop(), child.value)); + continue; + } + + if (child.nodes) { + walk(child, node); + } + } + + return queue; + }; + + return utils.flatten(walk(ast)); +}; + +module.exports = expand; diff --git a/node_modules/braces/lib/parse.js b/node_modules/braces/lib/parse.js new file mode 100644 index 0000000..3a6988e --- /dev/null +++ b/node_modules/braces/lib/parse.js @@ -0,0 +1,331 @@ +'use strict'; + +const stringify = require('./stringify'); + +/** + * Constants + */ + +const { + MAX_LENGTH, + CHAR_BACKSLASH, /* \ */ + CHAR_BACKTICK, /* ` */ + CHAR_COMMA, /* , */ + CHAR_DOT, /* . */ + CHAR_LEFT_PARENTHESES, /* ( */ + CHAR_RIGHT_PARENTHESES, /* ) */ + CHAR_LEFT_CURLY_BRACE, /* { */ + CHAR_RIGHT_CURLY_BRACE, /* } */ + CHAR_LEFT_SQUARE_BRACKET, /* [ */ + CHAR_RIGHT_SQUARE_BRACKET, /* ] */ + CHAR_DOUBLE_QUOTE, /* " */ + CHAR_SINGLE_QUOTE, /* ' */ + CHAR_NO_BREAK_SPACE, + CHAR_ZERO_WIDTH_NOBREAK_SPACE +} = require('./constants'); + +/** + * parse + */ + +const parse = (input, options = {}) => { + if (typeof input !== 'string') { + throw new TypeError('Expected a string'); + } + + const opts = options || {}; + const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; + if (input.length > max) { + throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); + } + + const ast = { type: 'root', input, nodes: [] }; + const stack = [ast]; + let block = ast; + let prev = ast; + let brackets = 0; + const length = input.length; + let index = 0; + let depth = 0; + let value; + + /** + * Helpers + */ + + const advance = () => input[index++]; + const push = node => { + if (node.type === 'text' && prev.type === 'dot') { + prev.type = 'text'; + } + + if (prev && prev.type === 'text' && node.type === 'text') { + prev.value += node.value; + return; + } + + block.nodes.push(node); + node.parent = block; + node.prev = prev; + prev = node; + return node; + }; + + push({ type: 'bos' }); + + while (index < length) { + block = stack[stack.length - 1]; + value = advance(); + + /** + * Invalid chars + */ + + if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { + continue; + } + + /** + * Escaped chars + */ + + if (value === CHAR_BACKSLASH) { + push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() }); + continue; + } + + /** + * Right square bracket (literal): ']' + */ + + if (value === CHAR_RIGHT_SQUARE_BRACKET) { + push({ type: 'text', value: '\\' + value }); + continue; + } + + /** + * Left square bracket: '[' + */ + + if (value === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + + let next; + + while (index < length && (next = advance())) { + value += next; + + if (next === CHAR_LEFT_SQUARE_BRACKET) { + brackets++; + continue; + } + + if (next === CHAR_BACKSLASH) { + value += advance(); + continue; + } + + if (next === CHAR_RIGHT_SQUARE_BRACKET) { + brackets--; + + if (brackets === 0) { + break; + } + } + } + + push({ type: 'text', value }); + continue; + } + + /** + * Parentheses + */ + + if (value === CHAR_LEFT_PARENTHESES) { + block = push({ type: 'paren', nodes: [] }); + stack.push(block); + push({ type: 'text', value }); + continue; + } + + if (value === CHAR_RIGHT_PARENTHESES) { + if (block.type !== 'paren') { + push({ type: 'text', value }); + continue; + } + block = stack.pop(); + push({ type: 'text', value }); + block = stack[stack.length - 1]; + continue; + } + + /** + * Quotes: '|"|` + */ + + if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { + const open = value; + let next; + + if (options.keepQuotes !== true) { + value = ''; + } + + while (index < length && (next = advance())) { + if (next === CHAR_BACKSLASH) { + value += next + advance(); + continue; + } + + if (next === open) { + if (options.keepQuotes === true) value += next; + break; + } + + value += next; + } + + push({ type: 'text', value }); + continue; + } + + /** + * Left curly brace: '{' + */ + + if (value === CHAR_LEFT_CURLY_BRACE) { + depth++; + + const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true; + const brace = { + type: 'brace', + open: true, + close: false, + dollar, + depth, + commas: 0, + ranges: 0, + nodes: [] + }; + + block = push(brace); + stack.push(block); + push({ type: 'open', value }); + continue; + } + + /** + * Right curly brace: '}' + */ + + if (value === CHAR_RIGHT_CURLY_BRACE) { + if (block.type !== 'brace') { + push({ type: 'text', value }); + continue; + } + + const type = 'close'; + block = stack.pop(); + block.close = true; + + push({ type, value }); + depth--; + + block = stack[stack.length - 1]; + continue; + } + + /** + * Comma: ',' + */ + + if (value === CHAR_COMMA && depth > 0) { + if (block.ranges > 0) { + block.ranges = 0; + const open = block.nodes.shift(); + block.nodes = [open, { type: 'text', value: stringify(block) }]; + } + + push({ type: 'comma', value }); + block.commas++; + continue; + } + + /** + * Dot: '.' + */ + + if (value === CHAR_DOT && depth > 0 && block.commas === 0) { + const siblings = block.nodes; + + if (depth === 0 || siblings.length === 0) { + push({ type: 'text', value }); + continue; + } + + if (prev.type === 'dot') { + block.range = []; + prev.value += value; + prev.type = 'range'; + + if (block.nodes.length !== 3 && block.nodes.length !== 5) { + block.invalid = true; + block.ranges = 0; + prev.type = 'text'; + continue; + } + + block.ranges++; + block.args = []; + continue; + } + + if (prev.type === 'range') { + siblings.pop(); + + const before = siblings[siblings.length - 1]; + before.value += prev.value + value; + prev = before; + block.ranges--; + continue; + } + + push({ type: 'dot', value }); + continue; + } + + /** + * Text + */ + + push({ type: 'text', value }); + } + + // Mark imbalanced braces and brackets as invalid + do { + block = stack.pop(); + + if (block.type !== 'root') { + block.nodes.forEach(node => { + if (!node.nodes) { + if (node.type === 'open') node.isOpen = true; + if (node.type === 'close') node.isClose = true; + if (!node.nodes) node.type = 'text'; + node.invalid = true; + } + }); + + // get the location of the block on parent.nodes (block's siblings) + const parent = stack[stack.length - 1]; + const index = parent.nodes.indexOf(block); + // replace the (invalid) block with it's nodes + parent.nodes.splice(index, 1, ...block.nodes); + } + } while (stack.length > 0); + + push({ type: 'eos' }); + return ast; +}; + +module.exports = parse; diff --git a/node_modules/braces/lib/stringify.js b/node_modules/braces/lib/stringify.js new file mode 100644 index 0000000..8bcf872 --- /dev/null +++ b/node_modules/braces/lib/stringify.js @@ -0,0 +1,32 @@ +'use strict'; + +const utils = require('./utils'); + +module.exports = (ast, options = {}) => { + const stringify = (node, parent = {}) => { + const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); + const invalidNode = node.invalid === true && options.escapeInvalid === true; + let output = ''; + + if (node.value) { + if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { + return '\\' + node.value; + } + return node.value; + } + + if (node.value) { + return node.value; + } + + if (node.nodes) { + for (const child of node.nodes) { + output += stringify(child); + } + } + return output; + }; + + return stringify(ast); +}; + diff --git a/node_modules/braces/lib/utils.js b/node_modules/braces/lib/utils.js new file mode 100644 index 0000000..d19311f --- /dev/null +++ b/node_modules/braces/lib/utils.js @@ -0,0 +1,122 @@ +'use strict'; + +exports.isInteger = num => { + if (typeof num === 'number') { + return Number.isInteger(num); + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isInteger(Number(num)); + } + return false; +}; + +/** + * Find a node of the given type + */ + +exports.find = (node, type) => node.nodes.find(node => node.type === type); + +/** + * Find a node of the given type + */ + +exports.exceedsLimit = (min, max, step = 1, limit) => { + if (limit === false) return false; + if (!exports.isInteger(min) || !exports.isInteger(max)) return false; + return ((Number(max) - Number(min)) / Number(step)) >= limit; +}; + +/** + * Escape the given node with '\\' before node.value + */ + +exports.escapeNode = (block, n = 0, type) => { + const node = block.nodes[n]; + if (!node) return; + + if ((type && node.type === type) || node.type === 'open' || node.type === 'close') { + if (node.escaped !== true) { + node.value = '\\' + node.value; + node.escaped = true; + } + } +}; + +/** + * Returns true if the given brace node should be enclosed in literal braces + */ + +exports.encloseBrace = node => { + if (node.type !== 'brace') return false; + if ((node.commas >> 0 + node.ranges >> 0) === 0) { + node.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a brace node is invalid. + */ + +exports.isInvalidBrace = block => { + if (block.type !== 'brace') return false; + if (block.invalid === true || block.dollar) return true; + if ((block.commas >> 0 + block.ranges >> 0) === 0) { + block.invalid = true; + return true; + } + if (block.open !== true || block.close !== true) { + block.invalid = true; + return true; + } + return false; +}; + +/** + * Returns true if a node is an open or close node + */ + +exports.isOpenOrClose = node => { + if (node.type === 'open' || node.type === 'close') { + return true; + } + return node.open === true || node.close === true; +}; + +/** + * Reduce an array of text nodes. + */ + +exports.reduce = nodes => nodes.reduce((acc, node) => { + if (node.type === 'text') acc.push(node.value); + if (node.type === 'range') node.type = 'text'; + return acc; +}, []); + +/** + * Flatten an array + */ + +exports.flatten = (...args) => { + const result = []; + + const flat = arr => { + for (let i = 0; i < arr.length; i++) { + const ele = arr[i]; + + if (Array.isArray(ele)) { + flat(ele); + continue; + } + + if (ele !== undefined) { + result.push(ele); + } + } + return result; + }; + + flat(args); + return result; +}; diff --git a/node_modules/braces/package.json b/node_modules/braces/package.json new file mode 100644 index 0000000..c3c056e --- /dev/null +++ b/node_modules/braces/package.json @@ -0,0 +1,77 @@ +{ + "name": "braces", + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "version": "3.0.3", + "homepage": "https://github.com/micromatch/braces", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Elan Shanker (https://github.com/es128)", + "Eugene Sharygin (https://github.com/eush77)", + "hemanth.hm (http://h3manth.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/braces", + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "lib" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha", + "benchmark": "node benchmark" + }, + "dependencies": { + "fill-range": "^7.1.1" + }, + "devDependencies": { + "ansi-colors": "^3.2.4", + "bash-path": "^2.0.1", + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1" + }, + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ] + } +} diff --git a/node_modules/chownr/LICENSE.md b/node_modules/chownr/LICENSE.md new file mode 100644 index 0000000..881248b --- /dev/null +++ b/node_modules/chownr/LICENSE.md @@ -0,0 +1,63 @@ +All packages under `src/` are licensed according to the terms in +their respective `LICENSE` or `LICENSE.md` files. + +The remainder of this project is licensed under the Blue Oak +Model License, as follows: + +----- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/node_modules/chownr/README.md b/node_modules/chownr/README.md new file mode 100644 index 0000000..70e9a54 --- /dev/null +++ b/node_modules/chownr/README.md @@ -0,0 +1,3 @@ +Like `chown -R`. + +Takes the same arguments as `fs.chown()` diff --git a/node_modules/chownr/dist/commonjs/index.d.ts b/node_modules/chownr/dist/commonjs/index.d.ts new file mode 100644 index 0000000..5ab081f --- /dev/null +++ b/node_modules/chownr/dist/commonjs/index.d.ts @@ -0,0 +1,3 @@ +export declare const chownr: (p: string, uid: number, gid: number, cb: (er?: unknown) => any) => void; +export declare const chownrSync: (p: string, uid: number, gid: number) => void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/chownr/dist/commonjs/index.d.ts.map b/node_modules/chownr/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..bda37a0 --- /dev/null +++ b/node_modules/chownr/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,MAAM,MACd,MAAM,OACJ,MAAM,OACN,MAAM,YACD,OAAO,KAAK,GAAG,SA0B1B,CAAA;AAcD,eAAO,MAAM,UAAU,MAAO,MAAM,OAAO,MAAM,OAAO,MAAM,SAiB7D,CAAA"} \ No newline at end of file diff --git a/node_modules/chownr/dist/commonjs/index.js b/node_modules/chownr/dist/commonjs/index.js new file mode 100644 index 0000000..6a7b68d --- /dev/null +++ b/node_modules/chownr/dist/commonjs/index.js @@ -0,0 +1,93 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.chownrSync = exports.chownr = void 0; +const node_fs_1 = __importDefault(require("node:fs")); +const node_path_1 = __importDefault(require("node:path")); +const lchownSync = (path, uid, gid) => { + try { + return node_fs_1.default.lchownSync(path, uid, gid); + } + catch (er) { + if (er?.code !== 'ENOENT') + throw er; + } +}; +const chown = (cpath, uid, gid, cb) => { + node_fs_1.default.lchown(cpath, uid, gid, er => { + // Skip ENOENT error + cb(er && er?.code !== 'ENOENT' ? er : null); + }); +}; +const chownrKid = (p, child, uid, gid, cb) => { + if (child.isDirectory()) { + (0, exports.chownr)(node_path_1.default.resolve(p, child.name), uid, gid, (er) => { + if (er) + return cb(er); + const cpath = node_path_1.default.resolve(p, child.name); + chown(cpath, uid, gid, cb); + }); + } + else { + const cpath = node_path_1.default.resolve(p, child.name); + chown(cpath, uid, gid, cb); + } +}; +const chownr = (p, uid, gid, cb) => { + node_fs_1.default.readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er) { + if (er.code === 'ENOENT') + return cb(); + else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er); + } + if (er || !children.length) + return chown(p, uid, gid, cb); + let len = children.length; + let errState = null; + const then = (er) => { + /* c8 ignore start */ + if (errState) + return; + /* c8 ignore stop */ + if (er) + return cb((errState = er)); + if (--len === 0) + return chown(p, uid, gid, cb); + }; + for (const child of children) { + chownrKid(p, child, uid, gid, then); + } + }); +}; +exports.chownr = chownr; +const chownrKidSync = (p, child, uid, gid) => { + if (child.isDirectory()) + (0, exports.chownrSync)(node_path_1.default.resolve(p, child.name), uid, gid); + lchownSync(node_path_1.default.resolve(p, child.name), uid, gid); +}; +const chownrSync = (p, uid, gid) => { + let children; + try { + children = node_fs_1.default.readdirSync(p, { withFileTypes: true }); + } + catch (er) { + const e = er; + if (e?.code === 'ENOENT') + return; + else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP') + return lchownSync(p, uid, gid); + else + throw e; + } + for (const child of children) { + chownrKidSync(p, child, uid, gid); + } + return lchownSync(p, uid, gid); +}; +exports.chownrSync = chownrSync; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/chownr/dist/commonjs/index.js.map b/node_modules/chownr/dist/commonjs/index.js.map new file mode 100644 index 0000000..954921f --- /dev/null +++ b/node_modules/chownr/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyC;AACzC,0DAA4B;AAE5B,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE;IAC5D,IAAI,CAAC;QACH,OAAO,iBAAE,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IACtC,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,IAAK,EAA4B,EAAE,IAAI,KAAK,QAAQ;YAAE,MAAM,EAAE,CAAA;IAChE,CAAC;AACH,CAAC,CAAA;AAED,M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,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IAEnD,UAAU,CAAC,mBAAI,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AACnD,CAAC,CAAA;AAEM,MAAM,UAAU,GAAG,CAAC,CAAS,EAAE,GAAW,EAAE,GAAW,EAAE,EAAE;IAChE,IAAI,QAAkB,CAAA;IACtB,IAAI,CAAC;QACH,QAAQ,GAAG,iBAAE,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAA;IACvD,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACZ,MAAM,CAAC,GAAG,EAA2B,CAAA;QACrC,IAAI,CAAC,EAAE,IAAI,KAAK,QAAQ;YAAE,OAAM;aAC3B,IAAI,CAAC,EAAE,IAAI,KAAK,SAAS,IAAI,CAAC,EAAE,IAAI,KAAK,SAAS;YACrD,OAAO,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;;YAC3B,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;IACnC,CAAC;IAED,OAAO,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAChC,CAAC,CAAA;AAjBY,QAAA,UAAU,cAiBtB","sourcesContent":["import fs, { type Dirent } from 'node:fs'\nimport path from 'node:path'\n\nconst lchownSync = (path: string, uid: number, gid: number) => {\n try {\n return fs.lchownSync(path, uid, gid)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code !== 'ENOENT') throw er\n }\n}\n\nconst chown = (\n cpath: string,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n fs.lchown(cpath, uid, gid, er => {\n // Skip ENOENT error\n cb(er && (er as NodeJS.ErrnoException)?.code !== 'ENOENT' ? er : null)\n })\n}\n\nconst chownrKid = (\n p: string,\n child: Dirent,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n if (child.isDirectory()) {\n chownr(path.resolve(p, child.name), uid, gid, (er: unknown) => {\n if (er) return cb(er)\n const cpath = path.resolve(p, child.name)\n chown(cpath, uid, gid, cb)\n })\n } else {\n const cpath = path.resolve(p, child.name)\n chown(cpath, uid, gid, cb)\n }\n}\n\nexport const chownr = (\n p: string,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n fs.readdir(p, { withFileTypes: true }, (er, children) => {\n // any error other than ENOTDIR or ENOTSUP means it's not readable,\n // or doesn't exist. give up.\n if (er) {\n if (er.code === 'ENOENT') return cb()\n else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')\n return cb(er)\n }\n if (er || !children.length) return chown(p, uid, gid, cb)\n\n let len = children.length\n let errState: null | NodeJS.ErrnoException = null\n const then = (er?: unknown) => {\n /* c8 ignore start */\n if (errState) return\n /* c8 ignore stop */\n if (er) return cb((errState = er as NodeJS.ErrnoException))\n if (--len === 0) return chown(p, uid, gid, cb)\n }\n\n for (const child of children) {\n chownrKid(p, child, uid, gid, then)\n }\n })\n}\n\nconst chownrKidSync = (\n p: string,\n child: Dirent,\n uid: number,\n gid: number,\n) => {\n if (child.isDirectory())\n chownrSync(path.resolve(p, child.name), uid, gid)\n\n lchownSync(path.resolve(p, child.name), uid, gid)\n}\n\nexport const chownrSync = (p: string, uid: number, gid: number) => {\n let children: Dirent[]\n try {\n children = fs.readdirSync(p, { withFileTypes: true })\n } catch (er) {\n const e = er as NodeJS.ErrnoException\n if (e?.code === 'ENOENT') return\n else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP')\n return lchownSync(p, uid, gid)\n else throw e\n }\n\n for (const child of children) {\n chownrKidSync(p, child, uid, gid)\n }\n\n return lchownSync(p, uid, gid)\n}\n"]} \ No newline at end of file diff --git a/node_modules/chownr/dist/commonjs/package.json b/node_modules/chownr/dist/commonjs/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/node_modules/chownr/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/chownr/dist/esm/index.d.ts b/node_modules/chownr/dist/esm/index.d.ts new file mode 100644 index 0000000..5ab081f --- /dev/null +++ b/node_modules/chownr/dist/esm/index.d.ts @@ -0,0 +1,3 @@ +export declare const chownr: (p: string, uid: number, gid: number, cb: (er?: unknown) => any) => void; +export declare const chownrSync: (p: string, uid: number, gid: number) => void; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/chownr/dist/esm/index.d.ts.map b/node_modules/chownr/dist/esm/index.d.ts.map new file mode 100644 index 0000000..bda37a0 --- /dev/null +++ b/node_modules/chownr/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA0CA,eAAO,MAAM,MAAM,MACd,MAAM,OACJ,MAAM,OACN,MAAM,YACD,OAAO,KAAK,GAAG,SA0B1B,CAAA;AAcD,eAAO,MAAM,UAAU,MAAO,MAAM,OAAO,MAAM,OAAO,MAAM,SAiB7D,CAAA"} \ No newline at end of file diff --git a/node_modules/chownr/dist/esm/index.js b/node_modules/chownr/dist/esm/index.js new file mode 100644 index 0000000..5c28152 --- /dev/null +++ b/node_modules/chownr/dist/esm/index.js @@ -0,0 +1,85 @@ +import fs from 'node:fs'; +import path from 'node:path'; +const lchownSync = (path, uid, gid) => { + try { + return fs.lchownSync(path, uid, gid); + } + catch (er) { + if (er?.code !== 'ENOENT') + throw er; + } +}; +const chown = (cpath, uid, gid, cb) => { + fs.lchown(cpath, uid, gid, er => { + // Skip ENOENT error + cb(er && er?.code !== 'ENOENT' ? er : null); + }); +}; +const chownrKid = (p, child, uid, gid, cb) => { + if (child.isDirectory()) { + chownr(path.resolve(p, child.name), uid, gid, (er) => { + if (er) + return cb(er); + const cpath = path.resolve(p, child.name); + chown(cpath, uid, gid, cb); + }); + } + else { + const cpath = path.resolve(p, child.name); + chown(cpath, uid, gid, cb); + } +}; +export const chownr = (p, uid, gid, cb) => { + fs.readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er) { + if (er.code === 'ENOENT') + return cb(); + else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er); + } + if (er || !children.length) + return chown(p, uid, gid, cb); + let len = children.length; + let errState = null; + const then = (er) => { + /* c8 ignore start */ + if (errState) + return; + /* c8 ignore stop */ + if (er) + return cb((errState = er)); + if (--len === 0) + return chown(p, uid, gid, cb); + }; + for (const child of children) { + chownrKid(p, child, uid, gid, then); + } + }); +}; +const chownrKidSync = (p, child, uid, gid) => { + if (child.isDirectory()) + chownrSync(path.resolve(p, child.name), uid, gid); + lchownSync(path.resolve(p, child.name), uid, gid); +}; +export const chownrSync = (p, uid, gid) => { + let children; + try { + children = fs.readdirSync(p, { withFileTypes: true }); + } + catch (er) { + const e = er; + if (e?.code === 'ENOENT') + return; + else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP') + return lchownSync(p, uid, gid); + else + throw e; + } + for (const child of children) { + chownrKidSync(p, child, uid, gid); + } + return lchownSync(p, uid, gid); +}; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/chownr/dist/esm/index.js.map b/node_modules/chownr/dist/esm/index.js.map new file mode 100644 index 0000000..0e35028 --- /dev/null +++ b/node_modules/chownr/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,MAAM,SAAS,CAAA;AACzC,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,MAAM,UAAU,GAAG,CAAC,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import fs, { type Dirent } from 'node:fs'\nimport path from 'node:path'\n\nconst lchownSync = (path: string, uid: number, gid: number) => {\n try {\n return fs.lchownSync(path, uid, gid)\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code !== 'ENOENT') throw er\n }\n}\n\nconst chown = (\n cpath: string,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n fs.lchown(cpath, uid, gid, er => {\n // Skip ENOENT error\n cb(er && (er as NodeJS.ErrnoException)?.code !== 'ENOENT' ? er : null)\n })\n}\n\nconst chownrKid = (\n p: string,\n child: Dirent,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n if (child.isDirectory()) {\n chownr(path.resolve(p, child.name), uid, gid, (er: unknown) => {\n if (er) return cb(er)\n const cpath = path.resolve(p, child.name)\n chown(cpath, uid, gid, cb)\n })\n } else {\n const cpath = path.resolve(p, child.name)\n chown(cpath, uid, gid, cb)\n }\n}\n\nexport const chownr = (\n p: string,\n uid: number,\n gid: number,\n cb: (er?: unknown) => any,\n) => {\n fs.readdir(p, { withFileTypes: true }, (er, children) => {\n // any error other than ENOTDIR or ENOTSUP means it's not readable,\n // or doesn't exist. give up.\n if (er) {\n if (er.code === 'ENOENT') return cb()\n else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP')\n return cb(er)\n }\n if (er || !children.length) return chown(p, uid, gid, cb)\n\n let len = children.length\n let errState: null | NodeJS.ErrnoException = null\n const then = (er?: unknown) => {\n /* c8 ignore start */\n if (errState) return\n /* c8 ignore stop */\n if (er) return cb((errState = er as NodeJS.ErrnoException))\n if (--len === 0) return chown(p, uid, gid, cb)\n }\n\n for (const child of children) {\n chownrKid(p, child, uid, gid, then)\n }\n })\n}\n\nconst chownrKidSync = (\n p: string,\n child: Dirent,\n uid: number,\n gid: number,\n) => {\n if (child.isDirectory())\n chownrSync(path.resolve(p, child.name), uid, gid)\n\n lchownSync(path.resolve(p, child.name), uid, gid)\n}\n\nexport const chownrSync = (p: string, uid: number, gid: number) => {\n let children: Dirent[]\n try {\n children = fs.readdirSync(p, { withFileTypes: true })\n } catch (er) {\n const e = er as NodeJS.ErrnoException\n if (e?.code === 'ENOENT') return\n else if (e?.code === 'ENOTDIR' || e?.code === 'ENOTSUP')\n return lchownSync(p, uid, gid)\n else throw e\n }\n\n for (const child of children) {\n chownrKidSync(p, child, uid, gid)\n }\n\n return lchownSync(p, uid, gid)\n}\n"]} \ No newline at end of file diff --git a/node_modules/chownr/dist/esm/package.json b/node_modules/chownr/dist/esm/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/chownr/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/chownr/package.json b/node_modules/chownr/package.json new file mode 100644 index 0000000..09aa6b2 --- /dev/null +++ b/node_modules/chownr/package.json @@ -0,0 +1,69 @@ +{ + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "name": "chownr", + "description": "like `chown -R`", + "version": "3.0.0", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "files": [ + "dist" + ], + "devDependencies": { + "@types/node": "^20.12.5", + "mkdirp": "^3.0.1", + "prettier": "^3.2.5", + "rimraf": "^5.0.5", + "tap": "^18.7.2", + "tshy": "^1.13.1", + "typedoc": "^0.25.12" + }, + "scripts": { + "prepare": "tshy", + "pretest": "npm run prepare", + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "format": "prettier --write . --loglevel warn", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" + }, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "prettier": { + "semi": false, + "printWidth": 75, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + } +} diff --git a/node_modules/detect-libc/.npmignore b/node_modules/detect-libc/.npmignore new file mode 100644 index 0000000..8fc0e8d --- /dev/null +++ b/node_modules/detect-libc/.npmignore @@ -0,0 +1,7 @@ +.nyc_output +.travis.yml +coverage +test.js +node_modules +/.circleci +/tests/integration diff --git a/node_modules/detect-libc/LICENSE b/node_modules/detect-libc/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/node_modules/detect-libc/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/detect-libc/README.md b/node_modules/detect-libc/README.md new file mode 100644 index 0000000..3176357 --- /dev/null +++ b/node_modules/detect-libc/README.md @@ -0,0 +1,78 @@ +# detect-libc + +Node.js module to detect the C standard library (libc) implementation +family and version in use on a given Linux system. + +Provides a value suitable for use with the `LIBC` option of +[prebuild](https://www.npmjs.com/package/prebuild), +[prebuild-ci](https://www.npmjs.com/package/prebuild-ci) and +[prebuild-install](https://www.npmjs.com/package/prebuild-install), +therefore allowing build and provision of pre-compiled binaries +for musl-based Linux e.g. Alpine as well as glibc-based. + +Currently supports libc detection of `glibc` and `musl`. + +## Install + +```sh +npm install detect-libc +``` + +## Usage + +### API + +```js +const { GLIBC, MUSL, family, version, isNonGlibcLinux } = require('detect-libc'); +``` + +* `GLIBC` is a String containing the value "glibc" for comparison with `family`. +* `MUSL` is a String containing the value "musl" for comparison with `family`. +* `family` is a String representing the system libc family. +* `version` is a String representing the system libc version number. +* `isNonGlibcLinux` is a Boolean representing whether the system is a non-glibc Linux, e.g. Alpine. + +### detect-libc command line tool + +When run on a Linux system with a non-glibc libc, +the child command will be run with the `LIBC` environment variable +set to the relevant value. + +On all other platforms will run the child command as-is. + +The command line feature requires `spawnSync` provided by Node v0.12+. + +```sh +detect-libc child-command +``` + +## Integrating with prebuild + +```json + "scripts": { + "install": "detect-libc prebuild-install || node-gyp rebuild", + "test": "mocha && detect-libc prebuild-ci" + }, + "dependencies": { + "detect-libc": "^1.0.2", + "prebuild-install": "^2.2.0" + }, + "devDependencies": { + "prebuild": "^6.2.1", + "prebuild-ci": "^2.2.3" + } +``` + +## Licence + +Copyright 2017 Lovell Fuller + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/node_modules/detect-libc/lib/detect-libc.js b/node_modules/detect-libc/lib/detect-libc.js new file mode 100644 index 0000000..1855fe1 --- /dev/null +++ b/node_modules/detect-libc/lib/detect-libc.js @@ -0,0 +1,92 @@ +'use strict'; + +var platform = require('os').platform(); +var spawnSync = require('child_process').spawnSync; +var readdirSync = require('fs').readdirSync; + +var GLIBC = 'glibc'; +var MUSL = 'musl'; + +var spawnOptions = { + encoding: 'utf8', + env: process.env +}; + +if (!spawnSync) { + spawnSync = function () { + return { status: 126, stdout: '', stderr: '' }; + }; +} + +function contains (needle) { + return function (haystack) { + return haystack.indexOf(needle) !== -1; + }; +} + +function versionFromMuslLdd (out) { + return out.split(/[\r\n]+/)[1].trim().split(/\s/)[1]; +} + +function safeReaddirSync (path) { + try { + return readdirSync(path); + } catch (e) {} + return []; +} + +var family = ''; +var version = ''; +var method = ''; + +if (platform === 'linux') { + // Try getconf + var glibc = spawnSync('getconf', ['GNU_LIBC_VERSION'], spawnOptions); + if (glibc.status === 0) { + family = GLIBC; + version = glibc.stdout.trim().split(' ')[1]; + method = 'getconf'; + } else { + // Try ldd + var ldd = spawnSync('ldd', ['--version'], spawnOptions); + if (ldd.status === 0 && ldd.stdout.indexOf(MUSL) !== -1) { + family = MUSL; + version = versionFromMuslLdd(ldd.stdout); + method = 'ldd'; + } else if (ldd.status === 1 && ldd.stderr.indexOf(MUSL) !== -1) { + family = MUSL; + version = versionFromMuslLdd(ldd.stderr); + method = 'ldd'; + } else { + // Try filesystem (family only) + var lib = safeReaddirSync('/lib'); + if (lib.some(contains('-linux-gnu'))) { + family = GLIBC; + method = 'filesystem'; + } else if (lib.some(contains('libc.musl-'))) { + family = MUSL; + method = 'filesystem'; + } else if (lib.some(contains('ld-musl-'))) { + family = MUSL; + method = 'filesystem'; + } else { + var usrSbin = safeReaddirSync('/usr/sbin'); + if (usrSbin.some(contains('glibc'))) { + family = GLIBC; + method = 'filesystem'; + } + } + } + } +} + +var isNonGlibcLinux = (family !== '' && family !== GLIBC); + +module.exports = { + GLIBC: GLIBC, + MUSL: MUSL, + family: family, + version: version, + method: method, + isNonGlibcLinux: isNonGlibcLinux +}; diff --git a/node_modules/detect-libc/package.json b/node_modules/detect-libc/package.json new file mode 100644 index 0000000..cbd5cd1 --- /dev/null +++ b/node_modules/detect-libc/package.json @@ -0,0 +1,35 @@ +{ + "name": "detect-libc", + "version": "1.0.3", + "description": "Node.js module to detect the C standard library (libc) implementation family and version", + "main": "lib/detect-libc.js", + "bin": { + "detect-libc": "./bin/detect-libc.js" + }, + "scripts": { + "test": "semistandard && nyc --reporter=lcov ava" + }, + "repository": { + "type": "git", + "url": "git://github.com/lovell/detect-libc" + }, + "keywords": [ + "libc", + "glibc", + "musl" + ], + "author": "Lovell Fuller ", + "contributors": [ + "Niklas Salmoukas " + ], + "license": "Apache-2.0", + "devDependencies": { + "ava": "^0.23.0", + "nyc": "^11.3.0", + "proxyquire": "^1.8.0", + "semistandard": "^11.0.0" + }, + "engines": { + "node": ">=0.10" + } +} diff --git a/node_modules/enhanced-resolve/LICENSE b/node_modules/enhanced-resolve/LICENSE new file mode 100644 index 0000000..8c11fc7 --- /dev/null +++ b/node_modules/enhanced-resolve/LICENSE @@ -0,0 +1,20 @@ +Copyright JS Foundation and other contributors + +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. diff --git a/node_modules/enhanced-resolve/README.md b/node_modules/enhanced-resolve/README.md new file mode 100644 index 0000000..8a6efb2 --- /dev/null +++ b/node_modules/enhanced-resolve/README.md @@ -0,0 +1,186 @@ +# enhanced-resolve + +[![npm][npm]][npm-url] +[![Build Status][build-status]][build-status-url] +[![codecov][codecov-badge]][codecov-url] +[![Install Size][size]][size-url] +[![GitHub Discussions][discussion]][discussion-url] + +Offers an async require.resolve function. It's highly configurable. + +## Features + +- plugin system +- provide a custom filesystem +- sync and async node.js filesystems included + +## Getting Started + +### Install + +```sh +# npm +npm install enhanced-resolve +# or Yarn +yarn add enhanced-resolve +``` + +### Resolve + +There is a Node.js API which allows to resolve requests according to the Node.js resolving rules. +Sync and async APIs are offered. A `create` method allows to create a custom resolve function. + +```js +const resolve = require("enhanced-resolve"); + +resolve("/some/path/to/folder", "module/dir", (err, result) => { + result; // === "/some/path/node_modules/module/dir/index.js" +}); + +resolve.sync("/some/path/to/folder", "../../dir"); +// === "/some/path/dir/index.js" + +const myResolve = resolve.create({ + // or resolve.create.sync + extensions: [".ts", ".js"], + // see more options below +}); + +myResolve("/some/path/to/folder", "ts-module", (err, result) => { + result; // === "/some/node_modules/ts-module/index.ts" +}); +``` + +### Creating a Resolver + +The easiest way to create a resolver is to use the `createResolver` function on `ResolveFactory`, along with one of the supplied File System implementations. + +```js +const fs = require("fs"); +const { CachedInputFileSystem, ResolverFactory } = require("enhanced-resolve"); + +// create a resolver +const myResolver = ResolverFactory.createResolver({ + // Typical usage will consume the `fs` + `CachedInputFileSystem`, which wraps Node.js `fs` to add caching. + fileSystem: new CachedInputFileSystem(fs, 4000), + extensions: [".js", ".json"], + /* any other resolver options here. Options/defaults can be seen below */ +}); + +// resolve a file with the new resolver +const context = {}; +const lookupStartPath = "/Users/webpack/some/root/dir"; +const request = "./path/to-look-up.js"; +const resolveContext = {}; +myResolver.resolve( + context, + lookupStartPath, + request, + resolveContext, + (err /* Error */, filepath /* string */) => { + // Do something with the path + }, +); +``` + +#### Resolver Options + +| Field | Default | Description | +| ---------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | +| alias | [] | A list of module alias configurations or an object which maps key to value | +| aliasFields | [] | A list of alias fields in description files | +| extensionAlias | {} | An object which maps extension to extension aliases | +| cachePredicate | function() { return true }; | A function which decides whether a request should be cached or not. An object is passed to the function with `path` and `request` properties. | +| cacheWithContext | true | If unsafe cache is enabled, includes `request.context` in the cache key | +| conditionNames | [] | A list of exports field condition names | +| descriptionFiles | ["package.json"] | A list of description files to read from | +| enforceExtension | false | Enforce that a extension from extensions must be used | +| exportsFields | ["exports"] | A list of exports fields in description files | +| extensions | [".js", ".json", ".node"] | A list of extensions which should be tried for files | +| fallback | [] | Same as `alias`, but only used if default resolving fails | +| fileSystem | | The file system which should be used | +| fullySpecified | false | Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests) | +| mainFields | ["main"] | A list of main fields in description files | +| mainFiles | ["index"] | A list of main files in directories | +| modules | ["node_modules"] | A list of directories to resolve modules from, can be absolute path or folder name | +| plugins | [] | A list of additional resolve plugins which should be applied | +| resolver | undefined | A prepared Resolver to which the plugins are attached | +| resolveToContext | false | Resolve to a context instead of a file | +| preferRelative | false | Prefer to resolve module requests as relative request and fallback to resolving as module | +| preferAbsolute | false | Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots | +| restrictions | [] | A list of resolve restrictions | +| roots | [] | A list of root paths | +| symlinks | true | Whether to resolve symlinks to their symlinked location | +| unsafeCache | false | Use this cache object to unsafely cache the successful requests | + +## Plugins + +Similar to `webpack`, the core of `enhanced-resolve` functionality is implemented as individual plugins that are executed using [`tapable`](https://github.com/webpack/tapable). +These plugins can extend the functionality of the library, adding other ways for files/contexts to be resolved. + +A plugin should be a `class` (or its ES5 equivalent) with an `apply` method. The `apply` method will receive a `resolver` instance, that can be used to hook in to the event system. + +### Plugin Boilerplate + +```js +class MyResolverPlugin { + constructor(source, target) { + this.source = source; + this.target = target; + } + + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("MyResolverPlugin", (request, resolveContext, callback) => { + // Any logic you need to create a new `request` can go here + resolver.doResolve(target, request, null, resolveContext, callback); + }); + } +} +``` + +Plugins are executed in a pipeline, and register which event they should be executed before/after. In the example above, `source` is the name of the event that starts the pipeline, and `target` is what event this plugin should fire, which is what continues the execution of the pipeline. For an example of how these different plugin events create a chain, see `lib/ResolverFactory.js`, in the `//// pipeline ////` section. + +## Escaping + +It's allowed to escape `#` as `\0#` to avoid parsing it as fragment. + +enhanced-resolve will try to resolve requests containing `#` as path and as fragment, so it will automatically figure out if `./some#thing` means `.../some.js#thing` or `.../some#thing.js`. When a `#` is resolved as path it will be escaped in the result. Here: `.../some\0#thing.js`. + +## Tests + +```sh +yarn test +``` + +## Passing options from webpack + +If you are using `webpack`, and you want to pass custom options to `enhanced-resolve`, the options are passed from the `resolve` key of your webpack configuration e.g.: + +``` +resolve: { + extensions: ['.js', '.jsx'], + modules: [path.resolve(__dirname, 'src'), 'node_modules'], + plugins: [new DirectoryNamedWebpackPlugin()] + ... +}, +``` + +## License + +Copyright (c) 2012-2019 JS Foundation and other contributors + +MIT (http://www.opensource.org/licenses/mit-license.php) + +[npm]: https://img.shields.io/npm/v/enhanced-resolve.svg +[npm-url]: https://www.npmjs.com/package/enhanced-resolve +[build-status]: https://github.com/webpack/enhanced-resolve/actions/workflows/test.yml/badge.svg +[build-status-url]: https://github.com/webpack/enhanced-resolve/actions +[codecov-badge]: https://codecov.io/gh/webpack/enhanced-resolve/branch/main/graph/badge.svg?token=6B6NxtsZc3 +[codecov-url]: https://codecov.io/gh/webpack/enhanced-resolve +[size]: https://packagephobia.com/badge?p=enhanced-resolve +[size-url]: https://packagephobia.com/result?p=enhanced-resolve +[discussion]: https://img.shields.io/github/discussions/webpack/webpack +[discussion-url]: https://github.com/webpack/webpack/discussions diff --git a/node_modules/enhanced-resolve/lib/AliasFieldPlugin.js b/node_modules/enhanced-resolve/lib/AliasFieldPlugin.js new file mode 100644 index 0000000..90b2a08 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/AliasFieldPlugin.js @@ -0,0 +1,105 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const DescriptionFileUtils = require("./DescriptionFileUtils"); +const getInnerRequest = require("./getInnerRequest"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").JsonPrimitive} JsonPrimitive */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class AliasFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | Array} field field + * @param {string | ResolveStepHook} target target + */ + constructor(source, field, target) { + this.source = source; + this.field = field; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("AliasFieldPlugin", (request, resolveContext, callback) => { + if (!request.descriptionFileData) return callback(); + const innerRequest = getInnerRequest(resolver, request); + if (!innerRequest) return callback(); + const fieldData = DescriptionFileUtils.getField( + request.descriptionFileData, + this.field, + ); + if (fieldData === null || typeof fieldData !== "object") { + if (resolveContext.log) { + resolveContext.log( + `Field '${ + this.field + }' doesn't contain a valid alias configuration`, + ); + } + return callback(); + } + /** @type {JsonPrimitive | undefined} */ + const data = Object.prototype.hasOwnProperty.call( + fieldData, + innerRequest, + ) + ? /** @type {{[Key in string]: JsonPrimitive}} */ (fieldData)[ + innerRequest + ] + : innerRequest.startsWith("./") + ? /** @type {{[Key in string]: JsonPrimitive}} */ (fieldData)[ + innerRequest.slice(2) + ] + : undefined; + if (data === innerRequest) return callback(); + if (data === undefined) return callback(); + if (data === false) { + /** @type {ResolveRequest} */ + const ignoreObj = { + ...request, + path: false, + }; + if (typeof resolveContext.yield === "function") { + resolveContext.yield(ignoreObj); + return callback(null, null); + } + return callback(null, ignoreObj); + } + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: /** @type {string} */ (request.descriptionFileRoot), + request: /** @type {string} */ (data), + fullySpecified: false, + }; + resolver.doResolve( + target, + obj, + `aliased from description file ${ + request.descriptionFilePath + } with mapping '${innerRequest}' to '${/** @type {string} */ data}'`, + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other aliasing or raw request + if (result === undefined) return callback(null, null); + callback(null, result); + }, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/AliasPlugin.js b/node_modules/enhanced-resolve/lib/AliasPlugin.js new file mode 100644 index 0000000..aed64ed --- /dev/null +++ b/node_modules/enhanced-resolve/lib/AliasPlugin.js @@ -0,0 +1,178 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const forEachBail = require("./forEachBail"); +const { PathType, getType } = require("./util/path"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {string | Array | false} Alias */ +/** @typedef {{alias: Alias, name: string, onlyModule?: boolean}} AliasOption */ + +module.exports = class AliasPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {AliasOption | Array} options options + * @param {string | ResolveStepHook} target target + */ + constructor(source, options, target) { + this.source = source; + this.options = Array.isArray(options) ? options : [options]; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + /** + * @param {string} maybeAbsolutePath path + * @returns {null|string} absolute path with slash ending + */ + const getAbsolutePathWithSlashEnding = (maybeAbsolutePath) => { + const type = getType(maybeAbsolutePath); + if (type === PathType.AbsolutePosix || type === PathType.AbsoluteWin) { + return resolver.join(maybeAbsolutePath, "_").slice(0, -1); + } + return null; + }; + /** + * @param {string} path path + * @param {string} maybeSubPath sub path + * @returns {boolean} true, if path is sub path + */ + const isSubPath = (path, maybeSubPath) => { + const absolutePath = getAbsolutePathWithSlashEnding(maybeSubPath); + if (!absolutePath) return false; + return path.startsWith(absolutePath); + }; + resolver + .getHook(this.source) + .tapAsync("AliasPlugin", (request, resolveContext, callback) => { + const innerRequest = request.request || request.path; + if (!innerRequest) return callback(); + + forEachBail( + this.options, + (item, callback) => { + /** @type {boolean} */ + let shouldStop = false; + + const matchRequest = + innerRequest === item.name || + (!item.onlyModule && + (request.request + ? innerRequest.startsWith(`${item.name}/`) + : isSubPath(innerRequest, item.name))); + + const splitName = item.name.split("*"); + const matchWildcard = !item.onlyModule && splitName.length === 2; + + if (matchRequest || matchWildcard) { + /** + * @param {Alias} alias alias + * @param {(err?: null|Error, result?: null|ResolveRequest) => void} callback callback + * @returns {void} + */ + const resolveWithAlias = (alias, callback) => { + if (alias === false) { + /** @type {ResolveRequest} */ + const ignoreObj = { + ...request, + path: false, + }; + if (typeof resolveContext.yield === "function") { + resolveContext.yield(ignoreObj); + return callback(null, null); + } + return callback(null, ignoreObj); + } + + let newRequestStr; + + const [prefix, suffix] = splitName; + if ( + matchWildcard && + innerRequest.startsWith(prefix) && + innerRequest.endsWith(suffix) + ) { + const match = innerRequest.slice( + prefix.length, + innerRequest.length - suffix.length, + ); + newRequestStr = item.alias.toString().replace("*", match); + } + + if ( + matchRequest && + innerRequest !== alias && + !innerRequest.startsWith(`${alias}/`) + ) { + /** @type {string} */ + const remainingRequest = innerRequest.slice(item.name.length); + newRequestStr = alias + remainingRequest; + } + + if (newRequestStr !== undefined) { + shouldStop = true; + /** @type {ResolveRequest} */ + const obj = { + ...request, + request: newRequestStr, + fullySpecified: false, + }; + return resolver.doResolve( + target, + obj, + `aliased with mapping '${item.name}': '${alias}' to '${ + newRequestStr + }'`, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + return callback(); + }, + ); + } + return callback(); + }; + + /** + * @param {(null | Error)=} err error + * @param {(null | ResolveRequest)=} result result + * @returns {void} + */ + const stoppingCallback = (err, result) => { + if (err) return callback(err); + + if (result) return callback(null, result); + // Don't allow other aliasing or raw request + if (shouldStop) return callback(null, null); + return callback(); + }; + + if (Array.isArray(item.alias)) { + return forEachBail( + item.alias, + resolveWithAlias, + stoppingCallback, + ); + } + return resolveWithAlias(item.alias, stoppingCallback); + } + + return callback(); + }, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/AppendPlugin.js b/node_modules/enhanced-resolve/lib/AppendPlugin.js new file mode 100644 index 0000000..6763d52 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/AppendPlugin.js @@ -0,0 +1,49 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class AppendPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} appending appending + * @param {string | ResolveStepHook} target target + */ + constructor(source, appending, target) { + this.source = source; + this.appending = appending; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("AppendPlugin", (request, resolveContext, callback) => { + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: request.path + this.appending, + relativePath: + request.relativePath && request.relativePath + this.appending, + }; + resolver.doResolve( + target, + obj, + this.appending, + resolveContext, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js b/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js new file mode 100644 index 0000000..cc1ef80 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js @@ -0,0 +1,676 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const { nextTick } = require("process"); + +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").PathLike} PathLike */ +/** @typedef {import("./Resolver").PathOrFileDescriptor} PathOrFileDescriptor */ +/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ +/** @typedef {FileSystem & SyncFileSystem} BaseFileSystem */ + +/** + * @template T + * @typedef {import("./Resolver").FileSystemCallback} FileSystemCallback + */ + +/** + * @param {string} path path + * @returns {string} dirname + */ +const dirname = (path) => { + let idx = path.length - 1; + while (idx >= 0) { + const char = path.charCodeAt(idx); + // slash or backslash + if (char === 47 || char === 92) break; + idx--; + } + if (idx < 0) return ""; + return path.slice(0, idx); +}; + +/** + * @template T + * @param {FileSystemCallback[]} callbacks callbacks + * @param {Error | null} err error + * @param {T} result result + */ +const runCallbacks = (callbacks, err, result) => { + if (callbacks.length === 1) { + callbacks[0](err, result); + callbacks.length = 0; + return; + } + let error; + for (const callback of callbacks) { + try { + callback(err, result); + } catch (err) { + if (!error) error = err; + } + } + callbacks.length = 0; + if (error) throw error; +}; + +// eslint-disable-next-line jsdoc/no-restricted-syntax +/** @typedef {Function} EXPECTED_FUNCTION */ +// eslint-disable-next-line jsdoc/no-restricted-syntax +/** @typedef {any} EXPECTED_ANY */ + +class OperationMergerBackend { + /** + * @param {EXPECTED_FUNCTION | undefined} provider async method in filesystem + * @param {EXPECTED_FUNCTION | undefined} syncProvider sync method in filesystem + * @param {BaseFileSystem} providerContext call context for the provider methods + */ + constructor(provider, syncProvider, providerContext) { + this._provider = provider; + this._syncProvider = syncProvider; + this._providerContext = providerContext; + this._activeAsyncOperations = new Map(); + + this.provide = this._provider + ? // Comment to align jsdoc + /** + * @param {PathLike | PathOrFileDescriptor} path path + * @param {object | FileSystemCallback | undefined} options options + * @param {FileSystemCallback=} callback callback + * @returns {EXPECTED_ANY} result + */ + (path, options, callback) => { + if (typeof options === "function") { + callback = + /** @type {FileSystemCallback} */ + (options); + options = undefined; + } + if ( + typeof path !== "string" && + !Buffer.isBuffer(path) && + !(path instanceof URL) && + typeof path !== "number" + ) { + /** @type {EXPECTED_FUNCTION} */ + (callback)( + new TypeError("path must be a string, Buffer, URL or number"), + ); + return; + } + if (options) { + return /** @type {EXPECTED_FUNCTION} */ (this._provider).call( + this._providerContext, + path, + options, + callback, + ); + } + let callbacks = this._activeAsyncOperations.get(path); + if (callbacks) { + callbacks.push(callback); + return; + } + this._activeAsyncOperations.set(path, (callbacks = [callback])); + /** @type {EXPECTED_FUNCTION} */ + (provider)( + path, + /** + * @param {Error} err error + * @param {EXPECTED_ANY} result result + */ + (err, result) => { + this._activeAsyncOperations.delete(path); + runCallbacks(callbacks, err, result); + }, + ); + } + : null; + this.provideSync = this._syncProvider + ? // Comment to align jsdoc + /** + * @param {PathLike | PathOrFileDescriptor} path path + * @param {object=} options options + * @returns {EXPECTED_ANY} result + */ + (path, options) => + /** @type {EXPECTED_FUNCTION} */ (this._syncProvider).call( + this._providerContext, + path, + options, + ) + : null; + } + + purge() {} + + purgeParent() {} +} + +/* + +IDLE: + insert data: goto SYNC + +SYNC: + before provide: run ticks + event loop tick: goto ASYNC_ACTIVE + +ASYNC: + timeout: run tick, goto ASYNC_PASSIVE + +ASYNC_PASSIVE: + before provide: run ticks + +IDLE --[insert data]--> SYNC --[event loop tick]--> ASYNC_ACTIVE --[interval tick]-> ASYNC_PASSIVE + ^ | + +---------[insert data]-------+ +*/ + +const STORAGE_MODE_IDLE = 0; +const STORAGE_MODE_SYNC = 1; +const STORAGE_MODE_ASYNC = 2; + +/** + * @callback Provide + * @param {PathLike | PathOrFileDescriptor} path path + * @param {EXPECTED_ANY} options options + * @param {FileSystemCallback} callback callback + * @returns {void} + */ + +class CacheBackend { + /** + * @param {number} duration max cache duration of items + * @param {EXPECTED_FUNCTION | undefined} provider async method + * @param {EXPECTED_FUNCTION | undefined} syncProvider sync method + * @param {BaseFileSystem} providerContext call context for the provider methods + */ + constructor(duration, provider, syncProvider, providerContext) { + this._duration = duration; + this._provider = provider; + this._syncProvider = syncProvider; + this._providerContext = providerContext; + /** @type {Map[]>} */ + this._activeAsyncOperations = new Map(); + /** @type {Map }>} */ + this._data = new Map(); + /** @type {Set[]} */ + this._levels = []; + for (let i = 0; i < 10; i++) this._levels.push(new Set()); + for (let i = 5000; i < duration; i += 500) this._levels.push(new Set()); + this._currentLevel = 0; + this._tickInterval = Math.floor(duration / this._levels.length); + /** @type {STORAGE_MODE_IDLE | STORAGE_MODE_SYNC | STORAGE_MODE_ASYNC} */ + this._mode = STORAGE_MODE_IDLE; + + /** @type {NodeJS.Timeout | undefined} */ + this._timeout = undefined; + /** @type {number | undefined} */ + this._nextDecay = undefined; + + // eslint-disable-next-line no-warning-comments + // @ts-ignore + this.provide = provider ? this.provide.bind(this) : null; + // eslint-disable-next-line no-warning-comments + // @ts-ignore + this.provideSync = syncProvider ? this.provideSync.bind(this) : null; + } + + /** + * @param {PathLike | PathOrFileDescriptor} path path + * @param {EXPECTED_ANY} options options + * @param {FileSystemCallback} callback callback + * @returns {void} + */ + provide(path, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + if ( + typeof path !== "string" && + !Buffer.isBuffer(path) && + !(path instanceof URL) && + typeof path !== "number" + ) { + callback(new TypeError("path must be a string, Buffer, URL or number")); + return; + } + const strPath = typeof path !== "string" ? path.toString() : path; + if (options) { + return /** @type {EXPECTED_FUNCTION} */ (this._provider).call( + this._providerContext, + path, + options, + callback, + ); + } + + // When in sync mode we can move to async mode + if (this._mode === STORAGE_MODE_SYNC) { + this._enterAsyncMode(); + } + + // Check in cache + const cacheEntry = this._data.get(strPath); + if (cacheEntry !== undefined) { + if (cacheEntry.err) return nextTick(callback, cacheEntry.err); + return nextTick(callback, null, cacheEntry.result); + } + + // Check if there is already the same operation running + let callbacks = this._activeAsyncOperations.get(strPath); + if (callbacks !== undefined) { + callbacks.push(callback); + return; + } + this._activeAsyncOperations.set(strPath, (callbacks = [callback])); + + // Run the operation + /** @type {EXPECTED_FUNCTION} */ + (this._provider).call( + this._providerContext, + path, + /** + * @param {Error | null} err error + * @param {EXPECTED_ANY=} result result + */ + (err, result) => { + this._activeAsyncOperations.delete(strPath); + this._storeResult(strPath, err, result); + + // Enter async mode if not yet done + this._enterAsyncMode(); + + runCallbacks( + /** @type {FileSystemCallback[]} */ (callbacks), + err, + result, + ); + }, + ); + } + + /** + * @param {PathLike | PathOrFileDescriptor} path path + * @param {EXPECTED_ANY} options options + * @returns {EXPECTED_ANY} result + */ + provideSync(path, options) { + if ( + typeof path !== "string" && + !Buffer.isBuffer(path) && + !(path instanceof URL) && + typeof path !== "number" + ) { + throw new TypeError("path must be a string"); + } + const strPath = typeof path !== "string" ? path.toString() : path; + if (options) { + return /** @type {EXPECTED_FUNCTION} */ (this._syncProvider).call( + this._providerContext, + path, + options, + ); + } + + // In sync mode we may have to decay some cache items + if (this._mode === STORAGE_MODE_SYNC) { + this._runDecays(); + } + + // Check in cache + const cacheEntry = this._data.get(strPath); + if (cacheEntry !== undefined) { + if (cacheEntry.err) throw cacheEntry.err; + return cacheEntry.result; + } + + // Get all active async operations + // This sync operation will also complete them + const callbacks = this._activeAsyncOperations.get(strPath); + this._activeAsyncOperations.delete(strPath); + + // Run the operation + // When in idle mode, we will enter sync mode + let result; + try { + result = /** @type {EXPECTED_FUNCTION} */ (this._syncProvider).call( + this._providerContext, + path, + ); + } catch (err) { + this._storeResult(strPath, /** @type {Error} */ (err), undefined); + this._enterSyncModeWhenIdle(); + if (callbacks) { + runCallbacks(callbacks, /** @type {Error} */ (err), undefined); + } + throw err; + } + this._storeResult(strPath, null, result); + this._enterSyncModeWhenIdle(); + if (callbacks) { + runCallbacks(callbacks, null, result); + } + return result; + } + + /** + * @param {(string | Buffer | URL | number | (string | URL | Buffer | number)[] | Set)=} what what to purge + */ + purge(what) { + if (!what) { + if (this._mode !== STORAGE_MODE_IDLE) { + this._data.clear(); + for (const level of this._levels) { + level.clear(); + } + this._enterIdleMode(); + } + } else if ( + typeof what === "string" || + Buffer.isBuffer(what) || + what instanceof URL || + typeof what === "number" + ) { + const strWhat = typeof what !== "string" ? what.toString() : what; + for (const [key, data] of this._data) { + if (key.startsWith(strWhat)) { + this._data.delete(key); + data.level.delete(key); + } + } + if (this._data.size === 0) { + this._enterIdleMode(); + } + } else { + for (const [key, data] of this._data) { + for (const item of what) { + const strItem = typeof item !== "string" ? item.toString() : item; + if (key.startsWith(strItem)) { + this._data.delete(key); + data.level.delete(key); + break; + } + } + } + if (this._data.size === 0) { + this._enterIdleMode(); + } + } + } + + /** + * @param {(string | Buffer | URL | number | (string | URL | Buffer | number)[] | Set)=} what what to purge + */ + purgeParent(what) { + if (!what) { + this.purge(); + } else if ( + typeof what === "string" || + Buffer.isBuffer(what) || + what instanceof URL || + typeof what === "number" + ) { + const strWhat = typeof what !== "string" ? what.toString() : what; + this.purge(dirname(strWhat)); + } else { + const set = new Set(); + for (const item of what) { + const strItem = typeof item !== "string" ? item.toString() : item; + set.add(dirname(strItem)); + } + this.purge(set); + } + } + + /** + * @param {string} path path + * @param {Error | null} err error + * @param {EXPECTED_ANY} result result + */ + _storeResult(path, err, result) { + if (this._data.has(path)) return; + const level = this._levels[this._currentLevel]; + this._data.set(path, { err, result, level }); + level.add(path); + } + + _decayLevel() { + const nextLevel = (this._currentLevel + 1) % this._levels.length; + const decay = this._levels[nextLevel]; + this._currentLevel = nextLevel; + for (const item of decay) { + this._data.delete(item); + } + decay.clear(); + if (this._data.size === 0) { + this._enterIdleMode(); + } else { + /** @type {number} */ + (this._nextDecay) += this._tickInterval; + } + } + + _runDecays() { + while ( + /** @type {number} */ (this._nextDecay) <= Date.now() && + this._mode !== STORAGE_MODE_IDLE + ) { + this._decayLevel(); + } + } + + _enterAsyncMode() { + let timeout = 0; + switch (this._mode) { + case STORAGE_MODE_ASYNC: + return; + case STORAGE_MODE_IDLE: + this._nextDecay = Date.now() + this._tickInterval; + timeout = this._tickInterval; + break; + case STORAGE_MODE_SYNC: + this._runDecays(); + // _runDecays may change the mode + if ( + /** @type {STORAGE_MODE_IDLE | STORAGE_MODE_SYNC | STORAGE_MODE_ASYNC} */ + (this._mode) === STORAGE_MODE_IDLE + ) { + return; + } + timeout = Math.max( + 0, + /** @type {number} */ (this._nextDecay) - Date.now(), + ); + break; + } + this._mode = STORAGE_MODE_ASYNC; + const ref = setTimeout(() => { + this._mode = STORAGE_MODE_SYNC; + this._runDecays(); + }, timeout); + if (ref.unref) ref.unref(); + this._timeout = ref; + } + + _enterSyncModeWhenIdle() { + if (this._mode === STORAGE_MODE_IDLE) { + this._mode = STORAGE_MODE_SYNC; + this._nextDecay = Date.now() + this._tickInterval; + } + } + + _enterIdleMode() { + this._mode = STORAGE_MODE_IDLE; + this._nextDecay = undefined; + if (this._timeout) clearTimeout(this._timeout); + } +} + +/** + * @template {EXPECTED_FUNCTION} Provider + * @template {EXPECTED_FUNCTION} AsyncProvider + * @template FileSystem + * @param {number} duration duration in ms files are cached + * @param {Provider | undefined} provider provider + * @param {AsyncProvider | undefined} syncProvider sync provider + * @param {BaseFileSystem} providerContext provider context + * @returns {OperationMergerBackend | CacheBackend} backend + */ +const createBackend = (duration, provider, syncProvider, providerContext) => { + if (duration > 0) { + return new CacheBackend(duration, provider, syncProvider, providerContext); + } + return new OperationMergerBackend(provider, syncProvider, providerContext); +}; + +module.exports = class CachedInputFileSystem { + /** + * @param {BaseFileSystem} fileSystem file system + * @param {number} duration duration in ms files are cached + */ + constructor(fileSystem, duration) { + this.fileSystem = fileSystem; + + this._lstatBackend = createBackend( + duration, + this.fileSystem.lstat, + this.fileSystem.lstatSync, + this.fileSystem, + ); + const lstat = this._lstatBackend.provide; + this.lstat = /** @type {FileSystem["lstat"]} */ (lstat); + const lstatSync = this._lstatBackend.provideSync; + this.lstatSync = /** @type {SyncFileSystem["lstatSync"]} */ (lstatSync); + + this._statBackend = createBackend( + duration, + this.fileSystem.stat, + this.fileSystem.statSync, + this.fileSystem, + ); + const stat = this._statBackend.provide; + this.stat = /** @type {FileSystem["stat"]} */ (stat); + const statSync = this._statBackend.provideSync; + this.statSync = /** @type {SyncFileSystem["statSync"]} */ (statSync); + + this._readdirBackend = createBackend( + duration, + this.fileSystem.readdir, + this.fileSystem.readdirSync, + this.fileSystem, + ); + const readdir = this._readdirBackend.provide; + this.readdir = /** @type {FileSystem["readdir"]} */ (readdir); + const readdirSync = this._readdirBackend.provideSync; + this.readdirSync = /** @type {SyncFileSystem["readdirSync"]} */ ( + readdirSync + ); + + this._readFileBackend = createBackend( + duration, + this.fileSystem.readFile, + this.fileSystem.readFileSync, + this.fileSystem, + ); + const readFile = this._readFileBackend.provide; + this.readFile = /** @type {FileSystem["readFile"]} */ (readFile); + const readFileSync = this._readFileBackend.provideSync; + this.readFileSync = /** @type {SyncFileSystem["readFileSync"]} */ ( + readFileSync + ); + + this._readJsonBackend = createBackend( + duration, + // prettier-ignore + this.fileSystem.readJson || + (this.readFile && + ( + /** + * @param {string} path path + * @param {FileSystemCallback} callback callback + */ + (path, callback) => { + this.readFile(path, (err, buffer) => { + if (err) return callback(err); + if (!buffer || buffer.length === 0) + {return callback(new Error("No file content"));} + let data; + try { + data = JSON.parse(buffer.toString("utf8")); + } catch (err_) { + return callback(/** @type {Error} */ (err_)); + } + callback(null, data); + }); + }) + ), + // prettier-ignore + this.fileSystem.readJsonSync || + (this.readFileSync && + ( + /** + * @param {string} path path + * @returns {EXPECTED_ANY} result + */ + (path) => { + const buffer = this.readFileSync(path); + const data = JSON.parse(buffer.toString("utf8")); + return data; + } + )), + this.fileSystem, + ); + const readJson = this._readJsonBackend.provide; + this.readJson = /** @type {FileSystem["readJson"]} */ (readJson); + const readJsonSync = this._readJsonBackend.provideSync; + this.readJsonSync = /** @type {SyncFileSystem["readJsonSync"]} */ ( + readJsonSync + ); + + this._readlinkBackend = createBackend( + duration, + this.fileSystem.readlink, + this.fileSystem.readlinkSync, + this.fileSystem, + ); + const readlink = this._readlinkBackend.provide; + this.readlink = /** @type {FileSystem["readlink"]} */ (readlink); + const readlinkSync = this._readlinkBackend.provideSync; + this.readlinkSync = /** @type {SyncFileSystem["readlinkSync"]} */ ( + readlinkSync + ); + + this._realpathBackend = createBackend( + duration, + this.fileSystem.realpath, + this.fileSystem.realpathSync, + this.fileSystem, + ); + const realpath = this._realpathBackend.provide; + this.realpath = /** @type {FileSystem["realpath"]} */ (realpath); + const realpathSync = this._realpathBackend.provideSync; + this.realpathSync = /** @type {SyncFileSystem["realpathSync"]} */ ( + realpathSync + ); + } + + /** + * @param {(string | Buffer | URL | number | (string | URL | Buffer | number)[] | Set)=} what what to purge + */ + purge(what) { + this._statBackend.purge(what); + this._lstatBackend.purge(what); + this._readdirBackend.purgeParent(what); + this._readFileBackend.purge(what); + this._readlinkBackend.purge(what); + this._readJsonBackend.purge(what); + this._realpathBackend.purge(what); + } +}; diff --git a/node_modules/enhanced-resolve/lib/CloneBasenamePlugin.js b/node_modules/enhanced-resolve/lib/CloneBasenamePlugin.js new file mode 100644 index 0000000..295adaa --- /dev/null +++ b/node_modules/enhanced-resolve/lib/CloneBasenamePlugin.js @@ -0,0 +1,53 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const { basename } = require("./getPaths"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class CloneBasenamePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("CloneBasenamePlugin", (request, resolveContext, callback) => { + const requestPath = /** @type {string} */ (request.path); + const filename = /** @type {string} */ (basename(requestPath)); + const filePath = resolver.join(requestPath, filename); + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: filePath, + relativePath: + request.relativePath && + resolver.join(request.relativePath, filename), + }; + resolver.doResolve( + target, + obj, + `using path: ${filePath}`, + resolveContext, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ConditionalPlugin.js b/node_modules/enhanced-resolve/lib/ConditionalPlugin.js new file mode 100644 index 0000000..99cc09d --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ConditionalPlugin.js @@ -0,0 +1,59 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ConditionalPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Partial} test compare object + * @param {string | null} message log message + * @param {boolean} allowAlternatives when false, do not continue with the current step when "test" matches + * @param {string | ResolveStepHook} target target + */ + constructor(source, test, message, allowAlternatives, target) { + this.source = source; + this.test = test; + this.message = message; + this.allowAlternatives = allowAlternatives; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const { test, message, allowAlternatives } = this; + const keys = /** @type {(keyof ResolveRequest)[]} */ (Object.keys(test)); + resolver + .getHook(this.source) + .tapAsync("ConditionalPlugin", (request, resolveContext, callback) => { + for (const prop of keys) { + if (request[prop] !== test[prop]) return callback(); + } + resolver.doResolve( + target, + request, + message, + resolveContext, + allowAlternatives + ? callback + : (err, result) => { + if (err) return callback(err); + + // Don't allow other alternatives + if (result === undefined) return callback(null, null); + callback(null, result); + }, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js b/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js new file mode 100644 index 0000000..9fbb165 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js @@ -0,0 +1,98 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const DescriptionFileUtils = require("./DescriptionFileUtils"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class DescriptionFilePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string[]} filenames filenames + * @param {boolean} pathIsFile pathIsFile + * @param {string | ResolveStepHook} target target + */ + constructor(source, filenames, pathIsFile, target) { + this.source = source; + this.filenames = filenames; + this.pathIsFile = pathIsFile; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "DescriptionFilePlugin", + (request, resolveContext, callback) => { + const { path } = request; + if (!path) return callback(); + const directory = this.pathIsFile + ? DescriptionFileUtils.cdUp(path) + : path; + if (!directory) return callback(); + DescriptionFileUtils.loadDescriptionFile( + resolver, + directory, + this.filenames, + request.descriptionFilePath + ? { + path: request.descriptionFilePath, + content: request.descriptionFileData, + directory: + /** @type {string} */ + (request.descriptionFileRoot), + } + : undefined, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (!result) { + if (resolveContext.log) { + resolveContext.log( + `No description file found in ${directory} or above`, + ); + } + return callback(); + } + const relativePath = `.${path.slice(result.directory.length).replace(/\\/g, "/")}`; + /** @type {ResolveRequest} */ + const obj = { + ...request, + descriptionFilePath: result.path, + descriptionFileData: result.content, + descriptionFileRoot: result.directory, + relativePath, + }; + resolver.doResolve( + target, + obj, + `using description file: ${result.path} (relative path: ${ + relativePath + })`, + resolveContext, + (err, result) => { + if (err) return callback(err); + + // Don't allow other processing + if (result === undefined) return callback(null, null); + callback(null, result); + }, + ); + }, + ); + }, + ); + } +}; diff --git a/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js b/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js new file mode 100644 index 0000000..48269aa --- /dev/null +++ b/node_modules/enhanced-resolve/lib/DescriptionFileUtils.js @@ -0,0 +1,197 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const forEachBail = require("./forEachBail"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").JsonObject} JsonObject */ +/** @typedef {import("./Resolver").JsonValue} JsonValue */ +/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ + +/** + * @typedef {object} DescriptionFileInfo + * @property {JsonObject=} content content + * @property {string} path path + * @property {string} directory directory + */ + +/** + * @callback ErrorFirstCallback + * @param {Error|null=} error + * @param {DescriptionFileInfo=} result + */ + +/** + * @typedef {object} Result + * @property {string} path path to description file + * @property {string} directory directory of description file + * @property {JsonObject} content content of description file + */ + +/** + * @param {string} directory directory + * @returns {string|null} parent directory or null + */ +function cdUp(directory) { + if (directory === "/") return null; + const i = directory.lastIndexOf("/"); + const j = directory.lastIndexOf("\\"); + const path = i < 0 ? j : j < 0 ? i : i < j ? j : i; + if (path < 0) return null; + return directory.slice(0, path || 1); +} + +/** + * @param {Resolver} resolver resolver + * @param {string} directory directory + * @param {string[]} filenames filenames + * @param {DescriptionFileInfo|undefined} oldInfo oldInfo + * @param {ResolveContext} resolveContext resolveContext + * @param {ErrorFirstCallback} callback callback + */ +function loadDescriptionFile( + resolver, + directory, + filenames, + oldInfo, + resolveContext, + callback, +) { + (function findDescriptionFile() { + if (oldInfo && oldInfo.directory === directory) { + // We already have info for this directory and can reuse it + return callback(null, oldInfo); + } + forEachBail( + filenames, + /** + * @param {string} filename filename + * @param {(err?: null|Error, result?: null|Result) => void} callback callback + * @returns {void} + */ + (filename, callback) => { + const descriptionFilePath = resolver.join(directory, filename); + + /** + * @param {(null | Error)=} err error + * @param {JsonObject=} resolvedContent content + * @returns {void} + */ + function onJson(err, resolvedContent) { + if (err) { + if (resolveContext.log) { + resolveContext.log( + `${descriptionFilePath} (directory description file): ${err}`, + ); + } else { + err.message = `${descriptionFilePath} (directory description file): ${err}`; + } + return callback(err); + } + callback(null, { + content: /** @type {JsonObject} */ (resolvedContent), + directory, + path: descriptionFilePath, + }); + } + + if (resolver.fileSystem.readJson) { + resolver.fileSystem.readJson(descriptionFilePath, (err, content) => { + if (err) { + if ( + typeof (/** @type {NodeJS.ErrnoException} */ (err).code) !== + "undefined" + ) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(descriptionFilePath); + } + return callback(); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(descriptionFilePath); + } + return onJson(err); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(descriptionFilePath); + } + onJson(null, content); + }); + } else { + resolver.fileSystem.readFile(descriptionFilePath, (err, content) => { + if (err) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(descriptionFilePath); + } + return callback(); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(descriptionFilePath); + } + + /** @type {JsonObject | undefined} */ + let json; + + if (content) { + try { + json = JSON.parse(content.toString()); + } catch (/** @type {unknown} */ err_) { + return onJson(/** @type {Error} */ (err_)); + } + } else { + return onJson(new Error("No content in file")); + } + + onJson(null, json); + }); + } + }, + /** + * @param {(null | Error)=} err error + * @param {(null | Result)=} result result + * @returns {void} + */ + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + const dir = cdUp(directory); + if (!dir) { + return callback(); + } + directory = dir; + return findDescriptionFile(); + }, + ); + })(); +} + +/** + * @param {JsonObject} content content + * @param {string|string[]} field field + * @returns {JsonValue | undefined} field data + */ +function getField(content, field) { + if (!content) return undefined; + if (Array.isArray(field)) { + /** @type {JsonValue} */ + let current = content; + for (let j = 0; j < field.length; j++) { + if (current === null || typeof current !== "object") { + current = null; + break; + } + current = /** @type {JsonObject} */ (current)[field[j]]; + } + return current; + } + return content[field]; +} + +module.exports.loadDescriptionFile = loadDescriptionFile; +module.exports.getField = getField; +module.exports.cdUp = cdUp; diff --git a/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js b/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js new file mode 100644 index 0000000..78a4639 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js @@ -0,0 +1,68 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class DirectoryExistsPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "DirectoryExistsPlugin", + (request, resolveContext, callback) => { + const fs = resolver.fileSystem; + const directory = request.path; + if (!directory) return callback(); + fs.stat(directory, (err, stat) => { + if (err || !stat) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(directory); + } + if (resolveContext.log) { + resolveContext.log(`${directory} doesn't exist`); + } + return callback(); + } + if (!stat.isDirectory()) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(directory); + } + if (resolveContext.log) { + resolveContext.log(`${directory} is not a directory`); + } + return callback(); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(directory); + } + resolver.doResolve( + target, + request, + `existing directory ${directory}`, + resolveContext, + callback, + ); + }); + }, + ); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js b/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js new file mode 100644 index 0000000..6f581fb --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js @@ -0,0 +1,201 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +const DescriptionFileUtils = require("./DescriptionFileUtils"); +const forEachBail = require("./forEachBail"); +const { processExportsField } = require("./util/entrypoints"); +const { parseIdentifier } = require("./util/identifier"); +const { + invalidSegmentRegEx, + deprecatedInvalidSegmentRegEx, +} = require("./util/path"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").JsonObject} JsonObject */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {import("./util/entrypoints").ExportsField} ExportsField */ +/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */ + +module.exports = class ExportsFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Set} conditionNames condition names + * @param {string | string[]} fieldNamePath name path + * @param {string | ResolveStepHook} target target + */ + constructor(source, conditionNames, fieldNamePath, target) { + this.source = source; + this.target = target; + this.conditionNames = conditionNames; + this.fieldName = fieldNamePath; + /** @type {WeakMap} */ + this.fieldProcessorCache = new WeakMap(); + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ExportsFieldPlugin", (request, resolveContext, callback) => { + // When there is no description file, abort + if (!request.descriptionFilePath) return callback(); + if ( + // When the description file is inherited from parent, abort + // (There is no description file inside of this package) + request.relativePath !== "." || + request.request === undefined + ) { + return callback(); + } + + const remainingRequest = + request.query || request.fragment + ? (request.request === "." ? "./" : request.request) + + request.query + + request.fragment + : request.request; + const exportsField = + /** @type {ExportsField|null|undefined} */ + ( + DescriptionFileUtils.getField( + /** @type {JsonObject} */ (request.descriptionFileData), + this.fieldName, + ) + ); + if (!exportsField) return callback(); + + if (request.directory) { + return callback( + new Error( + `Resolving to directories is not possible with the exports field (request was ${remainingRequest}/)`, + ), + ); + } + + /** @type {string[]} */ + let paths; + /** @type {string | null} */ + let usedField; + + try { + // We attach the cache to the description file instead of the exportsField value + // because we use a WeakMap and the exportsField could be a string too. + // Description file is always an object when exports field can be accessed. + let fieldProcessor = this.fieldProcessorCache.get( + /** @type {JsonObject} */ (request.descriptionFileData), + ); + if (fieldProcessor === undefined) { + fieldProcessor = processExportsField(exportsField); + this.fieldProcessorCache.set( + /** @type {JsonObject} */ (request.descriptionFileData), + fieldProcessor, + ); + } + [paths, usedField] = fieldProcessor( + remainingRequest, + this.conditionNames, + ); + } catch (/** @type {unknown} */ err) { + if (resolveContext.log) { + resolveContext.log( + `Exports field in ${request.descriptionFilePath} can't be processed: ${err}`, + ); + } + return callback(/** @type {Error} */ (err)); + } + + if (paths.length === 0) { + return callback( + new Error( + `Package path ${remainingRequest} is not exported from package ${request.descriptionFileRoot} (see exports field in ${request.descriptionFilePath})`, + ), + ); + } + + forEachBail( + paths, + /** + * @param {string} path path + * @param {(err?: null|Error, result?: null|ResolveRequest) => void} callback callback + * @param {number} i index + * @returns {void} + */ + (path, callback, i) => { + const parsedIdentifier = parseIdentifier(path); + + if (!parsedIdentifier) return callback(); + + const [relativePath, query, fragment] = parsedIdentifier; + + if (relativePath.length === 0 || !relativePath.startsWith("./")) { + if (paths.length === i) { + return callback( + new Error( + `Invalid "exports" target "${path}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`, + ), + ); + } + + return callback(); + } + + if ( + invalidSegmentRegEx.exec(relativePath.slice(2)) !== null && + deprecatedInvalidSegmentRegEx.test(relativePath.slice(2)) !== null + ) { + if (paths.length === i) { + return callback( + new Error( + `Invalid "exports" target "${path}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`, + ), + ); + } + + return callback(); + } + + /** @type {ResolveRequest} */ + const obj = { + ...request, + request: undefined, + path: resolver.join( + /** @type {string} */ (request.descriptionFileRoot), + relativePath, + ), + relativePath, + query, + fragment, + }; + + resolver.doResolve( + target, + obj, + `using exports field: ${path}`, + resolveContext, + (err, result) => { + if (err) return callback(err); + // Don't allow to continue - https://github.com/webpack/enhanced-resolve/issues/400 + if (result === undefined) return callback(null, null); + callback(null, result); + }, + ); + }, + /** + * @param {(null | Error)=} err error + * @param {(null | ResolveRequest)=} result result + * @returns {void} + */ + (err, result) => callback(err, result || null), + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ExtensionAliasPlugin.js b/node_modules/enhanced-resolve/lib/ExtensionAliasPlugin.js new file mode 100644 index 0000000..4184eb3 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ExtensionAliasPlugin.js @@ -0,0 +1,100 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +const forEachBail = require("./forEachBail"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {{ alias: string|string[], extension: string }} ExtensionAliasOption */ + +module.exports = class ExtensionAliasPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {ExtensionAliasOption} options options + * @param {string | ResolveStepHook} target target + */ + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const { extension, alias } = this.options; + resolver + .getHook(this.source) + .tapAsync("ExtensionAliasPlugin", (request, resolveContext, callback) => { + const requestPath = request.request; + if (!requestPath || !requestPath.endsWith(extension)) return callback(); + const isAliasString = typeof alias === "string"; + /** + * @param {string} alias extension alias + * @param {(err?: null | Error, result?: null|ResolveRequest) => void} callback callback + * @param {number=} index index + * @returns {void} + */ + const resolve = (alias, callback, index) => { + const newRequest = `${requestPath.slice( + 0, + -extension.length, + )}${alias}`; + + return resolver.doResolve( + target, + { + ...request, + request: newRequest, + fullySpecified: true, + }, + `aliased from extension alias with mapping '${extension}' to '${alias}'`, + resolveContext, + (err, result) => { + // Throw error if we are on the last alias (for multiple aliases) and it failed, always throw if we are not an array or we have only one alias + if (!isAliasString && index) { + if (index !== this.options.alias.length) { + if (resolveContext.log) { + resolveContext.log( + `Failed to alias from extension alias with mapping '${extension}' to '${alias}' for '${newRequest}': ${err}`, + ); + } + + return callback(null, result); + } + + return callback(err, result); + } + callback(err, result); + }, + ); + }; + /** + * @param {(null | Error)=} err error + * @param {(null | ResolveRequest)=} result result + * @returns {void} + */ + const stoppingCallback = (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + // Don't allow other aliasing or raw request + return callback(null, null); + }; + if (isAliasString) { + resolve(alias, stoppingCallback); + } else if (alias.length > 1) { + forEachBail(alias, resolve, stoppingCallback); + } else { + resolve(alias[0], stoppingCallback); + } + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/FileExistsPlugin.js b/node_modules/enhanced-resolve/lib/FileExistsPlugin.js new file mode 100644 index 0000000..cf9c839 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/FileExistsPlugin.js @@ -0,0 +1,61 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class FileExistsPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const fs = resolver.fileSystem; + resolver + .getHook(this.source) + .tapAsync("FileExistsPlugin", (request, resolveContext, callback) => { + const file = request.path; + if (!file) return callback(); + fs.stat(file, (err, stat) => { + if (err || !stat) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(file); + } + if (resolveContext.log) resolveContext.log(`${file} doesn't exist`); + return callback(); + } + if (!stat.isFile()) { + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(file); + } + if (resolveContext.log) resolveContext.log(`${file} is not a file`); + return callback(); + } + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(file); + } + resolver.doResolve( + target, + request, + `existing file: ${file}`, + resolveContext, + callback, + ); + }); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js b/node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js new file mode 100644 index 0000000..ebc1b59 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js @@ -0,0 +1,223 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +const DescriptionFileUtils = require("./DescriptionFileUtils"); +const forEachBail = require("./forEachBail"); +const { processImportsField } = require("./util/entrypoints"); +const { parseIdentifier } = require("./util/identifier"); +const { + invalidSegmentRegEx, + deprecatedInvalidSegmentRegEx, +} = require("./util/path"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").JsonObject} JsonObject */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {import("./util/entrypoints").FieldProcessor} FieldProcessor */ +/** @typedef {import("./util/entrypoints").ImportsField} ImportsField */ + +const dotCode = ".".charCodeAt(0); + +module.exports = class ImportsFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Set} conditionNames condition names + * @param {string | string[]} fieldNamePath name path + * @param {string | ResolveStepHook} targetFile target file + * @param {string | ResolveStepHook} targetPackage target package + */ + constructor( + source, + conditionNames, + fieldNamePath, + targetFile, + targetPackage, + ) { + this.source = source; + this.targetFile = targetFile; + this.targetPackage = targetPackage; + this.conditionNames = conditionNames; + this.fieldName = fieldNamePath; + /** @type {WeakMap} */ + this.fieldProcessorCache = new WeakMap(); + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const targetFile = resolver.ensureHook(this.targetFile); + const targetPackage = resolver.ensureHook(this.targetPackage); + + resolver + .getHook(this.source) + .tapAsync("ImportsFieldPlugin", (request, resolveContext, callback) => { + // When there is no description file, abort + if (!request.descriptionFilePath || request.request === undefined) { + return callback(); + } + + const remainingRequest = + request.request + request.query + request.fragment; + const importsField = + /** @type {ImportsField|null|undefined} */ + ( + DescriptionFileUtils.getField( + /** @type {JsonObject} */ (request.descriptionFileData), + this.fieldName, + ) + ); + if (!importsField) return callback(); + + if (request.directory) { + return callback( + new Error( + `Resolving to directories is not possible with the imports field (request was ${remainingRequest}/)`, + ), + ); + } + + /** @type {string[]} */ + let paths; + /** @type {string | null} */ + let usedField; + + try { + // We attach the cache to the description file instead of the importsField value + // because we use a WeakMap and the importsField could be a string too. + // Description file is always an object when exports field can be accessed. + let fieldProcessor = this.fieldProcessorCache.get( + /** @type {JsonObject} */ (request.descriptionFileData), + ); + if (fieldProcessor === undefined) { + fieldProcessor = processImportsField(importsField); + this.fieldProcessorCache.set( + /** @type {JsonObject} */ (request.descriptionFileData), + fieldProcessor, + ); + } + [paths, usedField] = fieldProcessor( + remainingRequest, + this.conditionNames, + ); + } catch (/** @type {unknown} */ err) { + if (resolveContext.log) { + resolveContext.log( + `Imports field in ${request.descriptionFilePath} can't be processed: ${err}`, + ); + } + return callback(/** @type {Error} */ (err)); + } + + if (paths.length === 0) { + return callback( + new Error( + `Package import ${remainingRequest} is not imported from package ${request.descriptionFileRoot} (see imports field in ${request.descriptionFilePath})`, + ), + ); + } + + forEachBail( + paths, + /** + * @param {string} path path + * @param {(err?: null|Error, result?: null|ResolveRequest) => void} callback callback + * @param {number} i index + * @returns {void} + */ + (path, callback, i) => { + const parsedIdentifier = parseIdentifier(path); + + if (!parsedIdentifier) return callback(); + + const [path_, query, fragment] = parsedIdentifier; + + switch (path_.charCodeAt(0)) { + // should be relative + case dotCode: { + if ( + invalidSegmentRegEx.exec(path_.slice(2)) !== null && + deprecatedInvalidSegmentRegEx.test(path_.slice(2)) !== null + ) { + if (paths.length === i) { + return callback( + new Error( + `Invalid "imports" target "${path}" defined for "${usedField}" in the package config ${request.descriptionFilePath}, targets must start with "./"`, + ), + ); + } + + return callback(); + } + + /** @type {ResolveRequest} */ + const obj = { + ...request, + request: undefined, + path: resolver.join( + /** @type {string} */ (request.descriptionFileRoot), + path_, + ), + relativePath: path_, + query, + fragment, + }; + + resolver.doResolve( + targetFile, + obj, + `using imports field: ${path}`, + resolveContext, + (err, result) => { + if (err) return callback(err); + // Don't allow to continue - https://github.com/webpack/enhanced-resolve/issues/400 + if (result === undefined) return callback(null, null); + callback(null, result); + }, + ); + break; + } + + // package resolving + default: { + /** @type {ResolveRequest} */ + const obj = { + ...request, + request: path_, + relativePath: path_, + fullySpecified: true, + query, + fragment, + }; + + resolver.doResolve( + targetPackage, + obj, + `using imports field: ${path}`, + resolveContext, + (err, result) => { + if (err) return callback(err); + // Don't allow to continue - https://github.com/webpack/enhanced-resolve/issues/400 + if (result === undefined) return callback(null, null); + callback(null, result); + }, + ); + } + } + }, + /** + * @param {(null|Error)=} err error + * @param {(null|ResolveRequest)=} result result + * @returns {void} + */ + (err, result) => callback(err, result || null), + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/JoinRequestPartPlugin.js b/node_modules/enhanced-resolve/lib/JoinRequestPartPlugin.js new file mode 100644 index 0000000..a171b98 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/JoinRequestPartPlugin.js @@ -0,0 +1,75 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +const namespaceStartCharCode = "@".charCodeAt(0); + +module.exports = class JoinRequestPartPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "JoinRequestPartPlugin", + (request, resolveContext, callback) => { + const req = request.request || ""; + let i = req.indexOf("/", 3); + + if (i >= 0 && req.charCodeAt(2) === namespaceStartCharCode) { + i = req.indexOf("/", i + 1); + } + + /** @type {string} */ + let moduleName; + /** @type {string} */ + let remainingRequest; + /** @type {boolean} */ + let fullySpecified; + if (i < 0) { + moduleName = req; + remainingRequest = "."; + fullySpecified = false; + } else { + moduleName = req.slice(0, i); + remainingRequest = `.${req.slice(i)}`; + fullySpecified = /** @type {boolean} */ (request.fullySpecified); + } + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: resolver.join( + /** @type {string} */ + (request.path), + moduleName, + ), + relativePath: + request.relativePath && + resolver.join(request.relativePath, moduleName), + request: remainingRequest, + fullySpecified, + }; + resolver.doResolve(target, obj, null, resolveContext, callback); + }, + ); + } +}; diff --git a/node_modules/enhanced-resolve/lib/JoinRequestPlugin.js b/node_modules/enhanced-resolve/lib/JoinRequestPlugin.js new file mode 100644 index 0000000..108958e --- /dev/null +++ b/node_modules/enhanced-resolve/lib/JoinRequestPlugin.js @@ -0,0 +1,45 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class JoinRequestPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("JoinRequestPlugin", (request, resolveContext, callback) => { + const requestPath = /** @type {string} */ (request.path); + const requestRequest = /** @type {string} */ (request.request); + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: resolver.join(requestPath, requestRequest), + relativePath: + request.relativePath && + resolver.join(request.relativePath, requestRequest), + request: undefined, + }; + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/LogInfoPlugin.js b/node_modules/enhanced-resolve/lib/LogInfoPlugin.js new file mode 100644 index 0000000..94aecc1 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/LogInfoPlugin.js @@ -0,0 +1,60 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class LogInfoPlugin { + /** + * @param {string | ResolveStepHook} source source + */ + constructor(source) { + this.source = source; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const { source } = this; + resolver + .getHook(this.source) + .tapAsync("LogInfoPlugin", (request, resolveContext, callback) => { + if (!resolveContext.log) return callback(); + const { log } = resolveContext; + const prefix = `[${source}] `; + if (request.path) { + log(`${prefix}Resolving in directory: ${request.path}`); + } + if (request.request) { + log(`${prefix}Resolving request: ${request.request}`); + } + if (request.module) log(`${prefix}Request is an module request.`); + if (request.directory) log(`${prefix}Request is a directory request.`); + if (request.query) { + log(`${prefix}Resolving request query: ${request.query}`); + } + if (request.fragment) { + log(`${prefix}Resolving request fragment: ${request.fragment}`); + } + if (request.descriptionFilePath) { + log( + `${prefix}Has description data from ${request.descriptionFilePath}`, + ); + } + if (request.relativePath) { + log( + `${prefix}Relative path from description file is: ${ + request.relativePath + }`, + ); + } + callback(); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/MainFieldPlugin.js b/node_modules/enhanced-resolve/lib/MainFieldPlugin.js new file mode 100644 index 0000000..1a52681 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/MainFieldPlugin.js @@ -0,0 +1,87 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const path = require("path"); +const DescriptionFileUtils = require("./DescriptionFileUtils"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").JsonObject} JsonObject */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +/** @typedef {{name: string|Array, forceRelative: boolean}} MainFieldOptions */ + +const alreadyTriedMainField = Symbol("alreadyTriedMainField"); + +module.exports = class MainFieldPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {MainFieldOptions} options options + * @param {string | ResolveStepHook} target target + */ + constructor(source, options, target) { + this.source = source; + this.options = options; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("MainFieldPlugin", (request, resolveContext, callback) => { + if ( + request.path !== request.descriptionFileRoot || + /** @type {ResolveRequest & { [alreadyTriedMainField]?: string }} */ + (request)[alreadyTriedMainField] === request.descriptionFilePath || + !request.descriptionFilePath + ) { + return callback(); + } + const filename = path.basename(request.descriptionFilePath); + let mainModule = + /** @type {string|null|undefined} */ + ( + DescriptionFileUtils.getField( + /** @type {JsonObject} */ (request.descriptionFileData), + this.options.name, + ) + ); + + if ( + !mainModule || + typeof mainModule !== "string" || + mainModule === "." || + mainModule === "./" + ) { + return callback(); + } + if (this.options.forceRelative && !/^\.\.?\//.test(mainModule)) { + mainModule = `./${mainModule}`; + } + /** @type {ResolveRequest & { [alreadyTriedMainField]?: string }} */ + const obj = { + ...request, + request: mainModule, + module: false, + directory: mainModule.endsWith("/"), + [alreadyTriedMainField]: request.descriptionFilePath, + }; + return resolver.doResolve( + target, + obj, + `use ${mainModule} from ${this.options.name} in ${filename}`, + resolveContext, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.js b/node_modules/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.js new file mode 100644 index 0000000..06065e8 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.js @@ -0,0 +1,9 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +// TODO remove in next major +module.exports = require("./ModulesInHierarchicalDirectoriesPlugin"); diff --git a/node_modules/enhanced-resolve/lib/ModulesInHierarchicalDirectoriesPlugin.js b/node_modules/enhanced-resolve/lib/ModulesInHierarchicalDirectoriesPlugin.js new file mode 100644 index 0000000..8ed78cd --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ModulesInHierarchicalDirectoriesPlugin.js @@ -0,0 +1,91 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const forEachBail = require("./forEachBail"); +const getPaths = require("./getPaths"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ModulesInHierarchicalDirectoriesPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | Array} directories directories + * @param {string | ResolveStepHook} target target + */ + constructor(source, directories, target) { + this.source = source; + this.directories = /** @type {Array} */ [...directories]; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync( + "ModulesInHierarchicalDirectoriesPlugin", + (request, resolveContext, callback) => { + const fs = resolver.fileSystem; + const addrs = getPaths(/** @type {string} */ (request.path)) + .paths.map((path) => + this.directories.map((directory) => + resolver.join(path, directory), + ), + ) + .reduce((array, path) => { + array.push(...path); + return array; + }, []); + forEachBail( + addrs, + /** + * @param {string} addr addr + * @param {(err?: null|Error, result?: null|ResolveRequest) => void} callback callback + * @returns {void} + */ + (addr, callback) => { + fs.stat(addr, (err, stat) => { + if (!err && stat && stat.isDirectory()) { + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: addr, + request: `./${request.request}`, + module: false, + }; + const message = `looking for modules in ${addr}`; + return resolver.doResolve( + target, + obj, + message, + resolveContext, + callback, + ); + } + if (resolveContext.log) { + resolveContext.log( + `${addr} doesn't exist or is not a directory`, + ); + } + if (resolveContext.missingDependencies) { + resolveContext.missingDependencies.add(addr); + } + return callback(); + }); + }, + callback, + ); + }, + ); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ModulesInRootPlugin.js b/node_modules/enhanced-resolve/lib/ModulesInRootPlugin.js new file mode 100644 index 0000000..7797a11 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ModulesInRootPlugin.js @@ -0,0 +1,49 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ModulesInRootPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} path path + * @param {string | ResolveStepHook} target target + */ + constructor(source, path, target) { + this.source = source; + this.path = path; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ModulesInRootPlugin", (request, resolveContext, callback) => { + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: this.path, + request: `./${request.request}`, + module: false, + }; + resolver.doResolve( + target, + obj, + `looking for modules in ${this.path}`, + resolveContext, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/NextPlugin.js b/node_modules/enhanced-resolve/lib/NextPlugin.js new file mode 100644 index 0000000..e59c56b --- /dev/null +++ b/node_modules/enhanced-resolve/lib/NextPlugin.js @@ -0,0 +1,33 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class NextPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("NextPlugin", (request, resolveContext, callback) => { + resolver.doResolve(target, request, null, resolveContext, callback); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ParsePlugin.js b/node_modules/enhanced-resolve/lib/ParsePlugin.js new file mode 100644 index 0000000..c96c210 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ParsePlugin.js @@ -0,0 +1,77 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ParsePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Partial} requestOptions request options + * @param {string | ResolveStepHook} target target + */ + constructor(source, requestOptions, target) { + this.source = source; + this.requestOptions = requestOptions; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("ParsePlugin", (request, resolveContext, callback) => { + const parsed = resolver.parse(/** @type {string} */ (request.request)); + /** @type {ResolveRequest} */ + const obj = { ...request, ...parsed, ...this.requestOptions }; + if (request.query && !parsed.query) { + obj.query = request.query; + } + if (request.fragment && !parsed.fragment) { + obj.fragment = request.fragment; + } + if (parsed && resolveContext.log) { + if (parsed.module) resolveContext.log("Parsed request is a module"); + if (parsed.directory) { + resolveContext.log("Parsed request is a directory"); + } + } + // There is an edge-case where a request with # can be a path or a fragment -> try both + if (obj.request && !obj.query && obj.fragment) { + const directory = obj.fragment.endsWith("/"); + /** @type {ResolveRequest} */ + const alternative = { + ...obj, + directory, + request: + obj.request + + (obj.directory ? "/" : "") + + (directory ? obj.fragment.slice(0, -1) : obj.fragment), + fragment: "", + }; + resolver.doResolve( + target, + alternative, + null, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + resolver.doResolve(target, obj, null, resolveContext, callback); + }, + ); + return; + } + resolver.doResolve(target, obj, null, resolveContext, callback); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/PnpPlugin.js b/node_modules/enhanced-resolve/lib/PnpPlugin.js new file mode 100644 index 0000000..9f767ca --- /dev/null +++ b/node_modules/enhanced-resolve/lib/PnpPlugin.js @@ -0,0 +1,134 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Maël Nison @arcanis +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** + * @typedef {object} PnpApiImpl + * @property {(packageName: string, issuer: string, options: { considerBuiltins: boolean }) => string | null} resolveToUnqualified resolve to unqualified + */ + +module.exports = class PnpPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {PnpApiImpl} pnpApi pnpApi + * @param {string | ResolveStepHook} target target + * @param {string | ResolveStepHook} alternateTarget alternateTarget + */ + constructor(source, pnpApi, target, alternateTarget) { + this.source = source; + this.pnpApi = pnpApi; + this.target = target; + this.alternateTarget = alternateTarget; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + /** @type {ResolveStepHook} */ + const target = resolver.ensureHook(this.target); + const alternateTarget = resolver.ensureHook(this.alternateTarget); + resolver + .getHook(this.source) + .tapAsync("PnpPlugin", (request, resolveContext, callback) => { + const req = request.request; + if (!req) return callback(); + + // The trailing slash indicates to PnP that this value is a folder rather than a file + const issuer = `${request.path}/`; + + const packageMatch = /^(@[^/]+\/)?[^/]+/.exec(req); + if (!packageMatch) return callback(); + + const [packageName] = packageMatch; + const innerRequest = `.${req.slice(packageName.length)}`; + + /** @type {string|undefined|null} */ + let resolution; + /** @type {string|undefined|null} */ + let apiResolution; + try { + resolution = this.pnpApi.resolveToUnqualified(packageName, issuer, { + considerBuiltins: false, + }); + + if (resolution === null) { + // This is either not a PnP managed issuer or it's a Node builtin + // Try to continue resolving with our alternatives + resolver.doResolve( + alternateTarget, + request, + "issuer is not managed by a pnpapi", + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + // Skip alternatives + return callback(null, null); + }, + ); + return; + } + + if (resolveContext.fileDependencies) { + apiResolution = this.pnpApi.resolveToUnqualified("pnpapi", issuer, { + considerBuiltins: false, + }); + } + } catch (/** @type {unknown} */ error) { + if ( + /** @type {Error & { code: string }} */ + (error).code === "MODULE_NOT_FOUND" && + /** @type {Error & { pnpCode: string }} */ + (error).pnpCode === "UNDECLARED_DEPENDENCY" + ) { + // This is not a PnP managed dependency. + // Try to continue resolving with our alternatives + if (resolveContext.log) { + resolveContext.log("request is not managed by the pnpapi"); + for (const line of /** @type {Error} */ (error).message + .split("\n") + .filter(Boolean)) { + resolveContext.log(` ${line}`); + } + } + return callback(); + } + return callback(/** @type {Error} */ (error)); + } + + if (resolution === packageName) return callback(); + + if (apiResolution && resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(apiResolution); + } + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: resolution, + request: innerRequest, + ignoreSymlinks: true, + fullySpecified: request.fullySpecified && innerRequest !== ".", + }; + resolver.doResolve( + target, + obj, + `resolved by pnp to ${resolution}`, + resolveContext, + (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + // Skip alternatives + return callback(null, null); + }, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/Resolver.js b/node_modules/enhanced-resolve/lib/Resolver.js new file mode 100644 index 0000000..5fc3344 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/Resolver.js @@ -0,0 +1,801 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } = require("tapable"); +const createInnerContext = require("./createInnerContext"); +const { parseIdentifier } = require("./util/identifier"); +const { + normalize, + cachedJoin: join, + getType, + PathType, +} = require("./util/path"); + +/** @typedef {import("./ResolverFactory").ResolveOptions} ResolveOptions */ + +/** @typedef {Error & { details?: string }} ErrorWithDetail */ + +/** @typedef {(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void} ResolveCallback */ + +/** + * @typedef {object} PossibleFileSystemError + * @property {string=} code code + * @property {number=} errno number + * @property {string=} path path + * @property {string=} syscall syscall + */ + +/** + * @template T + * @callback FileSystemCallback + * @param {PossibleFileSystemError & Error | null} err + * @param {T=} result + */ + +/** + * @typedef {string | Buffer | URL} PathLike + */ + +/** + * @typedef {PathLike | number} PathOrFileDescriptor + */ + +/** + * @typedef {object} ObjectEncodingOptions + * @property {BufferEncoding | null | undefined=} encoding encoding + */ + +/** + * @typedef {ObjectEncodingOptions | BufferEncoding | undefined | null} EncodingOption + */ + +/** @typedef {(err: NodeJS.ErrnoException | null, result?: string) => void} StringCallback */ +/** @typedef {(err: NodeJS.ErrnoException | null, result?: Buffer) => void} BufferCallback */ +/** @typedef {(err: NodeJS.ErrnoException | null, result?: (string | Buffer)) => void} StringOrBufferCallback */ +/** @typedef {(err: NodeJS.ErrnoException | null, result?: IStats) => void} StatsCallback */ +/** @typedef {(err: NodeJS.ErrnoException | null, result?: IBigIntStats) => void} BigIntStatsCallback */ +/** @typedef {(err: NodeJS.ErrnoException | null, result?: (IStats | IBigIntStats)) => void} StatsOrBigIntStatsCallback */ +/** @typedef {(err: NodeJS.ErrnoException | Error | null, result?: JsonObject) => void} ReadJsonCallback */ + +/** + * @template T + * @typedef {object} IStatsBase + * @property {() => boolean} isFile is file + * @property {() => boolean} isDirectory is directory + * @property {() => boolean} isBlockDevice is block device + * @property {() => boolean} isCharacterDevice is character device + * @property {() => boolean} isSymbolicLink is symbolic link + * @property {() => boolean} isFIFO is FIFO + * @property {() => boolean} isSocket is socket + * @property {T} dev dev + * @property {T} ino ino + * @property {T} mode mode + * @property {T} nlink nlink + * @property {T} uid uid + * @property {T} gid gid + * @property {T} rdev rdev + * @property {T} size size + * @property {T} blksize blksize + * @property {T} blocks blocks + * @property {T} atimeMs atime ms + * @property {T} mtimeMs mtime ms + * @property {T} ctimeMs ctime ms + * @property {T} birthtimeMs birthtime ms + * @property {Date} atime atime + * @property {Date} mtime mtime + * @property {Date} ctime ctime + * @property {Date} birthtime birthtime + */ + +/** + * @typedef {IStatsBase} IStats + */ + +/** + * @typedef {IStatsBase & { atimeNs: bigint, mtimeNs: bigint, ctimeNs: bigint, birthtimeNs: bigint }} IBigIntStats + */ + +/* eslint-disable jsdoc/require-template */ +/** + * @template {string | Buffer} [T=string] + * @typedef {object} Dirent + * @property {() => boolean} isFile true when is file, otherwise false + * @property {() => boolean} isDirectory true when is directory, otherwise false + * @property {() => boolean} isBlockDevice true when is block device, otherwise false + * @property {() => boolean} isCharacterDevice true when is character device, otherwise false + * @property {() => boolean} isSymbolicLink true when is symbolic link, otherwise false + * @property {() => boolean} isFIFO true when is FIFO, otherwise false + * @property {() => boolean} isSocket true when is socket, otherwise false + * @property {T} name name + * @property {string} parentPath path + * @property {string=} path path + */ +/* eslint-enable jsdoc/require-template */ + +/** + * @typedef {object} StatOptions + * @property {(boolean | undefined)=} bigint need bigint values + */ + +/** + * @typedef {object} StatSyncOptions + * @property {(boolean | undefined)=} bigint need bigint values + * @property {(boolean | undefined)=} throwIfNoEntry throw if no entry + */ + +/** + * @typedef {{ + * (path: PathOrFileDescriptor, options: ({ encoding?: null | undefined, flag?: string | undefined } & import("events").Abortable) | undefined | null, callback: BufferCallback): void; + * (path: PathOrFileDescriptor, options: ({ encoding: BufferEncoding, flag?: string | undefined } & import("events").Abortable) | BufferEncoding, callback: StringCallback): void; + * (path: PathOrFileDescriptor, options: (ObjectEncodingOptions & { flag?: string | undefined } & import("events").Abortable) | BufferEncoding | undefined | null, callback: StringOrBufferCallback): void; + * (path: PathOrFileDescriptor, callback: BufferCallback): void; + * }} ReadFile + */ + +/** + * @typedef {'buffer'| { encoding: 'buffer' }} BufferEncodingOption + */ + +/** + * @typedef {{ + * (path: PathOrFileDescriptor, options?: { encoding?: null | undefined, flag?: string | undefined } | null): Buffer; + * (path: PathOrFileDescriptor, options: { encoding: BufferEncoding, flag?: string | undefined } | BufferEncoding): string; + * (path: PathOrFileDescriptor, options?: (ObjectEncodingOptions & { flag?: string | undefined }) | BufferEncoding | null): string | Buffer; + * }} ReadFileSync + */ + +/** + * @typedef {{ + * (path: PathLike, options: { encoding: BufferEncoding | null, withFileTypes?: false | undefined, recursive?: boolean | undefined } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void; + * (path: PathLike, options: { encoding: 'buffer', withFileTypes?: false | undefined, recursive?: boolean | undefined } | 'buffer', callback: (err: NodeJS.ErrnoException | null, files?: Buffer[]) => void): void; + * (path: PathLike, options: (ObjectEncodingOptions & { withFileTypes?: false | undefined, recursive?: boolean | undefined }) | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files?: string[] | Buffer[]) => void): void; + * (path: PathLike, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void; + * (path: PathLike, options: ObjectEncodingOptions & { withFileTypes: true, recursive?: boolean | undefined }, callback: (err: NodeJS.ErrnoException | null, files?: Dirent[]) => void): void; + * (path: PathLike, options: { encoding: 'buffer', withFileTypes: true, recursive?: boolean | undefined }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void; + * }} Readdir + */ + +/** + * @typedef {{ + * (path: PathLike, options?: { encoding: BufferEncoding | null, withFileTypes?: false | undefined, recursive?: boolean | undefined; } | BufferEncoding | null): string[]; + * (path: PathLike, options: { encoding: 'buffer', withFileTypes?: false | undefined, recursive?: boolean | undefined } | 'buffer'): Buffer[]; + * (path: PathLike, options?: (ObjectEncodingOptions & { withFileTypes?: false | undefined, recursive?: boolean | undefined }) | BufferEncoding | null): string[] | Buffer[]; + * (path: PathLike, options: ObjectEncodingOptions & { withFileTypes: true, recursive?: boolean | undefined }): Dirent[]; + * (path: PathLike, options: { encoding: "buffer", withFileTypes: true, recursive?: boolean | undefined }): Dirent[]; + * }} ReaddirSync + */ + +/** + * @typedef {(pathOrFileDescription: PathOrFileDescriptor, callback: ReadJsonCallback) => void} ReadJson + */ + +/** + * @typedef {(pathOrFileDescription: PathOrFileDescriptor) => JsonObject} ReadJsonSync + */ + +/** + * @typedef {{ + * (path: PathLike, options: EncodingOption, callback: StringCallback): void; + * (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void; + * (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void; + * (path: PathLike, callback: StringCallback): void; + * }} Readlink + */ + +/** + * @typedef {{ + * (path: PathLike, options?: EncodingOption): string; + * (path: PathLike, options: BufferEncodingOption): Buffer; + * (path: PathLike, options?: EncodingOption): string | Buffer; + * }} ReadlinkSync + */ + +/** + * @typedef {{ + * (path: PathLike, callback: StatsCallback): void; + * (path: PathLike, options: (StatOptions & { bigint?: false | undefined }) | undefined, callback: StatsCallback): void; + * (path: PathLike, options: StatOptions & { bigint: true }, callback: BigIntStatsCallback): void; + * (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void; + * }} LStat + */ + +/** + * @typedef {{ + * (path: PathLike, options?: undefined): IStats; + * (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined, throwIfNoEntry: false }): IStats | undefined; + * (path: PathLike, options: StatSyncOptions & { bigint: true, throwIfNoEntry: false }): IBigIntStats | undefined; + * (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined }): IStats; + * (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats; + * (path: PathLike, options: StatSyncOptions & { bigint: boolean, throwIfNoEntry?: false | undefined }): IStats | IBigIntStats; + * (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined; + * }} LStatSync + */ + +/** + * @typedef {{ + * (path: PathLike, callback: StatsCallback): void; + * (path: PathLike, options: (StatOptions & { bigint?: false | undefined }) | undefined, callback: StatsCallback): void; + * (path: PathLike, options: StatOptions & { bigint: true }, callback: BigIntStatsCallback): void; + * (path: PathLike, options: StatOptions | undefined, callback: StatsOrBigIntStatsCallback): void; + * }} Stat + */ + +/** + * @typedef {{ + * (path: PathLike, options?: undefined): IStats; + * (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined, throwIfNoEntry: false }): IStats | undefined; + * (path: PathLike, options: StatSyncOptions & { bigint: true, throwIfNoEntry: false }): IBigIntStats | undefined; + * (path: PathLike, options?: StatSyncOptions & { bigint?: false | undefined }): IStats; + * (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats; + * (path: PathLike, options: StatSyncOptions & { bigint: boolean, throwIfNoEntry?: false | undefined }): IStats | IBigIntStats; + * (path: PathLike, options?: StatSyncOptions): IStats | IBigIntStats | undefined; + * }} StatSync + */ + +/** + * @typedef {{ + * (path: PathLike, options: EncodingOption, callback: StringCallback): void; + * (path: PathLike, options: BufferEncodingOption, callback: BufferCallback): void; + * (path: PathLike, options: EncodingOption, callback: StringOrBufferCallback): void; + * (path: PathLike, callback: StringCallback): void; + * }} RealPath + */ + +/** + * @typedef {{ + * (path: PathLike, options?: EncodingOption): string; + * (path: PathLike, options: BufferEncodingOption): Buffer; + * (path: PathLike, options?: EncodingOption): string | Buffer; + * }} RealPathSync + */ + +/** + * @typedef {object} FileSystem + * @property {ReadFile} readFile read file method + * @property {Readdir} readdir readdir method + * @property {ReadJson=} readJson read json method + * @property {Readlink} readlink read link method + * @property {LStat=} lstat lstat method + * @property {Stat} stat stat method + * @property {RealPath=} realpath realpath method + */ + +/** + * @typedef {object} SyncFileSystem + * @property {ReadFileSync} readFileSync read file sync method + * @property {ReaddirSync} readdirSync read dir sync method + * @property {ReadJsonSync=} readJsonSync read json sync method + * @property {ReadlinkSync} readlinkSync read link sync method + * @property {LStatSync=} lstatSync lstat sync method + * @property {StatSync} statSync stat sync method + * @property {RealPathSync=} realpathSync real path sync method + */ + +/** + * @typedef {object} ParsedIdentifier + * @property {string} request request + * @property {string} query query + * @property {string} fragment fragment + * @property {boolean} directory is directory + * @property {boolean} module is module + * @property {boolean} file is file + * @property {boolean} internal is internal + */ + +/** @typedef {string | number | boolean | null} JsonPrimitive */ +/** @typedef {JsonValue[]} JsonArray */ +/** @typedef {JsonPrimitive | JsonObject | JsonArray} JsonValue */ +/** @typedef {{[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined}} JsonObject */ + +// eslint-disable-next-line jsdoc/require-property +/** @typedef {object} Context */ + +/** + * @typedef {object} BaseResolveRequest + * @property {string | false} path path + * @property {Context=} context content + * @property {string=} descriptionFilePath description file path + * @property {string=} descriptionFileRoot description file root + * @property {JsonObject=} descriptionFileData description file data + * @property {string=} relativePath relative path + * @property {boolean=} ignoreSymlinks true when need to ignore symlinks, otherwise false + * @property {boolean=} fullySpecified true when full specified, otherwise false + * @property {string=} __innerRequest inner request for internal usage + * @property {string=} __innerRequest_request inner request for internal usage + * @property {string=} __innerRequest_relativePath inner relative path for internal usage + */ + +/** @typedef {BaseResolveRequest & Partial} ResolveRequest */ + +/** + * String with special formatting + * @typedef {string} StackEntry + */ + +/** + * @template T + * @typedef {{ add: (item: T) => void }} WriteOnlySet + */ + +/** @typedef {(request: ResolveRequest) => void} ResolveContextYield */ + +/** + * Resolve context + * @typedef {object} ResolveContext + * @property {WriteOnlySet=} contextDependencies directories that was found on file system + * @property {WriteOnlySet=} fileDependencies files that was found on file system + * @property {WriteOnlySet=} missingDependencies dependencies that was not found on file system + * @property {Set=} stack set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`, + * @property {((str: string) => void)=} log log function + * @property {ResolveContextYield=} yield yield result, if provided plugins can return several results + */ + +/** @typedef {AsyncSeriesBailHook<[ResolveRequest, ResolveContext], ResolveRequest | null>} ResolveStepHook */ + +/** + * @typedef {object} KnownHooks + * @property {SyncHook<[ResolveStepHook, ResolveRequest], void>} resolveStep resolve step hook + * @property {SyncHook<[ResolveRequest, Error]>} noResolve no resolve hook + * @property {ResolveStepHook} resolve resolve hook + * @property {AsyncSeriesHook<[ResolveRequest, ResolveContext]>} result result hook + */ + +/** + * @typedef {{[key: string]: ResolveStepHook}} EnsuredHooks + */ + +/** + * @param {string} str input string + * @returns {string} in camel case + */ +function toCamelCase(str) { + return str.replace(/-([a-z])/g, (str) => str.slice(1).toUpperCase()); +} + +class Resolver { + /** + * @param {ResolveStepHook} hook hook + * @param {ResolveRequest} request request + * @returns {StackEntry} stack entry + */ + static createStackEntry(hook, request) { + return `${hook.name}: (${request.path}) ${request.request || ""}${ + request.query || "" + }${request.fragment || ""}${ + request.directory ? " directory" : "" + }${request.module ? " module" : ""}`; + } + + /** + * @param {FileSystem} fileSystem a filesystem + * @param {ResolveOptions} options options + */ + constructor(fileSystem, options) { + this.fileSystem = fileSystem; + this.options = options; + /** @type {KnownHooks} */ + this.hooks = { + resolveStep: new SyncHook(["hook", "request"], "resolveStep"), + noResolve: new SyncHook(["request", "error"], "noResolve"), + resolve: new AsyncSeriesBailHook( + ["request", "resolveContext"], + "resolve", + ), + result: new AsyncSeriesHook(["result", "resolveContext"], "result"), + }; + } + + /** + * @param {string | ResolveStepHook} name hook name or hook itself + * @returns {ResolveStepHook} the hook + */ + ensureHook(name) { + if (typeof name !== "string") { + return name; + } + name = toCamelCase(name); + if (name.startsWith("before")) { + return /** @type {ResolveStepHook} */ ( + this.ensureHook(name[6].toLowerCase() + name.slice(7)).withOptions({ + stage: -10, + }) + ); + } + if (name.startsWith("after")) { + return /** @type {ResolveStepHook} */ ( + this.ensureHook(name[5].toLowerCase() + name.slice(6)).withOptions({ + stage: 10, + }) + ); + } + /** @type {ResolveStepHook} */ + const hook = /** @type {KnownHooks & EnsuredHooks} */ (this.hooks)[name]; + if (!hook) { + /** @type {KnownHooks & EnsuredHooks} */ + (this.hooks)[name] = new AsyncSeriesBailHook( + ["request", "resolveContext"], + name, + ); + + return /** @type {KnownHooks & EnsuredHooks} */ (this.hooks)[name]; + } + return hook; + } + + /** + * @param {string | ResolveStepHook} name hook name or hook itself + * @returns {ResolveStepHook} the hook + */ + getHook(name) { + if (typeof name !== "string") { + return name; + } + name = toCamelCase(name); + if (name.startsWith("before")) { + return /** @type {ResolveStepHook} */ ( + this.getHook(name[6].toLowerCase() + name.slice(7)).withOptions({ + stage: -10, + }) + ); + } + if (name.startsWith("after")) { + return /** @type {ResolveStepHook} */ ( + this.getHook(name[5].toLowerCase() + name.slice(6)).withOptions({ + stage: 10, + }) + ); + } + /** @type {ResolveStepHook} */ + const hook = /** @type {KnownHooks & EnsuredHooks} */ (this.hooks)[name]; + if (!hook) { + throw new Error(`Hook ${name} doesn't exist`); + } + return hook; + } + + /** + * @param {object} context context information object + * @param {string} path context path + * @param {string} request request string + * @returns {string | false} result + */ + resolveSync(context, path, request) { + /** @type {Error | null | undefined} */ + let err; + /** @type {string | false | undefined} */ + let result; + let sync = false; + this.resolve(context, path, request, {}, (_err, r) => { + err = _err; + result = r; + sync = true; + }); + if (!sync) { + throw new Error( + "Cannot 'resolveSync' because the fileSystem is not sync. Use 'resolve'!", + ); + } + if (err) throw err; + if (result === undefined) throw new Error("No result"); + return result; + } + + /** + * @param {object} context context information object + * @param {string} path context path + * @param {string} request request string + * @param {ResolveContext} resolveContext resolve context + * @param {ResolveCallback} callback callback function + * @returns {void} + */ + resolve(context, path, request, resolveContext, callback) { + if (!context || typeof context !== "object") { + return callback(new Error("context argument is not an object")); + } + if (typeof path !== "string") { + return callback(new Error("path argument is not a string")); + } + if (typeof request !== "string") { + return callback(new Error("request argument is not a string")); + } + if (!resolveContext) { + return callback(new Error("resolveContext argument is not set")); + } + + /** @type {ResolveRequest} */ + const obj = { + context, + path, + request, + }; + + /** @type {ResolveContextYield | undefined} */ + let yield_; + let yieldCalled = false; + /** @type {ResolveContextYield | undefined} */ + let finishYield; + if (typeof resolveContext.yield === "function") { + const old = resolveContext.yield; + /** + * @param {ResolveRequest} obj object + */ + yield_ = (obj) => { + old(obj); + yieldCalled = true; + }; + /** + * @param {ResolveRequest} result result + * @returns {void} + */ + finishYield = (result) => { + if (result) { + /** @type {ResolveContextYield} */ (yield_)(result); + } + callback(null); + }; + } + + const message = `resolve '${request}' in '${path}'`; + + /** + * @param {ResolveRequest} result result + * @returns {void} + */ + const finishResolved = (result) => + callback( + null, + result.path === false + ? false + : `${result.path.replace(/#/g, "\0#")}${ + result.query ? result.query.replace(/#/g, "\0#") : "" + }${result.fragment || ""}`, + result, + ); + + /** + * @param {string[]} log logs + * @returns {void} + */ + const finishWithoutResolve = (log) => { + /** + * @type {ErrorWithDetail} + */ + const error = new Error(`Can't ${message}`); + error.details = log.join("\n"); + this.hooks.noResolve.call(obj, error); + return callback(error); + }; + + if (resolveContext.log) { + // We need log anyway to capture it in case of an error + const parentLog = resolveContext.log; + /** @type {string[]} */ + const log = []; + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: (msg) => { + parentLog(msg); + log.push(msg); + }, + yield: yield_, + fileDependencies: resolveContext.fileDependencies, + contextDependencies: resolveContext.contextDependencies, + missingDependencies: resolveContext.missingDependencies, + stack: resolveContext.stack, + }, + (err, result) => { + if (err) return callback(err); + + if (yieldCalled || (result && yield_)) { + return /** @type {ResolveContextYield} */ (finishYield)( + /** @type {ResolveRequest} */ (result), + ); + } + + if (result) return finishResolved(result); + + return finishWithoutResolve(log); + }, + ); + } + // Try to resolve assuming there is no error + // We don't log stuff in this case + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: undefined, + yield: yield_, + fileDependencies: resolveContext.fileDependencies, + contextDependencies: resolveContext.contextDependencies, + missingDependencies: resolveContext.missingDependencies, + stack: resolveContext.stack, + }, + (err, result) => { + if (err) return callback(err); + + if (yieldCalled || (result && yield_)) { + return /** @type {ResolveContextYield} */ (finishYield)( + /** @type {ResolveRequest} */ (result), + ); + } + + if (result) return finishResolved(result); + + // log is missing for the error details + // so we redo the resolving for the log info + // this is more expensive to the success case + // is assumed by default + /** @type {string[]} */ + const log = []; + + return this.doResolve( + this.hooks.resolve, + obj, + message, + { + log: (msg) => log.push(msg), + yield: yield_, + stack: resolveContext.stack, + }, + (err, result) => { + if (err) return callback(err); + + // In a case that there is a race condition and yield will be called + if (yieldCalled || (result && yield_)) { + return /** @type {ResolveContextYield} */ (finishYield)( + /** @type {ResolveRequest} */ (result), + ); + } + + return finishWithoutResolve(log); + }, + ); + }, + ); + } + + /** + * @param {ResolveStepHook} hook hook + * @param {ResolveRequest} request request + * @param {null|string} message string + * @param {ResolveContext} resolveContext resolver context + * @param {(err?: null|Error, result?: ResolveRequest) => void} callback callback + * @returns {void} + */ + doResolve(hook, request, message, resolveContext, callback) { + const stackEntry = Resolver.createStackEntry(hook, request); + + /** @type {Set | undefined} */ + let newStack; + if (resolveContext.stack) { + newStack = new Set(resolveContext.stack); + if (resolveContext.stack.has(stackEntry)) { + /** + * Prevent recursion + * @type {Error & {recursion?: boolean}} + */ + const recursionError = new Error( + `Recursion in resolving\nStack:\n ${[...newStack].join("\n ")}`, + ); + recursionError.recursion = true; + if (resolveContext.log) { + resolveContext.log("abort resolving because of recursion"); + } + return callback(recursionError); + } + newStack.add(stackEntry); + } else { + // creating a set with new Set([item]) + // allocates a new array that has to be garbage collected + // this is an EXTREMELY hot path, so let's avoid it + newStack = new Set(); + newStack.add(stackEntry); + } + this.hooks.resolveStep.call(hook, request); + + if (hook.isUsed()) { + const innerContext = createInnerContext( + { + log: resolveContext.log, + yield: resolveContext.yield, + fileDependencies: resolveContext.fileDependencies, + contextDependencies: resolveContext.contextDependencies, + missingDependencies: resolveContext.missingDependencies, + stack: newStack, + }, + message, + ); + return hook.callAsync(request, innerContext, (err, result) => { + if (err) return callback(err); + if (result) return callback(null, result); + callback(); + }); + } + callback(); + } + + /** + * @param {string} identifier identifier + * @returns {ParsedIdentifier} parsed identifier + */ + parse(identifier) { + const part = { + request: "", + query: "", + fragment: "", + module: false, + directory: false, + file: false, + internal: false, + }; + + const parsedIdentifier = parseIdentifier(identifier); + + if (!parsedIdentifier) return part; + + [part.request, part.query, part.fragment] = parsedIdentifier; + + if (part.request.length > 0) { + part.internal = this.isPrivate(identifier); + part.module = this.isModule(part.request); + part.directory = this.isDirectory(part.request); + if (part.directory) { + part.request = part.request.slice(0, -1); + } + } + + return part; + } + + /** + * @param {string} path path + * @returns {boolean} true, if the path is a module + */ + isModule(path) { + return getType(path) === PathType.Normal; + } + + /** + * @param {string} path path + * @returns {boolean} true, if the path is private + */ + isPrivate(path) { + return getType(path) === PathType.Internal; + } + + /** + * @param {string} path a path + * @returns {boolean} true, if the path is a directory path + */ + isDirectory(path) { + return path.endsWith("/"); + } + + /** + * @param {string} path path + * @param {string} request request + * @returns {string} joined path + */ + join(path, request) { + return join(path, request); + } + + /** + * @param {string} path path + * @returns {string} normalized path + */ + normalize(path) { + return normalize(path); + } +} + +module.exports = Resolver; diff --git a/node_modules/enhanced-resolve/lib/ResolverFactory.js b/node_modules/enhanced-resolve/lib/ResolverFactory.js new file mode 100644 index 0000000..4298540 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ResolverFactory.js @@ -0,0 +1,731 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const { versions } = require("process"); +const Resolver = require("./Resolver"); +const { getType, PathType } = require("./util/path"); + +const SyncAsyncFileSystemDecorator = require("./SyncAsyncFileSystemDecorator"); + +const AliasFieldPlugin = require("./AliasFieldPlugin"); +const AliasPlugin = require("./AliasPlugin"); +const AppendPlugin = require("./AppendPlugin"); +const ConditionalPlugin = require("./ConditionalPlugin"); +const DescriptionFilePlugin = require("./DescriptionFilePlugin"); +const DirectoryExistsPlugin = require("./DirectoryExistsPlugin"); +const ExportsFieldPlugin = require("./ExportsFieldPlugin"); +const ExtensionAliasPlugin = require("./ExtensionAliasPlugin"); +const FileExistsPlugin = require("./FileExistsPlugin"); +const ImportsFieldPlugin = require("./ImportsFieldPlugin"); +const JoinRequestPartPlugin = require("./JoinRequestPartPlugin"); +const JoinRequestPlugin = require("./JoinRequestPlugin"); +const MainFieldPlugin = require("./MainFieldPlugin"); +const ModulesInHierarchicalDirectoriesPlugin = require("./ModulesInHierarchicalDirectoriesPlugin"); +const ModulesInRootPlugin = require("./ModulesInRootPlugin"); +const NextPlugin = require("./NextPlugin"); +const ParsePlugin = require("./ParsePlugin"); +const PnpPlugin = require("./PnpPlugin"); +const RestrictionsPlugin = require("./RestrictionsPlugin"); +const ResultPlugin = require("./ResultPlugin"); +const RootsPlugin = require("./RootsPlugin"); +const SelfReferencePlugin = require("./SelfReferencePlugin"); +const SymlinkPlugin = require("./SymlinkPlugin"); +const TryNextPlugin = require("./TryNextPlugin"); +const UnsafeCachePlugin = require("./UnsafeCachePlugin"); +const UseFilePlugin = require("./UseFilePlugin"); + +/** @typedef {import("./AliasPlugin").AliasOption} AliasOptionEntry */ +/** @typedef {import("./ExtensionAliasPlugin").ExtensionAliasOption} ExtensionAliasOption */ +/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */ +/** @typedef {import("./Resolver").EnsuredHooks} EnsuredHooks */ +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").KnownHooks} KnownHooks */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ +/** @typedef {import("./UnsafeCachePlugin").Cache} Cache */ + +/** @typedef {string | string[] | false} AliasOptionNewRequest */ +/** @typedef {{ [k: string]: AliasOptionNewRequest }} AliasOptions */ +/** @typedef {{ [k: string]: string|string[] }} ExtensionAliasOptions */ +/** @typedef {false | 0 | "" | null | undefined} Falsy */ +/** @typedef {{apply: (resolver: Resolver) => void} | ((this: Resolver, resolver: Resolver) => void) | Falsy} Plugin */ + +/** + * @typedef {object} UserResolveOptions + * @property {(AliasOptions | AliasOptionEntry[])=} alias A list of module alias configurations or an object which maps key to value + * @property {(AliasOptions | AliasOptionEntry[])=} fallback A list of module alias configurations or an object which maps key to value, applied only after modules option + * @property {ExtensionAliasOptions=} extensionAlias An object which maps extension to extension aliases + * @property {(string | string[])[]=} aliasFields A list of alias fields in description files + * @property {((predicate: ResolveRequest) => boolean)=} cachePredicate A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties. + * @property {boolean=} cacheWithContext Whether or not the unsafeCache should include request context as part of the cache key. + * @property {string[]=} descriptionFiles A list of description files to read from + * @property {string[]=} conditionNames A list of exports field condition names. + * @property {boolean=} enforceExtension Enforce that a extension from extensions must be used + * @property {(string | string[])[]=} exportsFields A list of exports fields in description files + * @property {(string | string[])[]=} importsFields A list of imports fields in description files + * @property {string[]=} extensions A list of extensions which should be tried for files + * @property {FileSystem} fileSystem The file system which should be used + * @property {(Cache | boolean)=} unsafeCache Use this cache object to unsafely cache the successful requests + * @property {boolean=} symlinks Resolve symlinks to their symlinked location + * @property {Resolver=} resolver A prepared Resolver to which the plugins are attached + * @property {string[] | string=} modules A list of directories to resolve modules from, can be absolute path or folder name + * @property {(string | string[] | {name: string | string[], forceRelative: boolean})[]=} mainFields A list of main fields in description files + * @property {string[]=} mainFiles A list of main files in directories + * @property {Plugin[]=} plugins A list of additional resolve plugins which should be applied + * @property {PnpApi | null=} pnpApi A PnP API that should be used - null is "never", undefined is "auto" + * @property {string[]=} roots A list of root paths + * @property {boolean=} fullySpecified The request is already fully specified and no extensions or directories are resolved for it + * @property {boolean=} resolveToContext Resolve to a context instead of a file + * @property {(string|RegExp)[]=} restrictions A list of resolve restrictions + * @property {boolean=} useSyncFileSystemCalls Use only the sync constraints of the file system calls + * @property {boolean=} preferRelative Prefer to resolve module requests as relative requests before falling back to modules + * @property {boolean=} preferAbsolute Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots + */ + +/** + * @typedef {object} ResolveOptions + * @property {AliasOptionEntry[]} alias alias + * @property {AliasOptionEntry[]} fallback fallback + * @property {Set} aliasFields alias fields + * @property {ExtensionAliasOption[]} extensionAlias extension alias + * @property {(predicate: ResolveRequest) => boolean} cachePredicate cache predicate + * @property {boolean} cacheWithContext cache with context + * @property {Set} conditionNames A list of exports field condition names. + * @property {string[]} descriptionFiles description files + * @property {boolean} enforceExtension enforce extension + * @property {Set} exportsFields exports fields + * @property {Set} importsFields imports fields + * @property {Set} extensions extensions + * @property {FileSystem} fileSystem fileSystem + * @property {Cache | false} unsafeCache unsafe cache + * @property {boolean} symlinks symlinks + * @property {Resolver=} resolver resolver + * @property {Array} modules modules + * @property {{ name: string[], forceRelative: boolean }[]} mainFields main fields + * @property {Set} mainFiles main files + * @property {Plugin[]} plugins plugins + * @property {PnpApi | null} pnpApi pnp API + * @property {Set} roots roots + * @property {boolean} fullySpecified fully specified + * @property {boolean} resolveToContext resolve to context + * @property {Set} restrictions restrictions + * @property {boolean} preferRelative prefer relative + * @property {boolean} preferAbsolute prefer absolute + */ + +/** + * @param {PnpApi | null=} option option + * @returns {PnpApi | null} processed option + */ +function processPnpApiOption(option) { + if ( + option === undefined && + /** @type {NodeJS.ProcessVersions & {pnp: string}} */ versions.pnp + ) { + const _findPnpApi = + /** @type {(issuer: string) => PnpApi | null}} */ + ( + // @ts-expect-error maybe nothing + require("module").findPnpApi + ); + + if (_findPnpApi) { + return { + resolveToUnqualified(request, issuer, opts) { + const pnpapi = _findPnpApi(issuer); + + if (!pnpapi) { + // Issuer isn't managed by PnP + return null; + } + + return pnpapi.resolveToUnqualified(request, issuer, opts); + }, + }; + } + } + + return option || null; +} + +/** + * @param {AliasOptions | AliasOptionEntry[] | undefined} alias alias + * @returns {AliasOptionEntry[]} normalized aliases + */ +function normalizeAlias(alias) { + return typeof alias === "object" && !Array.isArray(alias) && alias !== null + ? Object.keys(alias).map((key) => { + /** @type {AliasOptionEntry} */ + const obj = { name: key, onlyModule: false, alias: alias[key] }; + + if (/\$$/.test(key)) { + obj.onlyModule = true; + obj.name = key.slice(0, -1); + } + + return obj; + }) + : /** @type {Array} */ (alias) || []; +} + +/** + * Merging filtered elements + * @param {string[]} array source array + * @param {(item: string) => boolean} filter predicate + * @returns {Array} merge result + */ +function mergeFilteredToArray(array, filter) { + /** @type {Array} */ + const result = []; + const set = new Set(array); + + for (const item of set) { + if (filter(item)) { + const lastElement = + result.length > 0 ? result[result.length - 1] : undefined; + if (Array.isArray(lastElement)) { + lastElement.push(item); + } else { + result.push([item]); + } + } else { + result.push(item); + } + } + + return result; +} + +/** + * @param {UserResolveOptions} options input options + * @returns {ResolveOptions} output options + */ +function createOptions(options) { + const mainFieldsSet = new Set(options.mainFields || ["main"]); + /** @type {ResolveOptions["mainFields"]} */ + const mainFields = []; + + for (const item of mainFieldsSet) { + if (typeof item === "string") { + mainFields.push({ + name: [item], + forceRelative: true, + }); + } else if (Array.isArray(item)) { + mainFields.push({ + name: item, + forceRelative: true, + }); + } else { + mainFields.push({ + name: Array.isArray(item.name) ? item.name : [item.name], + forceRelative: item.forceRelative, + }); + } + } + + return { + alias: normalizeAlias(options.alias), + fallback: normalizeAlias(options.fallback), + aliasFields: new Set(options.aliasFields), + cachePredicate: + options.cachePredicate || + function trueFn() { + return true; + }, + cacheWithContext: + typeof options.cacheWithContext !== "undefined" + ? options.cacheWithContext + : true, + exportsFields: new Set(options.exportsFields || ["exports"]), + importsFields: new Set(options.importsFields || ["imports"]), + conditionNames: new Set(options.conditionNames), + descriptionFiles: [ + ...new Set(options.descriptionFiles || ["package.json"]), + ], + enforceExtension: + options.enforceExtension === undefined + ? Boolean(options.extensions && options.extensions.includes("")) + : options.enforceExtension, + extensions: new Set(options.extensions || [".js", ".json", ".node"]), + extensionAlias: options.extensionAlias + ? Object.keys(options.extensionAlias).map((k) => ({ + extension: k, + alias: /** @type {ExtensionAliasOptions} */ (options.extensionAlias)[ + k + ], + })) + : [], + fileSystem: options.useSyncFileSystemCalls + ? new SyncAsyncFileSystemDecorator( + /** @type {SyncFileSystem} */ ( + /** @type {unknown} */ (options.fileSystem) + ), + ) + : options.fileSystem, + unsafeCache: + options.unsafeCache && typeof options.unsafeCache !== "object" + ? /** @type {Cache} */ ({}) + : options.unsafeCache || false, + symlinks: typeof options.symlinks !== "undefined" ? options.symlinks : true, + resolver: options.resolver, + modules: mergeFilteredToArray( + Array.isArray(options.modules) + ? options.modules + : options.modules + ? [options.modules] + : ["node_modules"], + (item) => { + const type = getType(item); + return type === PathType.Normal || type === PathType.Relative; + }, + ), + mainFields, + mainFiles: new Set(options.mainFiles || ["index"]), + plugins: options.plugins || [], + pnpApi: processPnpApiOption(options.pnpApi), + roots: new Set(options.roots || undefined), + fullySpecified: options.fullySpecified || false, + resolveToContext: options.resolveToContext || false, + preferRelative: options.preferRelative || false, + preferAbsolute: options.preferAbsolute || false, + restrictions: new Set(options.restrictions), + }; +} + +/** + * @param {UserResolveOptions} options resolve options + * @returns {Resolver} created resolver + */ +module.exports.createResolver = function createResolver(options) { + const normalizedOptions = createOptions(options); + + const { + alias, + fallback, + aliasFields, + cachePredicate, + cacheWithContext, + conditionNames, + descriptionFiles, + enforceExtension, + exportsFields, + extensionAlias, + importsFields, + extensions, + fileSystem, + fullySpecified, + mainFields, + mainFiles, + modules, + plugins: userPlugins, + pnpApi, + resolveToContext, + preferRelative, + preferAbsolute, + symlinks, + unsafeCache, + resolver: customResolver, + restrictions, + roots, + } = normalizedOptions; + + const plugins = [...userPlugins]; + + const resolver = + customResolver || new Resolver(fileSystem, normalizedOptions); + + // // pipeline //// + + resolver.ensureHook("resolve"); + resolver.ensureHook("internalResolve"); + resolver.ensureHook("newInternalResolve"); + resolver.ensureHook("parsedResolve"); + resolver.ensureHook("describedResolve"); + resolver.ensureHook("rawResolve"); + resolver.ensureHook("normalResolve"); + resolver.ensureHook("internal"); + resolver.ensureHook("rawModule"); + resolver.ensureHook("alternateRawModule"); + resolver.ensureHook("module"); + resolver.ensureHook("resolveAsModule"); + resolver.ensureHook("undescribedResolveInPackage"); + resolver.ensureHook("resolveInPackage"); + resolver.ensureHook("resolveInExistingDirectory"); + resolver.ensureHook("relative"); + resolver.ensureHook("describedRelative"); + resolver.ensureHook("directory"); + resolver.ensureHook("undescribedExistingDirectory"); + resolver.ensureHook("existingDirectory"); + resolver.ensureHook("undescribedRawFile"); + resolver.ensureHook("rawFile"); + resolver.ensureHook("file"); + resolver.ensureHook("finalFile"); + resolver.ensureHook("existingFile"); + resolver.ensureHook("resolved"); + + // TODO remove in next major + // cspell:word Interal + // Backward-compat + // @ts-expect-error + resolver.hooks.newInteralResolve = resolver.hooks.newInternalResolve; + + // resolve + for (const { source, resolveOptions } of [ + { source: "resolve", resolveOptions: { fullySpecified } }, + { source: "internal-resolve", resolveOptions: { fullySpecified: false } }, + ]) { + if (unsafeCache) { + plugins.push( + new UnsafeCachePlugin( + source, + cachePredicate, + /** @type {import("./UnsafeCachePlugin").Cache} */ (unsafeCache), + cacheWithContext, + `new-${source}`, + ), + ); + plugins.push( + new ParsePlugin(`new-${source}`, resolveOptions, "parsed-resolve"), + ); + } else { + plugins.push(new ParsePlugin(source, resolveOptions, "parsed-resolve")); + } + } + + // parsed-resolve + plugins.push( + new DescriptionFilePlugin( + "parsed-resolve", + descriptionFiles, + false, + "described-resolve", + ), + ); + plugins.push(new NextPlugin("after-parsed-resolve", "described-resolve")); + + // described-resolve + plugins.push(new NextPlugin("described-resolve", "raw-resolve")); + if (fallback.length > 0) { + plugins.push( + new AliasPlugin("described-resolve", fallback, "internal-resolve"), + ); + } + + // raw-resolve + if (alias.length > 0) { + plugins.push(new AliasPlugin("raw-resolve", alias, "internal-resolve")); + } + for (const item of aliasFields) { + plugins.push(new AliasFieldPlugin("raw-resolve", item, "internal-resolve")); + } + for (const item of extensionAlias) { + plugins.push( + new ExtensionAliasPlugin("raw-resolve", item, "normal-resolve"), + ); + } + plugins.push(new NextPlugin("raw-resolve", "normal-resolve")); + + // normal-resolve + if (preferRelative) { + plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); + } + plugins.push( + new ConditionalPlugin( + "after-normal-resolve", + { module: true }, + "resolve as module", + false, + "raw-module", + ), + ); + plugins.push( + new ConditionalPlugin( + "after-normal-resolve", + { internal: true }, + "resolve as internal import", + false, + "internal", + ), + ); + if (preferAbsolute) { + plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); + } + if (roots.size > 0) { + plugins.push(new RootsPlugin("after-normal-resolve", roots, "relative")); + } + if (!preferRelative && !preferAbsolute) { + plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative")); + } + + // internal + for (const importsField of importsFields) { + plugins.push( + new ImportsFieldPlugin( + "internal", + conditionNames, + importsField, + "relative", + "internal-resolve", + ), + ); + } + + // raw-module + for (const exportsField of exportsFields) { + plugins.push( + new SelfReferencePlugin("raw-module", exportsField, "resolve-as-module"), + ); + } + for (const item of modules) { + if (Array.isArray(item)) { + if (item.includes("node_modules") && pnpApi) { + plugins.push( + new ModulesInHierarchicalDirectoriesPlugin( + "raw-module", + item.filter((i) => i !== "node_modules"), + "module", + ), + ); + plugins.push( + new PnpPlugin( + "raw-module", + pnpApi, + "undescribed-resolve-in-package", + "alternate-raw-module", + ), + ); + + plugins.push( + new ModulesInHierarchicalDirectoriesPlugin( + "alternate-raw-module", + ["node_modules"], + "module", + ), + ); + } else { + plugins.push( + new ModulesInHierarchicalDirectoriesPlugin( + "raw-module", + item, + "module", + ), + ); + } + } else { + plugins.push(new ModulesInRootPlugin("raw-module", item, "module")); + } + } + + // module + plugins.push(new JoinRequestPartPlugin("module", "resolve-as-module")); + + // resolve-as-module + if (!resolveToContext) { + plugins.push( + new ConditionalPlugin( + "resolve-as-module", + { directory: false, request: "." }, + "single file module", + true, + "undescribed-raw-file", + ), + ); + } + plugins.push( + new DirectoryExistsPlugin( + "resolve-as-module", + "undescribed-resolve-in-package", + ), + ); + + // undescribed-resolve-in-package + plugins.push( + new DescriptionFilePlugin( + "undescribed-resolve-in-package", + descriptionFiles, + false, + "resolve-in-package", + ), + ); + plugins.push( + new NextPlugin( + "after-undescribed-resolve-in-package", + "resolve-in-package", + ), + ); + + // resolve-in-package + for (const exportsField of exportsFields) { + plugins.push( + new ExportsFieldPlugin( + "resolve-in-package", + conditionNames, + exportsField, + "relative", + ), + ); + } + plugins.push( + new NextPlugin("resolve-in-package", "resolve-in-existing-directory"), + ); + + // resolve-in-existing-directory + plugins.push( + new JoinRequestPlugin("resolve-in-existing-directory", "relative"), + ); + + // relative + plugins.push( + new DescriptionFilePlugin( + "relative", + descriptionFiles, + true, + "described-relative", + ), + ); + plugins.push(new NextPlugin("after-relative", "described-relative")); + + // described-relative + if (resolveToContext) { + plugins.push(new NextPlugin("described-relative", "directory")); + } else { + plugins.push( + new ConditionalPlugin( + "described-relative", + { directory: false }, + null, + true, + "raw-file", + ), + ); + plugins.push( + new ConditionalPlugin( + "described-relative", + { fullySpecified: false }, + "as directory", + true, + "directory", + ), + ); + } + + // directory + plugins.push( + new DirectoryExistsPlugin("directory", "undescribed-existing-directory"), + ); + + if (resolveToContext) { + // undescribed-existing-directory + plugins.push(new NextPlugin("undescribed-existing-directory", "resolved")); + } else { + // undescribed-existing-directory + plugins.push( + new DescriptionFilePlugin( + "undescribed-existing-directory", + descriptionFiles, + false, + "existing-directory", + ), + ); + for (const item of mainFiles) { + plugins.push( + new UseFilePlugin( + "undescribed-existing-directory", + item, + "undescribed-raw-file", + ), + ); + } + + // described-existing-directory + for (const item of mainFields) { + plugins.push( + new MainFieldPlugin( + "existing-directory", + item, + "resolve-in-existing-directory", + ), + ); + } + for (const item of mainFiles) { + plugins.push( + new UseFilePlugin("existing-directory", item, "undescribed-raw-file"), + ); + } + + // undescribed-raw-file + plugins.push( + new DescriptionFilePlugin( + "undescribed-raw-file", + descriptionFiles, + true, + "raw-file", + ), + ); + plugins.push(new NextPlugin("after-undescribed-raw-file", "raw-file")); + + // raw-file + plugins.push( + new ConditionalPlugin( + "raw-file", + { fullySpecified: true }, + null, + false, + "file", + ), + ); + if (!enforceExtension) { + plugins.push(new TryNextPlugin("raw-file", "no extension", "file")); + } + for (const item of extensions) { + plugins.push(new AppendPlugin("raw-file", item, "file")); + } + + // file + if (alias.length > 0) { + plugins.push(new AliasPlugin("file", alias, "internal-resolve")); + } + for (const item of aliasFields) { + plugins.push(new AliasFieldPlugin("file", item, "internal-resolve")); + } + plugins.push(new NextPlugin("file", "final-file")); + + // final-file + plugins.push(new FileExistsPlugin("final-file", "existing-file")); + + // existing-file + if (symlinks) { + plugins.push(new SymlinkPlugin("existing-file", "existing-file")); + } + plugins.push(new NextPlugin("existing-file", "resolved")); + } + + const { resolved } = + /** @type {KnownHooks & EnsuredHooks} */ + (resolver.hooks); + + // resolved + if (restrictions.size > 0) { + plugins.push(new RestrictionsPlugin(resolved, restrictions)); + } + + plugins.push(new ResultPlugin(resolved)); + + // // RESOLVER //// + + for (const plugin of plugins) { + if (typeof plugin === "function") { + /** @type {(this: Resolver, resolver: Resolver) => void} */ + (plugin).call(resolver, resolver); + } else if (plugin) { + plugin.apply(resolver); + } + } + + return resolver; +}; diff --git a/node_modules/enhanced-resolve/lib/RestrictionsPlugin.js b/node_modules/enhanced-resolve/lib/RestrictionsPlugin.js new file mode 100644 index 0000000..6faaa26 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/RestrictionsPlugin.js @@ -0,0 +1,70 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +const slashCode = "/".charCodeAt(0); +const backslashCode = "\\".charCodeAt(0); + +/** + * @param {string} path path + * @param {string} parent parent path + * @returns {boolean} true, if path is inside of parent + */ +const isInside = (path, parent) => { + if (!path.startsWith(parent)) return false; + if (path.length === parent.length) return true; + const charCode = path.charCodeAt(parent.length); + return charCode === slashCode || charCode === backslashCode; +}; + +module.exports = class RestrictionsPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {Set} restrictions restrictions + */ + constructor(source, restrictions) { + this.source = source; + this.restrictions = restrictions; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + resolver + .getHook(this.source) + .tapAsync("RestrictionsPlugin", (request, resolveContext, callback) => { + if (typeof request.path === "string") { + const { path } = request; + for (const rule of this.restrictions) { + if (typeof rule === "string") { + if (!isInside(path, rule)) { + if (resolveContext.log) { + resolveContext.log( + `${path} is not inside of the restriction ${rule}`, + ); + } + return callback(null, null); + } + } else if (!rule.test(path)) { + if (resolveContext.log) { + resolveContext.log( + `${path} doesn't match the restriction ${rule}`, + ); + } + return callback(null, null); + } + } + } + + callback(); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/ResultPlugin.js b/node_modules/enhanced-resolve/lib/ResultPlugin.js new file mode 100644 index 0000000..57dbddd --- /dev/null +++ b/node_modules/enhanced-resolve/lib/ResultPlugin.js @@ -0,0 +1,43 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class ResultPlugin { + /** + * @param {ResolveStepHook} source source + */ + constructor(source) { + this.source = source; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + this.source.tapAsync( + "ResultPlugin", + (request, resolverContext, callback) => { + const obj = { ...request }; + if (resolverContext.log) { + resolverContext.log(`reporting result ${obj.path}`); + } + resolver.hooks.result.callAsync(obj, resolverContext, (err) => { + if (err) return callback(err); + if (typeof resolverContext.yield === "function") { + resolverContext.yield(obj); + callback(null, null); + } else { + callback(null, obj); + } + }); + }, + ); + } +}; diff --git a/node_modules/enhanced-resolve/lib/RootsPlugin.js b/node_modules/enhanced-resolve/lib/RootsPlugin.js new file mode 100644 index 0000000..ce5b314 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/RootsPlugin.js @@ -0,0 +1,69 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +const forEachBail = require("./forEachBail"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +class RootsPlugin { + /** + * @param {string | ResolveStepHook} source source hook + * @param {Set} roots roots + * @param {string | ResolveStepHook} target target hook + */ + constructor(source, roots, target) { + this.roots = [...roots]; + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + + resolver + .getHook(this.source) + .tapAsync("RootsPlugin", (request, resolveContext, callback) => { + const req = request.request; + if (!req) return callback(); + if (!req.startsWith("/")) return callback(); + + forEachBail( + this.roots, + /** + * @param {string} root root + * @param {(err?: null|Error, result?: null|ResolveRequest) => void} callback callback + * @returns {void} + */ + (root, callback) => { + const path = resolver.join(root, req.slice(1)); + /** @type {ResolveRequest} */ + const obj = { + ...request, + path, + relativePath: request.relativePath && path, + }; + resolver.doResolve( + target, + obj, + `root path ${root}`, + resolveContext, + callback, + ); + }, + callback, + ); + }); + } +} + +module.exports = RootsPlugin; diff --git a/node_modules/enhanced-resolve/lib/SelfReferencePlugin.js b/node_modules/enhanced-resolve/lib/SelfReferencePlugin.js new file mode 100644 index 0000000..af8e5b2 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/SelfReferencePlugin.js @@ -0,0 +1,82 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const DescriptionFileUtils = require("./DescriptionFileUtils"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").JsonObject} JsonObject */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +const slashCode = "/".charCodeAt(0); + +module.exports = class SelfReferencePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | string[]} fieldNamePath name path + * @param {string | ResolveStepHook} target target + */ + constructor(source, fieldNamePath, target) { + this.source = source; + this.target = target; + this.fieldName = fieldNamePath; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("SelfReferencePlugin", (request, resolveContext, callback) => { + if (!request.descriptionFilePath) return callback(); + + const req = request.request; + if (!req) return callback(); + + // Feature is only enabled when an exports field is present + const exportsField = DescriptionFileUtils.getField( + /** @type {JsonObject} */ (request.descriptionFileData), + this.fieldName, + ); + if (!exportsField) return callback(); + + const name = DescriptionFileUtils.getField( + /** @type {JsonObject} */ (request.descriptionFileData), + "name", + ); + if (typeof name !== "string") return callback(); + + if ( + req.startsWith(name) && + (req.length === name.length || + req.charCodeAt(name.length) === slashCode) + ) { + const remainingRequest = `.${req.slice(name.length)}`; + /** @type {ResolveRequest} */ + const obj = { + ...request, + request: remainingRequest, + path: /** @type {string} */ (request.descriptionFileRoot), + relativePath: ".", + }; + + resolver.doResolve( + target, + obj, + "self reference", + resolveContext, + callback, + ); + } else { + return callback(); + } + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/SymlinkPlugin.js b/node_modules/enhanced-resolve/lib/SymlinkPlugin.js new file mode 100644 index 0000000..50b689a --- /dev/null +++ b/node_modules/enhanced-resolve/lib/SymlinkPlugin.js @@ -0,0 +1,101 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const forEachBail = require("./forEachBail"); +const getPaths = require("./getPaths"); +const { getType, PathType } = require("./util/path"); + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class SymlinkPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string | ResolveStepHook} target target + */ + constructor(source, target) { + this.source = source; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + const fs = resolver.fileSystem; + resolver + .getHook(this.source) + .tapAsync("SymlinkPlugin", (request, resolveContext, callback) => { + if (request.ignoreSymlinks) return callback(); + const pathsResult = getPaths(/** @type {string} */ (request.path)); + const pathSegments = pathsResult.segments; + const { paths } = pathsResult; + + let containsSymlink = false; + let idx = -1; + forEachBail( + paths, + /** + * @param {string} path path + * @param {(err?: null|Error, result?: null|number) => void} callback callback + * @returns {void} + */ + (path, callback) => { + idx++; + if (resolveContext.fileDependencies) { + resolveContext.fileDependencies.add(path); + } + fs.readlink(path, (err, result) => { + if (!err && result) { + pathSegments[idx] = /** @type {string} */ (result); + containsSymlink = true; + // Shortcut when absolute symlink found + const resultType = getType(result.toString()); + if ( + resultType === PathType.AbsoluteWin || + resultType === PathType.AbsolutePosix + ) { + return callback(null, idx); + } + } + callback(); + }); + }, + /** + * @param {(null | Error)=} err error + * @param {(null|number)=} idx result + * @returns {void} + */ + (err, idx) => { + if (!containsSymlink) return callback(); + const resultSegments = + typeof idx === "number" + ? pathSegments.slice(0, idx + 1) + : [...pathSegments]; + const result = resultSegments.reduceRight((a, b) => + resolver.join(a, b), + ); + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: result, + }; + resolver.doResolve( + target, + obj, + `resolved symlink to ${result}`, + resolveContext, + callback, + ); + }, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.js b/node_modules/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.js new file mode 100644 index 0000000..c850cda --- /dev/null +++ b/node_modules/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.js @@ -0,0 +1,258 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").StringCallback} StringCallback */ +/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ + +// eslint-disable-next-line jsdoc/no-restricted-syntax +/** @typedef {Function} SyncOrAsyncFunction */ +// eslint-disable-next-line jsdoc/no-restricted-syntax +/** @typedef {any} ResultOfSyncOrAsyncFunction */ + +/** + * @param {SyncFileSystem} fs file system implementation + * @constructor + */ +function SyncAsyncFileSystemDecorator(fs) { + this.fs = fs; + + this.lstat = undefined; + this.lstatSync = undefined; + const { lstatSync } = fs; + if (lstatSync) { + this.lstat = + /** @type {FileSystem["lstat"]} */ + ( + (arg, options, callback) => { + let result; + try { + result = /** @type {SyncOrAsyncFunction | undefined} */ (callback) + ? lstatSync.call(fs, arg, options) + : lstatSync.call(fs, arg); + } catch (err) { + return (callback || options)( + /** @type {NodeJS.ErrnoException | null} */ + (err), + ); + } + + (callback || options)( + null, + /** @type {ResultOfSyncOrAsyncFunction} */ + (result), + ); + } + ); + this.lstatSync = + /** @type {SyncFileSystem["lstatSync"]} */ + ((arg, options) => lstatSync.call(fs, arg, options)); + } + + this.stat = + /** @type {FileSystem["stat"]} */ + ( + (arg, options, callback) => { + let result; + try { + result = /** @type {SyncOrAsyncFunction | undefined} */ (callback) + ? fs.statSync(arg, options) + : fs.statSync(arg); + } catch (err) { + return (callback || options)( + /** @type {NodeJS.ErrnoException | null} */ + (err), + ); + } + + (callback || options)( + null, + /** @type {ResultOfSyncOrAsyncFunction} */ + (result), + ); + } + ); + this.statSync = + /** @type {SyncFileSystem["statSync"]} */ + ((arg, options) => fs.statSync(arg, options)); + + this.readdir = + /** @type {FileSystem["readdir"]} */ + ( + (arg, options, callback) => { + let result; + try { + result = /** @type {SyncOrAsyncFunction | undefined} */ (callback) + ? fs.readdirSync( + arg, + /** @type {Exclude[1], (err: NodeJS.ErrnoException | null, files: string[]) => void>} */ + (options), + ) + : fs.readdirSync(arg); + } catch (err) { + return (callback || options)( + /** @type {NodeJS.ErrnoException | null} */ + (err), + [], + ); + } + + (callback || options)( + null, + /** @type {ResultOfSyncOrAsyncFunction} */ + (result), + ); + } + ); + this.readdirSync = + /** @type {SyncFileSystem["readdirSync"]} */ + ( + (arg, options) => + fs.readdirSync( + arg, + /** @type {Parameters[1]} */ (options), + ) + ); + + this.readFile = + /** @type {FileSystem["readFile"]} */ + ( + (arg, options, callback) => { + let result; + try { + result = /** @type {SyncOrAsyncFunction | undefined} */ (callback) + ? fs.readFileSync(arg, options) + : fs.readFileSync(arg); + } catch (err) { + return (callback || options)( + /** @type {NodeJS.ErrnoException | null} */ + (err), + ); + } + + (callback || options)( + null, + /** @type {ResultOfSyncOrAsyncFunction} */ + (result), + ); + } + ); + this.readFileSync = + /** @type {SyncFileSystem["readFileSync"]} */ + ((arg, options) => fs.readFileSync(arg, options)); + + this.readlink = + /** @type {FileSystem["readlink"]} */ + ( + (arg, options, callback) => { + let result; + try { + result = /** @type {SyncOrAsyncFunction | undefined} */ (callback) + ? fs.readlinkSync( + arg, + /** @type {Exclude[1], StringCallback>} */ + (options), + ) + : fs.readlinkSync(arg); + } catch (err) { + return (callback || options)( + /** @type {NodeJS.ErrnoException | null} */ + (err), + ); + } + + (callback || options)( + null, + /** @type {ResultOfSyncOrAsyncFunction} */ + (result), + ); + } + ); + this.readlinkSync = + /** @type {SyncFileSystem["readlinkSync"]} */ + ( + (arg, options) => + fs.readlinkSync( + arg, + /** @type {Parameters[1]} */ ( + options + ), + ) + ); + + this.readJson = undefined; + this.readJsonSync = undefined; + const { readJsonSync } = fs; + if (readJsonSync) { + this.readJson = + /** @type {FileSystem["readJson"]} */ + ( + (arg, callback) => { + let result; + try { + result = readJsonSync.call(fs, arg); + } catch (err) { + return callback( + /** @type {NodeJS.ErrnoException | Error | null} */ (err), + ); + } + + callback(null, result); + } + ); + this.readJsonSync = + /** @type {SyncFileSystem["readJsonSync"]} */ + ((arg) => readJsonSync.call(fs, arg)); + } + + this.realpath = undefined; + this.realpathSync = undefined; + const { realpathSync } = fs; + if (realpathSync) { + this.realpath = + /** @type {FileSystem["realpath"]} */ + ( + (arg, options, callback) => { + let result; + try { + result = /** @type {SyncOrAsyncFunction | undefined} */ (callback) + ? realpathSync.call( + fs, + arg, + /** @type {Exclude>[1], StringCallback>} */ + (options), + ) + : realpathSync.call(fs, arg); + } catch (err) { + return (callback || options)( + /** @type {NodeJS.ErrnoException | null} */ + (err), + ); + } + + (callback || options)( + null, + /** @type {ResultOfSyncOrAsyncFunction} */ + (result), + ); + } + ); + this.realpathSync = + /** @type {SyncFileSystem["realpathSync"]} */ + ( + (arg, options) => + realpathSync.call( + fs, + arg, + /** @type {Parameters>[1]} */ + (options), + ) + ); + } +} + +module.exports = SyncAsyncFileSystemDecorator; diff --git a/node_modules/enhanced-resolve/lib/TryNextPlugin.js b/node_modules/enhanced-resolve/lib/TryNextPlugin.js new file mode 100644 index 0000000..4b46787 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/TryNextPlugin.js @@ -0,0 +1,41 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class TryNextPlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} message message + * @param {string | ResolveStepHook} target target + */ + constructor(source, message, target) { + this.source = source; + this.message = message; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("TryNextPlugin", (request, resolveContext, callback) => { + resolver.doResolve( + target, + request, + this.message, + resolveContext, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js b/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js new file mode 100644 index 0000000..56c6217 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js @@ -0,0 +1,114 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ +/** @typedef {import("./Resolver").ResolveContextYield} ResolveContextYield */ +/** @typedef {{ [k: string]: undefined | ResolveRequest | ResolveRequest[] }} Cache */ + +/** + * @param {string} type type of cache + * @param {ResolveRequest} request request + * @param {boolean} withContext cache with context? + * @returns {string} cache id + */ +function getCacheId(type, request, withContext) { + return JSON.stringify({ + type, + context: withContext ? request.context : "", + path: request.path, + query: request.query, + fragment: request.fragment, + request: request.request, + }); +} + +module.exports = class UnsafeCachePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {(request: ResolveRequest) => boolean} filterPredicate filterPredicate + * @param {Cache} cache cache + * @param {boolean} withContext withContext + * @param {string | ResolveStepHook} target target + */ + constructor(source, filterPredicate, cache, withContext, target) { + this.source = source; + this.filterPredicate = filterPredicate; + this.withContext = withContext; + this.cache = cache; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("UnsafeCachePlugin", (request, resolveContext, callback) => { + if (!this.filterPredicate(request)) return callback(); + const isYield = typeof resolveContext.yield === "function"; + const cacheId = getCacheId( + isYield ? "yield" : "default", + request, + this.withContext, + ); + const cacheEntry = this.cache[cacheId]; + if (cacheEntry) { + if (isYield) { + const yield_ = + /** @type {ResolveContextYield} */ + (resolveContext.yield); + if (Array.isArray(cacheEntry)) { + for (const result of cacheEntry) yield_(result); + } else { + yield_(cacheEntry); + } + return callback(null, null); + } + return callback(null, /** @type {ResolveRequest} */ (cacheEntry)); + } + + /** @type {ResolveContextYield | undefined} */ + let yieldFn; + /** @type {ResolveContextYield | undefined} */ + let yield_; + /** @type {ResolveRequest[]} */ + const yieldResult = []; + if (isYield) { + yieldFn = resolveContext.yield; + yield_ = (result) => { + yieldResult.push(result); + }; + } + + resolver.doResolve( + target, + request, + null, + yield_ ? { ...resolveContext, yield: yield_ } : resolveContext, + (err, result) => { + if (err) return callback(err); + if (isYield) { + if (result) yieldResult.push(result); + for (const result of yieldResult) { + /** @type {ResolveContextYield} */ + (yieldFn)(result); + } + this.cache[cacheId] = yieldResult; + return callback(null, null); + } + if (result) return callback(null, (this.cache[cacheId] = result)); + callback(); + }, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/UseFilePlugin.js b/node_modules/enhanced-resolve/lib/UseFilePlugin.js new file mode 100644 index 0000000..f81c27f --- /dev/null +++ b/node_modules/enhanced-resolve/lib/UseFilePlugin.js @@ -0,0 +1,55 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */ + +module.exports = class UseFilePlugin { + /** + * @param {string | ResolveStepHook} source source + * @param {string} filename filename + * @param {string | ResolveStepHook} target target + */ + constructor(source, filename, target) { + this.source = source; + this.filename = filename; + this.target = target; + } + + /** + * @param {Resolver} resolver the resolver + * @returns {void} + */ + apply(resolver) { + const target = resolver.ensureHook(this.target); + resolver + .getHook(this.source) + .tapAsync("UseFilePlugin", (request, resolveContext, callback) => { + const filePath = resolver.join( + /** @type {string} */ (request.path), + this.filename, + ); + + /** @type {ResolveRequest} */ + const obj = { + ...request, + path: filePath, + relativePath: + request.relativePath && + resolver.join(request.relativePath, this.filename), + }; + resolver.doResolve( + target, + obj, + `using path: ${filePath}`, + resolveContext, + callback, + ); + }); + } +}; diff --git a/node_modules/enhanced-resolve/lib/createInnerContext.js b/node_modules/enhanced-resolve/lib/createInnerContext.js new file mode 100644 index 0000000..2ce53f5 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/createInnerContext.js @@ -0,0 +1,46 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ + +/** + * @param {ResolveContext} options options for inner context + * @param {null|string} message message to log + * @returns {ResolveContext} inner context + */ +module.exports = function createInnerContext(options, message) { + let messageReported = false; + let innerLog; + if (options.log) { + if (message) { + /** + * @param {string} msg message + */ + innerLog = (msg) => { + if (!messageReported) { + /** @type {((str: string) => void)} */ + (options.log)(message); + messageReported = true; + } + + /** @type {((str: string) => void)} */ + (options.log)(` ${msg}`); + }; + } else { + innerLog = options.log; + } + } + + return { + log: innerLog, + yield: options.yield, + fileDependencies: options.fileDependencies, + contextDependencies: options.contextDependencies, + missingDependencies: options.missingDependencies, + stack: options.stack, + }; +}; diff --git a/node_modules/enhanced-resolve/lib/forEachBail.js b/node_modules/enhanced-resolve/lib/forEachBail.js new file mode 100644 index 0000000..6dc4d1e --- /dev/null +++ b/node_modules/enhanced-resolve/lib/forEachBail.js @@ -0,0 +1,50 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ + +/** + * @template T + * @template Z + * @callback Iterator + * @param {T} item item + * @param {(err?: null|Error, result?: null|Z) => void} callback callback + * @param {number} i index + * @returns {void} + */ + +/** + * @template T + * @template Z + * @param {T[]} array array + * @param {Iterator} iterator iterator + * @param {(err?: null|Error, result?: null|Z, i?: number) => void} callback callback after all items are iterated + * @returns {void} + */ +module.exports = function forEachBail(array, iterator, callback) { + if (array.length === 0) return callback(); + + let i = 0; + const next = () => { + /** @type {boolean|undefined} */ + let loop; + iterator( + array[i++], + (err, result) => { + if (err || result !== undefined || i >= array.length) { + return callback(err, result, i); + } + if (loop === false) while (next()); + loop = true; + }, + i, + ); + if (!loop) loop = false; + return loop; + }; + while (next()); +}; diff --git a/node_modules/enhanced-resolve/lib/getInnerRequest.js b/node_modules/enhanced-resolve/lib/getInnerRequest.js new file mode 100644 index 0000000..58b1474 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/getInnerRequest.js @@ -0,0 +1,39 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ + +/** + * @param {Resolver} resolver resolver + * @param {ResolveRequest} request string + * @returns {string} inner request + */ +module.exports = function getInnerRequest(resolver, request) { + if ( + typeof request.__innerRequest === "string" && + request.__innerRequest_request === request.request && + request.__innerRequest_relativePath === request.relativePath + ) { + return request.__innerRequest; + } + /** @type {string|undefined} */ + let innerRequest; + if (request.request) { + innerRequest = request.request; + if (/^\.\.?(?:\/|$)/.test(innerRequest) && request.relativePath) { + innerRequest = resolver.join(request.relativePath, innerRequest); + } + } else { + innerRequest = request.relativePath; + } + // eslint-disable-next-line camelcase + request.__innerRequest_request = request.request; + // eslint-disable-next-line camelcase + request.__innerRequest_relativePath = request.relativePath; + return (request.__innerRequest = /** @type {string} */ (innerRequest)); +}; diff --git a/node_modules/enhanced-resolve/lib/getPaths.js b/node_modules/enhanced-resolve/lib/getPaths.js new file mode 100644 index 0000000..cf0c9ca --- /dev/null +++ b/node_modules/enhanced-resolve/lib/getPaths.js @@ -0,0 +1,45 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +/** + * @param {string} path path + * @returns {{paths: string[], segments: string[]}}} paths and segments + */ +module.exports = function getPaths(path) { + if (path === "/") return { paths: ["/"], segments: [""] }; + const parts = path.split(/(.*?[\\/]+)/); + const paths = [path]; + const segments = [parts[parts.length - 1]]; + let part = parts[parts.length - 1]; + path = path.slice(0, Math.max(0, path.length - part.length - 1)); + for (let i = parts.length - 2; i > 2; i -= 2) { + paths.push(path); + part = parts[i]; + path = path.slice(0, Math.max(0, path.length - part.length)) || "/"; + segments.push(part.slice(0, -1)); + } + [, part] = parts; + segments.push(part); + paths.push(part); + return { + paths, + segments, + }; +}; + +/** + * @param {string} path path + * @returns {string|null} basename or null + */ +module.exports.basename = function basename(path) { + const i = path.lastIndexOf("/"); + const j = path.lastIndexOf("\\"); + const resolvedPath = i < 0 ? j : j < 0 ? i : i < j ? j : i; + if (resolvedPath < 0) return null; + const basename = path.slice(resolvedPath + 1); + return basename; +}; diff --git a/node_modules/enhanced-resolve/lib/index.js b/node_modules/enhanced-resolve/lib/index.js new file mode 100644 index 0000000..3d86f6d --- /dev/null +++ b/node_modules/enhanced-resolve/lib/index.js @@ -0,0 +1,210 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const fs = require("graceful-fs"); +const CachedInputFileSystem = require("./CachedInputFileSystem"); +const ResolverFactory = require("./ResolverFactory"); + +/** @typedef {import("./CachedInputFileSystem").BaseFileSystem} BaseFileSystem */ +/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */ +/** @typedef {import("./Resolver")} Resolver */ +/** @typedef {import("./Resolver").FileSystem} FileSystem */ +/** @typedef {import("./Resolver").ResolveCallback} ResolveCallback */ +/** @typedef {import("./Resolver").ResolveContext} ResolveContext */ +/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */ +/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */ +/** @typedef {import("./ResolverFactory").Plugin} Plugin */ +/** @typedef {import("./ResolverFactory").UserResolveOptions} ResolveOptions */ + +/** + * @typedef {{ + * (context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void; + * (context: object, path: string, request: string, callback: ResolveCallback): void; + * (path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void; + * (path: string, request: string, callback: ResolveCallback): void; + * }} ResolveFunctionAsync + */ + +/** + * @typedef {{ + * (context: object, path: string, request: string): string | false; + * (path: string, request: string): string | false; + * }} ResolveFunction + */ + +const nodeFileSystem = new CachedInputFileSystem(fs, 4000); + +const nodeContext = { + environments: ["node+es3+es5+process+native"], +}; + +const asyncResolver = ResolverFactory.createResolver({ + conditionNames: ["node"], + extensions: [".js", ".json", ".node"], + fileSystem: nodeFileSystem, +}); + +/** + * @type {ResolveFunctionAsync} + */ +const resolve = + /** + * @param {object | string} context context + * @param {string} path path + * @param {string | ResolveContext | ResolveCallback} request request + * @param {ResolveContext | ResolveCallback=} resolveContext resolve context + * @param {ResolveCallback=} callback callback + */ + (context, path, request, resolveContext, callback) => { + if (typeof context === "string") { + callback = /** @type {ResolveCallback} */ (resolveContext); + resolveContext = /** @type {ResolveContext} */ (request); + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = /** @type {ResolveCallback} */ (resolveContext); + } + asyncResolver.resolve( + context, + path, + /** @type {string} */ (request), + /** @type {ResolveContext} */ (resolveContext), + /** @type {ResolveCallback} */ (callback), + ); + }; + +const syncResolver = ResolverFactory.createResolver({ + conditionNames: ["node"], + extensions: [".js", ".json", ".node"], + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem, +}); + +/** + * @type {ResolveFunction} + */ +const resolveSync = + /** + * @param {object|string} context context + * @param {string} path path + * @param {string=} request request + * @returns {string | false} result + */ + (context, path, request) => { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return syncResolver.resolveSync( + context, + path, + /** @type {string} */ (request), + ); + }; + +/** @typedef {Omit & Partial>} ResolveOptionsOptionalFS */ + +/** + * @param {ResolveOptionsOptionalFS} options Resolver options + * @returns {ResolveFunctionAsync} Resolver function + */ +function create(options) { + const resolver = ResolverFactory.createResolver({ + fileSystem: nodeFileSystem, + ...options, + }); + /** + * @param {object|string} context Custom context + * @param {string} path Base path + * @param {string|ResolveContext|ResolveCallback} request String to resolve + * @param {ResolveContext|ResolveCallback=} resolveContext Resolve context + * @param {ResolveCallback=} callback Result callback + */ + return function create(context, path, request, resolveContext, callback) { + if (typeof context === "string") { + callback = /** @type {ResolveCallback} */ (resolveContext); + resolveContext = /** @type {ResolveContext} */ (request); + request = path; + path = context; + context = nodeContext; + } + if (typeof callback !== "function") { + callback = /** @type {ResolveCallback} */ (resolveContext); + } + resolver.resolve( + context, + path, + /** @type {string} */ (request), + /** @type {ResolveContext} */ (resolveContext), + callback, + ); + }; +} + +/** + * @param {ResolveOptionsOptionalFS} options Resolver options + * @returns {ResolveFunction} Resolver function + */ +function createSync(options) { + const resolver = ResolverFactory.createResolver({ + useSyncFileSystemCalls: true, + fileSystem: nodeFileSystem, + ...options, + }); + /** + * @param {object | string} context custom context + * @param {string} path base path + * @param {string=} request request to resolve + * @returns {string | false} Resolved path or false + */ + return function createSync(context, path, request) { + if (typeof context === "string") { + request = path; + path = context; + context = nodeContext; + } + return resolver.resolveSync(context, path, /** @type {string} */ (request)); + }; +} + +/** + * @template A + * @template B + * @param {A} obj input a + * @param {B} exports input b + * @returns {A & B} merged + */ +const mergeExports = (obj, exports) => { + const descriptors = Object.getOwnPropertyDescriptors(exports); + Object.defineProperties(obj, descriptors); + return /** @type {A & B} */ (Object.freeze(obj)); +}; + +module.exports = mergeExports(resolve, { + get sync() { + return resolveSync; + }, + create: mergeExports(create, { + get sync() { + return createSync; + }, + }), + ResolverFactory, + CachedInputFileSystem, + get CloneBasenamePlugin() { + return require("./CloneBasenamePlugin"); + }, + get LogInfoPlugin() { + return require("./LogInfoPlugin"); + }, + get forEachBail() { + return require("./forEachBail"); + }, +}); diff --git a/node_modules/enhanced-resolve/lib/util/entrypoints.js b/node_modules/enhanced-resolve/lib/util/entrypoints.js new file mode 100644 index 0000000..55f018c --- /dev/null +++ b/node_modules/enhanced-resolve/lib/util/entrypoints.js @@ -0,0 +1,574 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +const { parseIdentifier } = require("./identifier"); + +/** @typedef {string|(string|ConditionalMapping)[]} DirectMapping */ +/** @typedef {{[k: string]: MappingValue}} ConditionalMapping */ +/** @typedef {ConditionalMapping|DirectMapping|null} MappingValue */ +/** @typedef {Record|ConditionalMapping|DirectMapping} ExportsField */ +/** @typedef {Record} ImportsField */ + +/** + * Processing exports/imports field + * @callback FieldProcessor + * @param {string} request request + * @param {Set} conditionNames condition names + * @returns {[string[], string | null]} resolved paths with used field + */ + +/* +Example exports field: +{ + ".": "./main.js", + "./feature": { + "browser": "./feature-browser.js", + "default": "./feature.js" + } +} +Terminology: + +Enhanced-resolve name keys ("." and "./feature") as exports field keys. + +If value is string or string[], mapping is called as a direct mapping +and value called as a direct export. + +If value is key-value object, mapping is called as a conditional mapping +and value called as a conditional export. + +Key in conditional mapping is called condition name. + +Conditional mapping nested in another conditional mapping is called nested mapping. + +---------- + +Example imports field: +{ + "#a": "./main.js", + "#moment": { + "browser": "./moment/index.js", + "default": "moment" + }, + "#moment/": { + "browser": "./moment/", + "default": "moment/" + } +} +Terminology: + +Enhanced-resolve name keys ("#a" and "#moment/", "#moment") as imports field keys. + +If value is string or string[], mapping is called as a direct mapping +and value called as a direct export. + +If value is key-value object, mapping is called as a conditional mapping +and value called as a conditional export. + +Key in conditional mapping is called condition name. + +Conditional mapping nested in another conditional mapping is called nested mapping. + +*/ + +const slashCode = "/".charCodeAt(0); +const dotCode = ".".charCodeAt(0); +const hashCode = "#".charCodeAt(0); +const patternRegEx = /\*/g; + +/** + * @param {string} a first string + * @param {string} b second string + * @returns {number} compare result + */ +function patternKeyCompare(a, b) { + const aPatternIndex = a.indexOf("*"); + const bPatternIndex = b.indexOf("*"); + const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + + if (baseLenA > baseLenB) return -1; + if (baseLenB > baseLenA) return 1; + if (aPatternIndex === -1) return 1; + if (bPatternIndex === -1) return -1; + if (a.length > b.length) return -1; + if (b.length > a.length) return 1; + + return 0; +} + +/** + * Trying to match request to field + * @param {string} request request + * @param {ExportsField | ImportsField} field exports or import field + * @returns {[MappingValue, string, boolean, boolean, string]|null} match or null, number is negative and one less when it's a folder mapping, number is request.length + 1 for direct mappings + */ +function findMatch(request, field) { + if ( + Object.prototype.hasOwnProperty.call(field, request) && + !request.includes("*") && + !request.endsWith("/") + ) { + const target = /** @type {{[k: string]: MappingValue}} */ (field)[request]; + + return [target, "", false, false, request]; + } + + /** @type {string} */ + let bestMatch = ""; + /** @type {string|undefined} */ + let bestMatchSubpath; + + const keys = Object.getOwnPropertyNames(field); + + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + const patternIndex = key.indexOf("*"); + + if (patternIndex !== -1 && request.startsWith(key.slice(0, patternIndex))) { + const patternTrailer = key.slice(patternIndex + 1); + + if ( + request.length >= key.length && + request.endsWith(patternTrailer) && + patternKeyCompare(bestMatch, key) === 1 && + key.lastIndexOf("*") === patternIndex + ) { + bestMatch = key; + bestMatchSubpath = request.slice( + patternIndex, + request.length - patternTrailer.length, + ); + } + } + // For legacy `./foo/` + else if ( + key[key.length - 1] === "/" && + request.startsWith(key) && + patternKeyCompare(bestMatch, key) === 1 + ) { + bestMatch = key; + bestMatchSubpath = request.slice(key.length); + } + } + + if (bestMatch === "") return null; + + const target = /** @type {{[k: string]: MappingValue}} */ (field)[bestMatch]; + const isSubpathMapping = bestMatch.endsWith("/"); + const isPattern = bestMatch.includes("*"); + + return [ + target, + /** @type {string} */ (bestMatchSubpath), + isSubpathMapping, + isPattern, + bestMatch, + ]; +} + +/** + * @param {ConditionalMapping | DirectMapping|null} mapping mapping + * @returns {boolean} is conditional mapping + */ +function isConditionalMapping(mapping) { + return ( + mapping !== null && typeof mapping === "object" && !Array.isArray(mapping) + ); +} + +/** + * @param {ConditionalMapping} conditionalMapping_ conditional mapping + * @param {Set} conditionNames condition names + * @returns {DirectMapping | null} direct mapping if found + */ +function conditionalMapping(conditionalMapping_, conditionNames) { + /** @type {[ConditionalMapping, string[], number][]} */ + const lookup = [[conditionalMapping_, Object.keys(conditionalMapping_), 0]]; + + loop: while (lookup.length > 0) { + const [mapping, conditions, j] = lookup[lookup.length - 1]; + + for (let i = j; i < conditions.length; i++) { + const condition = conditions[i]; + + if (condition === "default") { + const innerMapping = mapping[condition]; + // is nested + if (isConditionalMapping(innerMapping)) { + const conditionalMapping = /** @type {ConditionalMapping} */ ( + innerMapping + ); + lookup[lookup.length - 1][2] = i + 1; + lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]); + continue loop; + } + + return /** @type {DirectMapping} */ (innerMapping); + } + + if (conditionNames.has(condition)) { + const innerMapping = mapping[condition]; + // is nested + if (isConditionalMapping(innerMapping)) { + const conditionalMapping = /** @type {ConditionalMapping} */ ( + innerMapping + ); + lookup[lookup.length - 1][2] = i + 1; + lookup.push([conditionalMapping, Object.keys(conditionalMapping), 0]); + continue loop; + } + + return /** @type {DirectMapping} */ (innerMapping); + } + } + + lookup.pop(); + } + + return null; +} + +/** + * @param {string | undefined} remainingRequest remaining request when folder mapping, undefined for file mappings + * @param {boolean} isPattern true, if mapping is a pattern (contains "*") + * @param {boolean} isSubpathMapping true, for subpath mappings + * @param {string} mappingTarget direct export + * @param {(d: string, f: boolean) => void} assert asserting direct value + * @returns {string} mapping result + */ +function targetMapping( + remainingRequest, + isPattern, + isSubpathMapping, + mappingTarget, + assert, +) { + if (remainingRequest === undefined) { + assert(mappingTarget, false); + + return mappingTarget; + } + + if (isSubpathMapping) { + assert(mappingTarget, true); + + return mappingTarget + remainingRequest; + } + + assert(mappingTarget, false); + + let result = mappingTarget; + + if (isPattern) { + result = result.replace( + patternRegEx, + remainingRequest.replace(/\$/g, "$$"), + ); + } + + return result; +} + +/** + * @param {string|undefined} remainingRequest remaining request when folder mapping, undefined for file mappings + * @param {boolean} isPattern true, if mapping is a pattern (contains "*") + * @param {boolean} isSubpathMapping true, for subpath mappings + * @param {DirectMapping|null} mappingTarget direct export + * @param {Set} conditionNames condition names + * @param {(d: string, f: boolean) => void} assert asserting direct value + * @returns {string[]} mapping result + */ +function directMapping( + remainingRequest, + isPattern, + isSubpathMapping, + mappingTarget, + conditionNames, + assert, +) { + if (mappingTarget === null) return []; + + if (typeof mappingTarget === "string") { + return [ + targetMapping( + remainingRequest, + isPattern, + isSubpathMapping, + mappingTarget, + assert, + ), + ]; + } + + /** @type {string[]} */ + const targets = []; + + for (const exp of mappingTarget) { + if (typeof exp === "string") { + targets.push( + targetMapping( + remainingRequest, + isPattern, + isSubpathMapping, + exp, + assert, + ), + ); + continue; + } + + const mapping = conditionalMapping(exp, conditionNames); + if (!mapping) continue; + const innerExports = directMapping( + remainingRequest, + isPattern, + isSubpathMapping, + mapping, + conditionNames, + assert, + ); + for (const innerExport of innerExports) { + targets.push(innerExport); + } + } + + return targets; +} + +/** + * @param {ExportsField | ImportsField} field root + * @param {(s: string) => string} normalizeRequest Normalize request, for `imports` field it adds `#`, for `exports` field it adds `.` or `./` + * @param {(s: string) => string} assertRequest assertRequest + * @param {(s: string, f: boolean) => void} assertTarget assertTarget + * @returns {FieldProcessor} field processor + */ +function createFieldProcessor( + field, + normalizeRequest, + assertRequest, + assertTarget, +) { + return function fieldProcessor(request, conditionNames) { + request = assertRequest(request); + + const match = findMatch(normalizeRequest(request), field); + + if (match === null) return [[], null]; + + const [mapping, remainingRequest, isSubpathMapping, isPattern, usedField] = + match; + + /** @type {DirectMapping | null} */ + let direct = null; + + if (isConditionalMapping(mapping)) { + direct = conditionalMapping( + /** @type {ConditionalMapping} */ (mapping), + conditionNames, + ); + + // matching not found + if (direct === null) return [[], null]; + } else { + direct = /** @type {DirectMapping} */ (mapping); + } + + return [ + directMapping( + remainingRequest, + isPattern, + isSubpathMapping, + direct, + conditionNames, + assertTarget, + ), + usedField, + ]; + }; +} + +/** + * @param {string} request request + * @returns {string} updated request + */ +function assertExportsFieldRequest(request) { + if (request.charCodeAt(0) !== dotCode) { + throw new Error('Request should be relative path and start with "."'); + } + if (request.length === 1) return ""; + if (request.charCodeAt(1) !== slashCode) { + throw new Error('Request should be relative path and start with "./"'); + } + if (request.charCodeAt(request.length - 1) === slashCode) { + throw new Error("Only requesting file allowed"); + } + + return request.slice(2); +} + +/** + * @param {ExportsField} field exports field + * @returns {ExportsField} normalized exports field + */ +function buildExportsField(field) { + // handle syntax sugar, if exports field is direct mapping for "." + if (typeof field === "string" || Array.isArray(field)) { + return { ".": field }; + } + + const keys = Object.keys(field); + + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + + if (key.charCodeAt(0) !== dotCode) { + // handle syntax sugar, if exports field is conditional mapping for "." + if (i === 0) { + while (i < keys.length) { + const charCode = keys[i].charCodeAt(0); + if (charCode === dotCode || charCode === slashCode) { + throw new Error( + `Exports field key should be relative path and start with "." (key: ${JSON.stringify( + key, + )})`, + ); + } + i++; + } + + return { ".": field }; + } + + throw new Error( + `Exports field key should be relative path and start with "." (key: ${JSON.stringify( + key, + )})`, + ); + } + + if (key.length === 1) { + continue; + } + + if (key.charCodeAt(1) !== slashCode) { + throw new Error( + `Exports field key should be relative path and start with "./" (key: ${JSON.stringify( + key, + )})`, + ); + } + } + + return field; +} + +/** + * @param {string} exp export target + * @param {boolean} expectFolder is folder expected + */ +function assertExportTarget(exp, expectFolder) { + const parsedIdentifier = parseIdentifier(exp); + + if (!parsedIdentifier) { + return; + } + + const [relativePath] = parsedIdentifier; + const isFolder = + relativePath.charCodeAt(relativePath.length - 1) === slashCode; + + if (isFolder !== expectFolder) { + throw new Error( + expectFolder + ? `Expecting folder to folder mapping. ${JSON.stringify( + exp, + )} should end with "/"` + : `Expecting file to file mapping. ${JSON.stringify( + exp, + )} should not end with "/"`, + ); + } +} + +/** + * @param {ExportsField} exportsField the exports field + * @returns {FieldProcessor} process callback + */ +module.exports.processExportsField = function processExportsField( + exportsField, +) { + return createFieldProcessor( + buildExportsField(exportsField), + (request) => (request.length === 0 ? "." : `./${request}`), + assertExportsFieldRequest, + assertExportTarget, + ); +}; + +/** + * @param {string} request request + * @returns {string} updated request + */ +function assertImportsFieldRequest(request) { + if (request.charCodeAt(0) !== hashCode) { + throw new Error('Request should start with "#"'); + } + if (request.length === 1) { + throw new Error("Request should have at least 2 characters"); + } + if (request.charCodeAt(1) === slashCode) { + throw new Error('Request should not start with "#/"'); + } + if (request.charCodeAt(request.length - 1) === slashCode) { + throw new Error("Only requesting file allowed"); + } + + return request.slice(1); +} + +/** + * @param {string} imp import target + * @param {boolean} expectFolder is folder expected + */ +function assertImportTarget(imp, expectFolder) { + const parsedIdentifier = parseIdentifier(imp); + + if (!parsedIdentifier) { + return; + } + + const [relativePath] = parsedIdentifier; + const isFolder = + relativePath.charCodeAt(relativePath.length - 1) === slashCode; + + if (isFolder !== expectFolder) { + throw new Error( + expectFolder + ? `Expecting folder to folder mapping. ${JSON.stringify( + imp, + )} should end with "/"` + : `Expecting file to file mapping. ${JSON.stringify( + imp, + )} should not end with "/"`, + ); + } +} + +/** + * @param {ImportsField} importsField the exports field + * @returns {FieldProcessor} process callback + */ +module.exports.processImportsField = function processImportsField( + importsField, +) { + return createFieldProcessor( + importsField, + (request) => `#${request}`, + assertImportsFieldRequest, + assertImportTarget, + ); +}; diff --git a/node_modules/enhanced-resolve/lib/util/identifier.js b/node_modules/enhanced-resolve/lib/util/identifier.js new file mode 100644 index 0000000..be06d0f --- /dev/null +++ b/node_modules/enhanced-resolve/lib/util/identifier.js @@ -0,0 +1,69 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Ivan Kopeykin @vankop +*/ + +"use strict"; + +const PATH_QUERY_FRAGMENT_REGEXP = + /^(#?(?:\0.|[^?#\0])*)(\?(?:\0.|[^#\0])*)?(#.*)?$/; +const ZERO_ESCAPE_REGEXP = /\0(.)/g; + +/** + * @param {string} identifier identifier + * @returns {[string, string, string]|null} parsed identifier + */ +function parseIdentifier(identifier) { + if (!identifier) { + return null; + } + + const firstEscape = identifier.indexOf("\0"); + if (firstEscape < 0) { + // Fast path for inputs that don't use \0 escaping. + const queryStart = identifier.indexOf("?"); + // Start at index 1 to ignore a possible leading hash. + const fragmentStart = identifier.indexOf("#", 1); + + if (fragmentStart < 0) { + if (queryStart < 0) { + // No fragment, no query + return [identifier, "", ""]; + } + // Query, no fragment + return [ + identifier.slice(0, queryStart), + identifier.slice(queryStart), + "", + ]; + } + + if (queryStart < 0 || fragmentStart < queryStart) { + // Fragment, no query + return [ + identifier.slice(0, fragmentStart), + "", + identifier.slice(fragmentStart), + ]; + } + + // Query and fragment + return [ + identifier.slice(0, queryStart), + identifier.slice(queryStart, fragmentStart), + identifier.slice(fragmentStart), + ]; + } + + const match = PATH_QUERY_FRAGMENT_REGEXP.exec(identifier); + + if (!match) return null; + + return [ + match[1].replace(ZERO_ESCAPE_REGEXP, "$1"), + match[2] ? match[2].replace(ZERO_ESCAPE_REGEXP, "$1") : "", + match[3] || "", + ]; +} + +module.exports.parseIdentifier = parseIdentifier; diff --git a/node_modules/enhanced-resolve/lib/util/module-browser.js b/node_modules/enhanced-resolve/lib/util/module-browser.js new file mode 100644 index 0000000..1258c22 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/util/module-browser.js @@ -0,0 +1,8 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +module.exports = {}; diff --git a/node_modules/enhanced-resolve/lib/util/path.js b/node_modules/enhanced-resolve/lib/util/path.js new file mode 100644 index 0000000..8e3be82 --- /dev/null +++ b/node_modules/enhanced-resolve/lib/util/path.js @@ -0,0 +1,209 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const path = require("path"); + +const CHAR_HASH = "#".charCodeAt(0); +const CHAR_SLASH = "/".charCodeAt(0); +const CHAR_BACKSLASH = "\\".charCodeAt(0); +const CHAR_A = "A".charCodeAt(0); +const CHAR_Z = "Z".charCodeAt(0); +const CHAR_LOWER_A = "a".charCodeAt(0); +const CHAR_LOWER_Z = "z".charCodeAt(0); +const CHAR_DOT = ".".charCodeAt(0); +const CHAR_COLON = ":".charCodeAt(0); + +const posixNormalize = path.posix.normalize; +const winNormalize = path.win32.normalize; + +/** + * @enum {number} + */ +const PathType = Object.freeze({ + Empty: 0, + Normal: 1, + Relative: 2, + AbsoluteWin: 3, + AbsolutePosix: 4, + Internal: 5, +}); + +module.exports.PathType = PathType; + +const invalidSegmentRegEx = + /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; + +module.exports.invalidSegmentRegEx = invalidSegmentRegEx; + +const deprecatedInvalidSegmentRegEx = + /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; + +module.exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx; + +/** + * @param {string} maybePath a path + * @returns {PathType} type of path + */ +const getType = (maybePath) => { + switch (maybePath.length) { + case 0: + return PathType.Empty; + case 1: { + const c0 = maybePath.charCodeAt(0); + switch (c0) { + case CHAR_DOT: + return PathType.Relative; + case CHAR_SLASH: + return PathType.AbsolutePosix; + case CHAR_HASH: + return PathType.Internal; + } + return PathType.Normal; + } + case 2: { + const c0 = maybePath.charCodeAt(0); + switch (c0) { + case CHAR_DOT: { + const c1 = maybePath.charCodeAt(1); + switch (c1) { + case CHAR_DOT: + case CHAR_SLASH: + return PathType.Relative; + } + return PathType.Normal; + } + case CHAR_SLASH: + return PathType.AbsolutePosix; + case CHAR_HASH: + return PathType.Internal; + } + const c1 = maybePath.charCodeAt(1); + if ( + c1 === CHAR_COLON && + ((c0 >= CHAR_A && c0 <= CHAR_Z) || + (c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z)) + ) { + return PathType.AbsoluteWin; + } + return PathType.Normal; + } + } + const c0 = maybePath.charCodeAt(0); + switch (c0) { + case CHAR_DOT: { + const c1 = maybePath.charCodeAt(1); + switch (c1) { + case CHAR_SLASH: + return PathType.Relative; + case CHAR_DOT: { + const c2 = maybePath.charCodeAt(2); + if (c2 === CHAR_SLASH) return PathType.Relative; + return PathType.Normal; + } + } + return PathType.Normal; + } + case CHAR_SLASH: + return PathType.AbsolutePosix; + case CHAR_HASH: + return PathType.Internal; + } + const c1 = maybePath.charCodeAt(1); + if (c1 === CHAR_COLON) { + const c2 = maybePath.charCodeAt(2); + if ( + (c2 === CHAR_BACKSLASH || c2 === CHAR_SLASH) && + ((c0 >= CHAR_A && c0 <= CHAR_Z) || + (c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z)) + ) { + return PathType.AbsoluteWin; + } + } + return PathType.Normal; +}; + +module.exports.getType = getType; + +/** + * @param {string} maybePath a path + * @returns {string} the normalized path + */ +const normalize = (maybePath) => { + switch (getType(maybePath)) { + case PathType.Empty: + return maybePath; + case PathType.AbsoluteWin: + return winNormalize(maybePath); + case PathType.Relative: { + const r = posixNormalize(maybePath); + return getType(r) === PathType.Relative ? r : `./${r}`; + } + } + return posixNormalize(maybePath); +}; + +module.exports.normalize = normalize; + +/** + * @param {string} rootPath the root path + * @param {string | undefined} request the request path + * @returns {string} the joined path + */ +const join = (rootPath, request) => { + if (!request) return normalize(rootPath); + const requestType = getType(request); + switch (requestType) { + case PathType.AbsolutePosix: + return posixNormalize(request); + case PathType.AbsoluteWin: + return winNormalize(request); + } + switch (getType(rootPath)) { + case PathType.Normal: + case PathType.Relative: + case PathType.AbsolutePosix: + return posixNormalize(`${rootPath}/${request}`); + case PathType.AbsoluteWin: + return winNormalize(`${rootPath}\\${request}`); + } + switch (requestType) { + case PathType.Empty: + return rootPath; + case PathType.Relative: { + const r = posixNormalize(rootPath); + return getType(r) === PathType.Relative ? r : `./${r}`; + } + } + return posixNormalize(rootPath); +}; + +module.exports.join = join; + +/** @type {Map>} */ +const joinCache = new Map(); + +/** + * @param {string} rootPath the root path + * @param {string} request the request path + * @returns {string} the joined path + */ +const cachedJoin = (rootPath, request) => { + /** @type {string | undefined} */ + let cacheEntry; + let cache = joinCache.get(rootPath); + if (cache === undefined) { + joinCache.set(rootPath, (cache = new Map())); + } else { + cacheEntry = cache.get(request); + if (cacheEntry !== undefined) return cacheEntry; + } + cacheEntry = join(rootPath, request); + cache.set(request, cacheEntry); + return cacheEntry; +}; + +module.exports.cachedJoin = cachedJoin; diff --git a/node_modules/enhanced-resolve/lib/util/process-browser.js b/node_modules/enhanced-resolve/lib/util/process-browser.js new file mode 100644 index 0000000..694334c --- /dev/null +++ b/node_modules/enhanced-resolve/lib/util/process-browser.js @@ -0,0 +1,25 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +module.exports = { + /** + * @type {Record} + */ + versions: {}, + // eslint-disable-next-line jsdoc/no-restricted-syntax + /** + * @param {Function} fn function + */ + nextTick(fn) { + // eslint-disable-next-line prefer-rest-params + const args = Array.prototype.slice.call(arguments, 1); + Promise.resolve().then(() => { + // eslint-disable-next-line prefer-spread + fn.apply(null, args); + }); + }, +}; diff --git a/node_modules/enhanced-resolve/package.json b/node_modules/enhanced-resolve/package.json new file mode 100644 index 0000000..61f3ca4 --- /dev/null +++ b/node_modules/enhanced-resolve/package.json @@ -0,0 +1,87 @@ +{ + "name": "enhanced-resolve", + "version": "5.18.2", + "author": "Tobias Koppers @sokra", + "description": "Offers a async require.resolve function. It's highly configurable.", + "files": [ + "lib", + "types.d.ts", + "LICENSE" + ], + "browser": { + "process": "./lib/util/process-browser.js", + "module": "./lib/util/module-browser.js" + }, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "license": "MIT", + "devDependencies": { + "@eslint/js": ">= 9.28.0", + "@eslint/markdown": ">= 6.5.0", + "@types/graceful-fs": "^4.1.6", + "@types/jest": "^27.5.1", + "@types/node": "^24.0.3", + "@stylistic/eslint-plugin": ">= 4.4.1", + "cspell": "4.2.8", + "eslint": "^9.28.0", + "eslint-config-prettier": "^10.1.5", + "eslint-config-webpack": "^4.1.2", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jest": "^29.0.1", + "eslint-plugin-jsdoc": "^51.2.2", + "eslint-plugin-n": "^17.19.0", + "eslint-plugin-prettier": "^5.4.1", + "eslint-plugin-unicorn": "^59.0.1", + "globals": "^16.2.0", + "husky": "^6.0.0", + "jest": "^27.5.1", + "lint-staged": "^10.4.0", + "memfs": "^3.2.0", + "prettier": "^3.5.3", + "prettier-2": "npm:prettier@^2", + "tooling": "webpack/tooling#v1.24.0", + "typescript": "^5.8.3" + }, + "engines": { + "node": ">=10.13.0" + }, + "main": "lib/index.js", + "types": "types.d.ts", + "homepage": "http://github.com/webpack/enhanced-resolve", + "scripts": { + "prepare": "husky install", + "lint": "yarn lint:code && yarn lint:types && yarn lint:types-test && yarn lint:special && yarn lint:spellcheck", + "lint:code": "eslint --cache .", + "lint:special": "node node_modules/tooling/lockfile-lint && node node_modules/tooling/inherit-types && node node_modules/tooling/format-file-header && node node_modules/tooling/generate-types", + "lint:types": "tsc", + "lint:types-test": "tsc -p tsconfig.types.test.json", + "lint:spellcheck": "cspell --no-must-find-files \"**/*.*\"", + "fmt": "yarn fmt:base --loglevel warn --write", + "fmt:check": "yarn fmt:base --check", + "fmt:base": "prettier --cache --ignore-unknown .", + "fix": "yarn fix:code && yarn fix:special", + "fix:code": "yarn lint:code --fix", + "fix:special": "node node_modules/tooling/inherit-types --write && node node_modules/tooling/format-file-header --write && node node_modules/tooling/generate-types --write", + "type-report": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html", + "pretest": "yarn lintqqq", + "test": "yarn test:coverage", + "test:only": "jest", + "test:watch": "yarn test:only --watch", + "test:coverage": "yarn test:only --collectCoverageFrom=\"lib/**/*.js\" --coverage" + }, + "lint-staged": { + "*.{js,cjs,mjs}": [ + "eslint --cache --fix" + ], + "*": [ + "prettier --cache --write --ignore-unknown", + "cspell --cache --no-must-find-files" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/webpack/enhanced-resolve.git" + } +} diff --git a/node_modules/enhanced-resolve/types.d.ts b/node_modules/enhanced-resolve/types.d.ts new file mode 100644 index 0000000..464df97 --- /dev/null +++ b/node_modules/enhanced-resolve/types.d.ts @@ -0,0 +1,1658 @@ +/* + * This file was automatically generated. + * DO NOT MODIFY BY HAND. + * Run `yarn fix:special` to update + */ + +import { Buffer } from "buffer"; +import { AsyncSeriesBailHook, AsyncSeriesHook, SyncHook } from "tapable"; +import { URL as URL_Import } from "url"; + +declare interface Abortable { + /** + * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. + */ + signal?: AbortSignal; +} +type Alias = string | false | string[]; +declare interface AliasOption { + alias: Alias; + name: string; + onlyModule?: boolean; +} +type AliasOptionNewRequest = string | false | string[]; +declare interface AliasOptions { + [index: string]: AliasOptionNewRequest; +} +type BaseFileSystem = FileSystem & SyncFileSystem; +declare interface BaseResolveRequest { + /** + * path + */ + path: string | false; + + /** + * content + */ + context?: object; + + /** + * description file path + */ + descriptionFilePath?: string; + + /** + * description file root + */ + descriptionFileRoot?: string; + + /** + * description file data + */ + descriptionFileData?: JsonObject; + + /** + * relative path + */ + relativePath?: string; + + /** + * true when need to ignore symlinks, otherwise false + */ + ignoreSymlinks?: boolean; + + /** + * true when full specified, otherwise false + */ + fullySpecified?: boolean; + + /** + * inner request for internal usage + */ + __innerRequest?: string; + + /** + * inner request for internal usage + */ + __innerRequest_request?: string; + + /** + * inner relative path for internal usage + */ + __innerRequest_relativePath?: string; +} +type BufferEncoding = + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; +type BufferEncodingOption = "buffer" | { encoding: "buffer" }; +declare interface Cache { + [index: string]: undefined | ResolveRequest | ResolveRequest[]; +} +declare class CachedInputFileSystem { + constructor(fileSystem: BaseFileSystem, duration: number); + fileSystem: BaseFileSystem; + lstat?: LStat; + lstatSync?: LStatSync; + stat: Stat; + statSync: StatSync; + readdir: Readdir; + readdirSync: ReaddirSync; + readFile: ReadFile; + readFileSync: ReadFileSync; + readJson?: ( + pathOrFileDescription: PathOrFileDescriptor, + callback: ( + err: null | Error | NodeJS.ErrnoException, + result?: JsonObject, + ) => void, + ) => void; + readJsonSync?: (pathOrFileDescription: PathOrFileDescriptor) => JsonObject; + readlink: Readlink; + readlinkSync: ReadlinkSync; + realpath?: RealPath; + realpathSync?: RealPathSync; + purge( + what?: + | string + | number + | Buffer + | URL_url + | (string | number | Buffer | URL_url)[] + | Set, + ): void; +} +declare class CloneBasenamePlugin { + constructor( + source: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + target: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + ); + source: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >; + target: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >; + apply(resolver: Resolver): void; +} +declare interface Dirent { + /** + * true when is file, otherwise false + */ + isFile: () => boolean; + + /** + * true when is directory, otherwise false + */ + isDirectory: () => boolean; + + /** + * true when is block device, otherwise false + */ + isBlockDevice: () => boolean; + + /** + * true when is character device, otherwise false + */ + isCharacterDevice: () => boolean; + + /** + * true when is symbolic link, otherwise false + */ + isSymbolicLink: () => boolean; + + /** + * true when is FIFO, otherwise false + */ + isFIFO: () => boolean; + + /** + * true when is socket, otherwise false + */ + isSocket: () => boolean; + + /** + * name + */ + name: T; + + /** + * path + */ + parentPath: string; + + /** + * path + */ + path?: string; +} +type EncodingOption = + | undefined + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | ObjectEncodingOptions; +type ErrorWithDetail = Error & { details?: string }; +declare interface ExtensionAliasOption { + alias: string | string[]; + extension: string; +} +declare interface ExtensionAliasOptions { + [index: string]: string | string[]; +} +declare interface FileSystem { + /** + * read file method + */ + readFile: ReadFile; + + /** + * readdir method + */ + readdir: Readdir; + + /** + * read json method + */ + readJson?: ( + pathOrFileDescription: PathOrFileDescriptor, + callback: ( + err: null | Error | NodeJS.ErrnoException, + result?: JsonObject, + ) => void, + ) => void; + + /** + * read link method + */ + readlink: Readlink; + + /** + * lstat method + */ + lstat?: LStat; + + /** + * stat method + */ + stat: Stat; + + /** + * realpath method + */ + realpath?: RealPath; +} +type IBigIntStats = IStatsBase & { + atimeNs: bigint; + mtimeNs: bigint; + ctimeNs: bigint; + birthtimeNs: bigint; +}; +declare interface IStats { + /** + * is file + */ + isFile: () => boolean; + + /** + * is directory + */ + isDirectory: () => boolean; + + /** + * is block device + */ + isBlockDevice: () => boolean; + + /** + * is character device + */ + isCharacterDevice: () => boolean; + + /** + * is symbolic link + */ + isSymbolicLink: () => boolean; + + /** + * is FIFO + */ + isFIFO: () => boolean; + + /** + * is socket + */ + isSocket: () => boolean; + + /** + * dev + */ + dev: number; + + /** + * ino + */ + ino: number; + + /** + * mode + */ + mode: number; + + /** + * nlink + */ + nlink: number; + + /** + * uid + */ + uid: number; + + /** + * gid + */ + gid: number; + + /** + * rdev + */ + rdev: number; + + /** + * size + */ + size: number; + + /** + * blksize + */ + blksize: number; + + /** + * blocks + */ + blocks: number; + + /** + * atime ms + */ + atimeMs: number; + + /** + * mtime ms + */ + mtimeMs: number; + + /** + * ctime ms + */ + ctimeMs: number; + + /** + * birthtime ms + */ + birthtimeMs: number; + + /** + * atime + */ + atime: Date; + + /** + * mtime + */ + mtime: Date; + + /** + * ctime + */ + ctime: Date; + + /** + * birthtime + */ + birthtime: Date; +} +declare interface IStatsBase { + /** + * is file + */ + isFile: () => boolean; + + /** + * is directory + */ + isDirectory: () => boolean; + + /** + * is block device + */ + isBlockDevice: () => boolean; + + /** + * is character device + */ + isCharacterDevice: () => boolean; + + /** + * is symbolic link + */ + isSymbolicLink: () => boolean; + + /** + * is FIFO + */ + isFIFO: () => boolean; + + /** + * is socket + */ + isSocket: () => boolean; + + /** + * dev + */ + dev: T; + + /** + * ino + */ + ino: T; + + /** + * mode + */ + mode: T; + + /** + * nlink + */ + nlink: T; + + /** + * uid + */ + uid: T; + + /** + * gid + */ + gid: T; + + /** + * rdev + */ + rdev: T; + + /** + * size + */ + size: T; + + /** + * blksize + */ + blksize: T; + + /** + * blocks + */ + blocks: T; + + /** + * atime ms + */ + atimeMs: T; + + /** + * mtime ms + */ + mtimeMs: T; + + /** + * ctime ms + */ + ctimeMs: T; + + /** + * birthtime ms + */ + birthtimeMs: T; + + /** + * atime + */ + atime: Date; + + /** + * mtime + */ + mtime: Date; + + /** + * ctime + */ + ctime: Date; + + /** + * birthtime + */ + birthtime: Date; +} +declare interface Iterator { + ( + item: T, + callback: (err?: null | Error, result?: null | Z) => void, + i: number, + ): void; +} +type JsonObject = { [index: string]: JsonValue } & { + [index: string]: + | undefined + | null + | string + | number + | boolean + | JsonObject + | JsonValue[]; +}; +type JsonValue = null | string | number | boolean | JsonObject | JsonValue[]; +declare interface KnownHooks { + /** + * resolve step hook + */ + resolveStep: SyncHook< + [ + AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + ResolveRequest, + ] + >; + + /** + * no resolve hook + */ + noResolve: SyncHook<[ResolveRequest, Error]>; + + /** + * resolve hook + */ + resolve: AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >; + + /** + * result hook + */ + result: AsyncSeriesHook<[ResolveRequest, ResolveContext]>; +} +declare interface LStat { + ( + path: PathLike, + callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void, + ): void; + ( + path: PathLike, + options: undefined | (StatOptions & { bigint?: false }), + callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void, + ): void; + ( + path: PathLike, + options: StatOptions & { bigint: true }, + callback: ( + err: null | NodeJS.ErrnoException, + result?: IBigIntStats, + ) => void, + ): void; + ( + path: PathLike, + options: undefined | StatOptions, + callback: ( + err: null | NodeJS.ErrnoException, + result?: IStats | IBigIntStats, + ) => void, + ): void; +} +declare interface LStatSync { + (path: PathLike, options?: undefined): IStats; + ( + path: PathLike, + options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }, + ): undefined | IStats; + ( + path: PathLike, + options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }, + ): undefined | IBigIntStats; + (path: PathLike, options?: StatSyncOptions & { bigint?: false }): IStats; + (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }, + ): IStats | IBigIntStats; + ( + path: PathLike, + options?: StatSyncOptions, + ): undefined | IStats | IBigIntStats; +} +declare class LogInfoPlugin { + constructor( + source: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + ); + source: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >; + apply(resolver: Resolver): void; +} +declare interface ObjectEncodingOptions { + /** + * encoding + */ + encoding?: + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; +} +declare interface ParsedIdentifier { + /** + * request + */ + request: string; + + /** + * query + */ + query: string; + + /** + * fragment + */ + fragment: string; + + /** + * is directory + */ + directory: boolean; + + /** + * is module + */ + module: boolean; + + /** + * is file + */ + file: boolean; + + /** + * is internal + */ + internal: boolean; +} +type PathLike = string | Buffer | URL_url; +type PathOrFileDescriptor = string | number | Buffer | URL_url; +type Plugin = + | undefined + | null + | false + | "" + | 0 + | { apply: (this: Resolver, resolver: Resolver) => void } + | ((this: Resolver, resolver: Resolver) => void); +declare interface PnpApi { + /** + * resolve to unqualified + */ + resolveToUnqualified: ( + packageName: string, + issuer: string, + options: { considerBuiltins: boolean }, + ) => null | string; +} +declare interface ReadFile { + ( + path: PathOrFileDescriptor, + options: + | undefined + | null + | ({ encoding?: null; flag?: string } & Abortable), + callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void, + ): void; + ( + path: PathOrFileDescriptor, + options: + | ({ encoding: BufferEncoding; flag?: string } & Abortable) + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex", + callback: (err: null | NodeJS.ErrnoException, result?: string) => void, + ): void; + ( + path: PathOrFileDescriptor, + options: + | undefined + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | (ObjectEncodingOptions & { flag?: string } & Abortable), + callback: ( + err: null | NodeJS.ErrnoException, + result?: string | Buffer, + ) => void, + ): void; + ( + path: PathOrFileDescriptor, + callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void, + ): void; +} +declare interface ReadFileSync { + ( + path: PathOrFileDescriptor, + options?: null | { encoding?: null; flag?: string }, + ): Buffer; + ( + path: PathOrFileDescriptor, + options: + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | { encoding: BufferEncoding; flag?: string }, + ): string; + ( + path: PathOrFileDescriptor, + options?: + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | (ObjectEncodingOptions & { flag?: string }), + ): string | Buffer; +} +declare interface Readdir { + ( + path: PathLike, + options: + | undefined + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | { + encoding: + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; + withFileTypes?: false; + recursive?: boolean; + }, + callback: (err: null | NodeJS.ErrnoException, files?: string[]) => void, + ): void; + ( + path: PathLike, + options: + | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean } + | "buffer", + callback: (err: null | NodeJS.ErrnoException, files?: Buffer[]) => void, + ): void; + ( + path: PathLike, + options: + | undefined + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | (ObjectEncodingOptions & { + withFileTypes?: false; + recursive?: boolean; + }), + callback: ( + err: null | NodeJS.ErrnoException, + files?: string[] | Buffer[], + ) => void, + ): void; + ( + path: PathLike, + callback: (err: null | NodeJS.ErrnoException, files?: string[]) => void, + ): void; + ( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean; + }, + callback: ( + err: null | NodeJS.ErrnoException, + files?: Dirent[], + ) => void, + ): void; + ( + path: PathLike, + options: { encoding: "buffer"; withFileTypes: true; recursive?: boolean }, + callback: ( + err: null | NodeJS.ErrnoException, + files: Dirent[], + ) => void, + ): void; +} +declare interface ReaddirSync { + ( + path: PathLike, + options?: + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | { + encoding: + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex"; + withFileTypes?: false; + recursive?: boolean; + }, + ): string[]; + ( + path: PathLike, + options: + | "buffer" + | { encoding: "buffer"; withFileTypes?: false; recursive?: boolean }, + ): Buffer[]; + ( + path: PathLike, + options?: + | null + | "ascii" + | "utf8" + | "utf-8" + | "utf16le" + | "utf-16le" + | "ucs2" + | "ucs-2" + | "base64" + | "base64url" + | "latin1" + | "binary" + | "hex" + | (ObjectEncodingOptions & { + withFileTypes?: false; + recursive?: boolean; + }), + ): string[] | Buffer[]; + ( + path: PathLike, + options: ObjectEncodingOptions & { + withFileTypes: true; + recursive?: boolean; + }, + ): Dirent[]; + ( + path: PathLike, + options: { encoding: "buffer"; withFileTypes: true; recursive?: boolean }, + ): Dirent[]; +} +declare interface Readlink { + ( + path: PathLike, + options: EncodingOption, + callback: (err: null | NodeJS.ErrnoException, result?: string) => void, + ): void; + ( + path: PathLike, + options: BufferEncodingOption, + callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void, + ): void; + ( + path: PathLike, + options: EncodingOption, + callback: ( + err: null | NodeJS.ErrnoException, + result?: string | Buffer, + ) => void, + ): void; + ( + path: PathLike, + callback: (err: null | NodeJS.ErrnoException, result?: string) => void, + ): void; +} +declare interface ReadlinkSync { + (path: PathLike, options?: EncodingOption): string; + (path: PathLike, options: BufferEncodingOption): Buffer; + (path: PathLike, options?: EncodingOption): string | Buffer; +} +declare interface RealPath { + ( + path: PathLike, + options: EncodingOption, + callback: (err: null | NodeJS.ErrnoException, result?: string) => void, + ): void; + ( + path: PathLike, + options: BufferEncodingOption, + callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void, + ): void; + ( + path: PathLike, + options: EncodingOption, + callback: ( + err: null | NodeJS.ErrnoException, + result?: string | Buffer, + ) => void, + ): void; + ( + path: PathLike, + callback: (err: null | NodeJS.ErrnoException, result?: string) => void, + ): void; +} +declare interface RealPathSync { + (path: PathLike, options?: EncodingOption): string; + (path: PathLike, options: BufferEncodingOption): Buffer; + (path: PathLike, options?: EncodingOption): string | Buffer; +} +declare interface ResolveContext { + /** + * directories that was found on file system + */ + contextDependencies?: WriteOnlySet; + + /** + * files that was found on file system + */ + fileDependencies?: WriteOnlySet; + + /** + * dependencies that was not found on file system + */ + missingDependencies?: WriteOnlySet; + + /** + * set of hooks' calls. For instance, `resolve → parsedResolve → describedResolve`, + */ + stack?: Set; + + /** + * log function + */ + log?: (str: string) => void; + + /** + * yield result, if provided plugins can return several results + */ + yield?: (request: ResolveRequest) => void; +} +declare interface ResolveFunction { + (context: object, path: string, request: string): string | false; + (path: string, request: string): string | false; +} +declare interface ResolveFunctionAsync { + ( + context: object, + path: string, + request: string, + resolveContext: ResolveContext, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, + ): void; + ( + context: object, + path: string, + request: string, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, + ): void; + ( + path: string, + request: string, + resolveContext: ResolveContext, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, + ): void; + ( + path: string, + request: string, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, + ): void; +} +type ResolveOptionsOptionalFS = Omit< + ResolveOptionsResolverFactoryObject_2, + "fileSystem" +> & + Partial>; +declare interface ResolveOptionsResolverFactoryObject_1 { + /** + * alias + */ + alias: AliasOption[]; + + /** + * fallback + */ + fallback: AliasOption[]; + + /** + * alias fields + */ + aliasFields: Set; + + /** + * extension alias + */ + extensionAlias: ExtensionAliasOption[]; + + /** + * cache predicate + */ + cachePredicate: (predicate: ResolveRequest) => boolean; + + /** + * cache with context + */ + cacheWithContext: boolean; + + /** + * A list of exports field condition names. + */ + conditionNames: Set; + + /** + * description files + */ + descriptionFiles: string[]; + + /** + * enforce extension + */ + enforceExtension: boolean; + + /** + * exports fields + */ + exportsFields: Set; + + /** + * imports fields + */ + importsFields: Set; + + /** + * extensions + */ + extensions: Set; + + /** + * fileSystem + */ + fileSystem: FileSystem; + + /** + * unsafe cache + */ + unsafeCache: false | Cache; + + /** + * symlinks + */ + symlinks: boolean; + + /** + * resolver + */ + resolver?: Resolver; + + /** + * modules + */ + modules: (string | string[])[]; + + /** + * main fields + */ + mainFields: { name: string[]; forceRelative: boolean }[]; + + /** + * main files + */ + mainFiles: Set; + + /** + * plugins + */ + plugins: Plugin[]; + + /** + * pnp API + */ + pnpApi: null | PnpApi; + + /** + * roots + */ + roots: Set; + + /** + * fully specified + */ + fullySpecified: boolean; + + /** + * resolve to context + */ + resolveToContext: boolean; + + /** + * restrictions + */ + restrictions: Set; + + /** + * prefer relative + */ + preferRelative: boolean; + + /** + * prefer absolute + */ + preferAbsolute: boolean; +} +declare interface ResolveOptionsResolverFactoryObject_2 { + /** + * A list of module alias configurations or an object which maps key to value + */ + alias?: AliasOptions | AliasOption[]; + + /** + * A list of module alias configurations or an object which maps key to value, applied only after modules option + */ + fallback?: AliasOptions | AliasOption[]; + + /** + * An object which maps extension to extension aliases + */ + extensionAlias?: ExtensionAliasOptions; + + /** + * A list of alias fields in description files + */ + aliasFields?: (string | string[])[]; + + /** + * A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties. + */ + cachePredicate?: (predicate: ResolveRequest) => boolean; + + /** + * Whether or not the unsafeCache should include request context as part of the cache key. + */ + cacheWithContext?: boolean; + + /** + * A list of description files to read from + */ + descriptionFiles?: string[]; + + /** + * A list of exports field condition names. + */ + conditionNames?: string[]; + + /** + * Enforce that a extension from extensions must be used + */ + enforceExtension?: boolean; + + /** + * A list of exports fields in description files + */ + exportsFields?: (string | string[])[]; + + /** + * A list of imports fields in description files + */ + importsFields?: (string | string[])[]; + + /** + * A list of extensions which should be tried for files + */ + extensions?: string[]; + + /** + * The file system which should be used + */ + fileSystem: FileSystem; + + /** + * Use this cache object to unsafely cache the successful requests + */ + unsafeCache?: boolean | Cache; + + /** + * Resolve symlinks to their symlinked location + */ + symlinks?: boolean; + + /** + * A prepared Resolver to which the plugins are attached + */ + resolver?: Resolver; + + /** + * A list of directories to resolve modules from, can be absolute path or folder name + */ + modules?: string | string[]; + + /** + * A list of main fields in description files + */ + mainFields?: ( + | string + | string[] + | { name: string | string[]; forceRelative: boolean } + )[]; + + /** + * A list of main files in directories + */ + mainFiles?: string[]; + + /** + * A list of additional resolve plugins which should be applied + */ + plugins?: Plugin[]; + + /** + * A PnP API that should be used - null is "never", undefined is "auto" + */ + pnpApi?: null | PnpApi; + + /** + * A list of root paths + */ + roots?: string[]; + + /** + * The request is already fully specified and no extensions or directories are resolved for it + */ + fullySpecified?: boolean; + + /** + * Resolve to a context instead of a file + */ + resolveToContext?: boolean; + + /** + * A list of resolve restrictions + */ + restrictions?: (string | RegExp)[]; + + /** + * Use only the sync constraints of the file system calls + */ + useSyncFileSystemCalls?: boolean; + + /** + * Prefer to resolve module requests as relative requests before falling back to modules + */ + preferRelative?: boolean; + + /** + * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots + */ + preferAbsolute?: boolean; +} +type ResolveRequest = BaseResolveRequest & Partial; +declare abstract class Resolver { + fileSystem: FileSystem; + options: ResolveOptionsResolverFactoryObject_1; + hooks: KnownHooks; + ensureHook( + name: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + ): AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >; + getHook( + name: + | string + | AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + ): AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >; + resolveSync(context: object, path: string, request: string): string | false; + resolve( + context: object, + path: string, + request: string, + resolveContext: ResolveContext, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, + ): void; + doResolve( + hook: AsyncSeriesBailHook< + [ResolveRequest, ResolveContext], + null | ResolveRequest + >, + request: ResolveRequest, + message: null | string, + resolveContext: ResolveContext, + callback: (err?: null | Error, result?: ResolveRequest) => void, + ): void; + parse(identifier: string): ParsedIdentifier; + isModule(path: string): boolean; + isPrivate(path: string): boolean; + isDirectory(path: string): boolean; + join(path: string, request: string): string; + normalize(path: string): string; +} +declare interface Stat { + ( + path: PathLike, + callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void, + ): void; + ( + path: PathLike, + options: undefined | (StatOptions & { bigint?: false }), + callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void, + ): void; + ( + path: PathLike, + options: StatOptions & { bigint: true }, + callback: ( + err: null | NodeJS.ErrnoException, + result?: IBigIntStats, + ) => void, + ): void; + ( + path: PathLike, + options: undefined | StatOptions, + callback: ( + err: null | NodeJS.ErrnoException, + result?: IStats | IBigIntStats, + ) => void, + ): void; +} +declare interface StatOptions { + /** + * need bigint values + */ + bigint?: boolean; +} +declare interface StatSync { + (path: PathLike, options?: undefined): IStats; + ( + path: PathLike, + options?: StatSyncOptions & { bigint?: false; throwIfNoEntry: false }, + ): undefined | IStats; + ( + path: PathLike, + options: StatSyncOptions & { bigint: true; throwIfNoEntry: false }, + ): undefined | IBigIntStats; + (path: PathLike, options?: StatSyncOptions & { bigint?: false }): IStats; + (path: PathLike, options: StatSyncOptions & { bigint: true }): IBigIntStats; + ( + path: PathLike, + options: StatSyncOptions & { bigint: boolean; throwIfNoEntry?: false }, + ): IStats | IBigIntStats; + ( + path: PathLike, + options?: StatSyncOptions, + ): undefined | IStats | IBigIntStats; +} +declare interface StatSyncOptions { + /** + * need bigint values + */ + bigint?: boolean; + + /** + * throw if no entry + */ + throwIfNoEntry?: boolean; +} +declare interface SyncFileSystem { + /** + * read file sync method + */ + readFileSync: ReadFileSync; + + /** + * read dir sync method + */ + readdirSync: ReaddirSync; + + /** + * read json sync method + */ + readJsonSync?: (pathOrFileDescription: PathOrFileDescriptor) => JsonObject; + + /** + * read link sync method + */ + readlinkSync: ReadlinkSync; + + /** + * lstat sync method + */ + lstatSync?: LStatSync; + + /** + * stat sync method + */ + statSync: StatSync; + + /** + * real path sync method + */ + realpathSync?: RealPathSync; +} +declare interface URL_url extends URL_Import {} +declare interface WriteOnlySet { + add: (item: T) => void; +} +declare function exports( + context: object, + path: string, + request: string, + resolveContext: ResolveContext, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, +): void; +declare function exports( + context: object, + path: string, + request: string, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, +): void; +declare function exports( + path: string, + request: string, + resolveContext: ResolveContext, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, +): void; +declare function exports( + path: string, + request: string, + callback: ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void, +): void; +declare namespace exports { + export const sync: ResolveFunction; + export function create( + options: ResolveOptionsOptionalFS, + ): ResolveFunctionAsync; + export namespace create { + export const sync: (options: ResolveOptionsOptionalFS) => ResolveFunction; + } + export namespace ResolverFactory { + export let createResolver: ( + options: ResolveOptionsResolverFactoryObject_2, + ) => Resolver; + } + export const forEachBail: ( + array: T[], + iterator: Iterator, + callback: (err?: null | Error, result?: null | Z, i?: number) => void, + ) => void; + export type ResolveCallback = ( + err: null | ErrorWithDetail, + res?: string | false, + req?: ResolveRequest, + ) => void; + export { + CachedInputFileSystem, + CloneBasenamePlugin, + LogInfoPlugin, + ResolveOptionsOptionalFS, + BaseFileSystem, + PnpApi, + Resolver, + FileSystem, + ResolveContext, + ResolveRequest, + SyncFileSystem, + Plugin, + ResolveOptionsResolverFactoryObject_2 as ResolveOptions, + ResolveFunctionAsync, + ResolveFunction, + }; +} + +export = exports; diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/fill-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +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. diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md new file mode 100644 index 0000000..8d756fe --- /dev/null +++ b/node_modules/fill-range/README.md @@ -0,0 +1,237 @@ +# fill-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) + +> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save fill-range +``` + +## Usage + +Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. + +```js +const fill = require('fill-range'); +// fill(from, to[, step, options]); + +console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] +console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10 +``` + +**Params** + +* `from`: **{String|Number}** the number or letter to start with +* `to`: **{String|Number}** the number or letter to end with +* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. +* `options`: **{Object|Function}**: See all available [options](#options) + +## Examples + +By default, an array of values is returned. + +**Alphabetical ranges** + +```js +console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] +console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] +``` + +**Numerical ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] +``` + +**Negative ranges** + +Numbers can be defined as actual numbers or strings. + +```js +console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] +console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] +``` + +**Steps (increments)** + +```js +// numerical ranges with increments +console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] +console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] +console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] + +// alphabetical ranges with increments +console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] +``` + +## Options + +### options.step + +**Type**: `number` (formatted as a string or number) + +**Default**: `undefined` + +**Description**: The increment to use for the range. Can be used with letters or numbers. + +**Example(s)** + +```js +// numbers +console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] +console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] +console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] + +// letters +console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] +console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] +console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] +``` + +### options.strictRanges + +**Type**: `boolean` + +**Default**: `false` + +**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. + +**Example(s)** + +The following are all invalid: + +```js +fill('1.1', '2'); // decimals not supported in ranges +fill('a', '2'); // incompatible range values +fill(1, 10, 'foo'); // invalid "step" argument +``` + +### options.stringify + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Cast all returned values to strings. By default, integers are returned as numbers. + +**Example(s)** + +```js +console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] +console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ] +``` + +### options.toRegex + +**Type**: `boolean` + +**Default**: `undefined` + +**Description**: Create a regex-compatible source string, instead of expanding values to an array. + +**Example(s)** + +```js +// alphabetical range +console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]' +// alphabetical with step +console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y' +// numerical range +console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100' +// numerical range with zero padding +console.log(fill('000001', '100000', { toRegex: true })); +//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' +``` + +### options.transform + +**Type**: `function` + +**Default**: `undefined` + +**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. + +**Example(s)** + +```js +// add zero padding +console.log(fill(1, 5, value => String(value).padStart(4, '0'))); +//=> ['0001', '0002', '0003', '0004', '0005'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 116 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [paulmillr](https://github.com/paulmillr) | +| 2 | [realityking](https://github.com/realityking) | +| 2 | [bluelovers](https://github.com/bluelovers) | +| 1 | [edorivai](https://github.com/edorivai) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! + + + + + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js new file mode 100644 index 0000000..ddb212e --- /dev/null +++ b/node_modules/fill-range/index.js @@ -0,0 +1,248 @@ +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +const util = require('util'); +const toRegexRange = require('to-regex-range'); + +const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); + +const transform = toNumber => { + return value => toNumber === true ? Number(value) : String(value); +}; + +const isValidValue = value => { + return typeof value === 'number' || (typeof value === 'string' && value !== ''); +}; + +const isNumber = num => Number.isInteger(+num); + +const zeros = input => { + let value = `${input}`; + let index = -1; + if (value[0] === '-') value = value.slice(1); + if (value === '0') return false; + while (value[++index] === '0'); + return index > 0; +}; + +const stringify = (start, end, options) => { + if (typeof start === 'string' || typeof end === 'string') { + return true; + } + return options.stringify === true; +}; + +const pad = (input, maxLength, toNumber) => { + if (maxLength > 0) { + let dash = input[0] === '-' ? '-' : ''; + if (dash) input = input.slice(1); + input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); + } + if (toNumber === false) { + return String(input); + } + return input; +}; + +const toMaxLen = (input, maxLength) => { + let negative = input[0] === '-' ? '-' : ''; + if (negative) { + input = input.slice(1); + maxLength--; + } + while (input.length < maxLength) input = '0' + input; + return negative ? ('-' + input) : input; +}; + +const toSequence = (parts, options, maxLen) => { + parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); + + let prefix = options.capture ? '' : '?:'; + let positives = ''; + let negatives = ''; + let result; + + if (parts.positives.length) { + positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); + } + + if (parts.negatives.length) { + negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; + } + + if (positives && negatives) { + result = `${positives}|${negatives}`; + } else { + result = positives || negatives; + } + + if (options.wrap) { + return `(${prefix}${result})`; + } + + return result; +}; + +const toRange = (a, b, isNumbers, options) => { + if (isNumbers) { + return toRegexRange(a, b, { wrap: false, ...options }); + } + + let start = String.fromCharCode(a); + if (a === b) return start; + + let stop = String.fromCharCode(b); + return `[${start}-${stop}]`; +}; + +const toRegex = (start, end, options) => { + if (Array.isArray(start)) { + let wrap = options.wrap === true; + let prefix = options.capture ? '' : '?:'; + return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); + } + return toRegexRange(start, end, options); +}; + +const rangeError = (...args) => { + return new RangeError('Invalid range arguments: ' + util.inspect(...args)); +}; + +const invalidRange = (start, end, options) => { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; +}; + +const invalidStep = (step, options) => { + if (options.strictRanges === true) { + throw new TypeError(`Expected step "${step}" to be a number`); + } + return []; +}; + +const fillNumbers = (start, end, step = 1, options = {}) => { + let a = Number(start); + let b = Number(end); + + if (!Number.isInteger(a) || !Number.isInteger(b)) { + if (options.strictRanges === true) throw rangeError([start, end]); + return []; + } + + // fix negative zero + if (a === 0) a = 0; + if (b === 0) b = 0; + + let descending = a > b; + let startString = String(start); + let endString = String(end); + let stepString = String(step); + step = Math.max(Math.abs(step), 1); + + let padded = zeros(startString) || zeros(endString) || zeros(stepString); + let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; + let toNumber = padded === false && stringify(start, end, options) === false; + let format = options.transform || transform(toNumber); + + if (options.toRegex && step === 1) { + return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); + } + + let parts = { negatives: [], positives: [] }; + let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + if (options.toRegex === true && step > 1) { + push(a); + } else { + range.push(pad(format(a, index), maxLen, toNumber)); + } + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return step > 1 + ? toSequence(parts, options, maxLen) + : toRegex(range, null, { wrap: false, ...options }); + } + + return range; +}; + +const fillLetters = (start, end, step = 1, options = {}) => { + if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { + return invalidRange(start, end, options); + } + + let format = options.transform || (val => String.fromCharCode(val)); + let a = `${start}`.charCodeAt(0); + let b = `${end}`.charCodeAt(0); + + let descending = a > b; + let min = Math.min(a, b); + let max = Math.max(a, b); + + if (options.toRegex && step === 1) { + return toRange(min, max, false, options); + } + + let range = []; + let index = 0; + + while (descending ? a >= b : a <= b) { + range.push(format(a, index)); + a = descending ? a - step : a + step; + index++; + } + + if (options.toRegex === true) { + return toRegex(range, null, { wrap: false, options }); + } + + return range; +}; + +const fill = (start, end, step, options = {}) => { + if (end == null && isValidValue(start)) { + return [start]; + } + + if (!isValidValue(start) || !isValidValue(end)) { + return invalidRange(start, end, options); + } + + if (typeof step === 'function') { + return fill(start, end, 1, { transform: step }); + } + + if (isObject(step)) { + return fill(start, end, 0, step); + } + + let opts = { ...options }; + if (opts.capture === true) opts.wrap = true; + step = step || opts.step || 1; + + if (!isNumber(step)) { + if (step != null && !isObject(step)) return invalidStep(step, opts); + return fill(start, end, 1, step); + } + + if (isNumber(start) && isNumber(end)) { + return fillNumbers(start, end, step, opts); + } + + return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); +}; + +module.exports = fill; diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json new file mode 100644 index 0000000..582357f --- /dev/null +++ b/node_modules/fill-range/package.json @@ -0,0 +1,74 @@ +{ + "name": "fill-range", + "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", + "version": "7.1.1", + "homepage": "https://github.com/jonschlinkert/fill-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Edo Rivai (edo.rivai.nl)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Paul Miller (paulmillr.com)", + "Rouven Weßling (www.rouvenwessling.de)", + "(https://github.com/wtgtybhertgeghgtwtg)" + ], + "repository": "jonschlinkert/fill-range", + "bugs": { + "url": "https://github.com/jonschlinkert/fill-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", + "mocha": "mocha --reporter dot", + "test": "npm run lint && npm run mocha", + "test:ci": "npm run test:cover", + "test:cover": "nyc npm run mocha" + }, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "devDependencies": { + "gulp-format-md": "^2.0.0", + "mocha": "^6.1.1", + "nyc": "^15.1.0" + }, + "keywords": [ + "alpha", + "alphabetical", + "array", + "bash", + "brace", + "expand", + "expansion", + "fill", + "glob", + "match", + "matches", + "matching", + "number", + "numerical", + "range", + "ranges", + "regex", + "sh" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/graceful-fs/LICENSE b/node_modules/graceful-fs/LICENSE new file mode 100644 index 0000000..e906a25 --- /dev/null +++ b/node_modules/graceful-fs/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/graceful-fs/README.md b/node_modules/graceful-fs/README.md new file mode 100644 index 0000000..82d6e4d --- /dev/null +++ b/node_modules/graceful-fs/README.md @@ -0,0 +1,143 @@ +# graceful-fs + +graceful-fs functions as a drop-in replacement for the fs module, +making various improvements. + +The improvements are meant to normalize behavior across different +platforms and environments, and to make filesystem access more +resilient to errors. + +## Improvements over [fs module](https://nodejs.org/api/fs.html) + +* Queues up `open` and `readdir` calls, and retries them once + something closes if there is an EMFILE error from too many file + descriptors. +* fixes `lchmod` for Node versions prior to 0.6.2. +* implements `fs.lutimes` if possible. Otherwise it becomes a noop. +* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or + `lchown` if the user isn't root. +* makes `lchmod` and `lchown` become noops, if not available. +* retries reading a file if `read` results in EAGAIN error. + +On Windows, it retries renaming a file for up to one second if `EACCESS` +or `EPERM` error occurs, likely because antivirus software has locked +the directory. + +## USAGE + +```javascript +// use just like fs +var fs = require('graceful-fs') + +// now go and do stuff with it... +fs.readFile('some-file-or-whatever', (err, data) => { + // Do stuff here. +}) +``` + +## Sync methods + +This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync +methods. If you use sync methods which open file descriptors then you are +responsible for dealing with any errors. + +This is a known limitation, not a bug. + +## Global Patching + +If you want to patch the global fs module (or any other fs-like +module) you can do this: + +```javascript +// Make sure to read the caveat below. +var realFs = require('fs') +var gracefulFs = require('graceful-fs') +gracefulFs.gracefulify(realFs) +``` + +This should only ever be done at the top-level application layer, in +order to delay on EMFILE errors from any fs-using dependencies. You +should **not** do this in a library, because it can cause unexpected +delays in other parts of the program. + +## Changes + +This module is fairly stable at this point, and used by a lot of +things. That being said, because it implements a subtle behavior +change in a core part of the node API, even modest changes can be +extremely breaking, and the versioning is thus biased towards +bumping the major when in doubt. + +The main change between major versions has been switching between +providing a fully-patched `fs` module vs monkey-patching the node core +builtin, and the approach by which a non-monkey-patched `fs` was +created. + +The goal is to trade `EMFILE` errors for slower fs operations. So, if +you try to open a zillion files, rather than crashing, `open` +operations will be queued up and wait for something else to `close`. + +There are advantages to each approach. Monkey-patching the fs means +that no `EMFILE` errors can possibly occur anywhere in your +application, because everything is using the same core `fs` module, +which is patched. However, it can also obviously cause undesirable +side-effects, especially if the module is loaded multiple times. + +Implementing a separate-but-identical patched `fs` module is more +surgical (and doesn't run the risk of patching multiple times), but +also imposes the challenge of keeping in sync with the core module. + +The current approach loads the `fs` module, and then creates a +lookalike object that has all the same methods, except a few that are +patched. It is safe to use in all versions of Node from 0.8 through +7.0. + +### v4 + +* Do not monkey-patch the fs module. This module may now be used as a + drop-in dep, and users can opt into monkey-patching the fs builtin + if their app requires it. + +### v3 + +* Monkey-patch fs, because the eval approach no longer works on recent + node. +* fixed possible type-error throw if rename fails on windows +* verify that we *never* get EMFILE errors +* Ignore ENOSYS from chmod/chown +* clarify that graceful-fs must be used as a drop-in + +### v2.1.0 + +* Use eval rather than monkey-patching fs. +* readdir: Always sort the results +* win32: requeue a file if error has an OK status + +### v2.0 + +* A return to monkey patching +* wrap process.cwd + +### v1.1 + +* wrap readFile +* Wrap fs.writeFile. +* readdir protection +* Don't clobber the fs builtin +* Handle fs.read EAGAIN errors by trying again +* Expose the curOpen counter +* No-op lchown/lchmod if not implemented +* fs.rename patch only for win32 +* Patch fs.rename to handle AV software on Windows +* Close #4 Chown should not fail on einval or eperm if non-root +* Fix isaacs/fstream#1 Only wrap fs one time +* Fix #3 Start at 1024 max files, then back off on EMFILE +* lutimes that doens't blow up on Linux +* A full on-rewrite using a queue instead of just swallowing the EMFILE error +* Wrap Read/Write streams as well + +### 1.0 + +* Update engines for node 0.6 +* Be lstat-graceful on Windows +* first diff --git a/node_modules/graceful-fs/clone.js b/node_modules/graceful-fs/clone.js new file mode 100644 index 0000000..dff3cc8 --- /dev/null +++ b/node_modules/graceful-fs/clone.js @@ -0,0 +1,23 @@ +'use strict' + +module.exports = clone + +var getPrototypeOf = Object.getPrototypeOf || function (obj) { + return obj.__proto__ +} + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} diff --git a/node_modules/graceful-fs/graceful-fs.js b/node_modules/graceful-fs/graceful-fs.js new file mode 100644 index 0000000..8d5b89e --- /dev/null +++ b/node_modules/graceful-fs/graceful-fs.js @@ -0,0 +1,448 @@ +var fs = require('fs') +var polyfills = require('./polyfills.js') +var legacy = require('./legacy-streams.js') +var clone = require('./clone.js') + +var util = require('util') + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + resetQueue() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + resetQueue() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + require('assert').equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb, startTime) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb, startTime) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb, startTime) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$copyFile = fs.copyFile + if (fs$copyFile) + fs.copyFile = copyFile + function copyFile (src, dest, flags, cb) { + if (typeof flags === 'function') { + cb = flags + flags = 0 + } + return go$copyFile(src, dest, flags, cb) + + function go$copyFile (src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + var noReaddirOptionVersions = /^v[0-5]\./ + function readdir (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + var go$readdir = noReaddirOptionVersions.test(process.version) + ? function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, fs$readdirCallback( + path, options, cb, startTime + )) + } + : function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, options, fs$readdirCallback( + path, options, cb, startTime + )) + } + + return go$readdir(path, options, cb) + + function fs$readdirCallback (path, options, cb, startTime) { + return function (err, files) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([ + go$readdir, + [path, options, cb], + err, + startTime || Date.now(), + Date.now() + ]) + else { + if (files && files.sort) + files.sort() + + if (typeof cb === 'function') + cb.call(this, err, files) + } + } + } + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb, startTime) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) + retry() +} + +// keep track of the timeout between retry() calls +var retryTimer + +// reset the startTime and lastTime to now +// this resets the start of the 60 second overall timeout as well as the +// delay between attempts so that we'll retry these jobs sooner +function resetQueue () { + var now = Date.now() + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + // entries that are only a length of 2 are from an older version, don't + // bother modifying those since they'll be retried anyway. + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now // startTime + fs[gracefulQueue][i][4] = now // lastTime + } + } + // call retry to make sure we're actively processing the queue + retry() +} + +function retry () { + // clear the timer and remove it to help prevent unintended concurrency + clearTimeout(retryTimer) + retryTimer = undefined + + if (fs[gracefulQueue].length === 0) + return + + var elem = fs[gracefulQueue].shift() + var fn = elem[0] + var args = elem[1] + // these items may be unset if they were added by an older graceful-fs + var err = elem[2] + var startTime = elem[3] + var lastTime = elem[4] + + // if we don't have a startTime we have no way of knowing if we've waited + // long enough, so go ahead and retry this item now + if (startTime === undefined) { + debug('RETRY', fn.name, args) + fn.apply(null, args) + } else if (Date.now() - startTime >= 60000) { + // it's been more than 60 seconds total, bail now + debug('TIMEOUT', fn.name, args) + var cb = args.pop() + if (typeof cb === 'function') + cb.call(null, err) + } else { + // the amount of time between the last attempt and right now + var sinceAttempt = Date.now() - lastTime + // the amount of time between when we first tried, and when we last tried + // rounded up to at least 1 + var sinceStart = Math.max(lastTime - startTime, 1) + // backoff. wait longer than the total time we've been retrying, but only + // up to a maximum of 100ms + var desiredDelay = Math.min(sinceStart * 1.2, 100) + // it's been long enough since the last retry, do it again + if (sinceAttempt >= desiredDelay) { + debug('RETRY', fn.name, args) + fn.apply(null, args.concat([startTime])) + } else { + // if we can't do this job yet, push it to the end of the queue + // and let the next iteration check again + fs[gracefulQueue].push(elem) + } + } + + // schedule our next run if one isn't already scheduled + if (retryTimer === undefined) { + retryTimer = setTimeout(retry, 0) + } +} diff --git a/node_modules/graceful-fs/legacy-streams.js b/node_modules/graceful-fs/legacy-streams.js new file mode 100644 index 0000000..d617b50 --- /dev/null +++ b/node_modules/graceful-fs/legacy-streams.js @@ -0,0 +1,118 @@ +var Stream = require('stream').Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} diff --git a/node_modules/graceful-fs/package.json b/node_modules/graceful-fs/package.json new file mode 100644 index 0000000..87babf0 --- /dev/null +++ b/node_modules/graceful-fs/package.json @@ -0,0 +1,53 @@ +{ + "name": "graceful-fs", + "description": "A drop-in replacement for fs, making various improvements.", + "version": "4.2.11", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-graceful-fs" + }, + "main": "graceful-fs.js", + "directories": { + "test": "test" + }, + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --follow-tags", + "test": "nyc --silent node test.js | tap -c -", + "posttest": "nyc report" + }, + "keywords": [ + "fs", + "module", + "reading", + "retry", + "retries", + "queue", + "error", + "errors", + "handling", + "EMFILE", + "EAGAIN", + "EINVAL", + "EPERM", + "EACCESS" + ], + "license": "ISC", + "devDependencies": { + "import-fresh": "^2.0.0", + "mkdirp": "^0.5.0", + "rimraf": "^2.2.8", + "tap": "^16.3.4" + }, + "files": [ + "fs.js", + "graceful-fs.js", + "legacy-streams.js", + "polyfills.js", + "clone.js" + ], + "tap": { + "reporter": "classic" + } +} diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js new file mode 100644 index 0000000..453f1a9 --- /dev/null +++ b/node_modules/graceful-fs/polyfills.js @@ -0,0 +1,355 @@ +var constants = require('constants') + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +// This check is needed until node.js 12 is required +if (typeof process.chdir === 'function') { + var chdir = process.chdir + process.chdir = function (d) { + cwd = null + chdir.call(process, d) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (fs.chmod && !fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (fs.chown && !fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = typeof fs.rename !== 'function' ? fs.rename + : (function (fs$rename) { + function rename (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) + return rename + })(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = typeof fs.read !== 'function' ? fs.read + : (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) + return read + })(fs.read) + + fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync + : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else if (fs.futimes) { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/node_modules/is-extglob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +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. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md new file mode 100644 index 0000000..0416af5 --- /dev/null +++ b/node_modules/is-extglob/README.md @@ -0,0 +1,107 @@ +# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) + +> Returns true if a string has an extglob. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-extglob +``` + +## Usage + +```js +var isExtglob = require('is-extglob'); +``` + +**True** + +```js +isExtglob('?(abc)'); +isExtglob('@(abc)'); +isExtglob('!(abc)'); +isExtglob('*(abc)'); +isExtglob('+(abc)'); +``` + +**False** + +Escaped extglobs: + +```js +isExtglob('\\?(abc)'); +isExtglob('\\@(abc)'); +isExtglob('\\!(abc)'); +isExtglob('\\*(abc)'); +isExtglob('\\+(abc)'); +``` + +Everything else... + +```js +isExtglob('foo.js'); +isExtglob('!foo.js'); +isExtglob('*.js'); +isExtglob('**/abc.js'); +isExtglob('abc/*.js'); +isExtglob('abc/(aaa|bbb).js'); +isExtglob('abc/[a-z].js'); +isExtglob('abc/{a,b}.js'); +isExtglob('abc/?.js'); +isExtglob('abc.js'); +isExtglob('abc/def/ghi.js'); +``` + +## History + +**v2.0** + +Adds support for escaping. Escaped exglobs no longer return true. + +## About + +### Related projects + +* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js new file mode 100644 index 0000000..c1d986f --- /dev/null +++ b/node_modules/is-extglob/index.js @@ -0,0 +1,20 @@ +/*! + * is-extglob + * + * Copyright (c) 2014-2016, Jon Schlinkert. + * Licensed under the MIT License. + */ + +module.exports = function isExtglob(str) { + if (typeof str !== 'string' || str === '') { + return false; + } + + var match; + while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { + if (match[2]) return true; + str = str.slice(match.index + match[0].length); + } + + return false; +}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json new file mode 100644 index 0000000..7a90836 --- /dev/null +++ b/node_modules/is-extglob/package.json @@ -0,0 +1,69 @@ +{ + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "has-glob", + "is-glob", + "micromatch" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-glob/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +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. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md new file mode 100644 index 0000000..740724b --- /dev/null +++ b/node_modules/is-glob/README.md @@ -0,0 +1,206 @@ +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) + +> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-glob +``` + +You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). + +## Usage + +```js +var isGlob = require('is-glob'); +``` + +### Default behavior + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js'); +isGlob('*.js'); +isGlob('**/abc.js'); +isGlob('abc/*.js'); +isGlob('abc/(aaa|bbb).js'); +isGlob('abc/[a-z].js'); +isGlob('abc/{a,b}.js'); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js'); +isGlob('abc/!(a).js'); +isGlob('abc/+(a).js'); +isGlob('abc/*(a).js'); +isGlob('abc/?(a).js'); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('abc/\\@(a).js'); +isGlob('abc/\\!(a).js'); +isGlob('abc/\\+(a).js'); +isGlob('abc/\\*(a).js'); +isGlob('abc/\\?(a).js'); +isGlob('\\!foo.js'); +isGlob('\\*.js'); +isGlob('\\*\\*/abc.js'); +isGlob('abc/\\*.js'); +isGlob('abc/\\(aaa|bbb).js'); +isGlob('abc/\\[a-z].js'); +isGlob('abc/\\{a,b}.js'); +//=> false +``` + +Patterns that do not have glob patterns return `false`: + +```js +isGlob('abc.js'); +isGlob('abc/def/ghi.js'); +isGlob('foo.js'); +isGlob('abc/@.js'); +isGlob('abc/+.js'); +isGlob('abc/?.js'); +isGlob(); +isGlob(null); +//=> false +``` + +Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): + +```js +isGlob(['**/*.js']); +isGlob(['foo.js']); +//=> false +``` + +### Option strict + +When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that +some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. + +**True** + +Patterns that have glob characters or regex patterns will return `true`: + +```js +isGlob('!foo.js', {strict: false}); +isGlob('*.js', {strict: false}); +isGlob('**/abc.js', {strict: false}); +isGlob('abc/*.js', {strict: false}); +isGlob('abc/(aaa|bbb).js', {strict: false}); +isGlob('abc/[a-z].js', {strict: false}); +isGlob('abc/{a,b}.js', {strict: false}); +//=> true +``` + +Extglobs + +```js +isGlob('abc/@(a).js', {strict: false}); +isGlob('abc/!(a).js', {strict: false}); +isGlob('abc/+(a).js', {strict: false}); +isGlob('abc/*(a).js', {strict: false}); +isGlob('abc/?(a).js', {strict: false}); +//=> true +``` + +**False** + +Escaped globs or extglobs return `false`: + +```js +isGlob('\\!foo.js', {strict: false}); +isGlob('\\*.js', {strict: false}); +isGlob('\\*\\*/abc.js', {strict: false}); +isGlob('abc/\\*.js', {strict: false}); +isGlob('abc/\\(aaa|bbb).js', {strict: false}); +isGlob('abc/\\[a-z].js', {strict: false}); +isGlob('abc/\\{a,b}.js', {strict: false}); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") +* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") +* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") +* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 47 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [doowb](https://github.com/doowb) | +| 1 | [phated](https://github.com/phated) | +| 1 | [danhper](https://github.com/danhper) | +| 1 | [paulmillr](https://github.com/paulmillr) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js new file mode 100644 index 0000000..620f563 --- /dev/null +++ b/node_modules/is-glob/index.js @@ -0,0 +1,150 @@ +/*! + * is-glob + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isExtglob = require('is-extglob'); +var chars = { '{': '}', '(': ')', '[': ']'}; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +module.exports = function isGlob(str, options) { + if (typeof str !== 'string' || str === '') { + return false; + } + + if (isExtglob(str)) { + return true; + } + + var check = strictCheck; + + // optionally relax check + if (options && options.strict === false) { + check = relaxedCheck; + } + + return check(str); +}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json new file mode 100644 index 0000000..858af03 --- /dev/null +++ b/node_modules/is-glob/package.json @@ -0,0 +1,81 @@ +{ + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "4.0.3", + "homepage": "https://github.com/micromatch/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Daniel Perez (https://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" + ], + "repository": "micromatch/is-glob", + "bugs": { + "url": "https://github.com/micromatch/is-glob/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && node benchmark.js" + }, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "devDependencies": { + "gulp-format-md": "^0.1.10", + "mocha": "^3.0.2" + }, + "keywords": [ + "bash", + "braces", + "check", + "exec", + "expression", + "extglob", + "glob", + "globbing", + "globstar", + "is", + "match", + "matches", + "pattern", + "regex", + "regular", + "string", + "test" + ], + "verb": { + "layout": "default", + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "assemble", + "base", + "update", + "verb" + ] + }, + "reflinks": [ + "assemble", + "bach", + "base", + "composer", + "gulp", + "has-glob", + "is-valid-glob", + "micromatch", + "npm", + "scaffold", + "verb", + "vinyl" + ] + } +} diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE new file mode 100644 index 0000000..9af4a67 --- /dev/null +++ b/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +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. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md new file mode 100644 index 0000000..eb8149e --- /dev/null +++ b/node_modules/is-number/README.md @@ -0,0 +1,187 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a finite number. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Why is this needed? + +In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: + +```js +console.log(+[]); //=> 0 +console.log(+''); //=> 0 +console.log(+' '); //=> 0 +console.log(typeof NaN); //=> 'number' +``` + +This library offers a performant way to smooth out edge cases like these. + +## Usage + +```js +const isNumber = require('is-number'); +``` + +See the [tests](./test.js) for more examples. + +### true + +```js +isNumber(5e3); // true +isNumber(0xff); // true +isNumber(-1.1); // true +isNumber(0); // true +isNumber(1); // true +isNumber(1.1); // true +isNumber(10); // true +isNumber(10.10); // true +isNumber(100); // true +isNumber('-1.1'); // true +isNumber('0'); // true +isNumber('012'); // true +isNumber('0xff'); // true +isNumber('1'); // true +isNumber('1.1'); // true +isNumber('10'); // true +isNumber('10.10'); // true +isNumber('100'); // true +isNumber('5e3'); // true +isNumber(parseInt('012')); // true +isNumber(parseFloat('012')); // true +``` + +### False + +Everything else is false, as you would expect: + +```js +isNumber(Infinity); // false +isNumber(NaN); // false +isNumber(null); // false +isNumber(undefined); // false +isNumber(''); // false +isNumber(' '); // false +isNumber('foo'); // false +isNumber([1]); // false +isNumber([]); // false +isNumber(function () {}); // false +isNumber({}); // false +``` + +## Release history + +### 7.0.0 + +* Refactor. Now uses `.isFinite` if it exists. +* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. + +### 6.0.0 + +* Optimizations, thanks to @benaadams. + +### 5.0.0 + +**Breaking changes** + +* removed support for `instanceof Number` and `instanceof String` + +## Benchmarks + +As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. + +``` +# all +v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) +v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) +parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) +fastest is 'v7.0' + +# string +v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) +v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) +parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) +fastest is 'parseFloat,v7.0' + +# number +v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) +v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) +parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) +fastest is 'v6.0' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 49 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike-old](https://github.com/charlike-old) | +| 1 | [benaadams](https://github.com/benaadams) | +| 1 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js new file mode 100644 index 0000000..27f19b7 --- /dev/null +++ b/node_modules/is-number/index.js @@ -0,0 +1,18 @@ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function(num) { + if (typeof num === 'number') { + return num - num === 0; + } + if (typeof num === 'string' && num.trim() !== '') { + return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); + } + return false; +}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json new file mode 100644 index 0000000..3715072 --- /dev/null +++ b/node_modules/is-number/package.json @@ -0,0 +1,82 @@ +{ + "name": "is-number", + "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", + "version": "7.0.0", + "homepage": "https://github.com/jonschlinkert/is-number", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Olsten Larck (https://i.am.charlike.online)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "jonschlinkert/is-number", + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=0.12.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "keywords": [ + "cast", + "check", + "coerce", + "coercion", + "finite", + "integer", + "is", + "isnan", + "is-nan", + "is-num", + "is-number", + "isnumber", + "isfinite", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "parseFloat", + "parseInt", + "test", + "type", + "typeof", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "is-plain-object", + "is-primitive", + "isobject", + "kind-of" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/jiti/LICENSE b/node_modules/jiti/LICENSE new file mode 100644 index 0000000..e739abc --- /dev/null +++ b/node_modules/jiti/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Pooya Parsa + +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. diff --git a/node_modules/jiti/README.md b/node_modules/jiti/README.md new file mode 100644 index 0000000..2c957a9 --- /dev/null +++ b/node_modules/jiti/README.md @@ -0,0 +1,243 @@ +# jiti + + + +[![npm version](https://img.shields.io/npm/v/jiti?color=F0DB4F)](https://npmjs.com/package/jiti) +[![npm downloads](https://img.shields.io/npm/dm/jiti?color=F0DB4F)](https://npmjs.com/package/jiti) +[![bundle size](https://img.shields.io/bundlephobia/minzip/jiti?color=F0DB4F)](https://bundlephobia.com/package/jiti) + + + +> This is the active development branch. Check out [jiti/v1](https://github.com/unjs/jiti/tree/v1) for legacy v1 docs and code. + +## 🌟 Used in + +[Docusaurus](https://docusaurus.io/), [ESLint](https://github.com/eslint/eslint), [FormKit](https://formkit.com/), [Histoire](https://histoire.dev/), [Knip](https://knip.dev/), [Nitro](https://nitro.unjs.io/), [Nuxt](https://nuxt.com/), [PostCSS loader](https://github.com/webpack-contrib/postcss-loader), [Rsbuild](https://rsbuild.dev/), [Size Limit](https://github.com/ai/size-limit), [Slidev](https://sli.dev/), [Tailwindcss](https://tailwindcss.com/), [Tokenami](https://github.com/tokenami/tokenami), [UnoCSS](https://unocss.dev/), [WXT](https://wxt.dev/), [Winglang](https://www.winglang.io/), [Graphql code generator](https://the-guild.dev/graphql/codegen), [Lingui](https://lingui.dev/), [Scaffdog](https://scaff.dog/), [Storybook](https://storybook.js.org), [...UnJS ecosystem](https://unjs.io/), [...60M+ npm monthly downloads](https://npm.chart.dev/jiti), [...6M+ public repositories](https://github.com/unjs/jiti/network/dependents). + +## ✅ Features + +- Seamless TypeScript and ESM syntax support for Node.js +- Seamless interoperability between ESM and CommonJS +- Asynchronous API to replace `import()` +- Synchronous API to replace `require()` (deprecated) +- Super slim and zero dependency +- Custom resolve aliases +- Smart syntax detection to avoid extra transforms +- Node.js native `require.cache` integration +- Filesystem transpile with hard disk caches +- ESM Loader support +- JSX support (opt-in) + +> [!IMPORTANT] +> To enhance compatibility, jiti `>=2.1` enabled [`interopDefault`](#interopdefault) using a new Proxy method. If you migrated to `2.0.0` earlier, this might have caused behavior changes. In case of any issues during the upgrade, please [report](https://github.com/unjs/jiti/issues) so we can investigate to solve them. 🙏🏼 + +## 💡 Usage + +### CLI + +You can use `jiti` CLI to quickly run any script with TypeScript and native ESM support! + +```bash +npx jiti ./index.ts +``` + +### Programmatic + +Initialize a jiti instance: + +```js +// ESM +import { createJiti } from "jiti"; +const jiti = createJiti(import.meta.url); + +// CommonJS (deprecated) +const { createJiti } = require("jiti"); +const jiti = createJiti(__filename); +``` + +Import (async) and resolve with ESM compatibility: + +```js +// jiti.import(id) is similar to import(id) +const mod = await jiti.import("./path/to/file.ts"); + +// jiti.esmResolve(id) is similar to import.meta.resolve(id) +const resolvedPath = jiti.esmResolve("./src"); +``` + +If you need the default export of module, you can use `jiti.import(id, { default: true })` as shortcut to `mod?.default ?? mod`. + +```js +// shortcut to mod?.default ?? mod +const modDefault = await jiti.import("./path/to/file.ts", { default: true }); +``` + +CommonJS (sync & deprecated): + +```js +// jiti() is similar to require(id) +const mod = jiti("./path/to/file.ts"); + +// jiti.resolve() is similar to require.resolve(id) +const resolvedPath = jiti.resolve("./src"); +``` + +You can also pass options as the second argument: + +```js +const jiti = createJiti(import.meta.url, { debug: true }); +``` + +### Register global ESM loader + +You can globally register jiti using [global hooks](https://nodejs.org/api/module.html#initialize). (Important: Requires Node.js > 20) + +```js +import "jiti/register"; +``` + +Or: + +```bash +node --import jiti/register index.ts +``` + +## 🎈 `jiti/native` + +You can alias `jiti` to `jiti/native` to directly depend on runtime's [`import.meta.resolve`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve) and dynamic [`import()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import) support. This allows easing up the ecosystem transition to runtime native support by giving the same API of jiti. + +## ⚙️ Options + +### `debug` + +- Type: Boolean +- Default: `false` +- Environment variable: `JITI_DEBUG` + +Enable verbose logging. You can use `JITI_DEBUG=1 ` to enable it. + +### `fsCache` + +- Type: Boolean | String +- Default: `true` +- Environment variable: `JITI_FS_CACHE` + +Filesystem source cache (enabled by default) + +By default (when is `true`), jiti uses `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/jiti`. + +**Note:** It is recommended that this option be enabled for better performance. + +### `rebuildFsCache` + +- Type: Boolean +- Default: `false` +- Environment variable: `JITI_REBUILD_FS_CACHE` + +Rebuild filesystem source cache created by `fsCache`. + +### `moduleCache` + +- Type: String +- Default: `true` +- Environment variable: `JITI_MODULE_CACHE` + +Runtime module cache (enabled by default). + +Disabling allows editing code and importing the same module multiple times. + +When enabled, jiti integrates with Node.js native CommonJS cache-store. + +### `transform` + +- Type: Function +- Default: Babel (lazy loaded) + +Transform function. See [src/babel](./src/babel.ts) for more details + +### `sourceMaps` + +- Type: Boolean +- Default `false` +- Environment variable: `JITI_SOURCE_MAPS` + +Add inline source map to transformed source for better debugging. + +### `interopDefault` + +- Type: Boolean +- Default: `true` +- Environment variable: `JITI_INTEROP_DEFAULT` + +Jiti combines module exports with the `default` export using an internal Proxy to improve compatibility with mixed CJS/ESM usage. You can check the current implementation [here](https://github.com/unjs/jiti/blob/main/src/utils.ts#L105). + +### `alias` + +- Type: Object +- Default: - +- Environment variable: `JITI_ALIAS` + +You can also pass an object to the environment variable for inline config. Example: `JITI_ALIAS='{"~/*": "./src/*"}' jiti ...`. + +Custom alias map used to resolve IDs. + +### `nativeModules` + +- Type: Array +- Default: ['typescript'] +- Environment variable: `JITI_NATIVE_MODULES` + +List of modules (within `node_modules`) to always use native `require()` for them. + +### `transformModules` + +- Type: Array +- Default: [] +- Environment variable: `JITI_TRANSFORM_MODULES` + +List of modules (within `node_modules`) to transform them regardless of syntax. + +### `importMeta` + +Parent module's [`import.meta`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta) context to use for ESM resolution. (only used for `jiti/native` import). + +### `tryNative` + +- Type: Boolean +- Default: Enabled if bun is detected +- Environment variable: `JITI_TRY_NATIVE` + +Try to use native require and import without jiti transformations first. + +### `jsx` + +- Type: Boolean | {options} +- Default: `false` +- Environment Variable: `JITI_JSX` + +Enable JSX support using [`@babel/plugin-transform-react-jsx`](https://babeljs.io/docs/babel-plugin-transform-react-jsx). + +See [`test/fixtures/jsx`](./test/fixtures/jsx) for framework integration examples. + +## Development + +- Clone this repository +- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` +- Install dependencies using `pnpm install` +- Run `pnpm dev` +- Run `pnpm jiti ./test/path/to/file.ts` + +## License + + + +Published under the [MIT](https://github.com/unjs/jiti/blob/main/LICENSE) license. +Made by [@pi0](https://github.com/pi0) and [community](https://github.com/unjs/jiti/graphs/contributors) 💛 +

+ + + + + + + diff --git a/node_modules/jiti/dist/babel.cjs b/node_modules/jiti/dist/babel.cjs new file mode 100644 index 0000000..7b37392 --- /dev/null +++ b/node_modules/jiti/dist/babel.cjs @@ -0,0 +1,246 @@ +(()=>{var __webpack_modules__={"./node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping/dist/remapping.umd.js":function(module,__unused_webpack_exports,__webpack_require__){module.exports=function(traceMapping,genMapping){"use strict";const SOURCELESS_MAPPING=SegmentObject("",-1,-1,"",null,!1),EMPTY_SOURCES=[];function SegmentObject(source,line,column,name,content,ignore){return{source,line,column,name,content,ignore}}function Source(map,sources,source,content,ignore){return{map,sources,source,content,ignore}}function MapSource(map,sources){return Source(map,sources,"",null,!1)}function OriginalSource(source,content,ignore){return Source(null,EMPTY_SOURCES,source,content,ignore)}function traceMappings(tree){const gen=new genMapping.GenMapping({file:tree.map.file}),{sources:rootSources,map}=tree,rootNames=map.names,rootMappings=traceMapping.decodedMappings(map);for(let i=0;inew traceMapping.TraceMap(m,"")),map=maps.pop();for(let i=0;i1)throw new Error(`Transformation map ${i} must have exactly one source file.\nDid you specify these with the most recent transformation maps first?`);let tree=build(map,loader,"",0);for(let i=maps.length-1;i>=0;i--)tree=MapSource(maps[i],[tree]);return tree}function build(map,loader,importer,importerDepth){const{resolvedSources,sourcesContent,ignoreList}=map,depth=importerDepth+1;return MapSource(map,resolvedSources.map((sourceFile,i)=>{const ctx={importer,depth,source:sourceFile||"",content:void 0,ignore:void 0},sourceMap=loader(ctx.source,ctx),{source,content,ignore}=ctx;return sourceMap?build(new traceMapping.TraceMap(sourceMap,source),loader,source,depth):OriginalSource(source,void 0!==content?content:sourcesContent?sourcesContent[i]:null,void 0!==ignore?ignore:!!ignoreList&&ignoreList.includes(i))}))}class SourceMap{constructor(map,options){const out=options.decodedMappings?genMapping.toDecodedMap(map):genMapping.toEncodedMap(map);this.version=out.version,this.file=out.file,this.mappings=out.mappings,this.names=out.names,this.ignoreList=out.ignoreList,this.sourceRoot=out.sourceRoot,this.sources=out.sources,options.excludeContent||(this.sourcesContent=out.sourcesContent)}toString(){return JSON.stringify(this)}}function remapping(input,loader,options){const opts="object"==typeof options?options:{excludeContent:!!options,decodedMappings:!1},tree=buildSourceMapTree(input,loader);return new SourceMap(traceMappings(tree),opts)}return remapping}(__webpack_require__("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js"),__webpack_require__("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.12/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"))},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertSimpleType=assertSimpleType,exports.makeStrongCache=makeStrongCache,exports.makeStrongCacheSync=function(handler){return synchronize(makeStrongCache(handler))},exports.makeWeakCache=makeWeakCache,exports.makeWeakCacheSync=function(handler){return synchronize(makeWeakCache(handler))};var _async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js"),_util=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/util.js");const synchronize=gen=>_gensync()(gen).sync;function*genTrue(){return!0}function makeWeakCache(handler){return makeCachedFunction(WeakMap,handler)}function makeStrongCache(handler){return makeCachedFunction(Map,handler)}function makeCachedFunction(CallCache,handler){const callCacheSync=new CallCache,callCacheAsync=new CallCache,futureCache=new CallCache;return function*(arg,data){const asyncContext=yield*(0,_async.isAsync)(),callCache=asyncContext?callCacheAsync:callCacheSync,cached=yield*function*(asyncContext,callCache,futureCache,arg,data){const cached=yield*getCachedValue(callCache,arg,data);if(cached.valid)return cached;if(asyncContext){const cached=yield*getCachedValue(futureCache,arg,data);if(cached.valid){return{valid:!0,value:yield*(0,_async.waitFor)(cached.value.promise)}}}return{valid:!1,value:null}}(asyncContext,callCache,futureCache,arg,data);if(cached.valid)return cached.value;const cache=new CacheConfigurator(data),handlerResult=handler(arg,cache);let finishLock,value;return value=(0,_util.isIterableIterator)(handlerResult)?yield*(0,_async.onFirstPause)(handlerResult,()=>{finishLock=function(config,futureCache,arg){const finishLock=new Lock;return updateFunctionCache(futureCache,config,arg,finishLock),finishLock}(cache,futureCache,arg)}):handlerResult,updateFunctionCache(callCache,cache,arg,value),finishLock&&(futureCache.delete(arg),finishLock.release(value)),value}}function*getCachedValue(cache,arg,data){const cachedValue=cache.get(arg);if(cachedValue)for(const{value,valid}of cachedValue)if(yield*valid(data))return{valid:!0,value};return{valid:!1,value:null}}function updateFunctionCache(cache,config,arg,value){config.configured()||config.forever();let cachedValue=cache.get(arg);switch(config.deactivate(),config.mode()){case"forever":cachedValue=[{value,valid:genTrue}],cache.set(arg,cachedValue);break;case"invalidate":cachedValue=[{value,valid:config.validator()}],cache.set(arg,cachedValue);break;case"valid":cachedValue?cachedValue.push({value,valid:config.validator()}):(cachedValue=[{value,valid:config.validator()}],cache.set(arg,cachedValue))}}class CacheConfigurator{constructor(data){this._active=!0,this._never=!1,this._forever=!1,this._invalidate=!1,this._configured=!1,this._pairs=[],this._data=void 0,this._data=data}simple(){return function(cache){function cacheFn(val){if("boolean"!=typeof val)return cache.using(()=>assertSimpleType(val()));val?cache.forever():cache.never()}return cacheFn.forever=()=>cache.forever(),cacheFn.never=()=>cache.never(),cacheFn.using=cb=>cache.using(()=>assertSimpleType(cb())),cacheFn.invalidate=cb=>cache.invalidate(()=>assertSimpleType(cb())),cacheFn}(this)}mode(){return this._never?"never":this._forever?"forever":this._invalidate?"invalidate":"valid"}forever(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never)throw new Error("Caching has already been configured with .never()");this._forever=!0,this._configured=!0}never(){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._forever)throw new Error("Caching has already been configured with .forever()");this._never=!0,this._configured=!0}using(handler){if(!this._active)throw new Error("Cannot change caching after evaluation has completed.");if(this._never||this._forever)throw new Error("Caching has already been configured with .never or .forever()");this._configured=!0;const key=handler(this._data),fn=(0,_async.maybeAsync)(handler,"You appear to be using an async cache handler, but Babel has been called synchronously");return(0,_async.isThenable)(key)?key.then(key=>(this._pairs.push([key,fn]),key)):(this._pairs.push([key,fn]),key)}invalidate(handler){return this._invalidate=!0,this.using(handler)}validator(){const pairs=this._pairs;return function*(data){for(const[key,fn]of pairs)if(key!==(yield*fn(data)))return!1;return!0}}deactivate(){this._active=!1}configured(){return this._configured}}function assertSimpleType(value){if((0,_async.isThenable)(value))throw new Error("You appear to be using an async cache handler, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously handle your caching logic.");if(null!=value&&"string"!=typeof value&&"boolean"!=typeof value&&"number"!=typeof value)throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");return value}class Lock{constructor(){this.released=!1,this.promise=void 0,this._resolve=void 0,this.promise=new Promise(resolve=>{this._resolve=resolve})}release(value){this.released=!0,this._resolve(value)}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/config-chain.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}function _debug(){const data=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js");return _debug=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildPresetChain=function*(arg,context){const chain=yield*buildPresetChainWalker(arg,context);return chain?{plugins:dedupDescriptors(chain.plugins),presets:dedupDescriptors(chain.presets),options:chain.options.map(o=>normalizeOptions(o)),files:new Set}:null},exports.buildPresetChainWalker=void 0,exports.buildRootChain=function*(opts,context){let configReport,babelRcReport;const programmaticLogger=new _printer.ConfigPrinter,programmaticChain=yield*loadProgrammaticChain({options:opts,dirname:context.cwd},context,void 0,programmaticLogger);if(!programmaticChain)return null;const programmaticReport=yield*programmaticLogger.output();let configFile;"string"==typeof opts.configFile?configFile=yield*(0,_index.loadConfig)(opts.configFile,context.cwd,context.envName,context.caller):!1!==opts.configFile&&(configFile=yield*(0,_index.findRootConfig)(context.root,context.envName,context.caller));let{babelrc,babelrcRoots}=opts,babelrcRootsDirectory=context.cwd;const configFileChain=emptyChain(),configFileLogger=new _printer.ConfigPrinter;if(configFile){const validatedFile=validateConfigFile(configFile),result=yield*loadFileChain(validatedFile,context,void 0,configFileLogger);if(!result)return null;configReport=yield*configFileLogger.output(),void 0===babelrc&&(babelrc=validatedFile.options.babelrc),void 0===babelrcRoots&&(babelrcRootsDirectory=validatedFile.dirname,babelrcRoots=validatedFile.options.babelrcRoots),mergeChain(configFileChain,result)}let ignoreFile,babelrcFile,isIgnored=!1;const fileChain=emptyChain();if((!0===babelrc||void 0===babelrc)&&"string"==typeof context.filename){const pkgData=yield*(0,_index.findPackageData)(context.filename);if(pkgData&&function(context,pkgData,babelrcRoots,babelrcRootsDirectory){if("boolean"==typeof babelrcRoots)return babelrcRoots;const absoluteRoot=context.root;if(void 0===babelrcRoots)return pkgData.directories.includes(absoluteRoot);let babelrcPatterns=babelrcRoots;Array.isArray(babelrcPatterns)||(babelrcPatterns=[babelrcPatterns]);if(babelrcPatterns=babelrcPatterns.map(pat=>"string"==typeof pat?_path().resolve(babelrcRootsDirectory,pat):pat),1===babelrcPatterns.length&&babelrcPatterns[0]===absoluteRoot)return pkgData.directories.includes(absoluteRoot);return babelrcPatterns.some(pat=>("string"==typeof pat&&(pat=(0,_patternToRegex.default)(pat,babelrcRootsDirectory)),pkgData.directories.some(directory=>matchPattern(pat,babelrcRootsDirectory,directory,context))))}(context,pkgData,babelrcRoots,babelrcRootsDirectory)){if(({ignore:ignoreFile,config:babelrcFile}=yield*(0,_index.findRelativeConfig)(pkgData,context.envName,context.caller)),ignoreFile&&fileChain.files.add(ignoreFile.filepath),ignoreFile&&shouldIgnore(context,ignoreFile.ignore,null,ignoreFile.dirname)&&(isIgnored=!0),babelrcFile&&!isIgnored){const validatedFile=validateBabelrcFile(babelrcFile),babelrcLogger=new _printer.ConfigPrinter,result=yield*loadFileChain(validatedFile,context,void 0,babelrcLogger);result?(babelRcReport=yield*babelrcLogger.output(),mergeChain(fileChain,result)):isIgnored=!0}babelrcFile&&isIgnored&&fileChain.files.add(babelrcFile.filepath)}}context.showConfig&&console.log(`Babel configs on "${context.filename}" (ascending priority):\n`+[configReport,babelRcReport,programmaticReport].filter(x=>!!x).join("\n\n")+"\n-----End Babel configs-----");const chain=mergeChain(mergeChain(mergeChain(emptyChain(),configFileChain),fileChain),programmaticChain);return{plugins:isIgnored?[]:dedupDescriptors(chain.plugins),presets:isIgnored?[]:dedupDescriptors(chain.presets),options:isIgnored?[]:chain.options.map(o=>normalizeOptions(o)),fileHandling:isIgnored?"ignored":"transpile",ignore:ignoreFile||void 0,babelrc:babelrcFile||void 0,config:configFile||void 0,files:chain.files}};var _options=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/options.js"),_patternToRegex=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/pattern-to-regex.js"),_printer=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/printer.js"),_rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js"),_configError=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/index.js"),_caching=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js"),_configDescriptors=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/config-descriptors.js");const debug=_debug()("babel:config:config-chain");const buildPresetChainWalker=exports.buildPresetChainWalker=makeChainWalker({root:preset=>loadPresetDescriptors(preset),env:(preset,envName)=>loadPresetEnvDescriptors(preset)(envName),overrides:(preset,index)=>loadPresetOverridesDescriptors(preset)(index),overridesEnv:(preset,index,envName)=>loadPresetOverridesEnvDescriptors(preset)(index)(envName),createLogger:()=>()=>{}}),loadPresetDescriptors=(0,_caching.makeWeakCacheSync)(preset=>buildRootDescriptors(preset,preset.alias,_configDescriptors.createUncachedDescriptors)),loadPresetEnvDescriptors=(0,_caching.makeWeakCacheSync)(preset=>(0,_caching.makeStrongCacheSync)(envName=>buildEnvDescriptors(preset,preset.alias,_configDescriptors.createUncachedDescriptors,envName))),loadPresetOverridesDescriptors=(0,_caching.makeWeakCacheSync)(preset=>(0,_caching.makeStrongCacheSync)(index=>buildOverrideDescriptors(preset,preset.alias,_configDescriptors.createUncachedDescriptors,index))),loadPresetOverridesEnvDescriptors=(0,_caching.makeWeakCacheSync)(preset=>(0,_caching.makeStrongCacheSync)(index=>(0,_caching.makeStrongCacheSync)(envName=>buildOverrideEnvDescriptors(preset,preset.alias,_configDescriptors.createUncachedDescriptors,index,envName))));const validateConfigFile=(0,_caching.makeWeakCacheSync)(file=>({filepath:file.filepath,dirname:file.dirname,options:(0,_options.validate)("configfile",file.options,file.filepath)})),validateBabelrcFile=(0,_caching.makeWeakCacheSync)(file=>({filepath:file.filepath,dirname:file.dirname,options:(0,_options.validate)("babelrcfile",file.options,file.filepath)})),validateExtendFile=(0,_caching.makeWeakCacheSync)(file=>({filepath:file.filepath,dirname:file.dirname,options:(0,_options.validate)("extendsfile",file.options,file.filepath)})),loadProgrammaticChain=makeChainWalker({root:input=>buildRootDescriptors(input,"base",_configDescriptors.createCachedDescriptors),env:(input,envName)=>buildEnvDescriptors(input,"base",_configDescriptors.createCachedDescriptors,envName),overrides:(input,index)=>buildOverrideDescriptors(input,"base",_configDescriptors.createCachedDescriptors,index),overridesEnv:(input,index,envName)=>buildOverrideEnvDescriptors(input,"base",_configDescriptors.createCachedDescriptors,index,envName),createLogger:(input,context,baseLogger)=>function(_,context,baseLogger){var _context$caller;if(!baseLogger)return()=>{};return baseLogger.configure(context.showConfig,_printer.ChainFormatter.Programmatic,{callerName:null==(_context$caller=context.caller)?void 0:_context$caller.name})}(0,context,baseLogger)}),loadFileChainWalker=makeChainWalker({root:file=>loadFileDescriptors(file),env:(file,envName)=>loadFileEnvDescriptors(file)(envName),overrides:(file,index)=>loadFileOverridesDescriptors(file)(index),overridesEnv:(file,index,envName)=>loadFileOverridesEnvDescriptors(file)(index)(envName),createLogger:(file,context,baseLogger)=>function(filepath,context,baseLogger){if(!baseLogger)return()=>{};return baseLogger.configure(context.showConfig,_printer.ChainFormatter.Config,{filepath})}(file.filepath,context,baseLogger)});function*loadFileChain(input,context,files,baseLogger){const chain=yield*loadFileChainWalker(input,context,files,baseLogger);return null==chain||chain.files.add(input.filepath),chain}const loadFileDescriptors=(0,_caching.makeWeakCacheSync)(file=>buildRootDescriptors(file,file.filepath,_configDescriptors.createUncachedDescriptors)),loadFileEnvDescriptors=(0,_caching.makeWeakCacheSync)(file=>(0,_caching.makeStrongCacheSync)(envName=>buildEnvDescriptors(file,file.filepath,_configDescriptors.createUncachedDescriptors,envName))),loadFileOverridesDescriptors=(0,_caching.makeWeakCacheSync)(file=>(0,_caching.makeStrongCacheSync)(index=>buildOverrideDescriptors(file,file.filepath,_configDescriptors.createUncachedDescriptors,index))),loadFileOverridesEnvDescriptors=(0,_caching.makeWeakCacheSync)(file=>(0,_caching.makeStrongCacheSync)(index=>(0,_caching.makeStrongCacheSync)(envName=>buildOverrideEnvDescriptors(file,file.filepath,_configDescriptors.createUncachedDescriptors,index,envName))));function buildRootDescriptors({dirname,options},alias,descriptors){return descriptors(dirname,options,alias)}function buildEnvDescriptors({dirname,options},alias,descriptors,envName){var _options$env;const opts=null==(_options$env=options.env)?void 0:_options$env[envName];return opts?descriptors(dirname,opts,`${alias}.env["${envName}"]`):null}function buildOverrideDescriptors({dirname,options},alias,descriptors,index){var _options$overrides;const opts=null==(_options$overrides=options.overrides)?void 0:_options$overrides[index];if(!opts)throw new Error("Assertion failure - missing override");return descriptors(dirname,opts,`${alias}.overrides[${index}]`)}function buildOverrideEnvDescriptors({dirname,options},alias,descriptors,index,envName){var _options$overrides2,_override$env;const override=null==(_options$overrides2=options.overrides)?void 0:_options$overrides2[index];if(!override)throw new Error("Assertion failure - missing override");const opts=null==(_override$env=override.env)?void 0:_override$env[envName];return opts?descriptors(dirname,opts,`${alias}.overrides[${index}].env["${envName}"]`):null}function makeChainWalker({root,env,overrides,overridesEnv,createLogger}){return function*(input,context,files=new Set,baseLogger){const{dirname}=input,flattenedConfigs=[],rootOpts=root(input);if(configIsApplicable(rootOpts,dirname,context,input.filepath)){flattenedConfigs.push({config:rootOpts,envName:void 0,index:void 0});const envOpts=env(input,context.envName);envOpts&&configIsApplicable(envOpts,dirname,context,input.filepath)&&flattenedConfigs.push({config:envOpts,envName:context.envName,index:void 0}),(rootOpts.options.overrides||[]).forEach((_,index)=>{const overrideOps=overrides(input,index);if(configIsApplicable(overrideOps,dirname,context,input.filepath)){flattenedConfigs.push({config:overrideOps,index,envName:void 0});const overrideEnvOpts=overridesEnv(input,index,context.envName);overrideEnvOpts&&configIsApplicable(overrideEnvOpts,dirname,context,input.filepath)&&flattenedConfigs.push({config:overrideEnvOpts,index,envName:context.envName})}})}if(flattenedConfigs.some(({config:{options:{ignore,only}}})=>shouldIgnore(context,ignore,only,dirname)))return null;const chain=emptyChain(),logger=createLogger(input,context,baseLogger);for(const{config,index,envName}of flattenedConfigs){if(!(yield*mergeExtendsChain(chain,config.options,dirname,context,files,baseLogger)))return null;logger(config,index,envName),yield*mergeChainOpts(chain,config)}return chain}}function*mergeExtendsChain(chain,opts,dirname,context,files,baseLogger){if(void 0===opts.extends)return!0;const file=yield*(0,_index.loadConfig)(opts.extends,dirname,context.envName,context.caller);if(files.has(file))throw new Error(`Configuration cycle detected loading ${file.filepath}.\nFile already loaded following the config chain:\n`+Array.from(files,file=>` - ${file.filepath}`).join("\n"));files.add(file);const fileChain=yield*loadFileChain(validateExtendFile(file),context,files,baseLogger);return files.delete(file),!!fileChain&&(mergeChain(chain,fileChain),!0)}function mergeChain(target,source){target.options.push(...source.options),target.plugins.push(...source.plugins),target.presets.push(...source.presets);for(const file of source.files)target.files.add(file);return target}function*mergeChainOpts(target,{options,plugins,presets}){return target.options.push(options),target.plugins.push(...yield*plugins()),target.presets.push(...yield*presets()),target}function emptyChain(){return{options:[],presets:[],plugins:[],files:new Set}}function normalizeOptions(opts){const options=Object.assign({},opts);return delete options.extends,delete options.env,delete options.overrides,delete options.plugins,delete options.presets,delete options.passPerPreset,delete options.ignore,delete options.only,delete options.test,delete options.include,delete options.exclude,hasOwnProperty.call(options,"sourceMap")&&(options.sourceMaps=options.sourceMap,delete options.sourceMap),options}function dedupDescriptors(items){const map=new Map,descriptors=[];for(const item of items)if("function"==typeof item.value){const fnKey=item.value;let nameMap=map.get(fnKey);nameMap||(nameMap=new Map,map.set(fnKey,nameMap));let desc=nameMap.get(item.name);desc?desc.value=item:(desc={value:item},descriptors.push(desc),item.ownPass||nameMap.set(item.name,desc))}else descriptors.push({value:item});return descriptors.reduce((acc,desc)=>(acc.push(desc.value),acc),[])}function configIsApplicable({options},dirname,context,configName){return(void 0===options.test||configFieldIsApplicable(context,options.test,dirname,configName))&&(void 0===options.include||configFieldIsApplicable(context,options.include,dirname,configName))&&(void 0===options.exclude||!configFieldIsApplicable(context,options.exclude,dirname,configName))}function configFieldIsApplicable(context,test,dirname,configName){return matchesPatterns(context,Array.isArray(test)?test:[test],dirname,configName)}function ignoreListReplacer(_key,value){return value instanceof RegExp?String(value):value}function shouldIgnore(context,ignore,only,dirname){if(ignore&&matchesPatterns(context,ignore,dirname)){var _context$filename;const message=`No config is applied to "${null!=(_context$filename=context.filename)?_context$filename:"(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore,ignoreListReplacer)}\` from "${dirname}"`;return debug(message),context.showConfig&&console.log(message),!0}if(only&&!matchesPatterns(context,only,dirname)){var _context$filename2;const message=`No config is applied to "${null!=(_context$filename2=context.filename)?_context$filename2:"(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only,ignoreListReplacer)}\` from "${dirname}"`;return debug(message),context.showConfig&&console.log(message),!0}return!1}function matchesPatterns(context,patterns,dirname,configName){return patterns.some(pattern=>matchPattern(pattern,dirname,context.filename,context,configName))}function matchPattern(pattern,dirname,pathToTest,context,configName){if("function"==typeof pattern)return!!(0,_rewriteStackTrace.endHiddenCallStack)(pattern)(pathToTest,{dirname,envName:context.envName,caller:context.caller});if("string"!=typeof pathToTest)throw new _configError.default("Configuration contains string/RegExp pattern, but no filename was passed to Babel",configName);return"string"==typeof pattern&&(pattern=(0,_patternToRegex.default)(pattern,dirname)),pattern.test(pathToTest)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/config-descriptors.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createCachedDescriptors=function(dirname,options,alias){const{plugins,presets,passPerPreset}=options;return{options:optionsWithResolvedBrowserslistConfigFile(options,dirname),plugins:plugins?()=>createCachedPluginDescriptors(plugins,dirname)(alias):()=>handlerOf([]),presets:presets?()=>createCachedPresetDescriptors(presets,dirname)(alias)(!!passPerPreset):()=>handlerOf([])}},exports.createDescriptor=createDescriptor,exports.createUncachedDescriptors=function(dirname,options,alias){return{options:optionsWithResolvedBrowserslistConfigFile(options,dirname),plugins:(0,_functional.once)(()=>createPluginDescriptors(options.plugins||[],dirname,alias)),presets:(0,_functional.once)(()=>createPresetDescriptors(options.presets||[],dirname,alias,!!options.passPerPreset))}};var _functional=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/functional.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/index.js"),_item=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/item.js"),_caching=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js"),_resolveTargets=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/resolve-targets.js");function*handlerOf(value){return value}function optionsWithResolvedBrowserslistConfigFile(options,dirname){return"string"==typeof options.browserslistConfigFile&&(options.browserslistConfigFile=(0,_resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile,dirname)),options}const PRESET_DESCRIPTOR_CACHE=new WeakMap,createCachedPresetDescriptors=(0,_caching.makeWeakCacheSync)((items,cache)=>{const dirname=cache.using(dir=>dir);return(0,_caching.makeStrongCacheSync)(alias=>(0,_caching.makeStrongCache)(function*(passPerPreset){return(yield*createPresetDescriptors(items,dirname,alias,passPerPreset)).map(desc=>loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE,desc))}))}),PLUGIN_DESCRIPTOR_CACHE=new WeakMap,createCachedPluginDescriptors=(0,_caching.makeWeakCacheSync)((items,cache)=>{const dirname=cache.using(dir=>dir);return(0,_caching.makeStrongCache)(function*(alias){return(yield*createPluginDescriptors(items,dirname,alias)).map(desc=>loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE,desc))})}),DEFAULT_OPTIONS={};function loadCachedDescriptor(cache,desc){const{value,options=DEFAULT_OPTIONS}=desc;if(!1===options)return desc;let cacheByOptions=cache.get(value);cacheByOptions||(cacheByOptions=new WeakMap,cache.set(value,cacheByOptions));let possibilities=cacheByOptions.get(options);if(possibilities||(possibilities=[],cacheByOptions.set(options,possibilities)),!possibilities.includes(desc)){const matches=possibilities.filter(possibility=>{return b=desc,(a=possibility).name===b.name&&a.value===b.value&&a.options===b.options&&a.dirname===b.dirname&&a.alias===b.alias&&a.ownPass===b.ownPass&&(null==(_a$file=a.file)?void 0:_a$file.request)===(null==(_b$file=b.file)?void 0:_b$file.request)&&(null==(_a$file2=a.file)?void 0:_a$file2.resolved)===(null==(_b$file2=b.file)?void 0:_b$file2.resolved);var a,b,_a$file,_b$file,_a$file2,_b$file2});if(matches.length>0)return matches[0];possibilities.push(desc)}return desc}function*createPresetDescriptors(items,dirname,alias,passPerPreset){return yield*createDescriptors("preset",items,dirname,alias,passPerPreset)}function*createPluginDescriptors(items,dirname,alias){return yield*createDescriptors("plugin",items,dirname,alias)}function*createDescriptors(type,items,dirname,alias,ownPass){const descriptors=yield*_gensync().all(items.map((item,index)=>createDescriptor(item,dirname,{type,alias:`${alias}$${index}`,ownPass:!!ownPass})));return function(items){const map=new Map;for(const item of items){if("function"!=typeof item.value)continue;let nameMap=map.get(item.value);if(nameMap||(nameMap=new Set,map.set(item.value,nameMap)),nameMap.has(item.name)){const conflicts=items.filter(i=>i.value===item.value);throw new Error(["Duplicate plugin/preset detected.","If you'd like to use two separate instances of a plugin,","they need separate names, e.g.",""," plugins: ["," ['some-plugin', {}],"," ['some-plugin', {}, 'some unique name'],"," ]","","Duplicates detected are:",`${JSON.stringify(conflicts,null,2)}`].join("\n"))}nameMap.add(item.name)}}(descriptors),descriptors}function*createDescriptor(pair,dirname,{type,alias,ownPass}){const desc=(0,_item.getItemDescriptor)(pair);if(desc)return desc;let name,options,file,value=pair;Array.isArray(value)&&(3===value.length?[value,options,name]=value:[value,options]=value);let filepath=null;if("string"==typeof value){if("string"!=typeof type)throw new Error("To resolve a string-based item, the type of item must be given");const resolver="plugin"===type?_index.loadPlugin:_index.loadPreset,request=value;({filepath,value}=yield*resolver(value,dirname)),file={request,resolved:filepath}}if(!value)throw new Error(`Unexpected falsy value: ${String(value)}`);if("object"==typeof value&&value.__esModule){if(!value.default)throw new Error("Must export a default export when using ES6 modules.");value=value.default}if("object"!=typeof value&&"function"!=typeof value)throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`);if(null!==filepath&&"object"==typeof value&&value)throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`);return{name,alias:filepath||alias,value,options,dirname,ownPass,file}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files lazy recursive":module=>{function webpackEmptyAsyncContext(req){return Promise.resolve().then(()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e})}webpackEmptyAsyncContext.keys=()=>[],webpackEmptyAsyncContext.resolve=webpackEmptyAsyncContext,webpackEmptyAsyncContext.id="./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files lazy recursive",module.exports=webpackEmptyAsyncContext},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive":module=>{function webpackEmptyContext(req){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive",module.exports=webpackEmptyContext},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/configuration.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _debug(){const data=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js");return _debug=function(){return data},data}function _fs(){const data=__webpack_require__("fs");return _fs=function(){return data},data}function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}function _json(){const data=__webpack_require__("./node_modules/.pnpm/json5@2.2.3/node_modules/json5/dist/index.mjs");return _json=function(){return data},data}function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ROOT_CONFIG_FILENAMES=void 0,exports.findConfigUpwards=function(rootDir){let dirname=rootDir;for(;;){for(const filename of ROOT_CONFIG_FILENAMES)if(_fs().existsSync(_path().join(dirname,filename)))return dirname;const nextDir=_path().dirname(dirname);if(dirname===nextDir)break;dirname=nextDir}return null},exports.findRelativeConfig=function*(packageData,envName,caller){let config=null,ignore=null;const dirname=_path().dirname(packageData.filepath);for(const loc of packageData.directories){var _packageData$pkg;if(!config)config=yield*loadOneConfig(RELATIVE_CONFIG_FILENAMES,loc,envName,caller,(null==(_packageData$pkg=packageData.pkg)?void 0:_packageData$pkg.dirname)===loc?packageToBabelConfig(packageData.pkg):null);if(!ignore){const ignoreLoc=_path().join(loc,BABELIGNORE_FILENAME);ignore=yield*readIgnoreConfig(ignoreLoc),ignore&&debug("Found ignore %o from %o.",ignore.filepath,dirname)}}return{config,ignore}},exports.findRootConfig=function(dirname,envName,caller){return loadOneConfig(ROOT_CONFIG_FILENAMES,dirname,envName,caller)},exports.loadConfig=function*(name,dirname,envName,caller){const filepath=(v=process.versions.node,w="8.9",v=v.split("."),w=w.split("."),+v[0]>+w[0]||v[0]==w[0]&&+v[1]>=+w[1]?__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").resolve:(r,{paths:[b]},M=__webpack_require__("module"))=>{let f=M._findPath(r,M._nodeModulePaths(b).concat(b));if(f)return f;throw f=new Error(`Cannot resolve module '${r}'`),f.code="MODULE_NOT_FOUND",f})(name,{paths:[dirname]}),conf=yield*readConfig(filepath,envName,caller);var v,w;if(!conf)throw new _configError.default("Config file contains no configuration data",filepath);return debug("Loaded config %o from %o.",name,dirname),conf},exports.resolveShowConfigPath=function*(dirname){const targetPath=process.env.BABEL_SHOW_CONFIG_FOR;if(null!=targetPath){const absolutePath=_path().resolve(dirname,targetPath);if(!(yield*fs.stat(absolutePath)).isFile())throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);return absolutePath}return null};var _caching=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js"),_configApi=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/config-api.js"),_utils=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/utils.js"),_moduleTypes=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/module-types.js"),_patternToRegex=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/pattern-to-regex.js"),_configError=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js"),fs=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/fs.js");__webpack_require__("module");var _rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js"),_async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js");const debug=_debug()("babel:config:loading:files:configuration"),ROOT_CONFIG_FILENAMES=exports.ROOT_CONFIG_FILENAMES=["babel.config.js","babel.config.cjs","babel.config.mjs","babel.config.json","babel.config.cts","babel.config.ts","babel.config.mts"],RELATIVE_CONFIG_FILENAMES=[".babelrc",".babelrc.js",".babelrc.cjs",".babelrc.mjs",".babelrc.json",".babelrc.cts"],BABELIGNORE_FILENAME=".babelignore",runConfig=(0,_caching.makeWeakCache)(function*(options,cache){return yield*[],{options:(0,_rewriteStackTrace.endHiddenCallStack)(options)((0,_configApi.makeConfigAPI)(cache)),cacheNeedsConfiguration:!cache.configured()}});function*readConfigCode(filepath,data){if(!_fs().existsSync(filepath))return null;let options=yield*(0,_moduleTypes.default)(filepath,(yield*(0,_async.isAsync)())?"auto":"require","You appear to be using a native ECMAScript module configuration file, which is only supported when running Babel asynchronously or when using the Node.js `--experimental-require-module` flag.","You appear to be using a configuration file that contains top-level await, which is only supported when running Babel asynchronously."),cacheNeedsConfiguration=!1;if("function"==typeof options&&({options,cacheNeedsConfiguration}=yield*runConfig(options,data)),!options||"object"!=typeof options||Array.isArray(options))throw new _configError.default("Configuration should be an exported JavaScript object.",filepath);if("function"==typeof options.then)throw null==options.catch||options.catch(()=>{}),new _configError.default("You appear to be using an async configuration, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously return your config.",filepath);return cacheNeedsConfiguration&&function(filepath){throw new _configError.default('Caching was left unconfigured. Babel\'s plugins, presets, and .babelrc.js files can be configured\nfor various types of caching, using the first param of their handler functions:\n\nmodule.exports = function(api) {\n // The API exposes the following:\n\n // Cache the returned value forever and don\'t call this function again.\n api.cache(true);\n\n // Don\'t cache at all. Not recommended because it will be very slow.\n api.cache(false);\n\n // Cached based on the value of some function. If this function returns a value different from\n // a previously-encountered value, the plugins will re-evaluate.\n var env = api.cache(() => process.env.NODE_ENV);\n\n // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for\n // any possible NODE_ENV value that might come up during plugin execution.\n var isProd = api.cache(() => process.env.NODE_ENV === "production");\n\n // .cache(fn) will perform a linear search though instances to find the matching plugin based\n // based on previous instantiated plugins. If you want to recreate the plugin and discard the\n // previous instance whenever something changes, you may use:\n var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");\n\n // Note, we also expose the following more-verbose versions of the above examples:\n api.cache.forever(); // api.cache(true)\n api.cache.never(); // api.cache(false)\n api.cache.using(fn); // api.cache(fn)\n\n // Return the value that will be cached.\n return { };\n};',filepath)}(filepath),function(options,filepath){let configFilesByFilepath=cfboaf.get(options);configFilesByFilepath||cfboaf.set(options,configFilesByFilepath=new Map);let configFile=configFilesByFilepath.get(filepath);configFile||(configFile={filepath,dirname:_path().dirname(filepath),options},configFilesByFilepath.set(filepath,configFile));return configFile}(options,filepath)}const cfboaf=new WeakMap;const packageToBabelConfig=(0,_caching.makeWeakCacheSync)(file=>{const babel=file.options.babel;if(void 0===babel)return null;if("object"!=typeof babel||Array.isArray(babel)||null===babel)throw new _configError.default(".babel property must be an object",file.filepath);return{filepath:file.filepath,dirname:file.dirname,options:babel}}),readConfigJSON5=(0,_utils.makeStaticFileCache)((filepath,content)=>{let options;try{options=_json().parse(content)}catch(err){throw new _configError.default(`Error while parsing config - ${err.message}`,filepath)}if(!options)throw new _configError.default("No config detected",filepath);if("object"!=typeof options)throw new _configError.default("Config returned typeof "+typeof options,filepath);if(Array.isArray(options))throw new _configError.default("Expected config object but found array",filepath);return delete options.$schema,{filepath,dirname:_path().dirname(filepath),options}}),readIgnoreConfig=(0,_utils.makeStaticFileCache)((filepath,content)=>{const ignoreDir=_path().dirname(filepath),ignorePatterns=content.split("\n").map(line=>line.replace(/#.*$/,"").trim()).filter(Boolean);for(const pattern of ignorePatterns)if("!"===pattern[0])throw new _configError.default("Negation of file paths is not supported.",filepath);return{filepath,dirname:_path().dirname(filepath),ignore:ignorePatterns.map(pattern=>(0,_patternToRegex.default)(pattern,ignoreDir))}});function*loadOneConfig(names,dirname,envName,caller,previousConfig=null){const config=(yield*_gensync().all(names.map(filename=>readConfig(_path().join(dirname,filename),envName,caller)))).reduce((previousConfig,config)=>{if(config&&previousConfig)throw new _configError.default(`Multiple configuration files found. Please remove one:\n - ${_path().basename(previousConfig.filepath)}\n - ${config.filepath}\nfrom ${dirname}`);return config||previousConfig},previousConfig);return config&&debug("Found configuration %o from %o.",config.filepath,dirname),config}function readConfig(filepath,envName,caller){switch(_path().extname(filepath)){case".js":case".cjs":case".mjs":case".ts":case".cts":case".mts":return readConfigCode(filepath,{envName,caller});default:return readConfigJSON5(filepath)}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/import.cjs":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function(filepath){return __webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files lazy recursive")(filepath)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ROOT_CONFIG_FILENAMES",{enumerable:!0,get:function(){return _configuration.ROOT_CONFIG_FILENAMES}}),Object.defineProperty(exports,"findConfigUpwards",{enumerable:!0,get:function(){return _configuration.findConfigUpwards}}),Object.defineProperty(exports,"findPackageData",{enumerable:!0,get:function(){return _package.findPackageData}}),Object.defineProperty(exports,"findRelativeConfig",{enumerable:!0,get:function(){return _configuration.findRelativeConfig}}),Object.defineProperty(exports,"findRootConfig",{enumerable:!0,get:function(){return _configuration.findRootConfig}}),Object.defineProperty(exports,"loadConfig",{enumerable:!0,get:function(){return _configuration.loadConfig}}),Object.defineProperty(exports,"loadPlugin",{enumerable:!0,get:function(){return _plugins.loadPlugin}}),Object.defineProperty(exports,"loadPreset",{enumerable:!0,get:function(){return _plugins.loadPreset}}),Object.defineProperty(exports,"resolvePlugin",{enumerable:!0,get:function(){return _plugins.resolvePlugin}}),Object.defineProperty(exports,"resolvePreset",{enumerable:!0,get:function(){return _plugins.resolvePreset}}),Object.defineProperty(exports,"resolveShowConfigPath",{enumerable:!0,get:function(){return _configuration.resolveShowConfigPath}});var _package=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/package.js"),_configuration=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/configuration.js"),_plugins=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/plugins.js")},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/module-types.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function*(filepath,loader,esmError,tlaError){let async;const ext=_path().extname(filepath),isTS=".ts"===ext||".cts"===ext||".mts"===ext,type=SUPPORTED_EXTENSIONS[hasOwnProperty.call(SUPPORTED_EXTENSIONS,ext)?ext:".js"];switch(`${loader} ${type}`){case"require cjs":case"auto cjs":return isTS?ensureTsSupport(filepath,ext,()=>loadCjsDefault(filepath)):loadCjsDefault(filepath,arguments[2]);case"auto unknown":case"require unknown":case"require esm":try{return isTS?ensureTsSupport(filepath,ext,()=>loadCjsDefault(filepath)):loadCjsDefault(filepath,arguments[2])}catch(e){if("ERR_REQUIRE_ASYNC_MODULE"===e.code||"ERR_REQUIRE_CYCLE_MODULE"===e.code&&asyncModules.has(filepath)){if(asyncModules.add(filepath),!(null!=async?async:async=yield*(0,_async.isAsync)()))throw new _configError.default(tlaError,filepath)}else if("ERR_REQUIRE_ESM"!==e.code&&"esm"!==type)throw e}case"auto esm":if(null!=async?async:async=yield*(0,_async.isAsync)()){const promise=isTS?ensureTsSupport(filepath,ext,()=>loadMjsFromPath(filepath)):loadMjsFromPath(filepath);return(yield*(0,_async.waitFor)(promise)).default}throw isTS?new _configError.default(tsNotSupportedError(ext),filepath):new _configError.default(esmError,filepath);default:throw new Error("Internal Babel error: unreachable code.")}},exports.supportsESM=void 0;var _async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js");function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}function _url(){const data=__webpack_require__("url");return _url=function(){return data},data}function _semver(){const data=__webpack_require__("./node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js");return _semver=function(){return data},data}function _debug(){const data=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js");return _debug=function(){return data},data}__webpack_require__("module");var _rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js"),_configError=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js"),_transformFile=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform-file.js");function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}const debug=_debug()("babel:config:loading:files:module-types");try{var import_=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/import.cjs")}catch(_unused){}exports.supportsESM=_semver().satisfies(process.versions.node,"^12.17 || >=13.2");const LOADING_CJS_FILES=new Set;function loadCjsDefault(filepath){if(LOADING_CJS_FILES.has(filepath))return debug("Auto-ignoring usage of config %o.",filepath),{};let module;try{LOADING_CJS_FILES.add(filepath),module=(0,_rewriteStackTrace.endHiddenCallStack)(__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive"))(filepath)}finally{LOADING_CJS_FILES.delete(filepath)}return null==module||!module.__esModule&&"Module"!==module[Symbol.toStringTag]?module:module.default||(arguments[1]?module:void 0)}const loadMjsFromPath=(0,_rewriteStackTrace.endHiddenCallStack)((n=function*(filepath){const url=(0,_url().pathToFileURL)(filepath).toString()+"?import";if(!import_)throw new _configError.default("Internal error: Native ECMAScript modules aren't supported by this platform.\n",filepath);return yield import_(url)},_loadMjsFromPath=function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})},function(_x){return _loadMjsFromPath.apply(this,arguments)}));var n,_loadMjsFromPath;const tsNotSupportedError=ext=>`You are using a ${ext} config file, but Babel only supports transpiling .cts configs. Either:\n- Use a .cts config file\n- Update to Node.js 23.6.0, which has native TypeScript support\n- Install tsx to transpile ${ext} files on the fly`,SUPPORTED_EXTENSIONS={".js":"unknown",".mjs":"esm",".cjs":"cjs",".ts":"unknown",".mts":"esm",".cts":"cjs"},asyncModules=new Set;function ensureTsSupport(filepath,ext,callback){if(process.features.typescript||__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[".ts"]||__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[".cts"]||__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[".mts"])return callback();if(".cts"!==ext)throw new _configError.default(tsNotSupportedError(ext),filepath);const opts={babelrc:!1,configFile:!1,sourceType:"unambiguous",sourceMaps:"inline",sourceFileName:_path().basename(filepath),presets:[[getTSPreset(filepath),Object.assign({onlyRemoveTypeImports:!0,optimizeConstEnums:!0},{allowDeclareFields:!0})]]};let handler=function(m,filename){if(handler&&filename.endsWith(".cts"))try{return m._compile((0,_transformFile.transformFileSync)(filename,Object.assign({},opts,{filename})).code,filename)}catch(error){const packageJson=__webpack_require__("./node_modules/.pnpm/@babel+preset-typescript@7.27.1_@babel+core@7.28.0/node_modules/@babel/preset-typescript/package.json");throw _semver().lt(packageJson.version,"7.21.4")&&console.error("`.cts` configuration file failed to load, please try to update `@babel/preset-typescript`."),error}return __webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[".js"](m,filename)};__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[ext]=handler;try{return callback()}finally{__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[ext]===handler&&delete __webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").extensions[ext],handler=void 0}}function getTSPreset(filepath){try{return __webpack_require__("./node_modules/.pnpm/@babel+preset-typescript@7.27.1_@babel+core@7.28.0/node_modules/@babel/preset-typescript/lib/index.js")}catch(error){if("MODULE_NOT_FOUND"!==error.code)throw error;let message="You appear to be using a .cts file as Babel configuration, but the `@babel/preset-typescript` package was not found: please install it!";throw process.versions.pnp&&(message+='\nIf you are using Yarn Plug\'n\'Play, you may also need to add the following configuration to your .yarnrc.yml file:\n\npackageExtensions:\n\t"@babel/core@*":\n\t\tpeerDependencies:\n\t\t\t"@babel/preset-typescript": "*"\n'),new _configError.default(message,filepath)}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/package.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findPackageData=function*(filepath){let pkg=null;const directories=[];let isPackage=!0,dirname=_path().dirname(filepath);for(;!pkg&&"node_modules"!==_path().basename(dirname);){directories.push(dirname),pkg=yield*readConfigPackage(_path().join(dirname,PACKAGE_FILENAME));const nextLoc=_path().dirname(dirname);if(dirname===nextLoc){isPackage=!1;break}dirname=nextLoc}return{filepath,directories,pkg,isPackage}};var _utils=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/utils.js"),_configError=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js");const PACKAGE_FILENAME="package.json",readConfigPackage=(0,_utils.makeStaticFileCache)((filepath,content)=>{let options;try{options=JSON.parse(content)}catch(err){throw new _configError.default(`Error while parsing JSON - ${err.message}`,filepath)}if(!options)throw new Error(`${filepath}: No config detected`);if("object"!=typeof options)throw new _configError.default("Config returned typeof "+typeof options,filepath);if(Array.isArray(options))throw new _configError.default("Expected config object but found array",filepath);return{filepath,dirname:_path().dirname(filepath),options}})},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/plugins.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _debug(){const data=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js");return _debug=function(){return data},data}function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadPlugin=function*(name,dirname){const{filepath,loader}=resolvePlugin(name,dirname,yield*(0,_async.isAsync)()),value=yield*requireModule("plugin",loader,filepath);return debug("Loaded plugin %o from %o.",name,dirname),{filepath,value}},exports.loadPreset=function*(name,dirname){const{filepath,loader}=resolvePreset(name,dirname,yield*(0,_async.isAsync)()),value=yield*requireModule("preset",loader,filepath);return debug("Loaded preset %o from %o.",name,dirname),{filepath,value}},exports.resolvePreset=exports.resolvePlugin=void 0;var _async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js"),_moduleTypes=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/module-types.js");function _url(){const data=__webpack_require__("url");return _url=function(){return data},data}var _importMetaResolve=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/vendor/import-meta-resolve.js");function _fs(){const data=__webpack_require__("fs");return _fs=function(){return data},data}__webpack_require__("module");const debug=_debug()("babel:config:loading:files:plugins"),EXACT_RE=/^module:/,BABEL_PLUGIN_PREFIX_RE=/^(?!@|module:|[^/]+\/|babel-plugin-)/,BABEL_PRESET_PREFIX_RE=/^(?!@|module:|[^/]+\/|babel-preset-)/,BABEL_PLUGIN_ORG_RE=/^(@babel\/)(?!plugin-|[^/]+\/)/,BABEL_PRESET_ORG_RE=/^(@babel\/)(?!preset-|[^/]+\/)/,OTHER_PLUGIN_ORG_RE=/^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/,OTHER_PRESET_ORG_RE=/^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/,OTHER_ORG_DEFAULT_RE=/^(@(?!babel$)[^/]+)$/,resolvePlugin=exports.resolvePlugin=resolveStandardizedName.bind(null,"plugin"),resolvePreset=exports.resolvePreset=resolveStandardizedName.bind(null,"preset");function standardizeName(type,name){if(_path().isAbsolute(name))return name;const isPreset="preset"===type;return name.replace(isPreset?BABEL_PRESET_PREFIX_RE:BABEL_PLUGIN_PREFIX_RE,`babel-${type}-`).replace(isPreset?BABEL_PRESET_ORG_RE:BABEL_PLUGIN_ORG_RE,`$1${type}-`).replace(isPreset?OTHER_PRESET_ORG_RE:OTHER_PLUGIN_ORG_RE,`$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE,`$1/babel-${type}`).replace(EXACT_RE,"")}function*resolveAlternativesHelper(type,name){const standardizedName=standardizeName(type,name),{error,value}=yield standardizedName;if(!error)return value;if("MODULE_NOT_FOUND"!==error.code)throw error;standardizedName===name||(yield name).error||(error.message+=`\n- If you want to resolve "${name}", use "module:${name}"`),(yield standardizeName(type,"@babel/"+name)).error||(error.message+=`\n- Did you mean "@babel/${name}"?`);const oppositeType="preset"===type?"plugin":"preset";if((yield standardizeName(oppositeType,name)).error||(error.message+=`\n- Did you accidentally pass a ${oppositeType} as a ${type}?`),"plugin"===type){const transformName=standardizedName.replace("-proposal-","-transform-");transformName===standardizedName||(yield transformName).error||(error.message+=`\n- Did you mean "${transformName}"?`)}throw error.message+="\n\nMake sure that all the Babel plugins and presets you are using\nare defined as dependencies or devDependencies in your package.json\nfile. It's possible that the missing plugin is loaded by a preset\nyou are using that forgot to add the plugin to its dependencies: you\ncan workaround this problem by explicitly adding the missing package\nto your top-level package.json.\n",error}function tryRequireResolve(id,dirname){try{return dirname?{error:null,value:(v=process.versions.node,w="8.9",v=v.split("."),w=w.split("."),+v[0]>+w[0]||v[0]==w[0]&&+v[1]>=+w[1]?__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").resolve:(r,{paths:[b]},M=__webpack_require__("module"))=>{let f=M._findPath(r,M._nodeModulePaths(b).concat(b));if(f)return f;throw f=new Error(`Cannot resolve module '${r}'`),f.code="MODULE_NOT_FOUND",f})(id,{paths:[dirname]})}:{error:null,value:__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files sync recursive").resolve(id)}}catch(error){return{error,value:null}}var v,w}function tryImportMetaResolve(id,options){try{return{error:null,value:(0,_importMetaResolve.resolve)(id,options)}}catch(error){return{error,value:null}}}function resolveStandardizedNameForRequire(type,name,dirname){const it=resolveAlternativesHelper(type,name);let res=it.next();for(;!res.done;)res=it.next(tryRequireResolve(res.value,dirname));return{loader:"require",filepath:res.value}}function resolveStandardizedName(type,name,dirname,allowAsync){if(!_moduleTypes.supportsESM||!allowAsync)return resolveStandardizedNameForRequire(type,name,dirname);try{const resolved=function(type,name,dirname){const parentUrl=(0,_url().pathToFileURL)(_path().join(dirname,"./babel-virtual-resolve-base.js")).href,it=resolveAlternativesHelper(type,name);let res=it.next();for(;!res.done;)res=it.next(tryImportMetaResolve(res.value,parentUrl));return{loader:"auto",filepath:(0,_url().fileURLToPath)(res.value)}}(type,name,dirname);if(!(0,_fs().existsSync)(resolved.filepath))throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`),{type:"MODULE_NOT_FOUND"});return resolved}catch(e){try{return resolveStandardizedNameForRequire(type,name,dirname)}catch(e2){if("MODULE_NOT_FOUND"===e.type)throw e;if("MODULE_NOT_FOUND"===e2.type)throw e2;throw e}}}var LOADING_MODULES=new Set;function*requireModule(type,loader,name){if(!(yield*(0,_async.isAsync)())&&LOADING_MODULES.has(name))throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored and is trying to load itself while compiling itself, leading to a dependency cycle. We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.`);try{return LOADING_MODULES.add(name),yield*(0,_moduleTypes.default)(name,loader,`You appear to be using a native ECMAScript module ${type}, which is only supported when running Babel asynchronously or when using the Node.js \`--experimental-require-module\` flag.`,`You appear to be using a ${type} that contains top-level await, which is only supported when running Babel asynchronously.`,!0)}catch(err){throw err.message=`[BABEL]: ${err.message} (While processing: ${name})`,err}finally{LOADING_MODULES.delete(name)}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/utils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeStaticFileCache=function(fn){return(0,_caching.makeStrongCache)(function*(filepath,cache){const cached=cache.invalidate(()=>function(filepath){if(!_fs2().existsSync(filepath))return null;try{return+_fs2().statSync(filepath).mtime}catch(e){if("ENOENT"!==e.code&&"ENOTDIR"!==e.code)throw e}return null}(filepath));return null===cached?null:fn(filepath,yield*fs.readFile(filepath,"utf8"))})};var _caching=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js"),fs=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/fs.js");function _fs2(){const data=__webpack_require__("fs");return _fs2=function(){return data},data}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/full.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js"),_util=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/util.js"),context=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_plugin=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/plugin.js"),_item=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/item.js"),_configChain=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/config-chain.js"),_deepArray=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/deep-array.js");function _traverse(){const data=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");return _traverse=function(){return data},data}var _caching=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js"),_options=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/options.js"),_plugins=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/plugins.js"),_configApi=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/config-api.js"),_partial=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/partial.js"),_configError=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js");exports.default=_gensync()(function*(inputOpts){var _opts$assumptions;const result=yield*(0,_partial.default)(inputOpts);if(!result)return null;const{options,context,fileHandling}=result;if("ignored"===fileHandling)return null;const optionDefaults={},{plugins,presets}=options;if(!plugins||!presets)throw new Error("Assertion failure - plugins and presets exist");const presetContext=Object.assign({},context,{targets:options.targets}),toDescriptor=item=>{const desc=(0,_item.getItemDescriptor)(item);if(!desc)throw new Error("Assertion failure - must be config item");return desc},presetsDescriptors=presets.map(toDescriptor),initialPluginsDescriptors=plugins.map(toDescriptor),pluginDescriptorsByPass=[[]],passes=[],externalDependencies=[],ignored=yield*enhanceError(context,function*recursePresetDescriptors(rawPresets,pluginDescriptorsPass){const presets=[];for(let i=0;i0){pluginDescriptorsByPass.splice(1,0,...presets.map(o=>o.pass).filter(p=>p!==pluginDescriptorsPass));for(const{preset,pass}of presets){if(!preset)return!0;pass.push(...preset.plugins);if(yield*recursePresetDescriptors(preset.presets,pass))return!0;preset.options.forEach(opts=>{(0,_util.mergeOptions)(optionDefaults,opts)})}}})(presetsDescriptors,pluginDescriptorsByPass[0]);if(ignored)return null;const opts=optionDefaults;(0,_util.mergeOptions)(opts,options);const pluginContext=Object.assign({},presetContext,{assumptions:null!=(_opts$assumptions=opts.assumptions)?_opts$assumptions:{}});return yield*enhanceError(context,function*(){pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);for(const descs of pluginDescriptorsByPass){const pass=[];passes.push(pass);for(let i=0;iplugins.length>0).map(plugins=>({plugins})),opts.passPerPreset=opts.presets.length>0,{options:opts,passes,externalDependencies:(0,_deepArray.finalize)(externalDependencies)}});function enhanceError(context,fn){return function*(arg1,arg2){try{return yield*fn(arg1,arg2)}catch(e){var _context$filename;if(!/^\[BABEL\]/.test(e.message))e.message=`[BABEL] ${null!=(_context$filename=context.filename)?_context$filename:"unknown file"}: ${e.message}`;throw e}}}const makeDescriptorLoader=apiFactory=>(0,_caching.makeWeakCache)(function*({value,options,dirname,alias},cache){if(!1===options)throw new Error("Assertion failure");options=options||{};const externalDependencies=[];let item=value;if("function"==typeof value){const factory=(0,_async.maybeAsync)(value,"You appear to be using an async plugin/preset, but Babel has been called synchronously"),api=Object.assign({},context,apiFactory(cache,externalDependencies));try{item=yield*factory(api,options,dirname)}catch(e){throw alias&&(e.message+=` (While processing: ${JSON.stringify(alias)})`),e}}if(!item||"object"!=typeof item)throw new Error("Plugin/Preset did not return an object.");if((0,_async.isThenable)(item))throw yield*[],new Error(`You appear to be using a promise as a plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version. As an alternative, you can prefix the promise with "await". (While processing: ${JSON.stringify(alias)})`);if(externalDependencies.length>0&&(!cache.configured()||"forever"===cache.mode())){let error=`A plugin/preset has external untracked dependencies (${externalDependencies[0]}), but the cache `;throw cache.configured()?error+=" has been configured to never be invalidated. ":error+="has not been configured to be invalidated when the external dependencies change. ",error+=`Plugins/presets should configure their cache to be invalidated when the external dependencies change, for example using \`api.cache.invalidate(() => statSync(filepath).mtimeMs)\` or \`api.cache.never()\`\n(While processing: ${JSON.stringify(alias)})`,new Error(error)}return{value:item,options,dirname,alias,externalDependencies:(0,_deepArray.finalize)(externalDependencies)}}),pluginDescriptorLoader=makeDescriptorLoader(_configApi.makePluginAPI),presetDescriptorLoader=makeDescriptorLoader(_configApi.makePresetAPI),instantiatePlugin=(0,_caching.makeWeakCache)(function*({value,options,dirname,alias,externalDependencies},cache){const pluginObj=(0,_plugins.validatePluginObject)(value),plugin=Object.assign({},pluginObj);if(plugin.visitor&&(plugin.visitor=_traverse().default.explode(Object.assign({},plugin.visitor))),plugin.inherits){const inheritsDescriptor={name:void 0,alias:`${alias}$inherits`,value:plugin.inherits,options,dirname},inherits=yield*(0,_async.forwardAsync)(loadPluginDescriptor,run=>cache.invalidate(data=>run(inheritsDescriptor,data)));plugin.pre=chainMaybeAsync(inherits.pre,plugin.pre),plugin.post=chainMaybeAsync(inherits.post,plugin.post),plugin.manipulateOptions=chainMaybeAsync(inherits.manipulateOptions,plugin.manipulateOptions),plugin.visitor=_traverse().default.visitors.merge([inherits.visitor||{},plugin.visitor||{}]),inherits.externalDependencies.length>0&&(externalDependencies=0===externalDependencies.length?inherits.externalDependencies:(0,_deepArray.finalize)([externalDependencies,inherits.externalDependencies]))}return new _plugin.default(plugin,options,alias,externalDependencies)});function*loadPluginDescriptor(descriptor,context){if(descriptor.value instanceof _plugin.default){if(descriptor.options)throw new Error("Passed options to an existing Plugin instance will not work.");return descriptor.value}return yield*instantiatePlugin(yield*pluginDescriptorLoader(descriptor,context),context)}const needsFilename=val=>val&&"function"!=typeof val,validateIfOptionNeedsFilename=(options,descriptor)=>{if(needsFilename(options.test)||needsFilename(options.include)||needsFilename(options.exclude)){const formattedPresetName=descriptor.name?`"${descriptor.name}"`:"/* your preset */";throw new _configError.default([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`,"```",`babel.transformSync(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`,"```","See https://babeljs.io/docs/en/options#filename for more information."].join("\n"))}},validatePreset=(preset,context,descriptor)=>{if(!context.filename){var _options$overrides;const{options}=preset;validateIfOptionNeedsFilename(options,descriptor),null==(_options$overrides=options.overrides)||_options$overrides.forEach(overrideOptions=>validateIfOptionNeedsFilename(overrideOptions,descriptor))}},instantiatePreset=(0,_caching.makeWeakCacheSync)(({value,dirname,alias,externalDependencies})=>({options:(0,_options.validate)("preset",value),alias,dirname,externalDependencies}));function*loadPresetDescriptor(descriptor,context){const preset=instantiatePreset(yield*presetDescriptorLoader(descriptor,context));return validatePreset(preset,context,descriptor),{chain:yield*(0,_configChain.buildPresetChain)(preset,context),externalDependencies:preset.externalDependencies}}function chainMaybeAsync(a,b){return a?b?function(...args){const res=a.apply(this,args);return res&&"function"==typeof res.then?res.then(()=>b.apply(this,args)):b.apply(this,args)}:a:b}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/config-api.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _semver(){const data=__webpack_require__("./node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js");return _semver=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeConfigAPI=makeConfigAPI,exports.makePluginAPI=function(cache,externalDependencies){return Object.assign({},makePresetAPI(cache,externalDependencies),{assumption:name=>cache.using(data=>data.assumptions[name])})},exports.makePresetAPI=makePresetAPI;var _index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_caching=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/caching.js");function makeConfigAPI(cache){return{version:_index.version,cache:cache.simple(),env:value=>cache.using(data=>void 0===value?data.envName:"function"==typeof value?(0,_caching.assertSimpleType)(value(data.envName)):(Array.isArray(value)?value:[value]).some(entry=>{if("string"!=typeof entry)throw new Error("Unexpected non-string value");return entry===data.envName})),async:()=>!1,caller:cb=>cache.using(data=>(0,_caching.assertSimpleType)(cb(data.caller))),assertVersion}}function makePresetAPI(cache,externalDependencies){return Object.assign({},makeConfigAPI(cache),{targets:()=>JSON.parse(cache.using(data=>JSON.stringify(data.targets))),addExternalDependency:ref=>{externalDependencies.push(ref)}})}function assertVersion(range){if("number"==typeof range){if(!Number.isInteger(range))throw new Error("Expected string or integer value.");range=`^${range}.0.0-0`}if("string"!=typeof range)throw new Error("Expected string or integer value.");if("*"===range||_semver().satisfies(_index.version,range))return;const limit=Error.stackTraceLimit;"number"==typeof limit&&limit<25&&(Error.stackTraceLimit=25);const err=new Error(`Requires Babel "${range}", but was loaded with "${_index.version}". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`);throw"number"==typeof limit&&(Error.stackTraceLimit=limit),Object.assign(err,{code:"BABEL_VERSION_UNSUPPORTED",version:_index.version,range})}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/deep-array.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.finalize=function(deepArr){return Object.freeze(deepArr)},exports.flattenToSet=function(arr){const result=new Set,stack=[arr];for(;stack.length>0;)for(const el of stack.pop())Array.isArray(el)?stack.push(el):result.add(el);return result}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/environment.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEnv=function(defaultValue="development"){return process.env.BABEL_ENV||process.env.NODE_ENV||defaultValue}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createConfigItem=function(target,options,callback){if(void 0!==callback)(0,_rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target,options,callback);else{if("function"!=typeof options)return createConfigItemSync(target,options);(0,_rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.errback)(target,void 0,callback)}},exports.createConfigItemAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.async)(...args)},exports.createConfigItemSync=createConfigItemSync,Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return _full.default}}),exports.loadOptions=function(opts,callback){if(void 0!==callback)(0,_rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(opts,callback);else{if("function"!=typeof opts)return loadOptionsSync(opts);(0,_rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.errback)(void 0,opts)}},exports.loadOptionsAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.async)(...args)},exports.loadOptionsSync=loadOptionsSync,exports.loadPartialConfig=function(opts,callback){if(void 0!==callback)(0,_rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(opts,callback);else{if("function"!=typeof opts)return loadPartialConfigSync(opts);(0,_rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.errback)(void 0,opts)}},exports.loadPartialConfigAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.async)(...args)},exports.loadPartialConfigSync=loadPartialConfigSync;var _full=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/full.js"),_partial=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/partial.js"),_item=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/item.js"),_rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js");const loadPartialConfigRunner=_gensync()(_partial.loadPartialConfig);function loadPartialConfigSync(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(loadPartialConfigRunner.sync)(...args)}const loadOptionsRunner=_gensync()(function*(opts){var _config$options;const config=yield*(0,_full.default)(opts);return null!=(_config$options=null==config?void 0:config.options)?_config$options:null});function loadOptionsSync(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(loadOptionsRunner.sync)(...args)}const createConfigItemRunner=_gensync()(_item.createConfigItem);function createConfigItemSync(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(createConfigItemRunner.sync)(...args)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/item.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.createConfigItem=function*(value,{dirname=".",type}={}){return createItemFromDescriptor(yield*(0,_configDescriptors.createDescriptor)(value,_path().resolve(dirname),{type,alias:"programmatic item"}))},exports.createItemFromDescriptor=createItemFromDescriptor,exports.getItemDescriptor=function(item){if(null!=item&&item[CONFIG_ITEM_BRAND])return item._descriptor;return};var _configDescriptors=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/config-descriptors.js");function createItemFromDescriptor(desc){return new ConfigItem(desc)}const CONFIG_ITEM_BRAND=Symbol.for("@babel/core@7 - ConfigItem");class ConfigItem{constructor(descriptor){this._descriptor=void 0,this[CONFIG_ITEM_BRAND]=!0,this.value=void 0,this.options=void 0,this.dirname=void 0,this.name=void 0,this.file=void 0,this._descriptor=descriptor,Object.defineProperty(this,"_descriptor",{enumerable:!1}),Object.defineProperty(this,CONFIG_ITEM_BRAND,{enumerable:!1}),this.value=this._descriptor.value,this.options=this._descriptor.options,this.dirname=this._descriptor.dirname,this.name=this._descriptor.name,this.file=this._descriptor.file?{request:this._descriptor.file.request,resolved:this._descriptor.file.resolved}:void 0,Object.freeze(this)}}Object.freeze(ConfigItem.prototype)},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/partial.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=loadPrivatePartialConfig,exports.loadPartialConfig=function*(opts){let showIgnoredFiles=!1;if("object"==typeof opts&&null!==opts&&!Array.isArray(opts)){var _opts=opts;({showIgnoredFiles}=_opts),opts=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}(_opts,_excluded)}const result=yield*loadPrivatePartialConfig(opts);if(!result)return null;const{options,babelrc,ignore,config,fileHandling,files}=result;if("ignored"===fileHandling&&!showIgnoredFiles)return null;return(options.plugins||[]).forEach(item=>{if(item.value instanceof _plugin.default)throw new Error("Passing cached plugin instances is not supported in babel.loadPartialConfig()")}),new PartialConfig(options,babelrc?babelrc.filepath:void 0,ignore?ignore.filepath:void 0,config?config.filepath:void 0,fileHandling,files)};var _plugin=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/plugin.js"),_util=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/util.js"),_item=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/item.js"),_configChain=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/config-chain.js"),_environment=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/environment.js"),_options=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/options.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/index.js"),_resolveTargets=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/resolve-targets.js");const _excluded=["showIgnoredFiles"];function*loadPrivatePartialConfig(inputOpts){if(null!=inputOpts&&("object"!=typeof inputOpts||Array.isArray(inputOpts)))throw new Error("Babel options must be an object, null, or undefined");const args=inputOpts?(0,_options.validate)("arguments",inputOpts):{},{envName=(0,_environment.getEnv)(),cwd=".",root:rootDir=".",rootMode="root",caller,cloneInputAst=!0}=args,absoluteCwd=_path().resolve(cwd),absoluteRootDir=function(rootDir,rootMode){switch(rootMode){case"root":return rootDir;case"upward-optional":{const upwardRootDir=(0,_index.findConfigUpwards)(rootDir);return null===upwardRootDir?rootDir:upwardRootDir}case"upward":{const upwardRootDir=(0,_index.findConfigUpwards)(rootDir);if(null!==upwardRootDir)return upwardRootDir;throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not be found when searching upward from "${rootDir}".\nOne of the following config files must be in the directory tree: "${_index.ROOT_CONFIG_FILENAMES.join(", ")}".`),{code:"BABEL_ROOT_NOT_FOUND",dirname:rootDir})}default:throw new Error("Assertion failure - unknown rootMode value.")}}(_path().resolve(absoluteCwd,rootDir),rootMode),filename="string"==typeof args.filename?_path().resolve(cwd,args.filename):void 0,context={filename,cwd:absoluteCwd,root:absoluteRootDir,envName,caller,showConfig:(yield*(0,_index.resolveShowConfigPath)(absoluteCwd))===filename},configChain=yield*(0,_configChain.buildRootChain)(args,context);if(!configChain)return null;const merged={assumptions:{}};configChain.options.forEach(opts=>{(0,_util.mergeOptions)(merged,opts)});return{options:Object.assign({},merged,{targets:(0,_resolveTargets.resolveTargets)(merged,absoluteRootDir),cloneInputAst,babelrc:!1,configFile:!1,browserslistConfigFile:!1,passPerPreset:!1,envName:context.envName,cwd:context.cwd,root:context.root,rootMode:"root",filename:"string"==typeof context.filename?context.filename:void 0,plugins:configChain.plugins.map(descriptor=>(0,_item.createItemFromDescriptor)(descriptor)),presets:configChain.presets.map(descriptor=>(0,_item.createItemFromDescriptor)(descriptor))}),context,fileHandling:configChain.fileHandling,ignore:configChain.ignore,babelrc:configChain.babelrc,config:configChain.config,files:configChain.files}}class PartialConfig{constructor(options,babelrc,ignore,config,fileHandling,files){this.options=void 0,this.babelrc=void 0,this.babelignore=void 0,this.config=void 0,this.fileHandling=void 0,this.files=void 0,this.options=options,this.babelignore=ignore,this.babelrc=babelrc,this.config=config,this.fileHandling=fileHandling,this.files=files,Object.freeze(this)}hasFilesystemConfig(){return void 0!==this.babelrc||void 0!==this.config}}Object.freeze(PartialConfig.prototype)},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/pattern-to-regex.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(pattern,dirname){const parts=_path().resolve(dirname,pattern).split(_path().sep);return new RegExp(["^",...parts.map((part,i)=>{const last=i===parts.length-1;return"**"===part?last?starStarPatLast:starStarPat:"*"===part?last?starPatLast:starPat:0===part.indexOf("*.")?substitution+escapeRegExp(part.slice(1))+(last?endSep:sep):escapeRegExp(part)+(last?endSep:sep)})].join(""))};const sep=`\\${_path().sep}`,endSep=`(?:${sep}|$)`,substitution=`[^${sep}]+`,starPat=`(?:${substitution}${sep})`,starPatLast=`(?:${substitution}${endSep})`,starStarPat=`${starPat}*?`,starStarPatLast=`${starPat}*?${starPatLast}?`;function escapeRegExp(string){return string.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/plugin.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _deepArray=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/deep-array.js");exports.default=class{constructor(plugin,options,key,externalDependencies=(0,_deepArray.finalize)([])){this.key=void 0,this.manipulateOptions=void 0,this.post=void 0,this.pre=void 0,this.visitor=void 0,this.parserOverride=void 0,this.generatorOverride=void 0,this.options=void 0,this.externalDependencies=void 0,this.key=plugin.name||key,this.manipulateOptions=plugin.manipulateOptions,this.post=plugin.post,this.pre=plugin.pre,this.visitor=plugin.visitor||{},this.parserOverride=plugin.parserOverride,this.generatorOverride=plugin.generatorOverride,this.options=options,this.externalDependencies=externalDependencies}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/printer.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigPrinter=exports.ChainFormatter=void 0;const ChainFormatter=exports.ChainFormatter={Programmatic:0,Config:1},Formatter={title(type,callerName,filepath){let title="";return type===ChainFormatter.Programmatic?(title="programmatic options",callerName&&(title+=" from "+callerName)):title="config "+filepath,title},loc(index,envName){let loc="";return null!=index&&(loc+=`.overrides[${index}]`),null!=envName&&(loc+=`.env["${envName}"]`),loc},*optionsAndDescriptors(opt){const content=Object.assign({},opt.options);delete content.overrides,delete content.env;const pluginDescriptors=[...yield*opt.plugins()];pluginDescriptors.length&&(content.plugins=pluginDescriptors.map(d=>descriptorToConfig(d)));const presetDescriptors=[...yield*opt.presets()];return presetDescriptors.length&&(content.presets=[...presetDescriptors].map(d=>descriptorToConfig(d))),JSON.stringify(content,void 0,2)}};function descriptorToConfig(d){var _d$file;let name=null==(_d$file=d.file)?void 0:_d$file.request;return null==name&&("object"==typeof d.value?name=d.value:"function"==typeof d.value&&(name=`[Function: ${d.value.toString().slice(0,50)} ... ]`)),null==name&&(name="[Unknown]"),void 0===d.options?name:null==d.name?[name,d.options]:[name,d.options,d.name]}class ConfigPrinter{constructor(){this._stack=[]}configure(enabled,type,{callerName,filepath}){return enabled?(content,index,envName)=>{this._stack.push({type,callerName,filepath,content,index,envName})}:()=>{}}static*format(config){let title=Formatter.title(config.type,config.callerName,config.filepath);const loc=Formatter.loc(config.index,config.envName);loc&&(title+=` ${loc}`);return`${title}\n${yield*Formatter.optionsAndDescriptors(config.content)}`}*output(){if(0===this._stack.length)return"";return(yield*_gensync().all(this._stack.map(s=>ConfigPrinter.format(s)))).join("\n\n")}}exports.ConfigPrinter=ConfigPrinter},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/resolve-targets.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}function _helperCompilationTargets(){const data=__webpack_require__("./stubs/helper-compilation-targets.mjs");return _helperCompilationTargets=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.resolveBrowserslistConfigFile=function(browserslistConfigFile,configFileDir){return _path().resolve(configFileDir,browserslistConfigFile)},exports.resolveTargets=function(options,root){const optTargets=options.targets;let targets;"string"==typeof optTargets||Array.isArray(optTargets)?targets={browsers:optTargets}:optTargets&&(targets="esmodules"in optTargets?Object.assign({},optTargets,{esmodules:"intersect"}):optTargets);const{browserslistConfigFile}=options;let configFile,ignoreBrowserslistConfig=!1;"string"==typeof browserslistConfigFile?configFile=browserslistConfigFile:ignoreBrowserslistConfig=!1===browserslistConfigFile;return(0,_helperCompilationTargets().default)(targets,{ignoreBrowserslistConfig,configFile,configPath:root,browserslistEnv:options.browserslistEnv})}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/util.js":(__unused_webpack_module,exports)=>{"use strict";function mergeDefaultFields(target,source){for(const k of Object.keys(source)){const val=source[k];void 0!==val&&(target[k]=val)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIterableIterator=function(value){return!!value&&"function"==typeof value.next&&"function"==typeof value[Symbol.iterator]},exports.mergeOptions=function(target,source){for(const k of Object.keys(source))if("parserOpts"!==k&&"generatorOpts"!==k&&"assumptions"!==k||!source[k]){const val=source[k];void 0!==val&&(target[k]=val)}else{const parserOpts=source[k];mergeDefaultFields(target[k]||(target[k]={}),parserOpts)}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/option-assertions.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _helperCompilationTargets(){const data=__webpack_require__("./stubs/helper-compilation-targets.mjs");return _helperCompilationTargets=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.access=access,exports.assertArray=assertArray,exports.assertAssumptions=function(loc,value){if(void 0===value)return;if("object"!=typeof value||null===value)throw new Error(`${msg(loc)} must be an object or undefined.`);let root=loc;do{root=root.parent}while("root"!==root.type);const inPreset="preset"===root.source;for(const name of Object.keys(value)){const subLoc=access(loc,name);if(!_options.assumptionsNames.has(name))throw new Error(`${msg(subLoc)} is not a supported assumption.`);if("boolean"!=typeof value[name])throw new Error(`${msg(subLoc)} must be a boolean.`);if(inPreset&&!1===value[name])throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`)}return value},exports.assertBabelrcSearch=function(loc,value){if(void 0===value||"boolean"==typeof value)return value;if(Array.isArray(value))value.forEach((item,i)=>{if(!checkValidTest(item))throw new Error(`${msg(access(loc,i))} must be a string/Function/RegExp.`)});else if(!checkValidTest(value))throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp or an array of those, got ${JSON.stringify(value)}`);return value},exports.assertBoolean=assertBoolean,exports.assertCallerMetadata=function(loc,value){const obj=assertObject(loc,value);if(obj){if("string"!=typeof obj.name)throw new Error(`${msg(loc)} set but does not contain "name" property string`);for(const prop of Object.keys(obj)){const propLoc=access(loc,prop),value=obj[prop];if(null!=value&&"boolean"!=typeof value&&"string"!=typeof value&&"number"!=typeof value)throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`)}}return value},exports.assertCompact=function(loc,value){if(void 0!==value&&"boolean"!=typeof value&&"auto"!==value)throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`);return value},exports.assertConfigApplicableTest=function(loc,value){if(void 0===value)return value;if(Array.isArray(value))value.forEach((item,i)=>{if(!checkValidTest(item))throw new Error(`${msg(access(loc,i))} must be a string/Function/RegExp.`)});else if(!checkValidTest(value))throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`);return value},exports.assertConfigFileSearch=function(loc,value){if(void 0!==value&&"boolean"!=typeof value&&"string"!=typeof value)throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, got ${JSON.stringify(value)}`);return value},exports.assertFunction=function(loc,value){if(void 0!==value&&"function"!=typeof value)throw new Error(`${msg(loc)} must be a function, or undefined`);return value},exports.assertIgnoreList=function(loc,value){const arr=assertArray(loc,value);return null==arr||arr.forEach((item,i)=>function(loc,value){if("string"!=typeof value&&"function"!=typeof value&&!(value instanceof RegExp))throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`);return value}(access(loc,i),item)),arr},exports.assertInputSourceMap=function(loc,value){if(void 0!==value&&"boolean"!=typeof value&&("object"!=typeof value||!value))throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);return value},exports.assertObject=assertObject,exports.assertPluginList=function(loc,value){const arr=assertArray(loc,value);arr&&arr.forEach((item,i)=>function(loc,value){if(Array.isArray(value)){if(0===value.length)throw new Error(`${msg(loc)} must include an object`);if(value.length>3)throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);if(assertPluginTarget(access(loc,0),value[0]),value.length>1){const opts=value[1];if(void 0!==opts&&!1!==opts&&("object"!=typeof opts||Array.isArray(opts)||null===opts))throw new Error(`${msg(access(loc,1))} must be an object, false, or undefined`)}if(3===value.length){const name=value[2];if(void 0!==name&&"string"!=typeof name)throw new Error(`${msg(access(loc,2))} must be a string, or undefined`)}}else assertPluginTarget(loc,value);return value}(access(loc,i),item));return arr},exports.assertRootMode=function(loc,value){if(void 0!==value&&"root"!==value&&"upward"!==value&&"upward-optional"!==value)throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`);return value},exports.assertSourceMaps=function(loc,value){if(void 0!==value&&"boolean"!=typeof value&&"inline"!==value&&"both"!==value)throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`);return value},exports.assertSourceType=function(loc,value){if(void 0!==value&&"module"!==value&&"commonjs"!==value&&"script"!==value&&"unambiguous"!==value)throw new Error(`${msg(loc)} must be "module", "commonjs", "script", "unambiguous", or undefined`);return value},exports.assertString=function(loc,value){if(void 0!==value&&"string"!=typeof value)throw new Error(`${msg(loc)} must be a string, or undefined`);return value},exports.assertTargets=function(loc,value){if((0,_helperCompilationTargets().isBrowsersQueryValid)(value))return value;if("object"!=typeof value||!value||Array.isArray(value))throw new Error(`${msg(loc)} must be a string, an array of strings or an object`);const browsersLoc=access(loc,"browsers"),esmodulesLoc=access(loc,"esmodules");assertBrowsersList(browsersLoc,value.browsers),assertBoolean(esmodulesLoc,value.esmodules);for(const key of Object.keys(value)){const val=value[key],subLoc=access(loc,key);if("esmodules"===key)assertBoolean(subLoc,val);else if("browsers"===key)assertBrowsersList(subLoc,val);else{if(!hasOwnProperty.call(_helperCompilationTargets().TargetNames,key)){const validTargets=Object.keys(_helperCompilationTargets().TargetNames).join(", ");throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`)}assertBrowserVersion(subLoc,val)}}return value},exports.msg=msg;var _options=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/options.js");function msg(loc){switch(loc.type){case"root":return"";case"env":return`${msg(loc.parent)}.env["${loc.name}"]`;case"overrides":return`${msg(loc.parent)}.overrides[${loc.index}]`;case"option":return`${msg(loc.parent)}.${loc.name}`;case"access":return`${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;default:throw new Error(`Assertion failure: Unknown type ${loc.type}`)}}function access(loc,name){return{type:"access",name,parent:loc}}function assertBoolean(loc,value){if(void 0!==value&&"boolean"!=typeof value)throw new Error(`${msg(loc)} must be a boolean, or undefined`);return value}function assertObject(loc,value){if(void 0!==value&&("object"!=typeof value||Array.isArray(value)||!value))throw new Error(`${msg(loc)} must be an object, or undefined`);return value}function assertArray(loc,value){if(null!=value&&!Array.isArray(value))throw new Error(`${msg(loc)} must be an array, or undefined`);return value}function checkValidTest(value){return"string"==typeof value||"function"==typeof value||value instanceof RegExp}function assertPluginTarget(loc,value){if(("object"!=typeof value||!value)&&"string"!=typeof value&&"function"!=typeof value)throw new Error(`${msg(loc)} must be a string, object, function`);return value}function assertBrowsersList(loc,value){if(void 0!==value&&!(0,_helperCompilationTargets().isBrowsersQueryValid)(value))throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`)}function assertBrowserVersion(loc,value){if(("number"!=typeof value||Math.round(value)!==value)&&"string"!=typeof value)throw new Error(`${msg(loc)} must be a string or an integer number`)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/options.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assumptionsNames=void 0,exports.checkNoUnwrappedItemOptionPairs=function(items,index,type,e){if(0===index)return;const lastItem=items[index-1],thisItem=items[index];lastItem.file&&void 0===lastItem.options&&"object"==typeof thisItem.value&&(e.message+=`\n- Maybe you meant to use\n"${type}s": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value,void 0,2)}]\n]\nTo be a valid ${type}, its name and options should be wrapped in a pair of brackets`)},exports.validate=function(type,opts,filename){try{return validateNested({type:"root",source:type},opts)}catch(error){const configError=new _configError.default(error.message,filename);throw error.code&&(configError.code=error.code),configError}};var _removed=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/removed.js"),_optionAssertions=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/option-assertions.js"),_configError=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js");const ROOT_VALIDATORS={cwd:_optionAssertions.assertString,root:_optionAssertions.assertString,rootMode:_optionAssertions.assertRootMode,configFile:_optionAssertions.assertConfigFileSearch,caller:_optionAssertions.assertCallerMetadata,filename:_optionAssertions.assertString,filenameRelative:_optionAssertions.assertString,code:_optionAssertions.assertBoolean,ast:_optionAssertions.assertBoolean,cloneInputAst:_optionAssertions.assertBoolean,envName:_optionAssertions.assertString},BABELRC_VALIDATORS={babelrc:_optionAssertions.assertBoolean,babelrcRoots:_optionAssertions.assertBabelrcSearch},NONPRESET_VALIDATORS={extends:_optionAssertions.assertString,ignore:_optionAssertions.assertIgnoreList,only:_optionAssertions.assertIgnoreList,targets:_optionAssertions.assertTargets,browserslistConfigFile:_optionAssertions.assertConfigFileSearch,browserslistEnv:_optionAssertions.assertString},COMMON_VALIDATORS={inputSourceMap:_optionAssertions.assertInputSourceMap,presets:_optionAssertions.assertPluginList,plugins:_optionAssertions.assertPluginList,passPerPreset:_optionAssertions.assertBoolean,assumptions:_optionAssertions.assertAssumptions,env:function(loc,value){if("env"===loc.parent.type)throw new Error(`${(0,_optionAssertions.msg)(loc)} is not allowed inside of another .env block`);const parent=loc.parent,obj=(0,_optionAssertions.assertObject)(loc,value);if(obj)for(const envName of Object.keys(obj)){const env=(0,_optionAssertions.assertObject)((0,_optionAssertions.access)(loc,envName),obj[envName]);if(!env)continue;validateNested({type:"env",name:envName,parent},env)}return obj},overrides:function(loc,value){if("env"===loc.parent.type)throw new Error(`${(0,_optionAssertions.msg)(loc)} is not allowed inside an .env block`);if("overrides"===loc.parent.type)throw new Error(`${(0,_optionAssertions.msg)(loc)} is not allowed inside an .overrides block`);const parent=loc.parent,arr=(0,_optionAssertions.assertArray)(loc,value);if(arr)for(const[index,item]of arr.entries()){const objLoc=(0,_optionAssertions.access)(loc,index),env=(0,_optionAssertions.assertObject)(objLoc,item);if(!env)throw new Error(`${(0,_optionAssertions.msg)(objLoc)} must be an object`);validateNested({type:"overrides",index,parent},env)}return arr},test:_optionAssertions.assertConfigApplicableTest,include:_optionAssertions.assertConfigApplicableTest,exclude:_optionAssertions.assertConfigApplicableTest,retainLines:_optionAssertions.assertBoolean,comments:_optionAssertions.assertBoolean,shouldPrintComment:_optionAssertions.assertFunction,compact:_optionAssertions.assertCompact,minified:_optionAssertions.assertBoolean,auxiliaryCommentBefore:_optionAssertions.assertString,auxiliaryCommentAfter:_optionAssertions.assertString,sourceType:_optionAssertions.assertSourceType,wrapPluginVisitorMethod:_optionAssertions.assertFunction,highlightCode:_optionAssertions.assertBoolean,sourceMaps:_optionAssertions.assertSourceMaps,sourceMap:_optionAssertions.assertSourceMaps,sourceFileName:_optionAssertions.assertString,sourceRoot:_optionAssertions.assertString,parserOpts:_optionAssertions.assertObject,generatorOpts:_optionAssertions.assertObject};Object.assign(COMMON_VALIDATORS,{getModuleId:_optionAssertions.assertFunction,moduleRoot:_optionAssertions.assertString,moduleIds:_optionAssertions.assertBoolean,moduleId:_optionAssertions.assertString});exports.assumptionsNames=new Set(["arrayLikeIsIterable","constantReexports","constantSuper","enumerableModuleMeta","ignoreFunctionLength","ignoreToPrimitiveHint","iterableIsArray","mutableTemplateObject","noClassCalls","noDocumentAll","noIncompleteNsImportDetection","noNewArrows","noUninitializedPrivateFieldAccess","objectRestNoSymbols","privateFieldsAsSymbols","privateFieldsAsProperties","pureGetters","setClassMethods","setComputedProperties","setPublicClassFields","setSpreadProperties","skipForOfIteratorClosing","superIsCallableConstructor"]);function getSource(loc){return"root"===loc.type?loc.source:getSource(loc.parent)}function validateNested(loc,opts){const type=getSource(loc);return function(opts){if(hasOwnProperty.call(opts,"sourceMap")&&hasOwnProperty.call(opts,"sourceMaps"))throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both")}(opts),Object.keys(opts).forEach(key=>{const optLoc={type:"option",name:key,parent:loc};if("preset"===type&&NONPRESET_VALIDATORS[key])throw new Error(`${(0,_optionAssertions.msg)(optLoc)} is not allowed in preset options`);if("arguments"!==type&&ROOT_VALIDATORS[key])throw new Error(`${(0,_optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`);if("arguments"!==type&&"configfile"!==type&&BABELRC_VALIDATORS[key]){if("babelrcfile"===type||"extendsfile"===type)throw new Error(`${(0,_optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, or babel.config.js/config file options`);throw new Error(`${(0,_optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`)}(COMMON_VALIDATORS[key]||NONPRESET_VALIDATORS[key]||BABELRC_VALIDATORS[key]||ROOT_VALIDATORS[key]||throwUnknownError)(optLoc,opts[key])}),opts}function throwUnknownError(loc){const key=loc.name;if(_removed.default[key]){const{message,version=5}=_removed.default[key];throw new Error(`Using removed Babel ${version} option: ${(0,_optionAssertions.msg)(loc)} - ${message}`)}{const unknownOptErr=new Error(`Unknown option: ${(0,_optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`);throw unknownOptErr.code="BABEL_UNKNOWN_OPTION",unknownOptErr}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/plugins.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.validatePluginObject=function(obj){const rootPath={type:"root",source:"plugin"};return Object.keys(obj).forEach(key=>{const validator=VALIDATORS[key];if(!validator){const invalidPluginPropertyError=new Error(`.${key} is not a valid Plugin property`);throw invalidPluginPropertyError.code="BABEL_UNKNOWN_PLUGIN_PROPERTY",invalidPluginPropertyError}validator({type:"option",name:key,parent:rootPath},obj[key])}),obj};var _optionAssertions=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/option-assertions.js");const VALIDATORS={name:_optionAssertions.assertString,manipulateOptions:_optionAssertions.assertFunction,pre:_optionAssertions.assertFunction,post:_optionAssertions.assertFunction,inherits:_optionAssertions.assertFunction,visitor:function(loc,value){const obj=(0,_optionAssertions.assertObject)(loc,value);if(obj&&(Object.keys(obj).forEach(prop=>{"_exploded"!==prop&&"_verified"!==prop&&function(key,value){if(value&&"object"==typeof value)Object.keys(value).forEach(handler=>{if("enter"!==handler&&"exit"!==handler)throw new Error(`.visitor["${key}"] may only have .enter and/or .exit handlers.`)});else if("function"!=typeof value)throw new Error(`.visitor["${key}"] must be a function`)}(prop,obj[prop])}),obj.enter||obj.exit))throw new Error(`${(0,_optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`);return obj},parserOverride:_optionAssertions.assertFunction,generatorOverride:_optionAssertions.assertFunction}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/validation/removed.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin. Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"The `sourceMapName` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves."},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"},resolveModuleSource:{version:6,message:"Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"},metadata:{version:6,message:"Generated plugin metadata is always included in the output result"},sourceMapTarget:{version:6,message:"The `sourceMapTarget` option has been removed because it makes more sense for the tooling that calls Babel to assign `map.file` themselves."}}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/config-error.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js");class ConfigError extends Error{constructor(message,filename){super(message),(0,_rewriteStackTrace.expectedError)(this),filename&&(0,_rewriteStackTrace.injectVirtualStackFrame)(this,filename)}}exports.default=ConfigError},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js":(__unused_webpack_module,exports)=>{"use strict";var _Object$getOwnPropert;Object.defineProperty(exports,"__esModule",{value:!0}),exports.beginHiddenCallStack=function(fn){return SUPPORTED?Object.defineProperty(function(...args){return setupPrepareStackTrace(),fn(...args)},"name",{value:STOP_HIDING}):fn},exports.endHiddenCallStack=function(fn){return SUPPORTED?Object.defineProperty(function(...args){return fn(...args)},"name",{value:START_HIDING}):fn},exports.expectedError=function(error){if(!SUPPORTED)return;return expectedErrors.add(error),error},exports.injectVirtualStackFrame=function(error,filename){if(!SUPPORTED)return;let frames=virtualFrames.get(error);frames||virtualFrames.set(error,frames=[]);return frames.push(function(filename){return Object.create({isNative:()=>!1,isConstructor:()=>!1,isToplevel:()=>!0,getFileName:()=>filename,getLineNumber:()=>{},getColumnNumber:()=>{},getFunctionName:()=>{},getMethodName:()=>{},getTypeName:()=>{},toString:()=>filename})}(filename)),error};const ErrorToString=Function.call.bind(Error.prototype.toString),SUPPORTED=!!Error.captureStackTrace&&!0===(null==(_Object$getOwnPropert=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit"))?void 0:_Object$getOwnPropert.writable),START_HIDING="startHiding - secret - don't use this - v1",STOP_HIDING="stopHiding - secret - don't use this - v1",expectedErrors=new WeakSet,virtualFrames=new WeakMap;function setupPrepareStackTrace(){setupPrepareStackTrace=()=>{};const{prepareStackTrace=defaultPrepareStackTrace}=Error;Error.stackTraceLimit&&(Error.stackTraceLimit=Math.max(Error.stackTraceLimit,50)),Error.prepareStackTrace=function(err,trace){let newTrace=[];let status=expectedErrors.has(err)?"hiding":"unknown";for(let i=0;i{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.forwardAsync=function(action,cb){const g=_gensync()(action);return withKind(kind=>{const adapted=g[kind];return cb(adapted)})},exports.isAsync=void 0,exports.isThenable=isThenable,exports.maybeAsync=function(fn,message){return _gensync()({sync(...args){const result=fn.apply(this,args);if(isThenable(result))throw new Error(message);return result},async(...args){return Promise.resolve(fn.apply(this,args))}})},exports.waitFor=exports.onFirstPause=void 0;const runGenerator=_gensync()(function*(item){return yield*item});exports.isAsync=_gensync()({sync:()=>!1,errback:cb=>cb(null,!0)});const withKind=_gensync()({sync:cb=>cb("sync"),async:(_ref=_asyncToGenerator(function*(cb){return cb("async")}),function(_x){return _ref.apply(this,arguments)})});var _ref;exports.onFirstPause=_gensync()({name:"onFirstPause",arity:2,sync:function(item){return runGenerator.sync(item)},errback:function(item,firstPause,cb){let completed=!1;runGenerator.errback(item,(err,value)=>{completed=!0,cb(err,value)}),completed||firstPause()}}),exports.waitFor=_gensync()({sync:x=>x,async:(_ref2=_asyncToGenerator(function*(x){return x}),function(_x2){return _ref2.apply(this,arguments)})});var _ref2;function isThenable(val){return!(!val||"object"!=typeof val&&"function"!=typeof val||!val.then||"function"!=typeof val.then)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/fs.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _fs(){const data=__webpack_require__("fs");return _fs=function(){return data},data}function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.stat=exports.readFile=void 0;exports.readFile=_gensync()({sync:_fs().readFileSync,errback:_fs().readFile}),exports.stat=_gensync()({sync:_fs().statSync,errback:_fs().stat})},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/functional.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.once=function(fn){let result,resultP,promiseReferenced=!1;return function*(){if(!result){if(resultP)return promiseReferenced=!0,yield*(0,_async.waitFor)(resultP);if(yield*(0,_async.isAsync)()){let resolve,reject;resultP=new Promise((res,rej)=>{resolve=res,reject=rej});try{result={ok:!0,value:yield*fn()},resultP=null,promiseReferenced&&resolve(result.value)}catch(error){result={ok:!1,value:error},resultP=null,promiseReferenced&&reject(error)}}else try{result={ok:!0,value:yield*fn()}}catch(error){result={ok:!1,value:error}}}if(result.ok)return result.value;throw result.value}};var _async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js")},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_EXTENSIONS=void 0,Object.defineProperty(exports,"File",{enumerable:!0,get:function(){return _file.default}}),Object.defineProperty(exports,"buildExternalHelpers",{enumerable:!0,get:function(){return _buildExternalHelpers.default}}),Object.defineProperty(exports,"createConfigItem",{enumerable:!0,get:function(){return _index2.createConfigItem}}),Object.defineProperty(exports,"createConfigItemAsync",{enumerable:!0,get:function(){return _index2.createConfigItemAsync}}),Object.defineProperty(exports,"createConfigItemSync",{enumerable:!0,get:function(){return _index2.createConfigItemSync}}),Object.defineProperty(exports,"getEnv",{enumerable:!0,get:function(){return _environment.getEnv}}),Object.defineProperty(exports,"loadOptions",{enumerable:!0,get:function(){return _index2.loadOptions}}),Object.defineProperty(exports,"loadOptionsAsync",{enumerable:!0,get:function(){return _index2.loadOptionsAsync}}),Object.defineProperty(exports,"loadOptionsSync",{enumerable:!0,get:function(){return _index2.loadOptionsSync}}),Object.defineProperty(exports,"loadPartialConfig",{enumerable:!0,get:function(){return _index2.loadPartialConfig}}),Object.defineProperty(exports,"loadPartialConfigAsync",{enumerable:!0,get:function(){return _index2.loadPartialConfigAsync}}),Object.defineProperty(exports,"loadPartialConfigSync",{enumerable:!0,get:function(){return _index2.loadPartialConfigSync}}),Object.defineProperty(exports,"parse",{enumerable:!0,get:function(){return _parse.parse}}),Object.defineProperty(exports,"parseAsync",{enumerable:!0,get:function(){return _parse.parseAsync}}),Object.defineProperty(exports,"parseSync",{enumerable:!0,get:function(){return _parse.parseSync}}),exports.resolvePreset=exports.resolvePlugin=void 0,Object.defineProperty(exports,"template",{enumerable:!0,get:function(){return _template().default}}),Object.defineProperty(exports,"tokTypes",{enumerable:!0,get:function(){return _parser().tokTypes}}),Object.defineProperty(exports,"transform",{enumerable:!0,get:function(){return _transform.transform}}),Object.defineProperty(exports,"transformAsync",{enumerable:!0,get:function(){return _transform.transformAsync}}),Object.defineProperty(exports,"transformFile",{enumerable:!0,get:function(){return _transformFile.transformFile}}),Object.defineProperty(exports,"transformFileAsync",{enumerable:!0,get:function(){return _transformFile.transformFileAsync}}),Object.defineProperty(exports,"transformFileSync",{enumerable:!0,get:function(){return _transformFile.transformFileSync}}),Object.defineProperty(exports,"transformFromAst",{enumerable:!0,get:function(){return _transformAst.transformFromAst}}),Object.defineProperty(exports,"transformFromAstAsync",{enumerable:!0,get:function(){return _transformAst.transformFromAstAsync}}),Object.defineProperty(exports,"transformFromAstSync",{enumerable:!0,get:function(){return _transformAst.transformFromAstSync}}),Object.defineProperty(exports,"transformSync",{enumerable:!0,get:function(){return _transform.transformSync}}),Object.defineProperty(exports,"traverse",{enumerable:!0,get:function(){return _traverse().default}}),exports.version=exports.types=void 0;var _file=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/file.js"),_buildExternalHelpers=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/tools/build-external-helpers.js"),resolvers=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/files/index.js"),_environment=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/environment.js");function _types(){const data=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");return _types=function(){return data},data}function _parser(){const data=__webpack_require__("./node_modules/.pnpm/@babel+parser@7.28.0/node_modules/@babel/parser/lib/index.js");return _parser=function(){return data},data}function _traverse(){const data=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");return _traverse=function(){return data},data}function _template(){const data=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/index.js");return _template=function(){return data},data}Object.defineProperty(exports,"types",{enumerable:!0,get:function(){return _types()}});var _index2=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/index.js"),_transform=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform.js"),_transformFile=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform-file.js"),_transformAst=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform-ast.js"),_parse=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parse.js");exports.version="7.28.0";exports.resolvePlugin=(name,dirname)=>resolvers.resolvePlugin(name,dirname,!1).filepath;exports.resolvePreset=(name,dirname)=>resolvers.resolvePreset(name,dirname,!1).filepath;exports.DEFAULT_EXTENSIONS=Object.freeze([".js",".jsx",".es6",".es",".mjs",".cjs"]);exports.OptionManager=class{init(opts){return(0,_index2.loadOptionsSync)(opts)}},exports.Plugin=function(alias){throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parse.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.parse=void 0,exports.parseAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(parseRunner.async)(...args)},exports.parseSync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parser/index.js"),_normalizeOpts=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/normalize-opts.js"),_rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js");const parseRunner=_gensync()(function*(code,opts){const config=yield*(0,_index.default)(opts);return null===config?null:yield*(0,_index2.default)(config.passes,(0,_normalizeOpts.default)(config),code)});exports.parse=function(code,opts,callback){if("function"==typeof opts&&(callback=opts,opts=void 0),void 0===callback)return(0,_rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(code,opts);(0,_rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code,opts,callback)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parser/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _parser(){const data=__webpack_require__("./node_modules/.pnpm/@babel+parser@7.28.0/node_modules/@babel/parser/lib/index.js");return _parser=function(){return data},data}function _codeFrame(){const data=__webpack_require__("./stubs/babel-codeframe.mjs");return _codeFrame=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function*(pluginPasses,{parserOpts,highlightCode=!0,filename="unknown"},code){try{const results=[];for(const plugins of pluginPasses)for(const plugin of plugins){const{parserOverride}=plugin;if(parserOverride){const ast=parserOverride(code,parserOpts,_parser().parse);void 0!==ast&&results.push(ast)}}if(0===results.length)return(0,_parser().parse)(code,parserOpts);if(1===results.length){if(yield*[],"function"==typeof results[0].then)throw new Error("You appear to be using an async parser plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");return results[0]}throw new Error("More than one plugin attempted to override parsing.")}catch(err){"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"===err.code&&(err.message+="\nConsider renaming the file to '.mjs', or setting sourceType:module or sourceType:unambiguous in your Babel config for this file.");const{loc,missingPlugin}=err;if(loc){const codeFrame=(0,_codeFrame().codeFrameColumns)(code,{start:{line:loc.line,column:loc.column+1}},{highlightCode});err.message=missingPlugin?`${filename}: `+(0,_missingPluginHelper.default)(missingPlugin[0],loc,codeFrame,filename):`${filename}: ${err.message}\n\n`+codeFrame,err.code="BABEL_PARSE_ERROR"}throw err}};var _missingPluginHelper=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js")},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(missingPluginName,loc,codeFrame,filename){let helpMessage=`Support for the experimental syntax '${missingPluginName}' isn't currently enabled (${loc.line}:${loc.column+1}):\n\n`+codeFrame;const pluginInfo=pluginNameMap[missingPluginName];if(pluginInfo){const{syntax:syntaxPlugin,transform:transformPlugin}=pluginInfo;if(syntaxPlugin){const syntaxPluginInfo=getNameURLCombination(syntaxPlugin);if(transformPlugin){helpMessage+=`\n\nAdd ${getNameURLCombination(transformPlugin)} to the '${transformPlugin.name.startsWith("@babel/plugin")?"plugins":"presets"}' section of your Babel config to enable transformation.\nIf you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`}else helpMessage+=`\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config to enable parsing.`}}return helpMessage+=`\n\nIf you already added the plugin for this syntax to your config, it's possible that your config isn't being loaded.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:\n\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${filename==="unknown"?"":filename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.\n`,helpMessage};const pluginNameMap={asyncDoExpressions:{syntax:{name:"@babel/plugin-syntax-async-do-expressions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-do-expressions"}},decimal:{syntax:{name:"@babel/plugin-syntax-decimal",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decimal"}},decorators:{syntax:{name:"@babel/plugin-syntax-decorators",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-decorators"},transform:{name:"@babel/plugin-proposal-decorators",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-decorators"}},doExpressions:{syntax:{name:"@babel/plugin-syntax-do-expressions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-do-expressions"},transform:{name:"@babel/plugin-proposal-do-expressions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-do-expressions"}},exportDefaultFrom:{syntax:{name:"@babel/plugin-syntax-export-default-from",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-default-from"},transform:{name:"@babel/plugin-proposal-export-default-from",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-export-default-from"}},flow:{syntax:{name:"@babel/plugin-syntax-flow",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-flow"},transform:{name:"@babel/preset-flow",url:"https://github.com/babel/babel/tree/main/packages/babel-preset-flow"}},functionBind:{syntax:{name:"@babel/plugin-syntax-function-bind",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-bind"},transform:{name:"@babel/plugin-proposal-function-bind",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-bind"}},functionSent:{syntax:{name:"@babel/plugin-syntax-function-sent",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-function-sent"},transform:{name:"@babel/plugin-proposal-function-sent",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-function-sent"}},jsx:{syntax:{name:"@babel/plugin-syntax-jsx",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx"},transform:{name:"@babel/preset-react",url:"https://github.com/babel/babel/tree/main/packages/babel-preset-react"}},pipelineOperator:{syntax:{name:"@babel/plugin-syntax-pipeline-operator",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-pipeline-operator"},transform:{name:"@babel/plugin-proposal-pipeline-operator",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-pipeline-operator"}},recordAndTuple:{syntax:{name:"@babel/plugin-syntax-record-and-tuple",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-record-and-tuple"}},throwExpressions:{syntax:{name:"@babel/plugin-syntax-throw-expressions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-throw-expressions"},transform:{name:"@babel/plugin-proposal-throw-expressions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-proposal-throw-expressions"}},typescript:{syntax:{name:"@babel/plugin-syntax-typescript",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-typescript"},transform:{name:"@babel/preset-typescript",url:"https://github.com/babel/babel/tree/main/packages/babel-preset-typescript"}}};Object.assign(pluginNameMap,{asyncGenerators:{syntax:{name:"@babel/plugin-syntax-async-generators",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-async-generators"},transform:{name:"@babel/plugin-transform-async-generator-functions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-async-generator-functions"}},classProperties:{syntax:{name:"@babel/plugin-syntax-class-properties",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"},transform:{name:"@babel/plugin-transform-class-properties",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties"}},classPrivateProperties:{syntax:{name:"@babel/plugin-syntax-class-properties",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"},transform:{name:"@babel/plugin-transform-class-properties",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-class-properties"}},classPrivateMethods:{syntax:{name:"@babel/plugin-syntax-class-properties",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-class-properties"},transform:{name:"@babel/plugin-transform-private-methods",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-methods"}},classStaticBlock:{syntax:{name:"@babel/plugin-syntax-class-static-block",url:"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-syntax-class-static-block"},transform:{name:"@babel/plugin-transform-class-static-block",url:"https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-class-static-block"}},dynamicImport:{syntax:{name:"@babel/plugin-syntax-dynamic-import",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-dynamic-import"}},exportNamespaceFrom:{syntax:{name:"@babel/plugin-syntax-export-namespace-from",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-export-namespace-from"},transform:{name:"@babel/plugin-transform-export-namespace-from",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-export-namespace-from"}},importAssertions:{syntax:{name:"@babel/plugin-syntax-import-assertions",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-assertions"}},importAttributes:{syntax:{name:"@babel/plugin-syntax-import-attributes",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes"}},importMeta:{syntax:{name:"@babel/plugin-syntax-import-meta",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-meta"}},logicalAssignment:{syntax:{name:"@babel/plugin-syntax-logical-assignment-operators",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-logical-assignment-operators"},transform:{name:"@babel/plugin-transform-logical-assignment-operators",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-logical-assignment-operators"}},moduleStringNames:{syntax:{name:"@babel/plugin-syntax-module-string-names",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-module-string-names"}},numericSeparator:{syntax:{name:"@babel/plugin-syntax-numeric-separator",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-numeric-separator"},transform:{name:"@babel/plugin-transform-numeric-separator",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-numeric-separator"}},nullishCoalescingOperator:{syntax:{name:"@babel/plugin-syntax-nullish-coalescing-operator",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-nullish-coalescing-operator"},transform:{name:"@babel/plugin-transform-nullish-coalescing-operator",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-nullish-coalescing-opearator"}},objectRestSpread:{syntax:{name:"@babel/plugin-syntax-object-rest-spread",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-object-rest-spread"},transform:{name:"@babel/plugin-transform-object-rest-spread",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-object-rest-spread"}},optionalCatchBinding:{syntax:{name:"@babel/plugin-syntax-optional-catch-binding",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-catch-binding"},transform:{name:"@babel/plugin-transform-optional-catch-binding",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-catch-binding"}},optionalChaining:{syntax:{name:"@babel/plugin-syntax-optional-chaining",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-optional-chaining"},transform:{name:"@babel/plugin-transform-optional-chaining",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-optional-chaining"}},privateIn:{syntax:{name:"@babel/plugin-syntax-private-property-in-object",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-private-property-in-object"},transform:{name:"@babel/plugin-transform-private-property-in-object",url:"https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-private-property-in-object"}},regexpUnicodeSets:{syntax:{name:"@babel/plugin-syntax-unicode-sets-regex",url:"https://github.com/babel/babel/blob/main/packages/babel-plugin-syntax-unicode-sets-regex/README.md"},transform:{name:"@babel/plugin-transform-unicode-sets-regex",url:"https://github.com/babel/babel/blob/main/packages/babel-plugin-proposalunicode-sets-regex/README.md"}}});const getNameURLCombination=({name,url})=>`${name} (${url})`},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/tools/build-external-helpers.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function helpers(){const data=__webpack_require__("./node_modules/.pnpm/@babel+helpers@7.27.6/node_modules/@babel/helpers/lib/index.js");return helpers=function(){return data},data}function _generator(){const data=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/index.js");return _generator=function(){return data},data}function _template(){const data=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/index.js");return _template=function(){return data},data}function _t(){const data=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");return _t=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(allowlist,outputType="global"){let tree;const build={global:buildGlobal,module:buildModule,umd:buildUmd,var:buildVar}[outputType];if(!build)throw new Error(`Unsupported output type ${outputType}`);tree=build(allowlist);return(0,_generator().default)(tree).code};const{arrayExpression,assignmentExpression,binaryExpression,blockStatement,callExpression,cloneNode,conditionalExpression,exportNamedDeclaration,exportSpecifier,expressionStatement,functionExpression,identifier,memberExpression,objectExpression,program,stringLiteral,unaryExpression,variableDeclaration,variableDeclarator}=_t(),buildUmdWrapper=replacements=>_template().default.statement` + (function (root, factory) { + if (typeof define === "function" && define.amd) { + define(AMD_ARGUMENTS, factory); + } else if (typeof exports === "object") { + factory(COMMON_ARGUMENTS); + } else { + factory(BROWSER_ARGUMENTS); + } + })(UMD_ROOT, function (FACTORY_PARAMETERS) { + FACTORY_BODY + }); + `(replacements);function buildGlobal(allowlist){const namespace=identifier("babelHelpers"),body=[],container=functionExpression(null,[identifier("global")],blockStatement(body)),tree=program([expressionStatement(callExpression(container,[conditionalExpression(binaryExpression("===",unaryExpression("typeof",identifier("global")),stringLiteral("undefined")),identifier("self"),identifier("global"))]))]);return body.push(variableDeclaration("var",[variableDeclarator(namespace,assignmentExpression("=",memberExpression(identifier("global"),namespace),objectExpression([])))])),buildHelpers(body,namespace,allowlist),tree}function buildModule(allowlist){const body=[],refs=buildHelpers(body,null,allowlist);return body.unshift(exportNamedDeclaration(null,Object.keys(refs).map(name=>exportSpecifier(cloneNode(refs[name]),identifier(name))))),program(body,[],"module")}function buildUmd(allowlist){const namespace=identifier("babelHelpers"),body=[];return body.push(variableDeclaration("var",[variableDeclarator(namespace,identifier("global"))])),buildHelpers(body,namespace,allowlist),program([buildUmdWrapper({FACTORY_PARAMETERS:identifier("global"),BROWSER_ARGUMENTS:assignmentExpression("=",memberExpression(identifier("root"),namespace),objectExpression([])),COMMON_ARGUMENTS:identifier("exports"),AMD_ARGUMENTS:arrayExpression([stringLiteral("exports")]),FACTORY_BODY:body,UMD_ROOT:identifier("this")})])}function buildVar(allowlist){const namespace=identifier("babelHelpers"),body=[];body.push(variableDeclaration("var",[variableDeclarator(namespace,objectExpression([]))]));const tree=program(body);return buildHelpers(body,namespace,allowlist),body.push(expressionStatement(namespace)),tree}function buildHelpers(body,namespace,allowlist){const getHelperReference=name=>namespace?memberExpression(namespace,identifier(name)):identifier(`_${name}`),refs={};return helpers().list.forEach(function(name){if(allowlist&&!allowlist.includes(name))return;const ref=refs[name]=getHelperReference(name),{nodes}=helpers().get(name,getHelperReference,namespace?null:`_${name}`,[],namespace?(ast,exportName,mapExportBindingAssignments)=>{mapExportBindingAssignments(node=>assignmentExpression("=",ref,node)),ast.body.push(expressionStatement(assignmentExpression("=",ref,identifier(exportName))))}:null);body.push(...nodes)}),refs}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform-ast.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformFromAst=void 0,exports.transformFromAstAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.async)(...args)},exports.transformFromAstSync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/index.js"),_rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js");const transformFromAstRunner=_gensync()(function*(ast,code,opts){const config=yield*(0,_index.default)(opts);if(null===config)return null;if(!ast)throw new Error("No AST given");return yield*(0,_index2.run)(config,code,ast)});exports.transformFromAst=function(ast,code,optsOrCallback,maybeCallback){let opts,callback;if("function"==typeof optsOrCallback?(callback=optsOrCallback,opts=void 0):(opts=optsOrCallback,callback=maybeCallback),void 0===callback)return(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(ast,code,opts);(0,_rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast,code,opts,callback)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform-file.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformFile=function(...args){transformFileRunner.errback(...args)},exports.transformFileAsync=function(...args){return transformFileRunner.async(...args)},exports.transformFileSync=function(...args){return transformFileRunner.sync(...args)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/index.js"),fs=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/fs.js");const transformFileRunner=_gensync()(function*(filename,opts){const options=Object.assign({},opts,{filename}),config=yield*(0,_index.default)(options);if(null===config)return null;const code=yield*fs.readFile(filename,"utf8");return yield*(0,_index2.run)(config,code)})},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transform.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _gensync(){const data=__webpack_require__("./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js");return _gensync=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.transform=void 0,exports.transformAsync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(transformRunner.async)(...args)},exports.transformSync=function(...args){return(0,_rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/index.js"),_rewriteStackTrace=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/errors/rewrite-stack-trace.js");const transformRunner=_gensync()(function*(code,opts){const config=yield*(0,_index.default)(opts);return null===config?null:yield*(0,_index2.run)(config,code)});exports.transform=function(code,optsOrCallback,maybeCallback){let opts,callback;if("function"==typeof optsOrCallback?(callback=optsOrCallback,opts=void 0):(opts=optsOrCallback,callback=maybeCallback),void 0===callback)return(0,_rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(code,opts);(0,_rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code,opts,callback)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _traverse(){const data=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");return _traverse=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(){LOADED_PLUGIN||(LOADED_PLUGIN=new _plugin.default(Object.assign({},blockHoistPlugin,{visitor:_traverse().default.explode(blockHoistPlugin.visitor)}),{}));return LOADED_PLUGIN};var _plugin=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/plugin.js");let LOADED_PLUGIN;const blockHoistPlugin={name:"internal.blockHoist",visitor:{Block:{exit({node}){node.body=performHoisting(node.body)}},SwitchCase:{exit({node}){node.consequent=performHoisting(node.consequent)}}}};function performHoisting(body){let max=Math.pow(2,30)-1,hasChange=!1;for(let i=0;imax){hasChange=!0;break}max=p}return hasChange?function(body){const buckets=Object.create(null);for(let i=0;i+k).sort((a,b)=>b-a);let index=0;for(const key of keys){const bucket=buckets[key];for(const n of bucket)body[index++]=n}return body}(body.slice()):body}function priority(bodyNode){const priority=null==bodyNode?void 0:bodyNode._blockHoist;return null==priority?1:!0===priority?2:priority}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs":(__unused_webpack_module,exports,__webpack_require__)=>{exports.getModuleName=()=>__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/index.js").getModuleName},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/file.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function helpers(){const data=__webpack_require__("./node_modules/.pnpm/@babel+helpers@7.27.6/node_modules/@babel/helpers/lib/index.js");return helpers=function(){return data},data}function _traverse(){const data=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");return _traverse=function(){return data},data}function _codeFrame(){const data=__webpack_require__("./stubs/babel-codeframe.mjs");return _codeFrame=function(){return data},data}function _t(){const data=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");return _t=function(){return data},data}function _semver(){const data=__webpack_require__("./node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js");return _semver=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _babel7Helpers=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/babel-7-helpers.cjs");const{cloneNode,interpreterDirective}=_t(),errorVisitor={enter(path,state){const loc=path.node.loc;loc&&(state.loc=loc,path.stop())}};class File{constructor(options,{code,ast,inputMap}){this._map=new Map,this.opts=void 0,this.declarations={},this.path=void 0,this.ast=void 0,this.scope=void 0,this.metadata={},this.code="",this.inputMap=void 0,this.hub={file:this,getCode:()=>this.code,getScope:()=>this.scope,addHelper:this.addHelper.bind(this),buildError:this.buildCodeFrameError.bind(this)},this.opts=options,this.code=code,this.ast=ast,this.inputMap=inputMap,this.path=_traverse().NodePath.get({hub:this.hub,parentPath:null,parent:this.ast,container:this.ast,key:"program"}).setContext(),this.scope=this.path.scope}get shebang(){const{interpreter}=this.path.node;return interpreter?interpreter.value:""}set shebang(value){value?this.path.get("interpreter").replaceWith(interpreterDirective(value)):this.path.get("interpreter").remove()}set(key,val){if("helpersNamespace"===key)throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility.If you are using @babel/plugin-external-helpers you will need to use a newer version than the one you currently have installed. If you have your own implementation, you'll want to explore using 'helperGenerator' alongside 'file.availableHelper()'.");this._map.set(key,val)}get(key){return this._map.get(key)}has(key){return this._map.has(key)}availableHelper(name,versionRange){if(helpers().isInternal(name))return!1;let minVersion;try{minVersion=helpers().minVersion(name)}catch(err){if("BABEL_HELPER_UNKNOWN"!==err.code)throw err;return!1}return"string"!=typeof versionRange||(_semver().valid(versionRange)&&(versionRange=`^${versionRange}`),!_semver().intersects(`<${minVersion}`,versionRange)&&!_semver().intersects(">=8.0.0",versionRange))}addHelper(name){if(helpers().isInternal(name))throw new Error("Cannot use internal helper "+name);return this._addHelper(name)}_addHelper(name){const declar=this.declarations[name];if(declar)return cloneNode(declar);const generator=this.get("helperGenerator");if(generator){const res=generator(name);if(res)return res}helpers().minVersion(name);const uid=this.declarations[name]=this.scope.generateUidIdentifier(name),dependencies={};for(const dep of helpers().getDependencies(name))dependencies[dep]=this._addHelper(dep);const{nodes,globals}=helpers().get(name,dep=>dependencies[dep],uid.name,Object.keys(this.scope.getAllBindings()));globals.forEach(name=>{this.path.scope.hasBinding(name,!0)&&this.path.scope.rename(name)}),nodes.forEach(node=>{node._compact=!0});const added=this.path.unshiftContainer("body",nodes);for(const path of added)path.isVariableDeclaration()&&this.scope.registerDeclaration(path);return uid}buildCodeFrameError(node,msg,_Error=SyntaxError){let loc=null==node?void 0:node.loc;if(!loc&&node){const state={loc:null};(0,_traverse().default)(node,errorVisitor,this.scope,state),loc=state.loc;let txt="This is an error on an internal node. Probably an internal error.";loc&&(txt+=" Location has been estimated."),msg+=` (${txt})`}if(loc){const{highlightCode=!0}=this.opts;msg+="\n"+(0,_codeFrame().codeFrameColumns)(this.code,{start:{line:loc.start.line,column:loc.start.column+1},end:loc.end&&loc.start.line===loc.end.line?{line:loc.end.line,column:loc.end.column+1}:void 0},{highlightCode})}return new _Error(msg)}}exports.default=File,File.prototype.addImport=function(){throw new Error("This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.")},File.prototype.addTemplateObject=function(){throw new Error("This function has been moved into the template literal transform itself.")},File.prototype.getModuleName=function(){return _babel7Helpers.getModuleName()(this.opts,this.opts)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/generate.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _convertSourceMap(){const data=__webpack_require__("./node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js");return _convertSourceMap=function(){return data},data}function _generator(){const data=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/index.js");return _generator=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(pluginPasses,file){const{opts,ast,code,inputMap}=file,{generatorOpts}=opts;generatorOpts.inputSourceMap=null==inputMap?void 0:inputMap.toObject();const results=[];for(const plugins of pluginPasses)for(const plugin of plugins){const{generatorOverride}=plugin;if(generatorOverride){const result=generatorOverride(ast,generatorOpts,code,_generator().default);void 0!==result&&results.push(result)}}let result;if(0===results.length)result=(0,_generator().default)(ast,generatorOpts,code);else{if(1!==results.length)throw new Error("More than one plugin attempted to override codegen.");if(result=results[0],"function"==typeof result.then)throw new Error("You appear to be using an async codegen plugin, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.")}let{code:outputCode,decodedMap:outputMap=result.map}=result;result.__mergedMap?outputMap=Object.assign({},result.map):outputMap&&(outputMap=inputMap?(0,_mergeMap.default)(inputMap.toObject(),outputMap,generatorOpts.sourceFileName):result.map);"inline"!==opts.sourceMaps&&"both"!==opts.sourceMaps||(outputCode+="\n"+_convertSourceMap().fromObject(outputMap).toComment());"inline"===opts.sourceMaps&&(outputMap=null);return{outputCode,outputMap}};var _mergeMap=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/merge-map.js")},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/merge-map.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _remapping(){const data=__webpack_require__("./node_modules/.pnpm/@ampproject+remapping@2.3.0/node_modules/@ampproject/remapping/dist/remapping.umd.js");return _remapping=function(){return data},data}function rootless(map){return Object.assign({},map,{sourceRoot:null})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(inputMap,map,sourceFileName){const source=sourceFileName.replace(/\\/g,"/");let found=!1;const result=_remapping()(rootless(map),(s,ctx)=>s!==source||found?null:(found=!0,ctx.source="",rootless(inputMap)));"string"==typeof inputMap.sourceRoot&&(result.sourceRoot=inputMap.sourceRoot);return Object.assign({},result)}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _traverse(){const data=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");return _traverse=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.run=function*(config,code,ast){const file=yield*(0,_normalizeFile.default)(config.passes,(0,_normalizeOpts.default)(config),code,ast),opts=file.opts;try{yield*function*(file,pluginPasses){const async=yield*(0,_async.isAsync)();for(const pluginPairs of pluginPasses){const passPairs=[],passes=[],visitors=[];for(const plugin of pluginPairs.concat([(0,_blockHoistPlugin.default)()])){const pass=new _pluginPass.default(file,plugin.key,plugin.options,async);passPairs.push([plugin,pass]),passes.push(pass),visitors.push(plugin.visitor)}for(const[plugin,pass]of passPairs)if(plugin.pre){const fn=(0,_async.maybeAsync)(plugin.pre,"You appear to be using an async plugin/preset, but Babel has been called synchronously");yield*fn.call(pass,file)}const visitor=_traverse().default.visitors.merge(visitors,passes,file.opts.wrapPluginVisitorMethod);(0,_traverse().default)(file.ast,visitor,file.scope);for(const[plugin,pass]of passPairs)if(plugin.post){const fn=(0,_async.maybeAsync)(plugin.post,"You appear to be using an async plugin/preset, but Babel has been called synchronously");yield*fn.call(pass,file)}}}(file,config.passes)}catch(e){var _opts$filename;throw e.message=`${null!=(_opts$filename=opts.filename)?_opts$filename:"unknown file"}: ${e.message}`,e.code||(e.code="BABEL_TRANSFORM_ERROR"),e}let outputCode,outputMap;try{!1!==opts.code&&({outputCode,outputMap}=(0,_generate.default)(config.passes,file))}catch(e){var _opts$filename2;throw e.message=`${null!=(_opts$filename2=opts.filename)?_opts$filename2:"unknown file"}: ${e.message}`,e.code||(e.code="BABEL_GENERATE_ERROR"),e}return{metadata:file.metadata,options:opts,ast:!0===opts.ast?file.ast:null,code:void 0===outputCode?null:outputCode,map:void 0===outputMap?null:outputMap,sourceType:file.ast.program.sourceType,externalDependencies:(0,_deepArray.flattenToSet)(config.externalDependencies)}};var _pluginPass=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/plugin-pass.js"),_blockHoistPlugin=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js"),_normalizeOpts=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/normalize-opts.js"),_normalizeFile=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/normalize-file.js"),_generate=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/generate.js"),_deepArray=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/config/helpers/deep-array.js"),_async=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/gensync-utils/async.js")},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/normalize-file.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _fs(){const data=__webpack_require__("fs");return _fs=function(){return data},data}function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}function _debug(){const data=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js");return _debug=function(){return data},data}function _t(){const data=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");return _t=function(){return data},data}function _convertSourceMap(){const data=__webpack_require__("./node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js");return _convertSourceMap=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function*(pluginPasses,options,code,ast){if(code=`${code||""}`,ast){if("Program"===ast.type)ast=file(ast,[],[]);else if("File"!==ast.type)throw new Error("AST root must be a Program or File node");options.cloneInputAst&&(ast=(0,_cloneDeep.default)(ast))}else ast=yield*(0,_index.default)(pluginPasses,options,code);let inputMap=null;if(!1!==options.inputSourceMap){if("object"==typeof options.inputSourceMap&&(inputMap=_convertSourceMap().fromObject(options.inputSourceMap)),!inputMap){const lastComment=extractComments(INLINE_SOURCEMAP_REGEX,ast);if(lastComment)try{inputMap=_convertSourceMap().fromComment("//"+lastComment)}catch(err){debug("discarding unknown inline input sourcemap")}}if(!inputMap){const lastComment=extractComments(EXTERNAL_SOURCEMAP_REGEX,ast);if("string"==typeof options.filename&&lastComment)try{const match=EXTERNAL_SOURCEMAP_REGEX.exec(lastComment),inputMapContent=_fs().readFileSync(_path().resolve(_path().dirname(options.filename),match[1]),"utf8");inputMap=_convertSourceMap().fromJSON(inputMapContent)}catch(err){debug("discarding unknown file input sourcemap",err)}else lastComment&&debug("discarding un-loadable file input sourcemap")}}return new _file.default(options,{code,ast,inputMap})};var _file=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/file/file.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/parser/index.js"),_cloneDeep=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/util/clone-deep.js");const{file,traverseFast}=_t(),debug=_debug()("babel:transform:file"),INLINE_SOURCEMAP_REGEX=/^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,.*$/,EXTERNAL_SOURCEMAP_REGEX=/^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;function extractCommentsFromList(regex,comments,lastComment){return comments&&(comments=comments.filter(({value})=>!regex.test(value)||(lastComment=value,!1))),[comments,lastComment]}function extractComments(regex,ast){let lastComment=null;return traverseFast(ast,node=>{[node.leadingComments,lastComment]=extractCommentsFromList(regex,node.leadingComments,lastComment),[node.innerComments,lastComment]=extractCommentsFromList(regex,node.innerComments,lastComment),[node.trailingComments,lastComment]=extractCommentsFromList(regex,node.trailingComments,lastComment)}),lastComment}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/normalize-opts.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(config){const{filename,cwd,filenameRelative="string"==typeof filename?_path().relative(cwd,filename):"unknown",sourceType="module",inputSourceMap,sourceMaps=!!inputSourceMap,sourceRoot=config.options.moduleRoot,sourceFileName=_path().basename(filenameRelative),comments=!0,compact="auto"}=config.options,opts=config.options,options=Object.assign({},opts,{parserOpts:Object.assign({sourceType:".mjs"===_path().extname(filenameRelative)?"module":sourceType,sourceFileName:filename,plugins:[]},opts.parserOpts),generatorOpts:Object.assign({filename,auxiliaryCommentBefore:opts.auxiliaryCommentBefore,auxiliaryCommentAfter:opts.auxiliaryCommentAfter,retainLines:opts.retainLines,comments,shouldPrintComment:opts.shouldPrintComment,compact,minified:opts.minified,sourceMaps,sourceRoot,sourceFileName},opts.generatorOpts)});for(const plugins of config.passes)for(const plugin of plugins)plugin.manipulateOptions&&plugin.manipulateOptions(options,options.parserOpts);return options}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/plugin-pass.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;class PluginPass{constructor(file,key,options,isAsync){this._map=new Map,this.key=void 0,this.file=void 0,this.opts=void 0,this.cwd=void 0,this.filename=void 0,this.isAsync=void 0,this.key=key,this.file=file,this.opts=options||{},this.cwd=file.opts.cwd,this.filename=file.opts.filename,this.isAsync=isAsync}set(key,val){this._map.set(key,val)}get(key){return this._map.get(key)}availableHelper(name,versionRange){return this.file.availableHelper(name,versionRange)}addHelper(name){return this.file.addHelper(name)}buildCodeFrameError(node,msg,_Error){return this.file.buildCodeFrameError(node,msg,_Error)}}exports.default=PluginPass,PluginPass.prototype.getModuleName=function(){return this.file.getModuleName()},PluginPass.prototype.addImport=function(){this.file.addImport()}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/transformation/util/clone-deep.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(value){if("object"!=typeof value)return value;try{return deepClone(value,new Map,!0)}catch(_){return structuredClone(value)}};const circleSet=new Set;let depth=0;function deepClone(value,cache,allowCircle){if(null!==value){if(allowCircle){if(cache.has(value))return cache.get(value)}else if(++depth>250){if(circleSet.has(value))throw depth=0,circleSet.clear(),new Error("Babel-deepClone: Cycles are not allowed in AST");circleSet.add(value)}let cloned;if(Array.isArray(value)){cloned=new Array(value.length),allowCircle&&cache.set(value,cloned);for(let i=0;i250&&circleSet.delete(value),cloned}return value}},"./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/vendor/import-meta-resolve.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _assert(){const data=__webpack_require__("assert");return _assert=function(){return data},data}function _fs(){const data=_interopRequireWildcard(__webpack_require__("fs"),!0);return _fs=function(){return data},data}function _process(){const data=__webpack_require__("process");return _process=function(){return data},data}function _url(){const data=__webpack_require__("url");return _url=function(){return data},data}function _path(){const data=__webpack_require__("path");return _path=function(){return data},data}function _module(){const data=__webpack_require__("module");return _module=function(){return data},data}function _v(){const data=__webpack_require__("v8");return _v=function(){return data},data}function _util(){const data=__webpack_require__("util");return _util=function(){return data},data}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?o(f,t,i):f[t]=e[t]);return f})(e,t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.moduleResolve=moduleResolve,exports.resolve=function(specifier,parent){if(!parent)throw new Error("Please pass `parent`: `import-meta-resolve` cannot ponyfill that");try{return function(specifier,context={}){const{parentURL}=context;let parsedParentURL,parsed,protocol;if(_assert()(void 0!==parentURL,"expected `parentURL` to be defined"),function(parentURL){if(void 0===parentURL)return;if("string"!=typeof parentURL&&(self=parentURL,!Boolean(self&&"object"==typeof self&&"href"in self&&"string"==typeof self.href&&"protocol"in self&&"string"==typeof self.protocol&&self.href&&self.protocol)))throw new codes.ERR_INVALID_ARG_TYPE("parentURL",["string","URL"],parentURL);var self}(parentURL),parentURL)try{parsedParentURL=new(_url().URL)(parentURL)}catch(_unused4){}try{if(parsed=shouldBeTreatedAsRelativeOrAbsolutePath(specifier)?new(_url().URL)(specifier,parsedParentURL):new(_url().URL)(specifier),protocol=parsed.protocol,"data:"===protocol)return{url:parsed.href,format:null}}catch(_unused5){}const maybeReturn=function(specifier,parsed,parsedParentURL){if(parsedParentURL){const parentProtocol=parsedParentURL.protocol;if("http:"===parentProtocol||"https:"===parentProtocol){if(shouldBeTreatedAsRelativeOrAbsolutePath(specifier)){const parsedProtocol=null==parsed?void 0:parsed.protocol;if(parsedProtocol&&"https:"!==parsedProtocol&&"http:"!==parsedProtocol)throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier,parsedParentURL,"remote imports cannot import from a local location.");return{url:(null==parsed?void 0:parsed.href)||""}}if(_module().builtinModules.includes(specifier))throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier,parsedParentURL,"remote imports cannot import from a local location.");throw new ERR_NETWORK_IMPORT_DISALLOWED(specifier,parsedParentURL,"only relative and absolute specifiers are supported.")}}}(specifier,parsed,parsedParentURL);if(maybeReturn)return maybeReturn;void 0===protocol&&parsed&&(protocol=parsed.protocol);if("node:"===protocol)return{url:specifier};if(parsed&&"node:"===parsed.protocol)return{url:specifier};const conditions=function(conditions){if(void 0!==conditions&&conditions!==DEFAULT_CONDITIONS){if(!Array.isArray(conditions))throw new ERR_INVALID_ARG_VALUE("conditions",conditions,"expected an array");return new Set(conditions)}return DEFAULT_CONDITIONS_SET}(context.conditions),url=moduleResolve(specifier,new(_url().URL)(parentURL),conditions,!1);return{url:url.href,format:defaultGetFormatWithoutErrors(url,{parentURL})}}(specifier,{parentURL:parent}).url}catch(error){const exception=error;if(("ERR_UNSUPPORTED_DIR_IMPORT"===exception.code||"ERR_MODULE_NOT_FOUND"===exception.code)&&"string"==typeof exception.url)return exception.url;throw error}};const own$1={}.hasOwnProperty,classRegExp=/^([A-Z][a-z\d]*)+$/,kTypes=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),codes={};function formatList(array,type="and"){return array.length<3?array.join(` ${type} `):`${array.slice(0,-1).join(", ")}, ${type} ${array[array.length-1]}`}const messages=new Map;let userStackTraceLimit;function createError(sym,value,constructor){return messages.set(sym,value),function(Base,key){return NodeError;function NodeError(...parameters){const limit=Error.stackTraceLimit;isErrorStackTraceLimitWritable()&&(Error.stackTraceLimit=0);const error=new Base;isErrorStackTraceLimitWritable()&&(Error.stackTraceLimit=limit);const message=function(key,parameters,self){const message=messages.get(key);if(_assert()(void 0!==message,"expected `message` to be found"),"function"==typeof message)return _assert()(message.length<=parameters.length,`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`),Reflect.apply(message,self,parameters);const regex=/%[dfijoOs]/g;let expectedLength=0;for(;null!==regex.exec(message);)expectedLength++;return _assert()(expectedLength===parameters.length,`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`),0===parameters.length?message:(parameters.unshift(message),Reflect.apply(_util().format,null,parameters))}(key,parameters,error);return Object.defineProperties(error,{message:{value:message,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${key}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),captureLargerStackTrace(error),error.code=key,error}}(constructor,sym)}function isErrorStackTraceLimitWritable(){try{if(_v().startupSnapshot.isBuildingSnapshot())return!1}catch(_unused){}const desc=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return void 0===desc?Object.isExtensible(Error):own$1.call(desc,"writable")&&void 0!==desc.writable?desc.writable:void 0!==desc.set}codes.ERR_INVALID_ARG_TYPE=createError("ERR_INVALID_ARG_TYPE",(name,expected,actual)=>{_assert()("string"==typeof name,"'name' must be a string"),Array.isArray(expected)||(expected=[expected]);let message="The ";if(name.endsWith(" argument"))message+=`${name} `;else{const type=name.includes(".")?"property":"argument";message+=`"${name}" ${type} `}message+="must be ";const types=[],instances=[],other=[];for(const value of expected)_assert()("string"==typeof value,"All expected entries have to be of type string"),kTypes.has(value)?types.push(value.toLowerCase()):null===classRegExp.exec(value)?(_assert()("object"!==value,'The value "object" should be written as "Object"'),other.push(value)):instances.push(value);if(instances.length>0){const pos=types.indexOf("object");-1!==pos&&(types.slice(pos,1),instances.push("Object"))}return types.length>0&&(message+=`${types.length>1?"one of type":"of type"} ${formatList(types,"or")}`,(instances.length>0||other.length>0)&&(message+=" or ")),instances.length>0&&(message+=`an instance of ${formatList(instances,"or")}`,other.length>0&&(message+=" or ")),other.length>0&&(other.length>1?message+=`one of ${formatList(other,"or")}`:(other[0].toLowerCase()!==other[0]&&(message+="an "),message+=`${other[0]}`)),message+=`. Received ${function(value){if(null==value)return String(value);if("function"==typeof value&&value.name)return`function ${value.name}`;if("object"==typeof value)return value.constructor&&value.constructor.name?`an instance of ${value.constructor.name}`:`${(0,_util().inspect)(value,{depth:-1})}`;let inspected=(0,_util().inspect)(value,{colors:!1});inspected.length>28&&(inspected=`${inspected.slice(0,25)}...`);return`type ${typeof value} (${inspected})`}(actual)}`,message},TypeError),codes.ERR_INVALID_MODULE_SPECIFIER=createError("ERR_INVALID_MODULE_SPECIFIER",(request,reason,base=void 0)=>`Invalid module "${request}" ${reason}${base?` imported from ${base}`:""}`,TypeError),codes.ERR_INVALID_PACKAGE_CONFIG=createError("ERR_INVALID_PACKAGE_CONFIG",(path,base,message)=>`Invalid package config ${path}${base?` while importing ${base}`:""}${message?`. ${message}`:""}`,Error),codes.ERR_INVALID_PACKAGE_TARGET=createError("ERR_INVALID_PACKAGE_TARGET",(packagePath,key,target,isImport=!1,base=void 0)=>{const relatedError="string"==typeof target&&!isImport&&target.length>0&&!target.startsWith("./");return"."===key?(_assert()(!1===isImport),`Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base?` imported from ${base}`:""}${relatedError?'; targets must start with "./"':""}`):`Invalid "${isImport?"imports":"exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base?` imported from ${base}`:""}${relatedError?'; targets must start with "./"':""}`},Error),codes.ERR_MODULE_NOT_FOUND=createError("ERR_MODULE_NOT_FOUND",(path,base,exactUrl=!1)=>`Cannot find ${exactUrl?"module":"package"} '${path}' imported from ${base}`,Error),codes.ERR_NETWORK_IMPORT_DISALLOWED=createError("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),codes.ERR_PACKAGE_IMPORT_NOT_DEFINED=createError("ERR_PACKAGE_IMPORT_NOT_DEFINED",(specifier,packagePath,base)=>`Package import specifier "${specifier}" is not defined${packagePath?` in package ${packagePath}package.json`:""} imported from ${base}`,TypeError),codes.ERR_PACKAGE_PATH_NOT_EXPORTED=createError("ERR_PACKAGE_PATH_NOT_EXPORTED",(packagePath,subpath,base=void 0)=>"."===subpath?`No "exports" main defined in ${packagePath}package.json${base?` imported from ${base}`:""}`:`Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base?` imported from ${base}`:""}`,Error),codes.ERR_UNSUPPORTED_DIR_IMPORT=createError("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),codes.ERR_UNSUPPORTED_RESOLVE_REQUEST=createError("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),codes.ERR_UNKNOWN_FILE_EXTENSION=createError("ERR_UNKNOWN_FILE_EXTENSION",(extension,path)=>`Unknown file extension "${extension}" for ${path}`,TypeError),codes.ERR_INVALID_ARG_VALUE=createError("ERR_INVALID_ARG_VALUE",(name,value,reason="is invalid")=>{let inspected=(0,_util().inspect)(value);inspected.length>128&&(inspected=`${inspected.slice(0,128)}...`);return`The ${name.includes(".")?"property":"argument"} '${name}' ${reason}. Received ${inspected}`},TypeError);const captureLargerStackTrace=function(wrappedFunction){const hidden="__node_internal_"+wrappedFunction.name;return Object.defineProperty(wrappedFunction,"name",{value:hidden}),wrappedFunction}(function(error){const stackTraceLimitIsWritable=isErrorStackTraceLimitWritable();return stackTraceLimitIsWritable&&(userStackTraceLimit=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(error),stackTraceLimitIsWritable&&(Error.stackTraceLimit=userStackTraceLimit),error});const hasOwnProperty$1={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:ERR_INVALID_PACKAGE_CONFIG$1}=codes,cache=new Map;function read(jsonPath,{base,specifier}){const existing=cache.get(jsonPath);if(existing)return existing;let string;try{string=_fs().default.readFileSync(_path().toNamespacedPath(jsonPath),"utf8")}catch(error){const exception=error;if("ENOENT"!==exception.code)throw exception}const result={exists:!1,pjsonPath:jsonPath,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(void 0!==string){let parsed;try{parsed=JSON.parse(string)}catch(error_){const cause=error_,error=new ERR_INVALID_PACKAGE_CONFIG$1(jsonPath,(base?`"${specifier}" from `:"")+(0,_url().fileURLToPath)(base||specifier),cause.message);throw error.cause=cause,error}result.exists=!0,hasOwnProperty$1.call(parsed,"name")&&"string"==typeof parsed.name&&(result.name=parsed.name),hasOwnProperty$1.call(parsed,"main")&&"string"==typeof parsed.main&&(result.main=parsed.main),hasOwnProperty$1.call(parsed,"exports")&&(result.exports=parsed.exports),hasOwnProperty$1.call(parsed,"imports")&&(result.imports=parsed.imports),!hasOwnProperty$1.call(parsed,"type")||"commonjs"!==parsed.type&&"module"!==parsed.type||(result.type=parsed.type)}return cache.set(jsonPath,result),result}function getPackageScopeConfig(resolved){let packageJSONUrl=new URL("package.json",resolved);for(;;){if(packageJSONUrl.pathname.endsWith("node_modules/package.json"))break;const packageConfig=read((0,_url().fileURLToPath)(packageJSONUrl),{specifier:resolved});if(packageConfig.exists)return packageConfig;const lastPackageJSONUrl=packageJSONUrl;if(packageJSONUrl=new URL("../package.json",packageJSONUrl),packageJSONUrl.pathname===lastPackageJSONUrl.pathname)break}return{pjsonPath:(0,_url().fileURLToPath)(packageJSONUrl),exists:!1,type:"none"}}function getPackageType(url){return getPackageScopeConfig(url).type}const{ERR_UNKNOWN_FILE_EXTENSION}=codes,hasOwnProperty={}.hasOwnProperty,extensionFormatMap={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"};const protocolHandlers={__proto__:null,"data:":function(parsed){const{1:mime}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname)||[null,null,null];return function(mime){return mime&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)?"module":"application/json"===mime?"json":null}(mime)},"file:":function(url,_context,ignoreErrors){const value=function(url){const pathname=url.pathname;let index=pathname.length;for(;index--;){const code=pathname.codePointAt(index);if(47===code)return"";if(46===code)return 47===pathname.codePointAt(index-1)?"":pathname.slice(index)}return""}(url);if(".js"===value){const packageType=getPackageType(url);return"none"!==packageType?packageType:"commonjs"}if(""===value){const packageType=getPackageType(url);return"none"===packageType||"commonjs"===packageType?"commonjs":"module"}const format=extensionFormatMap[value];if(format)return format;if(ignoreErrors)return;const filepath=(0,_url().fileURLToPath)(url);throw new ERR_UNKNOWN_FILE_EXTENSION(value,filepath)},"http:":getHttpProtocolModuleFormat,"https:":getHttpProtocolModuleFormat,"node:":()=>"builtin"};function getHttpProtocolModuleFormat(){}function defaultGetFormatWithoutErrors(url,context){const protocol=url.protocol;return hasOwnProperty.call(protocolHandlers,protocol)&&protocolHandlers[protocol](url,context,!0)||null}const{ERR_INVALID_ARG_VALUE}=codes,DEFAULT_CONDITIONS=Object.freeze(["node","import"]),DEFAULT_CONDITIONS_SET=new Set(DEFAULT_CONDITIONS);const RegExpPrototypeSymbolReplace=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED,ERR_INVALID_MODULE_SPECIFIER,ERR_INVALID_PACKAGE_CONFIG,ERR_INVALID_PACKAGE_TARGET,ERR_MODULE_NOT_FOUND,ERR_PACKAGE_IMPORT_NOT_DEFINED,ERR_PACKAGE_PATH_NOT_EXPORTED,ERR_UNSUPPORTED_DIR_IMPORT,ERR_UNSUPPORTED_RESOLVE_REQUEST}=codes,own={}.hasOwnProperty,invalidSegmentRegEx=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,deprecatedInvalidSegmentRegEx=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,invalidPackageNameRegEx=/^\.|%|\\/,patternRegEx=/\*/g,encodedSeparatorRegEx=/%2f|%5c/i,emittedPackageWarnings=new Set,doubleSlashRegEx=/[/\\]{2}/;function emitInvalidSegmentDeprecation(target,request,match,packageJsonUrl,internal,base,isTarget){if(_process().noDeprecation)return;const pjsonPath=(0,_url().fileURLToPath)(packageJsonUrl),double=null!==doubleSlashRegEx.exec(isTarget?target:request);_process().emitWarning(`Use of deprecated ${double?"double slash":"leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request===match?"":`matched to "${match}" `}in the "${internal?"imports":"exports"}" field module resolution of the package at ${pjsonPath}${base?` imported from ${(0,_url().fileURLToPath)(base)}`:""}.`,"DeprecationWarning","DEP0166")}function emitLegacyIndexDeprecation(url,packageJsonUrl,base,main){if(_process().noDeprecation)return;if("module"!==defaultGetFormatWithoutErrors(url,{parentURL:base.href}))return;const urlPath=(0,_url().fileURLToPath)(url.href),packagePath=(0,_url().fileURLToPath)(new(_url().URL)(".",packageJsonUrl)),basePath=(0,_url().fileURLToPath)(base);main?_path().resolve(packagePath,main)!==urlPath&&_process().emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):_process().emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function tryStatSync(path){try{return(0,_fs().statSync)(path)}catch(_unused2){}}function fileExists(url){const stats=(0,_fs().statSync)(url,{throwIfNoEntry:!1}),isFile=stats?stats.isFile():void 0;return null!=isFile&&isFile}function legacyMainResolve(packageJsonUrl,packageConfig,base){let guess;if(void 0!==packageConfig.main){if(guess=new(_url().URL)(packageConfig.main,packageJsonUrl),fileExists(guess))return guess;const tries=[`./${packageConfig.main}.js`,`./${packageConfig.main}.json`,`./${packageConfig.main}.node`,`./${packageConfig.main}/index.js`,`./${packageConfig.main}/index.json`,`./${packageConfig.main}/index.node`];let i=-1;for(;++isubpath):target+subpath,packageJsonUrl,conditions)}}throw invalidPackageTarget(match,target,packageJsonUrl,internal,base)}if(null!==invalidSegmentRegEx.exec(target.slice(2))){if(null!==deprecatedInvalidSegmentRegEx.exec(target.slice(2)))throw invalidPackageTarget(match,target,packageJsonUrl,internal,base);if(!isPathMap){const request=pattern?match.replace("*",()=>subpath):match+subpath;emitInvalidSegmentDeprecation(pattern?RegExpPrototypeSymbolReplace.call(patternRegEx,target,()=>subpath):target,request,match,packageJsonUrl,internal,base,!0)}}const resolved=new(_url().URL)(target,packageJsonUrl),resolvedPath=resolved.pathname,packagePath=new(_url().URL)(".",packageJsonUrl).pathname;if(!resolvedPath.startsWith(packagePath))throw invalidPackageTarget(match,target,packageJsonUrl,internal,base);if(""===subpath)return resolved;if(null!==invalidSegmentRegEx.exec(subpath)){const request=pattern?match.replace("*",()=>subpath):match+subpath;if(null===deprecatedInvalidSegmentRegEx.exec(subpath)){if(!isPathMap){emitInvalidSegmentDeprecation(pattern?RegExpPrototypeSymbolReplace.call(patternRegEx,target,()=>subpath):target,request,match,packageJsonUrl,internal,base,!1)}}else!function(request,match,packageJsonUrl,internal,base){const reason=`request is not a valid match in pattern "${match}" for the "${internal?"imports":"exports"}" resolution of ${(0,_url().fileURLToPath)(packageJsonUrl)}`;throw new ERR_INVALID_MODULE_SPECIFIER(request,reason,base&&(0,_url().fileURLToPath)(base))}(request,match,packageJsonUrl,internal,base)}return pattern?new(_url().URL)(RegExpPrototypeSymbolReplace.call(patternRegEx,resolved.href,()=>subpath)):new(_url().URL)(subpath,resolved)}function isArrayIndex(key){const keyNumber=Number(key);return`${keyNumber}`===key&&(keyNumber>=0&&keyNumber<4294967295)}function resolvePackageTarget(packageJsonUrl,target,subpath,packageSubpath,base,pattern,internal,isPathMap,conditions){if("string"==typeof target)return resolvePackageTargetString(target,subpath,packageSubpath,packageJsonUrl,base,pattern,internal,isPathMap,conditions);if(Array.isArray(target)){const targetList=target;if(0===targetList.length)return null;let lastException,i=-1;for(;++i=key.length&&packageSubpath.endsWith(patternTrailer)&&1===patternKeyCompare(bestMatch,key)&&key.lastIndexOf("*")===patternIndex&&(bestMatch=key,bestMatchSubpath=packageSubpath.slice(patternIndex,packageSubpath.length-patternTrailer.length))}}if(bestMatch){const resolveResult=resolvePackageTarget(packageJsonUrl,exports[bestMatch],bestMatchSubpath,bestMatch,base,!0,!1,packageSubpath.endsWith("/"),conditions);if(null==resolveResult)throw exportsNotFound(packageSubpath,packageJsonUrl,base);return resolveResult}throw exportsNotFound(packageSubpath,packageJsonUrl,base)}function patternKeyCompare(a,b){const aPatternIndex=a.indexOf("*"),bPatternIndex=b.indexOf("*"),baseLengthA=-1===aPatternIndex?a.length:aPatternIndex+1,baseLengthB=-1===bPatternIndex?b.length:bPatternIndex+1;return baseLengthA>baseLengthB?-1:baseLengthB>baseLengthA||-1===aPatternIndex?1:-1===bPatternIndex||a.length>b.length?-1:b.length>a.length?1:0}function packageImportsResolve(name,base,conditions){if("#"===name||name.startsWith("#/")||name.endsWith("/")){throw new ERR_INVALID_MODULE_SPECIFIER(name,"is not a valid internal imports specifier name",(0,_url().fileURLToPath)(base))}let packageJsonUrl;const packageConfig=getPackageScopeConfig(base);if(packageConfig.exists){packageJsonUrl=(0,_url().pathToFileURL)(packageConfig.pjsonPath);const imports=packageConfig.imports;if(imports)if(own.call(imports,name)&&!name.includes("*")){const resolveResult=resolvePackageTarget(packageJsonUrl,imports[name],"",name,base,!1,!0,!1,conditions);if(null!=resolveResult)return resolveResult}else{let bestMatch="",bestMatchSubpath="";const keys=Object.getOwnPropertyNames(imports);let i=-1;for(;++i=key.length&&name.endsWith(patternTrailer)&&1===patternKeyCompare(bestMatch,key)&&key.lastIndexOf("*")===patternIndex&&(bestMatch=key,bestMatchSubpath=name.slice(patternIndex,name.length-patternTrailer.length))}}if(bestMatch){const resolveResult=resolvePackageTarget(packageJsonUrl,imports[bestMatch],bestMatchSubpath,bestMatch,base,!0,!0,!1,conditions);if(null!=resolveResult)return resolveResult}}}throw function(specifier,packageJsonUrl,base){return new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier,packageJsonUrl&&(0,_url().fileURLToPath)(new(_url().URL)(".",packageJsonUrl)),(0,_url().fileURLToPath)(base))}(name,packageJsonUrl,base)}function packageResolve(specifier,base,conditions){if(_module().builtinModules.includes(specifier))return new(_url().URL)("node:"+specifier);const{packageName,packageSubpath,isScoped}=function(specifier,base){let separatorIndex=specifier.indexOf("/"),validPackageName=!0,isScoped=!1;"@"===specifier[0]&&(isScoped=!0,-1===separatorIndex||0===specifier.length?validPackageName=!1:separatorIndex=specifier.indexOf("/",separatorIndex+1));const packageName=-1===separatorIndex?specifier:specifier.slice(0,separatorIndex);if(null!==invalidPackageNameRegEx.exec(packageName)&&(validPackageName=!1),!validPackageName)throw new ERR_INVALID_MODULE_SPECIFIER(specifier,"is not a valid package name",(0,_url().fileURLToPath)(base));return{packageName,packageSubpath:"."+(-1===separatorIndex?"":specifier.slice(separatorIndex)),isScoped}}(specifier,base),packageConfig=getPackageScopeConfig(base);if(packageConfig.exists){const packageJsonUrl=(0,_url().pathToFileURL)(packageConfig.pjsonPath);if(packageConfig.name===packageName&&void 0!==packageConfig.exports&&null!==packageConfig.exports)return packageExportsResolve(packageJsonUrl,packageSubpath,packageConfig,base,conditions)}let lastPath,packageJsonUrl=new(_url().URL)("./node_modules/"+packageName+"/package.json",base),packageJsonPath=(0,_url().fileURLToPath)(packageJsonUrl);do{const stat=tryStatSync(packageJsonPath.slice(0,-13));if(!stat||!stat.isDirectory()){lastPath=packageJsonPath,packageJsonUrl=new(_url().URL)((isScoped?"../../../../node_modules/":"../../../node_modules/")+packageName+"/package.json",packageJsonUrl),packageJsonPath=(0,_url().fileURLToPath)(packageJsonUrl);continue}const packageConfig=read(packageJsonPath,{base,specifier});return void 0!==packageConfig.exports&&null!==packageConfig.exports?packageExportsResolve(packageJsonUrl,packageSubpath,packageConfig,base,conditions):"."===packageSubpath?legacyMainResolve(packageJsonUrl,packageConfig,base):new(_url().URL)(packageSubpath,packageJsonUrl)}while(packageJsonPath.length!==lastPath.length);throw new ERR_MODULE_NOT_FOUND(packageName,(0,_url().fileURLToPath)(base),!1)}function shouldBeTreatedAsRelativeOrAbsolutePath(specifier){return""!==specifier&&("/"===specifier[0]||function(specifier){if("."===specifier[0]){if(1===specifier.length||"/"===specifier[1])return!0;if("."===specifier[1]&&(2===specifier.length||"/"===specifier[2]))return!0}return!1}(specifier))}function moduleResolve(specifier,base,conditions,preserveSymlinks){const protocol=base.protocol,isRemote="data:"===protocol||"http:"===protocol||"https:"===protocol;let resolved;if(shouldBeTreatedAsRelativeOrAbsolutePath(specifier))try{resolved=new(_url().URL)(specifier,base)}catch(error_){const error=new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier,base);throw error.cause=error_,error}else if("file:"===protocol&&"#"===specifier[0])resolved=packageImportsResolve(specifier,base,conditions);else try{resolved=new(_url().URL)(specifier)}catch(error_){if(isRemote&&!_module().builtinModules.includes(specifier)){const error=new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier,base);throw error.cause=error_,error}resolved=packageResolve(specifier,base,conditions)}return _assert()(void 0!==resolved,"expected to be defined"),"file:"!==resolved.protocol?resolved:function(resolved,base,preserveSymlinks){if(null!==encodedSeparatorRegEx.exec(resolved.pathname))throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname,'must not include encoded "/" or "\\" characters',(0,_url().fileURLToPath)(base));let filePath;try{filePath=(0,_url().fileURLToPath)(resolved)}catch(error){const cause=error;throw Object.defineProperty(cause,"input",{value:String(resolved)}),Object.defineProperty(cause,"module",{value:String(base)}),cause}const stats=tryStatSync(filePath.endsWith("/")?filePath.slice(-1):filePath);if(stats&&stats.isDirectory()){const error=new ERR_UNSUPPORTED_DIR_IMPORT(filePath,(0,_url().fileURLToPath)(base));throw error.url=String(resolved),error}if(!stats||!stats.isFile()){const error=new ERR_MODULE_NOT_FOUND(filePath||resolved.pathname,base&&(0,_url().fileURLToPath)(base),!0);throw error.url=String(resolved),error}if(!preserveSymlinks){const real=(0,_fs().realpathSync)(filePath),{search,hash}=resolved;(resolved=(0,_url().pathToFileURL)(real+(filePath.endsWith(_path().sep)?"/":""))).search=search,resolved.hash=hash}return resolved}(resolved,base,preserveSymlinks)}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/buffer.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default=class{constructor(map,indentChar){this._map=null,this._buf="",this._str="",this._appendCount=0,this._last=0,this._queue=[],this._queueCursor=0,this._canMarkIdName=!0,this._indentChar="",this._fastIndentations=[],this._position={line:1,column:0},this._sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0},this._map=map,this._indentChar=indentChar;for(let i=0;i<64;i++)this._fastIndentations.push(indentChar.repeat(i));this._allocQueue()}_allocQueue(){const queue=this._queue;for(let i=0;i<16;i++)queue.push({char:0,repeat:1,line:void 0,column:void 0,identifierName:void 0,identifierNamePos:void 0,filename:""})}_pushQueue(char,repeat,line,column,filename){const cursor=this._queueCursor;cursor===this._queue.length&&this._allocQueue();const item=this._queue[cursor];item.char=char,item.repeat=repeat,item.line=line,item.column=column,item.filename=filename,this._queueCursor++}_popQueue(){if(0===this._queueCursor)throw new Error("Cannot pop from empty queue");return this._queue[--this._queueCursor]}get(){this._flush();const map=this._map,result={code:(this._buf+this._str).trimRight(),decodedMap:null==map?void 0:map.getDecoded(),get __mergedMap(){return this.map},get map(){const resultMap=map?map.get():null;return result.map=resultMap,resultMap},set map(value){Object.defineProperty(result,"map",{value,writable:!0})},get rawMappings(){const mappings=null==map?void 0:map.getRawMappings();return result.rawMappings=mappings,mappings},set rawMappings(value){Object.defineProperty(result,"rawMappings",{value,writable:!0})}};return result}append(str,maybeNewline){this._flush(),this._append(str,this._sourcePosition,maybeNewline)}appendChar(char){this._flush(),this._appendChar(char,1,this._sourcePosition)}queue(char){if(10===char)for(;0!==this._queueCursor;){const char=this._queue[this._queueCursor-1].char;if(32!==char&&9!==char)break;this._queueCursor--}const sourcePosition=this._sourcePosition;this._pushQueue(char,1,sourcePosition.line,sourcePosition.column,sourcePosition.filename)}queueIndentation(repeat){0!==repeat&&this._pushQueue(-1,repeat,void 0,void 0,void 0)}_flush(){const queueCursor=this._queueCursor,queue=this._queue;for(let i=0;i1?this._indentChar.repeat(repeat):this._indentChar}else this._str+=repeat>1?String.fromCharCode(char).repeat(repeat):String.fromCharCode(char);10!==char?(this._mark(sourcePos.line,sourcePos.column,sourcePos.identifierName,sourcePos.identifierNamePos,sourcePos.filename),this._position.column+=repeat):(this._position.line++,this._position.column=0),this._canMarkIdName&&(sourcePos.identifierName=void 0,sourcePos.identifierNamePos=void 0)}_append(str,sourcePos,maybeNewline){const len=str.length,position=this._position;if(this._last=str.charCodeAt(len-1),++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=str,this._appendCount=0):this._str+=str,!maybeNewline&&!this._map)return void(position.column+=len);const{column,identifierName,identifierNamePos,filename}=sourcePos;let line=sourcePos.line;null==identifierName&&null==identifierNamePos||!this._canMarkIdName||(sourcePos.identifierName=void 0,sourcePos.identifierNamePos=void 0);let i=str.indexOf("\n"),last=0;for(0!==i&&this._mark(line,column,identifierName,identifierNamePos,filename);-1!==i;)position.line++,position.column=0,last=i+1,last=0&&10===this._queue[i].char;i--)count++;return count===queueCursor&&10===this._last?count+1:count}endsWithCharAndNewline(){const queue=this._queue,queueCursor=this._queueCursor;if(0!==queueCursor){if(10!==queue[queueCursor-1].char)return;return queueCursor>1?queue[queueCursor-2].char:this._last}}hasContent(){return 0!==this._queueCursor||!!this._last}exactSource(loc,cb){if(!this._map)return void cb();this.source("start",loc);const identifierName=loc.identifierName,sourcePos=this._sourcePosition;identifierName&&(this._canMarkIdName=!1,sourcePos.identifierName=identifierName),cb(),identifierName&&(this._canMarkIdName=!0,sourcePos.identifierName=void 0,sourcePos.identifierNamePos=void 0),this.source("end",loc)}source(prop,loc){this._map&&this._normalizePosition(prop,loc,0)}sourceWithOffset(prop,loc,columnOffset){this._map&&this._normalizePosition(prop,loc,columnOffset)}_normalizePosition(prop,loc,columnOffset){const pos=loc[prop],target=this._sourcePosition;pos&&(target.line=pos.line,target.column=Math.max(pos.column+columnOffset,0),target.filename=loc.filename)}getCurrentColumn(){const queue=this._queue,queueCursor=this._queueCursor;let lastIndex=-1,len=0;for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BlockStatement=function(node){var _node$directives2;this.tokenChar(123);const exit=this.enterDelimited(),directivesLen=null==(_node$directives2=node.directives)?void 0:_node$directives2.length;if(directivesLen){var _node$directives$trai2;const newline=node.body.length?2:1;this.printSequence(node.directives,!0,newline),null!=(_node$directives$trai2=node.directives[directivesLen-1].trailingComments)&&_node$directives$trai2.length||this.newline(newline)}this.printSequence(node.body,!0),exit(),this.rightBrace(node)},exports.Directive=function(node){this.print(node.value),this.semicolon()},exports.DirectiveLiteral=function(node){const raw=this.getPossibleRaw(node);if(!this.format.minified&&void 0!==raw)return void this.token(raw);const{value}=node;if(unescapedDoubleQuoteRE.test(value)){if(unescapedSingleQuoteRE.test(value))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${value}'`)}else this.token(`"${value}"`)},exports.File=function(node){node.program&&this.print(node.program.interpreter);this.print(node.program)},exports.InterpreterDirective=function(node){this.token(`#!${node.value}`),this.newline(1,!0)},exports.Placeholder=function(node){this.token("%%"),this.print(node.name),this.token("%%"),"Statement"===node.expectedNode&&this.semicolon()},exports.Program=function(node){var _node$directives;this.noIndentInnerCommentsHere(),this.printInnerComments();const directivesLen=null==(_node$directives=node.directives)?void 0:_node$directives.length;if(directivesLen){var _node$directives$trai;const newline=node.body.length?2:1;this.printSequence(node.directives,void 0,newline),null!=(_node$directives$trai=node.directives[directivesLen-1].trailingComments)&&_node$directives$trai.length||this.newline(newline)}this.printSequence(node.body)};const unescapedSingleQuoteRE=/(?:^|[^\\])(?:\\\\)*'/,unescapedDoubleQuoteRE=/(?:^|[^\\])(?:\\\\)*"/},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/classes.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ClassAccessorProperty=function(node){var _node$key$loc2;this.printJoin(node.decorators);const endLine=null==(_node$key$loc2=node.key.loc)||null==(_node$key$loc2=_node$key$loc2.end)?void 0:_node$key$loc2.line;endLine&&this.catchUp(endLine);this.tsPrintClassMemberModifiers(node),this.word("accessor",!0),this.space(),node.computed?(this.tokenChar(91),this.print(node.key),this.tokenChar(93)):(this._variance(node),this.print(node.key));node.optional&&this.tokenChar(63);node.definite&&this.tokenChar(33);this.print(node.typeAnnotation),node.value&&(this.space(),this.tokenChar(61),this.space(),this.print(node.value));this.semicolon()},exports.ClassBody=function(node){if(this.tokenChar(123),0===node.body.length)this.tokenChar(125);else{this.newline();const separator=function(printer,node){if(!printer.tokenMap||null==node.start||null==node.end)return null;const indexes=printer.tokenMap.getIndexes(node);if(!indexes)return null;let k=1,occurrenceCount=0,nextLocIndex=0;const advanceNextLocIndex=()=>{for(;nextLocIndex{nextLocIndex<=i&&(nextLocIndex=i+1,advanceNextLocIndex());const end=nextLocIndex===node.body.length?node.end:node.body[nextLocIndex].start;let tok;for(;k{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDeprecatedGenerators=function(PrinterClass){{const deprecatedBabel7Generators={Noop(){},TSExpressionWithTypeArguments(node){this.print(node.expression),this.print(node.typeParameters)},DecimalLiteral(node){const raw=this.getPossibleRaw(node);this.format.minified||void 0===raw?this.word(node.value+"m"):this.word(raw)}};Object.assign(PrinterClass.prototype,deprecatedBabel7Generators)}}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/expressions.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LogicalExpression=exports.BinaryExpression=exports.AssignmentExpression=function(node){this.print(node.left),this.space(),"in"===node.operator||"instanceof"===node.operator?this.word(node.operator):(this.token(node.operator),this._endsWithDiv="/"===node.operator);this.space(),this.print(node.right)},exports.AssignmentPattern=function(node){this.print(node.left),("Identifier"===node.left.type||isPattern(node.left))&&(node.left.optional&&this.tokenChar(63),this.print(node.left.typeAnnotation));this.space(),this.tokenChar(61),this.space(),this.print(node.right)},exports.AwaitExpression=function(node){this.word("await"),this.space(),this.print(node.argument)},exports.BindExpression=function(node){this.print(node.object),this.token("::"),this.print(node.callee)},exports.CallExpression=function(node){this.print(node.callee),this.print(node.typeArguments),this.print(node.typeParameters),this.tokenChar(40);const exit=this.enterDelimited();this.printList(node.arguments,this.shouldPrintTrailingComma(")")),exit(),this.rightParens(node)},exports.ConditionalExpression=function(node){this.print(node.test),this.space(),this.tokenChar(63),this.space(),this.print(node.consequent),this.space(),this.tokenChar(58),this.space(),this.print(node.alternate)},exports.Decorator=function(node){this.tokenChar(64),this.print(node.expression),this.newline()},exports.DoExpression=function(node){node.async&&(this.word("async",!0),this.space());this.word("do"),this.space(),this.print(node.body)},exports.EmptyStatement=function(){this.semicolon(!0)},exports.ExpressionStatement=function(node){this.tokenContext|=_index.TokenContext.expressionStatement,this.print(node.expression),this.semicolon()},exports.Import=function(){this.word("import")},exports.MemberExpression=function(node){if(this.print(node.object),!node.computed&&isMemberExpression(node.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let computed=node.computed;isLiteral(node.property)&&"number"==typeof node.property.value&&(computed=!0);if(computed){const exit=this.enterDelimited();this.tokenChar(91),this.print(node.property),this.tokenChar(93),exit()}else this.tokenChar(46),this.print(node.property)},exports.MetaProperty=function(node){this.print(node.meta),this.tokenChar(46),this.print(node.property)},exports.ModuleExpression=function(node){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();const{body}=node;(body.body.length||body.directives.length)&&this.newline();this.print(body),this.dedent(),this.rightBrace(node)},exports.NewExpression=function(node,parent){if(this.word("new"),this.space(),this.print(node.callee),this.format.minified&&0===node.arguments.length&&!node.optional&&!isCallExpression(parent,{callee:node})&&!isMemberExpression(parent)&&!isNewExpression(parent))return;this.print(node.typeArguments),this.print(node.typeParameters),node.optional&&this.token("?.");if(0===node.arguments.length&&this.tokenMap&&!this.tokenMap.endMatches(node,")"))return;this.tokenChar(40);const exit=this.enterDelimited();this.printList(node.arguments,this.shouldPrintTrailingComma(")")),exit(),this.rightParens(node)},exports.OptionalCallExpression=function(node){this.print(node.callee),this.print(node.typeParameters),node.optional&&this.token("?.");this.print(node.typeArguments),this.tokenChar(40);const exit=this.enterDelimited();this.printList(node.arguments),exit(),this.rightParens(node)},exports.OptionalMemberExpression=function(node){let{computed}=node;const{optional,property}=node;if(this.print(node.object),!computed&&isMemberExpression(property))throw new TypeError("Got a MemberExpression for MemberExpression property");isLiteral(property)&&"number"==typeof property.value&&(computed=!0);optional&&this.token("?.");computed?(this.tokenChar(91),this.print(property),this.tokenChar(93)):(optional||this.tokenChar(46),this.print(property))},exports.ParenthesizedExpression=function(node){this.tokenChar(40);const exit=this.enterDelimited();this.print(node.expression),exit(),this.rightParens(node)},exports.PrivateName=function(node){this.tokenChar(35),this.print(node.id)},exports.SequenceExpression=function(node){this.printList(node.expressions)},exports.Super=function(){this.word("super")},exports.ThisExpression=function(){this.word("this")},exports.UnaryExpression=function(node){const{operator}=node;"void"===operator||"delete"===operator||"typeof"===operator||"throw"===operator?(this.word(operator),this.space()):this.token(operator);this.print(node.argument)},exports.UpdateExpression=function(node){node.prefix?(this.token(node.operator),this.print(node.argument)):(this.print(node.argument,!0),this.token(node.operator))},exports.V8IntrinsicIdentifier=function(node){this.tokenChar(37),this.word(node.name)},exports.YieldExpression=function(node){node.delegate?(this.word("yield",!0),this.tokenChar(42),node.argument&&(this.space(),this.print(node.argument))):node.argument?(this.word("yield",!0),this.space(),this.print(node.argument)):this.word("yield")},exports._shouldPrintDecoratorsBeforeExport=function(node){if("boolean"==typeof this.format.decoratorsBeforeExport)return this.format.decoratorsBeforeExport;return"number"==typeof node.start&&node.start===node.declaration.start};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js");const{isCallExpression,isLiteral,isMemberExpression,isNewExpression,isPattern}=_t},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/flow.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnyTypeAnnotation=function(){this.word("any")},exports.ArrayTypeAnnotation=function(node){this.print(node.elementType,!0),this.tokenChar(91),this.tokenChar(93)},exports.BooleanLiteralTypeAnnotation=function(node){this.word(node.value?"true":"false")},exports.BooleanTypeAnnotation=function(){this.word("boolean")},exports.DeclareClass=function(node,parent){isDeclareExportDeclaration(parent)||(this.word("declare"),this.space());this.word("class"),this.space(),this._interfaceish(node)},exports.DeclareExportAllDeclaration=function(node){this.word("declare"),this.space(),_modules.ExportAllDeclaration.call(this,node)},exports.DeclareExportDeclaration=function(node){this.word("declare"),this.space(),this.word("export"),this.space(),node.default&&(this.word("default"),this.space());FlowExportDeclaration.call(this,node)},exports.DeclareFunction=function(node,parent){isDeclareExportDeclaration(parent)||(this.word("declare"),this.space());this.word("function"),this.space(),this.print(node.id),this.print(node.id.typeAnnotation.typeAnnotation),node.predicate&&(this.space(),this.print(node.predicate));this.semicolon()},exports.DeclareInterface=function(node){this.word("declare"),this.space(),this.InterfaceDeclaration(node)},exports.DeclareModule=function(node){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(node.id),this.space(),this.print(node.body)},exports.DeclareModuleExports=function(node){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(node.typeAnnotation)},exports.DeclareOpaqueType=function(node,parent){isDeclareExportDeclaration(parent)||(this.word("declare"),this.space());this.OpaqueType(node)},exports.DeclareTypeAlias=function(node){this.word("declare"),this.space(),this.TypeAlias(node)},exports.DeclareVariable=function(node,parent){isDeclareExportDeclaration(parent)||(this.word("declare"),this.space());this.word("var"),this.space(),this.print(node.id),this.print(node.id.typeAnnotation),this.semicolon()},exports.DeclaredPredicate=function(node){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(node.value),this.tokenChar(41)},exports.EmptyTypeAnnotation=function(){this.word("empty")},exports.EnumBooleanBody=function(node){const{explicitType}=node;enumExplicitType(this,"boolean",explicitType),enumBody(this,node)},exports.EnumBooleanMember=function(node){enumInitializedMember(this,node)},exports.EnumDeclaration=function(node){const{id,body}=node;this.word("enum"),this.space(),this.print(id),this.print(body)},exports.EnumDefaultedMember=function(node){const{id}=node;this.print(id),this.tokenChar(44)},exports.EnumNumberBody=function(node){const{explicitType}=node;enumExplicitType(this,"number",explicitType),enumBody(this,node)},exports.EnumNumberMember=function(node){enumInitializedMember(this,node)},exports.EnumStringBody=function(node){const{explicitType}=node;enumExplicitType(this,"string",explicitType),enumBody(this,node)},exports.EnumStringMember=function(node){enumInitializedMember(this,node)},exports.EnumSymbolBody=function(node){enumExplicitType(this,"symbol",!0),enumBody(this,node)},exports.ExistsTypeAnnotation=function(){this.tokenChar(42)},exports.FunctionTypeAnnotation=function(node,parent){this.print(node.typeParameters),this.tokenChar(40),node.this&&(this.word("this"),this.tokenChar(58),this.space(),this.print(node.this.typeAnnotation),(node.params.length||node.rest)&&(this.tokenChar(44),this.space()));this.printList(node.params),node.rest&&(node.params.length&&(this.tokenChar(44),this.space()),this.token("..."),this.print(node.rest));this.tokenChar(41);const type=null==parent?void 0:parent.type;null!=type&&("ObjectTypeCallProperty"===type||"ObjectTypeInternalSlot"===type||"DeclareFunction"===type||"ObjectTypeProperty"===type&&parent.method)?this.tokenChar(58):(this.space(),this.token("=>"));this.space(),this.print(node.returnType)},exports.FunctionTypeParam=function(node){this.print(node.name),node.optional&&this.tokenChar(63);node.name&&(this.tokenChar(58),this.space());this.print(node.typeAnnotation)},exports.IndexedAccessType=function(node){this.print(node.objectType,!0),this.tokenChar(91),this.print(node.indexType),this.tokenChar(93)},exports.InferredPredicate=function(){this.tokenChar(37),this.word("checks")},exports.InterfaceDeclaration=function(node){this.word("interface"),this.space(),this._interfaceish(node)},exports.GenericTypeAnnotation=exports.ClassImplements=exports.InterfaceExtends=function(node){this.print(node.id),this.print(node.typeParameters,!0)},exports.InterfaceTypeAnnotation=function(node){var _node$extends2;this.word("interface"),null!=(_node$extends2=node.extends)&&_node$extends2.length&&(this.space(),this.word("extends"),this.space(),this.printList(node.extends));this.space(),this.print(node.body)},exports.IntersectionTypeAnnotation=function(node){this.printJoin(node.types,void 0,void 0,andSeparator)},exports.MixedTypeAnnotation=function(){this.word("mixed")},exports.NullLiteralTypeAnnotation=function(){this.word("null")},exports.NullableTypeAnnotation=function(node){this.tokenChar(63),this.print(node.typeAnnotation)},Object.defineProperty(exports,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return _types2.NumericLiteral}}),exports.NumberTypeAnnotation=function(){this.word("number")},exports.ObjectTypeAnnotation=function(node){node.exact?this.token("{|"):this.tokenChar(123);const props=[...node.properties,...node.callProperties||[],...node.indexers||[],...node.internalSlots||[]];props.length&&(this.newline(),this.space(),this.printJoin(props,!0,!0,void 0,void 0,function(leading){if(leading&&!props[0])return 1},()=>{(1!==props.length||node.inexact)&&(this.tokenChar(44),this.space())}),this.space());node.inexact&&(this.indent(),this.token("..."),props.length&&this.newline(),this.dedent());node.exact?this.token("|}"):this.tokenChar(125)},exports.ObjectTypeCallProperty=function(node){node.static&&(this.word("static"),this.space());this.print(node.value)},exports.ObjectTypeIndexer=function(node){node.static&&(this.word("static"),this.space());this._variance(node),this.tokenChar(91),node.id&&(this.print(node.id),this.tokenChar(58),this.space());this.print(node.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(node.value)},exports.ObjectTypeInternalSlot=function(node){node.static&&(this.word("static"),this.space());this.tokenChar(91),this.tokenChar(91),this.print(node.id),this.tokenChar(93),this.tokenChar(93),node.optional&&this.tokenChar(63);node.method||(this.tokenChar(58),this.space());this.print(node.value)},exports.ObjectTypeProperty=function(node){node.proto&&(this.word("proto"),this.space());node.static&&(this.word("static"),this.space());"get"!==node.kind&&"set"!==node.kind||(this.word(node.kind),this.space());this._variance(node),this.print(node.key),node.optional&&this.tokenChar(63);node.method||(this.tokenChar(58),this.space());this.print(node.value)},exports.ObjectTypeSpreadProperty=function(node){this.token("..."),this.print(node.argument)},exports.OpaqueType=function(node){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(node.id),this.print(node.typeParameters),node.supertype&&(this.tokenChar(58),this.space(),this.print(node.supertype));node.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(node.impltype));this.semicolon()},exports.OptionalIndexedAccessType=function(node){this.print(node.objectType),node.optional&&this.token("?.");this.tokenChar(91),this.print(node.indexType),this.tokenChar(93)},exports.QualifiedTypeIdentifier=function(node){this.print(node.qualification),this.tokenChar(46),this.print(node.id)},Object.defineProperty(exports,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return _types2.StringLiteral}}),exports.StringTypeAnnotation=function(){this.word("string")},exports.SymbolTypeAnnotation=function(){this.word("symbol")},exports.ThisTypeAnnotation=function(){this.word("this")},exports.TupleTypeAnnotation=function(node){this.tokenChar(91),this.printList(node.types),this.tokenChar(93)},exports.TypeAlias=function(node){this.word("type"),this.space(),this.print(node.id),this.print(node.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(node.right),this.semicolon()},exports.TypeAnnotation=function(node,parent){this.tokenChar(58),this.space(),"ArrowFunctionExpression"===parent.type?this.tokenContext|=_index.TokenContext.arrowFlowReturnType:node.optional&&this.tokenChar(63);this.print(node.typeAnnotation)},exports.TypeCastExpression=function(node){this.tokenChar(40),this.print(node.expression),this.print(node.typeAnnotation),this.tokenChar(41)},exports.TypeParameter=function(node){this._variance(node),this.word(node.name),node.bound&&this.print(node.bound);node.default&&(this.space(),this.tokenChar(61),this.space(),this.print(node.default))},exports.TypeParameterDeclaration=exports.TypeParameterInstantiation=function(node){this.tokenChar(60),this.printList(node.params),this.tokenChar(62)},exports.TypeofTypeAnnotation=function(node){this.word("typeof"),this.space(),this.print(node.argument)},exports.UnionTypeAnnotation=function(node){this.printJoin(node.types,void 0,void 0,orSeparator)},exports.Variance=function(node){"plus"===node.kind?this.tokenChar(43):this.tokenChar(45)},exports.VoidTypeAnnotation=function(){this.word("void")},exports._interfaceish=function(node){var _node$extends;this.print(node.id),this.print(node.typeParameters),null!=(_node$extends=node.extends)&&_node$extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(node.extends));if("DeclareClass"===node.type){var _node$mixins,_node$implements;null!=(_node$mixins=node.mixins)&&_node$mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(node.mixins)),null!=(_node$implements=node.implements)&&_node$implements.length&&(this.space(),this.word("implements"),this.space(),this.printList(node.implements))}this.space(),this.print(node.body)},exports._variance=function(node){var _node$variance;const kind=null==(_node$variance=node.variance)?void 0:_node$variance.kind;null!=kind&&("plus"===kind?this.tokenChar(43):"minus"===kind&&this.tokenChar(45))};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_modules=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/modules.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js"),_types2=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/types.js");const{isDeclareExportDeclaration,isStatement}=_t;function enumExplicitType(context,name,hasExplicitType){hasExplicitType&&(context.space(),context.word("of"),context.space(),context.word(name)),context.space()}function enumBody(context,node){const{members}=node;context.token("{"),context.indent(),context.newline();for(const member of members)context.print(member),context.newline();node.hasUnknownMembers&&(context.token("..."),context.newline()),context.dedent(),context.token("}")}function enumInitializedMember(context,node){context.print(node.id),context.space(),context.token("="),context.space(),context.print(node.init),context.token(",")}function FlowExportDeclaration(node){if(node.declaration){const declar=node.declaration;this.print(declar),isStatement(declar)||this.semicolon()}else this.tokenChar(123),node.specifiers.length&&(this.space(),this.printList(node.specifiers),this.space()),this.tokenChar(125),node.source&&(this.space(),this.word("from"),this.space(),this.print(node.source)),this.semicolon()}function andSeparator(occurrenceCount){this.space(),this.token("&",!1,occurrenceCount),this.space()}function orSeparator(occurrenceCount){this.space(),this.token("|",!1,occurrenceCount),this.space()}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _templateLiterals=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/template-literals.js");Object.keys(_templateLiterals).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_templateLiterals[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _templateLiterals[key]}}))});var _expressions=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/expressions.js");Object.keys(_expressions).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_expressions[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _expressions[key]}}))});var _statements=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/statements.js");Object.keys(_statements).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_statements[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _statements[key]}}))});var _classes=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/classes.js");Object.keys(_classes).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_classes[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _classes[key]}}))});var _methods=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/methods.js");Object.keys(_methods).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_methods[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _methods[key]}}))});var _modules=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/modules.js");Object.keys(_modules).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_modules[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _modules[key]}}))});var _types=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/types.js");Object.keys(_types).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_types[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _types[key]}}))});var _flow=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/flow.js");Object.keys(_flow).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_flow[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _flow[key]}}))});var _base=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/base.js");Object.keys(_base).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_base[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _base[key]}}))});var _jsx=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/jsx.js");Object.keys(_jsx).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_jsx[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _jsx[key]}}))});var _typescript=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/typescript.js");Object.keys(_typescript).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_typescript[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _typescript[key]}}))})},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/jsx.js":(__unused_webpack_module,exports)=>{"use strict";function spaceSeparator(){this.space()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSXAttribute=function(node){this.print(node.name),node.value&&(this.tokenChar(61),this.print(node.value))},exports.JSXClosingElement=function(node){this.tokenChar(60),this.tokenChar(47),this.print(node.name),this.tokenChar(62)},exports.JSXClosingFragment=function(){this.token("0&&(this.space(),this.printJoin(node.attributes,void 0,void 0,spaceSeparator));node.selfClosing&&(this.space(),this.tokenChar(47));this.tokenChar(62)},exports.JSXOpeningFragment=function(){this.tokenChar(60),this.tokenChar(62)},exports.JSXSpreadAttribute=function(node){this.tokenChar(123),this.token("..."),this.print(node.argument),this.rightBrace(node)},exports.JSXSpreadChild=function(node){this.tokenChar(123),this.token("..."),this.print(node.expression),this.rightBrace(node)},exports.JSXText=function(node){const raw=this.getPossibleRaw(node);void 0!==raw?this.token(raw,!0):this.token(node.value,!0)}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/methods.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArrowFunctionExpression=function(node,parent){node.async&&(this.word("async",!0),this.space());this._shouldPrintArrowParamsParens(node)?this._params(node,void 0,parent):this.print(node.params[0],!0);this._predicate(node,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=_index.TokenContext.arrowBody,this.print(node.body)},exports.FunctionDeclaration=exports.FunctionExpression=function(node,parent){this._functionHead(node,parent),this.space(),this.print(node.body)},exports._functionHead=function(node,parent){node.async&&(this.word("async"),this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.space());this.word("function"),node.generator&&(this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.tokenChar(42));this.space(),node.id&&this.print(node.id);this._params(node,node.id,parent),"TSDeclareFunction"!==node.type&&this._predicate(node)},exports._methodHead=function(node){const kind=node.kind,key=node.key;"get"!==kind&&"set"!==kind||(this.word(kind),this.space());node.async&&(this.word("async",!0),this.space());"method"!==kind&&"init"!==kind||node.generator&&this.tokenChar(42);node.computed?(this.tokenChar(91),this.print(key),this.tokenChar(93)):this.print(key);node.optional&&this.tokenChar(63);this._params(node,node.computed&&"StringLiteral"!==node.key.type?void 0:node.key,void 0)},exports._param=function(parameter){this.printJoin(parameter.decorators),this.print(parameter),parameter.optional&&this.tokenChar(63);this.print(parameter.typeAnnotation)},exports._parameters=function(parameters,endToken){const exit=this.enterDelimited(),trailingComma=this.shouldPrintTrailingComma(endToken),paramLength=parameters.length;for(let i=0;i");return null==(null==arrowToken?void 0:arrowToken.loc)||arrowToken.loc.start.line!==node.loc.start.line}return!!this.format.retainLines};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js");const{isIdentifier}=_t;function _getFuncIdName(idNode,parent){let nameInfo,id=idNode;if(!id&&parent){const parentType=parent.type;"VariableDeclarator"===parentType?id=parent.id:"AssignmentExpression"===parentType||"AssignmentPattern"===parentType?id=parent.left:"ObjectProperty"===parentType||"ClassProperty"===parentType?parent.computed&&"StringLiteral"!==parent.key.type||(id=parent.key):"ClassPrivateProperty"!==parentType&&"ClassAccessorProperty"!==parentType||(id=parent.key)}if(id){var _id$loc,_id$loc2;if("Identifier"===id.type)nameInfo={pos:null==(_id$loc=id.loc)?void 0:_id$loc.start,name:(null==(_id$loc2=id.loc)?void 0:_id$loc2.identifierName)||id.name};else if("PrivateName"===id.type){var _id$loc3;nameInfo={pos:null==(_id$loc3=id.loc)?void 0:_id$loc3.start,name:"#"+id.id.name}}else if("StringLiteral"===id.type){var _id$loc4;nameInfo={pos:null==(_id$loc4=id.loc)?void 0:_id$loc4.start,name:id.value}}return nameInfo}}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/modules.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExportAllDeclaration=function(node){var _node$attributes,_node$assertions;this.word("export"),this.space(),"type"===node.exportKind&&(this.word("type"),this.space());this.tokenChar(42),this.space(),this.word("from"),this.space(),null!=(_node$attributes=node.attributes)&&_node$attributes.length||null!=(_node$assertions=node.assertions)&&_node$assertions.length?(this.print(node.source,!0),this.space(),this._printAttributes(node,!1)):this.print(node.source);this.semicolon()},exports.ExportDefaultDeclaration=function(node){maybePrintDecoratorsBeforeExport(this,node),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=_index.TokenContext.exportDefault;const declar=node.declaration;this.print(declar),isStatement(declar)||this.semicolon()},exports.ExportDefaultSpecifier=function(node){this.print(node.exported)},exports.ExportNamedDeclaration=function(node){if(maybePrintDecoratorsBeforeExport(this,node),this.word("export"),this.space(),node.declaration){const declar=node.declaration;this.print(declar),isStatement(declar)||this.semicolon()}else{"type"===node.exportKind&&(this.word("type"),this.space());const specifiers=node.specifiers.slice(0);let hasSpecial=!1;for(;;){const first=specifiers[0];if(!isExportDefaultSpecifier(first)&&!isExportNamespaceSpecifier(first))break;hasSpecial=!0,this.print(specifiers.shift()),specifiers.length&&(this.tokenChar(44),this.space())}let hasBrace=!1;var _node$attributes2,_node$assertions2;if((specifiers.length||!specifiers.length&&!hasSpecial)&&(hasBrace=!0,this.tokenChar(123),specifiers.length&&(this.space(),this.printList(specifiers,this.shouldPrintTrailingComma("}")),this.space()),this.tokenChar(125)),node.source)this.space(),this.word("from"),this.space(),null!=(_node$attributes2=node.attributes)&&_node$attributes2.length||null!=(_node$assertions2=node.assertions)&&_node$assertions2.length?(this.print(node.source,!0),this.space(),this._printAttributes(node,hasBrace)):this.print(node.source);this.semicolon()}},exports.ExportNamespaceSpecifier=function(node){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(node.exported)},exports.ExportSpecifier=function(node){"type"===node.exportKind&&(this.word("type"),this.space());this.print(node.local),node.exported&&node.local.name!==node.exported.name&&(this.space(),this.word("as"),this.space(),this.print(node.exported))},exports.ImportAttribute=function(node){this.print(node.key),this.tokenChar(58),this.space(),this.print(node.value)},exports.ImportDeclaration=function(node){var _node$attributes3,_node$assertions3;this.word("import"),this.space();const isTypeKind="type"===node.importKind||"typeof"===node.importKind;isTypeKind?(this.noIndentInnerCommentsHere(),this.word(node.importKind),this.space()):node.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):node.phase&&(this.noIndentInnerCommentsHere(),this.word(node.phase),this.space());const specifiers=node.specifiers.slice(0),hasSpecifiers=!!specifiers.length;for(;hasSpecifiers;){const first=specifiers[0];if(!isImportDefaultSpecifier(first)&&!isImportNamespaceSpecifier(first))break;this.print(specifiers.shift()),specifiers.length&&(this.tokenChar(44),this.space())}let hasBrace=!1;specifiers.length?(hasBrace=!0,this.tokenChar(123),this.space(),this.printList(specifiers,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):isTypeKind&&!hasSpecifiers&&(hasBrace=!0,this.tokenChar(123),this.tokenChar(125));(hasSpecifiers||isTypeKind)&&(this.space(),this.word("from"),this.space());null!=(_node$attributes3=node.attributes)&&_node$attributes3.length||null!=(_node$assertions3=node.assertions)&&_node$assertions3.length?(this.print(node.source,!0),this.space(),this._printAttributes(node,hasBrace)):this.print(node.source);this.semicolon()},exports.ImportDefaultSpecifier=function(node){this.print(node.local)},exports.ImportExpression=function(node){this.word("import"),node.phase&&(this.tokenChar(46),this.word(node.phase));this.tokenChar(40);const shouldPrintTrailingComma=this.shouldPrintTrailingComma(")");this.print(node.source),null!=node.options&&(this.tokenChar(44),this.space(),this.print(node.options));shouldPrintTrailingComma&&this.tokenChar(44);this.rightParens(node)},exports.ImportNamespaceSpecifier=function(node){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(node.local)},exports.ImportSpecifier=function(node){"type"!==node.importKind&&"typeof"!==node.importKind||(this.word(node.importKind),this.space());this.print(node.imported),node.local&&node.local.name!==node.imported.name&&(this.space(),this.word("as"),this.space(),this.print(node.local))},exports._printAttributes=function(node,hasPreviousBrace){var _node$extra;const{importAttributesKeyword}=this.format,{attributes,assertions}=node;attributes&&!importAttributesKeyword&&node.extra&&(node.extra.deprecatedAssertSyntax||node.extra.deprecatedWithLegacySyntax)&&!warningShown&&(warningShown=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));const useAssertKeyword="assert"===importAttributesKeyword||!importAttributesKeyword&&assertions;if(this.word(useAssertKeyword?"assert":"with"),this.space(),!useAssertKeyword&&("with-legacy"===importAttributesKeyword||!importAttributesKeyword&&null!=(_node$extra=node.extra)&&_node$extra.deprecatedWithLegacySyntax))return void this.printList(attributes||assertions);const occurrenceCount=hasPreviousBrace?1:0;this.token("{",null,occurrenceCount),this.space(),this.printList(attributes||assertions,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",null,occurrenceCount)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js");const{isClassDeclaration,isExportDefaultSpecifier,isExportNamespaceSpecifier,isImportDefaultSpecifier,isImportNamespaceSpecifier,isStatement}=_t;let warningShown=!1;function maybePrintDecoratorsBeforeExport(printer,node){isClassDeclaration(node.declaration)&&printer._shouldPrintDecoratorsBeforeExport(node)&&printer.printJoin(node.declaration.decorators)}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/statements.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BreakStatement=function(node){this.word("break"),printStatementAfterKeyword(this,node.label)},exports.CatchClause=function(node){this.word("catch"),this.space(),node.param&&(this.tokenChar(40),this.print(node.param),this.print(node.param.typeAnnotation),this.tokenChar(41),this.space());this.print(node.body)},exports.ContinueStatement=function(node){this.word("continue"),printStatementAfterKeyword(this,node.label)},exports.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},exports.DoWhileStatement=function(node){this.word("do"),this.space(),this.print(node.body),this.space(),this.word("while"),this.space(),this.tokenChar(40),this.print(node.test),this.tokenChar(41),this.semicolon()},exports.ForOfStatement=exports.ForInStatement=void 0,exports.ForStatement=function(node){this.word("for"),this.space(),this.tokenChar(40);{const exit=this.enterForStatementInit();this.print(node.init),exit()}this.tokenChar(59),node.test&&(this.space(),this.print(node.test));this.token(";",!1,1),node.update&&(this.space(),this.print(node.update));this.tokenChar(41),this.printBlock(node)},exports.IfStatement=function(node){this.word("if"),this.space(),this.tokenChar(40),this.print(node.test),this.tokenChar(41),this.space();const needsBlock=node.alternate&&isIfStatement(getLastStatement(node.consequent));needsBlock&&(this.tokenChar(123),this.newline(),this.indent());this.printAndIndentOnComments(node.consequent),needsBlock&&(this.dedent(),this.newline(),this.tokenChar(125));node.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(node.alternate))},exports.LabeledStatement=function(node){this.print(node.label),this.tokenChar(58),this.space(),this.print(node.body)},exports.ReturnStatement=function(node){this.word("return"),printStatementAfterKeyword(this,node.argument)},exports.SwitchCase=function(node){node.test?(this.word("case"),this.space(),this.print(node.test),this.tokenChar(58)):(this.word("default"),this.tokenChar(58));node.consequent.length&&(this.newline(),this.printSequence(node.consequent,!0))},exports.SwitchStatement=function(node){this.word("switch"),this.space(),this.tokenChar(40),this.print(node.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(node.cases,!0,void 0,function(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}),this.rightBrace(node)},exports.ThrowStatement=function(node){this.word("throw"),printStatementAfterKeyword(this,node.argument)},exports.TryStatement=function(node){this.word("try"),this.space(),this.print(node.block),this.space(),node.handlers?this.print(node.handlers[0]):this.print(node.handler);node.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(node.finalizer))},exports.VariableDeclaration=function(node,parent){node.declare&&(this.word("declare"),this.space());const{kind}=node;"await using"===kind?(this.word("await"),this.space(),this.word("using",!0)):this.word(kind,"using"===kind);this.space();let hasInits=!1;if(!isFor(parent))for(const declar of node.declarations)declar.init&&(hasInits=!0);if(this.printList(node.declarations,void 0,void 0,node.declarations.length>1,hasInits?function(occurrenceCount){this.token(",",!1,occurrenceCount),this.newline()}:void 0),isFor(parent))if(isForStatement(parent)){if(parent.init===node)return}else if(parent.left===node)return;this.semicolon()},exports.VariableDeclarator=function(node){this.print(node.id),node.definite&&this.tokenChar(33);this.print(node.id.typeAnnotation),node.init&&(this.space(),this.tokenChar(61),this.space(),this.print(node.init))},exports.WhileStatement=function(node){this.word("while"),this.space(),this.tokenChar(40),this.print(node.test),this.tokenChar(41),this.printBlock(node)},exports.WithStatement=function(node){this.word("with"),this.space(),this.tokenChar(40),this.print(node.object),this.tokenChar(41),this.printBlock(node)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{isFor,isForStatement,isIfStatement,isStatement}=_t;function getLastStatement(statement){const{body}=statement;return!1===isStatement(body)?statement:getLastStatement(body)}function ForXStatement(node){this.word("for"),this.space();const isForOf="ForOfStatement"===node.type;isForOf&&node.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40);{const exit=this.enterForXStatementInit(isForOf);this.print(node.left),null==exit||exit()}this.space(),this.word(isForOf?"of":"in"),this.space(),this.print(node.right),this.tokenChar(41),this.printBlock(node)}exports.ForInStatement=ForXStatement,exports.ForOfStatement=ForXStatement;function printStatementAfterKeyword(printer,node){node&&(printer.space(),printer.printTerminatorless(node)),printer.semicolon()}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/template-literals.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TaggedTemplateExpression=function(node){this.print(node.tag),this.print(node.typeParameters),this.print(node.quasi)},exports.TemplateElement=function(){throw new Error("TemplateElement printing is handled in TemplateLiteral")},exports.TemplateLiteral=function(node){this._printTemplate(node,node.expressions)},exports._printTemplate=function(node,substitutions){const quasis=node.quasis;let partRaw="`";for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArgumentPlaceholder=function(){this.tokenChar(63)},exports.ArrayPattern=exports.ArrayExpression=function(node){const elems=node.elements,len=elems.length;this.tokenChar(91);const exit=this.enterDelimited();for(let i=0;i0&&this.space(),this.print(elem),(iJSON.stringify(v));throw new Error(`The "topicToken" generator option must be one of ${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`)}this.token(topicToken)},exports.TupleExpression=function(node){const elems=node.elements,len=elems.length;let startToken,endToken;if("bar"===this.format.recordAndTupleSyntaxType)startToken="[|",endToken="|]";else{if("hash"!==this.format.recordAndTupleSyntaxType)throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);startToken="#[",endToken="]"}this.token(startToken);for(let i=0;i0&&this.space(),this.print(elem),(itok.value===name);if(token)return lastRawIdentResult=this._originalCode.slice(token.start,token.end),lastRawIdentResult;return lastRawIdentResult=node.name};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_jsesc=__webpack_require__("./node_modules/.pnpm/jsesc@3.1.0/node_modules/jsesc/jsesc.js");const{isAssignmentPattern,isIdentifier}=_t;let lastRawIdentNode=null,lastRawIdentResult="";const validTopicTokenSet=new Set(["^^","@@","^","%","#"])},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/typescript.js":(__unused_webpack_module,exports)=>{"use strict";function maybePrintTrailingCommaOrSemicolon(printer,node){printer.tokenMap&&node.start&&node.end?printer.tokenMap.endMatches(node,",")?printer.token(","):printer.tokenMap.endMatches(node,";")&&printer.semicolon():printer.semicolon()}function tsPrintUnionOrIntersectionType(printer,node,sep){var _printer$tokenMap;let hasLeadingToken=0;null!=(_printer$tokenMap=printer.tokenMap)&&_printer$tokenMap.startMatches(node,sep)&&(hasLeadingToken=1,printer.token(sep)),printer.printJoin(node.types,void 0,void 0,function(i){this.space(),this.token(sep,null,i+hasLeadingToken),this.space()})}function tokenIfPlusMinus(self,tok){!0!==tok&&self.token(tok)}function TSEnumBody(node){printBraced(this,node,()=>{var _this$shouldPrintTrai;return this.printList(node.members,null==(_this$shouldPrintTrai=this.shouldPrintTrailingComma("}"))||_this$shouldPrintTrai,!0,!0)})}function printBraced(printer,node,cb){printer.token("{");const exit=printer.enterDelimited();cb(),exit(),printer.rightBrace(node)}function printModifiersList(printer,node,modifiers){var _printer$tokenMap2;const modifiersSet=new Set;for(const modifier of modifiers)modifier&&modifiersSet.add(modifier);null==(_printer$tokenMap2=printer.tokenMap)||_printer$tokenMap2.find(node,tok=>{if(modifiersSet.has(tok.value))return printer.token(tok.value),printer.space(),modifiersSet.delete(tok.value),0===modifiersSet.size});for(const modifier of modifiersSet)printer.word(modifier),printer.space()}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TSAnyKeyword=function(){this.word("any")},exports.TSArrayType=function(node){this.print(node.elementType,!0),this.tokenChar(91),this.tokenChar(93)},exports.TSSatisfiesExpression=exports.TSAsExpression=function(node){const{type,expression,typeAnnotation}=node;this.print(expression,!0),this.space(),this.word("TSAsExpression"===type?"as":"satisfies"),this.space(),this.print(typeAnnotation)},exports.TSBigIntKeyword=function(){this.word("bigint")},exports.TSBooleanKeyword=function(){this.word("boolean")},exports.TSCallSignatureDeclaration=function(node){this.tsPrintSignatureDeclarationBase(node),maybePrintTrailingCommaOrSemicolon(this,node)},exports.TSInterfaceHeritage=exports.TSClassImplements=function(node){this.print(node.expression),this.print(node.typeArguments)},exports.TSConditionalType=function(node){this.print(node.checkType),this.space(),this.word("extends"),this.space(),this.print(node.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(node.trueType),this.space(),this.tokenChar(58),this.space(),this.print(node.falseType)},exports.TSConstructSignatureDeclaration=function(node){this.word("new"),this.space(),this.tsPrintSignatureDeclarationBase(node),maybePrintTrailingCommaOrSemicolon(this,node)},exports.TSConstructorType=function(node){node.abstract&&(this.word("abstract"),this.space());this.word("new"),this.space(),this.tsPrintFunctionOrConstructorType(node)},exports.TSDeclareFunction=function(node,parent){node.declare&&(this.word("declare"),this.space());this._functionHead(node,parent),this.semicolon()},exports.TSDeclareMethod=function(node){this._classMethodHead(node),this.semicolon()},exports.TSEnumBody=TSEnumBody,exports.TSEnumDeclaration=function(node){const{declare,const:isConst,id}=node;declare&&(this.word("declare"),this.space());isConst&&(this.word("const"),this.space());this.word("enum"),this.space(),this.print(id),this.space(),TSEnumBody.call(this,node)},exports.TSEnumMember=function(node){const{id,initializer}=node;this.print(id),initializer&&(this.space(),this.tokenChar(61),this.space(),this.print(initializer))},exports.TSExportAssignment=function(node){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(node.expression),this.semicolon()},exports.TSExternalModuleReference=function(node){this.token("require("),this.print(node.expression),this.tokenChar(41)},exports.TSFunctionType=function(node){this.tsPrintFunctionOrConstructorType(node)},exports.TSImportEqualsDeclaration=function(node){const{id,moduleReference}=node;node.isExport&&(this.word("export"),this.space());this.word("import"),this.space(),this.print(id),this.space(),this.tokenChar(61),this.space(),this.print(moduleReference),this.semicolon()},exports.TSImportType=function(node){const{argument,qualifier,options}=node;this.word("import"),this.tokenChar(40),this.print(argument),options&&(this.tokenChar(44),this.print(options));this.tokenChar(41),qualifier&&(this.tokenChar(46),this.print(qualifier));const typeArguments=node.typeParameters;typeArguments&&this.print(typeArguments)},exports.TSIndexSignature=function(node){const{readonly,static:isStatic}=node;isStatic&&(this.word("static"),this.space());readonly&&(this.word("readonly"),this.space());this.tokenChar(91),this._parameters(node.parameters,"]"),this.print(node.typeAnnotation),maybePrintTrailingCommaOrSemicolon(this,node)},exports.TSIndexedAccessType=function(node){this.print(node.objectType,!0),this.tokenChar(91),this.print(node.indexType),this.tokenChar(93)},exports.TSInferType=function(node){this.word("infer"),this.print(node.typeParameter)},exports.TSInstantiationExpression=function(node){this.print(node.expression),this.print(node.typeParameters)},exports.TSInterfaceBody=function(node){printBraced(this,node,()=>this.printJoin(node.body,!0,!0))},exports.TSInterfaceDeclaration=function(node){const{declare,id,typeParameters,extends:extendz,body}=node;declare&&(this.word("declare"),this.space());this.word("interface"),this.space(),this.print(id),this.print(typeParameters),null!=extendz&&extendz.length&&(this.space(),this.word("extends"),this.space(),this.printList(extendz));this.space(),this.print(body)},exports.TSIntersectionType=function(node){tsPrintUnionOrIntersectionType(this,node,"&")},exports.TSIntrinsicKeyword=function(){this.word("intrinsic")},exports.TSLiteralType=function(node){this.print(node.literal)},exports.TSMappedType=function(node){const{nameType,optional,readonly,typeAnnotation}=node;this.tokenChar(123);const exit=this.enterDelimited();this.space(),readonly&&(tokenIfPlusMinus(this,readonly),this.word("readonly"),this.space());this.tokenChar(91),this.word(node.typeParameter.name),this.space(),this.word("in"),this.space(),this.print(node.typeParameter.constraint),nameType&&(this.space(),this.word("as"),this.space(),this.print(nameType));this.tokenChar(93),optional&&(tokenIfPlusMinus(this,optional),this.tokenChar(63));typeAnnotation&&(this.tokenChar(58),this.space(),this.print(typeAnnotation));this.space(),exit(),this.tokenChar(125)},exports.TSMethodSignature=function(node){const{kind}=node;"set"!==kind&&"get"!==kind||(this.word(kind),this.space());this.tsPrintPropertyOrMethodName(node),this.tsPrintSignatureDeclarationBase(node),maybePrintTrailingCommaOrSemicolon(this,node)},exports.TSModuleBlock=function(node){printBraced(this,node,()=>this.printSequence(node.body,!0))},exports.TSModuleDeclaration=function(node){const{declare,id,kind}=node;declare&&(this.word("declare"),this.space());{if(node.global||(this.word(null!=kind?kind:"Identifier"===id.type?"namespace":"module"),this.space()),this.print(id),!node.body)return void this.semicolon();let body=node.body;for(;"TSModuleDeclaration"===body.type;)this.tokenChar(46),this.print(body.id),body=body.body;this.space(),this.print(body)}},exports.TSNamedTupleMember=function(node){this.print(node.label),node.optional&&this.tokenChar(63);this.tokenChar(58),this.space(),this.print(node.elementType)},exports.TSNamespaceExportDeclaration=function(node){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(node.id),this.semicolon()},exports.TSNeverKeyword=function(){this.word("never")},exports.TSNonNullExpression=function(node){this.print(node.expression),this.tokenChar(33)},exports.TSNullKeyword=function(){this.word("null")},exports.TSNumberKeyword=function(){this.word("number")},exports.TSObjectKeyword=function(){this.word("object")},exports.TSOptionalType=function(node){this.print(node.typeAnnotation),this.tokenChar(63)},exports.TSParameterProperty=function(node){node.accessibility&&(this.word(node.accessibility),this.space());node.readonly&&(this.word("readonly"),this.space());this._param(node.parameter)},exports.TSParenthesizedType=function(node){this.tokenChar(40),this.print(node.typeAnnotation),this.tokenChar(41)},exports.TSPropertySignature=function(node){const{readonly}=node;readonly&&(this.word("readonly"),this.space());this.tsPrintPropertyOrMethodName(node),this.print(node.typeAnnotation),maybePrintTrailingCommaOrSemicolon(this,node)},exports.TSQualifiedName=function(node){this.print(node.left),this.tokenChar(46),this.print(node.right)},exports.TSRestType=function(node){this.token("..."),this.print(node.typeAnnotation)},exports.TSStringKeyword=function(){this.word("string")},exports.TSSymbolKeyword=function(){this.word("symbol")},exports.TSTemplateLiteralType=function(node){this._printTemplate(node,node.types)},exports.TSThisType=function(){this.word("this")},exports.TSTupleType=function(node){this.tokenChar(91),this.printList(node.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)},exports.TSTypeAliasDeclaration=function(node){const{declare,id,typeParameters,typeAnnotation}=node;declare&&(this.word("declare"),this.space());this.word("type"),this.space(),this.print(id),this.print(typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(typeAnnotation),this.semicolon()},exports.TSTypeAnnotation=function(node,parent){this.token("TSFunctionType"!==parent.type&&"TSConstructorType"!==parent.type||parent.typeAnnotation!==node?":":"=>"),this.space(),node.optional&&this.tokenChar(63);this.print(node.typeAnnotation)},exports.TSTypeAssertion=function(node){const{typeAnnotation,expression}=node;this.tokenChar(60),this.print(typeAnnotation),this.tokenChar(62),this.space(),this.print(expression)},exports.TSTypeLiteral=function(node){printBraced(this,node,()=>this.printJoin(node.members,!0,!0))},exports.TSTypeOperator=function(node){this.word(node.operator),this.space(),this.print(node.typeAnnotation)},exports.TSTypeParameter=function(node){node.const&&(this.word("const"),this.space());node.in&&(this.word("in"),this.space());node.out&&(this.word("out"),this.space());this.word(node.name),node.constraint&&(this.space(),this.word("extends"),this.space(),this.print(node.constraint));node.default&&(this.space(),this.tokenChar(61),this.space(),this.print(node.default))},exports.TSTypeParameterDeclaration=exports.TSTypeParameterInstantiation=function(node,parent){this.tokenChar(60);let printTrailingSeparator="ArrowFunctionExpression"===parent.type&&1===node.params.length;this.tokenMap&&null!=node.start&&null!=node.end&&(printTrailingSeparator&&(printTrailingSeparator=!!this.tokenMap.find(node,t=>this.tokenMap.matchesOriginal(t,","))),printTrailingSeparator||(printTrailingSeparator=this.shouldPrintTrailingComma(">")));this.printList(node.params,printTrailingSeparator),this.tokenChar(62)},exports.TSTypePredicate=function(node){node.asserts&&(this.word("asserts"),this.space());this.print(node.parameterName),node.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(node.typeAnnotation.typeAnnotation))},exports.TSTypeQuery=function(node){this.word("typeof"),this.space(),this.print(node.exprName);const typeArguments=node.typeParameters;typeArguments&&this.print(typeArguments)},exports.TSTypeReference=function(node){const typeArguments=node.typeParameters;this.print(node.typeName,!!typeArguments),this.print(typeArguments)},exports.TSUndefinedKeyword=function(){this.word("undefined")},exports.TSUnionType=function(node){tsPrintUnionOrIntersectionType(this,node,"|")},exports.TSUnknownKeyword=function(){this.word("unknown")},exports.TSVoidKeyword=function(){this.word("void")},exports.tsPrintClassMemberModifiers=function(node){const isPrivateField="ClassPrivateProperty"===node.type,isPublicField="ClassAccessorProperty"===node.type||"ClassProperty"===node.type;printModifiersList(this,node,[isPublicField&&node.declare&&"declare",!isPrivateField&&node.accessibility]),node.static&&(this.word("static"),this.space());printModifiersList(this,node,[!isPrivateField&&node.abstract&&"abstract",!isPrivateField&&node.override&&"override",(isPublicField||isPrivateField)&&node.readonly&&"readonly"])},exports.tsPrintFunctionOrConstructorType=function(node){const{typeParameters}=node,parameters=node.parameters;this.print(typeParameters),this.tokenChar(40),this._parameters(parameters,")"),this.space();const returnType=node.typeAnnotation;this.print(returnType)},exports.tsPrintPropertyOrMethodName=function(node){node.computed&&this.tokenChar(91);this.print(node.key),node.computed&&this.tokenChar(93);node.optional&&this.tokenChar(63)},exports.tsPrintSignatureDeclarationBase=function(node){const{typeParameters}=node,parameters=node.parameters;this.print(typeParameters),this.tokenChar(40),this._parameters(parameters,")");const returnType=node.typeAnnotation;this.print(returnType)}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.generate=generate;var _sourceMap=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/source-map.js"),_printer=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/printer.js");function normalizeOptions(code,opts,ast){if(opts.experimental_preserveFormat){if("string"!=typeof code)throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!opts.retainLines)throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(opts.compact&&"auto"!==opts.compact)throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(opts.minified)throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(opts.jsescOption)throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(ast.tokens))throw new Error("`experimental_preserveFormat` requires the AST to have attatched the token of the input code. Make sure to enable the `tokens: true` parser option.")}const format={auxiliaryCommentBefore:opts.auxiliaryCommentBefore,auxiliaryCommentAfter:opts.auxiliaryCommentAfter,shouldPrintComment:opts.shouldPrintComment,preserveFormat:opts.experimental_preserveFormat,retainLines:opts.retainLines,retainFunctionParens:opts.retainFunctionParens,comments:null==opts.comments||opts.comments,compact:opts.compact,minified:opts.minified,concise:opts.concise,indent:{adjustMultilineComment:!0,style:" "},jsescOption:Object.assign({quotes:"double",wrap:!0,minimal:!1},opts.jsescOption),topicToken:opts.topicToken,importAttributesKeyword:opts.importAttributesKeyword};var _opts$recordAndTupleS;format.decoratorsBeforeExport=opts.decoratorsBeforeExport,format.jsescOption.json=opts.jsonCompatibleStrings,format.recordAndTupleSyntaxType=null!=(_opts$recordAndTupleS=opts.recordAndTupleSyntaxType)?_opts$recordAndTupleS:"hash",format.minified?(format.compact=!0,format.shouldPrintComment=format.shouldPrintComment||(()=>format.comments)):format.shouldPrintComment=format.shouldPrintComment||(value=>format.comments||value.includes("@license")||value.includes("@preserve")),"auto"===format.compact&&(format.compact="string"==typeof code&&code.length>5e5,format.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${opts.filename} as it exceeds the max of 500KB.`)),(format.compact||format.preserveFormat)&&(format.indent.adjustMultilineComment=!1);const{auxiliaryCommentBefore,auxiliaryCommentAfter,shouldPrintComment}=format;return auxiliaryCommentBefore&&!shouldPrintComment(auxiliaryCommentBefore)&&(format.auxiliaryCommentBefore=void 0),auxiliaryCommentAfter&&!shouldPrintComment(auxiliaryCommentAfter)&&(format.auxiliaryCommentAfter=void 0),format}function generate(ast,opts={},code){const format=normalizeOptions(code,opts,ast),map=opts.sourceMaps?new _sourceMap.default(opts,code):null;return new _printer.default(format,map,ast.tokens,"string"==typeof code?code:null).generate(ast)}exports.CodeGenerator=class{constructor(ast,opts={},code){this._ast=void 0,this._format=void 0,this._map=void 0,this._ast=ast,this._format=normalizeOptions(code,opts,ast),this._map=opts.sourceMaps?new _sourceMap.default(opts,code):null}generate(){return new _printer.default(this._format,this._map).generate(this._ast)}};exports.default=generate},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TokenContext=void 0,exports.isLastChild=function(parent,child){const visitorKeys=VISITOR_KEYS[parent.type];for(let i=visitorKeys.length-1;i>=0;i--){const val=parent[visitorKeys[i]];if(val===child)return!0;if(Array.isArray(val)){let j=val.length-1;for(;j>=0&&null===val[j];)j--;return j>=0&&val[j]===child}if(val)return!1}return!1},exports.needsParens=function(node,parent,tokenContext,getRawIdentifier){var _expandedParens$get;if(!parent)return!1;if(isNewExpression(parent)&&parent.callee===node&&isOrHasCallExpression(node))return!0;if(isDecorator(parent))return!(isDecoratorMemberExpression(node)||isCallExpression(node)&&isDecoratorMemberExpression(node.callee)||isParenthesizedExpression(node));return null==(_expandedParens$get=expandedParens.get(node.type))?void 0:_expandedParens$get(node,parent,tokenContext,getRawIdentifier)},exports.needsWhitespace=needsWhitespace,exports.needsWhitespaceAfter=function(node,parent){return needsWhitespace(node,parent,2)},exports.needsWhitespaceBefore=function(node,parent){return needsWhitespace(node,parent,1)};var whitespace=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/whitespace.js"),parens=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/parentheses.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{FLIPPED_ALIAS_KEYS,VISITOR_KEYS,isCallExpression,isDecorator,isExpressionStatement,isMemberExpression,isNewExpression,isParenthesizedExpression}=_t;exports.TokenContext={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};function expandAliases(obj){const map=new Map;function add(type,func){const fn=map.get(type);map.set(type,fn?function(node,parent,stack,getRawIdentifier){var _fn;return null!=(_fn=fn(node,parent,stack,getRawIdentifier))?_fn:func(node,parent,stack,getRawIdentifier)}:func)}for(const type of Object.keys(obj)){const aliases=FLIPPED_ALIAS_KEYS[type];if(aliases)for(const alias of aliases)add(alias,obj[type]);else add(type,obj[type])}return map}const expandedParens=expandAliases(parens),expandedWhitespaceNodes=expandAliases(whitespace.nodes);function isOrHasCallExpression(node){return!!isCallExpression(node)||isMemberExpression(node)&&isOrHasCallExpression(node.object)}function needsWhitespace(node,parent,type){var _expandedWhitespaceNo;if(!node)return!1;isExpressionStatement(node)&&(node=node.expression);const flag=null==(_expandedWhitespaceNo=expandedWhitespaceNodes.get(node.type))?void 0:_expandedWhitespaceNo(node,parent);return"number"==typeof flag&&0!==(flag&type)}function isDecoratorMemberExpression(node){switch(node.type){case"Identifier":return!0;case"MemberExpression":return!node.computed&&"Identifier"===node.property.type&&isDecoratorMemberExpression(node.object);default:return!1}}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/parentheses.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AssignmentExpression=function(node,parent,tokenContext){return!(!needsParenBeforeExpressionBrace(tokenContext)||!isObjectPattern(node.left))||ConditionalExpression(node,parent)},exports.Binary=Binary,exports.BinaryExpression=function(node,parent,tokenContext){return"in"===node.operator&&Boolean(tokenContext&_index.TokenContext.forInOrInitHeadAccumulate)},exports.ClassExpression=function(node,parent,tokenContext){return Boolean(tokenContext&(_index.TokenContext.expressionStatement|_index.TokenContext.exportDefault))},exports.ArrowFunctionExpression=exports.ConditionalExpression=ConditionalExpression,exports.DoExpression=function(node,parent,tokenContext){return!node.async&&Boolean(tokenContext&_index.TokenContext.expressionStatement)},exports.FunctionExpression=function(node,parent,tokenContext){return Boolean(tokenContext&(_index.TokenContext.expressionStatement|_index.TokenContext.exportDefault))},exports.FunctionTypeAnnotation=function(node,parent,tokenContext){const parentType=parent.type;return"UnionTypeAnnotation"===parentType||"IntersectionTypeAnnotation"===parentType||"ArrayTypeAnnotation"===parentType||Boolean(tokenContext&_index.TokenContext.arrowFlowReturnType)},exports.Identifier=function(node,parent,tokenContext,getRawIdentifier){var _node$extra;const parentType=parent.type;if(null!=(_node$extra=node.extra)&&_node$extra.parenthesized&&"AssignmentExpression"===parentType&&parent.left===node){const rightType=parent.right.type;if(("FunctionExpression"===rightType||"ClassExpression"===rightType)&&null==parent.right.id)return!0}if(getRawIdentifier&&getRawIdentifier(node)!==node.name)return!1;if("let"===node.name){return!!((isMemberExpression(parent,{object:node,computed:!0})||isOptionalMemberExpression(parent,{object:node,computed:!0,optional:!1}))&&tokenContext&(_index.TokenContext.expressionStatement|_index.TokenContext.forInitHead|_index.TokenContext.forInHead))||Boolean(tokenContext&_index.TokenContext.forOfHead)}return"async"===node.name&&isForOfStatement(parent,{left:node,await:!1})},exports.LogicalExpression=function(node,parent){const parentType=parent.type;if(isTSTypeExpression(parentType))return!0;if("LogicalExpression"!==parentType)return!1;switch(node.operator){case"||":return"??"===parent.operator||"&&"===parent.operator;case"&&":return"??"===parent.operator;case"??":return"??"!==parent.operator}},exports.NullableTypeAnnotation=function(node,parent){return isArrayTypeAnnotation(parent)},exports.ObjectExpression=function(node,parent,tokenContext){return needsParenBeforeExpressionBrace(tokenContext)},exports.OptionalIndexedAccessType=function(node,parent){return isIndexedAccessType(parent)&&parent.objectType===node},exports.OptionalCallExpression=exports.OptionalMemberExpression=function(node,parent){return isCallExpression(parent)&&parent.callee===node||isMemberExpression(parent)&&parent.object===node},exports.SequenceExpression=function(node,parent){const parentType=parent.type;if("SequenceExpression"===parentType||"ParenthesizedExpression"===parentType||"MemberExpression"===parentType&&parent.property===node||"OptionalMemberExpression"===parentType&&parent.property===node||"TemplateLiteral"===parentType)return!1;if("ClassDeclaration"===parentType)return!0;if("ForOfStatement"===parentType)return parent.right===node;if("ExportDefaultDeclaration"===parentType)return!0;return!isStatement(parent)},exports.TSSatisfiesExpression=exports.TSAsExpression=function(node,parent){if(("AssignmentExpression"===parent.type||"AssignmentPattern"===parent.type)&&parent.left===node)return!0;if("BinaryExpression"===parent.type&&("|"===parent.operator||"&"===parent.operator)&&node===parent.left)return!0;return Binary(node,parent)},exports.TSConditionalType=function(node,parent){const parentType=parent.type;if("TSArrayType"===parentType||"TSIndexedAccessType"===parentType&&parent.objectType===node||"TSOptionalType"===parentType||"TSTypeOperator"===parentType||"TSTypeParameter"===parentType)return!0;if(("TSIntersectionType"===parentType||"TSUnionType"===parentType)&&parent.types[0]===node)return!0;if("TSConditionalType"===parentType&&(parent.checkType===node||parent.extendsType===node))return!0;return!1},exports.TSConstructorType=exports.TSFunctionType=function(node,parent){const parentType=parent.type;return"TSIntersectionType"===parentType||"TSUnionType"===parentType||"TSTypeOperator"===parentType||"TSOptionalType"===parentType||"TSArrayType"===parentType||"TSIndexedAccessType"===parentType&&parent.objectType===node||"TSConditionalType"===parentType&&(parent.checkType===node||parent.extendsType===node)},exports.TSInferType=function(node,parent){const parentType=parent.type;if("TSArrayType"===parentType||"TSIndexedAccessType"===parentType&&parent.objectType===node||"TSOptionalType"===parentType)return!0;if(node.typeParameter.constraint&&("TSIntersectionType"===parentType||"TSUnionType"===parentType)&&parent.types[0]===node)return!0;return!1},exports.TSInstantiationExpression=function(node,parent){const parentType=parent.type;return("CallExpression"===parentType||"OptionalCallExpression"===parentType||"NewExpression"===parentType||"TSInstantiationExpression"===parentType)&&!!parent.typeParameters},exports.TSIntersectionType=function(node,parent){const parentType=parent.type;return"TSTypeOperator"===parentType||"TSArrayType"===parentType||"TSIndexedAccessType"===parentType&&parent.objectType===node||"TSOptionalType"===parentType},exports.UnaryLike=exports.TSTypeAssertion=UnaryLike,exports.TSTypeOperator=function(node,parent){const parentType=parent.type;return"TSArrayType"===parentType||"TSIndexedAccessType"===parentType&&parent.objectType===node||"TSOptionalType"===parentType},exports.TSUnionType=function(node,parent){const parentType=parent.type;return"TSIntersectionType"===parentType||"TSTypeOperator"===parentType||"TSArrayType"===parentType||"TSIndexedAccessType"===parentType&&parent.objectType===node||"TSOptionalType"===parentType},exports.IntersectionTypeAnnotation=exports.UnionTypeAnnotation=function(node,parent){const parentType=parent.type;return"ArrayTypeAnnotation"===parentType||"NullableTypeAnnotation"===parentType||"IntersectionTypeAnnotation"===parentType||"UnionTypeAnnotation"===parentType},exports.UpdateExpression=function(node,parent){return hasPostfixPart(node,parent)||isClassExtendsClause(node,parent)},exports.AwaitExpression=exports.YieldExpression=function(node,parent){const parentType=parent.type;return"BinaryExpression"===parentType||"LogicalExpression"===parentType||"UnaryExpression"===parentType||"SpreadElement"===parentType||hasPostfixPart(node,parent)||"AwaitExpression"===parentType&&isYieldExpression(node)||"ConditionalExpression"===parentType&&node===parent.test||isClassExtendsClause(node,parent)||isTSTypeExpression(parentType)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js");const{isArrayTypeAnnotation,isBinaryExpression,isCallExpression,isForOfStatement,isIndexedAccessType,isMemberExpression,isObjectPattern,isOptionalMemberExpression,isYieldExpression,isStatement}=_t,PRECEDENCE=new Map([["||",0],["??",0],["|>",0],["&&",1],["|",2],["^",3],["&",4],["==",5],["===",5],["!=",5],["!==",5],["<",6],[">",6],["<=",6],[">=",6],["in",6],["instanceof",6],[">>",7],["<<",7],[">>>",7],["+",8],["-",8],["*",9],["/",9],["%",9],["**",10]]);function getBinaryPrecedence(node,nodeType){return"BinaryExpression"===nodeType||"LogicalExpression"===nodeType?PRECEDENCE.get(node.operator):"TSAsExpression"===nodeType||"TSSatisfiesExpression"===nodeType?PRECEDENCE.get("in"):void 0}function isTSTypeExpression(nodeType){return"TSAsExpression"===nodeType||"TSSatisfiesExpression"===nodeType||"TSTypeAssertion"===nodeType}const isClassExtendsClause=(node,parent)=>{const parentType=parent.type;return("ClassDeclaration"===parentType||"ClassExpression"===parentType)&&parent.superClass===node},hasPostfixPart=(node,parent)=>{const parentType=parent.type;return("MemberExpression"===parentType||"OptionalMemberExpression"===parentType)&&parent.object===node||("CallExpression"===parentType||"OptionalCallExpression"===parentType||"NewExpression"===parentType)&&parent.callee===node||"TaggedTemplateExpression"===parentType&&parent.tag===node||"TSNonNullExpression"===parentType};function needsParenBeforeExpressionBrace(tokenContext){return Boolean(tokenContext&(_index.TokenContext.expressionStatement|_index.TokenContext.arrowBody))}function Binary(node,parent){const parentType=parent.type;if("BinaryExpression"===node.type&&"**"===node.operator&&"BinaryExpression"===parentType&&"**"===parent.operator)return parent.left===node;if(isClassExtendsClause(node,parent))return!0;if(hasPostfixPart(node,parent)||"UnaryExpression"===parentType||"SpreadElement"===parentType||"AwaitExpression"===parentType)return!0;const parentPos=getBinaryPrecedence(parent,parentType);if(null!=parentPos){const nodePos=getBinaryPrecedence(node,node.type);if(parentPos===nodePos&&"BinaryExpression"===parentType&&parent.right===node||parentPos>nodePos)return!0}}function UnaryLike(node,parent){return hasPostfixPart(node,parent)||isBinaryExpression(parent)&&"**"===parent.operator&&parent.left===node||isClassExtendsClause(node,parent)}function ConditionalExpression(node,parent){const parentType=parent.type;return!!("UnaryExpression"===parentType||"SpreadElement"===parentType||"BinaryExpression"===parentType||"LogicalExpression"===parentType||"ConditionalExpression"===parentType&&parent.test===node||"AwaitExpression"===parentType||isTSTypeExpression(parentType))||UnaryLike(node,parent)}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/whitespace.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.nodes=void 0;var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{FLIPPED_ALIAS_KEYS,isArrayExpression,isAssignmentExpression,isBinary,isBlockStatement,isCallExpression,isFunction,isIdentifier,isLiteral,isMemberExpression,isObjectExpression,isOptionalCallExpression,isOptionalMemberExpression,isStringLiteral}=_t;function crawlInternal(node,state){return node?(isMemberExpression(node)||isOptionalMemberExpression(node)?(crawlInternal(node.object,state),node.computed&&crawlInternal(node.property,state)):isBinary(node)||isAssignmentExpression(node)?(crawlInternal(node.left,state),crawlInternal(node.right,state)):isCallExpression(node)||isOptionalCallExpression(node)?(state.hasCall=!0,crawlInternal(node.callee,state)):isFunction(node)?state.hasFunction=!0:isIdentifier(node)&&(state.hasHelper=state.hasHelper||node.callee&&isHelper(node.callee)),state):state}function crawl(node){return crawlInternal(node,{hasCall:!1,hasFunction:!1,hasHelper:!1})}function isHelper(node){return!!node&&(isMemberExpression(node)?isHelper(node.object)||isHelper(node.property):isIdentifier(node)?"require"===node.name||95===node.name.charCodeAt(0):isCallExpression(node)?isHelper(node.callee):!(!isBinary(node)&&!isAssignmentExpression(node))&&(isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)))}function isType(node){return isLiteral(node)||isObjectExpression(node)||isArrayExpression(node)||isIdentifier(node)||isMemberExpression(node)}const nodes=exports.nodes={AssignmentExpression(node){const state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction)return state.hasFunction?3:2},SwitchCase:(node,parent)=>(node.consequent.length||parent.cases[0]===node?1:0)|(node.consequent.length||parent.cases[parent.cases.length-1]!==node?0:2),LogicalExpression(node){if(isFunction(node.left)||isFunction(node.right))return 2},Literal(node){if(isStringLiteral(node)&&"use strict"===node.value)return 2},CallExpression(node){if(isFunction(node.callee)||isHelper(node))return 3},OptionalCallExpression(node){if(isFunction(node.callee))return 3},VariableDeclaration(node){for(let i=0;iret})})},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/printer.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _buffer=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/buffer.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/node/index.js"),n=_index,_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_tokenMap=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/token-map.js"),generatorFunctions=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/index.js"),_deprecated=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/generators/deprecated.js");const{isExpression,isFunction,isStatement,isClassBody,isTSInterfaceBody,isTSEnumMember}=_t,SCIENTIFIC_NOTATION=/e/i,ZERO_DECIMAL_INTEGER=/\.0+$/,HAS_NEWLINE=/[\n\r\u2028\u2029]/,HAS_NEWLINE_OR_BlOCK_COMMENT_END=/[\n\r\u2028\u2029]|\*\//;function commentIsNewline(c){return"CommentLine"===c.type||HAS_NEWLINE.test(c.value)}const{needsParens}=n;class Printer{constructor(format,map,tokens,originalCode){this.tokenContext=_index.TokenContext.normal,this._tokens=null,this._originalCode=null,this._currentNode=null,this._indent=0,this._indentRepeat=0,this._insideAux=!1,this._noLineTerminator=!1,this._noLineTerminatorAfterNode=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new Set,this._endsWithInteger=!1,this._endsWithWord=!1,this._endsWithDiv=!1,this._lastCommentLine=0,this._endsWithInnerRaw=!1,this._indentInnerComments=!0,this.tokenMap=null,this._boundGetRawIdentifier=this._getRawIdentifier.bind(this),this._printSemicolonBeforeNextNode=-1,this._printSemicolonBeforeNextToken=-1,this.format=format,this._tokens=tokens,this._originalCode=originalCode,this._indentRepeat=format.indent.style.length,this._inputMap=null==map?void 0:map._inputMap,this._buf=new _buffer.default(map,format.indent.style[0])}enterForStatementInit(){return this.tokenContext|=_index.TokenContext.forInitHead|_index.TokenContext.forInOrInitHeadAccumulate,()=>this.tokenContext=_index.TokenContext.normal}enterForXStatementInit(isForOf){return isForOf?(this.tokenContext|=_index.TokenContext.forOfHead,null):(this.tokenContext|=_index.TokenContext.forInHead|_index.TokenContext.forInOrInitHeadAccumulate,()=>this.tokenContext=_index.TokenContext.normal)}enterDelimited(){const oldTokenContext=this.tokenContext,oldNoLineTerminatorAfterNode=this._noLineTerminatorAfterNode;return oldTokenContext&_index.TokenContext.forInOrInitHeadAccumulate||null!==oldNoLineTerminatorAfterNode?(this._noLineTerminatorAfterNode=null,this.tokenContext=_index.TokenContext.normal,()=>{this._noLineTerminatorAfterNode=oldNoLineTerminatorAfterNode,this.tokenContext=oldTokenContext}):()=>{}}generate(ast){return this.format.preserveFormat&&(this.tokenMap=new _tokenMap.TokenMap(ast,this._tokens,this._originalCode)),this.print(ast),this._maybeAddAuxComment(),this._buf.get()}indent(){const{format}=this;format.preserveFormat||format.compact||format.concise||this._indent++}dedent(){const{format}=this;format.preserveFormat||format.compact||format.concise||this._indent--}semicolon(force=!1){if(this._maybeAddAuxComment(),force)return this._appendChar(59),void(this._noLineTerminator=!1);if(this.tokenMap){const node=this._currentNode;if(null!=node.start&&null!=node.end){if(!this.tokenMap.endMatches(node,";"))return void(this._printSemicolonBeforeNextNode=this._buf.getCurrentLine());const indexes=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[indexes[indexes.length-1]].loc.start)}}this._queue(59),this._noLineTerminator=!1}rightBrace(node){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",node.loc,-1),this.tokenChar(125)}rightParens(node){this.sourceWithOffset("end",node.loc,-1),this.tokenChar(41)}space(force=!1){const{format}=this;if(!format.compact&&!format.preserveFormat)if(force)this._space();else if(this._buf.hasContent()){const lastCp=this.getLastChar();32!==lastCp&&10!==lastCp&&this._space()}}word(str,noLineTerminatorAfter=!1){this.tokenContext&=_index.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(str),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(str),(this._endsWithWord||this._endsWithDiv&&47===str.charCodeAt(0))&&this._space(),this._append(str,!1),this._endsWithWord=!0,this._noLineTerminator=noLineTerminatorAfter}number(str,number){this.word(str),this._endsWithInteger=Number.isInteger(number)&&!function(str){if(str.length>2&&48===str.charCodeAt(0)){const secondChar=str.charCodeAt(1);return 98===secondChar||111===secondChar||120===secondChar}return!1}(str)&&!SCIENTIFIC_NOTATION.test(str)&&!ZERO_DECIMAL_INTEGER.test(str)&&46!==str.charCodeAt(str.length-1)}token(str,maybeNewline=!1,occurrenceCount=0){this.tokenContext&=_index.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(str,occurrenceCount),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(str,occurrenceCount);const lastChar=this.getLastChar(),strFirst=str.charCodeAt(0);(33===lastChar&&("--"===str||61===strFirst)||43===strFirst&&43===lastChar||45===strFirst&&45===lastChar||46===strFirst&&this._endsWithInteger)&&this._space(),this._append(str,maybeNewline),this._noLineTerminator=!1}tokenChar(char){this.tokenContext&=_index.TokenContext.forInOrInitHeadAccumulatePassThroughMask;const str=String.fromCharCode(char);this._maybePrintInnerComments(str),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(str);const lastChar=this.getLastChar();(43===char&&43===lastChar||45===char&&45===lastChar||46===char&&this._endsWithInteger)&&this._space(),this._appendChar(char),this._noLineTerminator=!1}newline(i=1,force){if(!(i<=0)){if(!force){if(this.format.retainLines||this.format.compact)return;if(this.format.concise)return void this.space()}i>2&&(i=2),i-=this._buf.getNewlineCount();for(let j=0;j0&&this._noLineTerminator)return;for(let i=0;i0?column:column-this._buf.getCurrentColumn();if(spacesCount>0){const spaces=this._originalCode?this._originalCode.slice(index-spacesCount,index).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu," "):" ".repeat(spacesCount);this._append(spaces,!1)}}_getIndent(){return this._indentRepeat*this._indent}printTerminatorless(node){this._noLineTerminator=!0,this.print(node)}print(node,noLineTerminatorAfter,trailingCommentsLineOffset){var _node$extra,_node$leadingComments,_node$leadingComments2;if(!node)return;this._endsWithInnerRaw=!1;const nodeType=node.type,format=this.format,oldConcise=format.concise;node._compact&&(format.concise=!0);const printMethod=this[nodeType];if(void 0===printMethod)throw new ReferenceError(`unknown node of type ${JSON.stringify(nodeType)} with constructor ${JSON.stringify(node.constructor.name)}`);const parent=this._currentNode;this._currentNode=node,this.tokenMap&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);const oldInAux=this._insideAux;this._insideAux=null==node.loc,this._maybeAddAuxComment(this._insideAux&&!oldInAux);const parenthesized=null==(_node$extra=node.extra)?void 0:_node$extra.parenthesized;let shouldPrintParens=parenthesized&&format.preserveFormat||parenthesized&&format.retainFunctionParens&&"FunctionExpression"===nodeType||needsParens(node,parent,this.tokenContext,format.preserveFormat?this._boundGetRawIdentifier:void 0);if(!shouldPrintParens&&parenthesized&&null!=(_node$leadingComments=node.leadingComments)&&_node$leadingComments.length&&"CommentBlock"===node.leadingComments[0].type){switch(null==parent?void 0:parent.type){case"ExpressionStatement":case"VariableDeclarator":case"AssignmentExpression":case"ReturnStatement":break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":if(parent.callee!==node)break;default:shouldPrintParens=!0}}let oldNoLineTerminatorAfterNode,oldTokenContext,indentParenthesized=!1;var _node$trailingComment;(!shouldPrintParens&&this._noLineTerminator&&(null!=(_node$leadingComments2=node.leadingComments)&&_node$leadingComments2.some(commentIsNewline)||this.format.retainLines&&node.loc&&node.loc.start.line>this._buf.getCurrentLine())&&(shouldPrintParens=!0,indentParenthesized=!0),shouldPrintParens)||(noLineTerminatorAfter||(noLineTerminatorAfter=parent&&this._noLineTerminatorAfterNode===parent&&n.isLastChild(parent,node)),noLineTerminatorAfter&&(null!=(_node$trailingComment=node.trailingComments)&&_node$trailingComment.some(commentIsNewline)?isExpression(node)&&(shouldPrintParens=!0):(oldNoLineTerminatorAfterNode=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=node)));shouldPrintParens&&(this.tokenChar(40),indentParenthesized&&this.indent(),this._endsWithInnerRaw=!1,this.tokenContext&_index.TokenContext.forInOrInitHeadAccumulate&&(oldTokenContext=this.tokenContext,this.tokenContext=_index.TokenContext.normal),oldNoLineTerminatorAfterNode=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._lastCommentLine=0,this._printLeadingComments(node,parent);const loc="Program"===nodeType||"File"===nodeType?null:node.loc;this.exactSource(loc,printMethod.bind(this,node,parent)),shouldPrintParens?(this._printTrailingComments(node,parent),indentParenthesized&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=noLineTerminatorAfter,oldTokenContext&&(this.tokenContext=oldTokenContext)):noLineTerminatorAfter&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(node,parent)):this._printTrailingComments(node,parent,trailingCommentsLineOffset),this._currentNode=parent,format.concise=oldConcise,this._insideAux=oldInAux,void 0!==oldNoLineTerminatorAfterNode&&(this._noLineTerminatorAfterNode=oldNoLineTerminatorAfterNode),this._endsWithInnerRaw=!1}_maybeAddAuxComment(enteredPositionlessNode){enteredPositionlessNode&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const comment=this.format.auxiliaryCommentBefore;comment&&this._printComment({type:"CommentBlock",value:comment},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const comment=this.format.auxiliaryCommentAfter;comment&&this._printComment({type:"CommentBlock",value:comment},0)}getPossibleRaw(node){const extra=node.extra;if(null!=(null==extra?void 0:extra.raw)&&null!=extra.rawValue&&node.value===extra.rawValue)return extra.raw}printJoin(nodes,statement,indent,separator,printTrailingSeparator,addNewlines,iterator,trailingCommentsLineOffset){if(null==nodes||!nodes.length)return;if(null==indent&&this.format.retainLines){var _nodes$0$loc;const startLine=null==(_nodes$0$loc=nodes[0].loc)?void 0:_nodes$0$loc.start.line;null!=startLine&&startLine!==this._buf.getCurrentLine()&&(indent=!0)}indent&&this.indent();const newlineOpts={addNewlines,nextNodeStartLine:0},boundSeparator=null==separator?void 0:separator.bind(this),len=nodes.length;for(let i=0;i0;indent&&this.indent(),this.print(node),indent&&this.dedent()}printBlock(parent){const node=parent.body;"EmptyStatement"!==node.type&&this.space(),this.print(node)}_printTrailingComments(node,parent,lineOffset){const{innerComments,trailingComments}=node;null!=innerComments&&innerComments.length&&this._printComments(2,innerComments,node,parent,lineOffset),null!=trailingComments&&trailingComments.length&&this._printComments(2,trailingComments,node,parent,lineOffset)}_printLeadingComments(node,parent){const comments=node.leadingComments;null!=comments&&comments.length&&this._printComments(0,comments,node,parent)}_maybePrintInnerComments(nextTokenStr,nextTokenOccurrenceCount){var _this$tokenMap;this._endsWithInnerRaw&&this.printInnerComments(null==(_this$tokenMap=this.tokenMap)?void 0:_this$tokenMap.findMatching(this._currentNode,nextTokenStr,nextTokenOccurrenceCount));this._endsWithInnerRaw=!0,this._indentInnerComments=!0}printInnerComments(nextToken){const node=this._currentNode,comments=node.innerComments;if(null==comments||!comments.length)return;const hasSpace=this.endsWith(32),indent=this._indentInnerComments,printedCommentsCount=this._printedComments.size;indent&&this.indent(),this._printComments(1,comments,node,void 0,void 0,nextToken),hasSpace&&printedCommentsCount!==this._printedComments.size&&this.space(),indent&&this.dedent()}noIndentInnerCommentsHere(){this._indentInnerComments=!1}printSequence(nodes,indent,trailingCommentsLineOffset,addNewlines){this.printJoin(nodes,!0,null!=indent&&indent,void 0,void 0,addNewlines,void 0,trailingCommentsLineOffset)}printList(items,printTrailingSeparator,statement,indent,separator,iterator){this.printJoin(items,statement,indent,null!=separator?separator:commaSeparator,printTrailingSeparator,void 0,iterator)}shouldPrintTrailingComma(listEnd){if(!this.tokenMap)return null;const listEndIndex=this.tokenMap.findLastIndex(this._currentNode,token=>this.tokenMap.matchesOriginal(token,listEnd));return listEndIndex<=0?null:this.tokenMap.matchesOriginal(this._tokens[listEndIndex-1],",")}_printNewline(newLine,opts){const format=this.format;if(format.retainLines||format.compact)return;if(format.concise)return void this.space();if(!newLine)return;const startLine=opts.nextNodeStartLine,lastCommentLine=this._lastCommentLine;if(startLine>0&&lastCommentLine>0){const offset=startLine-lastCommentLine;if(offset>=0)return void this.newline(offset||1)}this._buf.hasContent()&&this.newline(1)}_shouldPrintComment(comment,nextToken){if(comment.ignore)return 0;if(this._printedComments.has(comment))return 0;if(this._noLineTerminator&&HAS_NEWLINE_OR_BlOCK_COMMENT_END.test(comment.value))return 2;if(nextToken&&this.tokenMap){const commentTok=this.tokenMap.find(this._currentNode,token=>token.value===comment.value);if(commentTok&&commentTok.start>nextToken.start)return 2}return this._printedComments.add(comment),this.format.shouldPrintComment(comment.value)?1:0}_printComment(comment,skipNewLines){const noLineTerminator=this._noLineTerminator,isBlockComment="CommentBlock"===comment.type,printNewLines=isBlockComment&&1!==skipNewLines&&!this._noLineTerminator;printNewLines&&this._buf.hasContent()&&2!==skipNewLines&&this.newline(1);const lastCharCode=this.getLastChar();let val;if(91!==lastCharCode&&123!==lastCharCode&&40!==lastCharCode&&this.space(),isBlockComment){if(val=`/*${comment.value}*/`,this.format.indent.adjustMultilineComment){var _comment$loc;const offset=null==(_comment$loc=comment.loc)?void 0:_comment$loc.start.column;if(offset){const newlineRegex=new RegExp("\\n\\s{1,"+offset+"}","g");val=val.replace(newlineRegex,"\n")}if(this.format.concise)val=val.replace(/\n(?!$)/g,"\n");else{let indentSize=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent(47)||this.format.retainLines)&&(indentSize+=this._getIndent()),val=val.replace(/\n(?!$)/g,`\n${" ".repeat(indentSize)}`)}}}else val=noLineTerminator?`/*${comment.value}*/`:`//${comment.value}`;if(this._endsWithDiv&&this._space(),this.tokenMap){const{_printSemicolonBeforeNextToken,_printSemicolonBeforeNextNode}=this;this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1,this.source("start",comment.loc),this._append(val,isBlockComment),this._printSemicolonBeforeNextNode=_printSemicolonBeforeNextNode,this._printSemicolonBeforeNextToken=_printSemicolonBeforeNextToken}else this.source("start",comment.loc),this._append(val,isBlockComment);isBlockComment||noLineTerminator||this.newline(1,!0),printNewLines&&3!==skipNewLines&&this.newline(1)}_printComments(type,comments,node,parent,lineOffset=0,nextToken){const nodeLoc=node.loc,len=comments.length;let hasLoc=!!nodeLoc;const nodeStartLine=hasLoc?nodeLoc.start.line:0,nodeEndLine=hasLoc?nodeLoc.end.line:0;let lastLine=0,leadingCommentNewline=0;const maybeNewline=this._noLineTerminator?function(){}:this.newline.bind(this);for(let i=0;i1||"ClassBody"===node.type||"TSInterfaceBody"===node.type?this._printComment(comment,0):this._printComment(comment,0===i?2:i===len-1?3:0)}}2===type&&hasLoc&&lastLine&&(this._lastCommentLine=lastLine)}}Object.assign(Printer.prototype,generatorFunctions),(0,_deprecated.addDeprecatedGenerators)(Printer);exports.default=Printer;function commaSeparator(occurrenceCount,last){this.token(",",!1,occurrenceCount),last||this.space()}},"./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/source-map.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _genMapping=__webpack_require__("./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.12/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js"),_traceMapping=__webpack_require__("./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js");exports.default=class{constructor(opts,code){var _opts$sourceFileName;this._map=void 0,this._rawMappings=void 0,this._sourceFileName=void 0,this._lastGenLine=0,this._lastSourceLine=0,this._lastSourceColumn=0,this._inputMap=void 0;const map=this._map=new _genMapping.GenMapping({sourceRoot:opts.sourceRoot});if(this._sourceFileName=null==(_opts$sourceFileName=opts.sourceFileName)?void 0:_opts$sourceFileName.replace(/\\/g,"/"),this._rawMappings=void 0,opts.inputSourceMap){this._inputMap=new _traceMapping.TraceMap(opts.inputSourceMap);const resolvedSources=this._inputMap.resolvedSources;if(resolvedSources.length)for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TokenMap=void 0;var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{traverseFast,VISITOR_KEYS}=_t;exports.TokenMap=class{constructor(ast,tokens,source){this._tokens=void 0,this._source=void 0,this._nodesToTokenIndexes=new Map,this._nodesOccurrencesCountCache=new Map,this._tokensCache=new Map,this._tokens=tokens,this._source=source,traverseFast(ast,node=>{const indexes=this._getTokensIndexesOfNode(node);indexes.length>0&&this._nodesToTokenIndexes.set(node,indexes)}),this._tokensCache=null}has(node){return this._nodesToTokenIndexes.has(node)}getIndexes(node){return this._nodesToTokenIndexes.get(node)}find(node,condition){const indexes=this._nodesToTokenIndexes.get(node);if(indexes)for(let k=0;k=0;k--){const index=indexes[k];if(condition(this._tokens[index],index))return index}return-1}findMatching(node,test,occurrenceCount=0){const indexes=this._nodesToTokenIndexes.get(node);if(indexes){let i=0;const count=occurrenceCount;if(count>1){const cache=this._nodesOccurrencesCountCache.get(node);cache&&cache.test===test&&cache.count0&&this._nodesOccurrencesCountCache.set(node,{test,count,i}),tok;occurrenceCount--}}}return null}matchesOriginal(token,test){return token.end-token.start===test.length&&(null!=token.value?token.value===test:this._source.startsWith(test,token.start))}startMatches(node,test){const indexes=this._nodesToTokenIndexes.get(node);if(!indexes)return!1;const tok=this._tokens[indexes[0]];return tok.start===node.start&&this.matchesOriginal(tok,test)}endMatches(node,test){const indexes=this._nodesToTokenIndexes.get(node);if(!indexes)return!1;const tok=this._tokens[indexes[indexes.length-1]];return tok.end===node.end&&this.matchesOriginal(tok,test)}_getTokensIndexesOfNode(node){if(null==node.start||null==node.end)return[];const{first,last}=this._findTokensOfNode(node,0,this._tokens.length-1);let low=first;const children=function*(node){if("TemplateLiteral"===node.type){yield node.quasis[0];for(let i=1;i>1;if(startthis._tokens[mid].start))return mid;low=mid+1}}return low}_findLastTokenOfNode(end,low,high){for(;low<=high;){const mid=high+low>>1;if(endthis._tokens[mid].end))return mid;low=mid+1}}return high}}},"./node_modules/.pnpm/@babel+helper-annotate-as-pure@7.27.3/node_modules/@babel/helper-annotate-as-pure/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(pathOrNode){const node=pathOrNode.node||pathOrNode;if(isPureAnnotated(node))return;addComment(node,"leading",PURE_ANNOTATION)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{addComment}=_t,PURE_ANNOTATION="#__PURE__",isPureAnnotated=({leadingComments})=>!!leadingComments&&leadingComments.some(comment=>/[@#]__PURE__/.test(comment.value))},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/decorators-2018-09.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildDecoratedClass=function(ref,path,elements,file){const{node,scope}=path,initializeId=scope.generateUidIdentifier("initialize"),isDeclaration=node.id&&path.isDeclaration(),isStrict=path.isInStrictMode(),{superClass}=node;node.type="ClassDeclaration",node.id||(node.id=_core.types.cloneNode(ref));let superId;superClass&&(superId=scope.generateUidIdentifierBasedOnNode(node.superClass,"super"),node.superClass=superId);const classDecorators=takeDecorators(node),definitions=_core.types.arrayExpression(elements.filter(element=>!element.node.abstract&&"TSIndexSignature"!==element.node.type).map(path=>function(file,classRef,superRef,path){const isMethod=path.isClassMethod();if(path.isPrivate())throw path.buildCodeFrameError(`Private ${isMethod?"methods":"fields"} in decorated classes are not supported yet.`);if("ClassAccessorProperty"===path.node.type)throw path.buildCodeFrameError('Accessor properties are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.');if("StaticBlock"===path.node.type)throw path.buildCodeFrameError('Static blocks are not supported in 2018-09 decorator transform, please specify { "version": "2021-12" } instead.');const{node,scope}=path;path.isTSDeclareMethod()||new _helperReplaceSupers.default({methodPath:path,objectRef:classRef,superRef,file,refToPreserve:classRef}).replace();const properties=[prop("kind",_core.types.stringLiteral(_core.types.isClassMethod(node)?node.kind:"field")),prop("decorators",takeDecorators(node)),prop("static",node.static&&_core.types.booleanLiteral(!0)),prop("key",getKey(node))].filter(Boolean);if(isMethod){null!=path.ensureFunctionName||(path.ensureFunctionName=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").NodePath.prototype.ensureFunctionName),path.ensureFunctionName(!1),properties.push(prop("value",_core.types.toExpression(path.node)))}else _core.types.isClassProperty(node)&&node.value?properties.push((key="value",body=_core.template.statements.ast`return ${node.value}`,_core.types.objectMethod("method",_core.types.identifier(key),[],_core.types.blockStatement(body)))):properties.push(prop("value",scope.buildUndefinedNode()));var key,body;return path.remove(),_core.types.objectExpression(properties)}(file,node.id,superId,path))),wrapperCall=_core.template.expression.ast` + ${function(file){return file.addHelper("decorate")}(file)}( + ${classDecorators||_core.types.nullLiteral()}, + function (${initializeId}, ${superClass?_core.types.cloneNode(superId):null}) { + ${node} + return { F: ${_core.types.cloneNode(node.id)}, d: ${definitions} }; + }, + ${superClass} + ) + `;isStrict||wrapperCall.arguments[1].body.directives.push(_core.types.directive(_core.types.directiveLiteral("use strict")));let replacement=wrapperCall,classPathDesc="arguments.1.body.body.0";isDeclaration&&(replacement=_core.template.statement.ast`let ${ref} = ${wrapperCall}`,classPathDesc="declarations.0.init."+classPathDesc);return{instanceNodes:[_core.template.statement.ast` + ${_core.types.cloneNode(initializeId)}(this) + `],wrapClass:path=>(path.replaceWith(replacement),path.get(classPathDesc))}};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_helperReplaceSupers=__webpack_require__("./node_modules/.pnpm/@babel+helper-replace-supers@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-replace-supers/lib/index.js");function prop(key,value){return value?_core.types.objectProperty(_core.types.identifier(key),value):null}function takeDecorators(node){let result;return node.decorators&&node.decorators.length>0&&(result=_core.types.arrayExpression(node.decorators.map(decorator=>decorator.expression))),node.decorators=void 0,result}function getKey(node){return node.computed?node.key:_core.types.isIdentifier(node.key)?_core.types.stringLiteral(node.key.name):_core.types.stringLiteral(String(node.key.value))}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function({assertVersion,assumption},{loose},version,inherits){var _assumption,_assumption2;assertVersion("2023-11"===version||"2023-05"===version||"2023-01"===version?"^7.21.0":"2021-12"===version?"^7.16.0":"^7.19.0");const VISITED=new WeakSet,constantSuper=null!=(_assumption=assumption("constantSuper"))?_assumption:loose,ignoreFunctionLength=null!=(_assumption2=assumption("ignoreFunctionLength"))?_assumption2:loose,namedEvaluationVisitor=function(isAnonymous,visitor){function handleComputedProperty(propertyPath,key,state){switch(key.type){case"StringLiteral":return _core.types.stringLiteral(key.value);case"NumericLiteral":case"BigIntLiteral":{const keyValue=key.value+"";return propertyPath.get("key").replaceWith(_core.types.stringLiteral(keyValue)),_core.types.stringLiteral(keyValue)}default:{const ref=propertyPath.scope.maybeGenerateMemoised(key);return propertyPath.get("key").replaceWith(_core.types.assignmentExpression("=",ref,createToPropertyKeyCall(state,key))),_core.types.cloneNode(ref)}}}return{VariableDeclarator(path,state){const id=path.node.id;if("Identifier"===id.type){const initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("init"));if(isAnonymous(initializer)){const name=id.name;visitor(initializer,state,name)}}},AssignmentExpression(path,state){const id=path.node.left;if("Identifier"===id.type){const initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("right"));if(isAnonymous(initializer))switch(path.node.operator){case"=":case"&&=":case"||=":case"??=":visitor(initializer,state,id.name)}}},AssignmentPattern(path,state){const id=path.node.left;if("Identifier"===id.type){const initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("right"));if(isAnonymous(initializer)){const name=id.name;visitor(initializer,state,name)}}},ObjectExpression(path,state){for(const propertyPath of path.get("properties")){if(!propertyPath.isObjectProperty())continue;const{node}=propertyPath,id=node.key,initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(propertyPath.get("value"));if(isAnonymous(initializer))if(node.computed){const ref=handleComputedProperty(propertyPath,id,state);visitor(initializer,state,ref)}else if(!isProtoKey(id))if("Identifier"===id.type)visitor(initializer,state,id.name);else{const className=_core.types.stringLiteral(id.value+"");visitor(initializer,state,className)}}},ClassPrivateProperty(path,state){const{node}=path,initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("value"));if(isAnonymous(initializer)){const className=_core.types.stringLiteral("#"+node.key.id.name);visitor(initializer,state,className)}},ClassAccessorProperty(path,state){const{node}=path,id=node.key,initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("value"));if(isAnonymous(initializer))if(node.computed){const ref=handleComputedProperty(path,id,state);visitor(initializer,state,ref)}else if("Identifier"===id.type)visitor(initializer,state,id.name);else if("PrivateName"===id.type){const className=_core.types.stringLiteral("#"+id.id.name);visitor(initializer,state,className)}else{const className=_core.types.stringLiteral(id.value+"");visitor(initializer,state,className)}},ClassProperty(path,state){const{node}=path,id=node.key,initializer=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("value"));if(isAnonymous(initializer))if(node.computed){const ref=handleComputedProperty(path,id,state);visitor(initializer,state,ref)}else if("Identifier"===id.type)visitor(initializer,state,id.name);else{const className=_core.types.stringLiteral(id.value+"");visitor(initializer,state,className)}}}}(isDecoratedAnonymousClassExpression,visitClass);function visitClass(path,state,className){var _node$id;if(VISITED.has(path))return;const{node}=path;null!=className||(className=null==(_node$id=node.id)?void 0:_node$id.name);const newPath=function(path,state,constantSuper,ignoreFunctionLength,className,propertyVisitor,version){var _path$node$id;const body=path.get("body.body"),classDecorators=path.node.decorators;let hasElementDecorators=!1,hasComputedKeysSideEffects=!1,elemDecsUseFnContext=!1;const generateClassPrivateUid=function(classPath){let generator;return()=>(generator||(generator=function(classPath){const currentPrivateId=[],privateNames=new Set;return classPath.traverse({PrivateName(path){privateNames.add(path.node.id.name)}}),()=>{let reifiedId;do{incrementId(currentPrivateId),reifiedId=String.fromCharCode(...currentPrivateId)}while(privateNames.has(reifiedId));return _core.types.privateName(_core.types.identifier(reifiedId))}}(classPath)),generator())}(path),classAssignments=[],scopeParent=path.scope.parent,memoiseExpression=(expression,hint,assignments)=>{const localEvaluatedId=generateLetUidIdentifier(scopeParent,hint);return assignments.push(_core.types.assignmentExpression("=",localEvaluatedId,expression)),_core.types.cloneNode(localEvaluatedId)};let protoInitLocal,staticInitLocal;const classIdName=null==(_path$node$id=path.node.id)?void 0:_path$node$id.name,setClassName="object"==typeof className?className:void 0,usesFunctionContextOrYieldAwait=decorator=>{try{return _core.types.traverseFast(decorator,node=>{if(_core.types.isThisExpression(node)||_core.types.isSuper(node)||_core.types.isYieldExpression(node)||_core.types.isAwaitExpression(node)||_core.types.isIdentifier(node,{name:"arguments"})||classIdName&&_core.types.isIdentifier(node,{name:classIdName})||_core.types.isMetaProperty(node)&&"import"!==node.meta.name)throw null}),!1}catch(_unused2){return!0}},instancePrivateNames=[];for(const element of body){if(!isClassDecoratableElementPath(element))continue;const elementNode=element.node;if(!elementNode.static&&_core.types.isPrivateName(elementNode.key)&&instancePrivateNames.push(elementNode.key.id.name),isDecorated(elementNode)){switch(elementNode.type){case"ClassProperty":propertyVisitor.ClassProperty(element,state);break;case"ClassPrivateProperty":propertyVisitor.ClassPrivateProperty(element,state);break;case"ClassAccessorProperty":if(propertyVisitor.ClassAccessorProperty(element,state),"2023-11"===version)break;default:elementNode.static?null!=staticInitLocal||(staticInitLocal=generateLetUidIdentifier(scopeParent,"initStatic")):null!=protoInitLocal||(protoInitLocal=generateLetUidIdentifier(scopeParent,"initProto"))}hasElementDecorators=!0,elemDecsUseFnContext||(elemDecsUseFnContext=elementNode.decorators.some(usesFunctionContextOrYieldAwait))}else if("ClassAccessorProperty"===elementNode.type){propertyVisitor.ClassAccessorProperty(element,state);const{key,value,static:isStatic,computed}=elementNode,newId=generateClassPrivateUid(),newField=generateClassProperty(newId,value,isStatic),keyPath=element.get("key"),[newPath]=element.replaceWith(newField);let getterKey,setterKey;computed&&!keyPath.isConstantExpression()?(getterKey=(0,_misc.memoiseComputedKey)(createToPropertyKeyCall(state,key),scopeParent,scopeParent.generateUid("computedKey")),setterKey=_core.types.cloneNode(getterKey.left)):(getterKey=_core.types.cloneNode(key),setterKey=_core.types.cloneNode(key)),assignIdForAnonymousClass(path,className),addProxyAccessorsFor(path.node.id,newPath,getterKey,setterKey,newId,computed,isStatic,version)}"computed"in element.node&&element.node.computed&&(hasComputedKeysSideEffects||(hasComputedKeysSideEffects=!scopeParent.isStatic(element.node.key)))}if(!classDecorators&&!hasElementDecorators)return path.node.id||"string"!=typeof className||(path.node.id=_core.types.identifier(className)),void(setClassName&&path.node.body.body.unshift(createStaticBlockFromExpressions([createSetFunctionNameCall(state,setClassName)])));const elementDecoratorInfo=[];let constructorPath;const decoratedPrivateMethods=new Set;let classInitLocal,classIdLocal,decoratorReceiverId=null;function handleDecorators(decorators){let hasSideEffects=!1,usesFnContext=!1;const decoratorsThis=[];for(const decorator of decorators){const{expression}=decorator;let object;"2023-11"!==version&&"2023-05"!==version||!_core.types.isMemberExpression(expression)||(_core.types.isSuper(expression.object)?object=_core.types.thisExpression():scopeParent.isStatic(expression.object)?object=_core.types.cloneNode(expression.object):(null!=decoratorReceiverId||(decoratorReceiverId=generateLetUidIdentifier(scopeParent,"obj")),object=_core.types.assignmentExpression("=",_core.types.cloneNode(decoratorReceiverId),expression.object),expression.object=_core.types.cloneNode(decoratorReceiverId))),decoratorsThis.push(object),hasSideEffects||(hasSideEffects=!scopeParent.isStatic(expression)),usesFnContext||(usesFnContext=usesFunctionContextOrYieldAwait(decorator))}return{hasSideEffects,usesFnContext,decoratorsThis}}const willExtractSomeElemDecs=hasComputedKeysSideEffects||elemDecsUseFnContext||"2023-11"!==version;let classDecorationsId,lastInstancePrivateName,needsDeclaraionForClassBinding=!1,classDecorationsFlag=0,classDecorations=[],computedKeyAssignments=[];if(classDecorators){classInitLocal=generateLetUidIdentifier(scopeParent,"initClass"),needsDeclaraionForClassBinding=path.isClassDeclaration(),({id:classIdLocal,path}=function(path,className){const id=path.node.id,scope=path.scope;if("ClassDeclaration"===path.type){const className=id.name,varId=scope.generateUidIdentifierBasedOnNode(id),classId=_core.types.identifier(className);return scope.rename(className,varId.name),path.get("id").replaceWith(classId),{id:_core.types.cloneNode(varId),path}}{let varId;id?(className=id.name,varId=generateLetUidIdentifier(scope.parent,className),scope.rename(className,varId.name)):varId=generateLetUidIdentifier(scope.parent,"string"==typeof className?className:"decorated_class");const newClassExpr=_core.types.classExpression("string"==typeof className?_core.types.identifier(className):null,path.node.superClass,path.node.body),[newPath]=path.replaceWith(_core.types.sequenceExpression([newClassExpr,varId]));return{id:_core.types.cloneNode(varId),path:newPath.get("expressions.0")}}}(path,className)),path.node.decorators=null;const classDecsUsePrivateName=classDecorators.some(usesPrivateField),{hasSideEffects,usesFnContext,decoratorsThis}=handleDecorators(classDecorators),{haveThis,decs}=generateDecorationList(classDecorators,decoratorsThis,version);if(classDecorationsFlag=haveThis?1:0,classDecorations=decs,(usesFnContext||hasSideEffects&&willExtractSomeElemDecs||classDecsUsePrivateName)&&(classDecorationsId=memoiseExpression(_core.types.arrayExpression(classDecorations),"classDecs",classAssignments)),!hasElementDecorators)for(const element of path.get("body.body")){const{node}=element;if("computed"in node&&node.computed)if(element.isClassProperty({static:!0})){if(!element.get("key").isConstantExpression()){const key=node.key,maybeAssignment=(0,_misc.memoiseComputedKey)(key,scopeParent,scopeParent.generateUid("computedKey"));null!=maybeAssignment&&(node.key=_core.types.cloneNode(maybeAssignment.left),computedKeyAssignments.push(maybeAssignment))}}else computedKeyAssignments.length>0&&(prependExpressionsToComputedKey(computedKeyAssignments,element),computedKeyAssignments=[])}}else assignIdForAnonymousClass(path,className),classIdLocal=_core.types.cloneNode(path.node.id);let needsInstancePrivateBrandCheck=!1,fieldInitializerExpressions=[],staticFieldInitializerExpressions=[];if(hasElementDecorators){if(protoInitLocal){const protoInitCall=_core.types.callExpression(_core.types.cloneNode(protoInitLocal),[_core.types.thisExpression()]);fieldInitializerExpressions.push(protoInitCall)}for(const element of body){if(!isClassDecoratableElementPath(element)){staticFieldInitializerExpressions.length>0&&element.isStaticBlock()&&(prependExpressionsToStaticBlock(staticFieldInitializerExpressions,element),staticFieldInitializerExpressions=[]);continue}const{node}=element,decorators=node.decorators,hasDecorators=!(null==decorators||!decorators.length),isComputed="computed"in node&&node.computed;let decoratorsArray,decoratorsHaveThis,name="computedKey";if("PrivateName"===node.key.type?name=node.key.id.name:isComputed||"Identifier"!==node.key.type||(name=node.key.name),hasDecorators){const{hasSideEffects,usesFnContext,decoratorsThis}=handleDecorators(decorators),{decs,haveThis}=generateDecorationList(decorators,decoratorsThis,version);decoratorsHaveThis=haveThis,decoratorsArray=1===decs.length?decs[0]:_core.types.arrayExpression(decs),(usesFnContext||hasSideEffects&&willExtractSomeElemDecs)&&(decoratorsArray=memoiseExpression(decoratorsArray,name+"Decs",computedKeyAssignments))}if(isComputed&&!element.get("key").isConstantExpression()){const key=node.key,maybeAssignment=(0,_misc.memoiseComputedKey)(hasDecorators?createToPropertyKeyCall(state,key):key,scopeParent,scopeParent.generateUid("computedKey"));null!=maybeAssignment&&(classDecorators&&element.isClassProperty({static:!0})?(node.key=_core.types.cloneNode(maybeAssignment.left),computedKeyAssignments.push(maybeAssignment)):node.key=maybeAssignment)}const{key,static:isStatic}=node,isPrivate="PrivateName"===key.type,kind=getElementKind(element);let locals;if(isPrivate&&!isStatic&&(hasDecorators&&(needsInstancePrivateBrandCheck=!0),!_core.types.isClassPrivateProperty(node)&&lastInstancePrivateName||(lastInstancePrivateName=key)),element.isClassMethod({kind:"constructor"})&&(constructorPath=element),hasDecorators){let privateMethods,nameExpr;if(nameExpr=isComputed?getComputedKeyMemoiser(element.get("key")):"PrivateName"===key.type?_core.types.stringLiteral(key.id.name):"Identifier"===key.type?_core.types.stringLiteral(key.name):_core.types.cloneNode(key),kind===ACCESSOR){const{value}=element.node,params="2023-11"===version&&isStatic?[]:[_core.types.thisExpression()];value&¶ms.push(_core.types.cloneNode(value));const newId=generateClassPrivateUid(),newFieldInitId=generateLetUidIdentifier(scopeParent,`init_${name}`),newField=generateClassProperty(newId,_core.types.callExpression(_core.types.cloneNode(newFieldInitId),params),isStatic),[newPath]=element.replaceWith(newField);if(isPrivate){privateMethods=extractProxyAccessorsFor(newId,version);const getId=generateLetUidIdentifier(scopeParent,`get_${name}`),setId=generateLetUidIdentifier(scopeParent,`set_${name}`);addCallAccessorsFor(version,newPath,key,getId,setId,isStatic),locals=[newFieldInitId,getId,setId]}else assignIdForAnonymousClass(path,className),addProxyAccessorsFor(path.node.id,newPath,_core.types.cloneNode(key),_core.types.isAssignmentExpression(key)?_core.types.cloneNode(key.left):_core.types.cloneNode(key),newId,isComputed,isStatic,version),locals=[newFieldInitId]}else if(kind===FIELD){const initId=generateLetUidIdentifier(scopeParent,`init_${name}`),valuePath=element.get("value"),args="2023-11"===version&&isStatic?[]:[_core.types.thisExpression()];valuePath.node&&args.push(valuePath.node),valuePath.replaceWith(_core.types.callExpression(_core.types.cloneNode(initId),args)),locals=[initId],isPrivate&&(privateMethods=extractProxyAccessorsFor(key,version))}else if(isPrivate){const callId=generateLetUidIdentifier(scopeParent,`call_${name}`);locals=[callId];if(new _helperReplaceSupers.default({constantSuper,methodPath:element,objectRef:classIdLocal,superRef:path.node.superClass,file:state.file,refToPreserve:classIdLocal}).replace(),privateMethods=[createFunctionExpressionFromPrivateMethod(element.node)],kind===GETTER||kind===SETTER)movePrivateAccessor(element,_core.types.cloneNode(key),_core.types.cloneNode(callId),isStatic);else{const node=element.node;path.node.body.body.unshift(_core.types.classPrivateProperty(key,_core.types.cloneNode(callId),[],node.static)),decoratedPrivateMethods.add(key.id.name),element.remove()}}elementDecoratorInfo.push({kind,decoratorsArray,decoratorsHaveThis,name:nameExpr,isStatic,privateMethods,locals}),element.node&&(element.node.decorators=null)}if(isComputed&&computedKeyAssignments.length>0&&(classDecorators&&element.isClassProperty({static:!0})||(prependExpressionsToComputedKey(computedKeyAssignments,kind===ACCESSOR?element.getNextSibling():element),computedKeyAssignments=[])),fieldInitializerExpressions.length>0&&!isStatic&&(kind===FIELD||kind===ACCESSOR)&&(prependExpressionsToFieldInitializer(fieldInitializerExpressions,element),fieldInitializerExpressions=[]),staticFieldInitializerExpressions.length>0&&isStatic&&(kind===FIELD||kind===ACCESSOR)&&(prependExpressionsToFieldInitializer(staticFieldInitializerExpressions,element),staticFieldInitializerExpressions=[]),hasDecorators&&"2023-11"===version&&(kind===FIELD||kind===ACCESSOR)){const initExtraId=generateLetUidIdentifier(scopeParent,`init_extra_${name}`);locals.push(initExtraId);const initExtraCall=_core.types.callExpression(_core.types.cloneNode(initExtraId),isStatic?[]:[_core.types.thisExpression()]);isStatic?staticFieldInitializerExpressions.push(initExtraCall):fieldInitializerExpressions.push(initExtraCall)}}}if(computedKeyAssignments.length>0){const elements=path.get("body.body");let lastComputedElement;for(let i=elements.length-1;i>=0;i--){const path=elements[i],node=path.node;if(node.computed){if(classDecorators&&_core.types.isClassProperty(node,{static:!0}))continue;lastComputedElement=path;break}}null!=lastComputedElement&&(!function(expressions,fieldPath){const key=fieldPath.get("key"),completion=getComputedKeyLastElement(key);if(completion.isConstantExpression())prependExpressionsToComputedKey(expressions,fieldPath);else{const scopeParent=key.scope.parent,maybeAssignment=(0,_misc.memoiseComputedKey)(completion.node,scopeParent,scopeParent.generateUid("computedKey"));if(maybeAssignment){const expressionSequence=[...expressions,_core.types.cloneNode(maybeAssignment.left)],completionParent=completion.parentPath;completionParent.isSequenceExpression()?completionParent.pushContainer("expressions",expressionSequence):completion.replaceWith(maybeSequenceExpression([_core.types.cloneNode(maybeAssignment),...expressionSequence]))}else prependExpressionsToComputedKey(expressions,fieldPath)}}(computedKeyAssignments,lastComputedElement),computedKeyAssignments=[])}if(fieldInitializerExpressions.length>0){const isDerivedClass=!!path.node.superClass;constructorPath?isDerivedClass?function(expressions,constructorPath,protoInitLocal){constructorPath.traverse({CallExpression:{exit(path){if(!path.get("callee").isSuper())return;const newNodes=[path.node,...expressions.map(expr=>_core.types.cloneNode(expr))];path.isCompletionRecord()&&newNodes.push(_core.types.thisExpression()),path.replaceWith(function(expressions,protoInitLocal){if(protoInitLocal){if(expressions.length>=2&&isProtoInitCallExpression(expressions[1],protoInitLocal)){const mergedSuperCall=_core.types.callExpression(_core.types.cloneNode(protoInitLocal),[expressions[0]]);expressions.splice(0,2,mergedSuperCall)}expressions.length>=2&&_core.types.isThisExpression(expressions[expressions.length-1])&&isProtoInitCallExpression(expressions[expressions.length-2],protoInitLocal)&&expressions.splice(expressions.length-1,1)}return maybeSequenceExpression(expressions)}(newNodes,protoInitLocal)),path.skip()}},ClassMethod(path){"constructor"===path.node.kind&&path.skip()}})}(fieldInitializerExpressions,constructorPath,protoInitLocal):function(expressions,constructorPath){constructorPath.node.body.body.unshift(_core.types.expressionStatement(maybeSequenceExpression(expressions)))}(fieldInitializerExpressions,constructorPath):path.node.body.body.unshift(createConstructorFromExpressions(fieldInitializerExpressions,isDerivedClass)),fieldInitializerExpressions=[]}staticFieldInitializerExpressions.length>0&&(path.node.body.body.push(createStaticBlockFromExpressions(staticFieldInitializerExpressions)),staticFieldInitializerExpressions=[]);const sortedElementDecoratorInfo=(info=elementDecoratorInfo,[...info.filter(el=>el.isStatic&&el.kind>=ACCESSOR&&el.kind<=SETTER),...info.filter(el=>!el.isStatic&&el.kind>=ACCESSOR&&el.kind<=SETTER),...info.filter(el=>el.isStatic&&el.kind===FIELD),...info.filter(el=>!el.isStatic&&el.kind===FIELD)]),elementDecorations=function(decorationInfo,version){return _core.types.arrayExpression(decorationInfo.map(el=>{let flag=el.kind;return el.isStatic&&(flag+="2023-11"===version||"2023-05"===version?STATIC:STATIC_OLD_VERSION),el.decoratorsHaveThis&&(flag+=DECORATORS_HAVE_THIS),_core.types.arrayExpression([el.decoratorsArray,_core.types.numericLiteral(flag),el.name,...el.privateMethods||[]])}))}("2023-11"===version?elementDecoratorInfo:sortedElementDecoratorInfo,version),elementLocals=function(decorationInfo){const localIds=[];for(const el of decorationInfo){const{locals}=el;Array.isArray(locals)?localIds.push(...locals):void 0!==locals&&localIds.push(locals)}return localIds}(sortedElementDecoratorInfo);var info;protoInitLocal&&elementLocals.push(protoInitLocal);staticInitLocal&&elementLocals.push(staticInitLocal);const classLocals=[];let classInitInjected=!1;const classInitCall=classInitLocal&&_core.types.callExpression(_core.types.cloneNode(classInitLocal),[]);let originalClassPath=path;const originalClass=path.node,staticClosures=[];if(classDecorators){classLocals.push(classIdLocal,classInitLocal);const statics=[];if(path.get("body.body").forEach(element=>{if(element.isStaticBlock()){if(hasInstancePrivateAccess(element,instancePrivateNames)){const staticBlockClosureId=memoiseExpression((block=element.node,_core.types.functionExpression(null,[],_core.types.blockStatement(block.body))),"staticBlock",staticClosures);staticFieldInitializerExpressions.push(_core.types.callExpression(_core.types.memberExpression(staticBlockClosureId,_core.types.identifier("call")),[_core.types.thisExpression()]))}else staticFieldInitializerExpressions.push(function(block){return _core.types.callExpression(_core.types.arrowFunctionExpression([],_core.types.blockStatement(block.body)),[])}(element.node));element.remove()}else{var block;if((element.isClassProperty()||element.isClassPrivateProperty())&&element.node.static){const valuePath=element.get("value");if(hasInstancePrivateAccess(valuePath,instancePrivateNames)){const fieldValueClosureId=memoiseExpression(function(value){return _core.types.functionExpression(null,[],_core.types.blockStatement([_core.types.returnStatement(value)]))}(valuePath.node),"fieldValue",staticClosures);valuePath.replaceWith(_core.types.callExpression(_core.types.memberExpression(fieldValueClosureId,_core.types.identifier("call")),[_core.types.thisExpression()]))}staticFieldInitializerExpressions.length>0&&(prependExpressionsToFieldInitializer(staticFieldInitializerExpressions,element),staticFieldInitializerExpressions=[]),element.node.static=!1,statics.push(element.node),element.remove()}else if(element.isClassPrivateMethod({static:!0})){if(hasInstancePrivateAccess(element,instancePrivateNames)){new _helperReplaceSupers.default({constantSuper,methodPath:element,objectRef:classIdLocal,superRef:path.node.superClass,file:state.file,refToPreserve:classIdLocal}).replace();const privateMethodDelegateId=memoiseExpression(createFunctionExpressionFromPrivateMethod(element.node),element.get("key.id").node.name,staticClosures);ignoreFunctionLength?(element.node.params=[_core.types.restElement(_core.types.identifier("arg"))],element.node.body=_core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.memberExpression(privateMethodDelegateId,_core.types.identifier("apply")),[_core.types.thisExpression(),_core.types.identifier("arg")]))])):(element.node.params=element.node.params.map((p,i)=>_core.types.isRestElement(p)?_core.types.restElement(_core.types.identifier("arg")):_core.types.identifier("_"+i)),element.node.body=_core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.memberExpression(privateMethodDelegateId,_core.types.identifier("apply")),[_core.types.thisExpression(),_core.types.identifier("arguments")]))]))}element.node.static=!1,statics.push(element.node),element.remove()}}}),statics.length>0||staticFieldInitializerExpressions.length>0){const staticsClass=_core.template.expression.ast` + class extends ${state.addHelper("identity")} {} + `;staticsClass.body.body=[_core.types.classProperty(_core.types.toExpression(originalClass),void 0,void 0,void 0,!0,!0),...statics];const constructorBody=[],newExpr=_core.types.newExpression(staticsClass,[]);staticFieldInitializerExpressions.length>0&&constructorBody.push(...staticFieldInitializerExpressions),classInitCall&&(classInitInjected=!0,constructorBody.push(classInitCall)),constructorBody.length>0?(constructorBody.unshift(_core.types.callExpression(_core.types.super(),[_core.types.cloneNode(classIdLocal)])),staticsClass.body.body.push(createConstructorFromExpressions(constructorBody,!1))):newExpr.arguments.push(_core.types.cloneNode(classIdLocal));const[newPath]=path.replaceWith(newExpr);originalClassPath=newPath.get("callee").get("body").get("body.0.key")}}!classInitInjected&&classInitCall&&path.node.body.body.push(_core.types.staticBlock([_core.types.expressionStatement(classInitCall)]));let{superClass}=originalClass;if(superClass&&("2023-11"===version||"2023-05"===version)){const id=path.scope.maybeGenerateMemoised(superClass);id&&(originalClass.superClass=_core.types.assignmentExpression("=",id,superClass),superClass=id)}const applyDecoratorWrapper=_core.types.staticBlock([]);originalClass.body.body.unshift(applyDecoratorWrapper);const applyDecsBody=applyDecoratorWrapper.body;if(computedKeyAssignments.length>0){const elements=originalClassPath.get("body.body");let firstPublicElement;for(const path of elements)if((path.isClassProperty()||path.isClassMethod())&&"constructor"!==path.node.kind){firstPublicElement=path;break}null!=firstPublicElement?(!function(path){const{node}=path;node.computed=!0,_core.types.isIdentifier(node.key)&&(node.key=_core.types.stringLiteral(node.key.name))}(firstPublicElement),prependExpressionsToComputedKey(computedKeyAssignments,firstPublicElement)):(originalClass.body.body.unshift(_core.types.classProperty(_core.types.sequenceExpression([...computedKeyAssignments,_core.types.stringLiteral("_")]),void 0,void 0,void 0,!0,!0)),applyDecsBody.push(_core.types.expressionStatement(_core.types.unaryExpression("delete",_core.types.memberExpression(_core.types.thisExpression(),_core.types.identifier("_")))))),computedKeyAssignments=[]}applyDecsBody.push(_core.types.expressionStatement(function(elementLocals,classLocals,elementDecorations,classDecorations,classDecorationsFlag,maybePrivateBrandName,setClassName,superClass,state,version){let lhs,rhs;const args=[setClassName?createSetFunctionNameCall(state,setClassName):_core.types.thisExpression(),classDecorations,elementDecorations];"2023-11"!==version&&args.splice(1,2,elementDecorations,classDecorations);if("2021-12"===version||"2022-03"===version&&!state.availableHelper("applyDecs2203R"))return lhs=_core.types.arrayPattern([...elementLocals,...classLocals]),rhs=_core.types.callExpression(state.addHelper("2021-12"===version?"applyDecs":"applyDecs2203"),args),_core.types.assignmentExpression("=",lhs,rhs);"2022-03"===version?rhs=_core.types.callExpression(state.addHelper("applyDecs2203R"),args):"2023-01"===version?(maybePrivateBrandName&&args.push(createPrivateBrandCheckClosure(maybePrivateBrandName)),rhs=_core.types.callExpression(state.addHelper("applyDecs2301"),args)):"2023-05"===version&&((maybePrivateBrandName||superClass||0!==classDecorationsFlag.value)&&args.push(classDecorationsFlag),maybePrivateBrandName?args.push(createPrivateBrandCheckClosure(maybePrivateBrandName)):superClass&&args.push(_core.types.unaryExpression("void",_core.types.numericLiteral(0))),superClass&&args.push(superClass),rhs=_core.types.callExpression(state.addHelper("applyDecs2305"),args));"2023-11"===version&&((maybePrivateBrandName||superClass||0!==classDecorationsFlag.value)&&args.push(classDecorationsFlag),maybePrivateBrandName?args.push(createPrivateBrandCheckClosure(maybePrivateBrandName)):superClass&&args.push(_core.types.unaryExpression("void",_core.types.numericLiteral(0))),superClass&&args.push(superClass),rhs=_core.types.callExpression(state.addHelper("applyDecs2311"),args));elementLocals.length>0?classLocals.length>0?lhs=_core.types.objectPattern([_core.types.objectProperty(_core.types.identifier("e"),_core.types.arrayPattern(elementLocals)),_core.types.objectProperty(_core.types.identifier("c"),_core.types.arrayPattern(classLocals))]):(lhs=_core.types.arrayPattern(elementLocals),rhs=_core.types.memberExpression(rhs,_core.types.identifier("e"),!1,!1)):(lhs=_core.types.arrayPattern(classLocals),rhs=_core.types.memberExpression(rhs,_core.types.identifier("c"),!1,!1));return _core.types.assignmentExpression("=",lhs,rhs)}(elementLocals,classLocals,elementDecorations,null!=classDecorationsId?classDecorationsId:_core.types.arrayExpression(classDecorations),_core.types.numericLiteral(classDecorationsFlag),needsInstancePrivateBrandCheck?lastInstancePrivateName:null,setClassName,_core.types.cloneNode(superClass),state,version))),staticInitLocal&&applyDecsBody.push(_core.types.expressionStatement(_core.types.callExpression(_core.types.cloneNode(staticInitLocal),[_core.types.thisExpression()])));staticClosures.length>0&&applyDecsBody.push(...staticClosures.map(expr=>_core.types.expressionStatement(expr)));if(path.insertBefore(classAssignments.map(expr=>_core.types.expressionStatement(expr))),needsDeclaraionForClassBinding){if(scopeParent.getBinding(classIdLocal.name).constantViolations.length){const classOuterBindingDelegateLocal=scopeParent.generateUidIdentifier("t"+classIdLocal.name),classOuterBindingLocal=classIdLocal;path.replaceWithMultiple([_core.types.variableDeclaration("let",[_core.types.variableDeclarator(_core.types.cloneNode(classOuterBindingLocal)),_core.types.variableDeclarator(classOuterBindingDelegateLocal)]),_core.types.blockStatement([_core.types.variableDeclaration("let",[_core.types.variableDeclarator(_core.types.cloneNode(classIdLocal))]),path.node,_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.cloneNode(classOuterBindingDelegateLocal),_core.types.cloneNode(classIdLocal)))]),_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.cloneNode(classOuterBindingLocal),_core.types.cloneNode(classOuterBindingDelegateLocal)))])}else path.insertBefore(_core.types.variableDeclaration("let",[_core.types.variableDeclarator(_core.types.cloneNode(classIdLocal))]))}decoratedPrivateMethods.size>0&&function(path,decoratedPrivateMethods){const privateNameVisitor=(0,_fields.privateNameVisitorFactory)({PrivateName(path,state){if(!state.privateNamesMap.has(path.node.id.name))return;const parentPath=path.parentPath,parentParentPath=parentPath.parentPath;if("AssignmentExpression"===parentParentPath.node.type&&parentParentPath.node.left===parentPath.node||"UpdateExpression"===parentParentPath.node.type||"RestElement"===parentParentPath.node.type||"ArrayPattern"===parentParentPath.node.type||"ObjectProperty"===parentParentPath.node.type&&parentParentPath.node.value===parentPath.node&&"ObjectPattern"===parentParentPath.parentPath.type||"ForOfStatement"===parentParentPath.node.type&&parentParentPath.node.left===parentPath.node)throw path.buildCodeFrameError(`Decorated private methods are read-only, but "#${path.node.id.name}" is updated via this expression.`)}}),privateNamesMap=new Map;for(const name of decoratedPrivateMethods)privateNamesMap.set(name,null);path.traverse(privateNameVisitor,{privateNamesMap})}(path,decoratedPrivateMethods);return path.scope.crawl(),path}(path,state,constantSuper,ignoreFunctionLength,className,namedEvaluationVisitor,version);newPath?VISITED.add(newPath):VISITED.add(path)}return{name:"proposal-decorators",inherits,visitor:Object.assign({ExportDefaultDeclaration(path,state){const{declaration}=path.node;if("ClassDeclaration"===(null==declaration?void 0:declaration.type)&&isDecorated(declaration)){const isAnonymous=!declaration.id;null!=path.splitExportDeclaration||(path.splitExportDeclaration=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").NodePath.prototype.splitExportDeclaration);const updatedVarDeclarationPath=path.splitExportDeclaration();isAnonymous&&visitClass(updatedVarDeclarationPath,state,_core.types.stringLiteral("default"))}},ExportNamedDeclaration(path){const{declaration}=path.node;"ClassDeclaration"===(null==declaration?void 0:declaration.type)&&isDecorated(declaration)&&(null!=path.splitExportDeclaration||(path.splitExportDeclaration=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").NodePath.prototype.splitExportDeclaration),path.splitExportDeclaration())},Class(path,state){visitClass(path,state,void 0)}},namedEvaluationVisitor)}},exports.hasDecorators=function(node){return hasOwnDecorators(node)||node.body.body.some(hasOwnDecorators)},exports.hasOwnDecorators=hasOwnDecorators;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_helperReplaceSupers=__webpack_require__("./node_modules/.pnpm/@babel+helper-replace-supers@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-replace-supers/lib/index.js"),_helperSkipTransparentExpressionWrappers=__webpack_require__("./node_modules/.pnpm/@babel+helper-skip-transparent-expression-wrappers@7.27.1/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js"),_fields=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js"),_misc=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/misc.js");function hasOwnDecorators(node){var _node$decorators;return!(null==(_node$decorators=node.decorators)||!_node$decorators.length)}function incrementId(id,idx=id.length-1){if(-1===idx)return void id.unshift(65);const current=id[idx];90===current?id[idx]=97:122===current?(id[idx]=65,incrementId(id,idx-1)):id[idx]=current+1}function generateClassProperty(key,value,isStatic){return"PrivateName"===key.type?_core.types.classPrivateProperty(key,value,void 0,isStatic):_core.types.classProperty(key,value,void 0,void 0,isStatic)}function assignIdForAnonymousClass(path,className){path.node.id||(path.node.id="string"==typeof className?_core.types.identifier(className):path.scope.generateUidIdentifier("Class"))}function addProxyAccessorsFor(className,element,getterKey,setterKey,targetKey,isComputed,isStatic,version){const thisArg="2023-11"!==version&&"2023-05"!==version||!isStatic?_core.types.thisExpression():className,getterBody=_core.types.blockStatement([_core.types.returnStatement(_core.types.memberExpression(_core.types.cloneNode(thisArg),_core.types.cloneNode(targetKey)))]),setterBody=_core.types.blockStatement([_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.memberExpression(_core.types.cloneNode(thisArg),_core.types.cloneNode(targetKey)),_core.types.identifier("v")))]);let getter,setter;"PrivateName"===getterKey.type?(getter=_core.types.classPrivateMethod("get",getterKey,[],getterBody,isStatic),setter=_core.types.classPrivateMethod("set",setterKey,[_core.types.identifier("v")],setterBody,isStatic)):(getter=_core.types.classMethod("get",getterKey,[],getterBody,isComputed,isStatic),setter=_core.types.classMethod("set",setterKey,[_core.types.identifier("v")],setterBody,isComputed,isStatic)),element.insertAfter(setter),element.insertAfter(getter)}function extractProxyAccessorsFor(targetKey,version){return"2023-11"!==version&&"2023-05"!==version&&"2023-01"!==version?[_core.template.expression.ast` + function () { + return this.${_core.types.cloneNode(targetKey)}; + } + `,_core.template.expression.ast` + function (value) { + this.${_core.types.cloneNode(targetKey)} = value; + } + `]:[_core.template.expression.ast` + o => o.${_core.types.cloneNode(targetKey)} + `,_core.template.expression.ast` + (o, v) => o.${_core.types.cloneNode(targetKey)} = v + `]}function getComputedKeyLastElement(path){if((path=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path)).isSequenceExpression()){const expressions=path.get("expressions");return getComputedKeyLastElement(expressions[expressions.length-1])}return path}function getComputedKeyMemoiser(path){const element=getComputedKeyLastElement(path);if(element.isConstantExpression())return _core.types.cloneNode(path.node);if(element.isIdentifier()&&path.scope.hasUid(element.node.name))return _core.types.cloneNode(path.node);if(element.isAssignmentExpression()&&element.get("left").isIdentifier())return _core.types.cloneNode(element.node.left);throw new Error(`Internal Error: the computed key ${path.toString()} has not yet been memoised.`)}function prependExpressionsToComputedKey(expressions,fieldPath){const key=fieldPath.get("key");key.isSequenceExpression()?expressions.push(...key.node.expressions):expressions.push(key.node),key.replaceWith(maybeSequenceExpression(expressions))}function prependExpressionsToFieldInitializer(expressions,fieldPath){const initializer=fieldPath.get("value");initializer.node?expressions.push(initializer.node):expressions.length>0&&(expressions[expressions.length-1]=_core.types.unaryExpression("void",expressions[expressions.length-1])),initializer.replaceWith(maybeSequenceExpression(expressions))}function prependExpressionsToStaticBlock(expressions,blockPath){blockPath.unshiftContainer("body",_core.types.expressionStatement(maybeSequenceExpression(expressions)))}function isProtoInitCallExpression(expression,protoInitCall){return _core.types.isCallExpression(expression)&&_core.types.isIdentifier(expression.callee,{name:protoInitCall.name})}function createConstructorFromExpressions(expressions,isDerivedClass){const body=[_core.types.expressionStatement(maybeSequenceExpression(expressions))];return isDerivedClass&&body.unshift(_core.types.expressionStatement(_core.types.callExpression(_core.types.super(),[_core.types.spreadElement(_core.types.identifier("args"))]))),_core.types.classMethod("constructor",_core.types.identifier("constructor"),isDerivedClass?[_core.types.restElement(_core.types.identifier("args"))]:[],_core.types.blockStatement(body))}function createStaticBlockFromExpressions(expressions){return _core.types.staticBlock([_core.types.expressionStatement(maybeSequenceExpression(expressions))])}const FIELD=0,ACCESSOR=1,METHOD=2,GETTER=3,SETTER=4,STATIC_OLD_VERSION=5,STATIC=8,DECORATORS_HAVE_THIS=16;function getElementKind(element){switch(element.node.type){case"ClassProperty":case"ClassPrivateProperty":return FIELD;case"ClassAccessorProperty":return ACCESSOR;case"ClassMethod":case"ClassPrivateMethod":return"get"===element.node.kind?GETTER:"set"===element.node.kind?SETTER:METHOD}}function generateDecorationList(decorators,decoratorsThis,version){const decsCount=decorators.length,haveOneThis=decoratorsThis.some(Boolean),decs=[];for(let i=0;i{if(_core.types.isPrivateName(node))throw null}),!1}catch(_unused){return!0}}function hasInstancePrivateAccess(path,privateNames){let containsInstancePrivateAccess=!1;if(privateNames.length>0){const privateNameVisitor=(0,_fields.privateNameVisitorFactory)({PrivateName(path,state){state.privateNamesMap.has(path.node.id.name)&&(containsInstancePrivateAccess=!0,path.stop())}}),privateNamesMap=new Map;for(const name of privateNames)privateNamesMap.set(name,null);path.traverse(privateNameVisitor,{privateNamesMap})}return containsInstancePrivateAccess}function isProtoKey(node){return"Identifier"===node.type?"__proto__"===node.name:"__proto__"===node.value}function isDecorated(node){return node.decorators&&node.decorators.length>0}function shouldTransformElement(node){switch(node.type){case"ClassAccessorProperty":return!0;case"ClassMethod":case"ClassProperty":case"ClassPrivateMethod":case"ClassPrivateProperty":return isDecorated(node);default:return!1}}function isDecoratedAnonymousClassExpression(path){return path.isClassExpression({id:null})&&(isDecorated(node=path.node)||node.body.body.some(shouldTransformElement));var node}function generateLetUidIdentifier(scope,name){const id=scope.generateUidIdentifier(name);return scope.push({id,kind:"let"}),_core.types.cloneNode(id)}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/features.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FEATURES=void 0,exports.enableFeature=function(file,feature,loose){hasFeature(file,feature)&&!canIgnoreLoose(file,feature)||(file.set(featuresKey,file.get(featuresKey)|feature),"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error"===loose?(setLoose(file,feature,!0),file.set(looseLowPriorityKey,file.get(looseLowPriorityKey)|feature)):"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"===loose?(setLoose(file,feature,!1),file.set(looseLowPriorityKey,file.get(looseLowPriorityKey)|feature)):setLoose(file,feature,loose));let resolvedLoose;for(const[mask,name]of featuresSameLoose){if(!hasFeature(file,mask))continue;if(canIgnoreLoose(file,mask))continue;const loose=isLoose(file,mask);if(resolvedLoose===!loose)throw new Error("'loose' mode configuration must be the same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods and @babel/plugin-transform-private-property-in-object (when they are enabled).\n\n"+getBabelShowConfigForHint(file));resolvedLoose=loose;var higherPriorityPluginName=name}if(void 0!==resolvedLoose)for(const[mask,name]of featuresSameLoose)hasFeature(file,mask)&&isLoose(file,mask)!==resolvedLoose&&(setLoose(file,mask,resolvedLoose),console.warn(`Though the "loose" option was set to "${!resolvedLoose}" in your @babel/preset-env config, it will not be used for ${name} since the "loose" mode option was set to "${resolvedLoose}" for ${higherPriorityPluginName}.\nThe "loose" option must be the same for @babel/plugin-transform-class-properties, @babel/plugin-transform-private-methods and @babel/plugin-transform-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding\n\t["${name}", { "loose": ${resolvedLoose} }]\nto the "plugins" section of your Babel config.\n\n`+getBabelShowConfigForHint(file)))},exports.isLoose=isLoose,exports.shouldTransform=function(path,file){let decoratorPath=null,publicFieldPath=null,privateFieldPath=null,privateMethodPath=null,staticBlockPath=null;(0,_decorators.hasOwnDecorators)(path.node)&&(decoratorPath=path.get("decorators.0"));for(const el of path.get("body.body"))!decoratorPath&&(0,_decorators.hasOwnDecorators)(el.node)&&(decoratorPath=el.get("decorators.0")),!publicFieldPath&&el.isClassProperty()&&(publicFieldPath=el),!privateFieldPath&&el.isClassPrivateProperty()&&(privateFieldPath=el),!privateMethodPath&&null!=el.isClassPrivateMethod&&el.isClassPrivateMethod()&&(privateMethodPath=el),!staticBlockPath&&null!=el.isStaticBlock&&el.isStaticBlock()&&(staticBlockPath=el);if(decoratorPath&&privateFieldPath)throw privateFieldPath.buildCodeFrameError("Private fields in decorated classes are not supported yet.");if(decoratorPath&&privateMethodPath)throw privateMethodPath.buildCodeFrameError("Private methods in decorated classes are not supported yet.");if(decoratorPath&&!hasFeature(file,FEATURES.decorators))throw path.buildCodeFrameError('Decorators are not enabled.\nIf you are using ["@babel/plugin-proposal-decorators", { "version": "legacy" }], make sure it comes *before* "@babel/plugin-transform-class-properties" and enable loose mode, like so:\n\t["@babel/plugin-proposal-decorators", { "version": "legacy" }]\n\t["@babel/plugin-transform-class-properties", { "loose": true }]');if(privateMethodPath&&!hasFeature(file,FEATURES.privateMethods))throw privateMethodPath.buildCodeFrameError("Class private methods are not enabled. Please add `@babel/plugin-transform-private-methods` to your configuration.");if((publicFieldPath||privateFieldPath)&&!hasFeature(file,FEATURES.fields)&&!hasFeature(file,FEATURES.privateMethods))throw path.buildCodeFrameError("Class fields are not enabled. Please add `@babel/plugin-transform-class-properties` to your configuration.");if(staticBlockPath&&!hasFeature(file,FEATURES.staticBlocks))throw path.buildCodeFrameError("Static class blocks are not enabled. Please add `@babel/plugin-transform-class-static-block` to your configuration.");if(decoratorPath||privateMethodPath||staticBlockPath)return!0;if((publicFieldPath||privateFieldPath)&&hasFeature(file,FEATURES.fields))return!0;return!1};var _decorators=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js");const FEATURES=exports.FEATURES=Object.freeze({fields:2,privateMethods:4,decorators:8,privateIn:16,staticBlocks:32}),featuresSameLoose=new Map([[FEATURES.fields,"@babel/plugin-transform-class-properties"],[FEATURES.privateMethods,"@babel/plugin-transform-private-methods"],[FEATURES.privateIn,"@babel/plugin-transform-private-property-in-object"]]),featuresKey="@babel/plugin-class-features/featuresKey",looseKey="@babel/plugin-class-features/looseKey";var looseLowPriorityKey="@babel/plugin-class-features/looseLowPriorityKey/#__internal__@babel/preset-env__please-overwrite-loose-instead-of-throwing",canIgnoreLoose=function(file,feature){return!!(file.get(looseLowPriorityKey)&feature)};function getBabelShowConfigForHint(file){let{filename}=file.opts;return filename&&"unknown"!==filename||(filename="[name of the input file]"),`If you already set the same 'loose' mode for these plugins in your config, it's possible that they are enabled multiple times with different options.\nYou can re-run Babel with the BABEL_SHOW_CONFIG_FOR environment variable to show the loaded configuration:\n\tnpx cross-env BABEL_SHOW_CONFIG_FOR=${filename} \nSee https://babeljs.io/docs/configuration#print-effective-configs for more info.`}function hasFeature(file,feature){return!!(file.get(featuresKey)&feature)}function isLoose(file,feature){return!!(file.get(looseKey)&feature)}function setLoose(file,feature,loose){loose?file.set(looseKey,file.get(looseKey)|feature):file.set(looseKey,file.get(looseKey)&~feature),file.set(looseLowPriorityKey,file.get(looseLowPriorityKey)&~feature)}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildCheckInRHS=buildCheckInRHS,exports.buildFieldsInitNodes=function(ref,superRef,props,privateNamesMap,file,setPublicClassFields,privateFieldsAsSymbolsOrProperties,noUninitializedPrivateFieldAccess,constantSuper,innerBindingRef){let injectSuperRef,classRefFlags=0;const staticNodes=[],instanceNodes=[];let lastInstanceNodeReturnsThis=!1;const pureStaticNodes=[];let classBindingNode=null;const getSuperRef=_core.types.isIdentifier(superRef)?()=>superRef:()=>(null!=injectSuperRef||(injectSuperRef=props[0].scope.generateUidIdentifierBasedOnNode(superRef)),injectSuperRef),classRefForInnerBinding=null!=ref?ref:props[0].scope.generateUidIdentifier((null==innerBindingRef?void 0:innerBindingRef.name)||"Class");null!=ref||(ref=_core.types.cloneNode(innerBindingRef));for(const prop of props){prop.isClassProperty()&&ts.assertFieldTransformed(prop);const isStatic=!(null!=_core.types.isStaticBlock&&_core.types.isStaticBlock(prop.node))&&prop.node.static,isInstance=!isStatic,isPrivate=prop.isPrivate(),isPublic=!isPrivate,isField=prop.isProperty(),isMethod=!isField,isStaticBlock=null==prop.isStaticBlock?void 0:prop.isStaticBlock();if(isStatic&&(classRefFlags|=1),isStatic||isMethod&&isPrivate||isStaticBlock){new _helperReplaceSupers.default({methodPath:prop,constantSuper,file,refToPreserve:innerBindingRef,getSuperRef,getObjectRef:()=>(classRefFlags|=2,isStatic||isStaticBlock?classRefForInnerBinding:_core.types.memberExpression(classRefForInnerBinding,_core.types.identifier("prototype")))}).replace();replaceThisContext(prop,classRefForInnerBinding,innerBindingRef)&&(classRefFlags|=2)}switch(lastInstanceNodeReturnsThis=!1,!0){case isStaticBlock:{const blockBody=prop.node.body;1===blockBody.length&&_core.types.isExpressionStatement(blockBody[0])?staticNodes.push(inheritPropComments(blockBody[0],prop)):staticNodes.push(_core.types.inheritsComments(_core.template.statement.ast`(() => { ${blockBody} })()`,prop.node));break}case isStatic&&isPrivate&&isField&&privateFieldsAsSymbolsOrProperties:staticNodes.push(buildPrivateFieldInitLoose(_core.types.cloneNode(ref),prop,privateNamesMap));break;case isStatic&&isPrivate&&isField&&!privateFieldsAsSymbolsOrProperties:newHelpers(file)?staticNodes.push(buildPrivateStaticFieldInitSpec(prop,privateNamesMap,noUninitializedPrivateFieldAccess)):staticNodes.push(buildPrivateStaticFieldInitSpecOld(prop,privateNamesMap));break;case isStatic&&isPublic&&isField&&setPublicClassFields:if(!isNameOrLength(prop.node)){staticNodes.push(buildPublicFieldInitLoose(_core.types.cloneNode(ref),prop));break}case isStatic&&isPublic&&isField&&!setPublicClassFields:staticNodes.push(buildPublicFieldInitSpec(_core.types.cloneNode(ref),prop,file));break;case isInstance&&isPrivate&&isField&&privateFieldsAsSymbolsOrProperties:instanceNodes.push(buildPrivateFieldInitLoose(_core.types.thisExpression(),prop,privateNamesMap));break;case isInstance&&isPrivate&&isField&&!privateFieldsAsSymbolsOrProperties:instanceNodes.push(buildPrivateInstanceFieldInitSpec(_core.types.thisExpression(),prop,privateNamesMap,file));break;case isInstance&&isPrivate&&isMethod&&privateFieldsAsSymbolsOrProperties:instanceNodes.unshift(buildPrivateMethodInitLoose(_core.types.thisExpression(),prop,privateNamesMap)),pureStaticNodes.push(buildPrivateMethodDeclaration(file,prop,privateNamesMap,privateFieldsAsSymbolsOrProperties));break;case isInstance&&isPrivate&&isMethod&&!privateFieldsAsSymbolsOrProperties:instanceNodes.unshift(buildPrivateInstanceMethodInitSpec(_core.types.thisExpression(),prop,privateNamesMap,file)),pureStaticNodes.push(buildPrivateMethodDeclaration(file,prop,privateNamesMap,privateFieldsAsSymbolsOrProperties));break;case isStatic&&isPrivate&&isMethod&&!privateFieldsAsSymbolsOrProperties:newHelpers(file)||staticNodes.unshift(buildPrivateStaticFieldInitSpecOld(prop,privateNamesMap)),pureStaticNodes.push(buildPrivateMethodDeclaration(file,prop,privateNamesMap,privateFieldsAsSymbolsOrProperties));break;case isStatic&&isPrivate&&isMethod&&privateFieldsAsSymbolsOrProperties:staticNodes.unshift(buildPrivateStaticMethodInitLoose(_core.types.cloneNode(ref),prop,file,privateNamesMap)),pureStaticNodes.push(buildPrivateMethodDeclaration(file,prop,privateNamesMap,privateFieldsAsSymbolsOrProperties));break;case isInstance&&isPublic&&isField&&setPublicClassFields:instanceNodes.push(buildPublicFieldInitLoose(_core.types.thisExpression(),prop));break;case isInstance&&isPublic&&isField&&!setPublicClassFields:lastInstanceNodeReturnsThis=!0,instanceNodes.push(buildPublicFieldInitSpec(_core.types.thisExpression(),prop,file));break;default:throw new Error("Unreachable.")}}2&classRefFlags&&null!=innerBindingRef&&(classBindingNode=_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.cloneNode(classRefForInnerBinding),_core.types.cloneNode(innerBindingRef))));return{staticNodes:staticNodes.filter(Boolean),instanceNodes:instanceNodes.filter(Boolean),lastInstanceNodeReturnsThis,pureStaticNodes:pureStaticNodes.filter(Boolean),classBindingNode,wrapClass(path){for(const prop of props)prop.node.leadingComments=null,prop.remove();return injectSuperRef&&(path.scope.push({id:_core.types.cloneNode(injectSuperRef)}),path.set("superClass",_core.types.assignmentExpression("=",injectSuperRef,path.node.superClass))),0!==classRefFlags&&(path.isClassExpression()?(path.scope.push({id:ref}),path.replaceWith(_core.types.assignmentExpression("=",_core.types.cloneNode(ref),path.node))):(null==innerBindingRef&&(path.node.id=ref),null!=classBindingNode&&path.scope.push({id:classRefForInnerBinding}))),path}}},exports.buildPrivateNamesMap=function(className,privateFieldsAsSymbolsOrProperties,props,file){const privateNamesMap=new Map;let classBrandId;for(const prop of props)if(prop.isPrivate()){const{name}=prop.node.key.id;let update=privateNamesMap.get(name);if(!update){const isMethod=!prop.isProperty(),isStatic=prop.node.static;let id,initAdded=!1;!privateFieldsAsSymbolsOrProperties&&newHelpers(file)&&isMethod&&!isStatic?(initAdded=!!classBrandId,null!=classBrandId||(classBrandId=prop.scope.generateUidIdentifier(`${className}_brand`)),id=classBrandId):id=prop.scope.generateUidIdentifier(name),update={id,static:isStatic,method:isMethod,initAdded},privateNamesMap.set(name,update)}if(prop.isClassPrivateMethod())if("get"===prop.node.kind){const{body}=prop.node.body;let $;1===body.length&&_core.types.isReturnStatement($=body[0])&&_core.types.isCallExpression($=$.argument)&&1===$.arguments.length&&_core.types.isThisExpression($.arguments[0])&&_core.types.isIdentifier($=$.callee)?(update.getId=_core.types.cloneNode($),update.getterDeclared=!0):update.getId=prop.scope.generateUidIdentifier(`get_${name}`)}else if("set"===prop.node.kind){const{params}=prop.node,{body}=prop.node.body;let $;1===body.length&&_core.types.isExpressionStatement($=body[0])&&_core.types.isCallExpression($=$.expression)&&2===$.arguments.length&&_core.types.isThisExpression($.arguments[0])&&_core.types.isIdentifier($.arguments[1],{name:params[0].name})&&_core.types.isIdentifier($=$.callee)?(update.setId=_core.types.cloneNode($),update.setterDeclared=!0):update.setId=prop.scope.generateUidIdentifier(`set_${name}`)}else"method"===prop.node.kind&&(update.methodId=prop.scope.generateUidIdentifier(name));privateNamesMap.set(name,update)}return privateNamesMap},exports.buildPrivateNamesNodes=function(privateNamesMap,privateFieldsAsProperties,privateFieldsAsSymbols,state){const initNodes=[],injectedIds=new Set;for(const[name,value]of privateNamesMap){const{static:isStatic,method:isMethod,getId,setId}=value,isGetterOrSetter=getId||setId,id=_core.types.cloneNode(value.id);let init;if(privateFieldsAsProperties)init=_core.types.callExpression(state.addHelper("classPrivateFieldLooseKey"),[_core.types.stringLiteral(name)]);else if(privateFieldsAsSymbols)init=_core.types.callExpression(_core.types.identifier("Symbol"),[_core.types.stringLiteral(name)]);else if(!isStatic){if(injectedIds.has(id.name))continue;injectedIds.add(id.name),init=_core.types.newExpression(_core.types.identifier(!isMethod||isGetterOrSetter&&!newHelpers(state)?"WeakMap":"WeakSet"),[])}init&&(privateFieldsAsSymbols||(0,_helperAnnotateAsPure.default)(init),initNodes.push(_core.template.statement.ast`var ${id} = ${init}`))}return initNodes},exports.privateNameVisitorFactory=privateNameVisitorFactory,exports.transformPrivateNamesUsage=function(ref,path,privateNamesMap,{privateFieldsAsProperties,noUninitializedPrivateFieldAccess,noDocumentAll,innerBinding},state){if(!privateNamesMap.size)return;const body=path.get("body"),handler=privateFieldsAsProperties?privateNameHandlerLoose:privateNameHandlerSpec;(0,_helperMemberExpressionToFunctions.default)(body,privateNameVisitor,Object.assign({privateNamesMap,classRef:ref,file:state},handler,{noDocumentAll,noUninitializedPrivateFieldAccess,innerBinding})),body.traverse(privateInVisitor,{privateNamesMap,classRef:ref,file:state,privateFieldsAsProperties,innerBinding})};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_traverse=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js"),_helperReplaceSupers=__webpack_require__("./node_modules/.pnpm/@babel+helper-replace-supers@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-replace-supers/lib/index.js"),_helperMemberExpressionToFunctions=__webpack_require__("./node_modules/.pnpm/@babel+helper-member-expression-to-functions@7.27.1/node_modules/@babel/helper-member-expression-to-functions/lib/index.js"),_helperOptimiseCallExpression=__webpack_require__("./node_modules/.pnpm/@babel+helper-optimise-call-expression@7.27.1/node_modules/@babel/helper-optimise-call-expression/lib/index.js"),_helperAnnotateAsPure=__webpack_require__("./node_modules/.pnpm/@babel+helper-annotate-as-pure@7.27.3/node_modules/@babel/helper-annotate-as-pure/lib/index.js"),_helperSkipTransparentExpressionWrappers=__webpack_require__("./node_modules/.pnpm/@babel+helper-skip-transparent-expression-wrappers@7.27.1/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js"),ts=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js"),newHelpers=file=>file.availableHelper("classPrivateFieldGet2");function privateNameVisitorFactory(visitor){const nestedVisitor=_traverse.visitors.environmentVisitor(Object.assign({},visitor)),privateNameVisitor=Object.assign({},visitor,{Class(path){const{privateNamesMap}=this,body=path.get("body.body"),visiblePrivateNames=new Map(privateNamesMap),redeclared=[];for(const prop of body){if(!prop.isPrivate())continue;const{name}=prop.node.key.id;visiblePrivateNames.delete(name),redeclared.push(name)}redeclared.length&&(path.get("body").traverse(nestedVisitor,Object.assign({},this,{redeclared})),path.traverse(privateNameVisitor,Object.assign({},this,{privateNamesMap:visiblePrivateNames})),path.skipKey("body"))}});return privateNameVisitor}const privateNameVisitor=privateNameVisitorFactory({PrivateName(path,{noDocumentAll}){const{privateNamesMap,redeclared}=this,{node,parentPath}=path;if(!parentPath.isMemberExpression({property:node})&&!parentPath.isOptionalMemberExpression({property:node}))return;const{name}=node.id;privateNamesMap.has(name)&&(null!=redeclared&&redeclared.includes(name)||this.handle(parentPath,noDocumentAll))}});function unshadow(name,scope,innerBinding){for(;null!=(_scope=scope)&&_scope.hasBinding(name)&&!scope.bindingIdentifierEquals(name,innerBinding);){var _scope;scope.rename(name),scope=scope.parent}}function buildCheckInRHS(rhs,file,inRHSIsObject){return inRHSIsObject||null==file.availableHelper||!file.availableHelper("checkInRHS")?rhs:_core.types.callExpression(file.addHelper("checkInRHS"),[rhs])}const privateInVisitor=privateNameVisitorFactory({BinaryExpression(path,{file}){const{operator,left,right}=path.node;if("in"!==operator)return;if(!_core.types.isPrivateName(left))return;const{privateFieldsAsProperties,privateNamesMap,redeclared}=this,{name}=left.id;if(!privateNamesMap.has(name))return;if(null!=redeclared&&redeclared.includes(name))return;if(unshadow(this.classRef.name,path.scope,this.innerBinding),privateFieldsAsProperties){const{id}=privateNamesMap.get(name);return void path.replaceWith(_core.template.expression.ast` + Object.prototype.hasOwnProperty.call(${buildCheckInRHS(right,file)}, ${_core.types.cloneNode(id)}) + `)}const{id,static:isStatic}=privateNamesMap.get(name);isStatic?path.replaceWith(_core.template.expression.ast`${buildCheckInRHS(right,file)} === ${_core.types.cloneNode(this.classRef)}`):path.replaceWith(_core.template.expression.ast`${_core.types.cloneNode(id)}.has(${buildCheckInRHS(right,file)})`)}});function readOnlyError(file,name){return _core.types.callExpression(file.addHelper("readOnlyError"),[_core.types.stringLiteral(`#${name}`)])}function writeOnlyError(file,name){return file.availableHelper("writeOnlyError")?_core.types.callExpression(file.addHelper("writeOnlyError"),[_core.types.stringLiteral(`#${name}`)]):(console.warn("@babel/helpers is outdated, update it to silence this warning."),_core.types.buildUndefinedNode())}function buildStaticPrivateFieldAccess(expr,noUninitializedPrivateFieldAccess){return noUninitializedPrivateFieldAccess?expr:_core.types.memberExpression(expr,_core.types.identifier("_"))}function autoInherits(fn){return function(member){return _core.types.inherits(fn.apply(this,arguments),member.node)}}const privateNameHandlerSpec={memoise(member,count){const{scope}=member,{object}=member.node,memo=scope.maybeGenerateMemoised(object);memo&&this.memoiser.set(object,memo,count)},receiver(member){const{object}=member.node;return this.memoiser.has(object)?_core.types.cloneNode(this.memoiser.get(object)):_core.types.cloneNode(object)},get:autoInherits(function(member){const{classRef,privateNamesMap,file,innerBinding,noUninitializedPrivateFieldAccess}=this,privateName=member.node.property,{name}=privateName.id,{id,static:isStatic,method:isMethod,methodId,getId,setId}=privateNamesMap.get(name),isGetterOrSetter=getId||setId,cloneId=id=>_core.types.inherits(_core.types.cloneNode(id),privateName);if(isStatic){if(unshadow(classRef.name,member.scope,innerBinding),!newHelpers(file)){const helperName=isMethod&&!isGetterOrSetter?"classStaticPrivateMethodGet":"classStaticPrivateFieldSpecGet";return _core.types.callExpression(file.addHelper(helperName),[this.receiver(member),_core.types.cloneNode(classRef),cloneId(id)])}const receiver=this.receiver(member),skipCheck=_core.types.isIdentifier(receiver)&&receiver.name===classRef.name;if(!isMethod)return buildStaticPrivateFieldAccess(skipCheck?cloneId(id):_core.types.callExpression(file.addHelper("assertClassBrand"),[_core.types.cloneNode(classRef),receiver,cloneId(id)]),noUninitializedPrivateFieldAccess);if(getId)return skipCheck?_core.types.callExpression(cloneId(getId),[receiver]):_core.types.callExpression(file.addHelper("classPrivateGetter"),[_core.types.cloneNode(classRef),receiver,cloneId(getId)]);if(setId){const err=_core.types.buildUndefinedNode();return skipCheck?err:_core.types.sequenceExpression([_core.types.callExpression(file.addHelper("assertClassBrand"),[_core.types.cloneNode(classRef),receiver]),err])}return skipCheck?cloneId(id):_core.types.callExpression(file.addHelper("assertClassBrand"),[_core.types.cloneNode(classRef),receiver,cloneId(id)])}return isMethod?isGetterOrSetter?getId?newHelpers(file)?_core.types.callExpression(file.addHelper("classPrivateGetter"),[_core.types.cloneNode(id),this.receiver(member),cloneId(getId)]):_core.types.callExpression(file.addHelper("classPrivateFieldGet"),[this.receiver(member),cloneId(id)]):_core.types.sequenceExpression([this.receiver(member),writeOnlyError(file,name)]):newHelpers(file)?_core.types.callExpression(file.addHelper("assertClassBrand"),[_core.types.cloneNode(id),this.receiver(member),cloneId(methodId)]):_core.types.callExpression(file.addHelper("classPrivateMethodGet"),[this.receiver(member),_core.types.cloneNode(id),cloneId(methodId)]):newHelpers(file)?_core.types.callExpression(file.addHelper("classPrivateFieldGet2"),[cloneId(id),this.receiver(member)]):_core.types.callExpression(file.addHelper("classPrivateFieldGet"),[this.receiver(member),cloneId(id)])}),boundGet(member){return this.memoise(member,1),_core.types.callExpression(_core.types.memberExpression(this.get(member),_core.types.identifier("bind")),[this.receiver(member)])},set:autoInherits(function(member,value){const{classRef,privateNamesMap,file,noUninitializedPrivateFieldAccess}=this,privateName=member.node.property,{name}=privateName.id,{id,static:isStatic,method:isMethod,setId,getId}=privateNamesMap.get(name),isGetterOrSetter=getId||setId,cloneId=id=>_core.types.inherits(_core.types.cloneNode(id),privateName);if(isStatic){if(!newHelpers(file)){const helperName=isMethod&&!isGetterOrSetter?"classStaticPrivateMethodSet":"classStaticPrivateFieldSpecSet";return _core.types.callExpression(file.addHelper(helperName),[this.receiver(member),_core.types.cloneNode(classRef),cloneId(id),value])}const receiver=this.receiver(member),skipCheck=_core.types.isIdentifier(receiver)&&receiver.name===classRef.name;if(isMethod&&!setId){const err=readOnlyError(file,name);return skipCheck?_core.types.sequenceExpression([value,err]):_core.types.sequenceExpression([value,_core.types.callExpression(file.addHelper("assertClassBrand"),[_core.types.cloneNode(classRef),receiver]),readOnlyError(file,name)])}return setId?skipCheck?_core.types.callExpression(_core.types.cloneNode(setId),[receiver,value]):_core.types.callExpression(file.addHelper("classPrivateSetter"),[_core.types.cloneNode(classRef),cloneId(setId),receiver,value]):_core.types.assignmentExpression("=",buildStaticPrivateFieldAccess(cloneId(id),noUninitializedPrivateFieldAccess),skipCheck?value:_core.types.callExpression(file.addHelper("assertClassBrand"),[_core.types.cloneNode(classRef),receiver,value]))}return isMethod?setId?newHelpers(file)?_core.types.callExpression(file.addHelper("classPrivateSetter"),[_core.types.cloneNode(id),cloneId(setId),this.receiver(member),value]):_core.types.callExpression(file.addHelper("classPrivateFieldSet"),[this.receiver(member),cloneId(id),value]):_core.types.sequenceExpression([this.receiver(member),value,readOnlyError(file,name)]):newHelpers(file)?_core.types.callExpression(file.addHelper("classPrivateFieldSet2"),[cloneId(id),this.receiver(member),value]):_core.types.callExpression(file.addHelper("classPrivateFieldSet"),[this.receiver(member),cloneId(id),value])}),destructureSet(member){const{classRef,privateNamesMap,file,noUninitializedPrivateFieldAccess}=this,privateName=member.node.property,{name}=privateName.id,{id,static:isStatic,method:isMethod,setId}=privateNamesMap.get(name),cloneId=id=>_core.types.inherits(_core.types.cloneNode(id),privateName);if(!newHelpers(file)){if(isStatic){try{var helper=file.addHelper("classStaticPrivateFieldDestructureSet")}catch(_unused){throw new Error("Babel can not transpile `[C.#p] = [0]` with @babel/helpers < 7.13.10, \nplease update @babel/helpers to the latest version.")}return _core.types.memberExpression(_core.types.callExpression(helper,[this.receiver(member),_core.types.cloneNode(classRef),cloneId(id)]),_core.types.identifier("value"))}return _core.types.memberExpression(_core.types.callExpression(file.addHelper("classPrivateFieldDestructureSet"),[this.receiver(member),cloneId(id)]),_core.types.identifier("value"))}if(isMethod&&!setId)return _core.types.memberExpression(_core.types.sequenceExpression([member.node.object,readOnlyError(file,name)]),_core.types.identifier("_"));if(isStatic&&!isMethod){const getCall=this.get(member);if(!noUninitializedPrivateFieldAccess||!_core.types.isCallExpression(getCall))return getCall;const ref=getCall.arguments.pop();return getCall.arguments.push(_core.template.expression.ast`(_) => ${ref} = _`),_core.types.memberExpression(_core.types.callExpression(file.addHelper("toSetter"),[getCall]),_core.types.identifier("_"))}const setCall=this.set(member,_core.types.identifier("_"));if(!_core.types.isCallExpression(setCall)||!_core.types.isIdentifier(setCall.arguments[setCall.arguments.length-1],{name:"_"}))throw member.buildCodeFrameError("Internal Babel error while compiling this code. This is a Babel bug. Please report it at https://github.com/babel/babel/issues.");let args;return args=_core.types.isMemberExpression(setCall.callee,{computed:!1})&&_core.types.isIdentifier(setCall.callee.property)&&"call"===setCall.callee.property.name?[setCall.callee.object,_core.types.arrayExpression(setCall.arguments.slice(1,-1)),setCall.arguments[0]]:[setCall.callee,_core.types.arrayExpression(setCall.arguments.slice(0,-1))],_core.types.memberExpression(_core.types.callExpression(file.addHelper("toSetter"),args),_core.types.identifier("_"))},call(member,args){return this.memoise(member,1),(0,_helperOptimiseCallExpression.default)(this.get(member),this.receiver(member),args,!1)},optionalCall(member,args){return this.memoise(member,1),(0,_helperOptimiseCallExpression.default)(this.get(member),this.receiver(member),args,!0)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}},privateNameHandlerLoose={get(member){const{privateNamesMap,file}=this,{object}=member.node,{name}=member.node.property.id;return _core.template.expression`BASE(REF, PROP)[PROP]`({BASE:file.addHelper("classPrivateFieldLooseBase"),REF:_core.types.cloneNode(object),PROP:_core.types.cloneNode(privateNamesMap.get(name).id)})},set(){throw new Error("private name handler with loose = true don't need set()")},boundGet(member){return _core.types.callExpression(_core.types.memberExpression(this.get(member),_core.types.identifier("bind")),[_core.types.cloneNode(member.node.object)])},simpleSet(member){return this.get(member)},destructureSet(member){return this.get(member)},call(member,args){return _core.types.callExpression(this.get(member),args)},optionalCall(member,args){return _core.types.optionalCallExpression(this.get(member),args,!0)},delete(){throw new Error("Internal Babel error: deleting private elements is a parsing error.")}};function buildPrivateFieldInitLoose(ref,prop,privateNamesMap){const{id}=privateNamesMap.get(prop.node.key.id.name),value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.template.statement.ast` + Object.defineProperty(${ref}, ${_core.types.cloneNode(id)}, { + // configurable is false by default + // enumerable is false by default + writable: true, + value: ${value} + }); + `,prop)}function buildPrivateInstanceFieldInitSpec(ref,prop,privateNamesMap,state){const{id}=privateNamesMap.get(prop.node.key.id.name),value=prop.node.value||prop.scope.buildUndefinedNode();if(!state.availableHelper("classPrivateFieldInitSpec"))return inheritPropComments(_core.template.statement.ast`${_core.types.cloneNode(id)}.set(${ref}, { + // configurable is always false for private elements + // enumerable is always false for private elements + writable: true, + value: ${value}, + })`,prop);const helper=state.addHelper("classPrivateFieldInitSpec");return inheritLoc(inheritPropComments(_core.types.expressionStatement(_core.types.callExpression(helper,[_core.types.thisExpression(),inheritLoc(_core.types.cloneNode(id),prop.node.key),newHelpers(state)?value:_core.template.expression.ast`{ writable: true, value: ${value} }`])),prop),prop.node)}function buildPrivateStaticFieldInitSpec(prop,privateNamesMap,noUninitializedPrivateFieldAccess){const privateName=privateNamesMap.get(prop.node.key.id.name),value=noUninitializedPrivateFieldAccess?prop.node.value:_core.template.expression.ast`{ + _: ${prop.node.value||_core.types.buildUndefinedNode()} + }`;return inheritPropComments(_core.types.variableDeclaration("var",[_core.types.variableDeclarator(_core.types.cloneNode(privateName.id),value)]),prop)}var buildPrivateStaticFieldInitSpecOld=function(prop,privateNamesMap){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,getId,setId,initAdded}=privateName,isGetterOrSetter=getId||setId;if(!prop.isProperty()&&(initAdded||!isGetterOrSetter))return;if(isGetterOrSetter)return privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),inheritPropComments(_core.template.statement.ast` + var ${_core.types.cloneNode(id)} = { + // configurable is false by default + // enumerable is false by default + // writable is false by default + get: ${getId?getId.name:prop.scope.buildUndefinedNode()}, + set: ${setId?setId.name:prop.scope.buildUndefinedNode()} + } + `,prop);const value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.template.statement.ast` + var ${_core.types.cloneNode(id)} = { + // configurable is false by default + // enumerable is false by default + writable: true, + value: ${value} + }; + `,prop)};function buildPrivateMethodInitLoose(ref,prop,privateNamesMap){const privateName=privateNamesMap.get(prop.node.key.id.name),{methodId,id,getId,setId,initAdded}=privateName;if(initAdded)return;if(methodId)return inheritPropComments(_core.template.statement.ast` + Object.defineProperty(${ref}, ${id}, { + // configurable is false by default + // enumerable is false by default + // writable is false by default + value: ${methodId.name} + }); + `,prop);return getId||setId?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),inheritPropComments(_core.template.statement.ast` + Object.defineProperty(${ref}, ${id}, { + // configurable is false by default + // enumerable is false by default + // writable is false by default + get: ${getId?getId.name:prop.scope.buildUndefinedNode()}, + set: ${setId?setId.name:prop.scope.buildUndefinedNode()} + }); + `,prop)):void 0}function buildPrivateInstanceMethodInitSpec(ref,prop,privateNamesMap,state){const privateName=privateNamesMap.get(prop.node.key.id.name);if(!privateName.initAdded){if(!newHelpers(state)){if(privateName.getId||privateName.setId)return function(ref,prop,privateNamesMap,state){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,getId,setId}=privateName;if(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),!state.availableHelper("classPrivateFieldInitSpec"))return inheritPropComments(_core.template.statement.ast` + ${id}.set(${ref}, { + get: ${getId?getId.name:prop.scope.buildUndefinedNode()}, + set: ${setId?setId.name:prop.scope.buildUndefinedNode()} + }); + `,prop);const helper=state.addHelper("classPrivateFieldInitSpec");return inheritLoc(inheritPropComments(_core.template.statement.ast`${helper}( + ${_core.types.thisExpression()}, + ${_core.types.cloneNode(id)}, + { + get: ${getId?getId.name:prop.scope.buildUndefinedNode()}, + set: ${setId?setId.name:prop.scope.buildUndefinedNode()} + }, + )`,prop),prop.node)}(ref,prop,privateNamesMap,state)}return function(ref,prop,privateNamesMap,state){const privateName=privateNamesMap.get(prop.node.key.id.name),{id}=privateName;if(!state.availableHelper("classPrivateMethodInitSpec"))return inheritPropComments(_core.template.statement.ast`${id}.add(${ref})`,prop);const helper=state.addHelper("classPrivateMethodInitSpec");return inheritPropComments(_core.template.statement.ast`${helper}( + ${_core.types.thisExpression()}, + ${_core.types.cloneNode(id)} + )`,prop)}(ref,prop,privateNamesMap,state)}}function buildPublicFieldInitLoose(ref,prop){const{key,computed}=prop.node,value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.types.expressionStatement(_core.types.assignmentExpression("=",_core.types.memberExpression(ref,key,computed||_core.types.isLiteral(key)),value)),prop)}function buildPublicFieldInitSpec(ref,prop,state){const{key,computed}=prop.node,value=prop.node.value||prop.scope.buildUndefinedNode();return inheritPropComments(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineProperty"),[ref,computed||_core.types.isLiteral(key)?key:_core.types.stringLiteral(key.name),value])),prop)}function buildPrivateStaticMethodInitLoose(ref,prop,state,privateNamesMap){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,methodId,getId,setId,initAdded}=privateName;if(initAdded)return;return getId||setId?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),inheritPropComments(_core.template.statement.ast` + Object.defineProperty(${ref}, ${id}, { + // configurable is false by default + // enumerable is false by default + // writable is false by default + get: ${getId?getId.name:prop.scope.buildUndefinedNode()}, + set: ${setId?setId.name:prop.scope.buildUndefinedNode()} + }) + `,prop)):inheritPropComments(_core.template.statement.ast` + Object.defineProperty(${ref}, ${id}, { + // configurable is false by default + // enumerable is false by default + // writable is false by default + value: ${methodId.name} + }); + `,prop)}function buildPrivateMethodDeclaration(file,prop,privateNamesMap,privateFieldsAsSymbolsOrProperties=!1){const privateName=privateNamesMap.get(prop.node.key.id.name),{id,methodId,getId,setId,getterDeclared,setterDeclared,static:isStatic}=privateName,{params,body,generator,async}=prop.node,isGetter=getId&&0===params.length,isSetter=setId&¶ms.length>0;if(isGetter&&getterDeclared||isSetter&&setterDeclared)return privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{initAdded:!0})),null;if(newHelpers(file)&&(isGetter||isSetter)&&!privateFieldsAsSymbolsOrProperties){const scope=prop.get("body").scope,thisArg=scope.generateUidIdentifier("this"),state={thisRef:thisArg,argumentsPath:[]};if(prop.traverse(thisContextVisitor,state),state.argumentsPath.length){const argumentsId=scope.generateUidIdentifier("arguments");scope.push({id:argumentsId,init:_core.template.expression.ast`[].slice.call(arguments, 1)`});for(const path of state.argumentsPath)path.replaceWith(_core.types.cloneNode(argumentsId))}params.unshift(_core.types.cloneNode(thisArg))}let declId=methodId;return isGetter?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{getterDeclared:!0,initAdded:!0})),declId=getId):isSetter?(privateNamesMap.set(prop.node.key.id.name,Object.assign({},privateName,{setterDeclared:!0,initAdded:!0})),declId=setId):isStatic&&!privateFieldsAsSymbolsOrProperties&&(declId=id),inheritPropComments(_core.types.functionDeclaration(_core.types.cloneNode(declId),params,body,generator,async),prop)}const thisContextVisitor=_traverse.visitors.environmentVisitor({Identifier(path,state){state.argumentsPath&&"arguments"===path.node.name&&state.argumentsPath.push(path)},UnaryExpression(path){const{node}=path;if("delete"===node.operator){const argument=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes)(node.argument);_core.types.isThisExpression(argument)&&path.replaceWith(_core.types.booleanLiteral(!0))}},ThisExpression(path,state){state.needsClassRef=!0,path.replaceWith(_core.types.cloneNode(state.thisRef))},MetaProperty(path){const{node,scope}=path;"new"===node.meta.name&&"target"===node.property.name&&path.replaceWith(scope.buildUndefinedNode())}}),innerReferencesVisitor={ReferencedIdentifier(path,state){path.scope.bindingIdentifierEquals(path.node.name,state.innerBinding)&&(state.needsClassRef=!0,path.node.name=state.thisRef.name)}};function replaceThisContext(path,ref,innerBindingRef){var _state$thisRef;const state={thisRef:ref,needsClassRef:!1,innerBinding:innerBindingRef};return path.isMethod()||path.traverse(thisContextVisitor,state),null!=innerBindingRef&&null!=(_state$thisRef=state.thisRef)&&_state$thisRef.name&&state.thisRef.name!==innerBindingRef.name&&path.traverse(innerReferencesVisitor,state),state.needsClassRef}function isNameOrLength({key,computed}){return"Identifier"===key.type?!computed&&("name"===key.name||"length"===key.name):"StringLiteral"===key.type&&("name"===key.value||"length"===key.value)}function inheritPropComments(node,prop){return _core.types.inheritLeadingComments(node,prop.node),_core.types.inheritInnerComments(node,prop.node),node}function inheritLoc(node,original){return node.start=original.start,node.end=original.end,node.loc=original.loc,node}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"FEATURES",{enumerable:!0,get:function(){return _features.FEATURES}}),Object.defineProperty(exports,"buildCheckInRHS",{enumerable:!0,get:function(){return _fields.buildCheckInRHS}}),exports.createClassFeaturePlugin=function({name,feature,loose,manipulateOptions,api,inherits,decoratorVersion}){var _api$assumption;if(feature&_features.FEATURES.decorators&&("2023-11"===decoratorVersion||"2023-05"===decoratorVersion||"2023-01"===decoratorVersion||"2022-03"===decoratorVersion||"2021-12"===decoratorVersion))return(0,_decorators.default)(api,{loose},decoratorVersion,inherits);null!=api||(api={assumption:()=>{}});const setPublicClassFields=api.assumption("setPublicClassFields"),privateFieldsAsSymbols=api.assumption("privateFieldsAsSymbols"),privateFieldsAsProperties=api.assumption("privateFieldsAsProperties"),noUninitializedPrivateFieldAccess=null!=(_api$assumption=api.assumption("noUninitializedPrivateFieldAccess"))&&_api$assumption,constantSuper=api.assumption("constantSuper"),noDocumentAll=api.assumption("noDocumentAll");if(privateFieldsAsProperties&&privateFieldsAsSymbols)throw new Error('Cannot enable both the "privateFieldsAsProperties" and "privateFieldsAsSymbols" assumptions as the same time.');const privateFieldsAsSymbolsOrProperties=privateFieldsAsProperties||privateFieldsAsSymbols;if(!0===loose){const explicit=[];void 0!==setPublicClassFields&&explicit.push('"setPublicClassFields"'),void 0!==privateFieldsAsProperties&&explicit.push('"privateFieldsAsProperties"'),void 0!==privateFieldsAsSymbols&&explicit.push('"privateFieldsAsSymbols"'),0!==explicit.length&&console.warn(`[${name}]: You are using the "loose: true" option and you are explicitly setting a value for the ${explicit.join(" and ")} assumption${explicit.length>1?"s":""}. The "loose" option can cause incompatibilities with the other class features plugins, so it's recommended that you replace it with the following top-level option:\n\t"assumptions": {\n\t\t"setPublicClassFields": true,\n\t\t"privateFieldsAsSymbols": true\n\t}`)}return{name,manipulateOptions,inherits,pre(file){(0,_features.enableFeature)(file,feature,loose),"number"!=typeof file.get(versionKey)&&file.get(versionKey)&&!_semver.lt(file.get(versionKey),"7.27.1")||file.set(versionKey,"7.27.1")},visitor:{Class(path,{file}){if("7.27.1"!==file.get(versionKey))return;if(!(0,_features.shouldTransform)(path,file))return;const pathIsClassDeclaration=path.isClassDeclaration();pathIsClassDeclaration&&(0,_typescript.assertFieldTransformed)(path);const loose=(0,_features.isLoose)(file,feature);let constructor;const isDecorated=(0,_decorators.hasDecorators)(path.node),props=[],elements=[],computedPaths=[],privateNames=new Set,body=path.get("body");for(const path of body.get("body")){if((path.isClassProperty()||path.isClassMethod())&&path.node.computed&&computedPaths.push(path),path.isPrivate()){const{name}=path.node.key.id,getName=`get ${name}`,setName=`set ${name}`;if(path.isClassPrivateMethod()){if("get"===path.node.kind){if(privateNames.has(getName)||privateNames.has(name)&&!privateNames.has(setName))throw path.buildCodeFrameError("Duplicate private field");privateNames.add(getName).add(name)}else if("set"===path.node.kind){if(privateNames.has(setName)||privateNames.has(name)&&!privateNames.has(getName))throw path.buildCodeFrameError("Duplicate private field");privateNames.add(setName).add(name)}}else{if(privateNames.has(name)&&!privateNames.has(getName)&&!privateNames.has(setName)||privateNames.has(name)&&(privateNames.has(getName)||privateNames.has(setName)))throw path.buildCodeFrameError("Duplicate private field");privateNames.add(name)}}path.isClassMethod({kind:"constructor"})?constructor=path:(elements.push(path),(path.isProperty()||path.isPrivate()||null!=path.isStaticBlock&&path.isStaticBlock())&&props.push(path))}if(!props.length&&!isDecorated)return;const innerBinding=path.node.id;let ref;innerBinding&&pathIsClassDeclaration||(null!=path.ensureFunctionName||(path.ensureFunctionName=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").NodePath.prototype.ensureFunctionName),path.ensureFunctionName(!1),ref=path.scope.generateUidIdentifier((null==innerBinding?void 0:innerBinding.name)||"Class"));const classRefForDefine=null!=ref?ref:_core.types.cloneNode(innerBinding),privateNamesMap=(0,_fields.buildPrivateNamesMap)(classRefForDefine.name,null!=privateFieldsAsSymbolsOrProperties?privateFieldsAsSymbolsOrProperties:loose,props,file),privateNamesNodes=(0,_fields.buildPrivateNamesNodes)(privateNamesMap,null!=privateFieldsAsProperties?privateFieldsAsProperties:loose,null!=privateFieldsAsSymbols&&privateFieldsAsSymbols,file);let keysNodes,staticNodes,instanceNodes,lastInstanceNodeReturnsThis,pureStaticNodes,classBindingNode,wrapClass;(0,_fields.transformPrivateNamesUsage)(classRefForDefine,path,privateNamesMap,{privateFieldsAsProperties:null!=privateFieldsAsSymbolsOrProperties?privateFieldsAsSymbolsOrProperties:loose,noUninitializedPrivateFieldAccess,noDocumentAll,innerBinding},file),isDecorated?(staticNodes=pureStaticNodes=keysNodes=[],({instanceNodes,wrapClass}=(0,_decorators2.buildDecoratedClass)(classRefForDefine,path,elements,file))):(keysNodes=(0,_misc.extractComputedKeys)(path,computedPaths,file),({staticNodes,pureStaticNodes,instanceNodes,lastInstanceNodeReturnsThis,classBindingNode,wrapClass}=(0,_fields.buildFieldsInitNodes)(ref,path.node.superClass,props,privateNamesMap,file,null!=setPublicClassFields?setPublicClassFields:loose,null!=privateFieldsAsSymbolsOrProperties?privateFieldsAsSymbolsOrProperties:loose,noUninitializedPrivateFieldAccess,null!=constantSuper?constantSuper:loose,innerBinding))),instanceNodes.length>0&&(0,_misc.injectInitialization)(path,constructor,instanceNodes,(referenceVisitor,state)=>{if(!isDecorated)for(const prop of props)null!=_core.types.isStaticBlock&&_core.types.isStaticBlock(prop.node)||prop.node.static||prop.traverse(referenceVisitor,state)},lastInstanceNodeReturnsThis);const wrappedPath=wrapClass(path);wrappedPath.insertBefore([...privateNamesNodes,...keysNodes]),staticNodes.length>0&&wrappedPath.insertAfter(staticNodes),pureStaticNodes.length>0&&wrappedPath.find(parent=>parent.isStatement()||parent.isDeclaration()).insertAfter(pureStaticNodes),null!=classBindingNode&&pathIsClassDeclaration&&wrappedPath.insertAfter(classBindingNode)},ExportDefaultDeclaration(path,{file}){{if("7.27.1"!==file.get(versionKey))return;const decl=path.get("declaration");if(decl.isClassDeclaration()&&(0,_decorators.hasDecorators)(decl.node))if(decl.node.id)null!=path.splitExportDeclaration||(path.splitExportDeclaration=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").NodePath.prototype.splitExportDeclaration),path.splitExportDeclaration();else decl.node.type="ClassExpression"}}}}},Object.defineProperty(exports,"enableFeature",{enumerable:!0,get:function(){return _features.enableFeature}}),Object.defineProperty(exports,"injectInitialization",{enumerable:!0,get:function(){return _misc.injectInitialization}});var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_semver=__webpack_require__("./node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js"),_fields=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/fields.js"),_decorators=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/decorators.js"),_decorators2=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/decorators-2018-09.js"),_misc=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/misc.js"),_features=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/features.js"),_typescript=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js");const versionKey="@babel/plugin-class-features/version"},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/misc.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.extractComputedKeys=function(path,computedPaths,file){const{scope}=path,declarations=[],state={classBinding:path.node.id&&scope.getBinding(path.node.id.name),file};for(const computedPath of computedPaths){const computedKey=computedPath.get("key");computedKey.isReferencedIdentifier()?handleClassTDZ(computedKey,state):computedKey.traverse(classFieldDefinitionEvaluationTDZVisitor,state);const computedNode=computedPath.node;if(!computedKey.isConstantExpression()){const assignment=memoiseComputedKey(computedKey.node,scope,scope.generateUidBasedOnNode(computedKey.node));assignment&&(declarations.push(_core.types.expressionStatement(assignment)),computedNode.key=_core.types.cloneNode(assignment.left))}}return declarations},exports.injectInitialization=function(path,constructor,nodes,renamer,lastReturnsThis){if(!nodes.length)return;const isDerived=!!path.node.superClass;if(!constructor){const newConstructor=_core.types.classMethod("constructor",_core.types.identifier("constructor"),[],_core.types.blockStatement([]));isDerived&&(newConstructor.params=[_core.types.restElement(_core.types.identifier("args"))],newConstructor.body.body.push(_core.template.statement.ast`super(...args)`)),[constructor]=path.get("body").unshiftContainer("body",newConstructor)}renamer&&renamer(referenceVisitor,{scope:constructor.scope});if(isDerived){const bareSupers=[];constructor.traverse(findBareSupers,bareSupers);let isFirst=!0;for(const bareSuper of bareSupers)if(isFirst?isFirst=!1:nodes=nodes.map(n=>_core.types.cloneNode(n)),bareSuper.parentPath.isExpressionStatement())bareSuper.insertAfter(nodes);else{const allNodes=[bareSuper.node,...nodes.map(n=>_core.types.toExpression(n))];lastReturnsThis||allNodes.push(_core.types.thisExpression()),bareSuper.replaceWith(_core.types.sequenceExpression(allNodes))}}else constructor.get("body").unshiftContainer("body",nodes)},exports.memoiseComputedKey=memoiseComputedKey;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js");const findBareSupers=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").visitors.environmentVisitor({Super(path){const{node,parentPath}=path;parentPath.isCallExpression({callee:node})&&this.push(parentPath)}}),referenceVisitor={"TSTypeAnnotation|TypeAnnotation"(path){path.skip()},ReferencedIdentifier(path,{scope}){scope.hasOwnBinding(path.node.name)&&(scope.rename(path.node.name),path.skip())}};function handleClassTDZ(path,state){if(state.classBinding&&state.classBinding===path.scope.getBinding(path.node.name)){const classNameTDZError=state.file.addHelper("classNameTDZError"),throwNode=_core.types.callExpression(classNameTDZError,[_core.types.stringLiteral(path.node.name)]);path.replaceWith(_core.types.sequenceExpression([throwNode,path.node])),path.skip()}}const classFieldDefinitionEvaluationTDZVisitor={ReferencedIdentifier:handleClassTDZ,"TSTypeAnnotation|TypeAnnotation"(path){path.skip()}};function memoiseComputedKey(keyNode,scope,hint){if(_core.types.isIdentifier(keyNode)&&scope.hasUid(keyNode.name))return;if(_core.types.isAssignmentExpression(keyNode,{operator:"="})&&_core.types.isIdentifier(keyNode.left)&&scope.hasUid(keyNode.left.name))return _core.types.cloneNode(keyNode);{const ident=_core.types.identifier(hint);return scope.push({id:ident,kind:"let"}),_core.types.assignmentExpression("=",_core.types.cloneNode(ident),keyNode)}}},"./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/typescript.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertFieldTransformed=function(path){if(path.node.declare)throw path.buildCodeFrameError("TypeScript 'declare' fields must first be transformed by @babel/plugin-transform-typescript.\nIf you have already enabled that plugin (or '@babel/preset-typescript'), make sure that it runs before any plugin related to additional class features:\n - @babel/plugin-transform-class-properties\n - @babel/plugin-transform-private-methods\n - @babel/plugin-proposal-decorators")}},"./node_modules/.pnpm/@babel+helper-globals@7.28.0/node_modules/@babel/helper-globals/data/builtin-lower.json":module=>{"use strict";module.exports=JSON.parse('["decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","globalThis","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"]')},"./node_modules/.pnpm/@babel+helper-globals@7.28.0/node_modules/@babel/helper-globals/data/builtin-upper.json":module=>{"use strict";module.exports=JSON.parse('["AggregateError","Array","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","FinalizationRegistry","Float16Array","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","Intl","Iterator","JSON","Map","Math","NaN","Number","Object","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","String","Symbol","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakRef","WeakSet"]')},"./node_modules/.pnpm/@babel+helper-member-expression-to-functions@7.27.1/node_modules/@babel/helper-member-expression-to-functions/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach(function(k){if("default"!==k){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}}),n.default=e,Object.freeze(n)}Object.defineProperty(exports,"__esModule",{value:!0});var _t__namespace=_interopNamespace(__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"));function willPathCastToBoolean(path){const maybeWrapped=path,{node,parentPath}=maybeWrapped;if(parentPath.isLogicalExpression()){const{operator,right}=parentPath.node;if("&&"===operator||"||"===operator||"??"===operator&&node===right)return willPathCastToBoolean(parentPath)}if(parentPath.isSequenceExpression()){const{expressions}=parentPath.node;return expressions[expressions.length-1]!==node||willPathCastToBoolean(parentPath)}return parentPath.isConditional({test:node})||parentPath.isUnaryExpression({operator:"!"})||parentPath.isLoop({test:node})}const{LOGICAL_OPERATORS,arrowFunctionExpression,assignmentExpression,binaryExpression,booleanLiteral,callExpression,cloneNode,conditionalExpression,identifier,isMemberExpression,isOptionalCallExpression,isOptionalMemberExpression,isUpdateExpression,logicalExpression,memberExpression,nullLiteral,optionalCallExpression,optionalMemberExpression,sequenceExpression,updateExpression}=_t__namespace;class AssignmentMemoiser{constructor(){this._map=void 0,this._map=new WeakMap}has(key){return this._map.has(key)}get(key){if(!this.has(key))return;const record=this._map.get(key),{value}=record;return record.count--,0===record.count?assignmentExpression("=",value,key):value}set(key,value,count){return this._map.set(key,{count,value})}}function toNonOptional(path,base){const{node}=path;if(isOptionalMemberExpression(node))return memberExpression(base,node.property,node.computed);if(path.isOptionalCallExpression()){const callee=path.get("callee");if(path.node.optional&&callee.isOptionalMemberExpression()){const object=callee.node.object,context=path.scope.maybeGenerateMemoised(object);return callee.get("object").replaceWith(assignmentExpression("=",context,object)),callExpression(memberExpression(base,identifier("call")),[context,...path.node.arguments])}return callExpression(base,path.node.arguments)}return path.node}const handle={memoise(){},handle(member,noDocumentAll){const{node,parent,parentPath,scope}=member;if(member.isOptionalMemberExpression()){if(function(path){for(;path&&!path.isProgram();){const{parentPath,container,listKey}=path,parentNode=parentPath.node;if(listKey){if(container!==parentNode[listKey])return!0}else if(container!==parentNode)return!0;path=parentPath}return!1}(member))return;const endPath=member.find(({node,parent})=>isOptionalMemberExpression(parent)?parent.optional||parent.object!==node:!isOptionalCallExpression(parent)||(node!==member.node&&parent.optional||parent.callee!==node));if(scope.path.isPattern())return void endPath.replaceWith(callExpression(arrowFunctionExpression([],endPath.node),[]));const willEndPathCastToBoolean=willPathCastToBoolean(endPath),rootParentPath=endPath.parentPath;if(rootParentPath.isUpdateExpression({argument:node}))throw member.buildCodeFrameError("can't handle update expression");const isAssignment=rootParentPath.isAssignmentExpression({left:endPath.node}),isDeleteOperation=rootParentPath.isUnaryExpression({operator:"delete"});if(isDeleteOperation&&endPath.isOptionalMemberExpression()&&endPath.get("property").isPrivateName())throw member.buildCodeFrameError("can't delete a private class element");let startingOptional=member;for(;;)if(startingOptional.isOptionalMemberExpression()){if(startingOptional.node.optional)break;startingOptional=startingOptional.get("object")}else{if(!startingOptional.isOptionalCallExpression())throw new Error(`Internal error: unexpected ${startingOptional.node.type}`);if(startingOptional.node.optional)break;startingOptional=startingOptional.get("callee")}const startingNode=startingOptional.isOptionalMemberExpression()?startingOptional.node.object:startingOptional.node.callee,baseNeedsMemoised=scope.maybeGenerateMemoised(startingNode),baseRef=null!=baseNeedsMemoised?baseNeedsMemoised:startingNode,parentIsOptionalCall=parentPath.isOptionalCallExpression({callee:node}),isOptionalCall=parent=>parentIsOptionalCall,parentIsCall=parentPath.isCallExpression({callee:node});startingOptional.replaceWith(toNonOptional(startingOptional,baseRef)),isOptionalCall()?parent.optional?parentPath.replaceWith(this.optionalCall(member,parent.arguments)):parentPath.replaceWith(this.call(member,parent.arguments)):parentIsCall?member.replaceWith(this.boundGet(member)):this.delete&&parentPath.isUnaryExpression({operator:"delete"})?parentPath.replaceWith(this.delete(member)):parentPath.isAssignmentExpression()?handleAssignment(this,member,parentPath):member.replaceWith(this.get(member));let context,regular=member.node;for(let current=member;current!==endPath;){const parentPath=current.parentPath;if(parentPath===endPath&&isOptionalCall()&&parent.optional){regular=parentPath.node;break}regular=toNonOptional(parentPath,regular),current=parentPath}const endParentPath=endPath.parentPath;if(isMemberExpression(regular)&&endParentPath.isOptionalCallExpression({callee:endPath.node,optional:!0})){const{object}=regular;context=member.scope.maybeGenerateMemoised(object),context&&(regular.object=assignmentExpression("=",context,object))}let replacementPath=endPath;(isDeleteOperation||isAssignment)&&(replacementPath=endParentPath,regular=endParentPath.node);const baseMemoised=baseNeedsMemoised?assignmentExpression("=",cloneNode(baseRef),cloneNode(startingNode)):cloneNode(baseRef);if(willEndPathCastToBoolean){let nonNullishCheck;nonNullishCheck=noDocumentAll?binaryExpression("!=",baseMemoised,nullLiteral()):logicalExpression("&&",binaryExpression("!==",baseMemoised,nullLiteral()),binaryExpression("!==",cloneNode(baseRef),scope.buildUndefinedNode())),replacementPath.replaceWith(logicalExpression("&&",nonNullishCheck,regular))}else{let nullishCheck;nullishCheck=noDocumentAll?binaryExpression("==",baseMemoised,nullLiteral()):logicalExpression("||",binaryExpression("===",baseMemoised,nullLiteral()),binaryExpression("===",cloneNode(baseRef),scope.buildUndefinedNode())),replacementPath.replaceWith(conditionalExpression(nullishCheck,isDeleteOperation?booleanLiteral(!0):scope.buildUndefinedNode(),regular))}if(context){const endParent=endParentPath.node;endParentPath.replaceWith(optionalCallExpression(optionalMemberExpression(endParent.callee,identifier("call"),!1,!0),[cloneNode(context),...endParent.arguments],!1))}return}if(isUpdateExpression(parent,{argument:node})){if(this.simpleSet)return void member.replaceWith(this.simpleSet(member));const{operator,prefix}=parent;this.memoise(member,2);const ref=scope.generateUidIdentifierBasedOnNode(node);scope.push({id:ref});const seq=[assignmentExpression("=",cloneNode(ref),this.get(member))];if(prefix){seq.push(updateExpression(operator,cloneNode(ref),prefix));const value=sequenceExpression(seq);return void parentPath.replaceWith(this.set(member,value))}{const ref2=scope.generateUidIdentifierBasedOnNode(node);scope.push({id:ref2}),seq.push(assignmentExpression("=",cloneNode(ref2),updateExpression(operator,cloneNode(ref),prefix)),cloneNode(ref));const value=sequenceExpression(seq);return void parentPath.replaceWith(sequenceExpression([this.set(member,value),cloneNode(ref2)]))}}if(parentPath.isAssignmentExpression({left:node}))handleAssignment(this,member,parentPath);else{if(!parentPath.isCallExpression({callee:node}))return parentPath.isOptionalCallExpression({callee:node})?scope.path.isPattern()?void parentPath.replaceWith(callExpression(arrowFunctionExpression([],parentPath.node),[])):void parentPath.replaceWith(this.optionalCall(member,parentPath.node.arguments)):void(this.delete&&parentPath.isUnaryExpression({operator:"delete"})?parentPath.replaceWith(this.delete(member)):parentPath.isForXStatement({left:node})||parentPath.isObjectProperty({value:node})&&parentPath.parentPath.isObjectPattern()||parentPath.isAssignmentPattern({left:node})&&parentPath.parentPath.isObjectProperty({value:parent})&&parentPath.parentPath.parentPath.isObjectPattern()||parentPath.isArrayPattern()||parentPath.isAssignmentPattern({left:node})&&parentPath.parentPath.isArrayPattern()||parentPath.isRestElement()?member.replaceWith(this.destructureSet(member)):parentPath.isTaggedTemplateExpression()?member.replaceWith(this.boundGet(member)):member.replaceWith(this.get(member)));parentPath.replaceWith(this.call(member,parentPath.node.arguments))}}};function handleAssignment(state,member,parentPath){if(state.simpleSet)return void member.replaceWith(state.simpleSet(member));const{operator,right:value}=parentPath.node;if("="===operator)parentPath.replaceWith(state.set(member,value));else{const operatorTrunc=operator.slice(0,-1);LOGICAL_OPERATORS.includes(operatorTrunc)?(state.memoise(member,1),parentPath.replaceWith(logicalExpression(operatorTrunc,state.get(member),state.set(member,value)))):(state.memoise(member,2),parentPath.replaceWith(state.set(member,binaryExpression(operatorTrunc,state.get(member),value))))}}exports.default=function(path,visitor,state){path.traverse(visitor,Object.assign({},handle,state,{memoiser:new AssignmentMemoiser}))}},"./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/import-builder.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _assert=__webpack_require__("assert"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{callExpression,cloneNode,expressionStatement,identifier,importDeclaration,importDefaultSpecifier,importNamespaceSpecifier,importSpecifier,memberExpression,stringLiteral,variableDeclaration,variableDeclarator}=_t;exports.default=class{constructor(importedSource,scope,hub){this._statements=[],this._resultName=null,this._importedSource=void 0,this._scope=scope,this._hub=hub,this._importedSource=importedSource}done(){return{statements:this._statements,resultName:this._resultName}}import(){return this._statements.push(importDeclaration([],stringLiteral(this._importedSource))),this}require(){return this._statements.push(expressionStatement(callExpression(identifier("require"),[stringLiteral(this._importedSource)]))),this}namespace(name="namespace"){const local=this._scope.generateUidIdentifier(name),statement=this._statements[this._statements.length-1];return _assert("ImportDeclaration"===statement.type),_assert(0===statement.specifiers.length),statement.specifiers=[importNamespaceSpecifier(local)],this._resultName=cloneNode(local),this}default(name){const id=this._scope.generateUidIdentifier(name),statement=this._statements[this._statements.length-1];return _assert("ImportDeclaration"===statement.type),_assert(0===statement.specifiers.length),statement.specifiers=[importDefaultSpecifier(id)],this._resultName=cloneNode(id),this}named(name,importName){if("default"===importName)return this.default(name);const id=this._scope.generateUidIdentifier(name),statement=this._statements[this._statements.length-1];return _assert("ImportDeclaration"===statement.type),_assert(0===statement.specifiers.length),statement.specifiers=[importSpecifier(id,identifier(importName))],this._resultName=cloneNode(id),this}var(name){const id=this._scope.generateUidIdentifier(name);let statement=this._statements[this._statements.length-1];return"ExpressionStatement"!==statement.type&&(_assert(this._resultName),statement=expressionStatement(this._resultName),this._statements.push(statement)),this._statements[this._statements.length-1]=variableDeclaration("var",[variableDeclarator(id,statement.expression)]),this._resultName=cloneNode(id),this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(callee){const statement=this._statements[this._statements.length-1];return"ExpressionStatement"===statement.type?statement.expression=callExpression(callee,[statement.expression]):"VariableDeclaration"===statement.type?(_assert(1===statement.declarations.length),statement.declarations[0].init=callExpression(callee,[statement.declarations[0].init])):_assert.fail("Unexpected type."),this}prop(name){const statement=this._statements[this._statements.length-1];return"ExpressionStatement"===statement.type?statement.expression=memberExpression(statement.expression,identifier(name)):"VariableDeclaration"===statement.type?(_assert(1===statement.declarations.length),statement.declarations[0].init=memberExpression(statement.declarations[0].init,identifier(name))):_assert.fail("Unexpected type:"+statement.type),this}read(name){this._resultName=memberExpression(this._resultName,identifier(name))}}},"./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/import-injector.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _assert=__webpack_require__("assert"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_importBuilder=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/import-builder.js"),_isModule=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/is-module.js");const{identifier,importSpecifier,numericLiteral,sequenceExpression,isImportDeclaration}=_t;function isValueImport(node){return"type"!==node.importKind&&"typeof"!==node.importKind}function hasNamespaceImport(node){return 1===node.specifiers.length&&"ImportNamespaceSpecifier"===node.specifiers[0].type||2===node.specifiers.length&&"ImportNamespaceSpecifier"===node.specifiers[1].type}function hasDefaultImport(node){return node.specifiers.length>0&&"ImportDefaultSpecifier"===node.specifiers[0].type}function maybeAppendImportSpecifiers(target,source){return target.specifiers.length?!source.specifiers.length||!hasNamespaceImport(target)&&!hasNamespaceImport(source)&&(hasDefaultImport(source)&&(hasDefaultImport(target)?source.specifiers[0]=importSpecifier(source.specifiers[0].local,identifier("default")):target.specifiers.unshift(source.specifiers.shift())),target.specifiers.push(...source.specifiers),!0):(target.specifiers=source.specifiers,!0)}exports.default=class{constructor(path,importedSource,opts){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:!1,ensureNoContext:!1,importPosition:"before"};const programPath=path.find(p=>p.isProgram());this._programPath=programPath,this._programScope=programPath.scope,this._hub=programPath.hub,this._defaultOpts=this._applyDefaults(importedSource,opts,!0)}addDefault(importedSourceIn,opts){return this.addNamed("default",importedSourceIn,opts)}addNamed(importName,importedSourceIn,opts){return _assert("string"==typeof importName),this._generateImport(this._applyDefaults(importedSourceIn,opts),importName)}addNamespace(importedSourceIn,opts){return this._generateImport(this._applyDefaults(importedSourceIn,opts),null)}addSideEffect(importedSourceIn,opts){return this._generateImport(this._applyDefaults(importedSourceIn,opts),void 0)}_applyDefaults(importedSource,opts,isInit=!1){let newOpts;return"string"==typeof importedSource?newOpts=Object.assign({},this._defaultOpts,{importedSource},opts):(_assert(!opts,"Unexpected secondary arguments."),newOpts=Object.assign({},this._defaultOpts,importedSource)),!isInit&&opts&&(void 0!==opts.nameHint&&(newOpts.nameHint=opts.nameHint),void 0!==opts.blockHoist&&(newOpts.blockHoist=opts.blockHoist)),newOpts}_generateImport(opts,importName){const isDefault="default"===importName,isNamed=!!importName&&!isDefault,isNamespace=null===importName,{importedSource,importedType,importedInterop,importingInterop,ensureLiveReference,ensureNoContext,nameHint,importPosition,blockHoist}=opts;let name=nameHint||importName;const isMod=(0,_isModule.default)(this._programPath),isModuleForNode=isMod&&"node"===importingInterop,isModuleForBabel=isMod&&"babel"===importingInterop;if("after"===importPosition&&!isMod)throw new Error('"importPosition": "after" is only supported in modules');const builder=new _importBuilder.default(importedSource,this._programScope,this._hub);if("es6"===importedType){if(!isModuleForNode&&!isModuleForBabel)throw new Error("Cannot import an ES6 module from CommonJS");builder.import(),isNamespace?builder.namespace(nameHint||importedSource):(isDefault||isNamed)&&builder.named(name,importName)}else{if("commonjs"!==importedType)throw new Error(`Unexpected interopType "${importedType}"`);if("babel"===importedInterop)if(isModuleForNode){name="default"!==name?name:importedSource;const es6Default=`${importedSource}$es6Default`;builder.import(),isNamespace?builder.default(es6Default).var(name||importedSource).wildcardInterop():isDefault?ensureLiveReference?builder.default(es6Default).var(name||importedSource).defaultInterop().read("default"):builder.default(es6Default).var(name).defaultInterop().prop(importName):isNamed&&builder.default(es6Default).read(importName)}else isModuleForBabel?(builder.import(),isNamespace?builder.namespace(name||importedSource):(isDefault||isNamed)&&builder.named(name,importName)):(builder.require(),isNamespace?builder.var(name||importedSource).wildcardInterop():(isDefault||isNamed)&&ensureLiveReference?isDefault?(name="default"!==name?name:importedSource,builder.var(name).read(importName),builder.defaultInterop()):builder.var(importedSource).read(importName):isDefault?builder.var(name).defaultInterop().prop(importName):isNamed&&builder.var(name).prop(importName));else if("compiled"===importedInterop)isModuleForNode?(builder.import(),isNamespace?builder.default(name||importedSource):(isDefault||isNamed)&&builder.default(importedSource).read(name)):isModuleForBabel?(builder.import(),isNamespace?builder.namespace(name||importedSource):(isDefault||isNamed)&&builder.named(name,importName)):(builder.require(),isNamespace?builder.var(name||importedSource):(isDefault||isNamed)&&(ensureLiveReference?builder.var(importedSource).read(name):builder.prop(importName).var(name)));else{if("uncompiled"!==importedInterop)throw new Error(`Unknown importedInterop "${importedInterop}".`);if(isDefault&&ensureLiveReference)throw new Error("No live reference for commonjs default");isModuleForNode?(builder.import(),isNamespace?builder.default(name||importedSource):isDefault?builder.default(name):isNamed&&builder.default(importedSource).read(name)):isModuleForBabel?(builder.import(),isNamespace?builder.default(name||importedSource):isDefault?builder.default(name):isNamed&&builder.named(name,importName)):(builder.require(),isNamespace?builder.var(name||importedSource):isDefault?builder.var(name):isNamed&&(ensureLiveReference?builder.var(importedSource).read(name):builder.var(name).prop(importName)))}}const{statements,resultName}=builder.done();return this._insertStatements(statements,importPosition,blockHoist),(isDefault||isNamed)&&ensureNoContext&&"Identifier"!==resultName.type?sequenceExpression([numericLiteral(0),resultName]):resultName}_insertStatements(statements,importPosition="before",blockHoist=3){if("after"===importPosition){if(this._insertStatementsAfter(statements))return}else if(this._insertStatementsBefore(statements,blockHoist))return;this._programPath.unshiftContainer("body",statements)}_insertStatementsBefore(statements,blockHoist){if(1===statements.length&&isImportDeclaration(statements[0])&&isValueImport(statements[0])){const firstImportDecl=this._programPath.get("body").find(p=>p.isImportDeclaration()&&isValueImport(p.node));if((null==firstImportDecl?void 0:firstImportDecl.node.source.value)===statements[0].source.value&&maybeAppendImportSpecifiers(firstImportDecl.node,statements[0]))return!0}statements.forEach(node=>{node._blockHoist=blockHoist});const targetPath=this._programPath.get("body").find(p=>{const val=p.node._blockHoist;return Number.isFinite(val)&&val<4});return!!targetPath&&(targetPath.insertBefore(statements),!0)}_insertStatementsAfter(statements){const statementsSet=new Set(statements),importDeclarations=new Map;for(const statement of statements)if(isImportDeclaration(statement)&&isValueImport(statement)){const source=statement.source.value;importDeclarations.has(source)||importDeclarations.set(source,[]),importDeclarations.get(source).push(statement)}let lastImportPath=null;for(const bodyStmt of this._programPath.get("body"))if(bodyStmt.isImportDeclaration()&&isValueImport(bodyStmt.node)){lastImportPath=bodyStmt;const source=bodyStmt.node.source.value,newImports=importDeclarations.get(source);if(!newImports)continue;for(const decl of newImports)statementsSet.has(decl)&&maybeAppendImportSpecifiers(bodyStmt.node,decl)&&statementsSet.delete(decl)}return 0===statementsSet.size||(lastImportPath&&lastImportPath.insertAfter(Array.from(statementsSet)),!!lastImportPath)}}},"./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ImportInjector",{enumerable:!0,get:function(){return _importInjector.default}}),exports.addDefault=function(path,importedSource,opts){return new _importInjector.default(path).addDefault(importedSource,opts)},exports.addNamed=function(path,name,importedSource,opts){return new _importInjector.default(path).addNamed(name,importedSource,opts)},exports.addNamespace=function(path,importedSource,opts){return new _importInjector.default(path).addNamespace(importedSource,opts)},exports.addSideEffect=function(path,importedSource,opts){return new _importInjector.default(path).addSideEffect(importedSource,opts)},Object.defineProperty(exports,"isModule",{enumerable:!0,get:function(){return _isModule.default}});var _importInjector=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/import-injector.js"),_isModule=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/is-module.js")},"./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/is-module.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(path){return"module"===path.node.sourceType}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildDynamicImport=function(node,deferToThen,wrapWithPromise,builder){const specifier=_core.types.isCallExpression(node)?node.arguments[0]:node.source;if(_core.types.isStringLiteral(specifier)||_core.types.isTemplateLiteral(specifier)&&0===specifier.quasis.length)return deferToThen?_core.template.expression.ast` + Promise.resolve().then(() => ${builder(specifier)}) + `:builder(specifier);const specifierToString=_core.types.isTemplateLiteral(specifier)?_core.types.identifier("specifier"):_core.types.templateLiteral([_core.types.templateElement({raw:""}),_core.types.templateElement({raw:""})],[_core.types.identifier("specifier")]);return deferToThen?_core.template.expression.ast` + (specifier => + new Promise(r => r(${specifierToString})) + .then(s => ${builder(_core.types.identifier("s"))}) + )(${specifier}) + `:wrapWithPromise?_core.template.expression.ast` + (specifier => + new Promise(r => r(${builder(specifierToString)})) + )(${specifier}) + `:_core.template.expression.ast` + (specifier => ${builder(specifierToString)})(${specifier}) + `};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js");exports.getDynamicImportSource=function(node){const[source]=node.arguments;return _core.types.isStringLiteral(source)||_core.types.isTemplateLiteral(source)?source:_core.template.expression.ast`\`\${${source}}\``}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/get-module-name.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=getModuleName;{const originalGetModuleName=getModuleName;exports.default=getModuleName=function(rootOpts,pluginOpts){var _pluginOpts$moduleId,_pluginOpts$moduleIds,_pluginOpts$getModule,_pluginOpts$moduleRoo;return originalGetModuleName(rootOpts,{moduleId:null!=(_pluginOpts$moduleId=pluginOpts.moduleId)?_pluginOpts$moduleId:rootOpts.moduleId,moduleIds:null!=(_pluginOpts$moduleIds=pluginOpts.moduleIds)?_pluginOpts$moduleIds:rootOpts.moduleIds,getModuleId:null!=(_pluginOpts$getModule=pluginOpts.getModuleId)?_pluginOpts$getModule:rootOpts.getModuleId,moduleRoot:null!=(_pluginOpts$moduleRoo=pluginOpts.moduleRoot)?_pluginOpts$moduleRoo:rootOpts.moduleRoot})}}function getModuleName(rootOpts,pluginOpts){const{filename,filenameRelative=filename,sourceRoot=pluginOpts.moduleRoot}=rootOpts,{moduleId,moduleIds=!!moduleId,getModuleId,moduleRoot=sourceRoot}=pluginOpts;if(!moduleIds)return null;if(null!=moduleId&&!getModuleId)return moduleId;let moduleName=null!=moduleRoot?moduleRoot+"/":"";if(filenameRelative){const sourceRootReplacer=null!=sourceRoot?new RegExp("^"+sourceRoot+"/?"):"";moduleName+=filenameRelative.replace(sourceRootReplacer,"").replace(/\.\w*$/,"")}return moduleName=moduleName.replace(/\\/g,"/"),getModuleId&&getModuleId(moduleName)||moduleName}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"buildDynamicImport",{enumerable:!0,get:function(){return _dynamicImport.buildDynamicImport}}),exports.buildNamespaceInitStatements=function(metadata,sourceMetadata,constantReexports=!1,wrapReference=Lazy.wrapReference){var _wrapReference;const statements=[],srcNamespaceId=_core.types.identifier(sourceMetadata.name);for(const localName of sourceMetadata.importsNamespace)localName!==sourceMetadata.name&&statements.push(_core.template.statement`var NAME = SOURCE;`({NAME:localName,SOURCE:_core.types.cloneNode(srcNamespaceId)}));const srcNamespace=null!=(_wrapReference=wrapReference(srcNamespaceId,sourceMetadata.wrap))?_wrapReference:srcNamespaceId;constantReexports&&statements.push(...buildReexportsFromMeta(metadata,sourceMetadata,!0,wrapReference));for(const exportName of sourceMetadata.reexportNamespace)statements.push((_core.types.isIdentifier(srcNamespace)?_core.template.statement`EXPORTS.NAME = NAMESPACE;`:_core.template.statement` + Object.defineProperty(EXPORTS, "NAME", { + enumerable: true, + get: function() { + return NAMESPACE; + } + }); + `)({EXPORTS:metadata.exportName,NAME:exportName,NAMESPACE:_core.types.cloneNode(srcNamespace)}));if(sourceMetadata.reexportAll){const statement=function(metadata,namespace,constantReexports){return(constantReexports?_core.template.statement` + Object.keys(NAMESPACE).forEach(function(key) { + if (key === "default" || key === "__esModule") return; + VERIFY_NAME_LIST; + if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return; + + EXPORTS[key] = NAMESPACE[key]; + }); + `:_core.template.statement` + Object.keys(NAMESPACE).forEach(function(key) { + if (key === "default" || key === "__esModule") return; + VERIFY_NAME_LIST; + if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return; + + Object.defineProperty(EXPORTS, key, { + enumerable: true, + get: function() { + return NAMESPACE[key]; + }, + }); + }); + `)({NAMESPACE:namespace,EXPORTS:metadata.exportName,VERIFY_NAME_LIST:metadata.exportNameListName?_core.template` + if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return; + `({EXPORTS_LIST:metadata.exportNameListName}):null})}(metadata,_core.types.cloneNode(srcNamespace),constantReexports);statement.loc=sourceMetadata.reexportAll.loc,statements.push(statement)}return statements},exports.ensureStatementsHoisted=function(statements){statements.forEach(header=>{header._blockHoist=3})},Object.defineProperty(exports,"getModuleName",{enumerable:!0,get:function(){return _getModuleName.default}}),Object.defineProperty(exports,"hasExports",{enumerable:!0,get:function(){return _normalizeAndLoadMetadata.hasExports}}),Object.defineProperty(exports,"isModule",{enumerable:!0,get:function(){return _helperModuleImports.isModule}}),Object.defineProperty(exports,"isSideEffectImport",{enumerable:!0,get:function(){return _normalizeAndLoadMetadata.isSideEffectImport}}),exports.rewriteModuleStatementsAndPrepareHeader=function(path,{exportName,strict,allowTopLevelThis,strictMode,noInterop,importInterop=noInterop?"none":"babel",lazy,getWrapperPayload=Lazy.toGetWrapperPayload(null!=lazy&&lazy),wrapReference=Lazy.wrapReference,esNamespaceOnly,filename,constantReexports=arguments[1].loose,enumerableModuleMeta=arguments[1].loose,noIncompleteNsImportDetection}){(0,_normalizeAndLoadMetadata.validateImportInteropOption)(importInterop),_assert((0,_helperModuleImports.isModule)(path),"Cannot process module statements in a script"),path.node.sourceType="script";const meta=(0,_normalizeAndLoadMetadata.default)(path,exportName,{importInterop,initializeReexports:constantReexports,getWrapperPayload,esNamespaceOnly,filename});allowTopLevelThis||(0,_rewriteThis.default)(path);if((0,_rewriteLiveReferences.default)(path,meta,wrapReference),!1!==strictMode){path.node.directives.some(directive=>"use strict"===directive.value.value)||path.unshiftContainer("directives",_core.types.directive(_core.types.directiveLiteral("use strict")))}const headers=[];(0,_normalizeAndLoadMetadata.hasExports)(meta)&&!strict&&headers.push(function(metadata,enumerableModuleMeta=!1){return(enumerableModuleMeta?_core.template.statement` + EXPORTS.__esModule = true; + `:_core.template.statement` + Object.defineProperty(EXPORTS, "__esModule", { + value: true, + }); + `)({EXPORTS:metadata.exportName})}(meta,enumerableModuleMeta));const nameList=function(programPath,metadata){const exportedVars=Object.create(null);for(const data of metadata.local.values())for(const name of data.names)exportedVars[name]=!0;let hasReexport=!1;for(const data of metadata.source.values()){for(const exportName of data.reexports.keys())exportedVars[exportName]=!0;for(const exportName of data.reexportNamespace)exportedVars[exportName]=!0;hasReexport=hasReexport||!!data.reexportAll}if(!hasReexport||0===Object.keys(exportedVars).length)return null;const name=programPath.scope.generateUidIdentifier("exportNames");return delete exportedVars.default,{name:name.name,statement:_core.types.variableDeclaration("var",[_core.types.variableDeclarator(name,_core.types.valueToNode(exportedVars))])}}(path,meta);nameList&&(meta.exportNameListName=nameList.name,headers.push(nameList.statement));return headers.push(...function(programPath,metadata,wrapReference,constantReexports=!1,noIncompleteNsImportDetection=!1){const initStatements=[];for(const[localName,data]of metadata.local)if("import"===data.kind);else if("hoisted"===data.kind)initStatements.push([data.names[0],buildInitStatement(metadata,data.names,_core.types.identifier(localName))]);else if(!noIncompleteNsImportDetection)for(const exportName of data.names)initStatements.push([exportName,null]);for(const data of metadata.source.values()){if(!constantReexports){const reexportsStatements=buildReexportsFromMeta(metadata,data,!1,wrapReference),reexports=[...data.reexports.keys()];for(let i=0;ia0&&(results.push(buildInitStatement(metadata,uninitializedExportNames,programPath.scope.buildUndefinedNode())),uninitializedExportNames=[]),results.push(initStatement)):uninitializedExportNames.push(exportName)}uninitializedExportNames.length>0&&results.push(buildInitStatement(metadata,uninitializedExportNames,programPath.scope.buildUndefinedNode()))}}return results}(path,meta,wrapReference,constantReexports,noIncompleteNsImportDetection)),{meta,headers}},Object.defineProperty(exports,"rewriteThis",{enumerable:!0,get:function(){return _rewriteThis.default}}),exports.wrapInterop=function(programPath,expr,type){if("none"===type)return null;if("node-namespace"===type)return _core.types.callExpression(programPath.hub.addHelper("interopRequireWildcard"),[expr,_core.types.booleanLiteral(!0)]);if("node-default"===type)return null;let helper;if("default"===type)helper="interopRequireDefault";else{if("namespace"!==type)throw new Error(`Unknown interop: ${type}`);helper="interopRequireWildcard"}return _core.types.callExpression(programPath.hub.addHelper(helper),[expr])};var _assert=__webpack_require__("assert"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_helperModuleImports=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/index.js"),_rewriteThis=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js"),_rewriteLiveReferences=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js"),_normalizeAndLoadMetadata=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js"),Lazy=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/lazy-modules.js"),_dynamicImport=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js"),_getModuleName=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/get-module-name.js");exports.getDynamicImportSource=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/dynamic-import.js").getDynamicImportSource;const ReexportTemplate={constant:({exports,exportName,namespaceImport})=>_core.template.statement.ast` + ${exports}.${exportName} = ${namespaceImport}; + `,constantComputed:({exports,exportName,namespaceImport})=>_core.template.statement.ast` + ${exports}["${exportName}"] = ${namespaceImport}; + `,spec:({exports,exportName,namespaceImport})=>_core.template.statement.ast` + Object.defineProperty(${exports}, "${exportName}", { + enumerable: true, + get: function() { + return ${namespaceImport}; + }, + }); + `};function buildReexportsFromMeta(meta,metadata,constantReexports,wrapReference){var _wrapReference2;let namespace=_core.types.identifier(metadata.name);namespace=null!=(_wrapReference2=wrapReference(namespace,metadata.wrap))?_wrapReference2:namespace;const{stringSpecifiers}=meta;return Array.from(metadata.reexports,([exportName,importName])=>{let namespaceImport=_core.types.cloneNode(namespace);"default"===importName&&"node-default"===metadata.interop||(namespaceImport=stringSpecifiers.has(importName)?_core.types.memberExpression(namespaceImport,_core.types.stringLiteral(importName),!0):_core.types.memberExpression(namespaceImport,_core.types.identifier(importName)));const astNodes={exports:meta.exportName,exportName,namespaceImport};return constantReexports||_core.types.isIdentifier(namespaceImport)?stringSpecifiers.has(exportName)?ReexportTemplate.constantComputed(astNodes):ReexportTemplate.constant(astNodes):ReexportTemplate.spec(astNodes)})}const InitTemplate={computed:({exports,name,value})=>_core.template.expression.ast`${exports}["${name}"] = ${value}`,default:({exports,name,value})=>_core.template.expression.ast`${exports}.${name} = ${value}`,define:({exports,name,value})=>_core.template.expression.ast` + Object.defineProperty(${exports}, "${name}", { + enumerable: true, + value: void 0, + writable: true + })["${name}"] = ${value}`};function buildInitStatement(metadata,exportNames,initExpr){const{stringSpecifiers,exportName:exports}=metadata;return _core.types.expressionStatement(exportNames.reduce((value,name)=>{const params={exports,name,value};return"__proto__"===name?InitTemplate.define(params):stringSpecifiers.has(name)?InitTemplate.computed(params):InitTemplate.default(params)},initExpr))}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/lazy-modules.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toGetWrapperPayload=function(lazy){return(source,metadata)=>{if(!1===lazy)return null;if((0,_normalizeAndLoadMetadata.isSideEffectImport)(metadata)||metadata.reexportAll)return null;if(!0===lazy)return source.includes(".")?null:"lazy";if(Array.isArray(lazy))return lazy.includes(source)?"lazy":null;if("function"==typeof lazy)return lazy(source)?"lazy":null;throw new Error(".lazy must be a boolean, string array, or function")}},exports.wrapReference=function(ref,payload){return"lazy"===payload?_core.types.callExpression(ref,[]):null};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_normalizeAndLoadMetadata=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js")},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(programPath,exportName,{importInterop,initializeReexports=!1,getWrapperPayload,esNamespaceOnly=!1,filename}){exportName||(exportName=programPath.scope.generateUidIdentifier("exports").name);const stringSpecifiers=new Set;!function(programPath){programPath.get("body").forEach(child=>{child.isExportDefaultDeclaration()&&(null!=child.splitExportDeclaration||(child.splitExportDeclaration=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js").NodePath.prototype.splitExportDeclaration),child.splitExportDeclaration())})}(programPath);const{local,sources,hasExports}=function(programPath,{getWrapperPayload,initializeReexports},stringSpecifiers){const localData=function(programPath,initializeReexports,stringSpecifiers){const bindingKindLookup=new Map,programScope=programPath.scope,programChildren=programPath.get("body");programChildren.forEach(child=>{let kind;if(child.isImportDeclaration())kind="import";else{if(child.isExportDefaultDeclaration()&&(child=child.get("declaration")),child.isExportNamedDeclaration())if(child.node.declaration)child=child.get("declaration");else if(initializeReexports&&child.node.source&&child.get("source").isStringLiteral())return void child.get("specifiers").forEach(spec=>{assertExportSpecifier(spec),bindingKindLookup.set(spec.get("local").node.name,"block")});if(child.isFunctionDeclaration())kind="hoisted";else if(child.isClassDeclaration())kind="block";else if(child.isVariableDeclaration({kind:"var"}))kind="var";else{if(!child.isVariableDeclaration())return;kind="block"}}Object.keys(child.getOuterBindingIdentifiers()).forEach(name=>{bindingKindLookup.set(name,kind)})});const localMetadata=new Map,getLocalMetadata=idPath=>{const localName=idPath.node.name;let metadata=localMetadata.get(localName);if(!metadata){var _bindingKindLookup$ge,_programScope$getBind;const kind=null!=(_bindingKindLookup$ge=bindingKindLookup.get(localName))?_bindingKindLookup$ge:null==(_programScope$getBind=programScope.getBinding(localName))?void 0:_programScope$getBind.kind;if(void 0===kind)throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);metadata={names:[],kind},localMetadata.set(localName,metadata)}return metadata};return programChildren.forEach(child=>{if(!child.isExportNamedDeclaration()||!initializeReexports&&child.node.source){if(child.isExportDefaultDeclaration()){const declaration=child.get("declaration");if(!declaration.isFunctionDeclaration()&&!declaration.isClassDeclaration())throw declaration.buildCodeFrameError("Unexpected default expression export.");getLocalMetadata(declaration.get("id")).names.push("default")}}else if(child.node.declaration){const declaration=child.get("declaration"),ids=declaration.getOuterBindingIdentifierPaths();Object.keys(ids).forEach(name=>{if("__esModule"===name)throw declaration.buildCodeFrameError('Illegal export "__esModule".');getLocalMetadata(ids[name]).names.push(name)})}else child.get("specifiers").forEach(spec=>{const local=spec.get("local"),exported=spec.get("exported"),localMetadata=getLocalMetadata(local),exportName=getExportSpecifierName(exported,stringSpecifiers);if("__esModule"===exportName)throw exported.buildCodeFrameError('Illegal export "__esModule".');localMetadata.names.push(exportName)})}),localMetadata}(programPath,initializeReexports,stringSpecifiers),importNodes=new Map,sourceData=new Map,getData=(sourceNode,node)=>{const source=sourceNode.value;let data=sourceData.get(source);return data?importNodes.get(source).push(node):(data={name:programPath.scope.generateUidIdentifier((0,_path.basename)(source,(0,_path.extname)(source))).name,interop:"none",loc:null,imports:new Map,importsNamespace:new Set,reexports:new Map,reexportNamespace:new Set,reexportAll:null,wrap:null,get lazy(){return"lazy"===this.wrap},referenced:!1},sourceData.set(source,data),importNodes.set(source,[node])),data};let hasExports=!1;programPath.get("body").forEach(child=>{if(child.isImportDeclaration()){const data=getData(child.node.source,child.node);data.loc||(data.loc=child.node.loc),child.get("specifiers").forEach(spec=>{if(spec.isImportDefaultSpecifier()){const localName=spec.get("local").node.name;data.imports.set(localName,"default");const reexport=localData.get(localName);reexport&&(localData.delete(localName),reexport.names.forEach(name=>{data.reexports.set(name,"default")}),data.referenced=!0)}else if(spec.isImportNamespaceSpecifier()){const localName=spec.get("local").node.name;data.importsNamespace.add(localName);const reexport=localData.get(localName);reexport&&(localData.delete(localName),reexport.names.forEach(name=>{data.reexportNamespace.add(name)}),data.referenced=!0)}else if(spec.isImportSpecifier()){const importName=getExportSpecifierName(spec.get("imported"),stringSpecifiers),localName=spec.get("local").node.name;data.imports.set(localName,importName);const reexport=localData.get(localName);reexport&&(localData.delete(localName),reexport.names.forEach(name=>{data.reexports.set(name,importName)}),data.referenced=!0)}})}else if(child.isExportAllDeclaration()){hasExports=!0;const data=getData(child.node.source,child.node);data.loc||(data.loc=child.node.loc),data.reexportAll={loc:child.node.loc},data.referenced=!0}else if(child.isExportNamedDeclaration()&&child.node.source){hasExports=!0;const data=getData(child.node.source,child.node);data.loc||(data.loc=child.node.loc),child.get("specifiers").forEach(spec=>{assertExportSpecifier(spec);const importName=getExportSpecifierName(spec.get("local"),stringSpecifiers),exportName=getExportSpecifierName(spec.get("exported"),stringSpecifiers);if(data.reexports.set(exportName,importName),data.referenced=!0,"__esModule"===exportName)throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".')})}else(child.isExportNamedDeclaration()||child.isExportDefaultDeclaration())&&(hasExports=!0)});for(const metadata of sourceData.values()){let needsDefault=!1,needsNamed=!1;metadata.importsNamespace.size>0&&(needsDefault=!0,needsNamed=!0),metadata.reexportAll&&(needsNamed=!0);for(const importName of metadata.imports.values())"default"===importName?needsDefault=!0:needsNamed=!0;for(const importName of metadata.reexports.values())"default"===importName?needsDefault=!0:needsNamed=!0;needsDefault&&needsNamed?metadata.interop="namespace":needsDefault&&(metadata.interop="default")}if(getWrapperPayload)for(const[source,metadata]of sourceData)metadata.wrap=getWrapperPayload(source,metadata,importNodes.get(source));return{hasExports,local:localData,sources:sourceData}}(programPath,{initializeReexports,getWrapperPayload},stringSpecifiers);!function(programPath){programPath.get("body").forEach(child=>{if(child.isImportDeclaration())child.remove();else if(child.isExportNamedDeclaration())child.node.declaration?(child.node.declaration._blockHoist=child.node._blockHoist,child.replaceWith(child.node.declaration)):child.remove();else if(child.isExportDefaultDeclaration()){const declaration=child.get("declaration");if(!declaration.isFunctionDeclaration()&&!declaration.isClassDeclaration())throw declaration.buildCodeFrameError("Unexpected default expression export.");declaration._blockHoist=child.node._blockHoist,child.replaceWith(declaration)}else child.isExportAllDeclaration()&&child.remove()})}(programPath);for(const[source,metadata]of sources){const{importsNamespace,imports}=metadata;if(importsNamespace.size>0&&0===imports.size){const[nameOfnamespace]=importsNamespace;metadata.name=nameOfnamespace}const resolvedInterop=resolveImportInterop(importInterop,source,filename);"none"===resolvedInterop?metadata.interop="none":"node"===resolvedInterop&&"namespace"===metadata.interop?metadata.interop="node-namespace":"node"===resolvedInterop&&"default"===metadata.interop?metadata.interop="node-default":esNamespaceOnly&&"namespace"===metadata.interop&&(metadata.interop="default")}return{exportName,exportNameListName:null,hasExports,local,source:sources,stringSpecifiers}},exports.hasExports=function(metadata){return metadata.hasExports},exports.isSideEffectImport=function(source){return 0===source.imports.size&&0===source.importsNamespace.size&&0===source.reexports.size&&0===source.reexportNamespace.size&&!source.reexportAll},exports.validateImportInteropOption=validateImportInteropOption;var _path=__webpack_require__("path"),_helperValidatorIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js");function validateImportInteropOption(importInterop){if("function"!=typeof importInterop&&"none"!==importInterop&&"babel"!==importInterop&&"node"!==importInterop)throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${importInterop}).`);return importInterop}function resolveImportInterop(importInterop,source,filename){return"function"==typeof importInterop?validateImportInteropOption(importInterop(source,filename)):importInterop}function getExportSpecifierName(path,stringSpecifiers){if(path.isIdentifier())return path.node.name;if(path.isStringLiteral()){const stringValue=path.node.value;return(0,_helperValidatorIdentifier.isIdentifierName)(stringValue)||stringSpecifiers.add(stringValue),stringValue}throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`)}function assertExportSpecifier(path){if(!path.isExportSpecifier())throw path.isExportNamespaceSpecifier()?path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-transform-export-namespace-from`."):path.buildCodeFrameError("Unexpected export specifier type")}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(programPath,metadata,wrapReference){const imported=new Map,exported=new Map,requeueInParent=path=>{programPath.requeue(path)};for(const[source,data]of metadata.source){for(const[localName,importName]of data.imports)imported.set(localName,[source,importName,null]);for(const localName of data.importsNamespace)imported.set(localName,[source,null,localName])}for(const[local,data]of metadata.local){let exportMeta=exported.get(local);exportMeta||(exportMeta=[],exported.set(local,exportMeta)),exportMeta.push(...data.names)}const rewriteBindingInitVisitorState={metadata,requeueInParent,scope:programPath.scope,exported};programPath.traverse(rewriteBindingInitVisitor,rewriteBindingInitVisitorState);const rewriteReferencesVisitorState={seen:new WeakSet,metadata,requeueInParent,scope:programPath.scope,imported,exported,buildImportReference([source,importName,localName],identNode){const meta=metadata.source.get(source);if(meta.referenced=!0,localName){var _wrapReference;if(meta.wrap)identNode=null!=(_wrapReference=wrapReference(identNode,meta.wrap))?_wrapReference:identNode;return identNode}let namespace=_core.types.identifier(meta.name);var _wrapReference2;meta.wrap&&(namespace=null!=(_wrapReference2=wrapReference(namespace,meta.wrap))?_wrapReference2:namespace);if("default"===importName&&"node-default"===meta.interop)return namespace;const computed=metadata.stringSpecifiers.has(importName);return _core.types.memberExpression(namespace,computed?_core.types.stringLiteral(importName):_core.types.identifier(importName),computed)}};programPath.traverse(rewriteReferencesVisitor,rewriteReferencesVisitorState)};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js");const rewriteBindingInitVisitor={Scope(path){path.skip()},ClassDeclaration(path){const{requeueInParent,exported,metadata}=this,{id}=path.node;if(!id)throw new Error("Expected class to have a name");const localName=id.name,exportNames=exported.get(localName)||[];if(exportNames.length>0){const statement=_core.types.expressionStatement(buildBindingExportAssignmentExpression(metadata,exportNames,_core.types.identifier(localName),path.scope));statement._blockHoist=path.node._blockHoist,requeueInParent(path.insertAfter(statement)[0])}},VariableDeclaration(path){const{requeueInParent,exported,metadata}=this,isVar="var"===path.node.kind;for(const decl of path.get("declarations")){const{id}=decl.node;let{init}=decl.node;if(!_core.types.isIdentifier(id)||!exported.has(id.name)||_core.types.isArrowFunctionExpression(init)||_core.types.isFunctionExpression(init)&&!init.id||_core.types.isClassExpression(init)&&!init.id){for(const localName of Object.keys(decl.getOuterBindingIdentifiers()))if(exported.has(localName)){const statement=_core.types.expressionStatement(buildBindingExportAssignmentExpression(metadata,exported.get(localName),_core.types.identifier(localName),path.scope));statement._blockHoist=path.node._blockHoist,requeueInParent(path.insertAfter(statement)[0])}}else{if(!init){if(isVar)continue;init=path.scope.buildUndefinedNode()}decl.node.init=buildBindingExportAssignmentExpression(metadata,exported.get(id.name),init,path.scope),requeueInParent(decl.get("init"))}}}},buildBindingExportAssignmentExpression=(metadata,exportNames,localExpr,scope)=>{const exportsObjectName=metadata.exportName;for(let currentScope=scope;null!=currentScope;currentScope=currentScope.parent)currentScope.hasOwnBinding(exportsObjectName)&¤tScope.rename(exportsObjectName);return(exportNames||[]).reduce((expr,exportName)=>{const{stringSpecifiers}=metadata,computed=stringSpecifiers.has(exportName);return _core.types.assignmentExpression("=",_core.types.memberExpression(_core.types.identifier(exportsObjectName),computed?_core.types.stringLiteral(exportName):_core.types.identifier(exportName),computed),expr)},localExpr)},buildImportThrow=localName=>_core.template.expression.ast` + (function() { + throw new Error('"' + '${localName}' + '" is read-only.'); + })() + `,rewriteReferencesVisitor={ReferencedIdentifier(path){const{seen,buildImportReference,scope,imported,requeueInParent}=this;if(seen.has(path.node))return;seen.add(path.node);const localName=path.node.name,importData=imported.get(localName);if(importData){if(function(path){do{switch(path.parent.type){case"TSTypeAnnotation":case"TSTypeAliasDeclaration":case"TSTypeReference":case"TypeAnnotation":case"TypeAlias":return!0;case"ExportSpecifier":return"type"===path.parentPath.parent.exportKind;default:if(path.parentPath.isStatement()||path.parentPath.isExpression())return!1}}while(path=path.parentPath)}(path))throw path.buildCodeFrameError(`Cannot transform the imported binding "${localName}" since it's also used in a type annotation. Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`);const localBinding=path.scope.getBinding(localName);if(scope.getBinding(localName)!==localBinding)return;const ref=buildImportReference(importData,path.node);if(ref.loc=path.node.loc,(path.parentPath.isCallExpression({callee:path.node})||path.parentPath.isOptionalCallExpression({callee:path.node})||path.parentPath.isTaggedTemplateExpression({tag:path.node}))&&_core.types.isMemberExpression(ref))path.replaceWith(_core.types.sequenceExpression([_core.types.numericLiteral(0),ref]));else if(path.isJSXIdentifier()&&_core.types.isMemberExpression(ref)){const{object,property}=ref;path.replaceWith(_core.types.jsxMemberExpression(_core.types.jsxIdentifier(object.name),_core.types.jsxIdentifier(property.name)))}else path.replaceWith(ref);requeueInParent(path),path.skip()}},UpdateExpression(path){const{scope,seen,imported,exported,requeueInParent,buildImportReference}=this;if(seen.has(path.node))return;seen.add(path.node);const arg=path.get("argument");if(arg.isMemberExpression())return;const update=path.node;if(arg.isIdentifier()){const localName=arg.node.name;if(scope.getBinding(localName)!==path.scope.getBinding(localName))return;const exportedNames=exported.get(localName),importData=imported.get(localName);if((null==exportedNames?void 0:exportedNames.length)>0||importData)if(importData)path.replaceWith(_core.types.assignmentExpression(update.operator[0]+"=",buildImportReference(importData,arg.node),buildImportThrow(localName)));else if(update.prefix)path.replaceWith(buildBindingExportAssignmentExpression(this.metadata,exportedNames,_core.types.cloneNode(update),path.scope));else{const ref=scope.generateDeclaredUidIdentifier(localName);path.replaceWith(_core.types.sequenceExpression([_core.types.assignmentExpression("=",_core.types.cloneNode(ref),_core.types.cloneNode(update)),buildBindingExportAssignmentExpression(this.metadata,exportedNames,_core.types.identifier(localName),path.scope),_core.types.cloneNode(ref)]))}}requeueInParent(path),path.skip()},AssignmentExpression:{exit(path){const{scope,seen,imported,exported,requeueInParent,buildImportReference}=this;if(seen.has(path.node))return;seen.add(path.node);const left=path.get("left");if(!left.isMemberExpression())if(left.isIdentifier()){const localName=left.node.name;if(scope.getBinding(localName)!==path.scope.getBinding(localName))return;const exportedNames=exported.get(localName),importData=imported.get(localName);if((null==exportedNames?void 0:exportedNames.length)>0||importData){const assignment=path.node;importData&&(assignment.left=buildImportReference(importData,left.node),assignment.right=_core.types.sequenceExpression([assignment.right,buildImportThrow(localName)]));const{operator}=assignment;let newExpr;newExpr="="===operator?assignment:"&&="===operator||"||="===operator||"??="===operator?_core.types.assignmentExpression("=",assignment.left,_core.types.logicalExpression(operator.slice(0,-1),_core.types.cloneNode(assignment.left),assignment.right)):_core.types.assignmentExpression("=",assignment.left,_core.types.binaryExpression(operator.slice(0,-1),_core.types.cloneNode(assignment.left),assignment.right)),path.replaceWith(buildBindingExportAssignmentExpression(this.metadata,exportedNames,newExpr,path.scope)),requeueInParent(path),path.skip()}}else{const ids=left.getOuterBindingIdentifiers(),programScopeIds=Object.keys(ids).filter(localName=>scope.getBinding(localName)===path.scope.getBinding(localName)),id=programScopeIds.find(localName=>imported.has(localName));id&&(path.node.right=_core.types.sequenceExpression([path.node.right,buildImportThrow(id)]));const items=[];if(programScopeIds.forEach(localName=>{const exportedNames=exported.get(localName)||[];exportedNames.length>0&&items.push(buildBindingExportAssignmentExpression(this.metadata,exportedNames,_core.types.identifier(localName),path.scope))}),items.length>0){let node=_core.types.sequenceExpression(items);path.parentPath.isExpressionStatement()&&(node=_core.types.expressionStatement(node),node._blockHoist=path.parentPath.node._blockHoist);requeueInParent(path.insertAfter(node)[0])}}}},ForXStatement(path){const{scope,node}=path,{left}=node,{exported,imported,scope:programScope}=this;if(!_core.types.isVariableDeclaration(left)){let importConstViolationName,didTransformExport=!1;const loopBodyScope=path.get("body").scope;for(const name of Object.keys(_core.types.getOuterBindingIdentifiers(left)))programScope.getBinding(name)===scope.getBinding(name)&&(exported.has(name)&&(didTransformExport=!0,loopBodyScope.hasOwnBinding(name)&&loopBodyScope.rename(name)),imported.has(name)&&!importConstViolationName&&(importConstViolationName=name));if(!didTransformExport&&!importConstViolationName)return;path.ensureBlock();const bodyPath=path.get("body"),newLoopId=scope.generateUidIdentifierBasedOnNode(left);path.get("left").replaceWith(_core.types.variableDeclaration("let",[_core.types.variableDeclarator(_core.types.cloneNode(newLoopId))])),scope.registerDeclaration(path.get("left")),didTransformExport&&bodyPath.unshiftContainer("body",_core.types.expressionStatement(_core.types.assignmentExpression("=",left,newLoopId))),importConstViolationName&&bodyPath.unshiftContainer("body",_core.types.expressionStatement(buildImportThrow(importConstViolationName)))}}}},"./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(programPath){rewriteThisVisitor||(rewriteThisVisitor=_traverse.visitors.environmentVisitor({ThisExpression(path){path.replaceWith(_core.types.unaryExpression("void",_core.types.numericLiteral(0),!0))}}),rewriteThisVisitor.noScope=!0);(0,_traverse.default)(programPath.node,rewriteThisVisitor)};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_traverse=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");let rewriteThisVisitor},"./node_modules/.pnpm/@babel+helper-optimise-call-expression@7.27.1/node_modules/@babel/helper-optimise-call-expression/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(callee,thisNode,args,optional){return 1===args.length&&isSpreadElement(args[0])&&isIdentifier(args[0].argument,{name:"arguments"})?optional?optionalCallExpression(optionalMemberExpression(callee,identifier("apply"),!1,!0),[thisNode,args[0].argument],!1):callExpression(memberExpression(callee,identifier("apply")),[thisNode,args[0].argument]):optional?optionalCallExpression(optionalMemberExpression(callee,identifier("call"),!1,!0),[thisNode,...args],!1):callExpression(memberExpression(callee,identifier("call")),[thisNode,...args])};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{callExpression,identifier,isIdentifier,isSpreadElement,memberExpression,optionalCallExpression,optionalMemberExpression}=_t},"./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.declare=declare,exports.declarePreset=void 0;const apiPolyfills={assertVersion:api=>range=>{!function(range,version){if("number"==typeof range){if(!Number.isInteger(range))throw new Error("Expected string or integer value.");range=`^${range}.0.0-0`}if("string"!=typeof range)throw new Error("Expected string or integer value.");const limit=Error.stackTraceLimit;"number"==typeof limit&&limit<25&&(Error.stackTraceLimit=25);let err;err="7."===version.slice(0,2)?new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". You'll need to update your @babel/core version.`):new Error(`Requires Babel "${range}", but was loaded with "${version}". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel.`);"number"==typeof limit&&(Error.stackTraceLimit=limit);throw Object.assign(err,{code:"BABEL_VERSION_UNSUPPORTED",version,range})}(range,api.version)}};function declare(builder){return(api,options,dirname)=>{let clonedApi;for(const name of Object.keys(apiPolyfills))api[name]||(null!=clonedApi||(clonedApi=copyApiObject(api)),clonedApi[name]=apiPolyfills[name](clonedApi));return builder(null!=clonedApi?clonedApi:api,options||{},dirname)}}Object.assign(apiPolyfills,{targets:()=>()=>({}),assumption:()=>()=>{},addExternalDependency:()=>()=>{}});exports.declarePreset=declare;function copyApiObject(api){let proto=null;return"string"==typeof api.version&&/^7\./.test(api.version)&&(proto=Object.getPrototypeOf(api),!proto||hasOwnProperty.call(proto,"version")&&hasOwnProperty.call(proto,"transform")&&hasOwnProperty.call(proto,"template")&&hasOwnProperty.call(proto,"types")||(proto=null)),Object.assign({},proto,api)}},"./node_modules/.pnpm/@babel+helper-replace-supers@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-replace-supers/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperMemberExpressionToFunctions=__webpack_require__("./node_modules/.pnpm/@babel+helper-member-expression-to-functions@7.27.1/node_modules/@babel/helper-member-expression-to-functions/lib/index.js"),_helperOptimiseCallExpression=__webpack_require__("./node_modules/.pnpm/@babel+helper-optimise-call-expression@7.27.1/node_modules/@babel/helper-optimise-call-expression/lib/index.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_traverse=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js");const{assignmentExpression,callExpression,cloneNode,identifier,memberExpression,sequenceExpression,stringLiteral,thisExpression}=_core.types;exports.environmentVisitor=_traverse.visitors.environmentVisitor({}),exports.skipAllButComputedKey=function(path){path.skip(),path.node.computed&&path.context.maybeQueue(path.get("key"))};const visitor=_traverse.visitors.environmentVisitor({Super(path,state){const{node,parentPath}=path;parentPath.isMemberExpression({object:node})&&state.handle(parentPath)}}),unshadowSuperBindingVisitor=_traverse.visitors.environmentVisitor({Scopable(path,{refName}){const binding=path.scope.getOwnBinding(refName);binding&&binding.identifier.name===refName&&path.scope.rename(refName)}}),specHandlers={memoise(superMember,count){const{scope,node}=superMember,{computed,property}=node;if(!computed)return;const memo=scope.maybeGenerateMemoised(property);memo&&this.memoiser.set(property,memo,count)},prop(superMember){const{computed,property}=superMember.node;return this.memoiser.has(property)?cloneNode(this.memoiser.get(property)):computed?cloneNode(property):stringLiteral(property.name)},_getPrototypeOfExpression(){const objectRef=cloneNode(this.getObjectRef()),targetRef=this.isStatic||this.isPrivateMethod?objectRef:memberExpression(objectRef,identifier("prototype"));return callExpression(this.file.addHelper("getPrototypeOf"),[targetRef])},get(superMember){const objectRef=cloneNode(this.getObjectRef());return callExpression(this.file.addHelper("superPropGet"),[this.isDerivedConstructor?sequenceExpression([thisExpression(),objectRef]):objectRef,this.prop(superMember),thisExpression(),...this.isStatic||this.isPrivateMethod?[]:[_core.types.numericLiteral(1)]])},_call(superMember,args,optional){const objectRef=cloneNode(this.getObjectRef());let argsNode;argsNode=1===args.length&&_core.types.isSpreadElement(args[0])&&(_core.types.isIdentifier(args[0].argument)||_core.types.isArrayExpression(args[0].argument))?args[0].argument:_core.types.arrayExpression(args);const call=_core.types.callExpression(this.file.addHelper("superPropGet"),[this.isDerivedConstructor?sequenceExpression([thisExpression(),objectRef]):objectRef,this.prop(superMember),thisExpression(),_core.types.numericLiteral(2|(this.isStatic||this.isPrivateMethod?0:1))]);return optional?_core.types.optionalCallExpression(call,[argsNode],!0):callExpression(call,[argsNode])},set(superMember,value){const objectRef=cloneNode(this.getObjectRef());return callExpression(this.file.addHelper("superPropSet"),[this.isDerivedConstructor?sequenceExpression([thisExpression(),objectRef]):objectRef,this.prop(superMember),value,thisExpression(),_core.types.numericLiteral(superMember.isInStrictMode()?1:0),...this.isStatic||this.isPrivateMethod?[]:[_core.types.numericLiteral(1)]])},destructureSet(superMember){throw superMember.buildCodeFrameError("Destructuring to a super field is not supported yet.")},call(superMember,args){return this._call(superMember,args,!1)},optionalCall(superMember,args){return this._call(superMember,args,!0)},delete(superMember){return superMember.node.computed?sequenceExpression([callExpression(this.file.addHelper("toPropertyKey"),[cloneNode(superMember.node.property)]),_core.template.expression.ast` + function () { throw new ReferenceError("'delete super[expr]' is invalid"); }() + `]):_core.template.expression.ast` + function () { throw new ReferenceError("'delete super.prop' is invalid"); }() + `}},specHandlers_old={memoise(superMember,count){const{scope,node}=superMember,{computed,property}=node;if(!computed)return;const memo=scope.maybeGenerateMemoised(property);memo&&this.memoiser.set(property,memo,count)},prop(superMember){const{computed,property}=superMember.node;return this.memoiser.has(property)?cloneNode(this.memoiser.get(property)):computed?cloneNode(property):stringLiteral(property.name)},_getPrototypeOfExpression(){const objectRef=cloneNode(this.getObjectRef()),targetRef=this.isStatic||this.isPrivateMethod?objectRef:memberExpression(objectRef,identifier("prototype"));return callExpression(this.file.addHelper("getPrototypeOf"),[targetRef])},get(superMember){return this._get(superMember)},_get(superMember){const proto=this._getPrototypeOfExpression();return callExpression(this.file.addHelper("get"),[this.isDerivedConstructor?sequenceExpression([thisExpression(),proto]):proto,this.prop(superMember),thisExpression()])},set(superMember,value){const proto=this._getPrototypeOfExpression();return callExpression(this.file.addHelper("set"),[this.isDerivedConstructor?sequenceExpression([thisExpression(),proto]):proto,this.prop(superMember),value,thisExpression(),_core.types.booleanLiteral(superMember.isInStrictMode())])},destructureSet(superMember){throw superMember.buildCodeFrameError("Destructuring to a super field is not supported yet.")},call(superMember,args){return(0,_helperOptimiseCallExpression.default)(this._get(superMember),thisExpression(),args,!1)},optionalCall(superMember,args){return(0,_helperOptimiseCallExpression.default)(this._get(superMember),cloneNode(thisExpression()),args,!0)},delete(superMember){return superMember.node.computed?sequenceExpression([callExpression(this.file.addHelper("toPropertyKey"),[cloneNode(superMember.node.property)]),_core.template.expression.ast` + function () { throw new ReferenceError("'delete super[expr]' is invalid"); }() + `]):_core.template.expression.ast` + function () { throw new ReferenceError("'delete super.prop' is invalid"); }() + `}},looseHandlers=Object.assign({},specHandlers,{prop(superMember){const{property}=superMember.node;return this.memoiser.has(property)?cloneNode(this.memoiser.get(property)):cloneNode(property)},get(superMember){const{isStatic,getSuperRef}=this,{computed}=superMember.node,prop=this.prop(superMember);let object;var _getSuperRef,_getSuperRef2;isStatic?object=null!=(_getSuperRef=getSuperRef())?_getSuperRef:memberExpression(identifier("Function"),identifier("prototype")):object=memberExpression(null!=(_getSuperRef2=getSuperRef())?_getSuperRef2:identifier("Object"),identifier("prototype"));return memberExpression(object,prop,computed)},set(superMember,value){const{computed}=superMember.node,prop=this.prop(superMember);return assignmentExpression("=",memberExpression(thisExpression(),prop,computed),value)},destructureSet(superMember){const{computed}=superMember.node,prop=this.prop(superMember);return memberExpression(thisExpression(),prop,computed)},call(superMember,args){return(0,_helperOptimiseCallExpression.default)(this.get(superMember),thisExpression(),args,!1)},optionalCall(superMember,args){return(0,_helperOptimiseCallExpression.default)(this.get(superMember),thisExpression(),args,!0)}});exports.default=class{constructor(opts){var _opts$constantSuper;const path=opts.methodPath;this.methodPath=path,this.isDerivedConstructor=path.isClassMethod({kind:"constructor"})&&!!opts.superRef,this.isStatic=path.isObjectMethod()||path.node.static||(null==path.isStaticBlock?void 0:path.isStaticBlock()),this.isPrivateMethod=path.isPrivate()&&path.isMethod(),this.file=opts.file,this.constantSuper=null!=(_opts$constantSuper=opts.constantSuper)?_opts$constantSuper:opts.isLoose,this.opts=opts}getObjectRef(){return cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){return this.opts.superRef?cloneNode(this.opts.superRef):this.opts.getSuperRef?cloneNode(this.opts.getSuperRef()):void 0}replace(){const{methodPath}=this;this.opts.refToPreserve&&methodPath.traverse(unshadowSuperBindingVisitor,{refName:this.opts.refToPreserve.name});const handler=this.constantSuper?looseHandlers:this.file.availableHelper("superPropSet")?specHandlers:specHandlers_old;visitor.shouldSkip=path=>{if(path.parentPath===methodPath&&("decorators"===path.parentKey||"key"===path.parentKey))return!0},(0,_helperMemberExpressionToFunctions.default)(methodPath,visitor,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:handler.get},handler))}}},"./node_modules/.pnpm/@babel+helper-simple-access@7.27.1/node_modules/@babel/helper-simple-access/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.A=function(path,bindingNames){var _arguments$;path.traverse(simpleAssignmentVisitor,{scope:path.scope,bindingNames,seen:new WeakSet,includeUpdateExpression:null==(_arguments$=arguments[2])||_arguments$})};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{LOGICAL_OPERATORS,assignmentExpression,binaryExpression,cloneNode,identifier,logicalExpression,numericLiteral,sequenceExpression,unaryExpression}=_t,simpleAssignmentVisitor={AssignmentExpression:{exit(path){const{scope,seen,bindingNames}=this;if("="===path.node.operator)return;if(seen.has(path.node))return;seen.add(path.node);const left=path.get("left");if(!left.isIdentifier())return;const localName=left.node.name;if(!bindingNames.has(localName))return;if(scope.getBinding(localName)!==path.scope.getBinding(localName))return;const operator=path.node.operator.slice(0,-1);LOGICAL_OPERATORS.includes(operator)?path.replaceWith(logicalExpression(operator,path.node.left,assignmentExpression("=",cloneNode(path.node.left),path.node.right))):(path.node.right=binaryExpression(operator,cloneNode(path.node.left),path.node.right),path.node.operator="=")}}};simpleAssignmentVisitor.UpdateExpression={exit(path){if(!this.includeUpdateExpression)return;const{scope,bindingNames}=this,arg=path.get("argument");if(!arg.isIdentifier())return;const localName=arg.node.name;if(bindingNames.has(localName)&&scope.getBinding(localName)===path.scope.getBinding(localName))if(path.parentPath.isExpressionStatement()&&!path.isCompletionRecord()){const operator="++"===path.node.operator?"+=":"-=";path.replaceWith(assignmentExpression(operator,arg.node,numericLiteral(1)))}else if(path.node.prefix)path.replaceWith(assignmentExpression("=",identifier(localName),binaryExpression(path.node.operator[0],unaryExpression("+",arg.node),numericLiteral(1))));else{const old=path.scope.generateUidIdentifierBasedOnNode(arg.node,"old"),varName=old.name;path.scope.push({id:old});const binary=binaryExpression(path.node.operator[0],identifier(varName),numericLiteral(1));path.replaceWith(sequenceExpression([assignmentExpression("=",identifier(varName),unaryExpression("+",arg.node)),assignmentExpression("=",cloneNode(arg.node),binary),identifier(varName)]))}}}},"./node_modules/.pnpm/@babel+helper-skip-transparent-expression-wrappers@7.27.1/node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isTransparentExprWrapper=isTransparentExprWrapper,exports.skipTransparentExprWrapperNodes=function(node){for(;isTransparentExprWrapper(node);)node=node.expression;return node},exports.skipTransparentExprWrappers=function(path){for(;isTransparentExprWrapper(path.node);)path=path.get("expression");return path};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{isParenthesizedExpression,isTSAsExpression,isTSNonNullExpression,isTSSatisfiesExpression,isTSTypeAssertion,isTypeCastExpression}=_t;function isTransparentExprWrapper(node){return isTSAsExpression(node)||isTSSatisfiesExpression(node)||isTSTypeAssertion(node)||isTSNonNullExpression(node)||isTypeCastExpression(node)||isParenthesizedExpression(node)}},"./node_modules/.pnpm/@babel+helper-string-parser@7.27.1/node_modules/@babel/helper-string-parser/lib/index.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.readCodePoint=readCodePoint,exports.readInt=readInt,exports.readStringContents=function(type,input,pos,lineStart,curLine,errors){const initialPos=pos,initialLineStart=lineStart,initialCurLine=curLine;let out="",firstInvalidLoc=null,chunkStart=pos;const{length}=input;for(;;){if(pos>=length){errors.unterminated(initialPos,initialLineStart,initialCurLine),out+=input.slice(chunkStart,pos);break}const ch=input.charCodeAt(pos);if(isStringEnd(type,ch,input,pos)){out+=input.slice(chunkStart,pos);break}if(92===ch){out+=input.slice(chunkStart,pos);const res=readEscapedChar(input,pos,lineStart,curLine,"template"===type,errors);null!==res.ch||firstInvalidLoc?out+=res.ch:firstInvalidLoc={pos,lineStart,curLine},({pos,lineStart,curLine}=res),chunkStart=pos}else 8232===ch||8233===ch?(++curLine,lineStart=++pos):10===ch||13===ch?"template"===type?(out+=input.slice(chunkStart,pos)+"\n",++pos,13===ch&&10===input.charCodeAt(pos)&&++pos,++curLine,chunkStart=lineStart=pos):errors.unterminated(initialPos,initialLineStart,initialCurLine):++pos}return{pos,str:out,firstInvalidLoc,lineStart,curLine,containsInvalid:!!firstInvalidLoc}};var _isDigit=function(code){return code>=48&&code<=57};const forbiddenNumericSeparatorSiblings={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},isAllowedNumericSeparatorSibling={bin:ch=>48===ch||49===ch,oct:ch=>ch>=48&&ch<=55,dec:ch=>ch>=48&&ch<=57,hex:ch=>ch>=48&&ch<=57||ch>=65&&ch<=70||ch>=97&&ch<=102};function isStringEnd(type,ch,input,pos){return"template"===type?96===ch||36===ch&&123===input.charCodeAt(pos+1):ch===("double"===type?34:39)}function readEscapedChar(input,pos,lineStart,curLine,inTemplate,errors){const throwOnInvalid=!inTemplate;pos++;const res=ch=>({pos,ch,lineStart,curLine}),ch=input.charCodeAt(pos++);switch(ch){case 110:return res("\n");case 114:return res("\r");case 120:{let code;return({code,pos}=readHexChar(input,pos,lineStart,curLine,2,!1,throwOnInvalid,errors)),res(null===code?null:String.fromCharCode(code))}case 117:{let code;return({code,pos}=readCodePoint(input,pos,lineStart,curLine,throwOnInvalid,errors)),res(null===code?null:String.fromCodePoint(code))}case 116:return res("\t");case 98:return res("\b");case 118:return res("\v");case 102:return res("\f");case 13:10===input.charCodeAt(pos)&&++pos;case 10:lineStart=pos,++curLine;case 8232:case 8233:return res("");case 56:case 57:if(inTemplate)return res(null);errors.strictNumericEscape(pos-1,lineStart,curLine);default:if(ch>=48&&ch<=55){const startPos=pos-1;let octalStr=/^[0-7]+/.exec(input.slice(startPos,pos+2))[0],octal=parseInt(octalStr,8);octal>255&&(octalStr=octalStr.slice(0,-1),octal=parseInt(octalStr,8)),pos+=octalStr.length-1;const next=input.charCodeAt(pos);if("0"!==octalStr||56===next||57===next){if(inTemplate)return res(null);errors.strictNumericEscape(startPos,lineStart,curLine)}return res(String.fromCharCode(octal))}return res(String.fromCharCode(ch))}}function readHexChar(input,pos,lineStart,curLine,len,forceLen,throwOnInvalid,errors){const initialPos=pos;let n;return({n,pos}=readInt(input,pos,lineStart,curLine,16,len,forceLen,!1,errors,!throwOnInvalid)),null===n&&(throwOnInvalid?errors.invalidEscapeSequence(initialPos,lineStart,curLine):pos=initialPos-1),{code:n,pos}}function readInt(input,pos,lineStart,curLine,radix,len,forceLen,allowNumSeparator,errors,bailOnError){const start=pos,forbiddenSiblings=16===radix?forbiddenNumericSeparatorSiblings.hex:forbiddenNumericSeparatorSiblings.decBinOct,isAllowedSibling=16===radix?isAllowedNumericSeparatorSibling.hex:10===radix?isAllowedNumericSeparatorSibling.dec:8===radix?isAllowedNumericSeparatorSibling.oct:isAllowedNumericSeparatorSibling.bin;let invalid=!1,total=0;for(let i=0,e=null==len?1/0:len;i=97?code-97+10:code>=65?code-65+10:_isDigit(code)?code-48:1/0,val>=radix){if(val<=9&&bailOnError)return{n:null,pos};if(val<=9&&errors.invalidDigit(pos,lineStart,curLine,radix))val=0;else{if(!forceLen)break;val=0,invalid=!0}}++pos,total=total*radix+val}return pos===start||null!=len&&pos-start!==len||invalid?{n:null,pos}:{n:total,pos}}function readCodePoint(input,pos,lineStart,curLine,throwOnInvalid,errors){let code;if(123===input.charCodeAt(pos)){if(++pos,({code,pos}=readHexChar(input,pos,lineStart,curLine,input.indexOf("}",pos)-pos,!0,throwOnInvalid,errors)),++pos,null!==code&&code>1114111){if(!throwOnInvalid)return{code:null,pos};errors.invalidCodePoint(pos,lineStart,curLine)}}else({code,pos}=readHexChar(input,pos,lineStart,curLine,4,!1,throwOnInvalid,errors));return{code,pos}}},"./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/identifier.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isIdentifierChar=isIdentifierChar,exports.isIdentifierName=function(name){let isFirst=!0;for(let i=0;icode)return!1;if(pos+=set[i+1],pos>=code)return!0}return!1}function isIdentifierStart(code){return code<65?36===code:code<=90||(code<97?95===code:code<=122||(code<=65535?code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code)):isInAstralSet(code,astralIdentifierStartCodes)))}function isIdentifierChar(code){return code<48?36===code:code<58||!(code<65)&&(code<=90||(code<97?95===code:code<=122||(code<=65535?code>=170&&nonASCIIidentifier.test(String.fromCharCode(code)):isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes))))}},"./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"isIdentifierChar",{enumerable:!0,get:function(){return _identifier.isIdentifierChar}}),Object.defineProperty(exports,"isIdentifierName",{enumerable:!0,get:function(){return _identifier.isIdentifierName}}),Object.defineProperty(exports,"isIdentifierStart",{enumerable:!0,get:function(){return _identifier.isIdentifierStart}}),Object.defineProperty(exports,"isKeyword",{enumerable:!0,get:function(){return _keyword.isKeyword}}),Object.defineProperty(exports,"isReservedWord",{enumerable:!0,get:function(){return _keyword.isReservedWord}}),Object.defineProperty(exports,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return _keyword.isStrictBindOnlyReservedWord}}),Object.defineProperty(exports,"isStrictBindReservedWord",{enumerable:!0,get:function(){return _keyword.isStrictBindReservedWord}}),Object.defineProperty(exports,"isStrictReservedWord",{enumerable:!0,get:function(){return _keyword.isStrictReservedWord}});var _identifier=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/identifier.js"),_keyword=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/keyword.js")},"./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/keyword.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isKeyword=function(word){return keywords.has(word)},exports.isReservedWord=isReservedWord,exports.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord,exports.isStrictBindReservedWord=function(word,inModule){return isStrictReservedWord(word,inModule)||isStrictBindOnlyReservedWord(word)},exports.isStrictReservedWord=isStrictReservedWord;const reservedWords_strict=["implements","interface","let","package","private","protected","public","static","yield"],reservedWords_strictBind=["eval","arguments"],keywords=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),reservedWordsStrictSet=new Set(reservedWords_strict),reservedWordsStrictBindSet=new Set(reservedWords_strictBind);function isReservedWord(word,inModule){return inModule&&"await"===word||"enum"===word}function isStrictReservedWord(word,inModule){return isReservedWord(word,inModule)||reservedWordsStrictSet.has(word)}function isStrictBindOnlyReservedWord(word){return reservedWordsStrictBindSet.has(word)}},"./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/find-suggestion.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findSuggestion=function(str,arr){const distances=arr.map(el=>function(a,b){let i,j,t=[],u=[];const m=a.length,n=b.length;if(!m)return n;if(!n)return m;for(j=0;j<=n;j++)t[j]=j;for(i=1;i<=m;i++){for(u=[i],j=1;j<=n;j++)u[j]=a[i-1]===b[j-1]?t[j-1]:min(t[j-1],t[j],u[j-1])+1;t=u}return u[n]}(el,str));return arr[distances.indexOf(min(...distances))]};const{min}=Math},"./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"OptionValidator",{enumerable:!0,get:function(){return _validator.OptionValidator}}),Object.defineProperty(exports,"findSuggestion",{enumerable:!0,get:function(){return _findSuggestion.findSuggestion}});var _validator=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/validator.js"),_findSuggestion=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/find-suggestion.js")},"./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/validator.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OptionValidator=void 0;var _findSuggestion=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/find-suggestion.js");exports.OptionValidator=class{constructor(descriptor){this.descriptor=descriptor}validateTopLevelOptions(options,TopLevelOptionShape){const validOptionNames=Object.keys(TopLevelOptionShape);for(const option of Object.keys(options))if(!validOptionNames.includes(option))throw new Error(this.formatMessage(`'${option}' is not a valid top-level option.\n- Did you mean '${(0,_findSuggestion.findSuggestion)(option,validOptionNames)}'?`))}validateBooleanOption(name,value,defaultValue){return void 0===value?defaultValue:(this.invariant("boolean"==typeof value,`'${name}' option must be a boolean.`),value)}validateStringOption(name,value,defaultValue){return void 0===value?defaultValue:(this.invariant("string"==typeof value,`'${name}' option must be a string.`),value)}invariant(condition,message){if(!condition)throw new Error(this.formatMessage(message))}formatMessage(message){return`${this.descriptor}: ${message}`}}},"./node_modules/.pnpm/@babel+helpers@7.27.6/node_modules/@babel/helpers/lib/helpers-generated.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _template=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/index.js");function helper(minVersion,source,metadata){return Object.freeze({minVersion,ast:()=>_template.default.program.ast(source,{preserveComments:!0}),metadata})}const helpers=exports.default={__proto__:null,OverloadYield:helper("7.18.14","function _OverloadYield(e,d){this.v=e,this.k=d}",{globals:[],locals:{_OverloadYield:["body.0.id"]},exportBindingAssignments:[],exportName:"_OverloadYield",dependencies:{},internal:!1}),applyDecoratedDescriptor:helper("7.0.0-beta.0",'function _applyDecoratedDescriptor(i,e,r,n,l){var a={};return Object.keys(n).forEach((function(i){a[i]=n[i]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().reverse().reduce((function(r,n){return n(i,e,r)||r}),a),l&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(l):void 0,a.initializer=void 0),void 0===a.initializer?(Object.defineProperty(i,e,a),null):a}',{globals:["Object"],locals:{_applyDecoratedDescriptor:["body.0.id"]},exportBindingAssignments:[],exportName:"_applyDecoratedDescriptor",dependencies:{},internal:!1}),applyDecs2311:helper("7.24.0",'function applyDecs2311(e,t,n,r,o,i){var a,c,u,s,f,l,p,d=Symbol.metadata||Symbol.for("Symbol.metadata"),m=Object.defineProperty,h=Object.create,y=[h(null),h(null)],v=t.length;function g(t,n,r){return function(o,i){n&&(i=o,o=e);for(var a=0;a=0;O-=n?2:1){var T=b(h[O],"A decorator","be",!0),z=n?h[O-1]:void 0,A={},H={kind:["field","accessor","method","getter","setter","class"][o],name:r,metadata:a,addInitializer:function(e,t){if(e.v)throw new TypeError("attempted to call addInitializer after decoration was finished");b(t,"An initializer","be",!0),i.push(t)}.bind(null,A)};if(w)c=T.call(z,N,H),A.v=1,b(c,"class decorators","return")&&(N=c);else if(H.static=s,H.private=f,c=H.access={has:f?p.bind():function(e){return r in e}},j||(c.get=f?E?function(e){return d(e),P.value}:I("get",0,d):function(e){return e[r]}),E||S||(c.set=f?I("set",0,d):function(e,t){e[r]=t}),N=T.call(z,D?{get:P.get,set:P.set}:P[F],H),A.v=1,D){if("object"==typeof N&&N)(c=b(N.get,"accessor.get"))&&(P.get=c),(c=b(N.set,"accessor.set"))&&(P.set=c),(c=b(N.init,"accessor.init"))&&k.unshift(c);else if(void 0!==N)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else b(N,(l?"field":"method")+" decorators","return")&&(l?k.unshift(N):P[F]=N)}return o<2&&u.push(g(k,s,1),g(i,s,0)),l||w||(f?D?u.splice(-1,0,I("get",s),I("set",s)):u.push(E?P[F]:b.call.bind(P[F])):m(e,r,P)),N}function w(e){return m(e,d,{configurable:!0,enumerable:!0,value:a})}return void 0!==i&&(a=i[d]),a=h(null==a?null:a),f=[],l=function(e){e&&f.push(g(e))},p=function(t,r){for(var i=0;ir.length)&&(a=r.length);for(var e=0,n=Array(a);e=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(r)},n:function(){var r=t.next();return a=r.done,r},e:function(r){u=!0,o=r},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}',{globals:["Symbol","Array","TypeError"],locals:{_createForOfIteratorHelper:["body.0.id"]},exportBindingAssignments:[],exportName:"_createForOfIteratorHelper",dependencies:{unsupportedIterableToArray:["body.0.body.body.1.consequent.body.0.test.left.right.right.callee"]},internal:!1}),createForOfIteratorHelperLoose:helper("7.9.0",'function _createForOfIteratorHelperLoose(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}',{globals:["Symbol","Array","TypeError"],locals:{_createForOfIteratorHelperLoose:["body.0.id"]},exportBindingAssignments:[],exportName:"_createForOfIteratorHelperLoose",dependencies:{unsupportedIterableToArray:["body.0.body.body.2.test.left.right.right.callee"]},internal:!1}),createSuper:helper("7.9.0","function _createSuper(t){var r=isNativeReflectConstruct();return function(){var e,o=getPrototypeOf(t);if(r){var s=getPrototypeOf(this).constructor;e=Reflect.construct(o,arguments,s)}else e=o.apply(this,arguments);return possibleConstructorReturn(this,e)}}",{globals:["Reflect"],locals:{_createSuper:["body.0.id"]},exportBindingAssignments:[],exportName:"_createSuper",dependencies:{getPrototypeOf:["body.0.body.body.1.argument.body.body.0.declarations.1.init.callee","body.0.body.body.1.argument.body.body.1.consequent.body.0.declarations.0.init.object.callee"],isNativeReflectConstruct:["body.0.body.body.0.declarations.0.init.callee"],possibleConstructorReturn:["body.0.body.body.1.argument.body.body.2.argument.callee"]},internal:!1}),decorate:helper("7.1.5",'function _decorate(e,r,t,i){var o=_getDecoratorsApi();if(i)for(var n=0;n=0;n--){var s=r[e.placement];s.splice(s.indexOf(e.key),1);var a=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,o[n])(a)||a);e=l.element,this.addElementPlacement(e,r),l.finisher&&i.push(l.finisher);var c=l.extras;if(c){for(var p=0;p=0;i--){var o=this.fromClassDescriptor(e),n=this.toClassDescriptor((0,r[i])(o)||o);if(void 0!==n.finisher&&t.push(n.finisher),void 0!==n.elements){e=n.elements;for(var s=0;s1){for(var t=Array(n),f=0;f3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&dn||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a \'"+o+"\' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(define(t={},n,(function(){return this})),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,define(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,define(u,"constructor",GeneratorFunctionPrototype),define(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",define(GeneratorFunctionPrototype,o,"GeneratorFunction"),define(u),define(u,o,"Generator"),define(u,n,(function(){return this})),define(u,"toString",(function(){return"[object Generator]"})),(_regenerator=function(){return{w:i,m:f}})()}',{globals:["Symbol","Object","TypeError"],locals:{_regenerator:["body.0.id","body.0.body.body.9.argument.expressions.9.callee.left"]},exportBindingAssignments:["body.0.body.body.9.argument.expressions.9.callee"],exportName:"_regenerator",dependencies:{regeneratorDefine:["body.0.body.body.1.body.body.1.argument.expressions.0.callee","body.0.body.body.7.declarations.0.init.alternate.expressions.0.callee","body.0.body.body.8.body.body.0.argument.expressions.0.alternate.expressions.1.callee","body.0.body.body.9.argument.expressions.1.callee","body.0.body.body.9.argument.expressions.2.callee","body.0.body.body.9.argument.expressions.4.callee","body.0.body.body.9.argument.expressions.5.callee","body.0.body.body.9.argument.expressions.6.callee","body.0.body.body.9.argument.expressions.7.callee","body.0.body.body.9.argument.expressions.8.callee"]},internal:!1}),regeneratorAsync:helper("7.27.0","function _regeneratorAsync(n,e,r,t,o){var a=asyncGen(n,e,r,t,o);return a.next().then((function(n){return n.done?n.value:a.next()}))}",{globals:[],locals:{_regeneratorAsync:["body.0.id"]},exportBindingAssignments:[],exportName:"_regeneratorAsync",dependencies:{regeneratorAsyncGen:["body.0.body.body.0.declarations.0.init.callee"]},internal:!1}),regeneratorAsyncGen:helper("7.27.0","function _regeneratorAsyncGen(r,e,t,o,n){return new regeneratorAsyncIterator(regenerator().w(r,e,t,o),n||Promise)}",{globals:["Promise"],locals:{_regeneratorAsyncGen:["body.0.id"]},exportBindingAssignments:[],exportName:"_regeneratorAsyncGen",dependencies:{regenerator:["body.0.body.body.0.argument.arguments.0.callee.object.callee"],regeneratorAsyncIterator:["body.0.body.body.0.argument.callee"]},internal:!1}),regeneratorAsyncIterator:helper("7.27.0",'function AsyncIterator(t,e){function n(r,o,i,f){try{var c=t[r](o),u=c.value;return u instanceof OverloadYield?e.resolve(u.v).then((function(t){n("next",t,i,f)}),(function(t){n("throw",t,i,f)})):e.resolve(u).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,f)}))}catch(t){f(t)}}var r;this.next||(define(AsyncIterator.prototype),define(AsyncIterator.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),define(this,"_invoke",(function(t,o,i){function f(){return new e((function(e,r){n(t,i,e,r)}))}return r=r?r.then(f,f):f()}),!0)}',{globals:["Symbol"],locals:{AsyncIterator:["body.0.id","body.0.body.body.2.expression.expressions.0.right.expressions.0.arguments.0.object","body.0.body.body.2.expression.expressions.0.right.expressions.1.arguments.0.object"]},exportBindingAssignments:[],exportName:"AsyncIterator",dependencies:{OverloadYield:["body.0.body.body.0.body.body.0.block.body.1.argument.test.right"],regeneratorDefine:["body.0.body.body.2.expression.expressions.0.right.expressions.0.callee","body.0.body.body.2.expression.expressions.0.right.expressions.1.callee","body.0.body.body.2.expression.expressions.1.callee"]},internal:!0}),regeneratorDefine:helper("7.27.0",'function regeneratorDefine(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}regeneratorDefine=function(e,r,n,t){if(r)i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n;else{function o(r,n){regeneratorDefine(e,r,(function(e){return this._invoke(r,n,e)}))}o("next",0),o("throw",1),o("return",2)}},regeneratorDefine(e,r,n,t)}',{globals:["Object"],locals:{regeneratorDefine:["body.0.id","body.0.body.body.2.expression.expressions.0.right.body.body.0.alternate.body.0.body.body.0.expression.callee","body.0.body.body.2.expression.expressions.1.callee","body.0.body.body.2.expression.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.2.expression.expressions.0"],exportName:"regeneratorDefine",dependencies:{},internal:!0}),regeneratorKeys:helper("7.27.0","function _regeneratorKeys(e){var n=Object(e),r=[];for(var t in n)r.unshift(t);return function e(){for(;r.length;)if((t=r.pop())in n)return e.value=t,e.done=!1,e;return e.done=!0,e}}",{globals:["Object"],locals:{_regeneratorKeys:["body.0.id"]},exportBindingAssignments:[],exportName:"_regeneratorKeys",dependencies:{},internal:!1}),regeneratorValues:helper("7.18.0",'function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}',{globals:["Symbol","isNaN","TypeError"],locals:{_regeneratorValues:["body.0.id"]},exportBindingAssignments:[],exportName:"_regeneratorValues",dependencies:{},internal:!1}),set:helper("7.0.0-beta.0",'function set(e,r,t,o){return set="undefined"!=typeof Reflect&&Reflect.set?Reflect.set:function(e,r,t,o){var f,i=superPropBase(e,r);if(i){if((f=Object.getOwnPropertyDescriptor(i,r)).set)return f.set.call(o,t),!0;if(!f.writable)return!1}if(f=Object.getOwnPropertyDescriptor(o,r)){if(!f.writable)return!1;f.value=t,Object.defineProperty(o,r,f)}else defineProperty(o,r,t);return!0},set(e,r,t,o)}function _set(e,r,t,o,f){if(!set(e,r,t,o||e)&&f)throw new TypeError("failed to set property");return t}',{globals:["Reflect","Object","TypeError"],locals:{set:["body.0.id","body.0.body.body.0.argument.expressions.1.callee","body.1.body.body.0.test.left.argument.callee","body.0.body.body.0.argument.expressions.0.left"],_set:["body.1.id"]},exportBindingAssignments:[],exportName:"_set",dependencies:{superPropBase:["body.0.body.body.0.argument.expressions.0.right.alternate.body.body.0.declarations.1.init.callee"],defineProperty:["body.0.body.body.0.argument.expressions.0.right.alternate.body.body.2.alternate.expression.callee"]},internal:!1}),setFunctionName:helper("7.23.6",'function setFunctionName(e,t,n){"symbol"==typeof t&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch(e){}return e}',{globals:["Object"],locals:{setFunctionName:["body.0.id"]},exportBindingAssignments:[],exportName:"setFunctionName",dependencies:{},internal:!1}),setPrototypeOf:helper("7.0.0-beta.0","function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}",{globals:["Object"],locals:{_setPrototypeOf:["body.0.id","body.0.body.body.0.argument.expressions.1.callee","body.0.body.body.0.argument.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.0.argument.expressions.0"],exportName:"_setPrototypeOf",dependencies:{},internal:!1}),skipFirstGeneratorNext:helper("7.0.0-beta.0","function _skipFirstGeneratorNext(t){return function(){var r=t.apply(this,arguments);return r.next(),r}}",{globals:[],locals:{_skipFirstGeneratorNext:["body.0.id"]},exportBindingAssignments:[],exportName:"_skipFirstGeneratorNext",dependencies:{},internal:!1}),slicedToArray:helper("7.0.0-beta.0","function _slicedToArray(r,e){return arrayWithHoles(r)||iterableToArrayLimit(r,e)||unsupportedIterableToArray(r,e)||nonIterableRest()}",{globals:[],locals:{_slicedToArray:["body.0.id"]},exportBindingAssignments:[],exportName:"_slicedToArray",dependencies:{arrayWithHoles:["body.0.body.body.0.argument.left.left.left.callee"],iterableToArrayLimit:["body.0.body.body.0.argument.left.left.right.callee"],unsupportedIterableToArray:["body.0.body.body.0.argument.left.right.callee"],nonIterableRest:["body.0.body.body.0.argument.right.callee"]},internal:!1}),superPropBase:helper("7.0.0-beta.0","function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=getPrototypeOf(t)););return t}",{globals:[],locals:{_superPropBase:["body.0.id"]},exportBindingAssignments:[],exportName:"_superPropBase",dependencies:{getPrototypeOf:["body.0.body.body.0.test.right.right.right.callee"]},internal:!1}),superPropGet:helper("7.25.0",'function _superPropGet(t,o,e,r){var p=get(getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t)}:p}',{globals:[],locals:{_superPropGet:["body.0.id"]},exportBindingAssignments:[],exportName:"_superPropGet",dependencies:{get:["body.0.body.body.0.declarations.0.init.callee"],getPrototypeOf:["body.0.body.body.0.declarations.0.init.arguments.0.callee"]},internal:!1}),superPropSet:helper("7.25.0","function _superPropSet(t,e,o,r,p,f){return set(getPrototypeOf(f?t.prototype:t),e,o,r,p)}",{globals:[],locals:{_superPropSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_superPropSet",dependencies:{set:["body.0.body.body.0.argument.callee"],getPrototypeOf:["body.0.body.body.0.argument.arguments.0.callee"]},internal:!1}),taggedTemplateLiteral:helper("7.0.0-beta.0","function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}",{globals:["Object"],locals:{_taggedTemplateLiteral:["body.0.id"]},exportBindingAssignments:[],exportName:"_taggedTemplateLiteral",dependencies:{},internal:!1}),taggedTemplateLiteralLoose:helper("7.0.0-beta.0","function _taggedTemplateLiteralLoose(e,t){return t||(t=e.slice(0)),e.raw=t,e}",{globals:[],locals:{_taggedTemplateLiteralLoose:["body.0.id"]},exportBindingAssignments:[],exportName:"_taggedTemplateLiteralLoose",dependencies:{},internal:!1}),tdz:helper("7.5.5",'function _tdzError(e){throw new ReferenceError(e+" is not defined - temporal dead zone")}',{globals:["ReferenceError"],locals:{_tdzError:["body.0.id"]},exportBindingAssignments:[],exportName:"_tdzError",dependencies:{},internal:!1}),temporalRef:helper("7.0.0-beta.0","function _temporalRef(r,e){return r===undef?err(e):r}",{globals:[],locals:{_temporalRef:["body.0.id"]},exportBindingAssignments:[],exportName:"_temporalRef",dependencies:{temporalUndefined:["body.0.body.body.0.argument.test.right"],tdz:["body.0.body.body.0.argument.consequent.callee"]},internal:!1}),temporalUndefined:helper("7.0.0-beta.0","function _temporalUndefined(){}",{globals:[],locals:{_temporalUndefined:["body.0.id"]},exportBindingAssignments:[],exportName:"_temporalUndefined",dependencies:{},internal:!1}),toArray:helper("7.0.0-beta.0","function _toArray(r){return arrayWithHoles(r)||iterableToArray(r)||unsupportedIterableToArray(r)||nonIterableRest()}",{globals:[],locals:{_toArray:["body.0.id"]},exportBindingAssignments:[],exportName:"_toArray",dependencies:{arrayWithHoles:["body.0.body.body.0.argument.left.left.left.callee"],iterableToArray:["body.0.body.body.0.argument.left.left.right.callee"],unsupportedIterableToArray:["body.0.body.body.0.argument.left.right.callee"],nonIterableRest:["body.0.body.body.0.argument.right.callee"]},internal:!1}),toConsumableArray:helper("7.0.0-beta.0","function _toConsumableArray(r){return arrayWithoutHoles(r)||iterableToArray(r)||unsupportedIterableToArray(r)||nonIterableSpread()}",{globals:[],locals:{_toConsumableArray:["body.0.id"]},exportBindingAssignments:[],exportName:"_toConsumableArray",dependencies:{arrayWithoutHoles:["body.0.body.body.0.argument.left.left.left.callee"],iterableToArray:["body.0.body.body.0.argument.left.left.right.callee"],unsupportedIterableToArray:["body.0.body.body.0.argument.left.right.callee"],nonIterableSpread:["body.0.body.body.0.argument.right.callee"]},internal:!1}),toPrimitive:helper("7.1.5",'function toPrimitive(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}',{globals:["Symbol","TypeError","String","Number"],locals:{toPrimitive:["body.0.id"]},exportBindingAssignments:[],exportName:"toPrimitive",dependencies:{},internal:!1}),toPropertyKey:helper("7.1.5",'function toPropertyKey(t){var i=toPrimitive(t,"string");return"symbol"==typeof i?i:i+""}',{globals:[],locals:{toPropertyKey:["body.0.id"]},exportBindingAssignments:[],exportName:"toPropertyKey",dependencies:{toPrimitive:["body.0.body.body.0.declarations.0.init.callee"]},internal:!1}),toSetter:helper("7.24.0",'function _toSetter(t,e,n){e||(e=[]);var r=e.length++;return Object.defineProperty({},"_",{set:function(o){e[r]=o,t.apply(n,e)}})}',{globals:["Object"],locals:{_toSetter:["body.0.id"]},exportBindingAssignments:[],exportName:"_toSetter",dependencies:{},internal:!1}),tsRewriteRelativeImportExtensions:helper("7.27.0",'function tsRewriteRelativeImportExtensions(t,e){return"string"==typeof t&&/^\\.\\.?\\//.test(t)?t.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+)?)\\.([cm]?)ts$/i,(function(t,s,r,n,o){return s?e?".jsx":".js":!r||n&&o?r+n+"."+o.toLowerCase()+"js":t})):t}',{globals:[],locals:{tsRewriteRelativeImportExtensions:["body.0.id"]},exportBindingAssignments:[],exportName:"tsRewriteRelativeImportExtensions",dependencies:{},internal:!1}),typeof:helper("7.0.0-beta.0",'function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}',{globals:["Symbol"],locals:{_typeof:["body.0.id","body.0.body.body.0.argument.expressions.1.callee","body.0.body.body.0.argument.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.0.argument.expressions.0"],exportName:"_typeof",dependencies:{},internal:!1}),unsupportedIterableToArray:helper("7.9.0",'function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?arrayLikeToArray(r,a):void 0}}',{globals:["Array"],locals:{_unsupportedIterableToArray:["body.0.id"]},exportBindingAssignments:[],exportName:"_unsupportedIterableToArray",dependencies:{arrayLikeToArray:["body.0.body.body.0.consequent.body.0.consequent.argument.callee","body.0.body.body.0.consequent.body.2.argument.expressions.1.alternate.consequent.callee"]},internal:!1}),usingCtx:helper("7.23.9",'function _usingCtx(){var r="function"==typeof SuppressedError?SuppressedError:function(r,e){var n=Error();return n.name="SuppressedError",n.error=r,n.suppressed=e,n},e={},n=[];function using(r,e){if(null!=e){if(Object(e)!==e)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(r)var o=e[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(void 0===o&&(o=e[Symbol.dispose||Symbol.for("Symbol.dispose")],r))var t=o;if("function"!=typeof o)throw new TypeError("Object is not disposable.");t&&(o=function(){try{t.call(e)}catch(r){return Promise.reject(r)}}),n.push({v:e,d:o,a:r})}else r&&n.push({d:e,a:r});return e}return{e:e,u:using.bind(null,!1),a:using.bind(null,!0),d:function(){var o,t=this.e,s=0;function next(){for(;o=n.pop();)try{if(!o.a&&1===s)return s=0,n.push(o),Promise.resolve().then(next);if(o.d){var r=o.d.call(o.v);if(o.a)return s|=2,Promise.resolve(r).then(next,err)}else s|=1}catch(r){return err(r)}if(1===s)return t!==e?Promise.reject(t):Promise.resolve();if(t!==e)throw t}function err(n){return t=t!==e?new r(n,t):n,next()}return next()}}}',{globals:["SuppressedError","Error","Object","TypeError","Symbol","Promise"],locals:{_usingCtx:["body.0.id"]},exportBindingAssignments:[],exportName:"_usingCtx",dependencies:{},internal:!1}),wrapAsyncGenerator:helper("7.0.0-beta.0",'function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments))}}function AsyncGenerator(e){var r,t;function resume(r,t){try{var n=e[r](t),o=n.value,u=o instanceof OverloadYield;Promise.resolve(u?o.v:o).then((function(t){if(u){var i="return"===r?"return":"next";if(!o.k||t.done)return resume(i,t);t=e[i](t).value}settle(n.done?"return":"normal",t)}),(function(e){resume("throw",e)}))}catch(e){settle("throw",e)}}function settle(e,n){switch(e){case"return":r.resolve({value:n,done:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1})}(r=r.next)?resume(r.key,r.arg):t=null}this._invoke=function(e,n){return new Promise((function(o,u){var i={key:e,arg:n,resolve:o,reject:u,next:null};t?t=t.next=i:(r=t=i,resume(e,n))}))},"function"!=typeof e.return&&(this.return=void 0)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)};',{globals:["Promise","Symbol"],locals:{_wrapAsyncGenerator:["body.0.id"],AsyncGenerator:["body.1.id","body.0.body.body.0.argument.body.body.0.argument.callee","body.2.expression.expressions.0.left.object.object","body.2.expression.expressions.1.left.object.object","body.2.expression.expressions.2.left.object.object","body.2.expression.expressions.3.left.object.object"]},exportBindingAssignments:[],exportName:"_wrapAsyncGenerator",dependencies:{OverloadYield:["body.1.body.body.1.body.body.0.block.body.0.declarations.2.init.right"]},internal:!1}),wrapNativeSuper:helper("7.0.0-beta.0",'function _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(t){if(null===t||!isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return construct(t,arguments,getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),setPrototypeOf(Wrapper,t)},_wrapNativeSuper(t)}',{globals:["Map","TypeError","Object"],locals:{_wrapNativeSuper:["body.0.id","body.0.body.body.1.argument.expressions.1.callee","body.0.body.body.1.argument.expressions.0.left"]},exportBindingAssignments:["body.0.body.body.1.argument.expressions.0"],exportName:"_wrapNativeSuper",dependencies:{getPrototypeOf:["body.0.body.body.1.argument.expressions.0.right.body.body.3.body.body.0.argument.arguments.2.object.callee"],setPrototypeOf:["body.0.body.body.1.argument.expressions.0.right.body.body.4.argument.expressions.1.callee"],isNativeFunction:["body.0.body.body.1.argument.expressions.0.right.body.body.0.test.right.argument.callee"],construct:["body.0.body.body.1.argument.expressions.0.right.body.body.3.body.body.0.argument.callee"]},internal:!1}),wrapRegExp:helper("7.19.0",'function _wrapRegExp(){_wrapRegExp=function(e,r){return new BabelRegExp(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function BabelRegExp(e,t,p){var o=RegExp(e,t);return r.set(o,p||r.get(e)),setPrototypeOf(o,BabelRegExp.prototype)}function buildGroups(e,t){var p=r.get(t);return Object.keys(p).reduce((function(r,t){var o=p[t];if("number"==typeof o)r[t]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1]+)(>|$)/g,(function(e,r,t){if(""===t)return e;var p=o[r];return Array.isArray(p)?"$"+p.join("$"):"number"==typeof p?"$"+p:""})))}if("function"==typeof p){var i=this;return e[Symbol.replace].call(this,t,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(buildGroups(e,i)),p.apply(this,e)}))}return e[Symbol.replace].call(this,t,p)},_wrapRegExp.apply(this,arguments)}',{globals:["RegExp","WeakMap","Object","Symbol","Array"],locals:{_wrapRegExp:["body.0.id","body.0.body.body.4.argument.expressions.3.callee.object","body.0.body.body.0.expression.left"]},exportBindingAssignments:["body.0.body.body.0.expression"],exportName:"_wrapRegExp",dependencies:{setPrototypeOf:["body.0.body.body.2.body.body.1.argument.expressions.1.callee"],inherits:["body.0.body.body.4.argument.expressions.0.callee"]},internal:!1}),writeOnlyError:helper("7.12.13","function _writeOnlyError(r){throw new TypeError('\"'+r+'\" is write-only')}",{globals:["TypeError"],locals:{_writeOnlyError:["body.0.id"]},exportBindingAssignments:[],exportName:"_writeOnlyError",dependencies:{},internal:!1})};Object.assign(helpers,{AwaitValue:helper("7.0.0-beta.0","function _AwaitValue(t){this.wrapped=t}",{globals:[],locals:{_AwaitValue:["body.0.id"]},exportBindingAssignments:[],exportName:"_AwaitValue",dependencies:{},internal:!1}),applyDecs:helper("7.17.8",'function old_createMetadataMethodsForProperty(e,t,a,r){return{getMetadata:function(o){old_assertNotFinished(r,"getMetadata"),old_assertMetadataKey(o);var i=e[o];if(void 0!==i)if(1===t){var n=i.public;if(void 0!==n)return n[a]}else if(2===t){var l=i.private;if(void 0!==l)return l.get(a)}else if(Object.hasOwnProperty.call(i,"constructor"))return i.constructor},setMetadata:function(o,i){old_assertNotFinished(r,"setMetadata"),old_assertMetadataKey(o);var n=e[o];if(void 0===n&&(n=e[o]={}),1===t){var l=n.public;void 0===l&&(l=n.public={}),l[a]=i}else if(2===t){var s=n.priv;void 0===s&&(s=n.private=new Map),s.set(a,i)}else n.constructor=i}}}function old_convertMetadataMapToFinal(e,t){var a=e[Symbol.metadata||Symbol.for("Symbol.metadata")],r=Object.getOwnPropertySymbols(t);if(0!==r.length){for(var o=0;o=0;m--){var b;void 0!==(p=old_memberDec(h[m],r,c,l,s,o,i,n,f))&&(old_assertValidReturnValue(o,p),0===o?b=p:1===o?(b=old_getInit(p),v=p.get||f.get,y=p.set||f.set,f={get:v,set:y}):f=p,void 0!==b&&(void 0===d?d=b:"function"==typeof d?d=[d,b]:d.push(b)))}if(0===o||1===o){if(void 0===d)d=function(e,t){return t};else if("function"!=typeof d){var g=d;d=function(e,t){for(var a=t,r=0;r3,m=v>=5;if(m?(u=t,f=r,0!=(v-=5)&&(p=n=n||[])):(u=t.prototype,f=a,0!==v&&(p=i=i||[])),0!==v&&!h){var b=m?s:l,g=b.get(y)||0;if(!0===g||3===g&&4!==v||4===g&&3!==v)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+y);!g&&v>2?b.set(y,v):b.set(y,!0)}old_applyMemberDec(e,u,d,y,v,m,h,f,p)}}old_pushInitializers(e,i),old_pushInitializers(e,n)}function old_pushInitializers(e,t){t&&e.push((function(e){for(var a=0;a0){for(var o=[],i=t,n=t.name,l=r.length-1;l>=0;l--){var s={v:!1};try{var c=Object.assign({kind:"class",name:n,addInitializer:old_createAddInitializerMethod(o,s)},old_createMetadataMethodsForProperty(a,0,n,s)),d=r[l](i,c)}finally{s.v=!0}void 0!==d&&(old_assertValidReturnValue(10,d),i=d)}e.push(i,(function(){for(var e=0;e=0;v--){var g;void 0!==(f=memberDec(h[v],a,c,o,n,i,s,u))&&(assertValidReturnValue(n,f),0===n?g=f:1===n?(g=f.init,p=f.get||u.get,d=f.set||u.set,u={get:p,set:d}):u=f,void 0!==g&&(void 0===l?l=g:"function"==typeof l?l=[l,g]:l.push(g)))}if(0===n||1===n){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var y=l;l=function(e,t){for(var r=t,a=0;a3,h=f>=5;if(h?(l=t,0!=(f-=5)&&(u=n=n||[])):(l=t.prototype,0!==f&&(u=a=a||[])),0!==f&&!d){var v=h?s:i,g=v.get(p)||0;if(!0===g||3===g&&4!==f||4===g&&3!==f)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+p);!g&&f>2?v.set(p,f):v.set(p,!0)}applyMemberDec(e,l,c,p,f,h,d,u)}}pushInitializers(e,a),pushInitializers(e,n)}(a,e,t),function(e,t,r){if(r.length>0){for(var a=[],n=t,i=t.name,s=r.length-1;s>=0;s--){var o={v:!1};try{var c=r[s](n,{kind:"class",name:i,addInitializer:createAddInitializerMethod(a,o)})}finally{o.v=!0}void 0!==c&&(assertValidReturnValue(10,c),n=c)}e.push(n,(function(){for(var e=0;e=0;g--){var y;void 0!==(p=memberDec(v[g],n,c,s,a,i,o,f))&&(assertValidReturnValue(a,p),0===a?y=p:1===a?(y=p.init,d=p.get||f.get,h=p.set||f.set,f={get:d,set:h}):f=p,void 0!==y&&(void 0===l?l=y:"function"==typeof l?l=[l,y]:l.push(y)))}if(0===a||1===a){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var m=l;l=function(e,t){for(var r=t,n=0;n3,h=f>=5;if(h?(l=e,0!=(f-=5)&&(u=n=n||[])):(l=e.prototype,0!==f&&(u=r=r||[])),0!==f&&!d){var v=h?o:i,g=v.get(p)||0;if(!0===g||3===g&&4!==f||4===g&&3!==f)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+p);!g&&f>2?v.set(p,f):v.set(p,!0)}applyMemberDec(a,l,c,p,f,h,d,u)}}return pushInitializers(a,r),pushInitializers(a,n),a}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r0){for(var r=[],n=e,a=e.name,i=t.length-1;i>=0;i--){var o={v:!1};try{var s=t[i](n,{kind:"class",name:a,addInitializer:createAddInitializerMethod(r,o)})}finally{o.v=!0}void 0!==s&&(assertValidReturnValue(10,s),n=s)}return[n,function(){for(var e=0;e=0;m--){var b;void 0!==(h=memberDec(g[m],n,u,o,a,i,s,p,c))&&(assertValidReturnValue(a,h),0===a?b=h:1===a?(b=h.init,v=h.get||p.get,y=h.set||p.set,p={get:v,set:y}):p=h,void 0!==b&&(void 0===l?l=b:"function"==typeof l?l=[l,b]:l.push(b)))}if(0===a||1===a){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var I=l;l=function(e,t){for(var r=t,n=0;n3,y=d>=5,g=r;if(y?(f=e,0!=(d-=5)&&(p=a=a||[]),v&&!i&&(i=function(t){return checkInRHS(t)===e}),g=i):(f=e.prototype,0!==d&&(p=n=n||[])),0!==d&&!v){var m=y?c:o,b=m.get(h)||0;if(!0===b||3===b&&4!==d||4===b&&3!==d)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);!b&&d>2?m.set(h,d):m.set(h,!0)}applyMemberDec(s,f,l,h,d,y,v,p,g)}}return pushInitializers(s,n),pushInitializers(s,a),s}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r0){for(var r=[],n=e,a=e.name,i=t.length-1;i>=0;i--){var s={v:!1};try{var o=t[i](n,{kind:"class",name:a,addInitializer:createAddInitializerMethod(r,s)})}finally{s.v=!0}void 0!==o&&(assertValidReturnValue(10,o),n=o)}return[n,function(){for(var e=0;e=0;j-=r?2:1){var D=v[j],E=r?v[j-1]:void 0,I={},O={kind:["field","accessor","method","getter","setter","class"][o],name:n,metadata:a,addInitializer:function(e,t){if(e.v)throw Error("attempted to call addInitializer after decoration was finished");s(t,"An initializer","be",!0),c.push(t)}.bind(null,I)};try{if(b)(y=s(D.call(E,P,O),"class decorators","return"))&&(P=y);else{var k,F;O.static=l,O.private=f,f?2===o?k=function(e){return m(e),w.value}:(o<4&&(k=i(w,"get",m)),3!==o&&(F=i(w,"set",m))):(k=function(e){return e[n]},(o<2||4===o)&&(F=function(e,t){e[n]=t}));var N=O.access={has:f?h.bind():function(e){return n in e}};if(k&&(N.get=k),F&&(N.set=F),P=D.call(E,d?{get:w.get,set:w.set}:w[A],O),d){if("object"==typeof P&&P)(y=s(P.get,"accessor.get"))&&(w.get=y),(y=s(P.set,"accessor.set"))&&(w.set=y),(y=s(P.init,"accessor.init"))&&S.push(y);else if(void 0!==P)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0")}else s(P,(p?"field":"method")+" decorators","return")&&(p?S.push(P):w[A]=P)}}finally{I.v=!0}}return(p||d)&&u.push((function(e,t){for(var r=S.length-1;r>=0;r--)t=S[r].call(e,t);return t})),p||b||(f?d?u.push(i(w,"get"),i(w,"set")):u.push(2===o?w[A]:i.call.bind(w[A])):Object.defineProperty(e,n,w)),P}function u(e,t){return Object.defineProperty(e,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:t})}if(arguments.length>=6)var l=a[Symbol.metadata||Symbol.for("Symbol.metadata")];var f=Object.create(null==l?null:l),p=function(e,t,r,n){var o,a,i=[],s=function(t){return checkInRHS(t)===e},u=new Map;function l(e){e&&i.push(c.bind(null,e))}for(var f=0;f3,y=16&d,v=!!(8&d),g=0==(d&=7),b=h+"/"+v;if(!g&&!m){var w=u.get(b);if(!0===w||3===w&&4!==d||4===w&&3!==d)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);u.set(b,!(d>2)||d)}applyDec(v?e:e.prototype,p,y,m?"#"+h:toPropertyKey(h),d,n,v?a=a||[]:o=o||[],i,v,m,g,1===d,v&&m?s:r)}}return l(o),l(a),i}(e,t,o,f);return r.length||u(e,f),{e:p,get c(){var t=[];return r.length&&[u(applyDec(e,[r],n,e.name,5,f,t),f),c.bind(null,t,e)]}}}',{globals:["TypeError","Array","Object","Error","Symbol","Map"],locals:{applyDecs2305:["body.0.id"]},exportBindingAssignments:[],exportName:"applyDecs2305",dependencies:{checkInRHS:["body.0.body.body.6.declarations.1.init.callee.body.body.0.declarations.3.init.body.body.0.argument.left.callee"],setFunctionName:["body.0.body.body.3.body.body.2.consequent.body.2.expression.consequent.expressions.0.consequent.right.properties.0.value.callee","body.0.body.body.3.body.body.2.consequent.body.2.expression.consequent.expressions.1.right.callee"],toPropertyKey:["body.0.body.body.6.declarations.1.init.callee.body.body.2.body.body.1.consequent.body.2.expression.arguments.3.alternate.callee"]},internal:!1}),classApplyDescriptorDestructureSet:helper("7.13.10",'function _classApplyDescriptorDestructureSet(e,t){if(t.set)return"__destrObj"in t||(t.__destrObj={set value(r){t.set.call(e,r)}}),t.__destrObj;if(!t.writable)throw new TypeError("attempted to set read only private field");return t}',{globals:["TypeError"],locals:{_classApplyDescriptorDestructureSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classApplyDescriptorDestructureSet",dependencies:{},internal:!1}),classApplyDescriptorGet:helper("7.13.10","function _classApplyDescriptorGet(e,t){return t.get?t.get.call(e):t.value}",{globals:[],locals:{_classApplyDescriptorGet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classApplyDescriptorGet",dependencies:{},internal:!1}),classApplyDescriptorSet:helper("7.13.10",'function _classApplyDescriptorSet(e,t,l){if(t.set)t.set.call(e,l);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=l}}',{globals:["TypeError"],locals:{_classApplyDescriptorSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classApplyDescriptorSet",dependencies:{},internal:!1}),classCheckPrivateStaticAccess:helper("7.13.10","function _classCheckPrivateStaticAccess(s,a,r){return assertClassBrand(a,s,r)}",{globals:[],locals:{_classCheckPrivateStaticAccess:["body.0.id"]},exportBindingAssignments:[],exportName:"_classCheckPrivateStaticAccess",dependencies:{assertClassBrand:["body.0.body.body.0.argument.callee"]},internal:!1}),classCheckPrivateStaticFieldDescriptor:helper("7.13.10",'function _classCheckPrivateStaticFieldDescriptor(t,e){if(void 0===t)throw new TypeError("attempted to "+e+" private static field before its declaration")}',{globals:["TypeError"],locals:{_classCheckPrivateStaticFieldDescriptor:["body.0.id"]},exportBindingAssignments:[],exportName:"_classCheckPrivateStaticFieldDescriptor",dependencies:{},internal:!1}),classExtractFieldDescriptor:helper("7.13.10","function _classExtractFieldDescriptor(e,t){return classPrivateFieldGet2(t,e)}",{globals:[],locals:{_classExtractFieldDescriptor:["body.0.id"]},exportBindingAssignments:[],exportName:"_classExtractFieldDescriptor",dependencies:{classPrivateFieldGet2:["body.0.body.body.0.argument.callee"]},internal:!1}),classPrivateFieldDestructureSet:helper("7.4.4","function _classPrivateFieldDestructureSet(e,t){var r=classPrivateFieldGet2(t,e);return classApplyDescriptorDestructureSet(e,r)}",{globals:[],locals:{_classPrivateFieldDestructureSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldDestructureSet",dependencies:{classApplyDescriptorDestructureSet:["body.0.body.body.1.argument.callee"],classPrivateFieldGet2:["body.0.body.body.0.declarations.0.init.callee"]},internal:!1}),classPrivateFieldGet:helper("7.0.0-beta.0","function _classPrivateFieldGet(e,t){var r=classPrivateFieldGet2(t,e);return classApplyDescriptorGet(e,r)}",{globals:[],locals:{_classPrivateFieldGet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldGet",dependencies:{classApplyDescriptorGet:["body.0.body.body.1.argument.callee"],classPrivateFieldGet2:["body.0.body.body.0.declarations.0.init.callee"]},internal:!1}),classPrivateFieldSet:helper("7.0.0-beta.0","function _classPrivateFieldSet(e,t,r){var s=classPrivateFieldGet2(t,e);return classApplyDescriptorSet(e,s,r),r}",{globals:[],locals:{_classPrivateFieldSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateFieldSet",dependencies:{classApplyDescriptorSet:["body.0.body.body.1.argument.expressions.0.callee"],classPrivateFieldGet2:["body.0.body.body.0.declarations.0.init.callee"]},internal:!1}),classPrivateMethodGet:helper("7.1.6","function _classPrivateMethodGet(s,a,r){return assertClassBrand(a,s),r}",{globals:[],locals:{_classPrivateMethodGet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateMethodGet",dependencies:{assertClassBrand:["body.0.body.body.0.argument.expressions.0.callee"]},internal:!1}),classPrivateMethodSet:helper("7.1.6",'function _classPrivateMethodSet(){throw new TypeError("attempted to reassign private method")}',{globals:["TypeError"],locals:{_classPrivateMethodSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classPrivateMethodSet",dependencies:{},internal:!1}),classStaticPrivateFieldDestructureSet:helper("7.13.10",'function _classStaticPrivateFieldDestructureSet(t,r,s){return assertClassBrand(r,t),classCheckPrivateStaticFieldDescriptor(s,"set"),classApplyDescriptorDestructureSet(t,s)}',{globals:[],locals:{_classStaticPrivateFieldDestructureSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classStaticPrivateFieldDestructureSet",dependencies:{classApplyDescriptorDestructureSet:["body.0.body.body.0.argument.expressions.2.callee"],assertClassBrand:["body.0.body.body.0.argument.expressions.0.callee"],classCheckPrivateStaticFieldDescriptor:["body.0.body.body.0.argument.expressions.1.callee"]},internal:!1}),classStaticPrivateFieldSpecGet:helper("7.0.2",'function _classStaticPrivateFieldSpecGet(t,s,r){return assertClassBrand(s,t),classCheckPrivateStaticFieldDescriptor(r,"get"),classApplyDescriptorGet(t,r)}',{globals:[],locals:{_classStaticPrivateFieldSpecGet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classStaticPrivateFieldSpecGet",dependencies:{classApplyDescriptorGet:["body.0.body.body.0.argument.expressions.2.callee"],assertClassBrand:["body.0.body.body.0.argument.expressions.0.callee"],classCheckPrivateStaticFieldDescriptor:["body.0.body.body.0.argument.expressions.1.callee"]},internal:!1}),classStaticPrivateFieldSpecSet:helper("7.0.2",'function _classStaticPrivateFieldSpecSet(s,t,r,e){return assertClassBrand(t,s),classCheckPrivateStaticFieldDescriptor(r,"set"),classApplyDescriptorSet(s,r,e),e}',{globals:[],locals:{_classStaticPrivateFieldSpecSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classStaticPrivateFieldSpecSet",dependencies:{classApplyDescriptorSet:["body.0.body.body.0.argument.expressions.2.callee"],assertClassBrand:["body.0.body.body.0.argument.expressions.0.callee"],classCheckPrivateStaticFieldDescriptor:["body.0.body.body.0.argument.expressions.1.callee"]},internal:!1}),classStaticPrivateMethodSet:helper("7.3.2",'function _classStaticPrivateMethodSet(){throw new TypeError("attempted to set read only static private field")}',{globals:["TypeError"],locals:{_classStaticPrivateMethodSet:["body.0.id"]},exportBindingAssignments:[],exportName:"_classStaticPrivateMethodSet",dependencies:{},internal:!1}),defineEnumerableProperties:helper("7.0.0-beta.0",'function _defineEnumerableProperties(e,r){for(var t in r){var n=r[t];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,t,n)}if(Object.getOwnPropertySymbols)for(var a=Object.getOwnPropertySymbols(r),b=0;b0;)try{var o=r.pop(),p=o.d.call(o.v);if(o.a)return Promise.resolve(p).then(next,err)}catch(r){return err(r)}if(s)throw e}function err(r){return e=s?new dispose_SuppressedError(e,r):r,s=!0,next()}return next()}',{globals:["SuppressedError","Error","Object","Promise"],locals:{dispose_SuppressedError:["body.0.id","body.0.body.body.0.argument.expressions.0.alternate.expressions.1.left.object","body.0.body.body.0.argument.expressions.0.alternate.expressions.1.right.arguments.1.properties.0.value.properties.0.value","body.0.body.body.0.argument.expressions.1.callee","body.1.body.body.1.body.body.0.argument.expressions.0.right.consequent.callee","body.0.body.body.0.argument.expressions.0.consequent.left","body.0.body.body.0.argument.expressions.0.alternate.expressions.0.left"],_dispose:["body.1.id"]},exportBindingAssignments:[],exportName:"_dispose",dependencies:{},internal:!1}),objectSpread:helper("7.0.0-beta.0",'function _objectSpread(e){for(var r=1;r{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,exports.get=get,exports.getDependencies=function(name){return loadHelper(name).getDependencies()},exports.isInternal=function(name){var _helpers$name;return null==(_helpers$name=_helpersGenerated.default[name])?void 0:_helpers$name.metadata.internal},exports.list=void 0,exports.minVersion=function(name){return loadHelper(name).minVersion};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_helpersGenerated=__webpack_require__("./node_modules/.pnpm/@babel+helpers@7.27.6/node_modules/@babel/helpers/lib/helpers-generated.js");const{cloneNode,identifier}=_t;function deep(obj,path,value){try{const parts=path.split(".");let last=parts.shift();for(;parts.length>0;)obj=obj[last],last=parts.shift();if(!(arguments.length>2))return obj[last];obj[last]=value}catch(e){throw e.message+=` (when accessing ${path})`,e}}const helperData=Object.create(null);function loadHelper(name){if(!helperData[name]){const helper=_helpersGenerated.default[name];if(!helper)throw Object.assign(new ReferenceError(`Unknown helper ${name}`),{code:"BABEL_HELPER_UNKNOWN",helper:name});helperData[name]={minVersion:helper.minVersion,build(getDependency,bindingName,localBindings,adjustAst){const ast=helper.ast();return function(ast,metadata,bindingName,localBindings,getDependency,adjustAst){const{locals,dependencies,exportBindingAssignments,exportName}=metadata,bindings=new Set(localBindings||[]);bindingName&&bindings.add(bindingName);for(const[name,paths]of(Object.entries||(o=>Object.keys(o).map(k=>[k,o[k]])))(locals)){let newName=name;if(bindingName&&name===exportName)newName=bindingName;else for(;bindings.has(newName);)newName="_"+newName;if(newName!==name)for(const path of paths)deep(ast,path,identifier(newName))}for(const[name,paths]of(Object.entries||(o=>Object.keys(o).map(k=>[k,o[k]])))(dependencies)){const ref="function"==typeof getDependency&&getDependency(name)||identifier(name);for(const path of paths)deep(ast,path,cloneNode(ref))}null==adjustAst||adjustAst(ast,exportName,map=>{exportBindingAssignments.forEach(p=>deep(ast,p,map(deep(ast,p))))})}(ast,helper.metadata,bindingName,localBindings,getDependency,adjustAst),{nodes:ast.body,globals:helper.metadata.globals}},getDependencies:()=>Object.keys(helper.metadata.dependencies)}}return helperData[name]}function get(name,getDependency,bindingName,localBindings,adjustAst){if("object"==typeof bindingName){const id=bindingName;bindingName="Identifier"===(null==id?void 0:id.type)?id.name:void 0}return loadHelper(name).build(getDependency,bindingName,localBindings,adjustAst)}exports.ensure=name=>{loadHelper(name)};exports.list=Object.keys(_helpersGenerated.default).map(name=>name.replace(/^_/,""));exports.default=get},"./node_modules/.pnpm/@babel+parser@7.28.0/node_modules/@babel/parser/lib/index.js":(__unused_webpack_module,exports)=>{"use strict";function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}Object.defineProperty(exports,"__esModule",{value:!0});class Position{constructor(line,col,index){this.line=void 0,this.column=void 0,this.index=void 0,this.line=line,this.column=col,this.index=index}}class SourceLocation{constructor(start,end){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=start,this.end=end}}function createPositionWithColumnOffset(position,columnOffset){const{line,column,index}=position;return new Position(line,column+columnOffset,index+columnOffset)}const code="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var ModuleErrors={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code}};const NodeDescriptions={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},toNodeDescription=node=>"UpdateExpression"===node.type?NodeDescriptions.UpdateExpression[`${node.prefix}`]:NodeDescriptions[node.type];var StandardErrors={AccessorIsGenerator:({kind})=>`A ${kind}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind})=>`Missing initializer in ${kind} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName})=>`\`${exportName}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName,exportName})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type})=>`'${"ForInStatement"===type?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type})=>`Unsyntactic ${"BreakStatement"===type?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix})=>`Expected number in radix ${radix}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord})=>`Escape sequence in keyword ${reservedWord}.`,InvalidIdentifier:({identifierName})=>`Invalid identifier ${identifierName}.`,InvalidLhs:({ancestor})=>`Invalid left-hand side in ${toNodeDescription(ancestor)}.`,InvalidLhsBinding:({ancestor})=>`Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`,InvalidLhsOptionalChaining:({ancestor})=>`Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected})=>`Unexpected character '${unexpected}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName})=>`Private name #${identifierName} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName})=>`Label '${labelName}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin})=>`This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name=>JSON.stringify(name)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name=>JSON.stringify(name)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key})=>`Duplicate key "${key}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode})=>`An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`,ModuleExportUndefined:({localName})=>`Export '${localName}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName})=>`Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`,PrivateNameRedeclaration:({identifierName})=>`Duplicate private name #${identifierName}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword})=>`Unexpected keyword '${keyword}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord})=>`Unexpected reserved word '${reservedWord}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected,unexpected})=>`Unexpected token${unexpected?` '${unexpected}'.`:""}${expected?`, expected "${expected}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target,onlyValidPropertyName})=>`The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName})=>`Identifier '${identifierName}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},ParseExpressionErrors={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(unexpected)}\`.`};const UnparenthesizedPipeBodyDescriptions=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var PipelineOperatorErrors=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token})=>`Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type})=>`Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({type})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'});const _excluded=["message"];function defineHidden(obj,key,value){Object.defineProperty(obj,key,{enumerable:!1,configurable:!0,value})}function toParseErrorConstructor({toMessage,code,reasonCode,syntaxPlugin}){const hasMissingPlugin="MissingPlugin"===reasonCode||"MissingOneOfPlugins"===reasonCode;{const oldReasonCodes={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};oldReasonCodes[reasonCode]&&(reasonCode=oldReasonCodes[reasonCode])}return function constructor(loc,details){const error=new SyntaxError;return error.code=code,error.reasonCode=reasonCode,error.loc=loc,error.pos=loc.index,error.syntaxPlugin=syntaxPlugin,hasMissingPlugin&&(error.missingPlugin=details.missingPlugin),defineHidden(error,"clone",function(overrides={}){var _overrides$loc;const{line,column,index}=null!=(_overrides$loc=overrides.loc)?_overrides$loc:loc;return constructor(new Position(line,column,index),Object.assign({},details,overrides.details))}),defineHidden(error,"details",details),Object.defineProperty(error,"message",{configurable:!0,get(){const message=`${toMessage(details)} (${loc.line}:${loc.column})`;return this.message=message,message},set(value){Object.defineProperty(this,"message",{value,writable:!0})}}),error}}function ParseErrorEnum(argument,syntaxPlugin){if(Array.isArray(argument))return parseErrorTemplates=>ParseErrorEnum(parseErrorTemplates,argument[0]);const ParseErrorConstructors={};for(const reasonCode of Object.keys(argument)){const template=argument[reasonCode],_ref="string"==typeof template?{message:()=>template}:"function"==typeof template?{message:template}:template,{message}=_ref,rest=_objectWithoutPropertiesLoose(_ref,_excluded),toMessage="string"==typeof message?()=>message:message;ParseErrorConstructors[reasonCode]=toParseErrorConstructor(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode,toMessage},syntaxPlugin?{syntaxPlugin}:{},rest))}return ParseErrorConstructors}const Errors=Object.assign({},ParseErrorEnum(ModuleErrors),ParseErrorEnum(StandardErrors),ParseErrorEnum({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName})=>`Assigning to '${referenceName}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName})=>`Binding '${bindingName}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),ParseErrorEnum(ParseExpressionErrors),ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));const{defineProperty}=Object,toUnenumerable=(object,key)=>{object&&defineProperty(object,key,{enumerable:!1,value:object[key]})};function toESTreeLocation(node){return toUnenumerable(node.loc.start,"index"),toUnenumerable(node.loc.end,"index"),node}class TokContext{constructor(token,preserveSpace){this.token=void 0,this.preserveSpace=void 0,this.token=token,this.preserveSpace=!!preserveSpace}}const types={brace:new TokContext("{"),j_oTag:new TokContext("...",!0)};types.template=new TokContext("`",!0);class ExportedTokenType{constructor(label,conf={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=label,this.keyword=conf.keyword,this.beforeExpr=!!conf.beforeExpr,this.startsExpr=!!conf.startsExpr,this.rightAssociative=!!conf.rightAssociative,this.isLoop=!!conf.isLoop,this.isAssign=!!conf.isAssign,this.prefix=!!conf.prefix,this.postfix=!!conf.postfix,this.binop=null!=conf.binop?conf.binop:null,this.updateContext=null}}const keywords$1=new Map;function createKeyword(name,options={}){options.keyword=name;const token=createToken(name,options);return keywords$1.set(name,token),token}function createBinop(name,binop){return createToken(name,{beforeExpr:true,binop})}let tokenTypeCounter=-1;const tokenTypes=[],tokenLabels=[],tokenBinops=[],tokenBeforeExprs=[],tokenStartsExprs=[],tokenPrefixes=[];function createToken(name,options={}){var _options$binop,_options$beforeExpr,_options$startsExpr,_options$prefix;return++tokenTypeCounter,tokenLabels.push(name),tokenBinops.push(null!=(_options$binop=options.binop)?_options$binop:-1),tokenBeforeExprs.push(null!=(_options$beforeExpr=options.beforeExpr)&&_options$beforeExpr),tokenStartsExprs.push(null!=(_options$startsExpr=options.startsExpr)&&_options$startsExpr),tokenPrefixes.push(null!=(_options$prefix=options.prefix)&&_options$prefix),tokenTypes.push(new ExportedTokenType(name,options)),tokenTypeCounter}function createKeywordLike(name,options={}){var _options$binop2,_options$beforeExpr2,_options$startsExpr2,_options$prefix2;return++tokenTypeCounter,keywords$1.set(name,tokenTypeCounter),tokenLabels.push(name),tokenBinops.push(null!=(_options$binop2=options.binop)?_options$binop2:-1),tokenBeforeExprs.push(null!=(_options$beforeExpr2=options.beforeExpr)&&_options$beforeExpr2),tokenStartsExprs.push(null!=(_options$startsExpr2=options.startsExpr)&&_options$startsExpr2),tokenPrefixes.push(null!=(_options$prefix2=options.prefix)&&_options$prefix2),tokenTypes.push(new ExportedTokenType("name",options)),tokenTypeCounter}const tt={bracketL:createToken("[",{beforeExpr:true,startsExpr:true}),bracketHashL:createToken("#[",{beforeExpr:true,startsExpr:true}),bracketBarL:createToken("[|",{beforeExpr:true,startsExpr:true}),bracketR:createToken("]"),bracketBarR:createToken("|]"),braceL:createToken("{",{beforeExpr:true,startsExpr:true}),braceBarL:createToken("{|",{beforeExpr:true,startsExpr:true}),braceHashL:createToken("#{",{beforeExpr:true,startsExpr:true}),braceR:createToken("}"),braceBarR:createToken("|}"),parenL:createToken("(",{beforeExpr:true,startsExpr:true}),parenR:createToken(")"),comma:createToken(",",{beforeExpr:true}),semi:createToken(";",{beforeExpr:true}),colon:createToken(":",{beforeExpr:true}),doubleColon:createToken("::",{beforeExpr:true}),dot:createToken("."),question:createToken("?",{beforeExpr:true}),questionDot:createToken("?."),arrow:createToken("=>",{beforeExpr:true}),template:createToken("template"),ellipsis:createToken("...",{beforeExpr:true}),backQuote:createToken("`",{startsExpr:true}),dollarBraceL:createToken("${",{beforeExpr:true,startsExpr:true}),templateTail:createToken("...`",{startsExpr:true}),templateNonTail:createToken("...${",{beforeExpr:true,startsExpr:true}),at:createToken("@"),hash:createToken("#",{startsExpr:true}),interpreterDirective:createToken("#!..."),eq:createToken("=",{beforeExpr:true,isAssign:true}),assign:createToken("_=",{beforeExpr:true,isAssign:true}),slashAssign:createToken("_=",{beforeExpr:true,isAssign:true}),xorAssign:createToken("_=",{beforeExpr:true,isAssign:true}),moduloAssign:createToken("_=",{beforeExpr:true,isAssign:true}),incDec:createToken("++/--",{prefix:true,postfix:!0,startsExpr:true}),bang:createToken("!",{beforeExpr:true,prefix:true,startsExpr:true}),tilde:createToken("~",{beforeExpr:true,prefix:true,startsExpr:true}),doubleCaret:createToken("^^",{startsExpr:true}),doubleAt:createToken("@@",{startsExpr:true}),pipeline:createBinop("|>",0),nullishCoalescing:createBinop("??",1),logicalOR:createBinop("||",1),logicalAND:createBinop("&&",2),bitwiseOR:createBinop("|",3),bitwiseXOR:createBinop("^",4),bitwiseAND:createBinop("&",5),equality:createBinop("==/!=/===/!==",6),lt:createBinop("/<=/>=",7),gt:createBinop("/<=/>=",7),relational:createBinop("/<=/>=",7),bitShift:createBinop("<>/>>>",8),bitShiftL:createBinop("<>/>>>",8),bitShiftR:createBinop("<>/>>>",8),plusMin:createToken("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:createToken("%",{binop:10,startsExpr:true}),star:createToken("*",{binop:10}),slash:createBinop("/",10),exponent:createToken("**",{beforeExpr:true,binop:11,rightAssociative:!0}),_in:createKeyword("in",{beforeExpr:true,binop:7}),_instanceof:createKeyword("instanceof",{beforeExpr:true,binop:7}),_break:createKeyword("break"),_case:createKeyword("case",{beforeExpr:true}),_catch:createKeyword("catch"),_continue:createKeyword("continue"),_debugger:createKeyword("debugger"),_default:createKeyword("default",{beforeExpr:true}),_else:createKeyword("else",{beforeExpr:true}),_finally:createKeyword("finally"),_function:createKeyword("function",{startsExpr:true}),_if:createKeyword("if"),_return:createKeyword("return",{beforeExpr:true}),_switch:createKeyword("switch"),_throw:createKeyword("throw",{beforeExpr:true,prefix:true,startsExpr:true}),_try:createKeyword("try"),_var:createKeyword("var"),_const:createKeyword("const"),_with:createKeyword("with"),_new:createKeyword("new",{beforeExpr:true,startsExpr:true}),_this:createKeyword("this",{startsExpr:true}),_super:createKeyword("super",{startsExpr:true}),_class:createKeyword("class",{startsExpr:true}),_extends:createKeyword("extends",{beforeExpr:true}),_export:createKeyword("export"),_import:createKeyword("import",{startsExpr:true}),_null:createKeyword("null",{startsExpr:true}),_true:createKeyword("true",{startsExpr:true}),_false:createKeyword("false",{startsExpr:true}),_typeof:createKeyword("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:createKeyword("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:createKeyword("delete",{beforeExpr:true,prefix:true,startsExpr:true}),_do:createKeyword("do",{isLoop:true,beforeExpr:true}),_for:createKeyword("for",{isLoop:true}),_while:createKeyword("while",{isLoop:true}),_as:createKeywordLike("as",{startsExpr:true}),_assert:createKeywordLike("assert",{startsExpr:true}),_async:createKeywordLike("async",{startsExpr:true}),_await:createKeywordLike("await",{startsExpr:true}),_defer:createKeywordLike("defer",{startsExpr:true}),_from:createKeywordLike("from",{startsExpr:true}),_get:createKeywordLike("get",{startsExpr:true}),_let:createKeywordLike("let",{startsExpr:true}),_meta:createKeywordLike("meta",{startsExpr:true}),_of:createKeywordLike("of",{startsExpr:true}),_sent:createKeywordLike("sent",{startsExpr:true}),_set:createKeywordLike("set",{startsExpr:true}),_source:createKeywordLike("source",{startsExpr:true}),_static:createKeywordLike("static",{startsExpr:true}),_using:createKeywordLike("using",{startsExpr:true}),_yield:createKeywordLike("yield",{startsExpr:true}),_asserts:createKeywordLike("asserts",{startsExpr:true}),_checks:createKeywordLike("checks",{startsExpr:true}),_exports:createKeywordLike("exports",{startsExpr:true}),_global:createKeywordLike("global",{startsExpr:true}),_implements:createKeywordLike("implements",{startsExpr:true}),_intrinsic:createKeywordLike("intrinsic",{startsExpr:true}),_infer:createKeywordLike("infer",{startsExpr:true}),_is:createKeywordLike("is",{startsExpr:true}),_mixins:createKeywordLike("mixins",{startsExpr:true}),_proto:createKeywordLike("proto",{startsExpr:true}),_require:createKeywordLike("require",{startsExpr:true}),_satisfies:createKeywordLike("satisfies",{startsExpr:true}),_keyof:createKeywordLike("keyof",{startsExpr:true}),_readonly:createKeywordLike("readonly",{startsExpr:true}),_unique:createKeywordLike("unique",{startsExpr:true}),_abstract:createKeywordLike("abstract",{startsExpr:true}),_declare:createKeywordLike("declare",{startsExpr:true}),_enum:createKeywordLike("enum",{startsExpr:true}),_module:createKeywordLike("module",{startsExpr:true}),_namespace:createKeywordLike("namespace",{startsExpr:true}),_interface:createKeywordLike("interface",{startsExpr:true}),_type:createKeywordLike("type",{startsExpr:true}),_opaque:createKeywordLike("opaque",{startsExpr:true}),name:createToken("name",{startsExpr:true}),placeholder:createToken("%%",{startsExpr:true}),string:createToken("string",{startsExpr:true}),num:createToken("num",{startsExpr:true}),bigint:createToken("bigint",{startsExpr:true}),decimal:createToken("decimal",{startsExpr:true}),regexp:createToken("regexp",{startsExpr:true}),privateName:createToken("#name",{startsExpr:true}),eof:createToken("eof"),jsxName:createToken("jsxName"),jsxText:createToken("jsxText",{beforeExpr:true}),jsxTagStart:createToken("jsxTagStart",{startsExpr:true}),jsxTagEnd:createToken("jsxTagEnd")};function tokenIsIdentifier(token){return token>=93&&token<=133}function tokenIsKeywordOrIdentifier(token){return token>=58&&token<=133}function tokenIsLiteralPropertyName(token){return token>=58&&token<=137}function tokenCanStartExpression(token){return tokenStartsExprs[token]}function tokenIsFlowInterfaceOrTypeOrOpaque(token){return token>=129&&token<=131}function tokenIsKeyword(token){return token>=58&&token<=92}function tokenIsPostfix(token){return 34===token}function tokenLabelName(token){return tokenLabels[token]}function tokenOperatorPrecedence(token){return tokenBinops[token]}function tokenIsTemplate(token){return token>=24&&token<=25}function getExportedToken(token){return tokenTypes[token]}tokenTypes[8].updateContext=context=>{context.pop()},tokenTypes[5].updateContext=tokenTypes[7].updateContext=tokenTypes[23].updateContext=context=>{context.push(types.brace)},tokenTypes[22].updateContext=context=>{context[context.length-1]===types.template?context.pop():context.push(types.template)},tokenTypes[143].updateContext=context=>{context.push(types.j_expr,types.j_oTag)};let nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",nonASCIIidentifierChars="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]"),nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");nonASCIIidentifierStartChars=nonASCIIidentifierChars=null;const astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(code,set){let pos=65536;for(let i=0,length=set.length;icode)return!1;if(pos+=set[i+1],pos>=code)return!0}return!1}function isIdentifierStart(code){return code<65?36===code:code<=90||(code<97?95===code:code<=122||(code<=65535?code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code)):isInAstralSet(code,astralIdentifierStartCodes)))}function isIdentifierChar(code){return code<48?36===code:code<58||!(code<65)&&(code<=90||(code<97?95===code:code<=122||(code<=65535?code>=170&&nonASCIIidentifier.test(String.fromCharCode(code)):isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes))))}const reservedWords_strict=["implements","interface","let","package","private","protected","public","static","yield"],reservedWords_strictBind=["eval","arguments"],keywords=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),reservedWordsStrictSet=new Set(reservedWords_strict),reservedWordsStrictBindSet=new Set(reservedWords_strictBind);function isReservedWord(word,inModule){return inModule&&"await"===word||"enum"===word}function isStrictReservedWord(word,inModule){return isReservedWord(word,inModule)||reservedWordsStrictSet.has(word)}function isStrictBindOnlyReservedWord(word){return reservedWordsStrictBindSet.has(word)}function isStrictBindReservedWord(word,inModule){return isStrictReservedWord(word,inModule)||isStrictBindOnlyReservedWord(word)}const reservedWordLikeSet=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);class Scope{constructor(flags){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=flags}}class ScopeHandler{constructor(parser,inModule){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=parser,this.inModule=inModule}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get allowNewTarget(){return(512&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const flags=this.currentThisScopeFlags();return(64&flags)>0&&!(2&flags)}get inStaticBlock(){for(let i=this.scopeStack.length-1;;i--){const{flags}=this.scopeStack[i];if(128&flags)return!0;if(1731&flags)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(flags){return new Scope(flags)}enter(flags){this.scopeStack.push(this.createScope(flags))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(scope){return!!(130&scope.flags||!this.parser.inModule&&1&scope.flags)}declareName(name,bindingType,loc){let scope=this.currentScope();if(8&bindingType||16&bindingType){this.checkRedeclarationInScope(scope,name,bindingType,loc);let type=scope.names.get(name)||0;16&bindingType?type|=4:(scope.firstLexicalName||(scope.firstLexicalName=name),type|=2),scope.names.set(name,type),8&bindingType&&this.maybeExportDefined(scope,name)}else if(4&bindingType)for(let i=this.scopeStack.length-1;i>=0&&(scope=this.scopeStack[i],this.checkRedeclarationInScope(scope,name,bindingType,loc),scope.names.set(name,1|(scope.names.get(name)||0)),this.maybeExportDefined(scope,name),!(1667&scope.flags));--i);this.parser.inModule&&1&scope.flags&&this.undefinedExports.delete(name)}maybeExportDefined(scope,name){this.parser.inModule&&1&scope.flags&&this.undefinedExports.delete(name)}checkRedeclarationInScope(scope,name,bindingType,loc){this.isRedeclaredInScope(scope,name,bindingType)&&this.parser.raise(Errors.VarRedeclaration,loc,{identifierName:name})}isRedeclaredInScope(scope,name,bindingType){if(!(1&bindingType))return!1;if(8&bindingType)return scope.names.has(name);const type=scope.names.get(name);return 16&bindingType?(2&type)>0||!this.treatFunctionsAsVarInScope(scope)&&(1&type)>0:(2&type)>0&&!(8&scope.flags&&scope.firstLexicalName===name)||!this.treatFunctionsAsVarInScope(scope)&&(4&type)>0}checkLocalExport(id){const{name}=id;this.scopeStack[0].names.has(name)||this.undefinedExports.set(name,id.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let i=this.scopeStack.length-1;;i--){const{flags}=this.scopeStack[i];if(1667&flags)return flags}}currentThisScopeFlags(){for(let i=this.scopeStack.length-1;;i--){const{flags}=this.scopeStack[i];if(1731&flags&&!(4&flags))return flags}}}class FlowScope extends Scope{constructor(...args){super(...args),this.declareFunctions=new Set}}class FlowScopeHandler extends ScopeHandler{createScope(flags){return new FlowScope(flags)}declareName(name,bindingType,loc){const scope=this.currentScope();if(2048&bindingType)return this.checkRedeclarationInScope(scope,name,bindingType,loc),this.maybeExportDefined(scope,name),void scope.declareFunctions.add(name);super.declareName(name,bindingType,loc)}isRedeclaredInScope(scope,name,bindingType){if(super.isRedeclaredInScope(scope,name,bindingType))return!0;if(2048&bindingType&&!scope.declareFunctions.has(name)){const type=scope.names.get(name);return(4&type)>0||(2&type)>0}return!1}checkLocalExport(id){this.scopeStack[0].declareFunctions.has(id.name)||super.checkLocalExport(id)}}const reservedTypes=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),FlowErrors=ParseErrorEnum`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType})=>`Cannot overwrite reserved type ${reservedType}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName,enumName})=>`Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`,EnumDuplicateMemberName:({memberName,enumName})=>`Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`,EnumInconsistentMemberValues:({enumName})=>`Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType,enumName})=>`Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName,memberName,explicitType})=>`Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName,memberName})=>`Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName,memberName})=>`The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`,EnumInvalidMemberName:({enumName,memberName,suggestion})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`,EnumNumberMemberNotInitialized:({enumName,memberName})=>`Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType})=>`Unexpected reserved type ${reservedType}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind,suggestion})=>`\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function hasTypeImportKind(node){return"type"===node.importKind||"typeof"===node.importKind}const exportSuggestions={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};const FLOW_PRAGMA_REGEX=/\*?\s*@((?:no)?flow)\b/;const entities={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},lineBreakG=new RegExp(/\r\n|[\r\n\u2028\u2029]/.source,"g");function isNewLine(code){switch(code){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function hasNewLine(input,start,end){for(let i=start;i`Expected corresponding JSX closing tag for <${openingTagName}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected,HTMLEntity})=>`Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function isFragment(object){return!!object&&("JSXOpeningFragment"===object.type||"JSXClosingFragment"===object.type)}function getQualifiedJSXName(object){if("JSXIdentifier"===object.type)return object.name;if("JSXNamespacedName"===object.type)return object.namespace.name+":"+object.name.name;if("JSXMemberExpression"===object.type)return getQualifiedJSXName(object.object)+"."+getQualifiedJSXName(object.property);throw new Error("Node had unexpected type: "+object.type)}class TypeScriptScope extends Scope{constructor(...args){super(...args),this.tsNames=new Map}}class TypeScriptScopeHandler extends ScopeHandler{constructor(...args){super(...args),this.importsStack=[]}createScope(flags){return this.importsStack.push(new Set),new TypeScriptScope(flags)}enter(flags){1024===flags&&this.importsStack.push(new Set),super.enter(flags)}exit(){const flags=super.exit();return 1024===flags&&this.importsStack.pop(),flags}hasImport(name,allowShadow){const len=this.importsStack.length;if(this.importsStack[len-1].has(name))return!0;if(!allowShadow&&len>1)for(let i=0;i0){if(256&bindingType){return!!(512&bindingType)!==(4&type)>0}return!0}return 128&bindingType&&(8&type)>0?!!(2&scope.names.get(name))&&!!(1&bindingType):!!(2&bindingType&&(1&type)>0)||super.isRedeclaredInScope(scope,name,bindingType)}checkLocalExport(id){const{name}=id;if(this.hasImport(name))return;for(let i=this.scopeStack.length-1;i>=0;i--){const type=this.scopeStack[i].tsNames.get(name);if((1&type)>0||(16&type)>0)return}super.checkLocalExport(id)}}class ProductionParameterHandler{constructor(){this.stacks=[]}enter(flags){this.stacks.push(flags)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function functionFlags(isAsync,isGenerator){return(isAsync?2:0)|(isGenerator?1:0)}class BaseParser{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(sourcePos){return sourcePos+this.startIndex}offsetToSourcePos(offsetPos){return offsetPos-this.startIndex}hasPlugin(pluginConfig){if("string"==typeof pluginConfig)return this.plugins.has(pluginConfig);{const[pluginName,pluginOptions]=pluginConfig;if(!this.hasPlugin(pluginName))return!1;const actualOptions=this.plugins.get(pluginName);for(const key of Object.keys(pluginOptions))if((null==actualOptions?void 0:actualOptions[key])!==pluginOptions[key])return!1;return!0}}getPluginOption(plugin,name){var _this$plugins$get;return null==(_this$plugins$get=this.plugins.get(plugin))?void 0:_this$plugins$get[name]}}function setTrailingComments(node,comments){void 0===node.trailingComments?node.trailingComments=comments:node.trailingComments.unshift(...comments)}function setInnerComments(node,comments){void 0===node.innerComments?node.innerComments=comments:node.innerComments.unshift(...comments)}function adjustInnerComments(node,elements,commentWS){let lastElement=null,i=elements.length;for(;null===lastElement&&i>0;)lastElement=elements[--i];null===lastElement||lastElement.start>commentWS.start?setInnerComments(node,commentWS.comments):setTrailingComments(lastElement,commentWS.comments)}class CommentsParser extends BaseParser{addComment(comment){this.filename&&(comment.loc.filename=this.filename);const{commentsLen}=this.state;this.comments.length!==commentsLen&&(this.comments.length=commentsLen),this.comments.push(comment),this.state.commentsLen++}processComment(node){const{commentStack}=this.state,commentStackLength=commentStack.length;if(0===commentStackLength)return;let i=commentStackLength-1;const lastCommentWS=commentStack[i];lastCommentWS.start===node.end&&(lastCommentWS.leadingNode=node,i--);const{start:nodeStart}=node;for(;i>=0;i--){const commentWS=commentStack[i],commentEnd=commentWS.end;if(!(commentEnd>nodeStart)){commentEnd===nodeStart&&(commentWS.trailingNode=node);break}commentWS.containingNode=node,this.finalizeComment(commentWS),commentStack.splice(i,1)}}finalizeComment(commentWS){var _node$options;const{comments}=commentWS;if(null!==commentWS.leadingNode||null!==commentWS.trailingNode)null!==commentWS.leadingNode&&setTrailingComments(commentWS.leadingNode,comments),null!==commentWS.trailingNode&&function(node,comments){void 0===node.leadingComments?node.leadingComments=comments:node.leadingComments.unshift(...comments)}(commentWS.trailingNode,comments);else{const{containingNode:node,start:commentStart}=commentWS;if(44===this.input.charCodeAt(this.offsetToSourcePos(commentStart)-1))switch(node.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":adjustInnerComments(node,node.properties,commentWS);break;case"CallExpression":case"OptionalCallExpression":adjustInnerComments(node,node.arguments,commentWS);break;case"ImportExpression":adjustInnerComments(node,[node.source,null!=(_node$options=node.options)?_node$options:null],commentWS);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":adjustInnerComments(node,node.params,commentWS);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":adjustInnerComments(node,node.elements,commentWS);break;case"ExportNamedDeclaration":case"ImportDeclaration":adjustInnerComments(node,node.specifiers,commentWS);break;case"TSEnumDeclaration":case"TSEnumBody":adjustInnerComments(node,node.members,commentWS);break;default:setInnerComments(node,comments)}else setInnerComments(node,comments)}}finalizeRemainingComments(){const{commentStack}=this.state;for(let i=commentStack.length-1;i>=0;i--)this.finalizeComment(commentStack[i]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(node){const{commentStack}=this.state,{length}=commentStack;if(0===length)return;const commentWS=commentStack[length-1];commentWS.leadingNode===node&&(commentWS.leadingNode=null)}takeSurroundingComments(node,start,end){const{commentStack}=this.state,commentStackLength=commentStack.length;if(0===commentStackLength)return;let i=commentStackLength-1;for(;i>=0;i--){const commentWS=commentStack[i],commentEnd=commentWS.end;if(commentWS.start===end)commentWS.leadingNode=node;else if(commentEnd===start)commentWS.trailingNode=node;else if(commentEnd0}set strict(v){v?this.flags|=1:this.flags&=-2}init({strictMode,sourceType,startIndex,startLine,startColumn}){this.strict=!1!==strictMode&&(!0===strictMode||"module"===sourceType),this.startIndex=startIndex,this.curLine=startLine,this.lineStart=-startColumn,this.startLoc=this.endLoc=new Position(startLine,startColumn,startIndex)}get maybeInArrowParameters(){return(2&this.flags)>0}set maybeInArrowParameters(v){v?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(v){v?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(v){v?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(v){v?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(v){v?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(v){v?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(v){v?this.flags|=128:this.flags&=-129}get soloAwait(){return(256&this.flags)>0}set soloAwait(v){v?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(512&this.flags)>0}set inFSharpPipelineDirectBody(v){v?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(1024&this.flags)>0}set canStartJSXElement(v){v?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(2048&this.flags)>0}set containsEsc(v){v?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(4096&this.flags)>0}set hasTopLevelAwait(v){v?this.flags|=4096:this.flags&=-4097}curPosition(){return new Position(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const state=new State;return state.flags=this.flags,state.startIndex=this.startIndex,state.curLine=this.curLine,state.lineStart=this.lineStart,state.startLoc=this.startLoc,state.endLoc=this.endLoc,state.errors=this.errors.slice(),state.potentialArrowAt=this.potentialArrowAt,state.noArrowAt=this.noArrowAt.slice(),state.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),state.topicContext=this.topicContext,state.labels=this.labels.slice(),state.commentsLen=this.commentsLen,state.commentStack=this.commentStack.slice(),state.pos=this.pos,state.type=this.type,state.value=this.value,state.start=this.start,state.end=this.end,state.lastTokEndLoc=this.lastTokEndLoc,state.lastTokStartLoc=this.lastTokStartLoc,state.context=this.context.slice(),state.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,state.strictErrors=this.strictErrors,state.tokensLength=this.tokensLength,state}}var _isDigit=function(code){return code>=48&&code<=57};const forbiddenNumericSeparatorSiblings={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},isAllowedNumericSeparatorSibling={bin:ch=>48===ch||49===ch,oct:ch=>ch>=48&&ch<=55,dec:ch=>ch>=48&&ch<=57,hex:ch=>ch>=48&&ch<=57||ch>=65&&ch<=70||ch>=97&&ch<=102};function readStringContents(type,input,pos,lineStart,curLine,errors){const initialPos=pos,initialLineStart=lineStart,initialCurLine=curLine;let out="",firstInvalidLoc=null,chunkStart=pos;const{length}=input;for(;;){if(pos>=length){errors.unterminated(initialPos,initialLineStart,initialCurLine),out+=input.slice(chunkStart,pos);break}const ch=input.charCodeAt(pos);if(isStringEnd(type,ch,input,pos)){out+=input.slice(chunkStart,pos);break}if(92===ch){out+=input.slice(chunkStart,pos);const res=readEscapedChar(input,pos,lineStart,curLine,"template"===type,errors);null!==res.ch||firstInvalidLoc?out+=res.ch:firstInvalidLoc={pos,lineStart,curLine},({pos,lineStart,curLine}=res),chunkStart=pos}else 8232===ch||8233===ch?(++curLine,lineStart=++pos):10===ch||13===ch?"template"===type?(out+=input.slice(chunkStart,pos)+"\n",++pos,13===ch&&10===input.charCodeAt(pos)&&++pos,++curLine,chunkStart=lineStart=pos):errors.unterminated(initialPos,initialLineStart,initialCurLine):++pos}return{pos,str:out,firstInvalidLoc,lineStart,curLine,containsInvalid:!!firstInvalidLoc}}function isStringEnd(type,ch,input,pos){return"template"===type?96===ch||36===ch&&123===input.charCodeAt(pos+1):ch===("double"===type?34:39)}function readEscapedChar(input,pos,lineStart,curLine,inTemplate,errors){const throwOnInvalid=!inTemplate;pos++;const res=ch=>({pos,ch,lineStart,curLine}),ch=input.charCodeAt(pos++);switch(ch){case 110:return res("\n");case 114:return res("\r");case 120:{let code;return({code,pos}=readHexChar(input,pos,lineStart,curLine,2,!1,throwOnInvalid,errors)),res(null===code?null:String.fromCharCode(code))}case 117:{let code;return({code,pos}=readCodePoint(input,pos,lineStart,curLine,throwOnInvalid,errors)),res(null===code?null:String.fromCodePoint(code))}case 116:return res("\t");case 98:return res("\b");case 118:return res("\v");case 102:return res("\f");case 13:10===input.charCodeAt(pos)&&++pos;case 10:lineStart=pos,++curLine;case 8232:case 8233:return res("");case 56:case 57:if(inTemplate)return res(null);errors.strictNumericEscape(pos-1,lineStart,curLine);default:if(ch>=48&&ch<=55){const startPos=pos-1;let octalStr=/^[0-7]+/.exec(input.slice(startPos,pos+2))[0],octal=parseInt(octalStr,8);octal>255&&(octalStr=octalStr.slice(0,-1),octal=parseInt(octalStr,8)),pos+=octalStr.length-1;const next=input.charCodeAt(pos);if("0"!==octalStr||56===next||57===next){if(inTemplate)return res(null);errors.strictNumericEscape(startPos,lineStart,curLine)}return res(String.fromCharCode(octal))}return res(String.fromCharCode(ch))}}function readHexChar(input,pos,lineStart,curLine,len,forceLen,throwOnInvalid,errors){const initialPos=pos;let n;return({n,pos}=readInt(input,pos,lineStart,curLine,16,len,forceLen,!1,errors,!throwOnInvalid)),null===n&&(throwOnInvalid?errors.invalidEscapeSequence(initialPos,lineStart,curLine):pos=initialPos-1),{code:n,pos}}function readInt(input,pos,lineStart,curLine,radix,len,forceLen,allowNumSeparator,errors,bailOnError){const start=pos,forbiddenSiblings=16===radix?forbiddenNumericSeparatorSiblings.hex:forbiddenNumericSeparatorSiblings.decBinOct,isAllowedSibling=16===radix?isAllowedNumericSeparatorSibling.hex:10===radix?isAllowedNumericSeparatorSibling.dec:8===radix?isAllowedNumericSeparatorSibling.oct:isAllowedNumericSeparatorSibling.bin;let invalid=!1,total=0;for(let i=0,e=null==len?1/0:len;i=97?code-97+10:code>=65?code-65+10:_isDigit(code)?code-48:1/0,val>=radix){if(val<=9&&bailOnError)return{n:null,pos};if(val<=9&&errors.invalidDigit(pos,lineStart,curLine,radix))val=0;else{if(!forceLen)break;val=0,invalid=!0}}++pos,total=total*radix+val}return pos===start||null!=len&&pos-start!==len||invalid?{n:null,pos}:{n:total,pos}}function readCodePoint(input,pos,lineStart,curLine,throwOnInvalid,errors){let code;if(123===input.charCodeAt(pos)){if(++pos,({code,pos}=readHexChar(input,pos,lineStart,curLine,input.indexOf("}",pos)-pos,!0,throwOnInvalid,errors)),++pos,null!==code&&code>1114111){if(!throwOnInvalid)return{code:null,pos};errors.invalidCodePoint(pos,lineStart,curLine)}}else({code,pos}=readHexChar(input,pos,lineStart,curLine,4,!1,throwOnInvalid,errors));return{code,pos}}function buildPosition(pos,lineStart,curLine){return new Position(curLine,pos-lineStart,pos)}const VALID_REGEX_FLAGS=new Set([103,109,115,105,121,117,100,118]);class Token{constructor(state){const startIndex=state.startIndex||0;this.type=state.type,this.value=state.value,this.start=startIndex+state.start,this.end=startIndex+state.end,this.loc=new SourceLocation(state.startLoc,state.endLoc)}}class Tokenizer extends CommentsParser{constructor(options,input){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(pos,lineStart,curLine,radix)=>!!(2048&this.optionFlags)&&(this.raise(Errors.InvalidDigit,buildPosition(pos,lineStart,curLine),{radix}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(Errors.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(Errors.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(Errors.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(Errors.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(pos,lineStart,curLine)=>{this.recordStrictModeErrors(Errors.StrictNumericEscape,buildPosition(pos,lineStart,curLine))},unterminated:(pos,lineStart,curLine)=>{throw this.raise(Errors.UnterminatedString,buildPosition(pos-1,lineStart,curLine))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(Errors.StrictNumericEscape),unterminated:(pos,lineStart,curLine)=>{throw this.raise(Errors.UnterminatedTemplate,buildPosition(pos,lineStart,curLine))}}),this.state=new State,this.state.init(options),this.input=input,this.length=input.length,this.comments=[],this.isLookahead=!1}pushToken(token){this.tokens.length=this.state.tokensLength,this.tokens.push(token),++this.state.tokensLength}next(){this.checkKeywordEscapes(),256&this.optionFlags&&this.pushToken(new Token(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(type){return!!this.match(type)&&(this.next(),!0)}match(type){return this.state.type===type}createLookaheadState(state){return{pos:state.pos,value:null,type:state.type,start:state.start,end:state.end,context:[this.curContext()],inType:state.inType,startLoc:state.startLoc,lastTokEndLoc:state.lastTokEndLoc,curLine:state.curLine,lineStart:state.lineStart,curPosition:state.curPosition}}lookahead(){const old=this.state;this.state=this.createLookaheadState(old),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const curr=this.state;return this.state=old,curr}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(pos){return skipWhiteSpace.lastIndex=pos,skipWhiteSpace.test(this.input)?skipWhiteSpace.lastIndex:pos}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(pos){return this.input.charCodeAt(this.nextTokenStartSince(pos))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(pos){return skipWhiteSpaceInLine.lastIndex=pos,skipWhiteSpaceInLine.test(this.input)?skipWhiteSpaceInLine.lastIndex:pos}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(pos){let cp=this.input.charCodeAt(pos);if(55296==(64512&cp)&&++posthis.raise(toParseError,at)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(140):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(commentEnd){let startLoc;this.isLookahead||(startLoc=this.state.curPosition());const start=this.state.pos,end=this.input.indexOf(commentEnd,start+2);if(-1===end)throw this.raise(Errors.UnterminatedComment,this.state.curPosition());for(this.state.pos=end+commentEnd.length,lineBreakG.lastIndex=start+2;lineBreakG.test(this.input)&&lineBreakG.lastIndex<=end;)++this.state.curLine,this.state.lineStart=lineBreakG.lastIndex;if(this.isLookahead)return;const comment={type:"CommentBlock",value:this.input.slice(start+2,end),start:this.sourceToOffsetPos(start),end:this.sourceToOffsetPos(end+commentEnd.length),loc:new SourceLocation(startLoc,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(comment),comment}skipLineComment(startSkip){const start=this.state.pos;let startLoc;this.isLookahead||(startLoc=this.state.curPosition());let ch=this.input.charCodeAt(this.state.pos+=startSkip);if(this.state.posspaceStart))break loop;{const comment=this.skipLineComment(3);void 0!==comment&&(this.addComment(comment),null==comments||comments.push(comment))}}else{if(60!==ch||this.inModule||!(8192&this.optionFlags))break loop;{const pos=this.state.pos;if(33!==this.input.charCodeAt(pos+1)||45!==this.input.charCodeAt(pos+2)||45!==this.input.charCodeAt(pos+3))break loop;{const comment=this.skipLineComment(4);void 0!==comment&&(this.addComment(comment),null==comments||comments.push(comment))}}}}}if((null==comments?void 0:comments.length)>0){const end=this.state.pos,commentWhitespace={start:this.sourceToOffsetPos(spaceStart),end:this.sourceToOffsetPos(end),comments,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(commentWhitespace)}}finishToken(type,val){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const prevType=this.state.type;this.state.type=type,this.state.value=val,this.isLookahead||this.updateContext(prevType)}replaceToken(type){this.state.type=type,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const nextPos=this.state.pos+1,next=this.codePointAtPos(nextPos);if(next>=48&&next<=57)throw this.raise(Errors.UnexpectedDigitAfterHash,this.state.curPosition());if(123===next||91===next&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===next?Errors.RecordExpressionHashIncorrectStartSyntaxType:Errors.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,123===next?this.finishToken(7):this.finishToken(1)}else isIdentifierStart(next)?(++this.state.pos,this.finishToken(139,this.readWord1(next))):92===next?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const next=this.input.charCodeAt(this.state.pos+1);next>=48&&next<=57?this.readNumber(!0):46===next&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let ch=this.input.charCodeAt(this.state.pos+1);if(33!==ch)return!1;const start=this.state.pos;for(this.state.pos+=1;!isNewLine(ch)&&++this.state.pos=48&&next2<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(code){switch(code){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const next=this.input.charCodeAt(this.state.pos+1);if(120===next||88===next)return void this.readRadixNumber(16);if(111===next||79===next)return void this.readRadixNumber(8);if(98===next||66===next)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(code);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(code);case 124:case 38:return void this.readToken_pipe_amp(code);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(code);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(code);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(isIdentifierStart(code))return void this.readWord(code)}throw this.raise(Errors.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(code)})}finishOp(type,size){const str=this.input.slice(this.state.pos,this.state.pos+size);this.state.pos+=size,this.finishToken(type,str)}readRegexp(){const startLoc=this.state.startLoc,start=this.state.start+1;let escaped,inClass,{pos}=this.state;for(;;++pos){if(pos>=this.length)throw this.raise(Errors.UnterminatedRegExp,createPositionWithColumnOffset(startLoc,1));const ch=this.input.charCodeAt(pos);if(isNewLine(ch))throw this.raise(Errors.UnterminatedRegExp,createPositionWithColumnOffset(startLoc,1));if(escaped)escaped=!1;else{if(91===ch)inClass=!0;else if(93===ch&&inClass)inClass=!1;else if(47===ch&&!inClass)break;escaped=92===ch}}const content=this.input.slice(start,pos);++pos;let mods="";const nextPos=()=>createPositionWithColumnOffset(startLoc,pos+2-start);for(;pos=2&&48===this.input.charCodeAt(start);if(hasLeadingZero){const integer=this.input.slice(start,this.state.pos);if(this.recordStrictModeErrors(Errors.StrictOctalLiteral,startLoc),!this.state.strict){const underscorePos=integer.indexOf("_");underscorePos>0&&this.raise(Errors.ZeroDigitNumericSeparator,createPositionWithColumnOffset(startLoc,underscorePos))}isOctal=hasLeadingZero&&!/[89]/.test(integer)}let next=this.input.charCodeAt(this.state.pos);if(46!==next||isOctal||(++this.state.pos,this.readInt(10),isFloat=!0,next=this.input.charCodeAt(this.state.pos)),69!==next&&101!==next||isOctal||(next=this.input.charCodeAt(++this.state.pos),43!==next&&45!==next||++this.state.pos,null===this.readInt(10)&&this.raise(Errors.InvalidOrMissingExponent,startLoc),isFloat=!0,hasExponent=!0,next=this.input.charCodeAt(this.state.pos)),110===next&&((isFloat||hasLeadingZero)&&this.raise(Errors.InvalidBigIntLiteral,startLoc),++this.state.pos,isBigInt=!0),109===next){this.expectPlugin("decimal",this.state.curPosition()),(hasExponent||hasLeadingZero)&&this.raise(Errors.InvalidDecimal,startLoc),++this.state.pos;var isDecimal=!0}if(isIdentifierStart(this.codePointAtPos(this.state.pos)))throw this.raise(Errors.NumberIdentifier,this.state.curPosition());const str=this.input.slice(start,this.state.pos).replace(/[_mn]/g,"");if(isBigInt)return void this.finishToken(136,str);if(isDecimal)return void this.finishToken(137,str);const val=isOctal?parseInt(str,8):parseFloat(str);this.finishToken(135,val)}readCodePoint(throwOnInvalid){const{code,pos}=readCodePoint(this.input,this.state.pos,this.state.lineStart,this.state.curLine,throwOnInvalid,this.errorHandlers_readCodePoint);return this.state.pos=pos,code}readString(quote){const{str,pos,curLine,lineStart}=readStringContents(34===quote?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=pos+1,this.state.lineStart=lineStart,this.state.curLine=curLine,this.finishToken(134,str)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const opening=this.input[this.state.pos],{str,firstInvalidLoc,pos,curLine,lineStart}=readStringContents("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=pos+1,this.state.lineStart=lineStart,this.state.curLine=curLine,firstInvalidLoc&&(this.state.firstInvalidTemplateEscapePos=new Position(firstInvalidLoc.curLine,firstInvalidLoc.pos-firstInvalidLoc.lineStart,this.sourceToOffsetPos(firstInvalidLoc.pos))),96===this.input.codePointAt(pos)?this.finishToken(24,firstInvalidLoc?null:opening+str+"`"):(this.state.pos++,this.finishToken(25,firstInvalidLoc?null:opening+str+"${"))}recordStrictModeErrors(toParseError,at){const index=at.index;this.state.strict&&!this.state.strictErrors.has(index)?this.raise(toParseError,at):this.state.strictErrors.set(index,[toParseError,at])}readWord1(firstCode){this.state.containsEsc=!1;let word="";const start=this.state.pos;let chunkStart=this.state.pos;for(void 0!==firstCode&&(this.state.pos+=firstCode<=65535?1:2);this.state.pos=0;i--){const error=errors[i];if(error.loc.index===pos)return errors[i]=toParseError(loc,details);if(error.loc.indexthis.hasPlugin(name)))throw this.raise(Errors.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:pluginNames})}errorBuilder(error){return(pos,lineStart,curLine)=>{this.raise(error,buildPosition(pos,lineStart,curLine))}}}class ClassScope{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class ClassScopeHandler{constructor(parser){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=parser}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new ClassScope)}exit(){const oldClassScope=this.stack.pop(),current=this.current();for(const[name,loc]of Array.from(oldClassScope.undefinedPrivateNames))current?current.undefinedPrivateNames.has(name)||current.undefinedPrivateNames.set(name,loc):this.parser.raise(Errors.InvalidPrivateFieldResolution,loc,{identifierName:name})}declarePrivateName(name,elementType,loc){const{privateNames,loneAccessors,undefinedPrivateNames}=this.current();let redefined=privateNames.has(name);if(3&elementType){const accessor=redefined&&loneAccessors.get(name);if(accessor){redefined=(3&accessor)===(3&elementType)||(4&accessor)!==(4&elementType),redefined||loneAccessors.delete(name)}else redefined||loneAccessors.set(name,elementType)}redefined&&this.parser.raise(Errors.PrivateNameRedeclaration,loc,{identifierName:name}),privateNames.add(name),undefinedPrivateNames.delete(name)}usePrivateName(name,loc){let classScope;for(classScope of this.stack)if(classScope.privateNames.has(name))return;classScope?classScope.undefinedPrivateNames.set(name,loc):this.parser.raise(Errors.InvalidPrivateFieldResolution,loc,{identifierName:name})}}class ExpressionScope{constructor(type=0){this.type=type}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class ArrowHeadParsingScope extends ExpressionScope{constructor(type){super(type),this.declarationErrors=new Map}recordDeclarationError(ParsingErrorClass,at){const index=at.index;this.declarationErrors.set(index,[ParsingErrorClass,at])}clearDeclarationError(index){this.declarationErrors.delete(index)}iterateErrors(iterator){this.declarationErrors.forEach(iterator)}}class ExpressionScopeHandler{constructor(parser){this.parser=void 0,this.stack=[new ExpressionScope],this.parser=parser}enter(scope){this.stack.push(scope)}exit(){this.stack.pop()}recordParameterInitializerError(toParseError,node){const origin=node.loc.start,{stack}=this;let i=stack.length-1,scope=stack[i];for(;!scope.isCertainlyParameterDeclaration();){if(!scope.canBeArrowParameterDeclaration())return;scope.recordDeclarationError(toParseError,origin),scope=stack[--i]}this.parser.raise(toParseError,origin)}recordArrowParameterBindingError(error,node){const{stack}=this,scope=stack[stack.length-1],origin=node.loc.start;if(scope.isCertainlyParameterDeclaration())this.parser.raise(error,origin);else{if(!scope.canBeArrowParameterDeclaration())return;scope.recordDeclarationError(error,origin)}}recordAsyncArrowParametersError(at){const{stack}=this;let i=stack.length-1,scope=stack[i];for(;scope.canBeArrowParameterDeclaration();)2===scope.type&&scope.recordDeclarationError(Errors.AwaitBindingIdentifier,at),scope=stack[--i]}validateAsPattern(){const{stack}=this,currentScope=stack[stack.length-1];currentScope.canBeArrowParameterDeclaration()&¤tScope.iterateErrors(([toParseError,loc])=>{this.parser.raise(toParseError,loc);let i=stack.length-2,scope=stack[i];for(;scope.canBeArrowParameterDeclaration();)scope.clearDeclarationError(loc.index),scope=stack[--i]})}}function newExpressionScope(){return new ExpressionScope}class UtilParser extends Tokenizer{addExtra(node,key,value,enumerable=!0){if(!node)return;let{extra}=node;null==extra&&(extra={},node.extra=extra),enumerable?extra[key]=value:Object.defineProperty(extra,key,{enumerable,value})}isContextual(token){return this.state.type===token&&!this.state.containsEsc}isUnparsedContextual(nameStart,name){if(this.input.startsWith(name,nameStart)){const nextCh=this.input.charCodeAt(nameStart+name.length);return!(isIdentifierChar(nextCh)||55296==(64512&nextCh))}return!1}isLookaheadContextual(name){const next=this.nextTokenStart();return this.isUnparsedContextual(next,name)}eatContextual(token){return!!this.isContextual(token)&&(this.next(),!0)}expectContextual(token,toParseError){if(!this.eatContextual(token)){if(null!=toParseError)throw this.raise(toParseError,this.state.startLoc);this.unexpected(null,token)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return hasNewLine(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return hasNewLine(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(allowAsi=!0){(allowAsi?this.isLineTerminator():this.eat(13))||this.raise(Errors.MissingSemicolon,this.state.lastTokEndLoc)}expect(type,loc){this.eat(type)||this.unexpected(loc,type)}tryParse(fn,oldState=this.state.clone()){const abortSignal={node:null};try{const node=fn((node=null)=>{throw abortSignal.node=node,abortSignal});if(this.state.errors.length>oldState.errors.length){const failState=this.state;return this.state=oldState,this.state.tokensLength=failState.tokensLength,{node,error:failState.errors[oldState.errors.length],thrown:!1,aborted:!1,failState}}return{node,error:null,thrown:!1,aborted:!1,failState:null}}catch(error){const failState=this.state;if(this.state=oldState,error instanceof SyntaxError)return{node:null,error,thrown:!0,aborted:!1,failState};if(error===abortSignal)return{node:abortSignal.node,error:null,thrown:!1,aborted:!0,failState};throw error}}checkExpressionErrors(refExpressionErrors,andThrow){if(!refExpressionErrors)return!1;const{shorthandAssignLoc,doubleProtoLoc,privateKeyLoc,optionalParametersLoc,voidPatternLoc}=refExpressionErrors;if(!andThrow)return!!(shorthandAssignLoc||doubleProtoLoc||optionalParametersLoc||privateKeyLoc||voidPatternLoc);null!=shorthandAssignLoc&&this.raise(Errors.InvalidCoverInitializedName,shorthandAssignLoc),null!=doubleProtoLoc&&this.raise(Errors.DuplicateProto,doubleProtoLoc),null!=privateKeyLoc&&this.raise(Errors.UnexpectedPrivateField,privateKeyLoc),null!=optionalParametersLoc&&this.unexpected(optionalParametersLoc),null!=voidPatternLoc&&this.raise(Errors.InvalidCoverDiscardElement,voidPatternLoc)}isLiteralPropertyName(){return tokenIsLiteralPropertyName(this.state.type)}isPrivateName(node){return"PrivateName"===node.type}getPrivateNameSV(node){return node.id.name}hasPropertyAsPrivateName(node){return("MemberExpression"===node.type||"OptionalMemberExpression"===node.type)&&this.isPrivateName(node.property)}isObjectProperty(node){return"ObjectProperty"===node.type}isObjectMethod(node){return"ObjectMethod"===node.type}initializeScopes(inModule="module"===this.options.sourceType){const oldLabels=this.state.labels;this.state.labels=[];const oldExportedIdentifiers=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const oldInModule=this.inModule;this.inModule=inModule;const oldScope=this.scope,ScopeHandler=this.getScopeHandler();this.scope=new ScopeHandler(this,inModule);const oldProdParam=this.prodParam;this.prodParam=new ProductionParameterHandler;const oldClassScope=this.classScope;this.classScope=new ClassScopeHandler(this);const oldExpressionScope=this.expressionScope;return this.expressionScope=new ExpressionScopeHandler(this),()=>{this.state.labels=oldLabels,this.exportedIdentifiers=oldExportedIdentifiers,this.inModule=oldInModule,this.scope=oldScope,this.prodParam=oldProdParam,this.classScope=oldClassScope,this.expressionScope=oldExpressionScope}}enterInitialScopes(){let paramFlags=0;(this.inModule||1&this.optionFlags)&&(paramFlags|=2),32&this.optionFlags&&(paramFlags|=1);const isCommonJS=!this.inModule&&"commonjs"===this.options.sourceType;(isCommonJS||2&this.optionFlags)&&(paramFlags|=4),this.prodParam.enter(paramFlags);let scopeFlags=isCommonJS?514:1;4&this.optionFlags&&(scopeFlags|=512),this.scope.enter(scopeFlags)}checkDestructuringPrivate(refExpressionErrors){const{privateKeyLoc}=refExpressionErrors;null!==privateKeyLoc&&this.expectPlugin("destructuringPrivate",privateKeyLoc)}}class ExpressionErrors{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}}class Node{constructor(parser,pos,loc){this.type="",this.start=pos,this.end=0,this.loc=new SourceLocation(loc),128&(null==parser?void 0:parser.optionFlags)&&(this.range=[pos,0]),null!=parser&&parser.filename&&(this.loc.filename=parser.filename)}}const NodePrototype=Node.prototype;NodePrototype.__clone=function(){const newNode=new Node(void 0,this.start,this.loc.start),keys=Object.keys(this);for(let i=0,length=keys.length;i"ParenthesizedExpression"===node.type?unwrapParenthesizedExpression(node.expression):node;class LValParser extends NodeUtils{toAssignable(node,isLHS=!1){var _node$extra,_node$extra3;let parenthesized;switch(("ParenthesizedExpression"===node.type||null!=(_node$extra=node.extra)&&_node$extra.parenthesized)&&(parenthesized=unwrapParenthesizedExpression(node),isLHS?"Identifier"===parenthesized.type?this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment,node):"MemberExpression"===parenthesized.type||this.isOptionalMemberExpression(parenthesized)||this.raise(Errors.InvalidParenthesizedAssignment,node):this.raise(Errors.InvalidParenthesizedAssignment,node)),node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(node,"ObjectPattern");for(let i=0,length=node.properties.length,last=length-1;i"ObjectMethod"!==prop.type&&(i===last||"SpreadElement"!==prop.type)&&this.isAssignable(prop))}case"ObjectProperty":return this.isAssignable(node.value);case"SpreadElement":return this.isAssignable(node.argument);case"ArrayExpression":return node.elements.every(element=>null===element||this.isAssignable(element));case"AssignmentExpression":return"="===node.operator;case"ParenthesizedExpression":return this.isAssignable(node.expression);case"MemberExpression":case"OptionalMemberExpression":return!isBinding;default:return!1}}toReferencedList(exprList,isParenthesizedExpr){return exprList}toReferencedListDeep(exprList,isParenthesizedExpr){this.toReferencedList(exprList,isParenthesizedExpr);for(const expr of exprList)"ArrayExpression"===(null==expr?void 0:expr.type)&&this.toReferencedListDeep(expr.elements)}parseSpread(refExpressionErrors){const node=this.startNode();return this.next(),node.argument=this.parseMaybeAssignAllowIn(refExpressionErrors,void 0),this.finishNode(node,"SpreadElement")}parseRestBinding(){const node=this.startNode();this.next();const argument=this.parseBindingAtom();return"VoidPattern"===argument.type&&this.raise(Errors.UnexpectedVoidPattern,argument),node.argument=argument,this.finishNode(node,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const node=this.startNode();return this.next(),node.elements=this.parseBindingList(3,93,1),this.finishNode(node,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(close,closeCharCode,flags){const allowEmpty=1&flags,elts=[];let first=!0;for(;!this.eat(close);)if(first?first=!1:this.expect(12),allowEmpty&&this.match(12))elts.push(null);else{if(this.eat(close))break;if(this.match(21)){let rest=this.parseRestBinding();if((this.hasPlugin("flow")||2&flags)&&(rest=this.parseFunctionParamType(rest)),elts.push(rest),!this.checkCommaAfterRest(closeCharCode)){this.expect(close);break}}else{const decorators=[];if(2&flags)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(Errors.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)decorators.push(this.parseDecorator());elts.push(this.parseBindingElement(flags,decorators))}}return elts}parseBindingRestProperty(prop){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(prop.argument=this.parseVoidPattern(null),this.raise(Errors.UnexpectedVoidPattern,prop.argument)):prop.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(prop,"RestElement")}parseBindingProperty(){const{type,startLoc}=this.state;if(21===type)return this.parseBindingRestProperty(this.startNode());const prop=this.startNode();return 139===type?(this.expectPlugin("destructuringPrivate",startLoc),this.classScope.usePrivateName(this.state.value,startLoc),prop.key=this.parsePrivateName()):this.parsePropertyName(prop),prop.method=!1,this.parseObjPropValue(prop,startLoc,!1,!1,!0,!1)}parseBindingElement(flags,decorators){const left=this.parseMaybeDefault();(this.hasPlugin("flow")||2&flags)&&this.parseFunctionParamType(left),decorators.length&&(left.decorators=decorators,this.resetStartLocationFromNode(left,decorators[0]));return this.parseMaybeDefault(left.loc.start,left)}parseFunctionParamType(param){return param}parseMaybeDefault(startLoc,left){if(null!=startLoc||(startLoc=this.state.startLoc),left=null!=left?left:this.parseBindingAtom(),!this.eat(29))return left;const node=this.startNodeAt(startLoc);return"VoidPattern"===left.type&&this.raise(Errors.VoidPatternInitializer,left),node.left=left,node.right=this.parseMaybeAssignAllowIn(),this.finishNode(node,"AssignmentPattern")}isValidLVal(type,isUnparenthesizedInAssign,binding){switch(type){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0}return!1}isOptionalMemberExpression(expression){return"OptionalMemberExpression"===expression.type}checkLVal(expression,ancestor,binding=64,checkClashes=!1,strictModeChanged=!1,hasParenthesizedAncestor=!1){var _expression$extra;const type=expression.type;if(this.isObjectMethod(expression))return;const isOptionalMemberExpression=this.isOptionalMemberExpression(expression);if(isOptionalMemberExpression||"MemberExpression"===type)return isOptionalMemberExpression&&(this.expectPlugin("optionalChainingAssign",expression.loc.start),"AssignmentExpression"!==ancestor.type&&this.raise(Errors.InvalidLhsOptionalChaining,expression,{ancestor})),void(64!==binding&&this.raise(Errors.InvalidPropertyBindingPattern,expression));if("Identifier"===type){this.checkIdentifier(expression,binding,strictModeChanged);const{name}=expression;return void(checkClashes&&(checkClashes.has(name)?this.raise(Errors.ParamDupe,expression):checkClashes.add(name)))}"VoidPattern"===type&&"CatchClause"===ancestor.type&&this.raise(Errors.VoidPatternCatchClauseParam,expression);const validity=this.isValidLVal(type,!(hasParenthesizedAncestor||null!=(_expression$extra=expression.extra)&&_expression$extra.parenthesized)&&"AssignmentExpression"===ancestor.type,binding);if(!0===validity)return;if(!1===validity){const ParseErrorClass=64===binding?Errors.InvalidLhs:Errors.InvalidLhsBinding;return void this.raise(ParseErrorClass,expression,{ancestor})}let key,isParenthesizedExpression;"string"==typeof validity?(key=validity,isParenthesizedExpression="ParenthesizedExpression"===type):[key,isParenthesizedExpression]=validity;const nextAncestor="ArrayPattern"===type||"ObjectPattern"===type?{type}:ancestor,val=expression[key];if(Array.isArray(val))for(const child of val)child&&this.checkLVal(child,nextAncestor,binding,checkClashes,strictModeChanged,isParenthesizedExpression);else val&&this.checkLVal(val,nextAncestor,binding,checkClashes,strictModeChanged,isParenthesizedExpression)}checkIdentifier(at,bindingType,strictModeChanged=!1){this.state.strict&&(strictModeChanged?isStrictBindReservedWord(at.name,this.inModule):isStrictBindOnlyReservedWord(at.name))&&(64===bindingType?this.raise(Errors.StrictEvalArguments,at,{referenceName:at.name}):this.raise(Errors.StrictEvalArgumentsBinding,at,{bindingName:at.name})),8192&bindingType&&"let"===at.name&&this.raise(Errors.LetInLexicalBinding,at),64&bindingType||this.declareNameFromIdentifier(at,bindingType)}declareNameFromIdentifier(identifier,binding){this.scope.declareName(identifier.name,binding,identifier.loc.start)}checkToRestConversion(node,allowPattern){switch(node.type){case"ParenthesizedExpression":this.checkToRestConversion(node.expression,allowPattern);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(allowPattern)break;default:this.raise(Errors.InvalidRestAssignmentPattern,node)}}checkCommaAfterRest(close){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===close?Errors.RestTrailingComma:Errors.ElementAfterRest,this.state.startLoc),!0)}}function assert(x){if(!x)throw new Error("Assert fail")}const TSErrors=ParseErrorEnum`typescript`({AbstractMethodHasImplementation:({methodName})=>`Method '${methodName}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName})=>`Property '${propertyName}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind})=>`'declare' is not allowed in ${kind}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier})=>`Accessibility modifier already seen: '${modifier}'.`,DuplicateModifier:({modifier})=>`Duplicate modifier: '${modifier}'.`,EmptyHeritageClauseType:({token})=>`'${token}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers})=>`'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier})=>`Index signatures cannot have an accessibility modifier ('${modifier}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token})=>`'${token}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:modifier=>`'${modifier}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier})=>`'${modifier}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier})=>`'${modifier}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier})=>`'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:modifier=>`'${modifier}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers})=>`'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier})=>`Private elements cannot have an accessibility modifier ('${modifier}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName})=>`Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.`,UsingDeclarationInAmbientContext:kind=>`'${kind}' declarations are not allowed in ambient contexts.`});function tsIsAccessModifier(modifier){return"private"===modifier||"public"===modifier||"protected"===modifier}function tsIsVarianceAnnotations(modifier){return"in"===modifier||"out"===modifier}function isPossiblyLiteralEnum(expression){if("MemberExpression"!==expression.type)return!1;const{computed,property}=expression;return(!computed||"StringLiteral"===property.type||!("TemplateLiteral"!==property.type||property.expressions.length>0))&&isUncomputedMemberExpressionChain(expression.object)}function isValidAmbientConstInitializer(expression,estree){var _expression$extra;const{type}=expression;if(null!=(_expression$extra=expression.extra)&&_expression$extra.parenthesized)return!1;if(estree){if("Literal"===type){const{value}=expression;if("string"==typeof value||"boolean"==typeof value)return!0}}else if("StringLiteral"===type||"BooleanLiteral"===type)return!0;return!(!isNumber(expression,estree)&&!function(expression,estree){if("UnaryExpression"===expression.type){const{operator,argument}=expression;if("-"===operator&&isNumber(argument,estree))return!0}return!1}(expression,estree))||("TemplateLiteral"===type&&0===expression.expressions.length||!!isPossiblyLiteralEnum(expression))}function isNumber(expression,estree){return estree?"Literal"===expression.type&&("number"==typeof expression.value||"bigint"in expression):"NumericLiteral"===expression.type||"BigIntLiteral"===expression.type}function isUncomputedMemberExpressionChain(expression){return"Identifier"===expression.type||"MemberExpression"===expression.type&&!expression.computed&&isUncomputedMemberExpressionChain(expression.object)}const PlaceholderErrors=ParseErrorEnum`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});const PIPELINE_PROPOSALS=["minimal","fsharp","hack","smart"],TOPIC_TOKENS=["^^","@@","^","%","#"];const mixinPlugins={estree:superClass=>class extends superClass{parse(){const file=toESTreeLocation(super.parse());return 256&this.optionFlags&&(file.tokens=file.tokens.map(toESTreeLocation)),file}parseRegExpLiteral({pattern,flags}){let regex=null;try{regex=new RegExp(pattern,flags)}catch(_){}const node=this.estreeParseLiteral(regex);return node.regex={pattern,flags},node}parseBigIntLiteral(value){let bigInt;try{bigInt=BigInt(value)}catch(_unused){bigInt=null}const node=this.estreeParseLiteral(bigInt);return node.bigint=String(node.value||value),node}parseDecimalLiteral(value){const node=this.estreeParseLiteral(null);return node.decimal=String(node.value||value),node}estreeParseLiteral(value){return this.parseLiteral(value,"Literal")}parseStringLiteral(value){return this.estreeParseLiteral(value)}parseNumericLiteral(value){return this.estreeParseLiteral(value)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(value){return this.estreeParseLiteral(value)}estreeParseChainExpression(node,endLoc){const chain=this.startNodeAtNode(node);return chain.expression=node,this.finishNodeAt(chain,"ChainExpression",endLoc)}directiveToStmt(directive){const expression=directive.value;delete directive.value,this.castNodeTo(expression,"Literal"),expression.raw=expression.extra.raw,expression.value=expression.extra.expressionValue;const stmt=this.castNodeTo(directive,"ExpressionStatement");return stmt.expression=expression,stmt.directive=expression.extra.rawValue,delete expression.extra,stmt}fillOptionalPropertiesForTSESLint(node){}cloneEstreeStringLiteral(node){const{start,end,loc,range,raw,value}=node,cloned=Object.create(node.constructor.prototype);return cloned.type="Literal",cloned.start=start,cloned.end=end,cloned.loc=loc,cloned.range=range,cloned.raw=raw,cloned.value=value,cloned}initFunction(node,isAsync){super.initFunction(node,isAsync),node.expression=!1}checkDeclaration(node){null!=node&&this.isObjectProperty(node)?this.checkDeclaration(node.value):super.checkDeclaration(node)}getObjectOrClassMethodParams(method){return method.value.params}isValidDirective(stmt){var _stmt$expression$extr;return"ExpressionStatement"===stmt.type&&"Literal"===stmt.expression.type&&"string"==typeof stmt.expression.value&&!(null!=(_stmt$expression$extr=stmt.expression.extra)&&_stmt$expression$extr.parenthesized)}parseBlockBody(node,allowDirectives,topLevel,end,afterBlockParse){super.parseBlockBody(node,allowDirectives,topLevel,end,afterBlockParse);const directiveStatements=node.directives.map(d=>this.directiveToStmt(d));node.body=directiveStatements.concat(node.body),delete node.directives}parsePrivateName(){const node=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(node):node}convertPrivateNameToPrivateIdentifier(node){const name=super.getPrivateNameSV(node);return delete node.id,node.name=name,this.castNodeTo(node,"PrivateIdentifier")}isPrivateName(node){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===node.type:super.isPrivateName(node)}getPrivateNameSV(node){return this.getPluginOption("estree","classFeatures")?node.name:super.getPrivateNameSV(node)}parseLiteral(value,type){const node=super.parseLiteral(value,type);return node.raw=node.extra.raw,delete node.extra,node}parseFunctionBody(node,allowExpression,isMethod=!1){super.parseFunctionBody(node,allowExpression,isMethod),node.expression="BlockStatement"!==node.body.type}parseMethod(node,isGenerator,isAsync,isConstructor,allowDirectSuper,type,inClassScope=!1){let funcNode=this.startNode();funcNode.kind=node.kind,funcNode=super.parseMethod(funcNode,isGenerator,isAsync,isConstructor,allowDirectSuper,type,inClassScope),delete funcNode.kind;const{typeParameters}=node;typeParameters&&(delete node.typeParameters,funcNode.typeParameters=typeParameters,this.resetStartLocationFromNode(funcNode,typeParameters));const valueNode=this.castNodeTo(funcNode,"FunctionExpression");return node.value=valueNode,"ClassPrivateMethod"===type&&(node.computed=!1),"ObjectMethod"===type?("method"===node.kind&&(node.kind="init"),node.shorthand=!1,this.finishNode(node,"Property")):this.finishNode(node,"MethodDefinition")}nameIsConstructor(key){return"Literal"===key.type?"constructor"===key.value:super.nameIsConstructor(key)}parseClassProperty(...args){const propertyNode=super.parseClassProperty(...args);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(propertyNode,"PropertyDefinition"),propertyNode):propertyNode}parseClassPrivateProperty(...args){const propertyNode=super.parseClassPrivateProperty(...args);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(propertyNode,"PropertyDefinition"),propertyNode.computed=!1,propertyNode):propertyNode}parseClassAccessorProperty(node){const accessorPropertyNode=super.parseClassAccessorProperty(node);return this.getPluginOption("estree","classFeatures")?(accessorPropertyNode.abstract&&this.hasPlugin("typescript")?(delete accessorPropertyNode.abstract,this.castNodeTo(accessorPropertyNode,"TSAbstractAccessorProperty")):this.castNodeTo(accessorPropertyNode,"AccessorProperty"),accessorPropertyNode):accessorPropertyNode}parseObjectProperty(prop,startLoc,isPattern,refExpressionErrors){const node=super.parseObjectProperty(prop,startLoc,isPattern,refExpressionErrors);return node&&(node.kind="init",this.castNodeTo(node,"Property")),node}finishObjectProperty(node){return node.kind="init",this.finishNode(node,"Property")}isValidLVal(type,isUnparenthesizedInAssign,binding){return"Property"===type?"value":super.isValidLVal(type,isUnparenthesizedInAssign,binding)}isAssignable(node,isBinding){return null!=node&&this.isObjectProperty(node)?this.isAssignable(node.value,isBinding):super.isAssignable(node,isBinding)}toAssignable(node,isLHS=!1){if(null!=node&&this.isObjectProperty(node)){const{key,value}=node;this.isPrivateName(key)&&this.classScope.usePrivateName(this.getPrivateNameSV(key),key.loc.start),this.toAssignable(value,isLHS)}else super.toAssignable(node,isLHS)}toAssignableObjectExpressionProp(prop,isLast,isLHS){"Property"!==prop.type||"get"!==prop.kind&&"set"!==prop.kind?"Property"===prop.type&&prop.method?this.raise(Errors.PatternHasMethod,prop.key):super.toAssignableObjectExpressionProp(prop,isLast,isLHS):this.raise(Errors.PatternHasAccessor,prop.key)}finishCallExpression(unfinished,optional){const node=super.finishCallExpression(unfinished,optional);var _ref,_ref2;"Import"===node.callee.type?(this.castNodeTo(node,"ImportExpression"),node.source=node.arguments[0],node.options=null!=(_ref=node.arguments[1])?_ref:null,node.attributes=null!=(_ref2=node.arguments[1])?_ref2:null,delete node.arguments,delete node.callee):"OptionalCallExpression"===node.type?this.castNodeTo(node,"CallExpression"):node.optional=!1;return node}toReferencedArguments(node){"ImportExpression"!==node.type&&super.toReferencedArguments(node)}parseExport(unfinished,decorators){const exportStartLoc=this.state.lastTokStartLoc,node=super.parseExport(unfinished,decorators);switch(node.type){case"ExportAllDeclaration":node.exported=null;break;case"ExportNamedDeclaration":1===node.specifiers.length&&"ExportNamespaceSpecifier"===node.specifiers[0].type&&(this.castNodeTo(node,"ExportAllDeclaration"),node.exported=node.specifiers[0].exported,delete node.specifiers);case"ExportDefaultDeclaration":{var _declaration$decorato;const{declaration}=node;"ClassDeclaration"===(null==declaration?void 0:declaration.type)&&(null==(_declaration$decorato=declaration.decorators)?void 0:_declaration$decorato.length)>0&&declaration.start===node.start&&this.resetStartLocation(node,exportStartLoc)}}return node}stopParseSubscript(base,state){const node=super.stopParseSubscript(base,state);return state.optionalChainMember?this.estreeParseChainExpression(node,base.loc.end):node}parseMember(base,startLoc,state,computed,optional){const node=super.parseMember(base,startLoc,state,computed,optional);return"OptionalMemberExpression"===node.type?this.castNodeTo(node,"MemberExpression"):node.optional=!1,node}isOptionalMemberExpression(node){return"ChainExpression"===node.type?"MemberExpression"===node.expression.type:super.isOptionalMemberExpression(node)}hasPropertyAsPrivateName(node){return"ChainExpression"===node.type&&(node=node.expression),super.hasPropertyAsPrivateName(node)}isObjectProperty(node){return"Property"===node.type&&"init"===node.kind&&!node.method}isObjectMethod(node){return"Property"===node.type&&(node.method||"get"===node.kind||"set"===node.kind)}castNodeTo(node,type){const result=super.castNodeTo(node,type);return this.fillOptionalPropertiesForTSESLint(result),result}cloneIdentifier(node){const cloned=super.cloneIdentifier(node);return this.fillOptionalPropertiesForTSESLint(cloned),cloned}cloneStringLiteral(node){return"Literal"===node.type?this.cloneEstreeStringLiteral(node):super.cloneStringLiteral(node)}finishNodeAt(node,type,endLoc){return toESTreeLocation(super.finishNodeAt(node,type,endLoc))}finishNode(node,type){const result=super.finishNode(node,type);return this.fillOptionalPropertiesForTSESLint(result),result}resetStartLocation(node,startLoc){super.resetStartLocation(node,startLoc),toESTreeLocation(node)}resetEndLocation(node,endLoc=this.state.lastTokEndLoc){super.resetEndLocation(node,endLoc),toESTreeLocation(node)}},jsx:superClass=>class extends superClass{jsxReadToken(){let out="",chunkStart=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(JsxErrors.UnterminatedJsxContent,this.state.startLoc);const ch=this.input.charCodeAt(this.state.pos);switch(ch){case 60:case 123:return this.state.pos===this.state.start?void(60===ch&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(ch)):(out+=this.input.slice(chunkStart,this.state.pos),void this.finishToken(142,out));case 38:out+=this.input.slice(chunkStart,this.state.pos),out+=this.jsxReadEntity(),chunkStart=this.state.pos;break;default:isNewLine(ch)?(out+=this.input.slice(chunkStart,this.state.pos),out+=this.jsxReadNewLine(!0),chunkStart=this.state.pos):++this.state.pos}}}jsxReadNewLine(normalizeCRLF){const ch=this.input.charCodeAt(this.state.pos);let out;return++this.state.pos,13===ch&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,out=normalizeCRLF?"\n":"\r\n"):out=String.fromCharCode(ch),++this.state.curLine,this.state.lineStart=this.state.pos,out}jsxReadString(quote){let out="",chunkStart=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Errors.UnterminatedString,this.state.startLoc);const ch=this.input.charCodeAt(this.state.pos);if(ch===quote)break;38===ch?(out+=this.input.slice(chunkStart,this.state.pos),out+=this.jsxReadEntity(),chunkStart=this.state.pos):isNewLine(ch)?(out+=this.input.slice(chunkStart,this.state.pos),out+=this.jsxReadNewLine(!1),chunkStart=this.state.pos):++this.state.pos}out+=this.input.slice(chunkStart,this.state.pos++),this.finishToken(134,out)}jsxReadEntity(){const startPos=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let radix=10;120===this.codePointAtPos(this.state.pos)&&(radix=16,++this.state.pos);const codePoint=this.readInt(radix,void 0,!1,"bail");if(null!==codePoint&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(codePoint)}else{let count=0,semi=!1;for(;count++<10&&this.state.posclass extends superClass{constructor(...args){super(...args),this.flowPragma=void 0}getScopeHandler(){return FlowScopeHandler}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(type,val){134!==type&&13!==type&&28!==type&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(type,val)}addComment(comment){if(void 0===this.flowPragma){const matches=FLOW_PRAGMA_REGEX.exec(comment.value);if(matches)if("flow"===matches[1])this.flowPragma="flow";else{if("noflow"!==matches[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}else;}super.addComment(comment)}flowParseTypeInitialiser(tok){const oldInType=this.state.inType;this.state.inType=!0,this.expect(tok||14);const type=this.flowParseType();return this.state.inType=oldInType,type}flowParsePredicate(){const node=this.startNode(),moduloLoc=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>moduloLoc.index+1&&this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks,moduloLoc),this.eat(10)?(node.value=super.parseExpression(),this.expect(11),this.finishNode(node,"DeclaredPredicate")):this.finishNode(node,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const oldInType=this.state.inType;this.state.inType=!0,this.expect(14);let type=null,predicate=null;return this.match(54)?(this.state.inType=oldInType,predicate=this.flowParsePredicate()):(type=this.flowParseType(),this.state.inType=oldInType,this.match(54)&&(predicate=this.flowParsePredicate())),[type,predicate]}flowParseDeclareClass(node){return this.next(),this.flowParseInterfaceish(node,!0),this.finishNode(node,"DeclareClass")}flowParseDeclareFunction(node){this.next();const id=node.id=this.parseIdentifier(),typeNode=this.startNode(),typeContainer=this.startNode();this.match(47)?typeNode.typeParameters=this.flowParseTypeParameterDeclaration():typeNode.typeParameters=null,this.expect(10);const tmp=this.flowParseFunctionTypeParams();return typeNode.params=tmp.params,typeNode.rest=tmp.rest,typeNode.this=tmp._this,this.expect(11),[typeNode.returnType,node.predicate]=this.flowParseTypeAndPredicateInitialiser(),typeContainer.typeAnnotation=this.finishNode(typeNode,"FunctionTypeAnnotation"),id.typeAnnotation=this.finishNode(typeContainer,"TypeAnnotation"),this.resetEndLocation(id),this.semicolon(),this.scope.declareName(node.id.name,2048,node.id.loc.start),this.finishNode(node,"DeclareFunction")}flowParseDeclare(node,insideModule){return this.match(80)?this.flowParseDeclareClass(node):this.match(68)?this.flowParseDeclareFunction(node):this.match(74)?this.flowParseDeclareVariable(node):this.eatContextual(127)?this.match(16)?this.flowParseDeclareModuleExports(node):(insideModule&&this.raise(FlowErrors.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(node)):this.isContextual(130)?this.flowParseDeclareTypeAlias(node):this.isContextual(131)?this.flowParseDeclareOpaqueType(node):this.isContextual(129)?this.flowParseDeclareInterface(node):this.match(82)?this.flowParseDeclareExportDeclaration(node,insideModule):void this.unexpected()}flowParseDeclareVariable(node){return this.next(),node.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(node.id.name,5,node.id.loc.start),this.semicolon(),this.finishNode(node,"DeclareVariable")}flowParseDeclareModule(node){this.scope.enter(0),this.match(134)?node.id=super.parseExprAtom():node.id=this.parseIdentifier();const bodyNode=node.body=this.startNode(),body=bodyNode.body=[];for(this.expect(5);!this.match(8);){let bodyNode=this.startNode();this.match(83)?(this.next(),this.isContextual(130)||this.match(87)||this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(bodyNode)):(this.expectContextual(125,FlowErrors.UnsupportedStatementInDeclareModule),bodyNode=this.flowParseDeclare(bodyNode,!0)),body.push(bodyNode)}this.scope.exit(),this.expect(8),this.finishNode(bodyNode,"BlockStatement");let kind=null,hasModuleExport=!1;return body.forEach(bodyElement=>{!function(bodyElement){return"DeclareExportAllDeclaration"===bodyElement.type||"DeclareExportDeclaration"===bodyElement.type&&(!bodyElement.declaration||"TypeAlias"!==bodyElement.declaration.type&&"InterfaceDeclaration"!==bodyElement.declaration.type)}(bodyElement)?"DeclareModuleExports"===bodyElement.type&&(hasModuleExport&&this.raise(FlowErrors.DuplicateDeclareModuleExports,bodyElement),"ES"===kind&&this.raise(FlowErrors.AmbiguousDeclareModuleKind,bodyElement),kind="CommonJS",hasModuleExport=!0):("CommonJS"===kind&&this.raise(FlowErrors.AmbiguousDeclareModuleKind,bodyElement),kind="ES")}),node.kind=kind||"CommonJS",this.finishNode(node,"DeclareModule")}flowParseDeclareExportDeclaration(node,insideModule){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?node.declaration=this.flowParseDeclare(this.startNode()):(node.declaration=this.flowParseType(),this.semicolon()),node.default=!0,this.finishNode(node,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!insideModule){const label=this.state.value;throw this.raise(FlowErrors.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:label,suggestion:exportSuggestions[label]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(131)?(node.declaration=this.flowParseDeclare(this.startNode()),node.default=!1,this.finishNode(node,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131)?"ExportNamedDeclaration"===(node=this.parseExport(node,null)).type?(node.default=!1,delete node.exportKind,this.castNodeTo(node,"DeclareExportDeclaration")):this.castNodeTo(node,"DeclareExportAllDeclaration"):void this.unexpected()}flowParseDeclareModuleExports(node){return this.next(),this.expectContextual(111),node.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(node,"DeclareModuleExports")}flowParseDeclareTypeAlias(node){this.next();const finished=this.flowParseTypeAlias(node);return this.castNodeTo(finished,"DeclareTypeAlias"),finished}flowParseDeclareOpaqueType(node){this.next();const finished=this.flowParseOpaqueType(node,!0);return this.castNodeTo(finished,"DeclareOpaqueType"),finished}flowParseDeclareInterface(node){return this.next(),this.flowParseInterfaceish(node,!1),this.finishNode(node,"DeclareInterface")}flowParseInterfaceish(node,isClass){if(node.id=this.flowParseRestrictedIdentifier(!isClass,!0),this.scope.declareName(node.id.name,isClass?17:8201,node.id.loc.start),this.match(47)?node.typeParameters=this.flowParseTypeParameterDeclaration():node.typeParameters=null,node.extends=[],this.eat(81))do{node.extends.push(this.flowParseInterfaceExtends())}while(!isClass&&this.eat(12));if(isClass){if(node.implements=[],node.mixins=[],this.eatContextual(117))do{node.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(113))do{node.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}node.body=this.flowParseObjectType({allowStatic:isClass,allowExact:!1,allowSpread:!1,allowProto:isClass,allowInexact:!1})}flowParseInterfaceExtends(){const node=this.startNode();return node.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?node.typeParameters=this.flowParseTypeParameterInstantiation():node.typeParameters=null,this.finishNode(node,"InterfaceExtends")}flowParseInterface(node){return this.flowParseInterfaceish(node,!1),this.finishNode(node,"InterfaceDeclaration")}checkNotUnderscore(word){"_"===word&&this.raise(FlowErrors.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(word,startLoc,declaration){reservedTypes.has(word)&&this.raise(declaration?FlowErrors.AssignReservedType:FlowErrors.UnexpectedReservedType,startLoc,{reservedType:word})}flowParseRestrictedIdentifier(liberal,declaration){return this.checkReservedType(this.state.value,this.state.startLoc,declaration),this.parseIdentifier(liberal)}flowParseTypeAlias(node){return node.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(node.id.name,8201,node.id.loc.start),this.match(47)?node.typeParameters=this.flowParseTypeParameterDeclaration():node.typeParameters=null,node.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(node,"TypeAlias")}flowParseOpaqueType(node,declare){return this.expectContextual(130),node.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(node.id.name,8201,node.id.loc.start),this.match(47)?node.typeParameters=this.flowParseTypeParameterDeclaration():node.typeParameters=null,node.supertype=null,this.match(14)&&(node.supertype=this.flowParseTypeInitialiser(14)),node.impltype=null,declare||(node.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(node,"OpaqueType")}flowParseTypeParameter(requireDefault=!1){const nodeStartLoc=this.state.startLoc,node=this.startNode(),variance=this.flowParseVariance(),ident=this.flowParseTypeAnnotatableIdentifier();return node.name=ident.name,node.variance=variance,node.bound=ident.typeAnnotation,this.match(29)?(this.eat(29),node.default=this.flowParseType()):requireDefault&&this.raise(FlowErrors.MissingTypeParamDefault,nodeStartLoc),this.finishNode(node,"TypeParameter")}flowParseTypeParameterDeclaration(){const oldInType=this.state.inType,node=this.startNode();node.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let defaultRequired=!1;do{const typeParameter=this.flowParseTypeParameter(defaultRequired);node.params.push(typeParameter),typeParameter.default&&(defaultRequired=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=oldInType,this.finishNode(node,"TypeParameterDeclaration")}flowInTopLevelContext(cb){if(this.curContext()===types.brace)return cb();{const oldContext=this.state.context;this.state.context=[oldContext[0]];try{return cb()}finally{this.state.context=oldContext}}}flowParseTypeParameterInstantiationInExpression(){if(47===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const node=this.startNode(),oldInType=this.state.inType;return this.state.inType=!0,node.params=[],this.flowInTopLevelContext(()=>{this.expect(47);const oldNoAnonFunctionType=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)node.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=oldNoAnonFunctionType}),this.state.inType=oldInType,this.state.inType||this.curContext()!==types.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(node,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(47!==this.reScan_lt())return;const node=this.startNode(),oldInType=this.state.inType;for(node.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)node.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=oldInType,this.finishNode(node,"TypeParameterInstantiation")}flowParseInterfaceType(){const node=this.startNode();if(this.expectContextual(129),node.extends=[],this.eat(81))do{node.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return node.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(node,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(node,isStatic,variance){return node.static=isStatic,14===this.lookahead().type?(node.id=this.flowParseObjectPropertyKey(),node.key=this.flowParseTypeInitialiser()):(node.id=null,node.key=this.flowParseType()),this.expect(3),node.value=this.flowParseTypeInitialiser(),node.variance=variance,this.finishNode(node,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(node,isStatic){return node.static=isStatic,node.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(node.method=!0,node.optional=!1,node.value=this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start))):(node.method=!1,this.eat(17)&&(node.optional=!0),node.value=this.flowParseTypeInitialiser()),this.finishNode(node,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(node){for(node.params=[],node.rest=null,node.typeParameters=null,node.this=null,this.match(47)&&(node.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(node.this=this.flowParseFunctionTypeParam(!0),node.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)node.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(node.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),node.returnType=this.flowParseTypeInitialiser(),this.finishNode(node,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(node,isStatic){const valueNode=this.startNode();return node.static=isStatic,node.value=this.flowParseObjectTypeMethodish(valueNode),this.finishNode(node,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic,allowExact,allowSpread,allowProto,allowInexact}){const oldInType=this.state.inType;this.state.inType=!0;const nodeStart=this.startNode();let endDelim,exact;nodeStart.callProperties=[],nodeStart.properties=[],nodeStart.indexers=[],nodeStart.internalSlots=[];let inexact=!1;for(allowExact&&this.match(6)?(this.expect(6),endDelim=9,exact=!0):(this.expect(5),endDelim=8,exact=!1),nodeStart.exact=exact;!this.match(endDelim);){let isStatic=!1,protoStartLoc=null,inexactStartLoc=null;const node=this.startNode();if(allowProto&&this.isContextual(118)){const lookahead=this.lookahead();14!==lookahead.type&&17!==lookahead.type&&(this.next(),protoStartLoc=this.state.startLoc,allowStatic=!1)}if(allowStatic&&this.isContextual(106)){const lookahead=this.lookahead();14!==lookahead.type&&17!==lookahead.type&&(this.next(),isStatic=!0)}const variance=this.flowParseVariance();if(this.eat(0))null!=protoStartLoc&&this.unexpected(protoStartLoc),this.eat(0)?(variance&&this.unexpected(variance.loc.start),nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node,isStatic))):nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node,isStatic,variance));else if(this.match(10)||this.match(47))null!=protoStartLoc&&this.unexpected(protoStartLoc),variance&&this.unexpected(variance.loc.start),nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node,isStatic));else{let kind="init";if(this.isContextual(99)||this.isContextual(104)){tokenIsLiteralPropertyName(this.lookahead().type)&&(kind=this.state.value,this.next())}const propOrInexact=this.flowParseObjectTypeProperty(node,isStatic,protoStartLoc,variance,kind,allowSpread,null!=allowInexact?allowInexact:!exact);null===propOrInexact?(inexact=!0,inexactStartLoc=this.state.lastTokStartLoc):nodeStart.properties.push(propOrInexact)}this.flowObjectTypeSemicolon(),!inexactStartLoc||this.match(8)||this.match(9)||this.raise(FlowErrors.UnexpectedExplicitInexactInObject,inexactStartLoc)}this.expect(endDelim),allowSpread&&(nodeStart.inexact=inexact);const out=this.finishNode(nodeStart,"ObjectTypeAnnotation");return this.state.inType=oldInType,out}flowParseObjectTypeProperty(node,isStatic,protoStartLoc,variance,kind,allowSpread,allowInexact){if(this.eat(21)){return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(allowSpread?allowInexact||this.raise(FlowErrors.InexactInsideExact,this.state.lastTokStartLoc):this.raise(FlowErrors.InexactInsideNonObject,this.state.lastTokStartLoc),variance&&this.raise(FlowErrors.InexactVariance,variance),null):(allowSpread||this.raise(FlowErrors.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=protoStartLoc&&this.unexpected(protoStartLoc),variance&&this.raise(FlowErrors.SpreadVariance,variance),node.argument=this.flowParseType(),this.finishNode(node,"ObjectTypeSpreadProperty"))}{node.key=this.flowParseObjectPropertyKey(),node.static=isStatic,node.proto=null!=protoStartLoc,node.kind=kind;let optional=!1;return this.match(47)||this.match(10)?(node.method=!0,null!=protoStartLoc&&this.unexpected(protoStartLoc),variance&&this.unexpected(variance.loc.start),node.value=this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)),"get"!==kind&&"set"!==kind||this.flowCheckGetterSetterParams(node),!allowSpread&&"constructor"===node.key.name&&node.value.this&&this.raise(FlowErrors.ThisParamBannedInConstructor,node.value.this)):("init"!==kind&&this.unexpected(),node.method=!1,this.eat(17)&&(optional=!0),node.value=this.flowParseTypeInitialiser(),node.variance=variance),node.optional=optional,this.finishNode(node,"ObjectTypeProperty")}}flowCheckGetterSetterParams(property){const paramCount="get"===property.kind?0:1,length=property.value.params.length+(property.value.rest?1:0);property.value.this&&this.raise("get"===property.kind?FlowErrors.GetterMayNotHaveThisParam:FlowErrors.SetterMayNotHaveThisParam,property.value.this),length!==paramCount&&this.raise("get"===property.kind?Errors.BadGetterArity:Errors.BadSetterArity,property),"set"===property.kind&&property.value.rest&&this.raise(Errors.BadSetterRestParameter,property)}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(startLoc,id){null!=startLoc||(startLoc=this.state.startLoc);let node=id||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const node2=this.startNodeAt(startLoc);node2.qualification=node,node2.id=this.flowParseRestrictedIdentifier(!0),node=this.finishNode(node2,"QualifiedTypeIdentifier")}return node}flowParseGenericType(startLoc,id){const node=this.startNodeAt(startLoc);return node.typeParameters=null,node.id=this.flowParseQualifiedTypeIdentifier(startLoc,id),this.match(47)&&(node.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(node,"GenericTypeAnnotation")}flowParseTypeofType(){const node=this.startNode();return this.expect(87),node.argument=this.flowParsePrimaryType(),this.finishNode(node,"TypeofTypeAnnotation")}flowParseTupleType(){const node=this.startNode();for(node.types=[],this.expect(0);this.state.possuper.parseFunctionBody(node,!0,isMethod)):super.parseFunctionBody(node,!1,isMethod)}parseFunctionBodyAndFinish(node,type,isMethod=!1){if(this.match(14)){const typeNode=this.startNode();[typeNode.typeAnnotation,node.predicate]=this.flowParseTypeAndPredicateInitialiser(),node.returnType=typeNode.typeAnnotation?this.finishNode(typeNode,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(node,type,isMethod)}parseStatementLike(flags){if(this.state.strict&&this.isContextual(129)){if(tokenIsKeywordOrIdentifier(this.lookahead().type)){const node=this.startNode();return this.next(),this.flowParseInterface(node)}}else if(this.isContextual(126)){const node=this.startNode();return this.next(),this.flowParseEnumDeclaration(node)}const stmt=super.parseStatementLike(flags);return void 0!==this.flowPragma||this.isValidDirective(stmt)||(this.flowPragma=null),stmt}parseExpressionStatement(node,expr,decorators){if("Identifier"===expr.type)if("declare"===expr.name){if(this.match(80)||tokenIsIdentifier(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(node)}else if(tokenIsIdentifier(this.state.type)){if("interface"===expr.name)return this.flowParseInterface(node);if("type"===expr.name)return this.flowParseTypeAlias(node);if("opaque"===expr.name)return this.flowParseOpaqueType(node,!1)}return super.parseExpressionStatement(node,expr,decorators)}shouldParseExportDeclaration(){const{type}=this.state;return 126===type||tokenIsFlowInterfaceOrTypeOrOpaque(type)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type}=this.state;return 126===type||tokenIsFlowInterfaceOrTypeOrOpaque(type)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const node=this.startNode();return this.next(),this.flowParseEnumDeclaration(node)}return super.parseExportDefaultExpression()}parseConditional(expr,startLoc,refExpressionErrors){if(!this.match(17))return expr;if(this.state.maybeInArrowParameters){const nextCh=this.lookaheadCharCode();if(44===nextCh||61===nextCh||58===nextCh||41===nextCh)return this.setOptionalParametersError(refExpressionErrors),expr}this.expect(17);const state=this.state.clone(),originalNoArrowAt=this.state.noArrowAt,node=this.startNodeAt(startLoc);let{consequent,failed}=this.tryParseConditionalConsequent(),[valid,invalid]=this.getArrowLikeExpressions(consequent);if(failed||invalid.length>0){const noArrowAt=[...originalNoArrowAt];if(invalid.length>0){this.state=state,this.state.noArrowAt=noArrowAt;for(let i=0;i1&&this.raise(FlowErrors.AmbiguousConditionalArrow,state.startLoc),failed&&1===valid.length&&(this.state=state,noArrowAt.push(valid[0].start),this.state.noArrowAt=noArrowAt,({consequent,failed}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(consequent,!0),this.state.noArrowAt=originalNoArrowAt,this.expect(14),node.test=expr,node.consequent=consequent,node.alternate=this.forwardNoArrowParamsConversionAt(node,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(node,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const consequent=this.parseMaybeAssignAllowIn(),failed=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent,failed}}getArrowLikeExpressions(node,disallowInvalid){const stack=[node],arrows=[];for(;0!==stack.length;){const node=stack.pop();"ArrowFunctionExpression"===node.type&&"BlockStatement"!==node.body.type?(node.typeParameters||!node.returnType?this.finishArrowValidation(node):arrows.push(node),stack.push(node.body)):"ConditionalExpression"===node.type&&(stack.push(node.consequent),stack.push(node.alternate))}return disallowInvalid?(arrows.forEach(node=>this.finishArrowValidation(node)),[arrows,[]]):function(list,test){const list1=[],list2=[];for(let i=0;inode.params.every(param=>this.isAssignable(param,!0)))}finishArrowValidation(node){var _node$extra;this.toAssignableList(node.params,null==(_node$extra=node.extra)?void 0:_node$extra.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(node,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(node,parse){let result;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),result=parse(),this.state.noArrowParamsConversionAt.pop()):result=parse(),result}parseParenItem(node,startLoc){const newNode=super.parseParenItem(node,startLoc);if(this.eat(17)&&(newNode.optional=!0,this.resetEndLocation(node)),this.match(14)){const typeCastNode=this.startNodeAt(startLoc);return typeCastNode.expression=newNode,typeCastNode.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(typeCastNode,"TypeCastExpression")}return newNode}assertModuleNodeAllowed(node){"ImportDeclaration"===node.type&&("type"===node.importKind||"typeof"===node.importKind)||"ExportNamedDeclaration"===node.type&&"type"===node.exportKind||"ExportAllDeclaration"===node.type&&"type"===node.exportKind||super.assertModuleNodeAllowed(node)}parseExportDeclaration(node){if(this.isContextual(130)){node.exportKind="type";const declarationNode=this.startNode();return this.next(),this.match(5)?(node.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(node),null):this.flowParseTypeAlias(declarationNode)}if(this.isContextual(131)){node.exportKind="type";const declarationNode=this.startNode();return this.next(),this.flowParseOpaqueType(declarationNode,!1)}if(this.isContextual(129)){node.exportKind="type";const declarationNode=this.startNode();return this.next(),this.flowParseInterface(declarationNode)}if(this.isContextual(126)){node.exportKind="value";const declarationNode=this.startNode();return this.next(),this.flowParseEnumDeclaration(declarationNode)}return super.parseExportDeclaration(node)}eatExportStar(node){return!!super.eatExportStar(node)||!(!this.isContextual(130)||55!==this.lookahead().type)&&(node.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(node){const{startLoc}=this.state,hasNamespace=super.maybeParseExportNamespaceSpecifier(node);return hasNamespace&&"type"===node.exportKind&&this.unexpected(startLoc),hasNamespace}parseClassId(node,isStatement,optionalId){super.parseClassId(node,isStatement,optionalId),this.match(47)&&(node.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(classBody,member,state){const{startLoc}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(classBody,member))return;member.declare=!0}super.parseClassMember(classBody,member,state),member.declare&&("ClassProperty"!==member.type&&"ClassPrivateProperty"!==member.type&&"PropertyDefinition"!==member.type?this.raise(FlowErrors.DeclareClassElement,startLoc):member.value&&this.raise(FlowErrors.DeclareClassFieldInitializer,member.value))}isIterator(word){return"iterator"===word||"asyncIterator"===word}readIterator(){const word=super.readWord1(),fullWord="@@"+word;this.isIterator(word)&&this.state.inType||this.raise(Errors.InvalidIdentifier,this.state.curPosition(),{identifierName:fullWord}),this.finishToken(132,fullWord)}getTokenFromCode(code){const next=this.input.charCodeAt(this.state.pos+1);123===code&&124===next?this.finishOp(6,2):!this.state.inType||62!==code&&60!==code?this.state.inType&&63===code?46===next?this.finishOp(18,2):this.finishOp(17,1):!function(current,next,next2){return 64===current&&64===next&&isIdentifierStart(next2)}(code,next,this.input.charCodeAt(this.state.pos+2))?super.getTokenFromCode(code):(this.state.pos+=2,this.readIterator()):this.finishOp(62===code?48:47,1)}isAssignable(node,isBinding){return"TypeCastExpression"===node.type?this.isAssignable(node.expression,isBinding):super.isAssignable(node,isBinding)}toAssignable(node,isLHS=!1){isLHS||"AssignmentExpression"!==node.type||"TypeCastExpression"!==node.left.type||(node.left=this.typeCastToParameter(node.left)),super.toAssignable(node,isLHS)}toAssignableList(exprList,trailingCommaLoc,isLHS){for(let i=0;i1)&&isParenthesizedExpr||this.raise(FlowErrors.TypeCastInPattern,expr.typeAnnotation)}return exprList}parseArrayLike(close,canBePattern,isTuple,refExpressionErrors){const node=super.parseArrayLike(close,canBePattern,isTuple,refExpressionErrors);return canBePattern&&!this.state.maybeInArrowParameters&&this.toReferencedList(node.elements),node}isValidLVal(type,isParenthesized,binding){return"TypeCastExpression"===type||super.isValidLVal(type,isParenthesized,binding)}parseClassProperty(node){return this.match(14)&&(node.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(node)}parseClassPrivateProperty(node){return this.match(14)&&(node.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(node)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(method){return!this.match(14)&&super.isNonstaticConstructor(method)}pushClassMethod(classBody,method,isGenerator,isAsync,isConstructor,allowsDirectSuper){if(method.variance&&this.unexpected(method.variance.loc.start),delete method.variance,this.match(47)&&(method.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(classBody,method,isGenerator,isAsync,isConstructor,allowsDirectSuper),method.params&&isConstructor){const params=method.params;params.length>0&&this.isThisParam(params[0])&&this.raise(FlowErrors.ThisParamBannedInConstructor,method)}else if("MethodDefinition"===method.type&&isConstructor&&method.value.params){const params=method.value.params;params.length>0&&this.isThisParam(params[0])&&this.raise(FlowErrors.ThisParamBannedInConstructor,method)}}pushClassPrivateMethod(classBody,method,isGenerator,isAsync){method.variance&&this.unexpected(method.variance.loc.start),delete method.variance,this.match(47)&&(method.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(classBody,method,isGenerator,isAsync)}parseClassSuper(node){if(super.parseClassSuper(node),node.superClass&&(this.match(47)||this.match(51))&&(node.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const implemented=node.implements=[];do{const node=this.startNode();node.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?node.typeParameters=this.flowParseTypeParameterInstantiation():node.typeParameters=null,implemented.push(this.finishNode(node,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(method){super.checkGetterSetterParams(method);const params=this.getObjectOrClassMethodParams(method);if(params.length>0){const param=params[0];this.isThisParam(param)&&"get"===method.kind?this.raise(FlowErrors.GetterMayNotHaveThisParam,param):this.isThisParam(param)&&this.raise(FlowErrors.SetterMayNotHaveThisParam,param)}}parsePropertyNamePrefixOperator(node){node.variance=this.flowParseVariance()}parseObjPropValue(prop,startLoc,isGenerator,isAsync,isPattern,isAccessor,refExpressionErrors){let typeParameters;prop.variance&&this.unexpected(prop.variance.loc.start),delete prop.variance,this.match(47)&&!isAccessor&&(typeParameters=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const result=super.parseObjPropValue(prop,startLoc,isGenerator,isAsync,isPattern,isAccessor,refExpressionErrors);return typeParameters&&((result.value||result).typeParameters=typeParameters),result}parseFunctionParamType(param){return this.eat(17)&&("Identifier"!==param.type&&this.raise(FlowErrors.PatternIsOptional,param),this.isThisParam(param)&&this.raise(FlowErrors.ThisParamMayNotBeOptional,param),param.optional=!0),this.match(14)?param.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(param)&&this.raise(FlowErrors.ThisParamAnnotationRequired,param),this.match(29)&&this.isThisParam(param)&&this.raise(FlowErrors.ThisParamNoDefault,param),this.resetEndLocation(param),param}parseMaybeDefault(startLoc,left){const node=super.parseMaybeDefault(startLoc,left);return"AssignmentPattern"===node.type&&node.typeAnnotation&&node.right.startsuper.parseMaybeAssign(refExpressionErrors,afterLeftParse),state),!jsx.error)return jsx.node;const{context}=this.state,currentContext=context[context.length-1];currentContext!==types.j_oTag&¤tContext!==types.j_expr||context.pop()}if(null!=(_jsx=jsx)&&_jsx.error||this.match(47)){var _jsx2,_jsx3;let typeParameters;state=state||this.state.clone();const arrow=this.tryParse(abort=>{var _arrowExpression$extr;typeParameters=this.flowParseTypeParameterDeclaration();const arrowExpression=this.forwardNoArrowParamsConversionAt(typeParameters,()=>{const result=super.parseMaybeAssign(refExpressionErrors,afterLeftParse);return this.resetStartLocationFromNode(result,typeParameters),result});null!=(_arrowExpression$extr=arrowExpression.extra)&&_arrowExpression$extr.parenthesized&&abort();const expr=this.maybeUnwrapTypeCastExpression(arrowExpression);return"ArrowFunctionExpression"!==expr.type&&abort(),expr.typeParameters=typeParameters,this.resetStartLocationFromNode(expr,typeParameters),arrowExpression},state);let arrowExpression=null;if(arrow.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(arrow.node).type){if(!arrow.error&&!arrow.aborted)return arrow.node.async&&this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction,typeParameters),arrow.node;arrowExpression=arrow.node}if(null!=(_jsx2=jsx)&&_jsx2.node)return this.state=jsx.failState,jsx.node;if(arrowExpression)return this.state=arrow.failState,arrowExpression;if(null!=(_jsx3=jsx)&&_jsx3.thrown)throw jsx.error;if(arrow.thrown)throw arrow.error;throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter,typeParameters)}return super.parseMaybeAssign(refExpressionErrors,afterLeftParse)}parseArrow(node){if(this.match(14)){const result=this.tryParse(()=>{const oldNoAnonFunctionType=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const typeNode=this.startNode();return[typeNode.typeAnnotation,node.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=oldNoAnonFunctionType,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),typeNode});if(result.thrown)return null;result.error&&(this.state=result.failState),node.returnType=result.node.typeAnnotation?this.finishNode(result.node,"TypeAnnotation"):null}return super.parseArrow(node)}shouldParseArrow(params){return this.match(14)||super.shouldParseArrow(params)}setArrowFunctionParameters(node,params){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))?node.params=params:super.setArrowFunctionParameters(node,params)}checkParams(node,allowDuplicates,isArrowFunction,strictModeChanged=!0){if(!isArrowFunction||!this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(node.start))){for(let i=0;i0&&this.raise(FlowErrors.ThisParamMustBeFirst,node.params[i]);super.checkParams(node,allowDuplicates,isArrowFunction,strictModeChanged)}}parseParenAndDistinguishExpression(canBeArrow){return super.parseParenAndDistinguishExpression(canBeArrow&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(base,startLoc,noCalls){if("Identifier"===base.type&&"async"===base.name&&this.state.noArrowAt.includes(startLoc.index)){this.next();const node=this.startNodeAt(startLoc);node.callee=base,node.arguments=super.parseCallExpressionArguments(),base=this.finishNode(node,"CallExpression")}else if("Identifier"===base.type&&"async"===base.name&&this.match(47)){const state=this.state.clone(),arrow=this.tryParse(abort=>this.parseAsyncArrowWithTypeParameters(startLoc)||abort(),state);if(!arrow.error&&!arrow.aborted)return arrow.node;const result=this.tryParse(()=>super.parseSubscripts(base,startLoc,noCalls),state);if(result.node&&!result.error)return result.node;if(arrow.node)return this.state=arrow.failState,arrow.node;if(result.node)return this.state=result.failState,result.node;throw arrow.error||result.error}return super.parseSubscripts(base,startLoc,noCalls)}parseSubscript(base,startLoc,noCalls,subscriptState){if(this.match(18)&&this.isLookaheadToken_lt()){if(subscriptState.optionalChainMember=!0,noCalls)return subscriptState.stop=!0,base;this.next();const node=this.startNodeAt(startLoc);return node.callee=base,node.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),node.arguments=this.parseCallExpressionArguments(),node.optional=!0,this.finishCallExpression(node,!0)}if(!noCalls&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const node=this.startNodeAt(startLoc);node.callee=base;const result=this.tryParse(()=>(node.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),node.arguments=super.parseCallExpressionArguments(),subscriptState.optionalChainMember&&(node.optional=!1),this.finishCallExpression(node,subscriptState.optionalChainMember)));if(result.node)return result.error&&(this.state=result.failState),result.node}return super.parseSubscript(base,startLoc,noCalls,subscriptState)}parseNewCallee(node){super.parseNewCallee(node);let targs=null;this.shouldParseTypes()&&this.match(47)&&(targs=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),node.typeArguments=targs}parseAsyncArrowWithTypeParameters(startLoc){const node=this.startNodeAt(startLoc);if(this.parseFunctionParams(node,!1),this.parseArrow(node))return super.parseArrowExpression(node,void 0,!0)}readToken_mult_modulo(code){const next=this.input.charCodeAt(this.state.pos+1);if(42===code&&47===next&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(code)}readToken_pipe_amp(code){const next=this.input.charCodeAt(this.state.pos+1);124!==code||125!==next?super.readToken_pipe_amp(code):this.finishOp(9,2)}parseTopLevel(file,program){const fileNode=super.parseTopLevel(file,program);return this.state.hasFlowComment&&this.raise(FlowErrors.UnterminatedFlowComment,this.state.curPosition()),fileNode}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(FlowErrors.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const commentSkip=this.skipFlowComment();return void(commentSkip&&(this.state.pos+=commentSkip,this.state.hasFlowComment=!0))}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){const{pos}=this.state;let shiftToFirstNonWhiteSpace=2;for(;[32,9].includes(this.input.charCodeAt(pos+shiftToFirstNonWhiteSpace));)shiftToFirstNonWhiteSpace++;const ch2=this.input.charCodeAt(shiftToFirstNonWhiteSpace+pos),ch3=this.input.charCodeAt(shiftToFirstNonWhiteSpace+pos+1);return 58===ch2&&58===ch3?shiftToFirstNonWhiteSpace+2:"flow-include"===this.input.slice(shiftToFirstNonWhiteSpace+pos,shiftToFirstNonWhiteSpace+pos+12)?shiftToFirstNonWhiteSpace+12:58===ch2&&58!==ch3&&shiftToFirstNonWhiteSpace}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(Errors.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(loc,{enumName,memberName}){this.raise(FlowErrors.EnumBooleanMemberNotInitialized,loc,{memberName,enumName})}flowEnumErrorInvalidMemberInitializer(loc,enumContext){return this.raise(enumContext.explicitType?"symbol"===enumContext.explicitType?FlowErrors.EnumInvalidMemberInitializerSymbolType:FlowErrors.EnumInvalidMemberInitializerPrimaryType:FlowErrors.EnumInvalidMemberInitializerUnknownType,loc,enumContext)}flowEnumErrorNumberMemberNotInitialized(loc,details){this.raise(FlowErrors.EnumNumberMemberNotInitialized,loc,details)}flowEnumErrorStringMemberInconsistentlyInitialized(node,details){this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized,node,details)}flowEnumMemberInit(){const startLoc=this.state.startLoc,endOfInit=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const literal=this.parseNumericLiteral(this.state.value);return endOfInit()?{type:"number",loc:literal.loc.start,value:literal}:{type:"invalid",loc:startLoc}}case 134:{const literal=this.parseStringLiteral(this.state.value);return endOfInit()?{type:"string",loc:literal.loc.start,value:literal}:{type:"invalid",loc:startLoc}}case 85:case 86:{const literal=this.parseBooleanLiteral(this.match(85));return endOfInit()?{type:"boolean",loc:literal.loc.start,value:literal}:{type:"invalid",loc:startLoc}}default:return{type:"invalid",loc:startLoc}}}flowEnumMemberRaw(){const loc=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc}}}flowEnumCheckExplicitTypeMismatch(loc,context,expectedType){const{explicitType}=context;null!==explicitType&&explicitType!==expectedType&&this.flowEnumErrorInvalidMemberInitializer(loc,context)}flowEnumMembers({enumName,explicitType}){const seenNames=new Set,members={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let hasUnknownMembers=!1;for(;!this.match(8);){if(this.eat(21)){hasUnknownMembers=!0;break}const memberNode=this.startNode(),{id,init}=this.flowEnumMemberRaw(),memberName=id.name;if(""===memberName)continue;/^[a-z]/.test(memberName)&&this.raise(FlowErrors.EnumInvalidMemberName,id,{memberName,suggestion:memberName[0].toUpperCase()+memberName.slice(1),enumName}),seenNames.has(memberName)&&this.raise(FlowErrors.EnumDuplicateMemberName,id,{memberName,enumName}),seenNames.add(memberName);const context={enumName,explicitType,memberName};switch(memberNode.id=id,init.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(init.loc,context,"boolean"),memberNode.init=init.value,members.booleanMembers.push(this.finishNode(memberNode,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(init.loc,context,"number"),memberNode.init=init.value,members.numberMembers.push(this.finishNode(memberNode,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(init.loc,context,"string"),memberNode.init=init.value,members.stringMembers.push(this.finishNode(memberNode,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(init.loc,context);case"none":switch(explicitType){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(init.loc,context);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(init.loc,context);break;default:members.defaultedMembers.push(this.finishNode(memberNode,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members,hasUnknownMembers}}flowEnumStringMembers(initializedMembers,defaultedMembers,{enumName}){if(0===initializedMembers.length)return defaultedMembers;if(0===defaultedMembers.length)return initializedMembers;if(defaultedMembers.length>initializedMembers.length){for(const member of initializedMembers)this.flowEnumErrorStringMemberInconsistentlyInitialized(member,{enumName});return defaultedMembers}for(const member of defaultedMembers)this.flowEnumErrorStringMemberInconsistentlyInitialized(member,{enumName});return initializedMembers}flowEnumParseExplicitType({enumName}){if(!this.eatContextual(102))return null;if(!tokenIsIdentifier(this.state.type))throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName});const{value}=this.state;return this.next(),"boolean"!==value&&"number"!==value&&"string"!==value&&"symbol"!==value&&this.raise(FlowErrors.EnumInvalidExplicitType,this.state.startLoc,{enumName,invalidEnumType:value}),value}flowEnumBody(node,id){const enumName=id.name,nameLoc=id.loc.start,explicitType=this.flowEnumParseExplicitType({enumName});this.expect(5);const{members,hasUnknownMembers}=this.flowEnumMembers({enumName,explicitType});switch(node.hasUnknownMembers=hasUnknownMembers,explicitType){case"boolean":return node.explicitType=!0,node.members=members.booleanMembers,this.expect(8),this.finishNode(node,"EnumBooleanBody");case"number":return node.explicitType=!0,node.members=members.numberMembers,this.expect(8),this.finishNode(node,"EnumNumberBody");case"string":return node.explicitType=!0,node.members=this.flowEnumStringMembers(members.stringMembers,members.defaultedMembers,{enumName}),this.expect(8),this.finishNode(node,"EnumStringBody");case"symbol":return node.members=members.defaultedMembers,this.expect(8),this.finishNode(node,"EnumSymbolBody");default:{const empty=()=>(node.members=[],this.expect(8),this.finishNode(node,"EnumStringBody"));node.explicitType=!1;const boolsLen=members.booleanMembers.length,numsLen=members.numberMembers.length,strsLen=members.stringMembers.length,defaultedLen=members.defaultedMembers.length;if(boolsLen||numsLen||strsLen||defaultedLen){if(boolsLen||numsLen){if(!numsLen&&!strsLen&&boolsLen>=defaultedLen){for(const member of members.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start,{enumName,memberName:member.id.name});return node.members=members.booleanMembers,this.expect(8),this.finishNode(node,"EnumBooleanBody")}if(!boolsLen&&!strsLen&&numsLen>=defaultedLen){for(const member of members.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(member.loc.start,{enumName,memberName:member.id.name});return node.members=members.numberMembers,this.expect(8),this.finishNode(node,"EnumNumberBody")}return this.raise(FlowErrors.EnumInconsistentMemberValues,nameLoc,{enumName}),empty()}return node.members=this.flowEnumStringMembers(members.stringMembers,members.defaultedMembers,{enumName}),this.expect(8),this.finishNode(node,"EnumStringBody")}return empty()}}}flowParseEnumDeclaration(node){const id=this.parseIdentifier();return node.id=id,node.body=this.flowEnumBody(this.startNode(),id),this.finishNode(node,"EnumDeclaration")}jsxParseOpeningElementAfterName(node){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(node.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(node)}isLookaheadToken_lt(){const next=this.nextTokenStart();if(60===this.input.charCodeAt(next)){const afterNext=this.input.charCodeAt(next+1);return 60!==afterNext&&61!==afterNext}return!1}reScan_lt_gt(){const{type}=this.state;47===type?(this.state.pos-=1,this.readToken_lt()):48===type&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type}=this.state;return 51===type?(this.state.pos-=2,this.finishOp(47,1),47):type}maybeUnwrapTypeCastExpression(node){return"TypeCastExpression"===node.type?node.expression:node}},typescript:superClass=>class extends superClass{constructor(...args){super(...args),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:TSErrors.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:TSErrors.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:TSErrors.InvalidModifierOnTypeParameter})}getScopeHandler(){return TypeScriptScopeHandler}tsIsIdentifier(){return tokenIsIdentifier(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),!this.hasPrecedingLineBreak()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(allowedModifiers,stopOnStartOfClassStaticBlock,hasSeenStaticModifier){if(!tokenIsIdentifier(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;const modifier=this.state.value;if(allowedModifiers.includes(modifier)){if(hasSeenStaticModifier&&this.match(106))return;if(stopOnStartOfClassStaticBlock&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return modifier}}tsParseModifiers({allowedModifiers,disallowedModifiers,stopOnStartOfClassStaticBlock,errorTemplate=TSErrors.InvalidModifierOnTypeMember},modified){const enforceOrder=(loc,modifier,before,after)=>{modifier===before&&modified[after]&&this.raise(TSErrors.InvalidModifiersOrder,loc,{orderedModifiers:[before,after]})},incompatible=(loc,modifier,mod1,mod2)=>{(modified[mod1]&&modifier===mod2||modified[mod2]&&modifier===mod1)&&this.raise(TSErrors.IncompatibleModifiers,loc,{modifiers:[mod1,mod2]})};for(;;){const{startLoc}=this.state,modifier=this.tsParseModifier(allowedModifiers.concat(null!=disallowedModifiers?disallowedModifiers:[]),stopOnStartOfClassStaticBlock,modified.static);if(!modifier)break;tsIsAccessModifier(modifier)?modified.accessibility?this.raise(TSErrors.DuplicateAccessibilityModifier,startLoc,{modifier}):(enforceOrder(startLoc,modifier,modifier,"override"),enforceOrder(startLoc,modifier,modifier,"static"),enforceOrder(startLoc,modifier,modifier,"readonly"),modified.accessibility=modifier):tsIsVarianceAnnotations(modifier)?(modified[modifier]&&this.raise(TSErrors.DuplicateModifier,startLoc,{modifier}),modified[modifier]=!0,enforceOrder(startLoc,modifier,"in","out")):(hasOwnProperty.call(modified,modifier)?this.raise(TSErrors.DuplicateModifier,startLoc,{modifier}):(enforceOrder(startLoc,modifier,"static","readonly"),enforceOrder(startLoc,modifier,"static","override"),enforceOrder(startLoc,modifier,"override","readonly"),enforceOrder(startLoc,modifier,"abstract","override"),incompatible(startLoc,modifier,"declare","override"),incompatible(startLoc,modifier,"static","abstract")),modified[modifier]=!0),null!=disallowedModifiers&&disallowedModifiers.includes(modifier)&&this.raise(errorTemplate,startLoc,{modifier})}}tsIsListTerminator(kind){switch(kind){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(kind,parseElement){const result=[];for(;!this.tsIsListTerminator(kind);)result.push(parseElement());return result}tsParseDelimitedList(kind,parseElement,refTrailingCommaPos){return function(x){if(null==x)throw new Error(`Unexpected ${x} value.`);return x}(this.tsParseDelimitedListWorker(kind,parseElement,!0,refTrailingCommaPos))}tsParseDelimitedListWorker(kind,parseElement,expectSuccess,refTrailingCommaPos){const result=[];let trailingCommaPos=-1;for(;!this.tsIsListTerminator(kind);){trailingCommaPos=-1;const element=parseElement();if(null==element)return;if(result.push(element),!this.eat(12)){if(this.tsIsListTerminator(kind))break;return void(expectSuccess&&this.expect(12))}trailingCommaPos=this.state.lastTokStartLoc.index}return refTrailingCommaPos&&(refTrailingCommaPos.value=trailingCommaPos),result}tsParseBracketedList(kind,parseElement,bracket,skipFirstToken,refTrailingCommaPos){skipFirstToken||(bracket?this.expect(0):this.expect(47));const result=this.tsParseDelimitedList(kind,parseElement,refTrailingCommaPos);return bracket?this.expect(3):this.expect(48),result}tsParseImportType(){const node=this.startNode();return this.expect(83),this.expect(10),this.match(134)?node.argument=this.parseStringLiteral(this.state.value):(this.raise(TSErrors.UnsupportedImportTypeArgument,this.state.startLoc),node.argument=super.parseExprAtom()),this.eat(12)?node.options=this.tsParseImportTypeOptions():node.options=null,this.expect(11),this.eat(16)&&(node.qualifier=this.tsParseEntityName(3)),this.match(47)&&(node.typeParameters=this.tsParseTypeArguments()),this.finishNode(node,"TSImportType")}tsParseImportTypeOptions(){const node=this.startNode();this.expect(5);const withProperty=this.startNode();return this.isContextual(76)?(withProperty.method=!1,withProperty.key=this.parseIdentifier(!0),withProperty.computed=!1,withProperty.shorthand=!1):this.unexpected(null,76),this.expect(14),withProperty.value=this.tsParseImportTypeWithPropertyValue(),node.properties=[this.finishObjectProperty(withProperty)],this.expect(8),this.finishNode(node,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const node=this.startNode(),properties=[];for(this.expect(5);!this.match(8);){const type=this.state.type;tokenIsIdentifier(type)||134===type?properties.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return node.properties=properties,this.next(),this.finishNode(node,"ObjectExpression")}tsParseEntityName(flags){let entity;if(1&flags&&this.match(78))if(2&flags)entity=this.parseIdentifier(!0);else{const node=this.startNode();this.next(),entity=this.finishNode(node,"ThisExpression")}else entity=this.parseIdentifier(!!(1&flags));for(;this.eat(16);){const node=this.startNodeAtNode(entity);node.left=entity,node.right=this.parseIdentifier(!!(1&flags)),entity=this.finishNode(node,"TSQualifiedName")}return entity}tsParseTypeReference(){const node=this.startNode();return node.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(node.typeParameters=this.tsParseTypeArguments()),this.finishNode(node,"TSTypeReference")}tsParseThisTypePredicate(lhs){this.next();const node=this.startNodeAtNode(lhs);return node.parameterName=lhs,node.typeAnnotation=this.tsParseTypeAnnotation(!1),node.asserts=!1,this.finishNode(node,"TSTypePredicate")}tsParseThisTypeNode(){const node=this.startNode();return this.next(),this.finishNode(node,"TSThisType")}tsParseTypeQuery(){const node=this.startNode();return this.expect(87),this.match(83)?node.exprName=this.tsParseImportType():node.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(node.typeParameters=this.tsParseTypeArguments()),this.finishNode(node,"TSTypeQuery")}tsParseTypeParameter(parseModifiers){const node=this.startNode();return parseModifiers(node),node.name=this.tsParseTypeParameterName(),node.constraint=this.tsEatThenParseType(81),node.default=this.tsEatThenParseType(29),this.finishNode(node,"TSTypeParameter")}tsTryParseTypeParameters(parseModifiers){if(this.match(47))return this.tsParseTypeParameters(parseModifiers)}tsParseTypeParameters(parseModifiers){const node=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const refTrailingCommaPos={value:-1};return node.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,parseModifiers),!1,!0,refTrailingCommaPos),0===node.params.length&&this.raise(TSErrors.EmptyTypeParameters,node),-1!==refTrailingCommaPos.value&&this.addExtra(node,"trailingComma",refTrailingCommaPos.value),this.finishNode(node,"TSTypeParameterDeclaration")}tsFillSignature(returnToken,signature){const returnTokenRequired=19===returnToken;signature.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),signature.parameters=this.tsParseBindingListForSignature(),(returnTokenRequired||this.match(returnToken))&&(signature.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(returnToken))}tsParseBindingListForSignature(){const list=super.parseBindingList(11,41,2);for(const pattern of list){const{type}=pattern;"AssignmentPattern"!==type&&"TSParameterProperty"!==type||this.raise(TSErrors.UnsupportedSignatureParameterKind,pattern,{type})}return list}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(kind,node){return this.tsFillSignature(14,node),this.tsParseTypeMemberSemicolon(),this.finishNode(node,kind)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!tokenIsIdentifier(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(node){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const id=this.parseIdentifier();id.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(id),this.expect(3),node.parameters=[id];const type=this.tsTryParseTypeAnnotation();return type&&(node.typeAnnotation=type),this.tsParseTypeMemberSemicolon(),this.finishNode(node,"TSIndexSignature")}tsParsePropertyOrMethodSignature(node,readonly){if(this.eat(17)&&(node.optional=!0),this.match(10)||this.match(47)){readonly&&this.raise(TSErrors.ReadonlyForMethodSignature,node);const method=node;method.kind&&this.match(47)&&this.raise(TSErrors.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,method),this.tsParseTypeMemberSemicolon();const paramsKey="parameters",returnTypeKey="typeAnnotation";if("get"===method.kind)method[paramsKey].length>0&&(this.raise(Errors.BadGetterArity,this.state.curPosition()),this.isThisParam(method[paramsKey][0])&&this.raise(TSErrors.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===method.kind){if(1!==method[paramsKey].length)this.raise(Errors.BadSetterArity,this.state.curPosition());else{const firstParameter=method[paramsKey][0];this.isThisParam(firstParameter)&&this.raise(TSErrors.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===firstParameter.type&&firstParameter.optional&&this.raise(TSErrors.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===firstParameter.type&&this.raise(TSErrors.SetAccessorCannotHaveRestParameter,this.state.curPosition())}method[returnTypeKey]&&this.raise(TSErrors.SetAccessorCannotHaveReturnType,method[returnTypeKey])}else method.kind="method";return this.finishNode(method,"TSMethodSignature")}{const property=node;readonly&&(property.readonly=!0);const type=this.tsTryParseTypeAnnotation();return type&&(property.typeAnnotation=type),this.tsParseTypeMemberSemicolon(),this.finishNode(property,"TSPropertySignature")}}tsParseTypeMember(){const node=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",node);if(this.match(77)){const id=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",node):(node.key=this.createIdentifier(id,"new"),this.tsParsePropertyOrMethodSignature(node,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},node);const idx=this.tsTryParseIndexSignature(node);return idx||(super.parsePropertyName(node),node.computed||"Identifier"!==node.key.type||"get"!==node.key.name&&"set"!==node.key.name||!this.tsTokenCanFollowModifier()||(node.kind=node.key.name,super.parsePropertyName(node),this.match(10)||this.match(47)||this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(node,!!node.readonly))}tsParseTypeLiteral(){const node=this.startNode();return node.members=this.tsParseObjectTypeMembers(),this.finishNode(node,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const members=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),members}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}tsParseMappedType(){const node=this.startNode();this.expect(5),this.match(53)?(node.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(node.readonly=!0),this.expect(0);{const typeParameter=this.startNode();typeParameter.name=this.tsParseTypeParameterName(),typeParameter.constraint=this.tsExpectThenParseType(58),node.typeParameter=this.finishNode(typeParameter,"TSTypeParameter")}return node.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(node.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(node.optional=!0),node.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(node,"TSMappedType")}tsParseTupleType(){const node=this.startNode();node.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let seenOptionalElement=!1;return node.elementTypes.forEach(elementNode=>{const{type}=elementNode;!seenOptionalElement||"TSRestType"===type||"TSOptionalType"===type||"TSNamedTupleMember"===type&&elementNode.optional||this.raise(TSErrors.OptionalTypeBeforeRequired,elementNode),seenOptionalElement||(seenOptionalElement="TSNamedTupleMember"===type&&elementNode.optional||"TSOptionalType"===type)}),this.finishNode(node,"TSTupleType")}tsParseTupleElementType(){const restStartLoc=this.state.startLoc,rest=this.eat(21),{startLoc}=this.state;let labeled,label,optional,type;const chAfterWord=tokenIsKeywordOrIdentifier(this.state.type)?this.lookaheadCharCode():null;if(58===chAfterWord)labeled=!0,optional=!1,label=this.parseIdentifier(!0),this.expect(14),type=this.tsParseType();else if(63===chAfterWord){optional=!0;const wordName=this.state.value,typeOrLabel=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(labeled=!0,label=this.createIdentifier(this.startNodeAt(startLoc),wordName),this.expect(17),this.expect(14),type=this.tsParseType()):(labeled=!1,type=typeOrLabel,this.expect(17))}else type=this.tsParseType(),optional=this.eat(17),labeled=this.eat(14);if(labeled){let labeledNode;label?(labeledNode=this.startNodeAt(startLoc),labeledNode.optional=optional,labeledNode.label=label,labeledNode.elementType=type,this.eat(17)&&(labeledNode.optional=!0,this.raise(TSErrors.TupleOptionalAfterType,this.state.lastTokStartLoc))):(labeledNode=this.startNodeAt(startLoc),labeledNode.optional=optional,this.raise(TSErrors.InvalidTupleMemberLabel,type),labeledNode.label=type,labeledNode.elementType=this.tsParseType()),type=this.finishNode(labeledNode,"TSNamedTupleMember")}else if(optional){const optionalTypeNode=this.startNodeAt(startLoc);optionalTypeNode.typeAnnotation=type,type=this.finishNode(optionalTypeNode,"TSOptionalType")}if(rest){const restNode=this.startNodeAt(restStartLoc);restNode.typeAnnotation=type,type=this.finishNode(restNode,"TSRestType")}return type}tsParseParenthesizedType(){const node=this.startNode();return this.expect(10),node.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(node,"TSParenthesizedType")}tsParseFunctionOrConstructorType(type,abstract){const node=this.startNode();return"TSConstructorType"===type&&(node.abstract=!!abstract,abstract&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,node)),this.finishNode(node,type)}tsParseLiteralTypeNode(){const node=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:node.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(node,"TSLiteralType")}tsParseTemplateLiteralType(){{const node=this.startNode();return node.literal=super.parseTemplate(!1),this.finishNode(node,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const thisKeyword=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(thisKeyword):thisKeyword}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){const node=this.startNode(),nextToken=this.lookahead();return 135!==nextToken.type&&136!==nextToken.type&&this.unexpected(),node.literal=this.parseMaybeUnary(),this.finishNode(node,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type}=this.state;if(tokenIsIdentifier(type)||88===type||84===type){const nodeType=88===type?"TSVoidKeyword":84===type?"TSNullKeyword":function(value){switch(value){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==nodeType&&46!==this.lookaheadCharCode()){const node=this.startNode();return this.next(),this.finishNode(node,nodeType)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc}=this.state;let type=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const node=this.startNodeAt(startLoc);node.elementType=type,this.expect(3),type=this.finishNode(node,"TSArrayType")}else{const node=this.startNodeAt(startLoc);node.objectType=type,node.indexType=this.tsParseType(),this.expect(3),type=this.finishNode(node,"TSIndexedAccessType")}return type}tsParseTypeOperator(){const node=this.startNode(),operator=this.state.value;return this.next(),node.operator=operator,node.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===operator&&this.tsCheckTypeAnnotationForReadOnly(node),this.finishNode(node,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(node){switch(node.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(TSErrors.UnexpectedReadonly,node)}}tsParseInferType(){const node=this.startNode();this.expectContextual(115);const typeParameter=this.startNode();return typeParameter.name=this.tsParseTypeParameterName(),typeParameter.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),node.typeParameter=this.finishNode(typeParameter,"TSTypeParameter"),this.finishNode(node,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const constraint=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return constraint}}tsParseTypeOperatorOrHigher(){var token;return(token=this.state.type)>=121&&token<=123&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(kind,parseConstituentType,operator){const node=this.startNode(),hasLeadingOperator=this.eat(operator),types=[];do{types.push(parseConstituentType())}while(this.eat(operator));return 1!==types.length||hasLeadingOperator?(node.types=types,this.finishNode(node,kind)):types[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(tokenIsIdentifier(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors}=this.state,previousErrorCount=errors.length;try{return this.parseObjectLike(8,!0),errors.length===previousErrorCount}catch(_unused){return!1}}if(this.match(0)){this.next();const{errors}=this.state,previousErrorCount=errors.length;try{return super.parseBindingList(3,93,1),errors.length===previousErrorCount}catch(_unused2){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(returnToken){return this.tsInType(()=>{const t=this.startNode();this.expect(returnToken);const node=this.startNode(),asserts=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(asserts&&this.match(78)){let thisTypePredicate=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===thisTypePredicate.type?(node.parameterName=thisTypePredicate,node.asserts=!0,node.typeAnnotation=null,thisTypePredicate=this.finishNode(node,"TSTypePredicate")):(this.resetStartLocationFromNode(thisTypePredicate,node),thisTypePredicate.asserts=!0),t.typeAnnotation=thisTypePredicate,this.finishNode(t,"TSTypeAnnotation")}const typePredicateVariable=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!typePredicateVariable)return asserts?(node.parameterName=this.parseIdentifier(),node.asserts=asserts,node.typeAnnotation=null,t.typeAnnotation=this.finishNode(node,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const type=this.tsParseTypeAnnotation(!1);return node.parameterName=typePredicateVariable,node.typeAnnotation=type,node.asserts=asserts,t.typeAnnotation=this.finishNode(node,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const id=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),id}tsParseTypePredicateAsserts(){if(109!==this.state.type)return!1;const containsEsc=this.state.containsEsc;return this.next(),!(!tokenIsIdentifier(this.state.type)&&!this.match(78))&&(containsEsc&&this.raise(Errors.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(eatColon=!0,t=this.startNode()){return this.tsInType(()=>{eatColon&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){assert(this.state.inType);const type=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return type;const node=this.startNodeAtNode(type);return node.checkType=type,node.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),node.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),node.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(node,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(TSErrors.ReservedTypeAssertion,this.state.startLoc);const node=this.startNode();return node.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),node.expression=this.parseMaybeUnary(),this.finishNode(node,"TSTypeAssertion")}tsParseHeritageClause(token){const originalStartLoc=this.state.startLoc,delimitedList=this.tsParseDelimitedList("HeritageClauseElement",()=>{{const node=this.startNode();return node.expression=this.tsParseEntityName(3),this.match(47)&&(node.typeParameters=this.tsParseTypeArguments()),this.finishNode(node,"TSExpressionWithTypeArguments")}});return delimitedList.length||this.raise(TSErrors.EmptyHeritageClauseType,originalStartLoc,{token}),delimitedList}tsParseInterfaceDeclaration(node,properties={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),properties.declare&&(node.declare=!0),tokenIsIdentifier(this.state.type)?(node.id=this.parseIdentifier(),this.checkIdentifier(node.id,130)):(node.id=null,this.raise(TSErrors.MissingInterfaceName,this.state.startLoc)),node.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(node.extends=this.tsParseHeritageClause("extends"));const body=this.startNode();return body.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),node.body=this.finishNode(body,"TSInterfaceBody"),this.finishNode(node,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(node){return node.id=this.parseIdentifier(),this.checkIdentifier(node.id,2),node.typeAnnotation=this.tsInType(()=>{if(node.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&46!==this.lookaheadCharCode()){const node=this.startNode();return this.next(),this.finishNode(node,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(node,"TSTypeAliasDeclaration")}tsInTopLevelContext(cb){if(this.curContext()===types.brace)return cb();{const oldContext=this.state.context;this.state.context=[oldContext[0]];try{return cb()}finally{this.state.context=oldContext}}}tsInType(cb){const oldInType=this.state.inType;this.state.inType=!0;try{return cb()}finally{this.state.inType=oldInType}}tsInDisallowConditionalTypesContext(cb){const oldInDisallowConditionalTypesContext=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return cb()}finally{this.state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext}}tsInAllowConditionalTypesContext(cb){const oldInDisallowConditionalTypesContext=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return cb()}finally{this.state.inDisallowConditionalTypesContext=oldInDisallowConditionalTypesContext}}tsEatThenParseType(token){if(this.match(token))return this.tsNextThenParseType()}tsExpectThenParseType(token){return this.tsInType(()=>(this.expect(token),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){const node=this.startNode();return node.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(node.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(node,"TSEnumMember")}tsParseEnumDeclaration(node,properties={}){return properties.const&&(node.const=!0),properties.declare&&(node.declare=!0),this.expectContextual(126),node.id=this.parseIdentifier(),this.checkIdentifier(node.id,node.const?8971:8459),this.expect(5),node.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(node,"TSEnumDeclaration")}tsParseEnumBody(){const node=this.startNode();return this.expect(5),node.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(node,"TSEnumBody")}tsParseModuleBlock(){const node=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(node.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(node,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(node,nested=!1){if(node.id=this.parseIdentifier(),nested||this.checkIdentifier(node.id,1024),this.eat(16)){const inner=this.startNode();this.tsParseModuleOrNamespaceDeclaration(inner,!0),node.body=inner}else this.scope.enter(1024),this.prodParam.enter(0),node.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(node,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(node){return this.isContextual(112)?(node.kind="global",node.global=!0,node.id=this.parseIdentifier()):this.match(134)?(node.kind="module",node.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),node.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(node,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(node,maybeDefaultIdentifier,isExport){node.isExport=isExport||!1,node.id=maybeDefaultIdentifier||this.parseIdentifier(),this.checkIdentifier(node.id,4096),this.expect(29);const moduleReference=this.tsParseModuleReference();return"type"===node.importKind&&"TSExternalModuleReference"!==moduleReference.type&&this.raise(TSErrors.ImportAliasHasImportType,moduleReference),node.moduleReference=moduleReference,this.semicolon(),this.finishNode(node,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const node=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),node.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(node,"TSExternalModuleReference")}tsLookAhead(f){const state=this.state.clone(),res=f();return this.state=state,res}tsTryParseAndCatch(f){const result=this.tryParse(abort=>f()||abort());if(!result.aborted&&result.node)return result.error&&(this.state=result.failState),result.node}tsTryParse(f){const state=this.state.clone(),result=f();if(void 0!==result&&!1!==result)return result;this.state=state}tsTryParseDeclare(node){if(this.isLineTerminator())return;const startType=this.state.type;return this.tsInAmbientContext(()=>{switch(startType){case 68:return node.declare=!0,super.parseFunctionStatement(node,!1,!1);case 80:return node.declare=!0,this.parseClass(node,!0,!1);case 126:return this.tsParseEnumDeclaration(node,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(node);case 100:if(this.state.containsEsc)return;case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(node,{const:!0,declare:!0})):(node.declare=!0,this.parseVarStatement(node,this.state.value,!0));case 107:if(this.isUsing())return this.raise(TSErrors.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),node.declare=!0,this.parseVarStatement(node,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(TSErrors.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),node.declare=!0,this.next(),this.parseVarStatement(node,"await using",!0);break;case 129:{const result=this.tsParseInterfaceDeclaration(node,{declare:!0});if(result)return result}default:if(tokenIsIdentifier(startType))return this.tsParseDeclaration(node,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(node,expr,decorators){switch(expr.name){case"declare":{const declaration=this.tsTryParseDeclare(node);return declaration&&(declaration.declare=!0),declaration}case"global":if(this.match(5)){this.scope.enter(1024),this.prodParam.enter(0);const mod=node;return mod.kind="global",node.global=!0,mod.id=expr,mod.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(mod,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(node,expr.name,!1,decorators)}}tsParseDeclaration(node,value,next,decorators){switch(value){case"abstract":if(this.tsCheckLineTerminator(next)&&(this.match(80)||tokenIsIdentifier(this.state.type)))return this.tsParseAbstractDeclaration(node,decorators);break;case"module":if(this.tsCheckLineTerminator(next)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(node);if(tokenIsIdentifier(this.state.type))return node.kind="module",this.tsParseModuleOrNamespaceDeclaration(node)}break;case"namespace":if(this.tsCheckLineTerminator(next)&&tokenIsIdentifier(this.state.type))return node.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(node);break;case"type":if(this.tsCheckLineTerminator(next)&&tokenIsIdentifier(this.state.type))return this.tsParseTypeAliasDeclaration(node)}}tsCheckLineTerminator(next){return next?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(startLoc){if(!this.match(47))return;const oldMaybeInArrowParameters=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const res=this.tsTryParseAndCatch(()=>{const node=this.startNodeAt(startLoc);return node.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(node),node.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),node});return this.state.maybeInArrowParameters=oldMaybeInArrowParameters,res?super.parseArrowExpression(res,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const node=this.startNode();return node.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),0===node.params.length?this.raise(TSErrors.EmptyTypeArguments,node):this.state.inType||this.curContext()!==types.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(node,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(token=this.state.type)>=124&&token<=130;var token}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(flags,decorators){const startLoc=decorators.length?decorators[0].loc.start:this.state.startLoc,modified={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},modified);const accessibility=modified.accessibility,override=modified.override,readonly=modified.readonly;4&flags||!(accessibility||readonly||override)||this.raise(TSErrors.UnexpectedParameterModifier,startLoc);const left=this.parseMaybeDefault();2&flags&&this.parseFunctionParamType(left);const elt=this.parseMaybeDefault(left.loc.start,left);if(accessibility||readonly||override){const pp=this.startNodeAt(startLoc);return decorators.length&&(pp.decorators=decorators),accessibility&&(pp.accessibility=accessibility),readonly&&(pp.readonly=readonly),override&&(pp.override=override),"Identifier"!==elt.type&&"AssignmentPattern"!==elt.type&&this.raise(TSErrors.UnsupportedParameterPropertyKind,pp),pp.parameter=elt,this.finishNode(pp,"TSParameterProperty")}return decorators.length&&(left.decorators=decorators),elt}isSimpleParameter(node){return"TSParameterProperty"===node.type&&super.isSimpleParameter(node.parameter)||super.isSimpleParameter(node)}tsDisallowOptionalPattern(node){for(const param of node.params)"Identifier"!==param.type&¶m.optional&&!this.state.isAmbientContext&&this.raise(TSErrors.PatternIsOptional,param)}setArrowFunctionParameters(node,params,trailingCommaLoc){super.setArrowFunctionParameters(node,params,trailingCommaLoc),this.tsDisallowOptionalPattern(node)}parseFunctionBodyAndFinish(node,type,isMethod=!1){this.match(14)&&(node.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const bodilessType="FunctionDeclaration"===type?"TSDeclareFunction":"ClassMethod"===type||"ClassPrivateMethod"===type?"TSDeclareMethod":void 0;return bodilessType&&!this.match(5)&&this.isLineTerminator()?this.finishNode(node,bodilessType):"TSDeclareFunction"===bodilessType&&this.state.isAmbientContext&&(this.raise(TSErrors.DeclareFunctionHasImplementation,node),node.declare)?super.parseFunctionBodyAndFinish(node,bodilessType,isMethod):(this.tsDisallowOptionalPattern(node),super.parseFunctionBodyAndFinish(node,type,isMethod))}registerFunctionStatementId(node){!node.body&&node.id?this.checkIdentifier(node.id,1024):super.registerFunctionStatementId(node)}tsCheckForInvalidTypeCasts(items){items.forEach(node=>{"TSTypeCastExpression"===(null==node?void 0:node.type)&&this.raise(TSErrors.UnexpectedTypeAnnotation,node.typeAnnotation)})}toReferencedList(exprList,isInParens){return this.tsCheckForInvalidTypeCasts(exprList),exprList}parseArrayLike(close,canBePattern,isTuple,refExpressionErrors){const node=super.parseArrayLike(close,canBePattern,isTuple,refExpressionErrors);return"ArrayExpression"===node.type&&this.tsCheckForInvalidTypeCasts(node.elements),node}parseSubscript(base,startLoc,noCalls,state){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const nonNullExpression=this.startNodeAt(startLoc);return nonNullExpression.expression=base,this.finishNode(nonNullExpression,"TSNonNullExpression")}let isOptionalCall=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(noCalls)return state.stop=!0,base;state.optionalChainMember=isOptionalCall=!0,this.next()}if(this.match(47)||this.match(51)){let missingParenErrorLoc;const result=this.tsTryParseAndCatch(()=>{if(!noCalls&&this.atPossibleAsyncArrow(base)){const asyncArrowFn=this.tsTryParseGenericAsyncArrowFunction(startLoc);if(asyncArrowFn)return asyncArrowFn}const typeArguments=this.tsParseTypeArgumentsInExpression();if(!typeArguments)return;if(isOptionalCall&&!this.match(10))return void(missingParenErrorLoc=this.state.curPosition());if(tokenIsTemplate(this.state.type)){const result=super.parseTaggedTemplateExpression(base,startLoc,state);return result.typeParameters=typeArguments,result}if(!noCalls&&this.eat(10)){const node=this.startNodeAt(startLoc);return node.callee=base,node.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(node.arguments),node.typeParameters=typeArguments,state.optionalChainMember&&(node.optional=isOptionalCall),this.finishCallExpression(node,state.optionalChainMember)}const tokenType=this.state.type;if(48===tokenType||52===tokenType||10!==tokenType&&tokenCanStartExpression(tokenType)&&!this.hasPrecedingLineBreak())return;const node=this.startNodeAt(startLoc);return node.expression=base,node.typeParameters=typeArguments,this.finishNode(node,"TSInstantiationExpression")});if(missingParenErrorLoc&&this.unexpected(missingParenErrorLoc,10),result)return"TSInstantiationExpression"===result.type&&((this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(16)||this.match(18)||(result.expression=super.stopParseSubscript(base,state))),result}return super.parseSubscript(base,startLoc,noCalls,state)}parseNewCallee(node){var _callee$extra;super.parseNewCallee(node);const{callee}=node;"TSInstantiationExpression"!==callee.type||null!=(_callee$extra=callee.extra)&&_callee$extra.parenthesized||(node.typeParameters=callee.typeParameters,node.callee=callee.expression)}parseExprOp(left,leftStartLoc,minPrec){let isSatisfies;if(tokenOperatorPrecedence(58)>minPrec&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(isSatisfies=this.isContextual(120)))){const node=this.startNodeAt(leftStartLoc);return node.expression=left,node.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(isSatisfies&&this.raise(Errors.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(node,isSatisfies?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(node,leftStartLoc,minPrec)}return super.parseExprOp(left,leftStartLoc,minPrec)}checkReservedWord(word,startLoc,checkKeywords,isBinding){this.state.isAmbientContext||super.checkReservedWord(word,startLoc,checkKeywords,isBinding)}checkImportReflection(node){super.checkImportReflection(node),node.module&&"value"!==node.importKind&&this.raise(TSErrors.ImportReflectionHasImportType,node.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(isExport){if(super.isPotentialImportPhase(isExport))return!0;if(this.isContextual(130)){const ch=this.lookaheadCharCode();return isExport?123===ch||42===ch:61!==ch}return!isExport&&this.isContextual(87)}applyImportPhase(node,isExport,phase,loc){super.applyImportPhase(node,isExport,phase,loc),isExport?node.exportKind="type"===phase?"type":"value":node.importKind="type"===phase||"typeof"===phase?phase:"value"}parseImport(node){if(this.match(134))return node.importKind="value",super.parseImport(node);let importNode;if(tokenIsIdentifier(this.state.type)&&61===this.lookaheadCharCode())return node.importKind="value",this.tsParseImportEqualsDeclaration(node);if(this.isContextual(130)){const maybeDefaultIdentifier=this.parseMaybeImportPhase(node,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(node,maybeDefaultIdentifier);importNode=super.parseImportSpecifiersAndAfter(node,maybeDefaultIdentifier)}else importNode=super.parseImport(node);return"type"===importNode.importKind&&importNode.specifiers.length>1&&"ImportDefaultSpecifier"===importNode.specifiers[0].type&&this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed,importNode),importNode}parseExport(node,decorators){if(this.match(83)){const nodeImportEquals=node;this.next();let maybeDefaultIdentifier=null;this.isContextual(130)&&this.isPotentialImportPhase(!1)?maybeDefaultIdentifier=this.parseMaybeImportPhase(nodeImportEquals,!1):nodeImportEquals.importKind="value";return this.tsParseImportEqualsDeclaration(nodeImportEquals,maybeDefaultIdentifier,!0)}if(this.eat(29)){const assign=node;return assign.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(assign,"TSExportAssignment")}if(this.eatContextual(93)){const decl=node;return this.expectContextual(128),decl.id=this.parseIdentifier(),this.semicolon(),this.finishNode(decl,"TSNamespaceExportDeclaration")}return super.parseExport(node,decorators)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){const cls=this.startNode();return this.next(),cls.abstract=!0,this.parseClass(cls,!0,!0)}if(this.match(129)){const result=this.tsParseInterfaceDeclaration(this.startNode());if(result)return result}return super.parseExportDefaultExpression()}parseVarStatement(node,kind,allowMissingInitializer=!1){const{isAmbientContext}=this.state,declaration=super.parseVarStatement(node,kind,allowMissingInitializer||isAmbientContext);if(!isAmbientContext)return declaration;if(!node.declare&&("using"===kind||"await using"===kind))return this.raiseOverwrite(TSErrors.UsingDeclarationInAmbientContext,node,kind),declaration;for(const{id,init}of declaration.declarations)init&&("var"===kind||"let"===kind||id.typeAnnotation?this.raise(TSErrors.InitializerNotAllowedInAmbientContext,init):isValidAmbientConstInitializer(init,this.hasPlugin("estree"))||this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,init));return declaration}parseStatementContent(flags,decorators){if(this.match(75)&&this.isLookaheadContextual("enum")){const node=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(node,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){const result=this.tsParseInterfaceDeclaration(this.startNode());if(result)return result}return super.parseStatementContent(flags,decorators)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(member,modifiers){return modifiers.some(modifier=>tsIsAccessModifier(modifier)?member.accessibility===modifier:!!member[modifier])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&123===this.lookaheadCharCode()}parseClassMember(classBody,member,state){const modifiers=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:modifiers,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:TSErrors.InvalidModifierOnTypeParameterPositions},member);const callParseClassMemberWithIsStatic=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(member,modifiers)&&this.raise(TSErrors.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(classBody,member)):this.parseClassMemberWithIsStatic(classBody,member,state,!!member.static)};member.declare?this.tsInAmbientContext(callParseClassMemberWithIsStatic):callParseClassMemberWithIsStatic()}parseClassMemberWithIsStatic(classBody,member,state,isStatic){const idx=this.tsTryParseIndexSignature(member);if(idx)return classBody.body.push(idx),member.abstract&&this.raise(TSErrors.IndexSignatureHasAbstract,member),member.accessibility&&this.raise(TSErrors.IndexSignatureHasAccessibility,member,{modifier:member.accessibility}),member.declare&&this.raise(TSErrors.IndexSignatureHasDeclare,member),void(member.override&&this.raise(TSErrors.IndexSignatureHasOverride,member));!this.state.inAbstractClass&&member.abstract&&this.raise(TSErrors.NonAbstractClassHasAbstractMethod,member),member.override&&(state.hadSuperClass||this.raise(TSErrors.OverrideNotInSubClass,member)),super.parseClassMemberWithIsStatic(classBody,member,state,isStatic)}parsePostMemberNameModifiers(methodOrProp){this.eat(17)&&(methodOrProp.optional=!0),methodOrProp.readonly&&this.match(10)&&this.raise(TSErrors.ClassMethodHasReadonly,methodOrProp),methodOrProp.declare&&this.match(10)&&this.raise(TSErrors.ClassMethodHasDeclare,methodOrProp)}parseExpressionStatement(node,expr,decorators){return("Identifier"===expr.type?this.tsParseExpressionStatement(node,expr,decorators):void 0)||super.parseExpressionStatement(node,expr,decorators)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(expr,startLoc,refExpressionErrors){if(!this.match(17))return expr;if(this.state.maybeInArrowParameters){const nextCh=this.lookaheadCharCode();if(44===nextCh||61===nextCh||58===nextCh||41===nextCh)return this.setOptionalParametersError(refExpressionErrors),expr}return super.parseConditional(expr,startLoc,refExpressionErrors)}parseParenItem(node,startLoc){const newNode=super.parseParenItem(node,startLoc);if(this.eat(17)&&(newNode.optional=!0,this.resetEndLocation(node)),this.match(14)){const typeCastNode=this.startNodeAt(startLoc);return typeCastNode.expression=node,typeCastNode.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(typeCastNode,"TSTypeCastExpression")}return node}parseExportDeclaration(node){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(node));const startLoc=this.state.startLoc,isDeclare=this.eatContextual(125);if(isDeclare&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const declaration=tokenIsIdentifier(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(node);return declaration?(("TSInterfaceDeclaration"===declaration.type||"TSTypeAliasDeclaration"===declaration.type||isDeclare)&&(node.exportKind="type"),isDeclare&&"TSImportEqualsDeclaration"!==declaration.type&&(this.resetStartLocation(declaration,startLoc),declaration.declare=!0),declaration):null}parseClassId(node,isStatement,optionalId,bindingType){if((!isStatement||optionalId)&&this.isContextual(113))return;super.parseClassId(node,isStatement,optionalId,node.declare?1024:8331);const typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);typeParameters&&(node.typeParameters=typeParameters)}parseClassPropertyAnnotation(node){node.optional||(this.eat(35)?node.definite=!0:this.eat(17)&&(node.optional=!0));const type=this.tsTryParseTypeAnnotation();type&&(node.typeAnnotation=type)}parseClassProperty(node){if(this.parseClassPropertyAnnotation(node),this.state.isAmbientContext&&(!node.readonly||node.typeAnnotation)&&this.match(29)&&this.raise(TSErrors.DeclareClassFieldHasInitializer,this.state.startLoc),node.abstract&&this.match(29)){const{key}=node;this.raise(TSErrors.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==key.type||node.computed?`[${this.input.slice(this.offsetToSourcePos(key.start),this.offsetToSourcePos(key.end))}]`:key.name})}return super.parseClassProperty(node)}parseClassPrivateProperty(node){return node.abstract&&this.raise(TSErrors.PrivateElementHasAbstract,node),node.accessibility&&this.raise(TSErrors.PrivateElementHasAccessibility,node,{modifier:node.accessibility}),this.parseClassPropertyAnnotation(node),super.parseClassPrivateProperty(node)}parseClassAccessorProperty(node){return this.parseClassPropertyAnnotation(node),node.optional&&this.raise(TSErrors.AccessorCannotBeOptional,node),super.parseClassAccessorProperty(node)}pushClassMethod(classBody,method,isGenerator,isAsync,isConstructor,allowsDirectSuper){const typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier);typeParameters&&isConstructor&&this.raise(TSErrors.ConstructorHasTypeParameters,typeParameters);const{declare=!1,kind}=method;!declare||"get"!==kind&&"set"!==kind||this.raise(TSErrors.DeclareAccessor,method,{kind}),typeParameters&&(method.typeParameters=typeParameters),super.pushClassMethod(classBody,method,isGenerator,isAsync,isConstructor,allowsDirectSuper)}pushClassPrivateMethod(classBody,method,isGenerator,isAsync){const typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier);typeParameters&&(method.typeParameters=typeParameters),super.pushClassPrivateMethod(classBody,method,isGenerator,isAsync)}declareClassPrivateMethodInScope(node,kind){"TSDeclareMethod"!==node.type&&("MethodDefinition"===node.type&&null==node.value.body||super.declareClassPrivateMethodInScope(node,kind))}parseClassSuper(node){super.parseClassSuper(node),node.superClass&&(this.match(47)||this.match(51))&&(node.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(node.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(prop,startLoc,isGenerator,isAsync,isPattern,isAccessor,refExpressionErrors){const typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier);return typeParameters&&(prop.typeParameters=typeParameters),super.parseObjPropValue(prop,startLoc,isGenerator,isAsync,isPattern,isAccessor,refExpressionErrors)}parseFunctionParams(node,isConstructor){const typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier);typeParameters&&(node.typeParameters=typeParameters),super.parseFunctionParams(node,isConstructor)}parseVarId(decl,kind){super.parseVarId(decl,kind),"Identifier"===decl.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(decl.definite=!0);const type=this.tsTryParseTypeAnnotation();type&&(decl.id.typeAnnotation=type,this.resetEndLocation(decl.id))}parseAsyncArrowFromCallExpression(node,call){return this.match(14)&&(node.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(node,call)}parseMaybeAssign(refExpressionErrors,afterLeftParse){var _jsx,_jsx2,_typeCast,_jsx3,_typeCast2;let state,jsx,typeCast,typeParameters;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(state=this.state.clone(),jsx=this.tryParse(()=>super.parseMaybeAssign(refExpressionErrors,afterLeftParse),state),!jsx.error)return jsx.node;const{context}=this.state,currentContext=context[context.length-1];currentContext!==types.j_oTag&¤tContext!==types.j_expr||context.pop()}if(!(null!=(_jsx=jsx)&&_jsx.error||this.match(47)))return super.parseMaybeAssign(refExpressionErrors,afterLeftParse);state&&state!==this.state||(state=this.state.clone());const arrow=this.tryParse(abort=>{var _expr$extra,_typeParameters;typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier);const expr=super.parseMaybeAssign(refExpressionErrors,afterLeftParse);return("ArrowFunctionExpression"!==expr.type||null!=(_expr$extra=expr.extra)&&_expr$extra.parenthesized)&&abort(),0!==(null==(_typeParameters=typeParameters)?void 0:_typeParameters.params.length)&&this.resetStartLocationFromNode(expr,typeParameters),expr.typeParameters=typeParameters,expr},state);if(!arrow.error&&!arrow.aborted)return typeParameters&&this.reportReservedArrowTypeParam(typeParameters),arrow.node;if(!jsx&&(assert(!this.hasPlugin("jsx")),typeCast=this.tryParse(()=>super.parseMaybeAssign(refExpressionErrors,afterLeftParse),state),!typeCast.error))return typeCast.node;if(null!=(_jsx2=jsx)&&_jsx2.node)return this.state=jsx.failState,jsx.node;if(arrow.node)return this.state=arrow.failState,typeParameters&&this.reportReservedArrowTypeParam(typeParameters),arrow.node;if(null!=(_typeCast=typeCast)&&_typeCast.node)return this.state=typeCast.failState,typeCast.node;throw(null==(_jsx3=jsx)?void 0:_jsx3.error)||arrow.error||(null==(_typeCast2=typeCast)?void 0:_typeCast2.error)}reportReservedArrowTypeParam(node){var _node$extra2;1!==node.params.length||node.params[0].constraint||null!=(_node$extra2=node.extra)&&_node$extra2.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(TSErrors.ReservedArrowTypeParam,node)}parseMaybeUnary(refExpressionErrors,sawUnary){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(refExpressionErrors,sawUnary)}parseArrow(node){if(this.match(14)){const result=this.tryParse(abort=>{const returnType=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||abort(),returnType});if(result.aborted)return;result.thrown||(result.error&&(this.state=result.failState),node.returnType=result.node)}return super.parseArrow(node)}parseFunctionParamType(param){this.eat(17)&&(param.optional=!0);const type=this.tsTryParseTypeAnnotation();return type&&(param.typeAnnotation=type),this.resetEndLocation(param),param}isAssignable(node,isBinding){switch(node.type){case"TSTypeCastExpression":return this.isAssignable(node.expression,isBinding);case"TSParameterProperty":return!0;default:return super.isAssignable(node,isBinding)}}toAssignable(node,isLHS=!1){switch(node.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(node,isLHS);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":isLHS?this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter,node):this.raise(TSErrors.UnexpectedTypeCastInParameter,node),this.toAssignable(node.expression,isLHS);break;case"AssignmentExpression":isLHS||"TSTypeCastExpression"!==node.left.type||(node.left=this.typeCastToParameter(node.left));default:super.toAssignable(node,isLHS)}}toAssignableParenthesizedExpression(node,isLHS){switch(node.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(node.expression,isLHS);break;default:super.toAssignable(node,isLHS)}}checkToRestConversion(node,allowPattern){switch(node.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(node.expression,!1);break;default:super.checkToRestConversion(node,allowPattern)}}isValidLVal(type,isUnparenthesizedInAssign,binding){switch(type){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==binding||!isUnparenthesizedInAssign)&&["expression",!0];default:return super.isValidLVal(type,isUnparenthesizedInAssign,binding)}}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(expr,startLoc){if(this.match(47)||this.match(51)){const typeArguments=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const call=super.parseMaybeDecoratorArguments(expr,startLoc);return call.typeParameters=typeArguments,call}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(expr,startLoc)}checkCommaAfterRest(close){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===close?(this.next(),!1):super.checkCommaAfterRest(close)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(startLoc,left){const node=super.parseMaybeDefault(startLoc,left);return"AssignmentPattern"===node.type&&node.typeAnnotation&&node.right.startthis.isAssignable(expr,!0)):super.shouldParseArrow(params)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(node){if(this.match(47)||this.match(51)){const typeArguments=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());typeArguments&&(node.typeParameters=typeArguments)}return super.jsxParseOpeningElementAfterName(node)}getGetterSetterExpectedParamCount(method){const baseCount=super.getGetterSetterExpectedParamCount(method),firstParam=this.getObjectOrClassMethodParams(method)[0];return firstParam&&this.isThisParam(firstParam)?baseCount+1:baseCount}parseCatchClauseParam(){const param=super.parseCatchClauseParam(),type=this.tsTryParseTypeAnnotation();return type&&(param.typeAnnotation=type,this.resetEndLocation(param)),param}tsInAmbientContext(cb){const{isAmbientContext:oldIsAmbientContext,strict:oldStrict}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return cb()}finally{this.state.isAmbientContext=oldIsAmbientContext,this.state.strict=oldStrict}}parseClass(node,isStatement,optionalId){const oldInAbstractClass=this.state.inAbstractClass;this.state.inAbstractClass=!!node.abstract;try{return super.parseClass(node,isStatement,optionalId)}finally{this.state.inAbstractClass=oldInAbstractClass}}tsParseAbstractDeclaration(node,decorators){if(this.match(80))return node.abstract=!0,this.maybeTakeDecorators(decorators,this.parseClass(node,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return node.abstract=!0,this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier,node),this.tsParseInterfaceDeclaration(node)}else this.unexpected(null,80)}parseMethod(node,isGenerator,isAsync,isConstructor,allowDirectSuper,type,inClassScope){const method=super.parseMethod(node,isGenerator,isAsync,isConstructor,allowDirectSuper,type,inClassScope);if(method.abstract||"TSAbstractMethodDefinition"===method.type){if((this.hasPlugin("estree")?method.value:method).body){const{key}=method;this.raise(TSErrors.AbstractMethodHasImplementation,method,{methodName:"Identifier"!==key.type||method.computed?`[${this.input.slice(this.offsetToSourcePos(key.start),this.offsetToSourcePos(key.end))}]`:key.name})}}return method}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(node,isString,isInTypeExport,isMaybeTypeOnly){return!isString&&isMaybeTypeOnly?(this.parseTypeOnlyImportExportSpecifier(node,!1,isInTypeExport),this.finishNode(node,"ExportSpecifier")):(node.exportKind="value",super.parseExportSpecifier(node,isString,isInTypeExport,isMaybeTypeOnly))}parseImportSpecifier(specifier,importedIsString,isInTypeOnlyImport,isMaybeTypeOnly,bindingType){return!importedIsString&&isMaybeTypeOnly?(this.parseTypeOnlyImportExportSpecifier(specifier,!0,isInTypeOnlyImport),this.finishNode(specifier,"ImportSpecifier")):(specifier.importKind="value",super.parseImportSpecifier(specifier,importedIsString,isInTypeOnlyImport,isMaybeTypeOnly,isInTypeOnlyImport?4098:4096))}parseTypeOnlyImportExportSpecifier(node,isImport,isInTypeOnlyImportExport){const leftOfAsKey=isImport?"imported":"local",rightOfAsKey=isImport?"local":"exported";let rightOfAs,leftOfAs=node[leftOfAsKey],hasTypeSpecifier=!1,canParseAsKeyword=!0;const loc=leftOfAs.loc.start;if(this.isContextual(93)){const firstAs=this.parseIdentifier();if(this.isContextual(93)){const secondAs=this.parseIdentifier();tokenIsKeywordOrIdentifier(this.state.type)?(hasTypeSpecifier=!0,leftOfAs=firstAs,rightOfAs=isImport?this.parseIdentifier():this.parseModuleExportName(),canParseAsKeyword=!1):(rightOfAs=secondAs,canParseAsKeyword=!1)}else tokenIsKeywordOrIdentifier(this.state.type)?(canParseAsKeyword=!1,rightOfAs=isImport?this.parseIdentifier():this.parseModuleExportName()):(hasTypeSpecifier=!0,leftOfAs=firstAs)}else tokenIsKeywordOrIdentifier(this.state.type)&&(hasTypeSpecifier=!0,isImport?(leftOfAs=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(leftOfAs.name,leftOfAs.loc.start,!0,!0)):leftOfAs=this.parseModuleExportName());hasTypeSpecifier&&isInTypeOnlyImportExport&&this.raise(isImport?TSErrors.TypeModifierIsUsedInTypeImports:TSErrors.TypeModifierIsUsedInTypeExports,loc),node[leftOfAsKey]=leftOfAs,node[rightOfAsKey]=rightOfAs;node[isImport?"importKind":"exportKind"]=hasTypeSpecifier?"type":"value",canParseAsKeyword&&this.eatContextual(93)&&(node[rightOfAsKey]=isImport?this.parseIdentifier():this.parseModuleExportName()),node[rightOfAsKey]||(node[rightOfAsKey]=this.cloneIdentifier(node[leftOfAsKey])),isImport&&this.checkIdentifier(node[rightOfAsKey],hasTypeSpecifier?4098:4096)}fillOptionalPropertiesForTSESLint(node){switch(node.type){case"ExpressionStatement":return void(null!=node.directive||(node.directive=void 0));case"RestElement":node.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return null!=node.decorators||(node.decorators=[]),null!=node.optional||(node.optional=!1),void(null!=node.typeAnnotation||(node.typeAnnotation=void 0));case"TSParameterProperty":return null!=node.accessibility||(node.accessibility=void 0),null!=node.decorators||(node.decorators=[]),null!=node.override||(node.override=!1),null!=node.readonly||(node.readonly=!1),void(null!=node.static||(node.static=!1));case"TSEmptyBodyFunctionExpression":node.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return null!=node.declare||(node.declare=!1),null!=node.returnType||(node.returnType=void 0),void(null!=node.typeParameters||(node.typeParameters=void 0));case"Property":return void(null!=node.optional||(node.optional=!1));case"TSMethodSignature":case"TSPropertySignature":null!=node.optional||(node.optional=!1);case"TSIndexSignature":return null!=node.accessibility||(node.accessibility=void 0),null!=node.readonly||(node.readonly=!1),void(null!=node.static||(node.static=!1));case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":null!=node.declare||(node.declare=!1),null!=node.definite||(node.definite=!1),null!=node.readonly||(node.readonly=!1),null!=node.typeAnnotation||(node.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":return null!=node.accessibility||(node.accessibility=void 0),null!=node.decorators||(node.decorators=[]),null!=node.override||(node.override=!1),void(null!=node.optional||(node.optional=!1));case"ClassExpression":null!=node.id||(node.id=null);case"ClassDeclaration":return null!=node.abstract||(node.abstract=!1),null!=node.declare||(node.declare=!1),null!=node.decorators||(node.decorators=[]),null!=node.implements||(node.implements=[]),null!=node.superTypeArguments||(node.superTypeArguments=void 0),void(null!=node.typeParameters||(node.typeParameters=void 0));case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(null!=node.declare||(node.declare=!1));case"VariableDeclarator":return void(null!=node.definite||(node.definite=!1));case"TSEnumDeclaration":return null!=node.const||(node.const=!1),void(null!=node.declare||(node.declare=!1));case"TSEnumMember":return void(null!=node.computed||(node.computed=!1));case"TSImportType":return null!=node.qualifier||(node.qualifier=null),void(null!=node.options||(node.options=null));case"TSInterfaceDeclaration":return null!=node.declare||(node.declare=!1),void(null!=node.extends||(node.extends=[]));case"TSModuleDeclaration":return null!=node.declare||(node.declare=!1),void(null!=node.global||(node.global="global"===node.kind));case"TSTypeParameter":return null!=node.const||(node.const=!1),null!=node.in||(node.in=!1),void(null!=node.out||(node.out=!1))}}},v8intrinsic:superClass=>class extends superClass{parseV8Intrinsic(){if(this.match(54)){const v8IntrinsicStartLoc=this.state.startLoc,node=this.startNode();if(this.next(),tokenIsIdentifier(this.state.type)){const name=this.parseIdentifierName(),identifier=this.createIdentifier(node,name);if(this.castNodeTo(identifier,"V8IntrinsicIdentifier"),this.match(10))return identifier}this.unexpected(v8IntrinsicStartLoc)}}parseExprAtom(refExpressionErrors){return this.parseV8Intrinsic()||super.parseExprAtom(refExpressionErrors)}},placeholders:superClass=>class extends superClass{parsePlaceholder(expectedNode){if(this.match(133)){const node=this.startNode();return this.next(),this.assertNoSpace(),node.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(node,expectedNode)}}finishPlaceholder(node,expectedNode){let placeholder=node;return placeholder.expectedNode&&placeholder.type||(placeholder=this.finishNode(placeholder,"Placeholder")),placeholder.expectedNode=expectedNode,placeholder}getTokenFromCode(code){37===code&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(133,2):super.getTokenFromCode(code)}parseExprAtom(refExpressionErrors){return this.parsePlaceholder("Expression")||super.parseExprAtom(refExpressionErrors)}parseIdentifier(liberal){return this.parsePlaceholder("Identifier")||super.parseIdentifier(liberal)}checkReservedWord(word,startLoc,checkKeywords,isBinding){void 0!==word&&super.checkReservedWord(word,startLoc,checkKeywords,isBinding)}cloneIdentifier(node){const cloned=super.cloneIdentifier(node);return"Placeholder"===cloned.type&&(cloned.expectedNode=node.expectedNode),cloned}cloneStringLiteral(node){return"Placeholder"===node.type?this.cloneIdentifier(node):super.cloneStringLiteral(node)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(type,isParenthesized,binding){return"Placeholder"===type||super.isValidLVal(type,isParenthesized,binding)}toAssignable(node,isLHS){node&&"Placeholder"===node.type&&"Expression"===node.expectedNode?node.expectedNode="Pattern":super.toAssignable(node,isLHS)}chStartsBindingIdentifier(ch,pos){if(super.chStartsBindingIdentifier(ch,pos))return!0;const next=this.nextTokenStart();return 37===this.input.charCodeAt(next)&&37===this.input.charCodeAt(next+1)}verifyBreakContinue(node,isBreak){node.label&&"Placeholder"===node.label.type||super.verifyBreakContinue(node,isBreak)}parseExpressionStatement(node,expr){var _expr$extra;if("Placeholder"!==expr.type||null!=(_expr$extra=expr.extra)&&_expr$extra.parenthesized)return super.parseExpressionStatement(node,expr);if(this.match(14)){const stmt=node;return stmt.label=this.finishPlaceholder(expr,"Identifier"),this.next(),stmt.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(stmt,"LabeledStatement")}this.semicolon();const stmtPlaceholder=node;return stmtPlaceholder.name=expr.name,this.finishPlaceholder(stmtPlaceholder,"Statement")}parseBlock(allowDirectives,createNewLexicalScope,afterBlockParse){return this.parsePlaceholder("BlockStatement")||super.parseBlock(allowDirectives,createNewLexicalScope,afterBlockParse)}parseFunctionId(requireId){return this.parsePlaceholder("Identifier")||super.parseFunctionId(requireId)}parseClass(node,isStatement,optionalId){const type=isStatement?"ClassDeclaration":"ClassExpression";this.next();const oldStrict=this.state.strict,placeholder=this.parsePlaceholder("Identifier");if(placeholder){if(!(this.match(81)||this.match(133)||this.match(5))){if(optionalId||!isStatement)return node.id=null,node.body=this.finishPlaceholder(placeholder,"ClassBody"),this.finishNode(node,type);throw this.raise(PlaceholderErrors.ClassNameIsRequired,this.state.startLoc)}node.id=placeholder}else this.parseClassId(node,isStatement,optionalId);return super.parseClassSuper(node),node.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!node.superClass,oldStrict),this.finishNode(node,type)}parseExport(node,decorators){const placeholder=this.parsePlaceholder("Identifier");if(!placeholder)return super.parseExport(node,decorators);const node2=node;if(!this.isContextual(98)&&!this.match(12))return node2.specifiers=[],node2.source=null,node2.declaration=this.finishPlaceholder(placeholder,"Declaration"),this.finishNode(node2,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const specifier=this.startNode();return specifier.exported=placeholder,node2.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")],super.parseExport(node2,decorators)}isExportDefaultSpecifier(){if(this.match(65)){const next=this.nextTokenStart();if(this.isUnparsedContextual(next,"from")&&this.input.startsWith(tokenLabelName(133),this.nextTokenStartSince(next+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(node,maybeDefaultIdentifier){var _specifiers;return!(null==(_specifiers=node.specifiers)||!_specifiers.length)||super.maybeParseExportDefaultSpecifier(node,maybeDefaultIdentifier)}checkExport(node){const{specifiers}=node;null!=specifiers&&specifiers.length&&(node.specifiers=specifiers.filter(node=>"Placeholder"===node.exported.type)),super.checkExport(node),node.specifiers=specifiers}parseImport(node){const placeholder=this.parsePlaceholder("Identifier");if(!placeholder)return super.parseImport(node);if(node.specifiers=[],!this.isContextual(98)&&!this.match(12))return node.source=this.finishPlaceholder(placeholder,"StringLiteral"),this.semicolon(),this.finishNode(node,"ImportDeclaration");const specifier=this.startNodeAtNode(placeholder);if(specifier.local=placeholder,node.specifiers.push(this.finishNode(specifier,"ImportDefaultSpecifier")),this.eat(12)){this.maybeParseStarImportSpecifier(node)||this.parseNamedImportSpecifiers(node)}return this.expectContextual(98),node.source=this.parseImportSource(),this.semicolon(),this.finishNode(node,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(PlaceholderErrors.UnexpectedSpace,this.state.lastTokEndLoc)}}},mixinPluginNames=Object.keys(mixinPlugins);class ExpressionParser extends LValParser{checkProto(prop,isRecord,sawProto,refExpressionErrors){if("SpreadElement"===prop.type||this.isObjectMethod(prop)||prop.computed||prop.shorthand)return sawProto;const key=prop.key;return"__proto__"===("Identifier"===key.type?key.name:key.value)?isRecord?(this.raise(Errors.RecordNoProto,key),!0):(sawProto&&(refExpressionErrors?null===refExpressionErrors.doubleProtoLoc&&(refExpressionErrors.doubleProtoLoc=key.loc.start):this.raise(Errors.DuplicateProto,key)),!0):sawProto}shouldExitDescending(expr,potentialArrowAt){return"ArrowFunctionExpression"===expr.type&&this.offsetToSourcePos(expr.start)===potentialArrowAt}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(Errors.ParseExpressionEmptyInput,this.state.startLoc);const expr=this.parseExpression();if(!this.match(140))throw this.raise(Errors.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),expr.comments=this.comments,expr.errors=this.state.errors,256&this.optionFlags&&(expr.tokens=this.tokens),expr}parseExpression(disallowIn,refExpressionErrors){return disallowIn?this.disallowInAnd(()=>this.parseExpressionBase(refExpressionErrors)):this.allowInAnd(()=>this.parseExpressionBase(refExpressionErrors))}parseExpressionBase(refExpressionErrors){const startLoc=this.state.startLoc,expr=this.parseMaybeAssign(refExpressionErrors);if(this.match(12)){const node=this.startNodeAt(startLoc);for(node.expressions=[expr];this.eat(12);)node.expressions.push(this.parseMaybeAssign(refExpressionErrors));return this.toReferencedList(node.expressions),this.finishNode(node,"SequenceExpression")}return expr}parseMaybeAssignDisallowIn(refExpressionErrors,afterLeftParse){return this.disallowInAnd(()=>this.parseMaybeAssign(refExpressionErrors,afterLeftParse))}parseMaybeAssignAllowIn(refExpressionErrors,afterLeftParse){return this.allowInAnd(()=>this.parseMaybeAssign(refExpressionErrors,afterLeftParse))}setOptionalParametersError(refExpressionErrors){refExpressionErrors.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(refExpressionErrors,afterLeftParse){const startLoc=this.state.startLoc,isYield=this.isContextual(108);if(isYield&&this.prodParam.hasYield){this.next();let left=this.parseYield(startLoc);return afterLeftParse&&(left=afterLeftParse.call(this,left,startLoc)),left}let ownExpressionErrors;refExpressionErrors?ownExpressionErrors=!1:(refExpressionErrors=new ExpressionErrors,ownExpressionErrors=!0);const{type}=this.state;(10===type||tokenIsIdentifier(type))&&(this.state.potentialArrowAt=this.state.start);let left=this.parseMaybeConditional(refExpressionErrors);if(afterLeftParse&&(left=afterLeftParse.call(this,left,startLoc)),(token=this.state.type)>=29&&token<=33){const node=this.startNodeAt(startLoc),operator=this.state.value;if(node.operator=operator,this.match(29)){this.toAssignable(left,!0),node.left=left;const startIndex=startLoc.index;null!=refExpressionErrors.doubleProtoLoc&&refExpressionErrors.doubleProtoLoc.index>=startIndex&&(refExpressionErrors.doubleProtoLoc=null),null!=refExpressionErrors.shorthandAssignLoc&&refExpressionErrors.shorthandAssignLoc.index>=startIndex&&(refExpressionErrors.shorthandAssignLoc=null),null!=refExpressionErrors.privateKeyLoc&&refExpressionErrors.privateKeyLoc.index>=startIndex&&(this.checkDestructuringPrivate(refExpressionErrors),refExpressionErrors.privateKeyLoc=null),null!=refExpressionErrors.voidPatternLoc&&refExpressionErrors.voidPatternLoc.index>=startIndex&&(refExpressionErrors.voidPatternLoc=null)}else node.left=left;return this.next(),node.right=this.parseMaybeAssign(),this.checkLVal(left,this.finishNode(node,"AssignmentExpression")),node}var token;if(ownExpressionErrors&&this.checkExpressionErrors(refExpressionErrors,!0),isYield){const{type}=this.state;if((this.hasPlugin("v8intrinsic")?tokenCanStartExpression(type):tokenCanStartExpression(type)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(Errors.YieldNotInGeneratorFunction,startLoc),this.parseYield(startLoc)}return left}parseMaybeConditional(refExpressionErrors){const startLoc=this.state.startLoc,potentialArrowAt=this.state.potentialArrowAt,expr=this.parseExprOps(refExpressionErrors);return this.shouldExitDescending(expr,potentialArrowAt)?expr:this.parseConditional(expr,startLoc,refExpressionErrors)}parseConditional(expr,startLoc,refExpressionErrors){if(this.eat(17)){const node=this.startNodeAt(startLoc);return node.test=expr,node.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),node.alternate=this.parseMaybeAssign(),this.finishNode(node,"ConditionalExpression")}return expr}parseMaybeUnaryOrPrivate(refExpressionErrors){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(refExpressionErrors)}parseExprOps(refExpressionErrors){const startLoc=this.state.startLoc,potentialArrowAt=this.state.potentialArrowAt,expr=this.parseMaybeUnaryOrPrivate(refExpressionErrors);return this.shouldExitDescending(expr,potentialArrowAt)?expr:this.parseExprOp(expr,startLoc,-1)}parseExprOp(left,leftStartLoc,minPrec){if(this.isPrivateName(left)){const value=this.getPrivateNameSV(left);(minPrec>=tokenOperatorPrecedence(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(Errors.PrivateInExpectedIn,left,{identifierName:value}),this.classScope.usePrivateName(value,left.loc.start)}const op=this.state.type;if((token=op)>=39&&token<=59&&(this.prodParam.hasIn||!this.match(58))){let prec=tokenOperatorPrecedence(op);if(prec>minPrec){if(39===op){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return left;this.checkPipelineAtInfixOperator(left,leftStartLoc)}const node=this.startNodeAt(leftStartLoc);node.left=left,node.operator=this.state.value;const logical=41===op||42===op,coalesce=40===op;if(coalesce&&(prec=tokenOperatorPrecedence(42)),this.next(),39===op&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);node.right=this.parseExprOpRightExpr(op,prec);const finishedNode=this.finishNode(node,logical||coalesce?"LogicalExpression":"BinaryExpression"),nextOp=this.state.type;if(coalesce&&(41===nextOp||42===nextOp)||logical&&40===nextOp)throw this.raise(Errors.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(finishedNode,leftStartLoc,minPrec)}}var token;return left}parseExprOpRightExpr(op,prec){const startLoc=this.state.startLoc;if(39===op){switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(prec))}if("smart"===this.getPluginOption("pipelineOperator","proposal"))return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(Errors.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op,prec),startLoc)})}return this.parseExprOpBaseRightExpr(op,prec)}parseExprOpBaseRightExpr(op,prec){const startLoc=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),startLoc,57===op?prec-1:prec)}parseHackPipeBody(){var _body$extra;const{startLoc}=this.state,body=this.parseMaybeAssign();return!UnparenthesizedPipeBodyDescriptions.has(body.type)||null!=(_body$extra=body.extra)&&_body$extra.parenthesized||this.raise(Errors.PipeUnparenthesizedBody,startLoc,{type:body.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(Errors.PipeTopicUnused,startLoc),body}checkExponentialAfterUnary(node){this.match(57)&&this.raise(Errors.UnexpectedTokenUnaryExponentiation,node.argument)}parseMaybeUnary(refExpressionErrors,sawUnary){const startLoc=this.state.startLoc,isAwait=this.isContextual(96);if(isAwait&&this.recordAwaitIfAllowed()){this.next();const expr=this.parseAwait(startLoc);return sawUnary||this.checkExponentialAfterUnary(expr),expr}const update=this.match(34),node=this.startNode();if(token=this.state.type,tokenPrefixes[token]){node.operator=this.state.value,node.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const isDelete=this.match(89);if(this.next(),node.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(refExpressionErrors,!0),this.state.strict&&isDelete){const arg=node.argument;"Identifier"===arg.type?this.raise(Errors.StrictDelete,node):this.hasPropertyAsPrivateName(arg)&&this.raise(Errors.DeletePrivateField,node)}if(!update)return sawUnary||this.checkExponentialAfterUnary(node),this.finishNode(node,"UnaryExpression")}var token;const expr=this.parseUpdate(node,update,refExpressionErrors);if(isAwait){const{type}=this.state;if((this.hasPlugin("v8intrinsic")?tokenCanStartExpression(type):tokenCanStartExpression(type)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(Errors.AwaitNotInAsyncContext,startLoc),this.parseAwait(startLoc)}return expr}parseUpdate(node,update,refExpressionErrors){if(update){const updateExpressionNode=node;return this.checkLVal(updateExpressionNode.argument,this.finishNode(updateExpressionNode,"UpdateExpression")),node}const startLoc=this.state.startLoc;let expr=this.parseExprSubscripts(refExpressionErrors);if(this.checkExpressionErrors(refExpressionErrors,!1))return expr;for(;tokenIsPostfix(this.state.type)&&!this.canInsertSemicolon();){const node=this.startNodeAt(startLoc);node.operator=this.state.value,node.prefix=!1,node.argument=expr,this.next(),this.checkLVal(expr,expr=this.finishNode(node,"UpdateExpression"))}return expr}parseExprSubscripts(refExpressionErrors){const startLoc=this.state.startLoc,potentialArrowAt=this.state.potentialArrowAt,expr=this.parseExprAtom(refExpressionErrors);return this.shouldExitDescending(expr,potentialArrowAt)?expr:this.parseSubscripts(expr,startLoc)}parseSubscripts(base,startLoc,noCalls){const state={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(base),stop:!1};do{base=this.parseSubscript(base,startLoc,noCalls,state),state.maybeAsyncArrow=!1}while(!state.stop);return base}parseSubscript(base,startLoc,noCalls,state){const{type}=this.state;if(!noCalls&&15===type)return this.parseBind(base,startLoc,noCalls,state);if(tokenIsTemplate(type))return this.parseTaggedTemplateExpression(base,startLoc,state);let optional=!1;if(18===type){if(noCalls&&(this.raise(Errors.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(base,state);state.optionalChainMember=optional=!0,this.next()}if(!noCalls&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(base,startLoc,state,optional);{const computed=this.eat(0);return computed||optional||this.eat(16)?this.parseMember(base,startLoc,state,computed,optional):this.stopParseSubscript(base,state)}}stopParseSubscript(base,state){return state.stop=!0,base}parseMember(base,startLoc,state,computed,optional){const node=this.startNodeAt(startLoc);return node.object=base,node.computed=computed,computed?(node.property=this.parseExpression(),this.expect(3)):this.match(139)?("Super"===base.type&&this.raise(Errors.SuperPrivateField,startLoc),this.classScope.usePrivateName(this.state.value,this.state.startLoc),node.property=this.parsePrivateName()):node.property=this.parseIdentifier(!0),state.optionalChainMember?(node.optional=optional,this.finishNode(node,"OptionalMemberExpression")):this.finishNode(node,"MemberExpression")}parseBind(base,startLoc,noCalls,state){const node=this.startNodeAt(startLoc);return node.object=base,this.next(),node.callee=this.parseNoCallExpr(),state.stop=!0,this.parseSubscripts(this.finishNode(node,"BindExpression"),startLoc,noCalls)}parseCoverCallAndAsyncArrowHead(base,startLoc,state,optional){const oldMaybeInArrowParameters=this.state.maybeInArrowParameters;let refExpressionErrors=null;this.state.maybeInArrowParameters=!0,this.next();const node=this.startNodeAt(startLoc);node.callee=base;const{maybeAsyncArrow,optionalChainMember}=state;maybeAsyncArrow&&(this.expressionScope.enter(new ArrowHeadParsingScope(2)),refExpressionErrors=new ExpressionErrors),optionalChainMember&&(node.optional=optional),node.arguments=optional?this.parseCallExpressionArguments():this.parseCallExpressionArguments("Super"!==base.type,node,refExpressionErrors);let finishedNode=this.finishCallExpression(node,optionalChainMember);return maybeAsyncArrow&&this.shouldParseAsyncArrow()&&!optional?(state.stop=!0,this.checkDestructuringPrivate(refExpressionErrors),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),finishedNode=this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc),finishedNode)):(maybeAsyncArrow&&(this.checkExpressionErrors(refExpressionErrors,!0),this.expressionScope.exit()),this.toReferencedArguments(finishedNode)),this.state.maybeInArrowParameters=oldMaybeInArrowParameters,finishedNode}toReferencedArguments(node,isParenthesizedExpr){this.toReferencedListDeep(node.arguments,isParenthesizedExpr)}parseTaggedTemplateExpression(base,startLoc,state){const node=this.startNodeAt(startLoc);return node.tag=base,node.quasi=this.parseTemplate(!0),state.optionalChainMember&&this.raise(Errors.OptionalChainingNoTemplate,startLoc),this.finishNode(node,"TaggedTemplateExpression")}atPossibleAsyncArrow(base){return"Identifier"===base.type&&"async"===base.name&&this.state.lastTokEndLoc.index===base.end&&!this.canInsertSemicolon()&&base.end-base.start===5&&this.offsetToSourcePos(base.start)===this.state.potentialArrowAt}finishCallExpression(node,optional){if("Import"===node.callee.type)if(0===node.arguments.length||node.arguments.length>2)this.raise(Errors.ImportCallArity,node);else for(const arg of node.arguments)"SpreadElement"===arg.type&&this.raise(Errors.ImportCallSpreadArgument,arg);return this.finishNode(node,optional?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(allowPlaceholder,nodeForExtra,refExpressionErrors){const elts=[];let first=!0;const oldInFSharpPipelineDirectBody=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(first)first=!1;else if(this.expect(12),this.match(11)){nodeForExtra&&this.addTrailingCommaExtraToNode(nodeForExtra),this.next();break}elts.push(this.parseExprListItem(11,!1,refExpressionErrors,allowPlaceholder))}return this.state.inFSharpPipelineDirectBody=oldInFSharpPipelineDirectBody,elts}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(node,call){var _call$extra;return this.resetPreviousNodeTrailingComments(call),this.expect(19),this.parseArrowExpression(node,call.arguments,!0,null==(_call$extra=call.extra)?void 0:_call$extra.trailingCommaLoc),call.innerComments&&setInnerComments(node,call.innerComments),call.callee.trailingComments&&setInnerComments(node,call.callee.trailingComments),node}parseNoCallExpr(){const startLoc=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),startLoc,!0)}parseExprAtom(refExpressionErrors){let node,decorators=null;const{type}=this.state;switch(type){case 79:return this.parseSuper();case 83:return node=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(node):this.match(10)?512&this.optionFlags?this.parseImportCall(node):this.finishNode(node,"Import"):(this.raise(Errors.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(node,"Import"));case 78:return node=this.startNode(),this.next(),this.finishNode(node,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const canBeArrow=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(canBeArrow)}case 0:return this.parseArrayLike(3,!0,!1,refExpressionErrors);case 5:return this.parseObjectLike(8,!1,!1,refExpressionErrors);case 68:return this.parseFunctionOrFunctionSent();case 26:decorators=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(decorators,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{node=this.startNode(),this.next(),node.object=null;const callee=node.callee=this.parseNoCallExpr();if("MemberExpression"===callee.type)return this.finishNode(node,"BindExpression");throw this.raise(Errors.UnsupportedBind,callee)}case 139:return this.raise(Errors.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const pipeProposal=this.getPluginOption("pipelineOperator","proposal");if(pipeProposal)return this.parseTopicReference(pipeProposal);this.unexpected();break}case 47:{const lookaheadCh=this.input.codePointAt(this.nextTokenStart());isIdentifierStart(lookaheadCh)||62===lookaheadCh?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(137===type)return this.parseDecimalLiteral(this.state.value);if(2===type||1===type)return this.parseArrayLike(2===this.state.type?4:3,!1,!0);if(6===type||7===type)return this.parseObjectLike(6===this.state.type?9:8,!1,!0);if(tokenIsIdentifier(type)){if(this.isContextual(127)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const canBeArrow=this.state.potentialArrowAt===this.state.start,containsEsc=this.state.containsEsc,id=this.parseIdentifier();if(!containsEsc&&"async"===id.name&&!this.canInsertSemicolon()){const{type}=this.state;if(68===type)return this.resetPreviousNodeTrailingComments(id),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(id));if(tokenIsIdentifier(type))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)):id;if(90===type)return this.resetPreviousNodeTrailingComments(id),this.parseDo(this.startNodeAtNode(id),!0)}return canBeArrow&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(id),[id],!1)):id}this.unexpected()}}parseTopicReferenceThenEqualsSign(topicTokenType,topicTokenValue){const pipeProposal=this.getPluginOption("pipelineOperator","proposal");if(pipeProposal)return this.state.type=topicTokenType,this.state.value=topicTokenValue,this.state.pos--,this.state.end--,this.state.endLoc=createPositionWithColumnOffset(this.state.endLoc,-1),this.parseTopicReference(pipeProposal);this.unexpected()}parseTopicReference(pipeProposal){const node=this.startNode(),startLoc=this.state.startLoc,tokenType=this.state.type;return this.next(),this.finishTopicReference(node,startLoc,pipeProposal,tokenType)}finishTopicReference(node,startLoc,pipeProposal,tokenType){if(this.testTopicReferenceConfiguration(pipeProposal,startLoc,tokenType))return"hack"===pipeProposal?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(Errors.PipeTopicUnbound,startLoc),this.registerTopicReference(),this.finishNode(node,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(Errors.PrimaryTopicNotAllowed,startLoc),this.registerTopicReference(),this.finishNode(node,"PipelinePrimaryTopicReference"));throw this.raise(Errors.PipeTopicUnconfiguredToken,startLoc,{token:tokenLabelName(tokenType)})}testTopicReferenceConfiguration(pipeProposal,startLoc,tokenType){switch(pipeProposal){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:tokenLabelName(tokenType)}]);case"smart":return 27===tokenType;default:throw this.raise(Errors.PipeTopicRequiresHackPipes,startLoc)}}parseAsyncArrowUnaryFunction(node){this.prodParam.enter(functionFlags(!0,this.prodParam.hasYield));const params=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(Errors.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(node,params,!0)}parseDo(node,isAsync){this.expectPlugin("doExpressions"),isAsync&&this.expectPlugin("asyncDoExpressions"),node.async=isAsync,this.next();const oldLabels=this.state.labels;return this.state.labels=[],isAsync?(this.prodParam.enter(2),node.body=this.parseBlock(),this.prodParam.exit()):node.body=this.parseBlock(),this.state.labels=oldLabels,this.finishNode(node,"DoExpression")}parseSuper(){const node=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||16&this.optionFlags?this.scope.allowSuper||16&this.optionFlags||this.raise(Errors.UnexpectedSuper,node):this.raise(Errors.SuperNotAllowed,node),this.match(10)||this.match(0)||this.match(16)||this.raise(Errors.UnsupportedSuper,node),this.finishNode(node,"Super")}parsePrivateName(){const node=this.startNode(),id=this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc,1)),name=this.state.value;return this.next(),node.id=this.createIdentifier(id,name),this.finishNode(node,"PrivateName")}parseFunctionOrFunctionSent(){const node=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const meta=this.createIdentifier(this.startNodeAtNode(node),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(node,meta,"sent")}return this.parseFunction(node)}parseMetaProperty(node,meta,propertyName){node.meta=meta;const containsEsc=this.state.containsEsc;return node.property=this.parseIdentifier(!0),(node.property.name!==propertyName||containsEsc)&&this.raise(Errors.UnsupportedMetaProperty,node.property,{target:meta.name,onlyValidPropertyName:propertyName}),this.finishNode(node,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(node){if(this.next(),this.isContextual(105)||this.isContextual(97)){const isSource=this.isContextual(105);return this.expectPlugin(isSource?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),node.phase=isSource?"source":"defer",this.parseImportCall(node)}{const id=this.createIdentifierAt(this.startNodeAtNode(node),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(Errors.ImportMetaOutsideModule,id),this.sawUnambiguousESM=!0),this.parseMetaProperty(node,id,"meta")}}parseLiteralAtNode(value,type,node){return this.addExtra(node,"rawValue",value),this.addExtra(node,"raw",this.input.slice(this.offsetToSourcePos(node.start),this.state.end)),node.value=value,this.next(),this.finishNode(node,type)}parseLiteral(value,type){const node=this.startNode();return this.parseLiteralAtNode(value,type,node)}parseStringLiteral(value){return this.parseLiteral(value,"StringLiteral")}parseNumericLiteral(value){return this.parseLiteral(value,"NumericLiteral")}parseBigIntLiteral(value){return this.parseLiteral(value,"BigIntLiteral")}parseDecimalLiteral(value){return this.parseLiteral(value,"DecimalLiteral")}parseRegExpLiteral(value){const node=this.startNode();return this.addExtra(node,"raw",this.input.slice(this.offsetToSourcePos(node.start),this.state.end)),node.pattern=value.pattern,node.flags=value.flags,this.next(),this.finishNode(node,"RegExpLiteral")}parseBooleanLiteral(value){const node=this.startNode();return node.value=value,this.next(),this.finishNode(node,"BooleanLiteral")}parseNullLiteral(){const node=this.startNode();return this.next(),this.finishNode(node,"NullLiteral")}parseParenAndDistinguishExpression(canBeArrow){const startLoc=this.state.startLoc;let val;this.next(),this.expressionScope.enter(new ArrowHeadParsingScope(1));const oldMaybeInArrowParameters=this.state.maybeInArrowParameters,oldInFSharpPipelineDirectBody=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const innerStartLoc=this.state.startLoc,exprList=[],refExpressionErrors=new ExpressionErrors;let spreadStartLoc,optionalCommaStartLoc,first=!0;for(;!this.match(11);){if(first)first=!1;else if(this.expect(12,null===refExpressionErrors.optionalParametersLoc?null:refExpressionErrors.optionalParametersLoc),this.match(11)){optionalCommaStartLoc=this.state.startLoc;break}if(this.match(21)){const spreadNodeStartLoc=this.state.startLoc;if(spreadStartLoc=this.state.startLoc,exprList.push(this.parseParenItem(this.parseRestBinding(),spreadNodeStartLoc)),!this.checkCommaAfterRest(41))break}else exprList.push(this.parseMaybeAssignAllowInOrVoidPattern(11,refExpressionErrors,this.parseParenItem))}const innerEndLoc=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=oldMaybeInArrowParameters,this.state.inFSharpPipelineDirectBody=oldInFSharpPipelineDirectBody;let arrowNode=this.startNodeAt(startLoc);return canBeArrow&&this.shouldParseArrow(exprList)&&(arrowNode=this.parseArrow(arrowNode))?(this.checkDestructuringPrivate(refExpressionErrors),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(arrowNode,exprList,!1),arrowNode):(this.expressionScope.exit(),exprList.length||this.unexpected(this.state.lastTokStartLoc),optionalCommaStartLoc&&this.unexpected(optionalCommaStartLoc),spreadStartLoc&&this.unexpected(spreadStartLoc),this.checkExpressionErrors(refExpressionErrors,!0),this.toReferencedListDeep(exprList,!0),exprList.length>1?(val=this.startNodeAt(innerStartLoc),val.expressions=exprList,this.finishNode(val,"SequenceExpression"),this.resetEndLocation(val,innerEndLoc)):val=exprList[0],this.wrapParenthesis(startLoc,val))}wrapParenthesis(startLoc,expression){if(!(1024&this.optionFlags))return this.addExtra(expression,"parenthesized",!0),this.addExtra(expression,"parenStart",startLoc.index),this.takeSurroundingComments(expression,startLoc.index,this.state.lastTokEndLoc.index),expression;const parenExpression=this.startNodeAt(startLoc);return parenExpression.expression=expression,this.finishNode(parenExpression,"ParenthesizedExpression")}shouldParseArrow(params){return!this.canInsertSemicolon()}parseArrow(node){if(this.eat(19))return node}parseParenItem(node,startLoc){return node}parseNewOrNewTarget(){const node=this.startNode();if(this.next(),this.match(16)){const meta=this.createIdentifier(this.startNodeAtNode(node),"new");this.next();const metaProp=this.parseMetaProperty(node,meta,"target");return this.scope.allowNewTarget||this.raise(Errors.UnexpectedNewTarget,metaProp),metaProp}return this.parseNew(node)}parseNew(node){if(this.parseNewCallee(node),this.eat(10)){const args=this.parseExprList(11);this.toReferencedList(args),node.arguments=args}else node.arguments=[];return this.finishNode(node,"NewExpression")}parseNewCallee(node){const isImport=this.match(83),callee=this.parseNoCallExpr();node.callee=callee,!isImport||"Import"!==callee.type&&"ImportExpression"!==callee.type||this.raise(Errors.ImportCallNotNewExpression,callee)}parseTemplateElement(isTagged){const{start,startLoc,end,value}=this.state,elemStart=start+1,elem=this.startNodeAt(createPositionWithColumnOffset(startLoc,1));null===value&&(isTagged||this.raise(Errors.InvalidEscapeSequenceTemplate,createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos,1)));const isTail=this.match(24),endOffset=isTail?-1:-2,elemEnd=end+endOffset;elem.value={raw:this.input.slice(elemStart,elemEnd).replace(/\r\n?/g,"\n"),cooked:null===value?null:value.slice(1,endOffset)},elem.tail=isTail,this.next();const finishedNode=this.finishNode(elem,"TemplateElement");return this.resetEndLocation(finishedNode,createPositionWithColumnOffset(this.state.lastTokEndLoc,endOffset)),finishedNode}parseTemplate(isTagged){const node=this.startNode();let curElt=this.parseTemplateElement(isTagged);const quasis=[curElt],substitutions=[];for(;!curElt.tail;)substitutions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),quasis.push(curElt=this.parseTemplateElement(isTagged));return node.expressions=substitutions,node.quasis=quasis,this.finishNode(node,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(close,isPattern,isRecord,refExpressionErrors){isRecord&&this.expectPlugin("recordAndTuple");const oldInFSharpPipelineDirectBody=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let sawProto=!1,first=!0;const node=this.startNode();for(node.properties=[],this.next();!this.match(close);){if(first)first=!1;else if(this.expect(12),this.match(close)){this.addTrailingCommaExtraToNode(node);break}let prop;isPattern?prop=this.parseBindingProperty():(prop=this.parsePropertyDefinition(refExpressionErrors),sawProto=this.checkProto(prop,isRecord,sawProto,refExpressionErrors)),isRecord&&!this.isObjectProperty(prop)&&"SpreadElement"!==prop.type&&this.raise(Errors.InvalidRecordProperty,prop),prop.shorthand&&this.addExtra(prop,"shorthand",!0),node.properties.push(prop)}this.next(),this.state.inFSharpPipelineDirectBody=oldInFSharpPipelineDirectBody;let type="ObjectExpression";return isPattern?type="ObjectPattern":isRecord&&(type="RecordExpression"),this.finishNode(node,type)}addTrailingCommaExtraToNode(node){this.addExtra(node,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(node,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(prop){return!prop.computed&&"Identifier"===prop.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(refExpressionErrors){let decorators=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Errors.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)decorators.push(this.parseDecorator());const prop=this.startNode();let startLoc,isAsync=!1,isAccessor=!1;if(this.match(21))return decorators.length&&this.unexpected(),this.parseSpread();decorators.length&&(prop.decorators=decorators,decorators=[]),prop.method=!1,refExpressionErrors&&(startLoc=this.state.startLoc);let isGenerator=this.eat(55);this.parsePropertyNamePrefixOperator(prop);const containsEsc=this.state.containsEsc;if(this.parsePropertyName(prop,refExpressionErrors),!isGenerator&&!containsEsc&&this.maybeAsyncOrAccessorProp(prop)){const{key}=prop,keyName=key.name;"async"!==keyName||this.hasPrecedingLineBreak()||(isAsync=!0,this.resetPreviousNodeTrailingComments(key),isGenerator=this.eat(55),this.parsePropertyName(prop)),"get"!==keyName&&"set"!==keyName||(isAccessor=!0,this.resetPreviousNodeTrailingComments(key),prop.kind=keyName,this.match(55)&&(isGenerator=!0,this.raise(Errors.AccessorIsGenerator,this.state.curPosition(),{kind:keyName}),this.next()),this.parsePropertyName(prop))}return this.parseObjPropValue(prop,startLoc,isGenerator,isAsync,!1,isAccessor,refExpressionErrors)}getGetterSetterExpectedParamCount(method){return"get"===method.kind?0:1}getObjectOrClassMethodParams(method){return method.params}checkGetterSetterParams(method){var _params;const paramCount=this.getGetterSetterExpectedParamCount(method),params=this.getObjectOrClassMethodParams(method);params.length!==paramCount&&this.raise("get"===method.kind?Errors.BadGetterArity:Errors.BadSetterArity,method),"set"===method.kind&&"RestElement"===(null==(_params=params[params.length-1])?void 0:_params.type)&&this.raise(Errors.BadSetterRestParameter,method)}parseObjectMethod(prop,isGenerator,isAsync,isPattern,isAccessor){if(isAccessor){const finishedProp=this.parseMethod(prop,isGenerator,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(finishedProp),finishedProp}if(isAsync||isGenerator||this.match(10))return isPattern&&this.unexpected(),prop.kind="method",prop.method=!0,this.parseMethod(prop,isGenerator,isAsync,!1,!1,"ObjectMethod")}parseObjectProperty(prop,startLoc,isPattern,refExpressionErrors){if(prop.shorthand=!1,this.eat(14))return prop.value=isPattern?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,refExpressionErrors),this.finishObjectProperty(prop);if(!prop.computed&&"Identifier"===prop.key.type){if(this.checkReservedWord(prop.key.name,prop.key.loc.start,!0,!1),isPattern)prop.value=this.parseMaybeDefault(startLoc,this.cloneIdentifier(prop.key));else if(this.match(29)){const shorthandAssignLoc=this.state.startLoc;null!=refExpressionErrors?null===refExpressionErrors.shorthandAssignLoc&&(refExpressionErrors.shorthandAssignLoc=shorthandAssignLoc):this.raise(Errors.InvalidCoverInitializedName,shorthandAssignLoc),prop.value=this.parseMaybeDefault(startLoc,this.cloneIdentifier(prop.key))}else prop.value=this.cloneIdentifier(prop.key);return prop.shorthand=!0,this.finishObjectProperty(prop)}}finishObjectProperty(node){return this.finishNode(node,"ObjectProperty")}parseObjPropValue(prop,startLoc,isGenerator,isAsync,isPattern,isAccessor,refExpressionErrors){const node=this.parseObjectMethod(prop,isGenerator,isAsync,isPattern,isAccessor)||this.parseObjectProperty(prop,startLoc,isPattern,refExpressionErrors);return node||this.unexpected(),node}parsePropertyName(prop,refExpressionErrors){if(this.eat(0))prop.computed=!0,prop.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type,value}=this.state;let key;if(tokenIsKeywordOrIdentifier(type))key=this.parseIdentifier(!0);else switch(type){case 135:key=this.parseNumericLiteral(value);break;case 134:key=this.parseStringLiteral(value);break;case 136:key=this.parseBigIntLiteral(value);break;case 139:{const privateKeyLoc=this.state.startLoc;null!=refExpressionErrors?null===refExpressionErrors.privateKeyLoc&&(refExpressionErrors.privateKeyLoc=privateKeyLoc):this.raise(Errors.UnexpectedPrivateField,privateKeyLoc),key=this.parsePrivateName();break}default:if(137===type){key=this.parseDecimalLiteral(value);break}this.unexpected()}prop.key=key,139!==type&&(prop.computed=!1)}}initFunction(node,isAsync){node.id=null,node.generator=!1,node.async=isAsync}parseMethod(node,isGenerator,isAsync,isConstructor,allowDirectSuper,type,inClassScope=!1){this.initFunction(node,isAsync),node.generator=isGenerator,this.scope.enter(530|(inClassScope?576:0)|(allowDirectSuper?32:0)),this.prodParam.enter(functionFlags(isAsync,node.generator)),this.parseFunctionParams(node,isConstructor);const finishedNode=this.parseFunctionBodyAndFinish(node,type,!0);return this.prodParam.exit(),this.scope.exit(),finishedNode}parseArrayLike(close,canBePattern,isTuple,refExpressionErrors){isTuple&&this.expectPlugin("recordAndTuple");const oldInFSharpPipelineDirectBody=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const node=this.startNode();return this.next(),node.elements=this.parseExprList(close,!isTuple,refExpressionErrors,node),this.state.inFSharpPipelineDirectBody=oldInFSharpPipelineDirectBody,this.finishNode(node,isTuple?"TupleExpression":"ArrayExpression")}parseArrowExpression(node,params,isAsync,trailingCommaLoc){this.scope.enter(518);let flags=functionFlags(isAsync,!1);!this.match(5)&&this.prodParam.hasIn&&(flags|=8),this.prodParam.enter(flags),this.initFunction(node,isAsync);const oldMaybeInArrowParameters=this.state.maybeInArrowParameters;return params&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(node,params,trailingCommaLoc)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(node,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=oldMaybeInArrowParameters,this.finishNode(node,"ArrowFunctionExpression")}setArrowFunctionParameters(node,params,trailingCommaLoc){this.toAssignableList(params,trailingCommaLoc,!1),node.params=params}parseFunctionBodyAndFinish(node,type,isMethod=!1){return this.parseFunctionBody(node,!1,isMethod),this.finishNode(node,type)}parseFunctionBody(node,allowExpression,isMethod=!1){const isExpression=allowExpression&&!this.match(5);if(this.expressionScope.enter(newExpressionScope()),isExpression)node.body=this.parseMaybeAssign(),this.checkParams(node,!1,allowExpression,!1);else{const oldStrict=this.state.strict,oldLabels=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),node.body=this.parseBlock(!0,!1,hasStrictModeDirective=>{const nonSimple=!this.isSimpleParamList(node.params);hasStrictModeDirective&&nonSimple&&this.raise(Errors.IllegalLanguageModeDirective,"method"!==node.kind&&"constructor"!==node.kind||!node.key?node:node.key.loc.end);const strictModeChanged=!oldStrict&&this.state.strict;this.checkParams(node,!(this.state.strict||allowExpression||isMethod||nonSimple),allowExpression,strictModeChanged),this.state.strict&&node.id&&this.checkIdentifier(node.id,65,strictModeChanged)}),this.prodParam.exit(),this.state.labels=oldLabels}this.expressionScope.exit()}isSimpleParameter(node){return"Identifier"===node.type}isSimpleParamList(params){for(let i=0,len=params.length;i10)return;if(!function(word){return reservedWordLikeSet.has(word)}(word))return;if(checkKeywords&&function(word){return keywords.has(word)}(word))return void this.raise(Errors.UnexpectedKeyword,startLoc,{keyword:word});if((this.state.strict?isBinding?isStrictBindReservedWord:isStrictReservedWord:isReservedWord)(word,this.inModule))this.raise(Errors.UnexpectedReservedWord,startLoc,{reservedWord:word});else if("yield"===word){if(this.prodParam.hasYield)return void this.raise(Errors.YieldBindingIdentifier,startLoc)}else if("await"===word){if(this.prodParam.hasAwait)return void this.raise(Errors.AwaitBindingIdentifier,startLoc);if(this.scope.inStaticBlock)return void this.raise(Errors.AwaitBindingIdentifierInStaticBlock,startLoc);this.expressionScope.recordAsyncArrowParametersError(startLoc)}else if("arguments"===word&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(Errors.ArgumentsInClass,startLoc)}recordAwaitIfAllowed(){const isAwaitAllowed=this.prodParam.hasAwait;return isAwaitAllowed&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),isAwaitAllowed}parseAwait(startLoc){const node=this.startNodeAt(startLoc);return this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter,node),this.eat(55)&&this.raise(Errors.ObsoleteAwaitStar,node),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(node.argument=this.parseMaybeUnary(null,!0)),this.finishNode(node,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type}=this.state;return 53===type||10===type||0===type||tokenIsTemplate(type)||102===type&&!this.state.containsEsc||138===type||56===type||this.hasPlugin("v8intrinsic")&&54===type}parseYield(startLoc){const node=this.startNodeAt(startLoc);this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter,node);let delegating=!1,argument=null;if(!this.hasPrecedingLineBreak())switch(delegating=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!delegating)break;default:argument=this.parseMaybeAssign()}return node.delegate=delegating,node.argument=argument,this.finishNode(node,"YieldExpression")}parseImportCall(node){if(this.next(),node.source=this.parseMaybeAssignAllowIn(),node.options=null,this.eat(12))if(this.match(11))this.addTrailingCommaExtraToNode(node.source);else if(node.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(node.options),!this.match(11))){do{this.parseMaybeAssignAllowIn()}while(this.eat(12)&&!this.match(11));this.raise(Errors.ImportCallArity,node)}return this.expect(11),this.finishNode(node,"ImportExpression")}checkPipelineAtInfixOperator(left,leftStartLoc){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===left.type&&this.raise(Errors.PipelineHeadSequenceExpression,leftStartLoc)}parseSmartPipelineBodyInStyle(childExpr,startLoc){if(this.isSimpleReference(childExpr)){const bodyNode=this.startNodeAt(startLoc);return bodyNode.callee=childExpr,this.finishNode(bodyNode,"PipelineBareFunction")}{const bodyNode=this.startNodeAt(startLoc);return this.checkSmartPipeTopicBodyEarlyErrors(startLoc),bodyNode.expression=childExpr,this.finishNode(bodyNode,"PipelineTopicExpression")}}isSimpleReference(expression){switch(expression.type){case"MemberExpression":return!expression.computed&&this.isSimpleReference(expression.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(startLoc){if(this.match(19))throw this.raise(Errors.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(Errors.PipelineTopicUnused,startLoc)}withTopicBindingContext(callback){const outerContextTopicState=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return callback()}finally{this.state.topicContext=outerContextTopicState}}withSmartMixTopicForbiddingContext(callback){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return callback();{const outerContextTopicState=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return callback()}finally{this.state.topicContext=outerContextTopicState}}}withSoloAwaitPermittingContext(callback){const outerContextSoloAwaitState=this.state.soloAwait;this.state.soloAwait=!0;try{return callback()}finally{this.state.soloAwait=outerContextSoloAwaitState}}allowInAnd(callback){const flags=this.prodParam.currentFlags();if(8&~flags){this.prodParam.enter(8|flags);try{return callback()}finally{this.prodParam.exit()}}return callback()}disallowInAnd(callback){const flags=this.prodParam.currentFlags();if(8&flags){this.prodParam.enter(-9&flags);try{return callback()}finally{this.prodParam.exit()}}return callback()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(prec){const startLoc=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const oldInFSharpPipelineDirectBody=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const ret=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),startLoc,prec);return this.state.inFSharpPipelineDirectBody=oldInFSharpPipelineDirectBody,ret}parseModuleExpression(){this.expectPlugin("moduleBlocks");const node=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const program=this.startNodeAt(this.state.endLoc);this.next();const revertScopes=this.initializeScopes(!0);this.enterInitialScopes();try{node.body=this.parseProgram(program,8,"module")}finally{revertScopes()}return this.finishNode(node,"ModuleExpression")}parseVoidPattern(refExpressionErrors){this.expectPlugin("discardBinding");const node=this.startNode();return null!=refExpressionErrors&&(refExpressionErrors.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(node,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(close,refExpressionErrors,afterLeftParse){if(null!=refExpressionErrors&&this.match(88)){const nextCode=this.lookaheadCharCode();if(44===nextCode||nextCode===(3===close?93:8===close?125:41)||61===nextCode)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(refExpressionErrors))}return this.parseMaybeAssignAllowIn(refExpressionErrors,afterLeftParse)}parsePropertyNamePrefixOperator(prop){}}const loopLabel={kind:1},switchLabel={kind:2},loneSurrogate=/[\uD800-\uDFFF]/u,keywordRelationalOperator=/in(?:stanceof)?/y;class StatementParser extends ExpressionParser{parseTopLevel(file,program){return file.program=this.parseProgram(program,140,"module"===this.options.sourceType?"module":"script"),file.comments=this.comments,256&this.optionFlags&&(file.tokens=function(tokens,input,startIndex){for(let i=0;i0)for(const[localName,at]of Array.from(this.scope.undefinedExports))this.raise(Errors.ModuleExportUndefined,at,{localName});this.addExtra(program,"topLevelAwait",this.state.hasTopLevelAwait)}let finishedProgram;return finishedProgram=140===end?this.finishNode(program,"Program"):this.finishNodeAt(program,"Program",createPositionWithColumnOffset(this.state.startLoc,-1)),finishedProgram}stmtToDirective(stmt){const directive=this.castNodeTo(stmt,"Directive"),directiveLiteral=this.castNodeTo(stmt.expression,"DirectiveLiteral"),expressionValue=directiveLiteral.value,raw=this.input.slice(this.offsetToSourcePos(directiveLiteral.start),this.offsetToSourcePos(directiveLiteral.end)),val=directiveLiteral.value=raw.slice(1,-1);return this.addExtra(directiveLiteral,"raw",raw),this.addExtra(directiveLiteral,"rawValue",val),this.addExtra(directiveLiteral,"expressionValue",expressionValue),directive.value=directiveLiteral,delete stmt.expression,directive}parseInterpreterDirective(){if(!this.match(28))return null;const node=this.startNode();return node.value=this.state.value,this.next(),this.finishNode(node,"InterpreterDirective")}isLet(){return!!this.isContextual(100)&&this.hasFollowingBindingAtom()}isUsing(){if(!this.isContextual(107))return!1;const next=this.nextTokenInLineStart(),nextCh=this.codePointAtPos(next);return this.chStartsBindingIdentifier(nextCh,next)}isForUsing(){if(!this.isContextual(107))return!1;const next=this.nextTokenInLineStart(),nextCh=this.codePointAtPos(next);if(this.isUnparsedContextual(next,"of")){const nextCharAfterOf=this.lookaheadCharCodeSince(next+2);if(61!==nextCharAfterOf&&58!==nextCharAfterOf&&59!==nextCharAfterOf)return!1}return!(!this.chStartsBindingIdentifier(nextCh,next)&&!this.isUnparsedContextual(next,"void"))}isAwaitUsing(){if(!this.isContextual(96))return!1;let next=this.nextTokenInLineStart();if(this.isUnparsedContextual(next,"using")){next=this.nextTokenInLineStartSince(next+5);const nextCh=this.codePointAtPos(next);if(this.chStartsBindingIdentifier(nextCh,next))return!0}return!1}chStartsBindingIdentifier(ch,pos){if(isIdentifierStart(ch)){if(keywordRelationalOperator.lastIndex=pos,keywordRelationalOperator.test(this.input)){const endCh=this.codePointAtPos(keywordRelationalOperator.lastIndex);if(!isIdentifierChar(endCh)&&92!==endCh)return!1}return!0}return 92===ch}chStartsBindingPattern(ch){return 91===ch||123===ch}hasFollowingBindingAtom(){const next=this.nextTokenStart(),nextCh=this.codePointAtPos(next);return this.chStartsBindingPattern(nextCh)||this.chStartsBindingIdentifier(nextCh,next)}hasInLineFollowingBindingIdentifierOrBrace(){const next=this.nextTokenInLineStart(),nextCh=this.codePointAtPos(next);return 123===nextCh||this.chStartsBindingIdentifier(nextCh,next)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction=!1){let flags=0;return this.options.annexB&&!this.state.strict&&(flags|=4,allowLabeledFunction&&(flags|=8)),this.parseStatementLike(flags)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(flags){let decorators=null;return this.match(26)&&(decorators=this.parseDecorators(!0)),this.parseStatementContent(flags,decorators)}parseStatementContent(flags,decorators){const startType=this.state.type,node=this.startNode(),allowDeclaration=!!(2&flags),allowFunctionDeclaration=!!(4&flags),topLevel=1&flags;switch(startType){case 60:return this.parseBreakContinueStatement(node,!0);case 63:return this.parseBreakContinueStatement(node,!1);case 64:return this.parseDebuggerStatement(node);case 90:return this.parseDoWhileStatement(node);case 91:return this.parseForStatement(node);case 68:if(46===this.lookaheadCharCode())break;return allowFunctionDeclaration||this.raise(this.state.strict?Errors.StrictFunction:this.options.annexB?Errors.SloppyFunctionAnnexB:Errors.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(node,!1,!allowDeclaration&&allowFunctionDeclaration);case 80:return allowDeclaration||this.unexpected(),this.parseClass(this.maybeTakeDecorators(decorators,node),!0);case 69:return this.parseIfStatement(node);case 70:return this.parseReturnStatement(node);case 71:return this.parseSwitchStatement(node);case 72:return this.parseThrowStatement(node);case 73:return this.parseTryStatement(node);case 96:if(this.isAwaitUsing())return this.allowsUsing()?allowDeclaration?this.recordAwaitIfAllowed()||this.raise(Errors.AwaitUsingNotInAsyncContext,node):this.raise(Errors.UnexpectedLexicalDeclaration,node):this.raise(Errors.UnexpectedUsingDeclaration,node),this.next(),this.parseVarStatement(node,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?allowDeclaration||this.raise(Errors.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(Errors.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(node,"using");case 100:{if(this.state.containsEsc)break;const next=this.nextTokenStart(),nextCh=this.codePointAtPos(next);if(91!==nextCh){if(!allowDeclaration&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(nextCh,next)&&123!==nextCh)break}}case 75:allowDeclaration||this.raise(Errors.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const kind=this.state.value;return this.parseVarStatement(node,kind)}case 92:return this.parseWhileStatement(node);case 76:return this.parseWithStatement(node);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(node);case 83:{const nextTokenCharCode=this.lookaheadCharCode();if(40===nextTokenCharCode||46===nextTokenCharCode)break}case 82:{let result;return 8&this.optionFlags||topLevel||this.raise(Errors.UnexpectedImportExport,this.state.startLoc),this.next(),result=83===startType?this.parseImport(node):this.parseExport(node,decorators),this.assertModuleNodeAllowed(result),result}default:if(this.isAsyncFunction())return allowDeclaration||this.raise(Errors.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(node,!0,!allowDeclaration&&allowFunctionDeclaration)}const maybeName=this.state.value,expr=this.parseExpression();return tokenIsIdentifier(startType)&&"Identifier"===expr.type&&this.eat(14)?this.parseLabeledStatement(node,maybeName,expr,flags):this.parseExpressionStatement(node,expr,decorators)}assertModuleNodeAllowed(node){8&this.optionFlags||this.inModule||this.raise(Errors.ImportOutsideModule,node)}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(maybeDecorators,classNode,exportNode){var _classNode$decorators;maybeDecorators&&(null!=(_classNode$decorators=classNode.decorators)&&_classNode$decorators.length?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(Errors.DecoratorsBeforeAfterExport,classNode.decorators[0]),classNode.decorators.unshift(...maybeDecorators)):classNode.decorators=maybeDecorators,this.resetStartLocationFromNode(classNode,maybeDecorators[0]),exportNode&&this.resetStartLocationFromNode(exportNode,classNode));return classNode}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(allowExport){const decorators=[];do{decorators.push(this.parseDecorator())}while(this.match(26));if(this.match(82))allowExport||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(Errors.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(Errors.UnexpectedLeadingDecorator,this.state.startLoc);return decorators}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const node=this.startNode();if(this.next(),this.hasPlugin("decorators")){const startLoc=this.state.startLoc;let expr;if(this.match(10)){const startLoc=this.state.startLoc;this.next(),expr=this.parseExpression(),this.expect(11),expr=this.wrapParenthesis(startLoc,expr);const paramsStartLoc=this.state.startLoc;node.expression=this.parseMaybeDecoratorArguments(expr,startLoc),!1===this.getPluginOption("decorators","allowCallParenthesized")&&node.expression!==expr&&this.raise(Errors.DecoratorArgumentsOutsideParentheses,paramsStartLoc)}else{for(expr=this.parseIdentifier(!1);this.eat(16);){const node=this.startNodeAt(startLoc);node.object=expr,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),node.property=this.parsePrivateName()):node.property=this.parseIdentifier(!0),node.computed=!1,expr=this.finishNode(node,"MemberExpression")}node.expression=this.parseMaybeDecoratorArguments(expr,startLoc)}}else node.expression=this.parseExprSubscripts();return this.finishNode(node,"Decorator")}parseMaybeDecoratorArguments(expr,startLoc){if(this.eat(10)){const node=this.startNodeAt(startLoc);return node.callee=expr,node.arguments=this.parseCallExpressionArguments(),this.toReferencedList(node.arguments),this.finishNode(node,"CallExpression")}return expr}parseBreakContinueStatement(node,isBreak){return this.next(),this.isLineTerminator()?node.label=null:(node.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(node,isBreak),this.finishNode(node,isBreak?"BreakStatement":"ContinueStatement")}verifyBreakContinue(node,isBreak){let i;for(i=0;ithis.parseStatement()),this.state.labels.pop(),this.expect(92),node.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(node,"DoWhileStatement")}parseForStatement(node){this.next(),this.state.labels.push(loopLabel);let awaitAt=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(awaitAt=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return null!==awaitAt&&this.unexpected(awaitAt),this.parseFor(node,null);const startsWithLet=this.isContextual(100);{const startsWithAwaitUsing=this.isAwaitUsing(),starsWithUsingDeclaration=startsWithAwaitUsing||this.isForUsing(),isLetOrUsing=startsWithLet&&this.hasFollowingBindingAtom()||starsWithUsingDeclaration;if(this.match(74)||this.match(75)||isLetOrUsing){const initNode=this.startNode();let kind;startsWithAwaitUsing?(kind="await using",this.recordAwaitIfAllowed()||this.raise(Errors.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):kind=this.state.value,this.next(),this.parseVar(initNode,!0,kind);const init=this.finishNode(initNode,"VariableDeclaration"),isForIn=this.match(58);return isForIn&&starsWithUsingDeclaration&&this.raise(Errors.ForInUsing,init),(isForIn||this.isContextual(102))&&1===init.declarations.length?this.parseForIn(node,init,awaitAt):(null!==awaitAt&&this.unexpected(awaitAt),this.parseFor(node,init))}}const startsWithAsync=this.isContextual(95),refExpressionErrors=new ExpressionErrors,init=this.parseExpression(!0,refExpressionErrors),isForOf=this.isContextual(102);if(isForOf&&(startsWithLet&&this.raise(Errors.ForOfLet,init),null===awaitAt&&startsWithAsync&&"Identifier"===init.type&&this.raise(Errors.ForOfAsync,init)),isForOf||this.match(58)){this.checkDestructuringPrivate(refExpressionErrors),this.toAssignable(init,!0);const type=isForOf?"ForOfStatement":"ForInStatement";return this.checkLVal(init,{type}),this.parseForIn(node,init,awaitAt)}return this.checkExpressionErrors(refExpressionErrors,!0),null!==awaitAt&&this.unexpected(awaitAt),this.parseFor(node,init)}parseFunctionStatement(node,isAsync,isHangingDeclaration){return this.next(),this.parseFunction(node,1|(isHangingDeclaration?2:0)|(isAsync?8:0))}parseIfStatement(node){return this.next(),node.test=this.parseHeaderExpression(),node.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),node.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(node,"IfStatement")}parseReturnStatement(node){return this.prodParam.hasReturn||this.raise(Errors.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?node.argument=null:(node.argument=this.parseExpression(),this.semicolon()),this.finishNode(node,"ReturnStatement")}parseSwitchStatement(node){this.next(),node.discriminant=this.parseHeaderExpression();const cases=node.cases=[];let cur;this.expect(5),this.state.labels.push(switchLabel),this.scope.enter(256);for(let sawDefault;!this.match(8);)if(this.match(61)||this.match(65)){const isCase=this.match(61);cur&&this.finishNode(cur,"SwitchCase"),cases.push(cur=this.startNode()),cur.consequent=[],this.next(),isCase?cur.test=this.parseExpression():(sawDefault&&this.raise(Errors.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),sawDefault=!0,cur.test=null),this.expect(14)}else cur?cur.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),cur&&this.finishNode(cur,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(node,"SwitchStatement")}parseThrowStatement(node){return this.next(),this.hasPrecedingLineBreak()&&this.raise(Errors.NewlineAfterThrow,this.state.lastTokEndLoc),node.argument=this.parseExpression(),this.semicolon(),this.finishNode(node,"ThrowStatement")}parseCatchClauseParam(){const param=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===param.type?8:0),this.checkLVal(param,{type:"CatchClause"},9),param}parseTryStatement(node){if(this.next(),node.block=this.parseBlock(),node.handler=null,this.match(62)){const clause=this.startNode();this.next(),this.match(10)?(this.expect(10),clause.param=this.parseCatchClauseParam(),this.expect(11)):(clause.param=null,this.scope.enter(0)),clause.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),node.handler=this.finishNode(clause,"CatchClause")}return node.finalizer=this.eat(67)?this.parseBlock():null,node.handler||node.finalizer||this.raise(Errors.NoCatchOrFinally,node),this.finishNode(node,"TryStatement")}parseVarStatement(node,kind,allowMissingInitializer=!1){return this.next(),this.parseVar(node,!1,kind,allowMissingInitializer),this.semicolon(),this.finishNode(node,"VariableDeclaration")}parseWhileStatement(node){return this.next(),node.test=this.parseHeaderExpression(),this.state.labels.push(loopLabel),node.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(node,"WhileStatement")}parseWithStatement(node){return this.state.strict&&this.raise(Errors.StrictWith,this.state.startLoc),this.next(),node.object=this.parseHeaderExpression(),node.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(node,"WithStatement")}parseEmptyStatement(node){return this.next(),this.finishNode(node,"EmptyStatement")}parseLabeledStatement(node,maybeName,expr,flags){for(const label of this.state.labels)label.name===maybeName&&this.raise(Errors.LabelRedeclaration,expr,{labelName:maybeName});const kind=(token=this.state.type)>=90&&token<=92?1:this.match(71)?2:null;var token;for(let i=this.state.labels.length-1;i>=0;i--){const label=this.state.labels[i];if(label.statementStart!==node.start)break;label.statementStart=this.sourceToOffsetPos(this.state.start),label.kind=kind}return this.state.labels.push({name:maybeName,kind,statementStart:this.sourceToOffsetPos(this.state.start)}),node.body=8&flags?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),node.label=expr,this.finishNode(node,"LabeledStatement")}parseExpressionStatement(node,expr,decorators){return node.expression=expr,this.semicolon(),this.finishNode(node,"ExpressionStatement")}parseBlock(allowDirectives=!1,createNewLexicalScope=!0,afterBlockParse){const node=this.startNode();return allowDirectives&&this.state.strictErrors.clear(),this.expect(5),createNewLexicalScope&&this.scope.enter(0),this.parseBlockBody(node,allowDirectives,!1,8,afterBlockParse),createNewLexicalScope&&this.scope.exit(),this.finishNode(node,"BlockStatement")}isValidDirective(stmt){return"ExpressionStatement"===stmt.type&&"StringLiteral"===stmt.expression.type&&!stmt.expression.extra.parenthesized}parseBlockBody(node,allowDirectives,topLevel,end,afterBlockParse){const body=node.body=[],directives=node.directives=[];this.parseBlockOrModuleBlockBody(body,allowDirectives?directives:void 0,topLevel,end,afterBlockParse)}parseBlockOrModuleBlockBody(body,directives,topLevel,end,afterBlockParse){const oldStrict=this.state.strict;let hasStrictModeDirective=!1,parsedNonDirective=!1;for(;!this.match(end);){const stmt=topLevel?this.parseModuleItem():this.parseStatementListItem();if(directives&&!parsedNonDirective){if(this.isValidDirective(stmt)){const directive=this.stmtToDirective(stmt);directives.push(directive),hasStrictModeDirective||"use strict"!==directive.value.value||(hasStrictModeDirective=!0,this.setStrict(!0));continue}parsedNonDirective=!0,this.state.strictErrors.clear()}body.push(stmt)}null==afterBlockParse||afterBlockParse.call(this,hasStrictModeDirective),oldStrict||this.setStrict(!1),this.next()}parseFor(node,init){return node.init=init,this.semicolon(!1),node.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),node.update=this.match(11)?null:this.parseExpression(),this.expect(11),node.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(node,"ForStatement")}parseForIn(node,init,awaitAt){const isForIn=this.match(58);return this.next(),isForIn?null!==awaitAt&&this.unexpected(awaitAt):node.await=null!==awaitAt,"VariableDeclaration"!==init.type||null==init.declarations[0].init||isForIn&&this.options.annexB&&!this.state.strict&&"var"===init.kind&&"Identifier"===init.declarations[0].id.type||this.raise(Errors.ForInOfLoopInitializer,init,{type:isForIn?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===init.type&&this.raise(Errors.InvalidLhs,init,{ancestor:{type:"ForStatement"}}),node.left=init,node.right=isForIn?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),node.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(node,isForIn?"ForInStatement":"ForOfStatement")}parseVar(node,isFor,kind,allowMissingInitializer=!1){const declarations=node.declarations=[];for(node.kind=kind;;){const decl=this.startNode();if(this.parseVarId(decl,kind),decl.init=this.eat(29)?isFor?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==decl.init||allowMissingInitializer||("Identifier"===decl.id.type||isFor&&(this.match(58)||this.isContextual(102))?"const"!==kind&&"using"!==kind&&"await using"!==kind||this.match(58)||this.isContextual(102)||this.raise(Errors.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind}):this.raise(Errors.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),declarations.push(this.finishNode(decl,"VariableDeclarator")),!this.eat(12))break}return node}parseVarId(decl,kind){const id=this.parseBindingAtom();"using"===kind||"await using"===kind?"ArrayPattern"!==id.type&&"ObjectPattern"!==id.type||this.raise(Errors.UsingDeclarationHasBindingPattern,id.loc.start):"VoidPattern"===id.type&&this.raise(Errors.UnexpectedVoidPattern,id.loc.start),this.checkLVal(id,{type:"VariableDeclarator"},"var"===kind?5:8201),decl.id=id}parseAsyncFunctionExpression(node){return this.parseFunction(node,8)}parseFunction(node,flags=0){const hangingDeclaration=2&flags,isDeclaration=!!(1&flags),requireId=isDeclaration&&!(4&flags),isAsync=!!(8&flags);this.initFunction(node,isAsync),this.match(55)&&(hangingDeclaration&&this.raise(Errors.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),node.generator=!0),isDeclaration&&(node.id=this.parseFunctionId(requireId));const oldMaybeInArrowParameters=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(functionFlags(isAsync,node.generator)),isDeclaration||(node.id=this.parseFunctionId()),this.parseFunctionParams(node,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(node,isDeclaration?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),isDeclaration&&!hangingDeclaration&&this.registerFunctionStatementId(node),this.state.maybeInArrowParameters=oldMaybeInArrowParameters,node}parseFunctionId(requireId){return requireId||tokenIsIdentifier(this.state.type)?this.parseIdentifier():null}parseFunctionParams(node,isConstructor){this.expect(10),this.expressionScope.enter(new ExpressionScope(3)),node.params=this.parseBindingList(11,41,2|(isConstructor?4:0)),this.expressionScope.exit()}registerFunctionStatementId(node){node.id&&this.scope.declareName(node.id.name,!this.options.annexB||this.state.strict||node.generator||node.async?this.scope.treatFunctionsAsVar?5:8201:17,node.id.loc.start)}parseClass(node,isStatement,optionalId){this.next();const oldStrict=this.state.strict;return this.state.strict=!0,this.parseClassId(node,isStatement,optionalId),this.parseClassSuper(node),node.body=this.parseClassBody(!!node.superClass,oldStrict),this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(key){return"Identifier"===key.type&&"constructor"===key.name||"StringLiteral"===key.type&&"constructor"===key.value}isNonstaticConstructor(method){return!method.computed&&!method.static&&this.nameIsConstructor(method.key)}parseClassBody(hadSuperClass,oldStrict){this.classScope.enter();const state={hadConstructor:!1,hadSuperClass};let decorators=[];const classBody=this.startNode();if(classBody.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(decorators.length>0)throw this.raise(Errors.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){decorators.push(this.parseDecorator());continue}const member=this.startNode();decorators.length&&(member.decorators=decorators,this.resetStartLocationFromNode(member,decorators[0]),decorators=[]),this.parseClassMember(classBody,member,state),"constructor"===member.kind&&member.decorators&&member.decorators.length>0&&this.raise(Errors.DecoratorConstructor,member)}}),this.state.strict=oldStrict,this.next(),decorators.length)throw this.raise(Errors.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(classBody,"ClassBody")}parseClassMemberFromModifier(classBody,member){const key=this.parseIdentifier(!0);if(this.isClassMethod()){const method=member;return method.kind="method",method.computed=!1,method.key=key,method.static=!1,this.pushClassMethod(classBody,method,!1,!1,!1,!1),!0}if(this.isClassProperty()){const prop=member;return prop.computed=!1,prop.key=key,prop.static=!1,classBody.body.push(this.parseClassProperty(prop)),!0}return this.resetPreviousNodeTrailingComments(key),!1}parseClassMember(classBody,member,state){const isStatic=this.isContextual(106);if(isStatic){if(this.parseClassMemberFromModifier(classBody,member))return;if(this.eat(5))return void this.parseClassStaticBlock(classBody,member)}this.parseClassMemberWithIsStatic(classBody,member,state,isStatic)}parseClassMemberWithIsStatic(classBody,member,state,isStatic){const publicMethod=member,privateMethod=member,publicProp=member,privateProp=member,accessorProp=member,method=publicMethod,publicMember=publicMethod;if(member.static=isStatic,this.parsePropertyNamePrefixOperator(member),this.eat(55)){method.kind="method";const isPrivateName=this.match(139);return this.parseClassElementName(method),this.parsePostMemberNameModifiers(method),isPrivateName?void this.pushClassPrivateMethod(classBody,privateMethod,!0,!1):(this.isNonstaticConstructor(publicMethod)&&this.raise(Errors.ConstructorIsGenerator,publicMethod.key),void this.pushClassMethod(classBody,publicMethod,!0,!1,!1,!1))}const isContextual=!this.state.containsEsc&&tokenIsIdentifier(this.state.type),key=this.parseClassElementName(member),maybeContextualKw=isContextual?key.name:null,isPrivate=this.isPrivateName(key),maybeQuestionTokenStartLoc=this.state.startLoc;if(this.parsePostMemberNameModifiers(publicMember),this.isClassMethod()){if(method.kind="method",isPrivate)return void this.pushClassPrivateMethod(classBody,privateMethod,!1,!1);const isConstructor=this.isNonstaticConstructor(publicMethod);let allowsDirectSuper=!1;isConstructor&&(publicMethod.kind="constructor",state.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(Errors.DuplicateConstructor,key),isConstructor&&this.hasPlugin("typescript")&&member.override&&this.raise(Errors.OverrideOnConstructor,key),state.hadConstructor=!0,allowsDirectSuper=state.hadSuperClass),this.pushClassMethod(classBody,publicMethod,!1,!1,isConstructor,allowsDirectSuper)}else if(this.isClassProperty())isPrivate?this.pushClassPrivateProperty(classBody,privateProp):this.pushClassProperty(classBody,publicProp);else if("async"!==maybeContextualKw||this.isLineTerminator())if("get"!==maybeContextualKw&&"set"!==maybeContextualKw||this.match(55)&&this.isLineTerminator())if("accessor"!==maybeContextualKw||this.isLineTerminator())this.isLineTerminator()?isPrivate?this.pushClassPrivateProperty(classBody,privateProp):this.pushClassProperty(classBody,publicProp):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(key);const isPrivate=this.match(139);this.parseClassElementName(publicProp),this.pushClassAccessorProperty(classBody,accessorProp,isPrivate)}else{this.resetPreviousNodeTrailingComments(key),method.kind=maybeContextualKw;const isPrivate=this.match(139);this.parseClassElementName(publicMethod),isPrivate?this.pushClassPrivateMethod(classBody,privateMethod,!1,!1):(this.isNonstaticConstructor(publicMethod)&&this.raise(Errors.ConstructorIsAccessor,publicMethod.key),this.pushClassMethod(classBody,publicMethod,!1,!1,!1,!1)),this.checkGetterSetterParams(publicMethod)}else{this.resetPreviousNodeTrailingComments(key);const isGenerator=this.eat(55);publicMember.optional&&this.unexpected(maybeQuestionTokenStartLoc),method.kind="method";const isPrivate=this.match(139);this.parseClassElementName(method),this.parsePostMemberNameModifiers(publicMember),isPrivate?this.pushClassPrivateMethod(classBody,privateMethod,isGenerator,!0):(this.isNonstaticConstructor(publicMethod)&&this.raise(Errors.ConstructorIsAsync,publicMethod.key),this.pushClassMethod(classBody,publicMethod,isGenerator,!0,!1,!1))}}parseClassElementName(member){const{type,value}=this.state;if(132!==type&&134!==type||!member.static||"prototype"!==value||this.raise(Errors.StaticPrototype,this.state.startLoc),139===type){"constructor"===value&&this.raise(Errors.ConstructorClassPrivateField,this.state.startLoc);const key=this.parsePrivateName();return member.key=key,key}return this.parsePropertyName(member),member.key}parseClassStaticBlock(classBody,member){var _member$decorators;this.scope.enter(720);const oldLabels=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const body=member.body=[];this.parseBlockOrModuleBlockBody(body,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=oldLabels,classBody.body.push(this.finishNode(member,"StaticBlock")),null!=(_member$decorators=member.decorators)&&_member$decorators.length&&this.raise(Errors.DecoratorStaticBlock,member)}pushClassProperty(classBody,prop){!prop.computed&&this.nameIsConstructor(prop.key)&&this.raise(Errors.ConstructorClassField,prop.key),classBody.body.push(this.parseClassProperty(prop))}pushClassPrivateProperty(classBody,prop){const node=this.parseClassPrivateProperty(prop);classBody.body.push(node),this.classScope.declarePrivateName(this.getPrivateNameSV(node.key),0,node.key.loc.start)}pushClassAccessorProperty(classBody,prop,isPrivate){isPrivate||prop.computed||!this.nameIsConstructor(prop.key)||this.raise(Errors.ConstructorClassField,prop.key);const node=this.parseClassAccessorProperty(prop);classBody.body.push(node),isPrivate&&this.classScope.declarePrivateName(this.getPrivateNameSV(node.key),0,node.key.loc.start)}pushClassMethod(classBody,method,isGenerator,isAsync,isConstructor,allowsDirectSuper){classBody.body.push(this.parseMethod(method,isGenerator,isAsync,isConstructor,allowsDirectSuper,"ClassMethod",!0))}pushClassPrivateMethod(classBody,method,isGenerator,isAsync){const node=this.parseMethod(method,isGenerator,isAsync,!1,!1,"ClassPrivateMethod",!0);classBody.body.push(node);const kind="get"===node.kind?node.static?6:2:"set"===node.kind?node.static?5:1:0;this.declareClassPrivateMethodInScope(node,kind)}declareClassPrivateMethodInScope(node,kind){this.classScope.declarePrivateName(this.getPrivateNameSV(node.key),kind,node.key.loc.start)}parsePostMemberNameModifiers(methodOrProp){}parseClassPrivateProperty(node){return this.parseInitializer(node),this.semicolon(),this.finishNode(node,"ClassPrivateProperty")}parseClassProperty(node){return this.parseInitializer(node),this.semicolon(),this.finishNode(node,"ClassProperty")}parseClassAccessorProperty(node){return this.parseInitializer(node),this.semicolon(),this.finishNode(node,"ClassAccessorProperty")}parseInitializer(node){this.scope.enter(592),this.expressionScope.enter(newExpressionScope()),this.prodParam.enter(0),node.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(node,isStatement,optionalId,bindingType=8331){if(tokenIsIdentifier(this.state.type))node.id=this.parseIdentifier(),isStatement&&this.declareNameFromIdentifier(node.id,bindingType);else{if(!optionalId&&isStatement)throw this.raise(Errors.MissingClassName,this.state.startLoc);node.id=null}}parseClassSuper(node){node.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(node,decorators){const maybeDefaultIdentifier=this.parseMaybeImportPhase(node,!0),hasDefault=this.maybeParseExportDefaultSpecifier(node,maybeDefaultIdentifier),parseAfterDefault=!hasDefault||this.eat(12),hasStar=parseAfterDefault&&this.eatExportStar(node),hasNamespace=hasStar&&this.maybeParseExportNamespaceSpecifier(node),parseAfterNamespace=parseAfterDefault&&(!hasNamespace||this.eat(12)),isFromRequired=hasDefault||hasStar;if(hasStar&&!hasNamespace){if(hasDefault&&this.unexpected(),decorators)throw this.raise(Errors.UnsupportedDecoratorExport,node);return this.parseExportFrom(node,!0),this.sawUnambiguousESM=!0,this.finishNode(node,"ExportAllDeclaration")}const hasSpecifiers=this.maybeParseExportNamedSpecifiers(node);let hasDeclaration;if(hasDefault&&parseAfterDefault&&!hasStar&&!hasSpecifiers&&this.unexpected(null,5),hasNamespace&&parseAfterNamespace&&this.unexpected(null,98),isFromRequired||hasSpecifiers){if(hasDeclaration=!1,decorators)throw this.raise(Errors.UnsupportedDecoratorExport,node);this.parseExportFrom(node,isFromRequired)}else hasDeclaration=this.maybeParseExportDeclaration(node);if(isFromRequired||hasSpecifiers||hasDeclaration){var _node2$declaration;const node2=node;if(this.checkExport(node2,!0,!1,!!node2.source),"ClassDeclaration"===(null==(_node2$declaration=node2.declaration)?void 0:_node2$declaration.type))this.maybeTakeDecorators(decorators,node2.declaration,node2);else if(decorators)throw this.raise(Errors.UnsupportedDecoratorExport,node);return this.sawUnambiguousESM=!0,this.finishNode(node2,"ExportNamedDeclaration")}if(this.eat(65)){const node2=node,decl=this.parseExportDefaultExpression();if(node2.declaration=decl,"ClassDeclaration"===decl.type)this.maybeTakeDecorators(decorators,decl,node2);else if(decorators)throw this.raise(Errors.UnsupportedDecoratorExport,node);return this.checkExport(node2,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(node2,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(node){return this.eat(55)}maybeParseExportDefaultSpecifier(node,maybeDefaultIdentifier){if(maybeDefaultIdentifier||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==maybeDefaultIdentifier?void 0:maybeDefaultIdentifier.loc.start);const id=maybeDefaultIdentifier||this.parseIdentifier(!0),specifier=this.startNodeAtNode(id);return specifier.exported=id,node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(node){if(this.isContextual(93)){var _ref;null!=(_ref=node).specifiers||(_ref.specifiers=[]);const specifier=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),specifier.exported=this.parseModuleExportName(),node.specifiers.push(this.finishNode(specifier,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(node){if(this.match(5)){const node2=node;node2.specifiers||(node2.specifiers=[]);const isTypeExport="type"===node2.exportKind;return node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport)),node2.source=null,this.hasPlugin("importAssertions")?node2.assertions=[]:node2.attributes=[],node2.declaration=null,!0}return!1}maybeParseExportDeclaration(node){return!!this.shouldParseExportDeclaration()&&(node.specifiers=[],node.source=null,this.hasPlugin("importAssertions")?node.assertions=[]:node.attributes=[],node.declaration=this.parseExportDeclaration(node),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;const next=this.nextTokenInLineStart();return this.isUnparsedContextual(next,"function")}parseExportDefaultExpression(){const expr=this.startNode();if(this.match(68))return this.next(),this.parseFunction(expr,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(expr,13);if(this.match(80))return this.parseClass(expr,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(Errors.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(Errors.UnsupportedDefaultExport,this.state.startLoc);const res=this.parseMaybeAssignAllowIn();return this.semicolon(),res}parseExportDeclaration(node){if(this.match(80)){return this.parseClass(this.startNode(),!0,!1)}return this.parseStatementListItem()}isExportDefaultSpecifier(){const{type}=this.state;if(tokenIsIdentifier(type)){if(95===type&&!this.state.containsEsc||100===type)return!1;if((130===type||129===type)&&!this.state.containsEsc){const next=this.nextTokenStart(),nextChar=this.input.charCodeAt(next);if(123===nextChar||this.chStartsBindingIdentifier(nextChar,next)&&!this.input.startsWith("from",next))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const next=this.nextTokenStart(),hasFrom=this.isUnparsedContextual(next,"from");if(44===this.input.charCodeAt(next)||tokenIsIdentifier(this.state.type)&&hasFrom)return!0;if(this.match(65)&&hasFrom){const nextAfterFrom=this.input.charCodeAt(this.nextTokenStartSince(next+4));return 34===nextAfterFrom||39===nextAfterFrom}return!1}parseExportFrom(node,expect){this.eatContextual(98)?(node.source=this.parseImportSource(),this.checkExport(node),this.maybeParseImportAttributes(node),this.checkJSONModuleImport(node)):expect&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type}=this.state;return 26===type&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(Errors.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()||this.isAwaitUsing()?(this.raise(Errors.UsingDeclarationExport,this.state.startLoc),!0):74===type||75===type||68===type||80===type||this.isLet()||this.isAsyncFunction()}checkExport(node,checkNames,isDefault,isFrom){var _node$specifiers;if(checkNames)if(isDefault){if(this.checkDuplicateExports(node,"default"),this.hasPlugin("exportDefaultFrom")){var _declaration$extra;const declaration=node.declaration;"Identifier"!==declaration.type||"from"!==declaration.name||declaration.end-declaration.start!==4||null!=(_declaration$extra=declaration.extra)&&_declaration$extra.parenthesized||this.raise(Errors.ExportDefaultFromAsIdentifier,declaration)}}else if(null!=(_node$specifiers=node.specifiers)&&_node$specifiers.length)for(const specifier of node.specifiers){const{exported}=specifier,exportName="Identifier"===exported.type?exported.name:exported.value;if(this.checkDuplicateExports(specifier,exportName),!isFrom&&specifier.local){const{local}=specifier;"Identifier"!==local.type?this.raise(Errors.ExportBindingIsString,specifier,{localName:local.value,exportName}):(this.checkReservedWord(local.name,local.loc.start,!0,!1),this.scope.checkLocalExport(local))}}else if(node.declaration){const decl=node.declaration;if("FunctionDeclaration"===decl.type||"ClassDeclaration"===decl.type){const{id}=decl;if(!id)throw new Error("Assertion failure");this.checkDuplicateExports(node,id.name)}else if("VariableDeclaration"===decl.type)for(const declaration of decl.declarations)this.checkDeclaration(declaration.id)}}checkDeclaration(node){if("Identifier"===node.type)this.checkDuplicateExports(node,node.name);else if("ObjectPattern"===node.type)for(const prop of node.properties)this.checkDeclaration(prop);else if("ArrayPattern"===node.type)for(const elem of node.elements)elem&&this.checkDeclaration(elem);else"ObjectProperty"===node.type?this.checkDeclaration(node.value):"RestElement"===node.type?this.checkDeclaration(node.argument):"AssignmentPattern"===node.type&&this.checkDeclaration(node.left)}checkDuplicateExports(node,exportName){this.exportedIdentifiers.has(exportName)&&("default"===exportName?this.raise(Errors.DuplicateDefaultExport,node):this.raise(Errors.DuplicateExport,node,{exportName})),this.exportedIdentifiers.add(exportName)}parseExportSpecifiers(isInTypeExport){const nodes=[];let first=!0;for(this.expect(5);!this.eat(8);){if(first)first=!1;else if(this.expect(12),this.eat(8))break;const isMaybeTypeOnly=this.isContextual(130),isString=this.match(134),node=this.startNode();node.local=this.parseModuleExportName(),nodes.push(this.parseExportSpecifier(node,isString,isInTypeExport,isMaybeTypeOnly))}return nodes}parseExportSpecifier(node,isString,isInTypeExport,isMaybeTypeOnly){return this.eatContextual(93)?node.exported=this.parseModuleExportName():isString?node.exported=this.cloneStringLiteral(node.local):node.exported||(node.exported=this.cloneIdentifier(node.local)),this.finishNode(node,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const result=this.parseStringLiteral(this.state.value),surrogate=loneSurrogate.exec(result.value);return surrogate&&this.raise(Errors.ModuleExportNameHasLoneSurrogate,result,{surrogateCharCode:surrogate[0].charCodeAt(0)}),result}return this.parseIdentifier(!0)}isJSONModuleImport(node){return null!=node.assertions&&node.assertions.some(({key,value})=>"json"===value.value&&("Identifier"===key.type?"type"===key.name:"type"===key.value))}checkImportReflection(node){const{specifiers}=node,singleBindingType=1===specifiers.length?specifiers[0].type:null;if("source"===node.phase)"ImportDefaultSpecifier"!==singleBindingType&&this.raise(Errors.SourcePhaseImportRequiresDefault,specifiers[0].loc.start);else if("defer"===node.phase)"ImportNamespaceSpecifier"!==singleBindingType&&this.raise(Errors.DeferImportRequiresNamespace,specifiers[0].loc.start);else if(node.module){var _node$assertions;"ImportDefaultSpecifier"!==singleBindingType&&this.raise(Errors.ImportReflectionNotBinding,specifiers[0].loc.start),(null==(_node$assertions=node.assertions)?void 0:_node$assertions.length)>0&&this.raise(Errors.ImportReflectionHasAssertion,specifiers[0].loc.start)}}checkJSONModuleImport(node){if(this.isJSONModuleImport(node)&&"ExportAllDeclaration"!==node.type){const{specifiers}=node;if(null!=specifiers){const nonDefaultNamedSpecifier=specifiers.find(specifier=>{let imported;if("ExportSpecifier"===specifier.type?imported=specifier.local:"ImportSpecifier"===specifier.type&&(imported=specifier.imported),void 0!==imported)return"Identifier"===imported.type?"default"!==imported.name:"default"!==imported.value});void 0!==nonDefaultNamedSpecifier&&this.raise(Errors.ImportJSONBindingNotDefault,nonDefaultNamedSpecifier.loc.start)}}}isPotentialImportPhase(isExport){return!isExport&&(this.isContextual(105)||this.isContextual(97)||this.isContextual(127))}applyImportPhase(node,isExport,phase,loc){isExport||("module"===phase?(this.expectPlugin("importReflection",loc),node.module=!0):this.hasPlugin("importReflection")&&(node.module=!1),"source"===phase?(this.expectPlugin("sourcePhaseImports",loc),node.phase="source"):"defer"===phase?(this.expectPlugin("deferredImportEvaluation",loc),node.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(node.phase=null))}parseMaybeImportPhase(node,isExport){if(!this.isPotentialImportPhase(isExport))return this.applyImportPhase(node,isExport,null),null;const phaseIdentifier=this.startNode(),phaseIdentifierName=this.parseIdentifierName(!0),{type}=this.state;return(tokenIsKeywordOrIdentifier(type)?98!==type||102===this.lookaheadCharCode():12!==type)?(this.applyImportPhase(node,isExport,phaseIdentifierName,phaseIdentifier.loc.start),null):(this.applyImportPhase(node,isExport,null),this.createIdentifier(phaseIdentifier,phaseIdentifierName))}isPrecedingIdImportPhase(phase){const{type}=this.state;return tokenIsIdentifier(type)?98!==type||102===this.lookaheadCharCode():12!==type}parseImport(node){return this.match(134)?this.parseImportSourceAndAttributes(node):this.parseImportSpecifiersAndAfter(node,this.parseMaybeImportPhase(node,!1))}parseImportSpecifiersAndAfter(node,maybeDefaultIdentifier){node.specifiers=[];const parseNext=!this.maybeParseDefaultImportSpecifier(node,maybeDefaultIdentifier)||this.eat(12),hasStar=parseNext&&this.maybeParseStarImportSpecifier(node);return parseNext&&!hasStar&&this.parseNamedImportSpecifiers(node),this.expectContextual(98),this.parseImportSourceAndAttributes(node)}parseImportSourceAndAttributes(node){return null!=node.specifiers||(node.specifiers=[]),node.source=this.parseImportSource(),this.maybeParseImportAttributes(node),this.checkImportReflection(node),this.checkJSONModuleImport(node),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(node,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(node,specifier,type){specifier.local=this.parseIdentifier(),node.specifiers.push(this.finishImportSpecifier(specifier,type))}finishImportSpecifier(specifier,type,bindingType=8201){return this.checkLVal(specifier.local,{type},bindingType),this.finishNode(specifier,type)}parseImportAttributes(){this.expect(5);const attrs=[],attrNames=new Set;do{if(this.match(8))break;const node=this.startNode(),keyName=this.state.value;if(attrNames.has(keyName)&&this.raise(Errors.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:keyName}),attrNames.add(keyName),this.match(134)?node.key=this.parseStringLiteral(keyName):node.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(Errors.ModuleAttributeInvalidValue,this.state.startLoc);node.value=this.parseStringLiteral(this.state.value),attrs.push(this.finishNode(node,"ImportAttribute"))}while(this.eat(12));return this.expect(8),attrs}parseModuleAttributes(){const attrs=[],attributes=new Set;do{const node=this.startNode();if(node.key=this.parseIdentifier(!0),"type"!==node.key.name&&this.raise(Errors.ModuleAttributeDifferentFromType,node.key),attributes.has(node.key.name)&&this.raise(Errors.ModuleAttributesWithDuplicateKeys,node.key,{key:node.key.name}),attributes.add(node.key.name),this.expect(14),!this.match(134))throw this.raise(Errors.ModuleAttributeInvalidValue,this.state.startLoc);node.value=this.parseStringLiteral(this.state.value),attrs.push(this.finishNode(node,"ImportAttribute"))}while(this.eat(12));return attrs}maybeParseImportAttributes(node){let attributes;var useWith=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?(attributes=this.parseModuleAttributes(),this.addExtra(node,"deprecatedWithLegacySyntax",!0)):attributes=this.parseImportAttributes(),useWith=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.hasPlugin("importAssertions")||this.raise(Errors.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(node,"deprecatedAssertSyntax",!0),this.next(),attributes=this.parseImportAttributes()):attributes=[];!useWith&&this.hasPlugin("importAssertions")?node.assertions=attributes:node.attributes=attributes}maybeParseDefaultImportSpecifier(node,maybeDefaultIdentifier){if(maybeDefaultIdentifier){const specifier=this.startNodeAtNode(maybeDefaultIdentifier);return specifier.local=maybeDefaultIdentifier,node.specifiers.push(this.finishImportSpecifier(specifier,"ImportDefaultSpecifier")),!0}return!!tokenIsKeywordOrIdentifier(this.state.type)&&(this.parseImportSpecifierLocal(node,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(node){if(this.match(55)){const specifier=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(node,specifier,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(node){let first=!0;for(this.expect(5);!this.eat(8);){if(first)first=!1;else{if(this.eat(14))throw this.raise(Errors.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const specifier=this.startNode(),importedIsString=this.match(134),isMaybeTypeOnly=this.isContextual(130);specifier.imported=this.parseModuleExportName();const importSpecifier=this.parseImportSpecifier(specifier,importedIsString,"type"===node.importKind||"typeof"===node.importKind,isMaybeTypeOnly,void 0);node.specifiers.push(importSpecifier)}}parseImportSpecifier(specifier,importedIsString,isInTypeOnlyImport,isMaybeTypeOnly,bindingType){if(this.eatContextual(93))specifier.local=this.parseIdentifier();else{const{imported}=specifier;if(importedIsString)throw this.raise(Errors.ImportBindingIsString,specifier,{importName:imported.value});this.checkReservedWord(imported.name,specifier.loc.start,!0,!0),specifier.local||(specifier.local=this.cloneIdentifier(imported))}return this.finishImportSpecifier(specifier,"ImportSpecifier",bindingType)}isThisParam(param){return"Identifier"===param.type&&"this"===param.name}}class Parser extends StatementParser{constructor(options,input,pluginsMap){super(options=function(opts){const options={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==opts)return options;if(null!=opts.annexB&&!1!==opts.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const key of Object.keys(options))null!=opts[key]&&(options[key]=opts[key]);if(1===options.startLine)null==opts.startIndex&&options.startColumn>0?options.startIndex=options.startColumn:null==opts.startColumn&&options.startIndex>0&&(options.startColumn=options.startIndex);else if((null==opts.startColumn||null==opts.startIndex)&&null!=opts.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if("commonjs"===options.sourceType){if(null!=opts.allowAwaitOutsideFunction)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(null!=opts.allowReturnOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(null!=opts.allowNewTargetOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return options}(options),input),this.options=options,this.initializeScopes(),this.plugins=pluginsMap,this.filename=options.sourceFilename,this.startIndex=options.startIndex;let optionFlags=0;options.allowAwaitOutsideFunction&&(optionFlags|=1),options.allowReturnOutsideFunction&&(optionFlags|=2),options.allowImportExportEverywhere&&(optionFlags|=8),options.allowSuperOutsideMethod&&(optionFlags|=16),options.allowUndeclaredExports&&(optionFlags|=64),options.allowNewTargetOutsideFunction&&(optionFlags|=4),options.allowYieldOutsideFunction&&(optionFlags|=32),options.ranges&&(optionFlags|=128),options.tokens&&(optionFlags|=256),options.createImportExpressions&&(optionFlags|=512),options.createParenthesizedExpressions&&(optionFlags|=1024),options.errorRecovery&&(optionFlags|=2048),options.attachComment&&(optionFlags|=4096),options.annexB&&(optionFlags|=8192),this.optionFlags=optionFlags}getScopeHandler(){return ScopeHandler}parse(){this.enterInitialScopes();const file=this.startNode(),program=this.startNode();return this.nextToken(),file.errors=null,this.parseTopLevel(file,program),file.errors=this.state.errors,file.comments.length=this.state.commentsLen,file}}const tokTypes=function(internalTokenTypes){const tokenTypes={};for(const typeName of Object.keys(internalTokenTypes))tokenTypes[typeName]=getExportedToken(internalTokenTypes[typeName]);return tokenTypes}(tt);function getParser(options,input){let cls=Parser;const pluginsMap=new Map;if(null!=options&&options.plugins){for(const plugin of options.plugins){let name,opts;"string"==typeof plugin?name=plugin:[name,opts]=plugin,pluginsMap.has(name)||pluginsMap.set(name,opts||{})}!function(pluginsMap){if(pluginsMap.has("decorators")){if(pluginsMap.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const decoratorsBeforeExport=pluginsMap.get("decorators").decoratorsBeforeExport;if(null!=decoratorsBeforeExport&&"boolean"!=typeof decoratorsBeforeExport)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const allowCallParenthesized=pluginsMap.get("decorators").allowCallParenthesized;if(null!=allowCallParenthesized&&"boolean"!=typeof allowCallParenthesized)throw new Error("'allowCallParenthesized' must be a boolean.")}if(pluginsMap.has("flow")&&pluginsMap.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(pluginsMap.has("placeholders")&&pluginsMap.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(pluginsMap.has("pipelineOperator")){var _pluginsMap$get2;const proposal=pluginsMap.get("pipelineOperator").proposal;if(!PIPELINE_PROPOSALS.includes(proposal)){const proposalList=PIPELINE_PROPOSALS.map(p=>`"${p}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`)}if("hack"===proposal){if(pluginsMap.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(pluginsMap.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const topicToken=pluginsMap.get("pipelineOperator").topicToken;if(!TOPIC_TOKENS.includes(topicToken)){const tokenList=TOPIC_TOKENS.map(t=>`"${t}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`)}var _pluginsMap$get;if("#"===topicToken&&"hash"===(null==(_pluginsMap$get=pluginsMap.get("recordAndTuple"))?void 0:_pluginsMap$get.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",pluginsMap.get("recordAndTuple")])}\`.`)}else if("smart"===proposal&&"hash"===(null==(_pluginsMap$get2=pluginsMap.get("recordAndTuple"))?void 0:_pluginsMap$get2.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",pluginsMap.get("recordAndTuple")])}\`.`)}if(pluginsMap.has("moduleAttributes")){if(pluginsMap.has("deprecatedImportAssert")||pluginsMap.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if("may-2020"!==pluginsMap.get("moduleAttributes").version)throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(pluginsMap.has("importAssertions")&&pluginsMap.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!pluginsMap.has("deprecatedImportAssert")&&pluginsMap.has("importAttributes")&&pluginsMap.get("importAttributes").deprecatedAssertSyntax&&pluginsMap.set("deprecatedImportAssert",{}),pluginsMap.has("recordAndTuple")){const syntaxType=pluginsMap.get("recordAndTuple").syntaxType;if(null!=syntaxType){const RECORD_AND_TUPLE_SYNTAX_TYPES=["hash","bar"];if(!RECORD_AND_TUPLE_SYNTAX_TYPES.includes(syntaxType))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+RECORD_AND_TUPLE_SYNTAX_TYPES.map(p=>`'${p}'`).join(", "))}}if(pluginsMap.has("asyncDoExpressions")&&!pluginsMap.has("doExpressions")){const error=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw error.missingPlugins="doExpressions",error}if(pluginsMap.has("optionalChainingAssign")&&"2023-07"!==pluginsMap.get("optionalChainingAssign").version)throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(pluginsMap.has("discardBinding")&&"void"!==pluginsMap.get("discardBinding").syntaxType)throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}(pluginsMap),cls=function(pluginsMap){const pluginList=[];for(const name of mixinPluginNames)pluginsMap.has(name)&&pluginList.push(name);const key=pluginList.join("|");let cls=parserClassCache.get(key);if(!cls){cls=Parser;for(const plugin of pluginList)cls=mixinPlugins[plugin](cls);parserClassCache.set(key,cls)}return cls}(pluginsMap)}return new cls(options,input,pluginsMap)}const parserClassCache=new Map;exports.parse=function(input,options){var _options;if("unambiguous"!==(null==(_options=options)?void 0:_options.sourceType))return getParser(options,input).parse();options=Object.assign({},options);try{options.sourceType="module";const parser=getParser(options,input),ast=parser.parse();if(parser.sawUnambiguousESM)return ast;if(parser.ambiguousScriptDifferentAst)try{return options.sourceType="script",getParser(options,input).parse()}catch(_unused){}else ast.program.sourceType="script";return ast}catch(moduleError){try{return options.sourceType="script",getParser(options,input).parse()}catch(_unused2){}throw moduleError}},exports.parseExpression=function(input,options){const parser=getParser(options,input);return parser.options.strictMode&&(parser.state.strict=!0),parser.getExpression()},exports.tokTypes=tokTypes},"./node_modules/.pnpm/@babel+plugin-proposal-decorators@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-proposal-decorators/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.A=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),_pluginSyntaxDecorators=__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-decorators@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-decorators/lib/index.js"),_helperCreateClassFeaturesPlugin=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/index.js"),_transformerLegacy=__webpack_require__("./node_modules/.pnpm/@babel+plugin-proposal-decorators@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-proposal-decorators/lib/transformer-legacy.js");exports.A=(0,_helperPluginUtils.declare)((api,options)=>{api.assertVersion(7);var{legacy}=options;const{version}=options;if(legacy||"legacy"===version)return{name:"proposal-decorators",inherits:_pluginSyntaxDecorators.default,visitor:_transformerLegacy.default};if(version&&"2018-09"!==version&&"2021-12"!==version&&"2022-03"!==version&&"2023-01"!==version&&"2023-05"!==version&&"2023-11"!==version)throw new Error("The '.version' option must be one of 'legacy', '2023-11', '2023-05', '2023-01', '2022-03', or '2021-12'.");return api.assertVersion("^7.0.2"),(0,_helperCreateClassFeaturesPlugin.createClassFeaturePlugin)({name:"proposal-decorators",api,feature:_helperCreateClassFeaturesPlugin.FEATURES.decorators,inherits:_pluginSyntaxDecorators.default,decoratorVersion:version})})},"./node_modules/.pnpm/@babel+plugin-proposal-decorators@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-proposal-decorators/lib/transformer-legacy.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js");const buildClassDecorator=_core.template.statement("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n"),buildClassPrototype=(0,_core.template)("\n CLASS_REF.prototype;\n"),buildGetDescriptor=(0,_core.template)("\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n"),buildGetObjectInitializer=(0,_core.template)("\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n"),WARNING_CALLS=new WeakSet;function applyEnsureOrdering(path){const identDecorators=(path.isClass()?[path,...path.get("body.body")]:path.get("properties")).reduce((acc,prop)=>acc.concat(prop.node.decorators||[]),[]).filter(decorator=>!_core.types.isIdentifier(decorator.expression));if(0!==identDecorators.length)return _core.types.sequenceExpression(identDecorators.map(decorator=>{const expression=decorator.expression,id=decorator.expression=path.scope.generateDeclaredUidIdentifier("dec");return _core.types.assignmentExpression("=",id,expression)}).concat([path.node]))}function hasClassDecorators(classNode){var _classNode$decorators;return!(null==(_classNode$decorators=classNode.decorators)||!_classNode$decorators.length)}function hasMethodDecorators(body){return body.some(node=>{var _node$decorators;return null==(_node$decorators=node.decorators)?void 0:_node$decorators.length})}function applyTargetDecorators(path,state,decoratedProps){const name=path.scope.generateDeclaredUidIdentifier(path.isClass()?"class":"obj"),exprs=decoratedProps.reduce(function(acc,node){let decorators=[];if(null!=node.decorators&&(decorators=node.decorators,node.decorators=null),0===decorators.length)return acc;if(node.computed)throw path.buildCodeFrameError("Computed method/property decorators are not yet supported.");const property=_core.types.isLiteral(node.key)?node.key:_core.types.stringLiteral(node.key.name),target=path.isClass()&&!node.static?buildClassPrototype({CLASS_REF:name}).expression:name;if(_core.types.isClassProperty(node,{static:!1})){const descriptor=path.scope.generateDeclaredUidIdentifier("descriptor"),initializer=node.value?_core.types.functionExpression(null,[],_core.types.blockStatement([_core.types.returnStatement(node.value)])):_core.types.nullLiteral();node.value=_core.types.callExpression(state.addHelper("initializerWarningHelper"),[descriptor,_core.types.thisExpression()]),WARNING_CALLS.add(node.value),acc.push(_core.types.assignmentExpression("=",_core.types.cloneNode(descriptor),_core.types.callExpression(state.addHelper("applyDecoratedDescriptor"),[_core.types.cloneNode(target),_core.types.cloneNode(property),_core.types.arrayExpression(decorators.map(dec=>_core.types.cloneNode(dec.expression))),_core.types.objectExpression([_core.types.objectProperty(_core.types.identifier("configurable"),_core.types.booleanLiteral(!0)),_core.types.objectProperty(_core.types.identifier("enumerable"),_core.types.booleanLiteral(!0)),_core.types.objectProperty(_core.types.identifier("writable"),_core.types.booleanLiteral(!0)),_core.types.objectProperty(_core.types.identifier("initializer"),initializer)])])))}else acc.push(_core.types.callExpression(state.addHelper("applyDecoratedDescriptor"),[_core.types.cloneNode(target),_core.types.cloneNode(property),_core.types.arrayExpression(decorators.map(dec=>_core.types.cloneNode(dec.expression))),_core.types.isObjectProperty(node)||_core.types.isClassProperty(node,{static:!0})?buildGetObjectInitializer({TEMP:path.scope.generateDeclaredUidIdentifier("init"),TARGET:_core.types.cloneNode(target),PROPERTY:_core.types.cloneNode(property)}).expression:buildGetDescriptor({TARGET:_core.types.cloneNode(target),PROPERTY:_core.types.cloneNode(property)}).expression,_core.types.cloneNode(target)]));return acc},[]);return _core.types.sequenceExpression([_core.types.assignmentExpression("=",_core.types.cloneNode(name),path.node),_core.types.sequenceExpression(exprs),_core.types.cloneNode(name)])}function decoratedClassToExpression({node,scope}){if(!hasClassDecorators(node)&&!hasMethodDecorators(node.body.body))return;const ref=node.id?_core.types.cloneNode(node.id):scope.generateUidIdentifier("class");return _core.types.variableDeclaration("let",[_core.types.variableDeclarator(ref,_core.types.toExpression(node))])}const visitor={ExportDefaultDeclaration(path){const decl=path.get("declaration");if(!decl.isClassDeclaration())return;const replacement=decoratedClassToExpression(decl);if(replacement){const[varDeclPath]=path.replaceWithMultiple([replacement,_core.types.exportNamedDeclaration(null,[_core.types.exportSpecifier(_core.types.cloneNode(replacement.declarations[0].id),_core.types.identifier("default"))])]);decl.node.id||path.scope.registerDeclaration(varDeclPath)}},ClassDeclaration(path){const replacement=decoratedClassToExpression(path);if(replacement){const[newPath]=path.replaceWith(replacement),decl=newPath.get("declarations.0"),id=decl.node.id,binding=path.scope.getOwnBinding(id.name);binding.identifier=id,binding.path=decl}},ClassExpression(path,state){const decoratedClass=applyEnsureOrdering(path)||function(classPath){if(!hasClassDecorators(classPath.node))return;const decorators=classPath.node.decorators||[];classPath.node.decorators=null;const name=classPath.scope.generateDeclaredUidIdentifier("class");return decorators.map(dec=>dec.expression).reverse().reduce(function(acc,decorator){return buildClassDecorator({CLASS_REF:_core.types.cloneNode(name),DECORATOR:_core.types.cloneNode(decorator),INNER:acc}).expression},classPath.node)}(path)||function(path,state){if(hasMethodDecorators(path.node.body.body))return applyTargetDecorators(path,state,path.node.body.body)}(path,state);decoratedClass&&path.replaceWith(decoratedClass)},ObjectExpression(path,state){const decoratedObject=applyEnsureOrdering(path)||function(path,state){if(hasMethodDecorators(path.node.properties))return applyTargetDecorators(path,state,path.node.properties.filter(prop=>"SpreadElement"!==prop.type))}(path,state);decoratedObject&&path.replaceWith(decoratedObject)},AssignmentExpression(path,state){WARNING_CALLS.has(path.node.right)&&path.replaceWith(_core.types.callExpression(state.addHelper("initializerDefineProperty"),[_core.types.cloneNode(path.get("left.object").node),_core.types.stringLiteral(path.get("left.property").node.name||path.get("left.property").node.value),_core.types.cloneNode(path.get("right.arguments")[0].node),_core.types.cloneNode(path.get("right.arguments")[1].node)]))},CallExpression(path,state){3===path.node.arguments.length&&WARNING_CALLS.has(path.node.arguments[2])&&path.node.callee.name===state.addHelper("defineProperty").name&&path.replaceWith(_core.types.callExpression(state.addHelper("initializerDefineProperty"),[_core.types.cloneNode(path.get("arguments")[0].node),_core.types.cloneNode(path.get("arguments")[1].node),_core.types.cloneNode(path.get("arguments.2.arguments")[0].node),_core.types.cloneNode(path.get("arguments.2.arguments")[1].node)]))}};exports.default=visitor},"./node_modules/.pnpm/@babel+plugin-syntax-class-properties@7.12.13_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-class-properties/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.A=void 0;var _default=(0,__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js").declare)(api=>(api.assertVersion(7),{name:"syntax-class-properties",manipulateOptions(opts,parserOpts){parserOpts.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}));exports.A=_default},"./node_modules/.pnpm/@babel+plugin-syntax-decorators@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-decorators/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js");exports.default=(0,_helperPluginUtils.declare)((api,options)=>{api.assertVersion("^7.0.0-0 || >8.0.0-alpha <8.0.0-beta");let{version}=options;{const{legacy}=options;if(void 0!==legacy){if("boolean"!=typeof legacy)throw new Error(".legacy must be a boolean.");if(void 0!==version)throw new Error("You can either use the .legacy or the .version option, not both.")}if(void 0===version)version=legacy?"legacy":"2018-09";else if("2023-11"!==version&&"2023-05"!==version&&"2023-01"!==version&&"2022-03"!==version&&"2021-12"!==version&&"2018-09"!==version&&"legacy"!==version)throw new Error("Unsupported decorators version: "+version);var{decoratorsBeforeExport}=options;if(void 0===decoratorsBeforeExport){if("2021-12"===version||"2022-03"===version)decoratorsBeforeExport=!1;else if("2018-09"===version)throw new Error("The decorators plugin, when .version is '2018-09' or not specified, requires a 'decoratorsBeforeExport' option, whose value must be a boolean.")}else{if("legacy"===version||"2022-03"===version||"2023-01"===version)throw new Error(`'decoratorsBeforeExport' can't be used with ${version} decorators.`);if("boolean"!=typeof decoratorsBeforeExport)throw new Error("'decoratorsBeforeExport' must be a boolean.")}}return{name:"syntax-decorators",manipulateOptions({generatorOpts},parserOpts){"legacy"===version?parserOpts.plugins.push("decorators-legacy"):"2023-01"===version||"2023-05"===version||"2023-11"===version?parserOpts.plugins.push(["decorators",{allowCallParenthesized:!1}],"decoratorAutoAccessors"):"2022-03"===version?parserOpts.plugins.push(["decorators",{decoratorsBeforeExport:!1,allowCallParenthesized:!1}],"decoratorAutoAccessors"):"2021-12"===version?(parserOpts.plugins.push(["decorators",{decoratorsBeforeExport}],"decoratorAutoAccessors"),generatorOpts.decoratorsBeforeExport=decoratorsBeforeExport):"2018-09"===version&&(parserOpts.plugins.push(["decorators",{decoratorsBeforeExport}]),generatorOpts.decoratorsBeforeExport=decoratorsBeforeExport)}}})},"./node_modules/.pnpm/@babel+plugin-syntax-import-assertions@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-import-assertions/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.A=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js");exports.A=(0,_helperPluginUtils.declare)(api=>{api.assertVersion(7);const isPlugin=(plugin,name)=>"plugin"===name||Array.isArray(plugin)&&"plugin"===plugin[0],options=plugin=>Array.isArray(plugin)&&plugin.length>1?plugin[1]:{};return{name:"syntax-import-assertions",manipulateOptions(opts,{plugins}){for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js");exports.default=(0,_helperPluginUtils.declare)(api=>(api.assertVersion(7),{name:"syntax-jsx",manipulateOptions(opts,parserOpts){parserOpts.plugins.some(p=>"typescript"===(Array.isArray(p)?p[0]:p))||parserOpts.plugins.push("jsx")}}))},"./node_modules/.pnpm/@babel+plugin-syntax-typescript@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-typescript/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),removePlugin=function(plugins,name){const indices=[];plugins.forEach((plugin,i)=>{(Array.isArray(plugin)?plugin[0]:plugin)===name&&indices.unshift(i)});for(const i of indices)plugins.splice(i,1)};exports.default=(0,_helperPluginUtils.declare)((api,opts)=>{api.assertVersion(7);const{disallowAmbiguousJSXLike,dts}=opts;var{isTSX}=opts;return{name:"syntax-typescript",manipulateOptions(opts,parserOpts){{const{plugins}=parserOpts;removePlugin(plugins,"flow"),removePlugin(plugins,"jsx"),plugins.push("objectRestSpread","classProperties"),isTSX&&plugins.push("jsx")}parserOpts.plugins.push(["typescript",{disallowAmbiguousJSXLike,dts}])}}})},"./node_modules/.pnpm/@babel+plugin-transform-export-namespace-from@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-export-namespace-from/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.A=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js");exports.A=(0,_helperPluginUtils.declare)(api=>(api.assertVersion(7),{name:"transform-export-namespace-from",manipulateOptions:(_,parser)=>parser.plugins.push("exportNamespaceFrom"),visitor:{ExportNamedDeclaration(path){var _exported$name;const{node,scope}=path,{specifiers}=node,index=_core.types.isExportDefaultSpecifier(specifiers[0])?1:0;if(!_core.types.isExportNamespaceSpecifier(specifiers[index]))return;const nodes=[];1===index&&nodes.push(_core.types.exportNamedDeclaration(null,[specifiers.shift()],node.source));const specifier=specifiers.shift(),{exported}=specifier,uid=scope.generateUidIdentifier(null!=(_exported$name=exported.name)?_exported$name:exported.value);nodes.push(_core.types.importDeclaration([_core.types.importNamespaceSpecifier(uid)],_core.types.cloneNode(node.source)),_core.types.exportNamedDeclaration(null,[_core.types.exportSpecifier(_core.types.cloneNode(uid),exported)])),node.specifiers.length>=1&&nodes.push(node);const[importDeclaration]=path.replaceWithMultiple(nodes);path.scope.registerDeclaration(importDeclaration)}}}))},"./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/dynamic-import.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformDynamicImport=function(path,noInterop,file){const buildRequire=noInterop?requireNoInterop:requireInterop;path.replaceWith((0,_helperModuleTransforms.buildDynamicImport)(path.node,!0,!1,specifier=>buildRequire(specifier,file)))};var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_helperModuleTransforms=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/index.js");const requireNoInterop=source=>_core.template.expression.ast`require(${source})`,requireInterop=(source,file)=>_core.types.callExpression(file.addHelper("interopRequireWildcard"),[requireNoInterop(source)])},"./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.defineCommonJSHook=function(file,hook){let hooks=file.get(commonJSHooksKey);hooks||file.set(commonJSHooksKey,hooks=[]);hooks.push(hook)},exports.makeInvokers=function(file){const hooks=file.get(commonJSHooksKey);return{getWrapperPayload:(...args)=>findMap(hooks,hook=>null==hook.getWrapperPayload?void 0:hook.getWrapperPayload(...args)),wrapReference:(...args)=>findMap(hooks,hook=>null==hook.wrapReference?void 0:hook.wrapReference(...args)),buildRequireWrapper:(...args)=>findMap(hooks,hook=>null==hook.buildRequireWrapper?void 0:hook.buildRequireWrapper(...args))}};const commonJSHooksKey="@babel/plugin-transform-modules-commonjs/customWrapperPlugin";function findMap(arr,cb){if(arr)for(const el of arr){const res=cb(el);if(null!=res)return res}}},"./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,Object.defineProperty(exports,"defineCommonJSHook",{enumerable:!0,get:function(){return _hooks.defineCommonJSHook}});var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),_helperModuleTransforms=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/index.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_dynamicImport=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/dynamic-import.js"),_lazy=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js"),_hooks=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/hooks.js");exports.default=(0,_helperPluginUtils.declare)((api,options)=>{var _api$assumption,_api$assumption2,_api$assumption3;api.assertVersion(7);const{strictNamespace=!1,mjsStrictNamespace=strictNamespace,allowTopLevelThis,strict,strictMode,noInterop,importInterop,lazy=!1,allowCommonJSExports=!0,loose=!1}=options,constantReexports=null!=(_api$assumption=api.assumption("constantReexports"))?_api$assumption:loose,enumerableModuleMeta=null!=(_api$assumption2=api.assumption("enumerableModuleMeta"))?_api$assumption2:loose,noIncompleteNsImportDetection=null!=(_api$assumption3=api.assumption("noIncompleteNsImportDetection"))&&_api$assumption3;if(!("boolean"==typeof lazy||"function"==typeof lazy||Array.isArray(lazy)&&lazy.every(item=>"string"==typeof item)))throw new Error(".lazy must be a boolean, array of strings, or a function");if("boolean"!=typeof strictNamespace)throw new Error(".strictNamespace must be a boolean, or undefined");if("boolean"!=typeof mjsStrictNamespace)throw new Error(".mjsStrictNamespace must be a boolean, or undefined");const getAssertion=localName=>_core.template.expression.ast` + (function(){ + throw new Error( + "The CommonJS '" + "${localName}" + "' variable is not available in ES6 modules." + + "Consider setting setting sourceType:script or sourceType:unambiguous in your " + + "Babel config for this file."); + })() + `,moduleExportsVisitor={ReferencedIdentifier(path){const localName=path.node.name;if("module"!==localName&&"exports"!==localName)return;const localBinding=path.scope.getBinding(localName);this.scope.getBinding(localName)!==localBinding||path.parentPath.isObjectProperty({value:path.node})&&path.parentPath.parentPath.isObjectPattern()||path.parentPath.isAssignmentExpression({left:path.node})||path.isAssignmentExpression({left:path.node})||path.replaceWith(getAssertion(localName))},UpdateExpression(path){const arg=path.get("argument");if(!arg.isIdentifier())return;const localName=arg.node.name;if("module"!==localName&&"exports"!==localName)return;const localBinding=path.scope.getBinding(localName);this.scope.getBinding(localName)===localBinding&&path.replaceWith(_core.types.assignmentExpression(path.node.operator[0]+"=",arg.node,getAssertion(localName)))},AssignmentExpression(path){const left=path.get("left");if(left.isIdentifier()){const localName=left.node.name;if("module"!==localName&&"exports"!==localName)return;const localBinding=path.scope.getBinding(localName);if(this.scope.getBinding(localName)!==localBinding)return;const right=path.get("right");right.replaceWith(_core.types.sequenceExpression([right.node,getAssertion(localName)]))}else if(left.isPattern()){const ids=left.getOuterBindingIdentifiers(),localName=Object.keys(ids).find(localName=>("module"===localName||"exports"===localName)&&this.scope.getBinding(localName)===path.scope.getBinding(localName));if(localName){const right=path.get("right");right.replaceWith(_core.types.sequenceExpression([right.node,getAssertion(localName)]))}}}};return{name:"transform-modules-commonjs",pre(){this.file.set("@babel/plugin-transform-modules-*","commonjs"),lazy&&(0,_hooks.defineCommonJSHook)(this.file,(0,_lazy.lazyImportsHook)(lazy))},visitor:{["CallExpression"+(api.types.importExpression?"|ImportExpression":"")](path){if(!this.file.has("@babel/plugin-proposal-dynamic-import"))return;if(path.isCallExpression()&&!_core.types.isImport(path.node.callee))return;let{scope}=path;do{scope.rename("require")}while(scope=scope.parent);(0,_dynamicImport.transformDynamicImport)(path,noInterop,this.file)},Program:{exit(path,state){if(!(0,_helperModuleTransforms.isModule)(path))return;path.scope.rename("exports"),path.scope.rename("module"),path.scope.rename("require"),path.scope.rename("__filename"),path.scope.rename("__dirname"),allowCommonJSExports||path.traverse(moduleExportsVisitor,{scope:path.scope});let moduleName=(0,_helperModuleTransforms.getModuleName)(this.file.opts,options);moduleName&&(moduleName=_core.types.stringLiteral(moduleName));const hooks=(0,_hooks.makeInvokers)(this.file),{meta,headers}=(0,_helperModuleTransforms.rewriteModuleStatementsAndPrepareHeader)(path,{exportName:"exports",constantReexports,enumerableModuleMeta,strict,strictMode,allowTopLevelThis,noInterop,importInterop,wrapReference:hooks.wrapReference,getWrapperPayload:hooks.getWrapperPayload,esNamespaceOnly:"string"==typeof state.filename&&/\.mjs$/.test(state.filename)?mjsStrictNamespace:strictNamespace,noIncompleteNsImportDetection,filename:this.file.opts.filename});for(const[source,metadata]of meta.source){const loadExpr=_core.types.callExpression(_core.types.identifier("require"),[_core.types.stringLiteral(source)]);let header;if((0,_helperModuleTransforms.isSideEffectImport)(metadata)){if(lazy&&"function"===metadata.wrap)throw new Error("Assertion failure");header=_core.types.expressionStatement(loadExpr)}else{const init=(0,_helperModuleTransforms.wrapInterop)(path,loadExpr,metadata.interop)||loadExpr;if(metadata.wrap){const res=hooks.buildRequireWrapper(metadata.name,init,metadata.wrap,metadata.referenced);if(!1===res)continue;header=res}null!=header||(header=_core.template.statement.ast` + var ${metadata.name} = ${init}; + `)}header.loc=metadata.loc,headers.push(header),headers.push(...(0,_helperModuleTransforms.buildNamespaceInitStatements)(meta,metadata,constantReexports,hooks.wrapReference))}(0,_helperModuleTransforms.ensureStatementsHoisted)(headers),path.unshiftContainer("body",headers),path.get("body").forEach(path=>{headers.includes(path.node)&&path.isVariableDeclaration()&&path.scope.registerDeclaration(path)})}}}}})},"./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/lazy.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.lazyImportsHook=void 0;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_helperModuleTransforms=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-transforms@7.27.3_@babel+core@7.28.0/node_modules/@babel/helper-module-transforms/lib/index.js");exports.lazyImportsHook=lazy=>({name:"@babel/plugin-transform-modules-commonjs/lazy",version:"7.27.1",getWrapperPayload:(source,metadata)=>(0,_helperModuleTransforms.isSideEffectImport)(metadata)||metadata.reexportAll?null:!0===lazy?source.includes(".")?null:"lazy/function":Array.isArray(lazy)?lazy.includes(source)?"lazy/function":null:"function"==typeof lazy?lazy(source)?"lazy/function":null:void 0,buildRequireWrapper(name,init,payload,referenced){if("lazy/function"===payload)return!!referenced&&_core.template.statement.ast` + function ${name}() { + const data = ${init}; + ${name} = function(){ return data; }; + return data; + } + `},wrapReference(ref,payload){if("lazy/function"===payload)return _core.types.callExpression(ref,[])}})},"./node_modules/.pnpm/@babel+plugin-transform-react-jsx@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-react-jsx/lib/create-plugin.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function({name,development}){return(0,_helperPluginUtils.declare)((_,options)=>{const{pure:PURE_ANNOTATION,throwIfNamespace=!0,filter,runtime:RUNTIME_DEFAULT=(development?"automatic":"classic"),importSource:IMPORT_SOURCE_DEFAULT=DEFAULT.importSource,pragma:PRAGMA_DEFAULT=DEFAULT.pragma,pragmaFrag:PRAGMA_FRAG_DEFAULT=DEFAULT.pragmaFrag}=options;var{useSpread=!1,useBuiltIns=!1}=options;if("classic"===RUNTIME_DEFAULT){if("boolean"!=typeof useSpread)throw new Error("transform-react-jsx currently only accepts a boolean option for useSpread (defaults to false)");if("boolean"!=typeof useBuiltIns)throw new Error("transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)");if(useSpread&&useBuiltIns)throw new Error("transform-react-jsx currently only accepts useBuiltIns or useSpread but not both")}const injectMetaPropertiesVisitor={JSXOpeningElement(path,state){const attributes=[];(function(scope){do{const{path}=scope;if(path.isFunctionParent()&&!path.isArrowFunctionExpression())return!path.isMethod()||("constructor"!==path.node.kind||!isDerivedClass(path.parentPath.parentPath));if(path.isTSModuleBlock())return!1}while(scope=scope.parent);return!0})(path.scope)&&attributes.push(_core.types.jsxAttribute(_core.types.jsxIdentifier("__self"),_core.types.jsxExpressionContainer(_core.types.thisExpression()))),attributes.push(_core.types.jsxAttribute(_core.types.jsxIdentifier("__source"),_core.types.jsxExpressionContainer(function(path,state){const location=path.node.loc;if(!location)return path.scope.buildUndefinedNode();if(!state.fileNameIdentifier){const{filename=""}=state,fileNameIdentifier=path.scope.generateUidIdentifier("_jsxFileName");path.scope.getProgramParent().push({id:fileNameIdentifier,init:_core.types.stringLiteral(filename)}),state.fileNameIdentifier=fileNameIdentifier}return function(fileNameIdentifier,lineNumber,column0Based){const fileLineLiteral=null!=lineNumber?_core.types.numericLiteral(lineNumber):_core.types.nullLiteral(),fileColumnLiteral=null!=column0Based?_core.types.numericLiteral(column0Based+1):_core.types.nullLiteral();return _core.template.expression.ast`{ + fileName: ${fileNameIdentifier}, + lineNumber: ${fileLineLiteral}, + columnNumber: ${fileColumnLiteral}, + }`}(_core.types.cloneNode(state.fileNameIdentifier),location.start.line,location.start.column)}(path,state)))),path.pushContainer("attributes",attributes)}};return{name,inherits:_pluginSyntaxJsx.default,visitor:{JSXNamespacedName(path){if(throwIfNamespace)throw path.buildCodeFrameError("Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning.")},JSXSpreadChild(path){throw path.buildCodeFrameError("Spread children are not supported in React.")},Program:{enter(path,state){const{file}=state;let runtime=RUNTIME_DEFAULT,source=IMPORT_SOURCE_DEFAULT,pragma=PRAGMA_DEFAULT,pragmaFrag=PRAGMA_FRAG_DEFAULT,sourceSet=!!options.importSource,pragmaSet=!!options.pragma,pragmaFragSet=!!options.pragmaFrag;if(file.ast.comments)for(const comment of file.ast.comments){const sourceMatches=JSX_SOURCE_ANNOTATION_REGEX.exec(comment.value);sourceMatches&&(source=sourceMatches[1],sourceSet=!0);const runtimeMatches=JSX_RUNTIME_ANNOTATION_REGEX.exec(comment.value);runtimeMatches&&(runtime=runtimeMatches[1]);const jsxMatches=JSX_ANNOTATION_REGEX.exec(comment.value);jsxMatches&&(pragma=jsxMatches[1],pragmaSet=!0);const jsxFragMatches=JSX_FRAG_ANNOTATION_REGEX.exec(comment.value);jsxFragMatches&&(pragmaFrag=jsxFragMatches[1],pragmaFragSet=!0)}if(set(state,"runtime",runtime),"classic"===runtime){if(sourceSet)throw path.buildCodeFrameError("importSource cannot be set when runtime is classic.");const createElement=toMemberExpression(pragma),fragment=toMemberExpression(pragmaFrag);set(state,"id/createElement",()=>_core.types.cloneNode(createElement)),set(state,"id/fragment",()=>_core.types.cloneNode(fragment)),set(state,"defaultPure",pragma===DEFAULT.pragma)}else{if("automatic"!==runtime)throw path.buildCodeFrameError('Runtime must be either "classic" or "automatic".');{if(pragmaSet||pragmaFragSet)throw path.buildCodeFrameError("pragma and pragmaFrag cannot be set when runtime is automatic.");const define=(name,id)=>set(state,name,function(pass,path,importName,source){return()=>{const actualSource=function(source,importName){switch(importName){case"Fragment":return`${source}/${development?"jsx-dev-runtime":"jsx-runtime"}`;case"jsxDEV":return`${source}/jsx-dev-runtime`;case"jsx":case"jsxs":return`${source}/jsx-runtime`;case"createElement":return source}}(source,importName);if((0,_helperModuleImports.isModule)(path)){let reference=get(pass,`imports/${importName}`);return reference?_core.types.cloneNode(reference):(reference=(0,_helperModuleImports.addNamed)(path,importName,actualSource,{importedInterop:"uncompiled",importPosition:"after"}),set(pass,`imports/${importName}`,reference),reference)}{let reference=get(pass,`requires/${actualSource}`);return reference?reference=_core.types.cloneNode(reference):(reference=(0,_helperModuleImports.addNamespace)(path,actualSource,{importedInterop:"uncompiled"}),set(pass,`requires/${actualSource}`,reference)),_core.types.memberExpression(reference,_core.types.identifier(importName))}}}(state,path,id,source));define("id/jsx",development?"jsxDEV":"jsx"),define("id/jsxs",development?"jsxDEV":"jsxs"),define("id/createElement","createElement"),define("id/fragment","Fragment"),set(state,"defaultPure",source===DEFAULT.importSource)}}development&&path.traverse(injectMetaPropertiesVisitor,state)}},JSXFragment:{exit(path,file){let callExpr;callExpr="classic"===get(file,"runtime")?function(path,file){if(filter&&!filter(path.node,file))return;return call(file,"createElement",[get(file,"id/fragment")(),_core.types.nullLiteral(),..._core.types.react.buildChildren(path.node)])}(path,file):function(path,file){const args=[get(file,"id/fragment")()],children=_core.types.react.buildChildren(path.node);args.push(_core.types.objectExpression(children.length>0?[buildChildrenProperty(children)]:[])),development&&args.push(path.scope.buildUndefinedNode(),_core.types.booleanLiteral(children.length>1));return call(file,children.length>1?"jsxs":"jsx",args)}(path,file),path.replaceWith(_core.types.inherits(callExpr,path.node))}},JSXElement:{exit(path,file){let callExpr;callExpr="classic"===get(file,"runtime")||function(path){const openingPath=path.get("openingElement"),attributes=openingPath.node.attributes;let seenPropsSpread=!1;for(let i=0;i0&&props.push(buildChildrenProperty(children));return _core.types.objectExpression(props)}(attribsArray,children):_core.types.objectExpression([]);if(args.push(attribs),development){var _extracted$key;args.push(null!=(_extracted$key=extracted.key)?_extracted$key:path.scope.buildUndefinedNode(),_core.types.booleanLiteral(children.length>1)),extracted.__source?(args.push(extracted.__source),extracted.__self&&args.push(extracted.__self)):extracted.__self&&args.push(path.scope.buildUndefinedNode(),extracted.__self)}else void 0!==extracted.key&&args.push(extracted.key);return call(file,children.length>1?"jsxs":"jsx",args)}(path,file),path.replaceWith(_core.types.inherits(callExpr,path.node))}},JSXAttribute(path){_core.types.isJSXElement(path.node.value)&&(path.node.value=_core.types.jsxExpressionContainer(path.node.value))}}};function isDerivedClass(classPath){return null!==classPath.node.superClass}function call(pass,name,args){const node=_core.types.callExpression(get(pass,`id/${name}`)(),args);return(null!=PURE_ANNOTATION?PURE_ANNOTATION:get(pass,"defaultPure"))&&(0,_helperAnnotateAsPure.default)(node),node}function convertJSXIdentifier(node,parent){return _core.types.isJSXIdentifier(node)?"this"===node.name&&_core.types.isReferenced(node,parent)?_core.types.thisExpression():_core.types.isValidIdentifier(node.name,!1)?(node.type="Identifier",node):_core.types.stringLiteral(node.name):_core.types.isJSXMemberExpression(node)?_core.types.memberExpression(convertJSXIdentifier(node.object,node),convertJSXIdentifier(node.property,node)):_core.types.isJSXNamespacedName(node)?_core.types.stringLiteral(`${node.namespace.name}:${node.name.name}`):node}function convertAttributeValue(node){return _core.types.isJSXExpressionContainer(node)?node.expression:node}function accumulateAttribute(array,attribute){if(_core.types.isJSXSpreadAttribute(attribute.node)){const arg=attribute.node.argument;return _core.types.isObjectExpression(arg)&&!arg.properties.some(value=>_core.types.isObjectProperty(value,{computed:!1,shorthand:!1})&&(_core.types.isIdentifier(value.key,{name:"__proto__"})||_core.types.isStringLiteral(value.key,{value:"__proto__"})))?array.push(...arg.properties):array.push(_core.types.spreadElement(arg)),array}const value=convertAttributeValue("key"!==attribute.node.name.name?attribute.node.value||_core.types.booleanLiteral(!0):attribute.node.value);if("key"===attribute.node.name.name&&null===value)throw attribute.buildCodeFrameError('Please provide an explicit key value. Using "key" as a shorthand for "key={true}" is not allowed.');var _value$extra;_core.types.isStringLiteral(value)&&!_core.types.isJSXExpressionContainer(attribute.node.value)&&(value.value=value.value.replace(/\n\s+/g," "),null==(_value$extra=value.extra)||delete _value$extra.raw);return _core.types.isJSXNamespacedName(attribute.node.name)?attribute.node.name=_core.types.stringLiteral(attribute.node.name.namespace.name+":"+attribute.node.name.name.name):_core.types.isValidIdentifier(attribute.node.name.name,!1)?attribute.node.name.type="Identifier":attribute.node.name=_core.types.stringLiteral(attribute.node.name.name),array.push(_core.types.inherits(_core.types.objectProperty(attribute.node.name,value),attribute.node)),array}function buildChildrenProperty(children){let childrenNode;if(1===children.length)childrenNode=children[0];else{if(!(children.length>1))return;childrenNode=_core.types.arrayExpression(children)}return _core.types.objectProperty(_core.types.identifier("children"),childrenNode)}function getTag(openingPath){const tagExpr=convertJSXIdentifier(openingPath.node.name,openingPath.node);let tagName;return _core.types.isIdentifier(tagExpr)?tagName=tagExpr.name:_core.types.isStringLiteral(tagExpr)&&(tagName=tagExpr.value),_core.types.react.isCompatTag(tagName)?_core.types.stringLiteral(tagName):tagExpr}function buildCreateElementOpeningElementAttributes(file,path,attribs){const runtime=get(file,"runtime");if("automatic"!==runtime){const objs=[],props=attribs.reduce(accumulateAttribute,[]);if(useSpread)props.length&&objs.push(_core.types.objectExpression(props));else{let start=0;props.forEach((prop,i)=>{_core.types.isSpreadElement(prop)&&(i>start&&objs.push(_core.types.objectExpression(props.slice(start,i))),objs.push(prop.argument),start=i+1)}),props.length>start&&objs.push(_core.types.objectExpression(props.slice(start)))}if(!objs.length)return _core.types.nullLiteral();if(!(1!==objs.length||_core.types.isSpreadElement(props[0])&&_core.types.isObjectExpression(props[0].argument)))return objs[0];_core.types.isObjectExpression(objs[0])||objs.unshift(_core.types.objectExpression([]));const helper=useBuiltIns?_core.types.memberExpression(_core.types.identifier("Object"),_core.types.identifier("assign")):file.addHelper("extends");return _core.types.callExpression(helper,objs)}const props=[],found=Object.create(null);for(const attr of attribs){const{node}=attr,name=_core.types.isJSXAttribute(node)&&_core.types.isJSXIdentifier(node.name)&&node.name.name;if("automatic"===runtime&&("__source"===name||"__self"===name)){if(found[name])throw sourceSelfError(path,name);found[name]=!0}accumulateAttribute(props,attr)}return 1===props.length&&_core.types.isSpreadElement(props[0])&&!_core.types.isObjectExpression(props[0].argument)?props[0].argument:props.length>0?_core.types.objectExpression(props):_core.types.nullLiteral()}})};var _pluginSyntaxJsx=__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-jsx@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-jsx/lib/index.js"),_helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_helperModuleImports=__webpack_require__("./node_modules/.pnpm/@babel+helper-module-imports@7.27.1/node_modules/@babel/helper-module-imports/lib/index.js"),_helperAnnotateAsPure=__webpack_require__("./node_modules/.pnpm/@babel+helper-annotate-as-pure@7.27.3/node_modules/@babel/helper-annotate-as-pure/lib/index.js");const DEFAULT={importSource:"react",runtime:"automatic",pragma:"React.createElement",pragmaFrag:"React.Fragment"},JSX_SOURCE_ANNOTATION_REGEX=/^\s*(?:\*\s*)?@jsxImportSource\s+(\S+)\s*$/m,JSX_RUNTIME_ANNOTATION_REGEX=/^\s*(?:\*\s*)?@jsxRuntime\s+(\S+)\s*$/m,JSX_ANNOTATION_REGEX=/^\s*(?:\*\s*)?@jsx\s+(\S+)\s*$/m,JSX_FRAG_ANNOTATION_REGEX=/^\s*(?:\*\s*)?@jsxFrag\s+(\S+)\s*$/m,get=(pass,name)=>pass.get(`@babel/plugin-react-jsx/${name}`),set=(pass,name,v)=>pass.set(`@babel/plugin-react-jsx/${name}`,v);function toMemberExpression(id){return id.split(".").map(name=>_core.types.identifier(name)).reduce((object,property)=>_core.types.memberExpression(object,property))}function sourceSelfError(path,name){const pluginName=`transform-react-jsx-${name.slice(2)}`;return path.buildCodeFrameError(`Duplicate ${name} prop found. You are most likely using the deprecated ${pluginName} Babel plugin. Both __source and __self are automatically set when using the automatic runtime. Please remove transform-react-jsx-source and transform-react-jsx-self from your Babel config.`)}},"./node_modules/.pnpm/@babel+plugin-transform-react-jsx@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-react-jsx/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";exports.A=void 0;var _createPlugin=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-react-jsx@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-react-jsx/lib/create-plugin.js");exports.A=(0,_createPlugin.default)({name:"transform-react-jsx",development:!1})},"./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/const-enum.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EXPORTED_CONST_ENUMS_IN_NAMESPACE=void 0,exports.default=function(path,t){const{name}=path.node.id,parentIsExport=path.parentPath.isExportNamedDeclaration();let isExported=parentIsExport;!isExported&&t.isProgram(path.parent)&&(isExported=path.parent.body.some(stmt=>t.isExportNamedDeclaration(stmt)&&"type"!==stmt.exportKind&&!stmt.source&&stmt.specifiers.some(spec=>t.isExportSpecifier(spec)&&"type"!==spec.exportKind&&spec.local.name===name)));const{enumValues:entries}=(0,_enum.translateEnumValues)(path,t);if(isExported||EXPORTED_CONST_ENUMS_IN_NAMESPACE.has(path.node)){const obj=t.objectExpression(entries.map(([name,value])=>t.objectProperty(t.isValidIdentifier(name)?t.identifier(name):t.stringLiteral(name),value)));return void(path.scope.hasOwnBinding(name)?(parentIsExport?path.parentPath:path).replaceWith(t.expressionStatement(t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("assign")),[path.node.id,obj]))):(path.replaceWith(t.variableDeclaration("var",[t.variableDeclarator(path.node.id,obj)])),path.scope.registerDeclaration(path)))}const entriesMap=new Map(entries);path.scope.path.traverse({Scope(path){path.scope.hasOwnBinding(name)&&path.skip()},MemberExpression(path){if(!t.isIdentifier(path.node.object,{name}))return;let key;if(path.node.computed){if(!t.isStringLiteral(path.node.property))return;key=path.node.property.value}else{if(!t.isIdentifier(path.node.property))return;key=path.node.property.name}entriesMap.has(key)&&path.replaceWith(t.cloneNode(entriesMap.get(key)))}}),path.remove()};var _enum=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/enum.js");const EXPORTED_CONST_ENUMS_IN_NAMESPACE=exports.EXPORTED_CONST_ENUMS_IN_NAMESPACE=new WeakSet},"./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/enum.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(path,t){const{node,parentPath}=path;if(node.declare)return void path.remove();const name=node.id.name,{fill,data,isPure}=function(path,t,id){const{enumValues,data,isPure}=translateEnumValues(path,t),enumMembers=path.get("members"),assignments=[];for(let i=0;i(isString?buildStringAssignment:buildNumericAssignment)(options);function isSyntacticallyString(expr){switch((expr=(0,_helperSkipTransparentExpressionWrappers.skipTransparentExprWrapperNodes)(expr)).type){case"BinaryExpression":{const left=expr.left,right=expr.right;return"+"===expr.operator&&(isSyntacticallyString(left)||isSyntacticallyString(right))}case"TemplateLiteral":case"StringLiteral":return!0}return!1}function ReferencedIdentifier(expr,state){const{seen,path,t}=state,name=expr.node.name;if(seen.has(name)){for(let curScope=expr.scope;curScope!==path.scope;curScope=curScope.parent)if(curScope.hasOwnBinding(name))return;expr.replaceWith(t.memberExpression(t.cloneNode(path.node.id),t.cloneNode(expr.node))),expr.skip()}}const enumSelfReferenceVisitor={ReferencedIdentifier};function translateEnumValues(path,t){var _ENUMS$get;const bindingIdentifier=path.scope.getBindingIdentifier(path.node.id.name),seen=null!=(_ENUMS$get=ENUMS.get(bindingIdentifier))?_ENUMS$get:new Map;let lastName,constValue=-1,isPure=!0;const enumValues=path.get("members").map(memberPath=>{const member=memberPath.node,name=t.isIdentifier(member.id)?member.id.name:member.id.value,initializerPath=memberPath.get("initializer");let value;if(member.initializer)constValue=computeConstantValue(initializerPath,seen),void 0!==constValue?(seen.set(name,constValue),_assert("number"==typeof constValue||"string"==typeof constValue),value=constValue===1/0||Number.isNaN(constValue)?t.identifier(String(constValue)):constValue===-1/0?t.unaryExpression("-",t.identifier("Infinity")):t.valueToNode(constValue)):(isPure&&(isPure=initializerPath.isPure()),initializerPath.isReferencedIdentifier()?ReferencedIdentifier(initializerPath,{t,seen,path}):initializerPath.traverse(enumSelfReferenceVisitor,{t,seen,path}),value=initializerPath.node,seen.set(name,void 0));else if("number"==typeof constValue)constValue+=1,value=t.numericLiteral(constValue),seen.set(name,constValue);else{if("string"==typeof constValue)throw path.buildCodeFrameError("Enum member must have initializer.");{const lastRef=t.memberExpression(t.cloneNode(path.node.id),t.stringLiteral(lastName),!0);value=t.binaryExpression("+",t.numericLiteral(1),lastRef),seen.set(name,void 0)}}return lastName=name,[name,value]});return{isPure,data:seen,enumValues}}function computeConstantValue(path,prevMembers,seen=new Set){return evaluate(path);function evaluate(path){const expr=path.node;switch(expr.type){case"MemberExpression":case"Identifier":return evaluateRef(path,prevMembers,seen);case"StringLiteral":case"NumericLiteral":return expr.value;case"UnaryExpression":return function(path){const value=evaluate(path.get("argument"));if(void 0===value)return;switch(path.node.operator){case"+":return value;case"-":return-value;case"~":return~value;default:return}}(path);case"BinaryExpression":return function(path){const left=evaluate(path.get("left"));if(void 0===left)return;const right=evaluate(path.get("right"));if(void 0===right)return;switch(path.node.operator){case"|":return left|right;case"&":return left&right;case">>":return left>>right;case">>>":return left>>>right;case"<<":return left<{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GLOBAL_TYPES=void 0,exports.isGlobalType=function({scope},name){return!scope.hasBinding(name)&&(!!GLOBAL_TYPES.get(scope).has(name)||(console.warn(`The exported identifier "${name}" is not declared in Babel's scope tracker\nas a JavaScript value binding, and "@babel/plugin-transform-typescript"\nnever encountered it as a TypeScript type declaration.\nIt will be treated as a JavaScript value.\n\nThis problem is likely caused by another plugin injecting\n"${name}" without registering it in the scope tracker. If you are the author\n of that plugin, please use "scope.registerDeclaration(declarationPath)".`),!1))},exports.registerGlobalType=function(programScope,name){GLOBAL_TYPES.get(programScope).add(name)};const GLOBAL_TYPES=exports.GLOBAL_TYPES=new WeakMap},"./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),_pluginSyntaxTypescript=__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-typescript@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-typescript/lib/index.js"),_helperCreateClassFeaturesPlugin=__webpack_require__("./node_modules/.pnpm/@babel+helper-create-class-features-plugin@7.27.1_@babel+core@7.28.0/node_modules/@babel/helper-create-class-features-plugin/lib/index.js"),_constEnum=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/const-enum.js"),_enum=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/enum.js"),_globalTypes=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/global-types.js"),_namespace=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/namespace.js");function isInType(path){switch(path.parent.type){case"TSTypeReference":case"TSExpressionWithTypeArguments":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;case"TSQualifiedName":return"TSImportEqualsDeclaration"!==path.parentPath.findParent(path=>"TSQualifiedName"!==path.type).type;case"ExportSpecifier":return"type"===path.parent.exportKind||"type"===path.parentPath.parent.exportKind;default:return!1}}const NEEDS_EXPLICIT_ESM=new WeakMap,PARSED_PARAMS=new WeakSet;function safeRemove(path){const ids=path.getBindingIdentifiers();for(const name of Object.keys(ids)){const binding=path.scope.getBinding(name);binding&&binding.identifier===ids[name]&&binding.scope.removeBinding(name)}path.opts.noScope=!0,path.remove(),path.opts.noScope=!1}function assertCjsTransformEnabled(path,pass,wrong,suggestion,extra=""){if("commonjs"!==pass.file.get("@babel/plugin-transform-modules-*"))throw path.buildCodeFrameError(`\`${wrong}\` is only supported when compiling modules to CommonJS.\nPlease consider using \`${suggestion}\`${extra}, or add @babel/plugin-transform-modules-commonjs to your Babel config.`)}exports.default=(0,_helperPluginUtils.declare)((api,opts)=>{const{types:t,template}=api;api.assertVersion(7);const JSX_PRAGMA_REGEX=/\*?\s*@jsx((?:Frag)?)\s+(\S+)/,{allowNamespaces=!0,jsxPragma="React.createElement",jsxPragmaFrag="React.Fragment",onlyRemoveTypeImports=!1,optimizeConstEnums=!1}=opts;var{allowDeclareFields=!1}=opts;const classMemberVisitors={field(path){const{node}=path;if(!allowDeclareFields&&node.declare)throw path.buildCodeFrameError("The 'declare' modifier is only allowed when the 'allowDeclareFields' option of @babel/plugin-transform-typescript or @babel/preset-typescript is enabled.");if(node.declare){if(node.value)throw path.buildCodeFrameError("Fields with the 'declare' modifier cannot be initialized here, but only in the constructor");node.decorators||path.remove()}else if(node.definite){if(node.value)throw path.buildCodeFrameError("Definitely assigned fields cannot be initialized here, but only in the constructor");allowDeclareFields||node.decorators||t.isClassPrivateProperty(node)||path.remove()}else node.abstract?path.remove():allowDeclareFields||node.value||node.decorators||t.isClassPrivateProperty(node)||path.remove();node.accessibility&&(node.accessibility=null),node.abstract&&(node.abstract=null),node.readonly&&(node.readonly=null),node.optional&&(node.optional=null),node.typeAnnotation&&(node.typeAnnotation=null),node.definite&&(node.definite=null),node.declare&&(node.declare=null),node.override&&(node.override=null)},method({node}){node.accessibility&&(node.accessibility=null),node.abstract&&(node.abstract=null),node.optional&&(node.optional=null),node.override&&(node.override=null)},constructor(path,classPath){path.node.accessibility&&(path.node.accessibility=null);const assigns=[],{scope}=path;for(const paramPath of path.get("params")){const param=paramPath.node;if("TSParameterProperty"===param.type){const parameter=param.parameter;if(PARSED_PARAMS.has(parameter))continue;let id;if(PARSED_PARAMS.add(parameter),t.isIdentifier(parameter))id=parameter;else{if(!t.isAssignmentPattern(parameter)||!t.isIdentifier(parameter.left))throw paramPath.buildCodeFrameError("Parameter properties can not be destructuring patterns.");id=parameter.left}assigns.push(template.statement.ast` + this.${t.cloneNode(id)} = ${t.cloneNode(id)} + `),paramPath.replaceWith(paramPath.get("parameter")),scope.registerBinding("param",paramPath)}}(0,_helperCreateClassFeaturesPlugin.injectInitialization)(classPath,path,assigns)}};return{name:"transform-typescript",inherits:_pluginSyntaxTypescript.default,visitor:{Pattern:visitPattern,Identifier:visitPattern,RestElement:visitPattern,Program:{enter(path,state){const{file}=state;let fileJsxPragma=null,fileJsxPragmaFrag=null;const programScope=path.scope;if(_globalTypes.GLOBAL_TYPES.has(programScope)||_globalTypes.GLOBAL_TYPES.set(programScope,new Set),file.ast.comments)for(const comment of file.ast.comments){const jsxMatches=JSX_PRAGMA_REGEX.exec(comment.value);jsxMatches&&(jsxMatches[1]?fileJsxPragmaFrag=jsxMatches[2]:fileJsxPragma=jsxMatches[2])}let pragmaImportName=fileJsxPragma||jsxPragma;pragmaImportName&&([pragmaImportName]=pragmaImportName.split("."));let pragmaFragImportName=fileJsxPragmaFrag||jsxPragmaFrag;pragmaFragImportName&&([pragmaFragImportName]=pragmaFragImportName.split("."));for(let stmt of path.get("body")){if(stmt.isImportDeclaration()){if(NEEDS_EXPLICIT_ESM.has(state.file.ast.program)||NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!0),"type"===stmt.node.importKind){for(const specifier of stmt.node.specifiers)(0,_globalTypes.registerGlobalType)(programScope,specifier.local.name);stmt.remove();continue}const importsToRemove=new Set,specifiersLength=stmt.node.specifiers.length,isAllSpecifiersElided=()=>specifiersLength>0&&specifiersLength===importsToRemove.size;for(const specifier of stmt.node.specifiers)if("ImportSpecifier"===specifier.type&&"type"===specifier.importKind){(0,_globalTypes.registerGlobalType)(programScope,specifier.local.name);const binding=stmt.scope.getBinding(specifier.local.name);binding&&importsToRemove.add(binding.path)}if(onlyRemoveTypeImports)NEEDS_EXPLICIT_ESM.set(path.node,!1);else{if(0===stmt.node.specifiers.length){NEEDS_EXPLICIT_ESM.set(path.node,!1);continue}for(const specifier of stmt.node.specifiers){const binding=stmt.scope.getBinding(specifier.local.name);binding&&!importsToRemove.has(binding.path)&&(isImportTypeOnly({binding,programPath:path,pragmaImportName,pragmaFragImportName})?importsToRemove.add(binding.path):NEEDS_EXPLICIT_ESM.set(path.node,!1))}}if(isAllSpecifiersElided()&&!onlyRemoveTypeImports)stmt.remove();else for(const importPath of importsToRemove)importPath.remove();continue}if(!onlyRemoveTypeImports&&stmt.isTSImportEqualsDeclaration()){const{id}=stmt.node,binding=stmt.scope.getBinding(id.name);if(binding&&!stmt.node.isExport&&isImportTypeOnly({binding,programPath:path,pragmaImportName,pragmaFragImportName})){stmt.remove();continue}}if(stmt.isExportDeclaration()&&(stmt=stmt.get("declaration")),stmt.isVariableDeclaration({declare:!0}))for(const name of Object.keys(stmt.getBindingIdentifiers()))(0,_globalTypes.registerGlobalType)(programScope,name);else(stmt.isTSTypeAliasDeclaration()||stmt.isTSDeclareFunction()&&stmt.get("id").isIdentifier()||stmt.isTSInterfaceDeclaration()||stmt.isClassDeclaration({declare:!0})||stmt.isTSEnumDeclaration({declare:!0})||stmt.isTSModuleDeclaration({declare:!0})&&stmt.get("id").isIdentifier())&&(0,_globalTypes.registerGlobalType)(programScope,stmt.node.id.name)}},exit(path){"module"===path.node.sourceType&&NEEDS_EXPLICIT_ESM.get(path.node)&&path.pushContainer("body",t.exportNamedDeclaration())}},ExportNamedDeclaration(path,state){if(NEEDS_EXPLICIT_ESM.has(state.file.ast.program)||NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!0),"type"!==path.node.exportKind)if(path.node.source&&path.node.specifiers.length>0&&path.node.specifiers.every(specifier=>"ExportSpecifier"===specifier.type&&"type"===specifier.exportKind))path.remove();else if(!path.node.source&&path.node.specifiers.length>0&&path.node.specifiers.every(specifier=>t.isExportSpecifier(specifier)&&(0,_globalTypes.isGlobalType)(path,specifier.local.name)))path.remove();else{if(t.isTSModuleDeclaration(path.node.declaration)){const namespace=path.node.declaration;if(!t.isStringLiteral(namespace.id)){const id=(0,_namespace.getFirstIdentifier)(namespace.id);if(path.scope.hasOwnBinding(id.name))path.replaceWith(namespace);else{const[newExport]=path.replaceWithMultiple([t.exportNamedDeclaration(t.variableDeclaration("let",[t.variableDeclarator(t.cloneNode(id))])),namespace]);path.scope.registerDeclaration(newExport)}}}NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!1)}else path.remove()},ExportAllDeclaration(path){"type"===path.node.exportKind&&path.remove()},ExportSpecifier(path){(!path.parent.source&&(0,_globalTypes.isGlobalType)(path,path.node.local.name)||"type"===path.node.exportKind)&&path.remove()},ExportDefaultDeclaration(path,state){NEEDS_EXPLICIT_ESM.has(state.file.ast.program)||NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!0),t.isIdentifier(path.node.declaration)&&(0,_globalTypes.isGlobalType)(path,path.node.declaration.name)?path.remove():NEEDS_EXPLICIT_ESM.set(state.file.ast.program,!1)},TSDeclareFunction(path){safeRemove(path)},TSDeclareMethod(path){safeRemove(path)},VariableDeclaration(path){path.node.declare&&safeRemove(path)},VariableDeclarator({node}){node.definite&&(node.definite=null)},TSIndexSignature(path){path.remove()},ClassDeclaration(path){const{node}=path;node.declare&&safeRemove(path)},Class(path){const{node}=path;node.typeParameters&&(node.typeParameters=null),node.superTypeParameters&&(node.superTypeParameters=null),node.implements&&(node.implements=null),node.abstract&&(node.abstract=null),path.get("body.body").forEach(child=>{child.isClassMethod()||child.isClassPrivateMethod()?"constructor"===child.node.kind?classMemberVisitors.constructor(child,path):classMemberVisitors.method(child):(child.isClassProperty()||child.isClassPrivateProperty()||child.isClassAccessorProperty())&&classMemberVisitors.field(child)})},Function(path){const{node}=path;node.typeParameters&&(node.typeParameters=null),node.returnType&&(node.returnType=null);const params=node.params;params.length>0&&t.isIdentifier(params[0],{name:"this"})&¶ms.shift()},TSModuleDeclaration(path){(0,_namespace.default)(path,allowNamespaces)},TSInterfaceDeclaration(path){path.remove()},TSTypeAliasDeclaration(path){path.remove()},TSEnumDeclaration(path){optimizeConstEnums&&path.node.const?(0,_constEnum.default)(path,t):(0,_enum.default)(path,t)},TSImportEqualsDeclaration(path,pass){const{id,moduleReference}=path.node;let init,varKind;t.isTSExternalModuleReference(moduleReference)?(assertCjsTransformEnabled(path,pass,`import ${id.name} = require(...);`,`import ${id.name} from '...';`," alongside Typescript's --allowSyntheticDefaultImports option"),init=t.callExpression(t.identifier("require"),[moduleReference.expression]),varKind="const"):(init=entityNameToExpr(moduleReference),varKind="var");const newNode=t.variableDeclaration(varKind,[t.variableDeclarator(id,init)]);path.replaceWith(path.node.isExport?t.exportNamedDeclaration(newNode):newNode),path.scope.registerDeclaration(path)},TSExportAssignment(path,pass){assertCjsTransformEnabled(path,pass,"export = ;","export default ;"),path.replaceWith(template.statement.ast`module.exports = ${path.node.expression}`)},TSTypeAssertion(path){path.replaceWith(path.node.expression)},["TSAsExpression"+(t.tsSatisfiesExpression?"|TSSatisfiesExpression":"")](path){let{node}=path;do{node=node.expression}while(t.isTSAsExpression(node)||null!=t.isTSSatisfiesExpression&&t.isTSSatisfiesExpression(node));path.replaceWith(node)},[api.types.tsInstantiationExpression?"TSNonNullExpression|TSInstantiationExpression":"TSNonNullExpression"](path){path.replaceWith(path.node.expression)},CallExpression(path){path.node.typeParameters=null},OptionalCallExpression(path){path.node.typeParameters=null},NewExpression(path){path.node.typeParameters=null},JSXOpeningElement(path){path.node.typeParameters=null},TaggedTemplateExpression(path){path.node.typeParameters=null}}};function entityNameToExpr(node){return t.isTSQualifiedName(node)?t.memberExpression(entityNameToExpr(node.left),node.right):node}function visitPattern({node}){node.typeAnnotation&&(node.typeAnnotation=null),t.isIdentifier(node)&&node.optional&&(node.optional=null)}function isImportTypeOnly({binding,programPath,pragmaImportName,pragmaFragImportName}){for(const path of binding.referencePaths)if(!isInType(path))return!1;if(binding.identifier.name!==pragmaImportName&&binding.identifier.name!==pragmaFragImportName)return!0;let sourceFileHasJsx=!1;return programPath.traverse({"JSXElement|JSXFragment"(path){sourceFileHasJsx=!0,path.stop()}}),!sourceFileHasJsx}})},"./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/namespace.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(path,allowNamespaces){if(path.node.declare||"StringLiteral"===path.node.id.type)return void path.remove();if(!allowNamespaces)throw path.get("id").buildCodeFrameError("Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");const name=getFirstIdentifier(path.node.id).name,value=handleNested(path,path.node);if(null===value){const program=path.findParent(p=>p.isProgram());(0,_globalTypes.registerGlobalType)(program.scope,name),path.remove()}else path.scope.hasOwnBinding(name)?path.replaceWith(value):path.scope.registerDeclaration(path.replaceWithMultiple([getDeclaration(name),value])[0])},exports.getFirstIdentifier=getFirstIdentifier;var _core=__webpack_require__("./node_modules/.pnpm/@babel+core@7.28.0/node_modules/@babel/core/lib/index.js"),_globalTypes=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/global-types.js"),_constEnum=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/const-enum.js");function getFirstIdentifier(node){return _core.types.isIdentifier(node)?node:getFirstIdentifier(node.left)}function getDeclaration(name){return _core.types.variableDeclaration("let",[_core.types.variableDeclarator(_core.types.identifier(name))])}function getMemberExpression(name,itemName){return _core.types.memberExpression(_core.types.identifier(name),_core.types.identifier(itemName))}function handleVariableDeclaration(node,name,hub){if("const"!==node.kind)throw hub.file.buildCodeFrameError(node,"Namespaces exporting non-const are not supported by Babel. Change to const or see: https://babeljs.io/docs/en/babel-plugin-transform-typescript");const{declarations}=node;if(declarations.every(declarator=>_core.types.isIdentifier(declarator.id))){for(const declarator of declarations)declarator.init=_core.types.assignmentExpression("=",getMemberExpression(name,declarator.id.name),declarator.init);return[node]}const bindingIdentifiers=_core.types.getBindingIdentifiers(node),assignments=[];for(const idName in bindingIdentifiers)assignments.push(_core.types.assignmentExpression("=",getMemberExpression(name,idName),_core.types.cloneNode(bindingIdentifiers[idName])));return[node,_core.types.expressionStatement(_core.types.sequenceExpression(assignments))]}function buildNestedAmbientModuleError(path,node){return path.hub.buildError(node,"Ambient modules cannot be nested in other modules or namespaces.",Error)}function handleNested(path,node,parentExport){const names=new Set,realName=node.id,name=path.scope.generateUid(realName.name),body=node.body;let namespaceTopLevel;node.id;namespaceTopLevel=_core.types.isTSModuleBlock(body)?body.body:[_core.types.exportNamedDeclaration(body)];let isEmpty=!0;for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var helperPluginUtils=__webpack_require__("./node_modules/.pnpm/@babel+helper-plugin-utils@7.27.1/node_modules/@babel/helper-plugin-utils/lib/index.js"),transformTypeScript=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-typescript@7.28.0_@babel+core@7.28.0/node_modules/@babel/plugin-transform-typescript/lib/index.js");__webpack_require__("./node_modules/.pnpm/@babel+plugin-syntax-jsx@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-syntax-jsx/lib/index.js");var transformModulesCommonJS=__webpack_require__("./node_modules/.pnpm/@babel+plugin-transform-modules-commonjs@7.27.1_@babel+core@7.28.0/node_modules/@babel/plugin-transform-modules-commonjs/lib/index.js"),helperValidatorOption=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-option@7.27.1/node_modules/@babel/helper-validator-option/lib/index.js");function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var transformTypeScript__default=_interopDefault(transformTypeScript),transformModulesCommonJS__default=_interopDefault(transformModulesCommonJS);const v=new helperValidatorOption.OptionValidator("@babel/preset-typescript");var pluginRewriteTSImports=helperPluginUtils.declare(function({types:t,template}){function maybeReplace(source,path,state){source&&(t.isStringLiteral(source)?/^\.\.?\//.test(source.value)&&(source.value=source.value.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i,function(m,tsx,d,ext,cm){return tsx?".js":!d||ext&&cm?d+ext+"."+cm.toLowerCase()+"js":m})):state.availableHelper("tsRewriteRelativeImportExtensions")?path.replaceWith(t.callExpression(state.addHelper("tsRewriteRelativeImportExtensions"),[source])):path.replaceWith(template.expression.ast`(${source} + "").replace(/([\\/].*\.[mc]?)tsx?$/, "$1js")`))}return{name:"preset-typescript/plugin-rewrite-ts-imports",visitor:{"ImportDeclaration|ExportAllDeclaration|ExportNamedDeclaration"(path,state){const node=path.node;"value"===(t.isImportDeclaration(node)?node.importKind:node.exportKind)&&maybeReplace(node.source,path.get("source"),state)},CallExpression(path,state){t.isImport(path.node.callee)&&maybeReplace(path.node.arguments[0],path.get("arguments.0"),state)},ImportExpression(path,state){maybeReplace(path.node.source,path.get("source"),state)}}}}),index=helperPluginUtils.declarePreset((api,opts)=>{api.assertVersion(7);const{allExtensions,ignoreExtensions,allowNamespaces,disallowAmbiguousJSXLike,isTSX,jsxPragma,jsxPragmaFrag,onlyRemoveTypeImports,optimizeConstEnums,rewriteImportExtensions}=function(options={}){let{allowNamespaces=!0,jsxPragma,onlyRemoveTypeImports}=options;const TopLevelOptions_ignoreExtensions="ignoreExtensions",TopLevelOptions_disallowAmbiguousJSXLike="disallowAmbiguousJSXLike",TopLevelOptions_jsxPragmaFrag="jsxPragmaFrag",TopLevelOptions_optimizeConstEnums="optimizeConstEnums",TopLevelOptions_rewriteImportExtensions="rewriteImportExtensions",TopLevelOptions_allExtensions="allExtensions",TopLevelOptions_isTSX="isTSX",jsxPragmaFrag=v.validateStringOption(TopLevelOptions_jsxPragmaFrag,options.jsxPragmaFrag,"React.Fragment");var allExtensions=v.validateBooleanOption(TopLevelOptions_allExtensions,options.allExtensions,!1),isTSX=v.validateBooleanOption(TopLevelOptions_isTSX,options.isTSX,!1);isTSX&&v.invariant(allExtensions,"isTSX:true requires allExtensions:true");const ignoreExtensions=v.validateBooleanOption(TopLevelOptions_ignoreExtensions,options.ignoreExtensions,!1),disallowAmbiguousJSXLike=v.validateBooleanOption(TopLevelOptions_disallowAmbiguousJSXLike,options.disallowAmbiguousJSXLike,!1);disallowAmbiguousJSXLike&&v.invariant(allExtensions,"disallowAmbiguousJSXLike:true requires allExtensions:true");const normalized={ignoreExtensions,allowNamespaces,disallowAmbiguousJSXLike,jsxPragma,jsxPragmaFrag,onlyRemoveTypeImports,optimizeConstEnums:v.validateBooleanOption(TopLevelOptions_optimizeConstEnums,options.optimizeConstEnums,!1),rewriteImportExtensions:v.validateBooleanOption(TopLevelOptions_rewriteImportExtensions,options.rewriteImportExtensions,!1)};return normalized.allExtensions=allExtensions,normalized.isTSX=isTSX,normalized}(opts),pluginOptions=disallowAmbiguousJSXLike=>({allowDeclareFields:opts.allowDeclareFields,allowNamespaces,disallowAmbiguousJSXLike,jsxPragma,jsxPragmaFrag,onlyRemoveTypeImports,optimizeConstEnums}),getPlugins=(isTSX,disallowAmbiguousJSXLike)=>[[transformTypeScript__default.default,Object.assign({isTSX},pluginOptions(disallowAmbiguousJSXLike))]];return{plugins:rewriteImportExtensions?[pluginRewriteTSImports]:[],overrides:allExtensions||ignoreExtensions?[{plugins:getPlugins(isTSX,disallowAmbiguousJSXLike)}]:[{test:/\.ts$/,plugins:getPlugins(!1,!1)},{test:/\.mts$/,sourceType:"module",plugins:getPlugins(!1,!0)},{test:/\.cts$/,sourceType:"unambiguous",plugins:[[transformModulesCommonJS__default.default,{allowTopLevelThis:!0}],[transformTypeScript__default.default,pluginOptions(!0)]]},{test:/\.tsx$/,plugins:getPlugins(!0,!1)}]}});exports.default=index},"./node_modules/.pnpm/@babel+preset-typescript@7.27.1_@babel+core@7.28.0/node_modules/@babel/preset-typescript/package.json":module=>{"use strict";module.exports=JSON.parse('{"name":"@babel/preset-typescript","version":"7.27.1","description":"Babel preset for TypeScript.","repository":{"type":"git","url":"https://github.com/babel/babel.git","directory":"packages/babel-preset-typescript"},"license":"MIT","publishConfig":{"access":"public"},"main":"./lib/index.js","keywords":["babel-preset","typescript"],"dependencies":{"@babel/helper-plugin-utils":"^7.27.1","@babel/helper-validator-option":"^7.27.1","@babel/plugin-syntax-jsx":"^7.27.1","@babel/plugin-transform-modules-commonjs":"^7.27.1","@babel/plugin-transform-typescript":"^7.27.1"},"peerDependencies":{"@babel/core":"^7.0.0-0"},"devDependencies":{"@babel/core":"^7.27.1","@babel/helper-plugin-test-runner":"^7.27.1"},"homepage":"https://babel.dev/docs/en/next/babel-preset-typescript","bugs":"https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22area%3A%20typescript%22+is%3Aopen","engines":{"node":">=6.9.0"},"author":"The Babel Team (https://babel.dev/team)","type":"commonjs"}')},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/builder.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function createTemplateBuilder(formatter,defaultOpts){const templateFnCache=new WeakMap,templateAstCache=new WeakMap,cachedOpts=defaultOpts||(0,_options.validate)(null);return Object.assign((tpl,...args)=>{if("string"==typeof tpl){if(args.length>1)throw new Error("Unexpected extra params.");return extendedTrace((0,_string.default)(formatter,tpl,(0,_options.merge)(cachedOpts,(0,_options.validate)(args[0]))))}if(Array.isArray(tpl)){let builder=templateFnCache.get(tpl);return builder||(builder=(0,_literal.default)(formatter,tpl,cachedOpts),templateFnCache.set(tpl,builder)),extendedTrace(builder(args))}if("object"==typeof tpl&&tpl){if(args.length>0)throw new Error("Unexpected extra params.");return createTemplateBuilder(formatter,(0,_options.merge)(cachedOpts,(0,_options.validate)(tpl)))}throw new Error("Unexpected template param "+typeof tpl)},{ast:(tpl,...args)=>{if("string"==typeof tpl){if(args.length>1)throw new Error("Unexpected extra params.");return(0,_string.default)(formatter,tpl,(0,_options.merge)((0,_options.merge)(cachedOpts,(0,_options.validate)(args[0])),NO_PLACEHOLDER))()}if(Array.isArray(tpl)){let builder=templateAstCache.get(tpl);return builder||(builder=(0,_literal.default)(formatter,tpl,(0,_options.merge)(cachedOpts,NO_PLACEHOLDER)),templateAstCache.set(tpl,builder)),builder(args)()}throw new Error("Unexpected template param "+typeof tpl)}})};var _options=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/options.js"),_string=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/string.js"),_literal=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/literal.js");const NO_PLACEHOLDER=(0,_options.validate)({placeholderPattern:!1});function extendedTrace(fn){let rootStack="";try{throw new Error}catch(error){error.stack&&(rootStack=error.stack.split("\n").slice(3).join("\n"))}return arg=>{try{return fn(arg)}catch(err){throw err.stack+=`\n =============\n${rootStack}`,err}}}},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/formatters.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.statements=exports.statement=exports.smart=exports.program=exports.expression=void 0;var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{assertExpressionStatement}=_t;function makeStatementFormatter(fn){return{code:str=>`/* @babel/template */;\n${str}`,validate:()=>{},unwrap:ast=>fn(ast.program.body.slice(1))}}exports.smart=makeStatementFormatter(body=>body.length>1?body:body[0]),exports.statements=makeStatementFormatter(body=>body),exports.statement=makeStatementFormatter(body=>{if(0===body.length)throw new Error("Found nothing to return.");if(body.length>1)throw new Error("Found multiple statements but wanted one");return body[0]});const expression=exports.expression={code:str=>`(\n${str}\n)`,validate:ast=>{if(ast.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(0===expression.unwrap(ast).start)throw new Error("Parse result included parens.")},unwrap:({program})=>{const[stmt]=program.body;return assertExpressionStatement(stmt),stmt.expression}};exports.program={code:str=>str,validate:()=>{},unwrap:ast=>ast.program}},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.statements=exports.statement=exports.smart=exports.program=exports.expression=exports.default=void 0;var formatters=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/formatters.js"),_builder=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/builder.js");const smart=exports.smart=(0,_builder.default)(formatters.smart),statement=exports.statement=(0,_builder.default)(formatters.statement),statements=exports.statements=(0,_builder.default)(formatters.statements),expression=exports.expression=(0,_builder.default)(formatters.expression),program=exports.program=(0,_builder.default)(formatters.program);exports.default=Object.assign(smart.bind(void 0),{smart,statement,statements,expression,program,ast:smart.ast})},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/literal.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(formatter,tpl,opts){const{metadata,names}=function(formatter,tpl,opts){let prefix="BABEL_TPL$";const raw=tpl.join("");do{prefix="$$"+prefix}while(raw.includes(prefix));const{names,code}=function(tpl,prefix){const names=[];let code=tpl[0];for(let i=1;i{const defaultReplacements={};return arg.forEach((replacement,i)=>{defaultReplacements[names[i]]=replacement}),arg=>{const replacements=(0,_options.normalizeReplacements)(arg);return replacements&&Object.keys(replacements).forEach(key=>{if(hasOwnProperty.call(defaultReplacements,key))throw new Error("Unexpected replacement overlap.")}),formatter.unwrap((0,_populate.default)(metadata,replacements?Object.assign(replacements,defaultReplacements):defaultReplacements))}}};var _options=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/options.js"),_parse=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/parse.js"),_populate=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/populate.js")},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/options.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.merge=function(a,b){const{placeholderWhitelist=a.placeholderWhitelist,placeholderPattern=a.placeholderPattern,preserveComments=a.preserveComments,syntacticPlaceholders=a.syntacticPlaceholders}=b;return{parser:Object.assign({},a.parser,b.parser),placeholderWhitelist,placeholderPattern,preserveComments,syntacticPlaceholders}},exports.normalizeReplacements=function(replacements){if(Array.isArray(replacements))return replacements.reduce((acc,replacement,i)=>(acc["$"+i]=replacement,acc),{});if("object"==typeof replacements||null==replacements)return replacements||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")},exports.validate=function(opts){if(null!=opts&&"object"!=typeof opts)throw new Error("Unknown template options.");const _ref=opts||{},{placeholderWhitelist,placeholderPattern,preserveComments,syntacticPlaceholders}=_ref,parser=function(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(-1!==e.indexOf(n))continue;t[n]=r[n]}return t}(_ref,_excluded);if(null!=placeholderWhitelist&&!(placeholderWhitelist instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(null!=placeholderPattern&&!(placeholderPattern instanceof RegExp)&&!1!==placeholderPattern)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(null!=preserveComments&&"boolean"!=typeof preserveComments)throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(null!=syntacticPlaceholders&&"boolean"!=typeof syntacticPlaceholders)throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(!0===syntacticPlaceholders&&(null!=placeholderWhitelist||null!=placeholderPattern))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser,placeholderWhitelist:placeholderWhitelist||void 0,placeholderPattern:null==placeholderPattern?void 0:placeholderPattern,preserveComments:null==preserveComments?void 0:preserveComments,syntacticPlaceholders:null==syntacticPlaceholders?void 0:syntacticPlaceholders}};const _excluded=["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"]},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/parse.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(formatter,code,opts){const{placeholderWhitelist,placeholderPattern,preserveComments,syntacticPlaceholders}=opts,ast=function(code,parserOpts,syntacticPlaceholders){const plugins=(parserOpts.plugins||[]).slice();!1!==syntacticPlaceholders&&plugins.push("placeholders");parserOpts=Object.assign({allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowYieldOutsideFunction:!0,sourceType:"module"},parserOpts,{plugins});try{return(0,_parser.parse)(code,parserOpts)}catch(err){const loc=err.loc;throw loc&&(err.message+="\n"+(0,_codeFrame.codeFrameColumns)(code,{start:loc}),err.code="BABEL_TEMPLATE_PARSE_ERROR"),err}}(code,opts.parser,syntacticPlaceholders);removePropertiesDeep(ast,{preserveComments}),formatter.validate(ast);const state={syntactic:{placeholders:[],placeholderNames:new Set},legacy:{placeholders:[],placeholderNames:new Set},placeholderWhitelist,placeholderPattern,syntacticPlaceholders};return traverse(ast,placeholderVisitorHandler,state),Object.assign({ast},state.syntactic.placeholders.length?state.syntactic:state.legacy)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_parser=__webpack_require__("./node_modules/.pnpm/@babel+parser@7.28.0/node_modules/@babel/parser/lib/index.js"),_codeFrame=__webpack_require__("./stubs/babel-codeframe.mjs");const{isCallExpression,isExpressionStatement,isFunction,isIdentifier,isJSXIdentifier,isNewExpression,isPlaceholder,isStatement,isStringLiteral,removePropertiesDeep,traverse}=_t,PATTERN=/^[_$A-Z0-9]+$/;function placeholderVisitorHandler(node,ancestors,state){var _state$placeholderWhi;let name,hasSyntacticPlaceholders=state.syntactic.placeholders.length>0;if(isPlaceholder(node)){if(!1===state.syntacticPlaceholders)throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");name=node.name.name,hasSyntacticPlaceholders=!0}else{if(hasSyntacticPlaceholders||state.syntacticPlaceholders)return;if(isIdentifier(node)||isJSXIdentifier(node))name=node.name;else{if(!isStringLiteral(node))return;name=node.value}}if(hasSyntacticPlaceholders&&(null!=state.placeholderPattern||null!=state.placeholderWhitelist))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");if(!(hasSyntacticPlaceholders||!1!==state.placeholderPattern&&(state.placeholderPattern||PATTERN).test(name)||null!=(_state$placeholderWhi=state.placeholderWhitelist)&&_state$placeholderWhi.has(name)))return;ancestors=ancestors.slice();const{node:parent,key}=ancestors[ancestors.length-1];let type;isStringLiteral(node)||isPlaceholder(node,{expectedNode:"StringLiteral"})?type="string":isNewExpression(parent)&&"arguments"===key||isCallExpression(parent)&&"arguments"===key||isFunction(parent)&&"params"===key?type="param":isExpressionStatement(parent)&&!isPlaceholder(node)?(type="statement",ancestors=ancestors.slice(0,-1)):type=isStatement(node)&&isPlaceholder(node)?"statement":"other";const{placeholders,placeholderNames}=hasSyntacticPlaceholders?state.syntactic:state.legacy;placeholders.push({name,type,resolve:ast=>function(ast,ancestors){let parent=ast;for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(metadata,replacements){const ast=cloneNode(metadata.ast);replacements&&(metadata.placeholders.forEach(placeholder=>{if(!hasOwnProperty.call(replacements,placeholder.name)){const placeholderName=placeholder.name;throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a\n placeholder you may want to consider passing one of the following options to @babel/template:\n - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}\n - { placeholderPattern: /^${placeholderName}$/ }`)}}),Object.keys(replacements).forEach(key=>{if(!metadata.placeholderNames.has(key))throw new Error(`Unknown substitution "${key}" given`)}));return metadata.placeholders.slice().reverse().forEach(placeholder=>{try{var _ref;!function(placeholder,ast,replacement){placeholder.isDuplicate&&(Array.isArray(replacement)?replacement=replacement.map(node=>cloneNode(node)):"object"==typeof replacement&&(replacement=cloneNode(replacement)));const{parent,key,index}=placeholder.resolve(ast);if("string"===placeholder.type){if("string"==typeof replacement&&(replacement=stringLiteral(replacement)),!replacement||!isStringLiteral(replacement))throw new Error("Expected string substitution")}else if("statement"===placeholder.type)void 0===index?replacement?Array.isArray(replacement)?replacement=blockStatement(replacement):"string"==typeof replacement?replacement=expressionStatement(identifier(replacement)):isStatement(replacement)||(replacement=expressionStatement(replacement)):replacement=emptyStatement():replacement&&!Array.isArray(replacement)&&("string"==typeof replacement&&(replacement=identifier(replacement)),isStatement(replacement)||(replacement=expressionStatement(replacement)));else if("param"===placeholder.type){if("string"==typeof replacement&&(replacement=identifier(replacement)),void 0===index)throw new Error("Assertion failure.")}else if("string"==typeof replacement&&(replacement=identifier(replacement)),Array.isArray(replacement))throw new Error("Cannot replace single expression with an array.");function set(parent,key,value){const node=parent[key];parent[key]=value,"Identifier"!==node.type&&"Placeholder"!==node.type||(node.typeAnnotation&&(value.typeAnnotation=node.typeAnnotation),node.optional&&(value.optional=node.optional),node.decorators&&(value.decorators=node.decorators))}if(void 0===index)validate(parent,key,replacement),set(parent,key,replacement);else{const items=parent[key].slice();"statement"===placeholder.type||"param"===placeholder.type?null==replacement?items.splice(index,1):Array.isArray(replacement)?items.splice(index,1,...replacement):set(items,index,replacement):set(items,index,replacement),validate(parent,key,items),parent[key]=items}}(placeholder,ast,null!=(_ref=replacements&&replacements[placeholder.name])?_ref:null)}catch(e){throw e.message=`@babel/template placeholder "${placeholder.name}": ${e.message}`,e}}),ast};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{blockStatement,cloneNode,emptyStatement,expressionStatement,identifier,isStatement,isStringLiteral,stringLiteral,validate}=_t},"./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/string.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(formatter,code,opts){let metadata;return code=formatter.code(code),arg=>{const replacements=(0,_options.normalizeReplacements)(arg);return metadata||(metadata=(0,_parse.default)(formatter,code,opts)),formatter.unwrap((0,_populate.default)(metadata,replacements))}};var _options=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/options.js"),_parse=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/parse.js"),_populate=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/populate.js")},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clear=function(){clearPath(),clearScope()},exports.clearPath=clearPath,exports.clearScope=clearScope,exports.getCachedPaths=function(path){const{parent,parentPath}=path;return pathsCache.get(parent)},exports.getOrCreateCachedPaths=function(node,parentPath){let paths=pathsCache.get(node);paths||pathsCache.set(node,paths=new Map);return paths},exports.scope=exports.path=void 0;let pathsCache=exports.path=new WeakMap,scope=exports.scope=new WeakMap;function clearPath(){exports.path=pathsCache=new WeakMap}function clearScope(){exports.scope=scope=new WeakMap}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/context.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{VISITOR_KEYS}=_t;exports.default=class{constructor(scope,opts,state,parentPath){this.queue=null,this.priorityQueue=null,this.parentPath=parentPath,this.scope=scope,this.state=state,this.opts=opts}shouldVisit(node){const opts=this.opts;if(opts.enter||opts.exit)return!0;if(opts[node.type])return!0;const keys=VISITOR_KEYS[node.type];if(null==keys||!keys.length)return!1;for(const key of keys)if(node[key])return!0;return!1}create(node,container,key,listKey){return _index.default.get({parentPath:this.parentPath,parent:node,container,key,listKey})}maybeQueue(path,notPriority){this.queue&&(notPriority?this.queue.push(path):this.priorityQueue.push(path))}visitMultiple(container,parent,listKey){if(0===container.length)return!1;const queue=[];for(let key=0;key{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(node,msg,Error=TypeError){return new Error(msg)}}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Hub",{enumerable:!0,get:function(){return _hub.default}}),Object.defineProperty(exports,"NodePath",{enumerable:!0,get:function(){return _index.default}}),Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return _index2.default}}),exports.visitors=exports.default=void 0,__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");var visitors=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/visitors.js");exports.visitors=visitors;var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),cache=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js"),_traverseNode=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/traverse-node.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/index.js"),_hub=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/hub.js");const{VISITOR_KEYS,removeProperties,traverseFast}=_t;function traverse(parent,opts={},scope,state,parentPath,visitSelf){if(parent){if(!opts.noScope&&!scope&&"Program"!==parent.type&&"File"!==parent.type)throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);if(!parentPath&&visitSelf)throw new Error("visitSelf can only be used when providing a NodePath.");VISITOR_KEYS[parent.type]&&(visitors.explode(opts),(0,_traverseNode.traverseNode)(parent,opts,scope,state,parentPath,null,visitSelf))}}exports.default=traverse;traverse.visitors=visitors,traverse.verify=visitors.verify,traverse.explode=visitors.explode,traverse.cheap=function(node,enter){traverseFast(node,enter)},traverse.node=function(node,opts,scope,state,path,skipKeys){(0,_traverseNode.traverseNode)(node,opts,scope,state,path,skipKeys)},traverse.clearNode=function(node,opts){removeProperties(node,opts)},traverse.removeProperties=function(tree,opts){return traverseFast(tree,traverse.clearNode,opts),tree},traverse.hasType=function(tree,type,denylistTypes){return(null==denylistTypes||!denylistTypes.includes(tree.type))&&(tree.type===type||traverseFast(tree,function(node){return null!=denylistTypes&&denylistTypes.includes(node.type)?traverseFast.skip:node.type===type?traverseFast.stop:void 0}))},traverse.cache=cache},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/ancestry.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.find=function(callback){let path=this;do{if(callback(path))return path}while(path=path.parentPath);return null},exports.findParent=function(callback){let path=this;for(;path=path.parentPath;)if(callback(path))return path;return null},exports.getAncestry=function(){let path=this;const paths=[];do{paths.push(path)}while(path=path.parentPath);return paths},exports.getDeepestCommonAncestorFrom=function(paths,filter){if(!paths.length)return this;if(1===paths.length)return paths[0];let lastCommonIndex,lastCommon,minDepth=1/0;const ancestries=paths.map(path=>{const ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==this);return ancestry.lengthkeys.indexOf(path.parentKey)&&(earliest=path)}return earliest})},exports.getFunctionParent=function(){return this.findParent(p=>p.isFunction())},exports.getStatementParent=function(){let path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement())break;path=path.parentPath}while(path);if(path&&(path.isProgram()||path.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return path},exports.inType=function(...candidateTypes){let path=this;for(;path;){if(candidateTypes.includes(path.node.type))return!0;path=path.parentPath}return!1},exports.isAncestor=function(maybeDescendant){return maybeDescendant.isDescendant(this)},exports.isDescendant=function(maybeAncestor){return!!this.findParent(parent=>parent===maybeAncestor)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{VISITOR_KEYS}=_t},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/comments.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addComment=function(type,content,line){_addComment(this.node,type,content,line)},exports.addComments=function(type,comments){_addComments(this.node,type,comments)},exports.shareCommentsWithSiblings=function(){if("string"==typeof this.key)return;const node=this.node;if(!node)return;const trailing=node.trailingComments,leading=node.leadingComments;if(!trailing&&!leading)return;const prev=this.getSibling(this.key-1),next=this.getSibling(this.key+1),hasPrev=Boolean(prev.node),hasNext=Boolean(next.node);hasPrev&&(leading&&prev.addComments("trailing",removeIfExisting(leading,prev.node.trailingComments)),trailing&&!hasNext&&prev.addComments("trailing",trailing));hasNext&&(trailing&&next.addComments("leading",removeIfExisting(trailing,next.node.leadingComments)),leading&&!hasPrev&&next.addComments("leading",leading))};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{addComment:_addComment,addComments:_addComments}=_t;function removeIfExisting(list,toRemove){if(null==toRemove||!toRemove.length)return list;const set=new Set(toRemove);return list.filter(el=>!set.has(el))}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._call=_call,exports._getQueueContexts=function(){let path=this,contexts=this.contexts;for(;!contexts.length&&(path=path.parentPath,path);)contexts=path.contexts;return contexts},exports._resyncKey=_resyncKey,exports._resyncList=_resyncList,exports._resyncParent=_resyncParent,exports._resyncRemoved=function(){null!=this.key&&this.container&&this.container[this.key]===this.node||_removal._markRemoved.call(this)},exports.call=call,exports.isDenylisted=isDenylisted,exports.popContext=function(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)},exports.pushContext=function(context){this.contexts.push(context),this.setContext(context)},exports.requeue=function(pathToQueue=this){if(pathToQueue.removed)return;const contexts=this.contexts;for(const context of contexts)context.maybeQueue(pathToQueue)},exports.requeueComputedKeyAndDecorators=function(){const{context,node}=this;!t.isPrivate(node)&&node.computed&&context.maybeQueue(this.get("key"));if(node.decorators)for(const decorator of this.get("decorators"))context.maybeQueue(decorator)},exports.resync=function(){if(this.removed)return;_resyncParent.call(this),_resyncList.call(this),_resyncKey.call(this)},exports.setContext=function(context){null!=this.skipKeys&&(this.skipKeys={});this._traverseFlags=0,context&&(this.context=context,this.state=context.state,this.opts=context.opts);return setScope.call(this),this},exports.setKey=setKey,exports.setScope=setScope,exports.setup=function(parentPath,container,listKey,key){this.listKey=listKey,this.container=container,this.parentPath=parentPath||this.parentPath,setKey.call(this,key)},exports.skip=function(){this.shouldSkip=!0},exports.skipKey=function(key){null==this.skipKeys&&(this.skipKeys={});this.skipKeys[key]=!0},exports.stop=function(){this._traverseFlags|=_index.SHOULD_SKIP|_index.SHOULD_STOP},exports.visit=function(){var _this$opts$shouldSkip,_this$opts;if(!this.node)return!1;if(this.isDenylisted())return!1;if(null!=(_this$opts$shouldSkip=(_this$opts=this.opts).shouldSkip)&&_this$opts$shouldSkip.call(_this$opts,this))return!1;const currentContext=this.context;if(this.shouldSkip||call.call(this,"enter"))return this.debug("Skip..."),this.shouldStop;return restoreContext(this,currentContext),this.debug("Recursing into..."),this.shouldStop=(0,_traverseNode.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),restoreContext(this,currentContext),call.call(this,"exit"),this.shouldStop};var _traverseNode=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/traverse-node.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_removal=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/removal.js"),t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");function call(key){const opts=this.opts;return this.debug(key),!(!this.node||!_call.call(this,opts[key]))||!!this.node&&_call.call(this,null==(_opts$this$node$type=opts[this.node.type])?void 0:_opts$this$node$type[key]);var _opts$this$node$type}function _call(fns){if(!fns)return!1;for(const fn of fns){if(!fn)continue;const node=this.node;if(!node)return!0;const ret=fn.call(this.state,this,this.state);if(ret&&"object"==typeof ret&&"function"==typeof ret.then)throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(ret)throw new Error(`Unexpected return value from visitor method ${fn}`);if(this.node!==node)return!0;if(this._traverseFlags>0)return!0}return!1}function isDenylisted(){var _this$opts$denylist;const denylist=null!=(_this$opts$denylist=this.opts.denylist)?_this$opts$denylist:this.opts.blacklist;return null==denylist?void 0:denylist.includes(this.node.type)}function restoreContext(path,context){path.context!==context&&(path.context=context,path.state=context.state,path.opts=context.opts)}function setScope(){var _this$opts2,_this$scope;if(null!=(_this$opts2=this.opts)&&_this$opts2.noScope)return;let target,path=this.parentPath;for((("key"===this.key||"decorators"===this.listKey)&&path.isMethod()||"discriminant"===this.key&&path.isSwitchStatement())&&(path=path.parentPath);path&&!target;){var _path$opts;if(null!=(_path$opts=path.opts)&&_path$opts.noScope)return;target=path.scope,path=path.parentPath}this.scope=this.getScope(target),null==(_this$scope=this.scope)||_this$scope.init()}function _resyncParent(){this.parentPath&&(this.parent=this.parentPath.node)}function _resyncKey(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arrowFunctionToExpression=function({allowInsertArrow=!0,allowInsertArrowWithRest=allowInsertArrow,noNewArrows=!(_arguments$=>null==(_arguments$=arguments[0])?void 0:_arguments$.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let self=this;var _self$ensureFunctionN;noNewArrows||(self=null!=(_self$ensureFunctionN=self.ensureFunctionName(!1))?_self$ensureFunctionN:self);const{thisBinding,fnPath:fn}=hoistFunctionEnvironment(self,noNewArrows,allowInsertArrow,allowInsertArrowWithRest);if(fn.ensureBlock(),function(path,type){path.node.type=type}(fn,"FunctionExpression"),!noNewArrows){const checkBinding=thisBinding?null:fn.scope.generateUidIdentifier("arrowCheckId");return checkBinding&&fn.parentPath.scope.push({id:checkBinding,init:objectExpression([])}),fn.get("body").unshiftContainer("body",expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"),[thisExpression(),identifier(checkBinding?checkBinding.name:thisBinding)]))),fn.replaceWith(callExpression(memberExpression(fn.node,identifier("bind")),[checkBinding?identifier(checkBinding.name):thisExpression()])),fn.get("callee.object")}return fn},exports.ensureBlock=function(){const body=this.get("body"),bodyNode=body.node;if(Array.isArray(body))throw new Error("Can't convert array path to a block statement");if(!bodyNode)throw new Error("Can't convert node without a body");if(body.isBlockStatement())return bodyNode;const statements=[];let key,listKey,stringPath="body";body.isStatement()?(listKey="body",key=0,statements.push(body.node)):(stringPath+=".body.0",this.isFunction()?(key="argument",statements.push(returnStatement(body.node))):(key="expression",statements.push(expressionStatement(body.node))));this.node.body=blockStatement(statements);const parentPath=this.get(stringPath);return _context.setup.call(body,parentPath,listKey?parentPath.node[listKey]:parentPath.node,listKey,key),this.node},exports.ensureFunctionName=function(supportUnicodeId){if(this.node.id)return this;const res=getFunctionName(this.node,this.parent);if(null==res)return this;let{name}=res;if(!supportUnicodeId&&/[\uD800-\uDFFF]/.test(name))return null;if(name.startsWith("get ")||name.startsWith("set "))return null;name=toBindingIdentifierName(name.replace(/[/ ]/g,"_"));const id=identifier(name);inherits(id,res.originalNode);const state={needsRename:!1,name},{scope}=this,binding=scope.getOwnBinding(name);binding?"param"===binding.kind&&(state.needsRename=!0):(scope.parent.hasBinding(name)||scope.hasGlobal(name))&&this.traverse(refersOuterBindingVisitor,state);if(!state.needsRename)return this.node.id=id,scope.getProgramParent().references[id.name]=!0,this;if(scope.hasBinding(id.name)&&!scope.hasGlobal(id.name))return scope.rename(id.name),this.node.id=id,scope.getProgramParent().references[id.name]=!0,this;if(!isFunction(this.node))return null;const key=scope.generateUidIdentifier(id.name),params=[];for(let i=0,len=function(node){const count=node.params.findIndex(param=>isAssignmentPattern(param)||isRestElement(param));return-1===count?node.params.length:count}(this.node);i0)throw new Error("It doesn't make sense to split exported specifiers.");const declaration=this.get("declaration");if(this.isExportDefaultDeclaration()){const standaloneDeclaration=declaration.isFunctionDeclaration()||declaration.isClassDeclaration(),exportExpr=declaration.isFunctionExpression()||declaration.isClassExpression(),scope=declaration.isScope()?declaration.scope.parent:declaration.scope;let id=declaration.node.id,needBindingRegistration=!1;id?exportExpr&&scope.hasBinding(id.name)&&(needBindingRegistration=!0,id=scope.generateUidIdentifier(id.name)):(needBindingRegistration=!0,id=scope.generateUidIdentifier("default"),(standaloneDeclaration||exportExpr)&&(declaration.node.id=cloneNode(id)));const updatedDeclaration=standaloneDeclaration?declaration.node:variableDeclaration("var",[variableDeclarator(cloneNode(id),declaration.node)]),updatedExportDeclaration=exportNamedDeclaration(null,[exportSpecifier(cloneNode(id),identifier("default"))]);return this.insertAfter(updatedExportDeclaration),this.replaceWith(updatedDeclaration),needBindingRegistration&&scope.registerDeclaration(this),this}if(this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");const bindingIdentifiers=declaration.getOuterBindingIdentifiers(),specifiers=Object.keys(bindingIdentifiers).map(name=>exportSpecifier(identifier(name),identifier(name))),aliasDeclar=exportNamedDeclaration(null,specifiers);return this.insertAfter(aliasDeclar),this.replaceWith(declaration.node),this},exports.toComputedKey=function(){let key;if(this.isMemberExpression())key=this.node.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");key=this.node.key}this.node.computed||isIdentifier(key)&&(key=stringLiteral(key.name));return key},exports.unwrapFunctionEnvironment=function(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");hoistFunctionEnvironment(this)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_template=__webpack_require__("./node_modules/.pnpm/@babel+template@7.27.2/node_modules/@babel/template/lib/index.js"),_visitors=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/visitors.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{arrowFunctionExpression,assignmentExpression,binaryExpression,blockStatement,callExpression,conditionalExpression,expressionStatement,identifier,isIdentifier,jsxIdentifier,logicalExpression,LOGICAL_OPERATORS,memberExpression,metaProperty,numericLiteral,objectExpression,restElement,returnStatement,sequenceExpression,spreadElement,stringLiteral,super:_super,thisExpression,toExpression,unaryExpression,toBindingIdentifierName,isFunction,isAssignmentPattern,isRestElement,getFunctionName,cloneNode,variableDeclaration,variableDeclarator,exportNamedDeclaration,exportSpecifier,inherits}=_t;exports.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()};const getSuperCallsVisitor=(0,_visitors.environmentVisitor)({CallExpression(child,{allSuperCalls}){child.get("callee").isSuper()&&allSuperCalls.push(child)}});function hoistFunctionEnvironment(fnPath,noNewArrows=!0,allowInsertArrow=!0,allowInsertArrowWithRest=!0){let arrowParent,thisEnvFn=fnPath.findParent(p=>p.isArrowFunctionExpression()?(null!=arrowParent||(arrowParent=p),!1):p.isFunction()||p.isProgram()||p.isClassProperty({static:!1})||p.isClassPrivateProperty({static:!1}));const inConstructor=thisEnvFn.isClassMethod({kind:"constructor"});if(thisEnvFn.isClassProperty()||thisEnvFn.isClassPrivateProperty())if(arrowParent)thisEnvFn=arrowParent;else{if(!allowInsertArrow)throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");fnPath.replaceWith(callExpression(arrowFunctionExpression([],toExpression(fnPath.node)),[])),thisEnvFn=fnPath.get("callee"),fnPath=thisEnvFn.get("body")}const{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}=function(fnPath){const thisPaths=[],argumentsPaths=[],newTargetPaths=[],superProps=[],superCalls=[];return fnPath.traverse(getScopeInformationVisitor,{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}),{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}}(fnPath);if(inConstructor&&superCalls.length>0){if(!allowInsertArrow)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!allowInsertArrowWithRest)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");const allSuperCalls=[];thisEnvFn.traverse(getSuperCallsVisitor,{allSuperCalls});const superBinding=function(thisEnvFn){return getBinding(thisEnvFn,"supercall",()=>{const argsBinding=thisEnvFn.scope.generateUidIdentifier("args");return arrowFunctionExpression([restElement(argsBinding)],callExpression(_super(),[spreadElement(identifier(argsBinding.name))]))})}(thisEnvFn);allSuperCalls.forEach(superCall=>{const callee=identifier(superBinding);callee.loc=superCall.node.callee.loc,superCall.get("callee").replaceWith(callee)})}if(argumentsPaths.length>0){const argumentsBinding=getBinding(thisEnvFn,"arguments",()=>{const args=()=>identifier("arguments");return thisEnvFn.scope.path.isProgram()?conditionalExpression(binaryExpression("===",unaryExpression("typeof",args()),stringLiteral("undefined")),thisEnvFn.scope.buildUndefinedNode(),args()):args()});argumentsPaths.forEach(argumentsChild=>{const argsRef=identifier(argumentsBinding);argsRef.loc=argumentsChild.node.loc,argumentsChild.replaceWith(argsRef)})}if(newTargetPaths.length>0){const newTargetBinding=getBinding(thisEnvFn,"newtarget",()=>metaProperty(identifier("new"),identifier("target")));newTargetPaths.forEach(targetChild=>{const targetRef=identifier(newTargetBinding);targetRef.loc=targetChild.node.loc,targetChild.replaceWith(targetRef)})}if(superProps.length>0){if(!allowInsertArrow)throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");superProps.reduce((acc,superProp)=>acc.concat(function(superProp){if(superProp.parentPath.isAssignmentExpression()&&"="!==superProp.parentPath.node.operator){const assignmentPath=superProp.parentPath,op=assignmentPath.node.operator.slice(0,-1),value=assignmentPath.node.right,isLogicalAssignment=function(op){return LOGICAL_OPERATORS.includes(op)}(op);if(superProp.node.computed){const tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,assignmentExpression("=",tmp,property),!0)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op,memberExpression(object,identifier(tmp.name),!0),value))}else{const object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,property)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op,memberExpression(object,identifier(property.name)),value))}return isLogicalAssignment?assignmentPath.replaceWith(logicalExpression(op,assignmentPath.node.left,assignmentPath.node.right)):assignmentPath.node.operator="=",[assignmentPath.get("left"),assignmentPath.get("right").get("left")]}if(superProp.parentPath.isUpdateExpression()){const updateExpr=superProp.parentPath,tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),computedKey=superProp.node.computed?superProp.scope.generateDeclaredUidIdentifier("prop"):null,parts=[assignmentExpression("=",tmp,memberExpression(superProp.node.object,computedKey?assignmentExpression("=",computedKey,superProp.node.property):superProp.node.property,superProp.node.computed)),assignmentExpression("=",memberExpression(superProp.node.object,computedKey?identifier(computedKey.name):superProp.node.property,superProp.node.computed),binaryExpression(superProp.parentPath.node.operator[0],identifier(tmp.name),numericLiteral(1)))];superProp.parentPath.node.prefix||parts.push(identifier(tmp.name)),updateExpr.replaceWith(sequenceExpression(parts));return[updateExpr.get("expressions.0.right"),updateExpr.get("expressions.1.left")]}return[superProp];function rightExpression(op,left,right){return"="===op?assignmentExpression("=",left,right):binaryExpression(op,left,right)}}(superProp)),[]).forEach(superProp=>{const key=superProp.node.computed?"":superProp.get("property").node.name,superParentPath=superProp.parentPath,isAssignment=superParentPath.isAssignmentExpression({left:superProp.node}),isCall=superParentPath.isCallExpression({callee:superProp.node}),isTaggedTemplate=superParentPath.isTaggedTemplateExpression({tag:superProp.node}),superBinding=function(thisEnvFn,isAssignment,propName){const op=isAssignment?"set":"get";return getBinding(thisEnvFn,`superprop_${op}:${propName||""}`,()=>{const argsList=[];let fnBody;if(propName)fnBody=memberExpression(_super(),identifier(propName));else{const method=thisEnvFn.scope.generateUidIdentifier("prop");argsList.unshift(method),fnBody=memberExpression(_super(),identifier(method.name),!0)}if(isAssignment){const valueIdent=thisEnvFn.scope.generateUidIdentifier("value");argsList.push(valueIdent),fnBody=assignmentExpression("=",fnBody,identifier(valueIdent.name))}return arrowFunctionExpression(argsList,fnBody)})}(thisEnvFn,isAssignment,key),args=[];if(superProp.node.computed&&args.push(superProp.get("property").node),isAssignment){const value=superParentPath.node.right;args.push(value)}const call=callExpression(identifier(superBinding),args);isCall?(superParentPath.unshiftContainer("arguments",thisExpression()),superProp.replaceWith(memberExpression(call,identifier("call"))),thisPaths.push(superParentPath.get("arguments.0"))):isAssignment?superParentPath.replaceWith(call):isTaggedTemplate?(superProp.replaceWith(callExpression(memberExpression(call,identifier("bind"),!1),[thisExpression()])),thisPaths.push(superProp.get("arguments.0"))):superProp.replaceWith(call)})}let thisBinding;return(thisPaths.length>0||!noNewArrows)&&(thisBinding=function(thisEnvFn,inConstructor){return getBinding(thisEnvFn,"this",thisBinding=>{if(!inConstructor||!hasSuperClass(thisEnvFn))return thisExpression();thisEnvFn.traverse(assignSuperThisVisitor,{supers:new WeakSet,thisBinding})})}(thisEnvFn,inConstructor),(noNewArrows||inConstructor&&hasSuperClass(thisEnvFn))&&(thisPaths.forEach(thisChild=>{const thisRef=thisChild.isJSX()?jsxIdentifier(thisBinding):identifier(thisBinding);thisRef.loc=thisChild.node.loc,thisChild.replaceWith(thisRef)}),noNewArrows||(thisBinding=null))),{thisBinding,fnPath}}function hasSuperClass(thisEnvFn){return thisEnvFn.isClassMethod()&&!!thisEnvFn.parentPath.parentPath.node.superClass}const assignSuperThisVisitor=(0,_visitors.environmentVisitor)({CallExpression(child,{supers,thisBinding}){child.get("callee").isSuper()&&(supers.has(child.node)||(supers.add(child.node),child.replaceWithMultiple([child.node,assignmentExpression("=",identifier(thisBinding),identifier("this"))])))}});function getBinding(thisEnvFn,key,init){const cacheKey="binding:"+key;let data=thisEnvFn.getData(cacheKey);if(!data){const id=thisEnvFn.scope.generateUidIdentifier(key);data=id.name,thisEnvFn.setData(cacheKey,data),thisEnvFn.scope.push({id,init:init(data)})}return data}const getScopeInformationVisitor=(0,_visitors.environmentVisitor)({ThisExpression(child,{thisPaths}){thisPaths.push(child)},JSXIdentifier(child,{thisPaths}){"this"===child.node.name&&(child.parentPath.isJSXMemberExpression({object:child.node})||child.parentPath.isJSXOpeningElement({name:child.node}))&&thisPaths.push(child)},CallExpression(child,{superCalls}){child.get("callee").isSuper()&&superCalls.push(child)},MemberExpression(child,{superProps}){child.get("object").isSuper()&&superProps.push(child)},Identifier(child,{argumentsPaths}){if(!child.isReferencedIdentifier({name:"arguments"}))return;let curr=child.scope;do{if(curr.hasOwnBinding("arguments"))return void curr.rename("arguments");if(curr.path.isFunction()&&!curr.path.isArrowFunctionExpression())break}while(curr=curr.parent);argumentsPaths.push(child)},MetaProperty(child,{newTargetPaths}){child.get("meta").isIdentifier({name:"new"})&&child.get("property").isIdentifier({name:"target"})&&newTargetPaths.push(child)}});const refersOuterBindingVisitor={"ReferencedIdentifier|BindingIdentifier"(path,state){path.node.name===state.name&&(state.needsRename=!0,path.stop())},Scope(path,state){path.scope.hasOwnBinding(state.name)&&path.skip()}}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/evaluation.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.evaluate=function(){const state={confident:!0,deoptPath:null,seen:new Map};let value=evaluateCached(this,state);state.confident||(value=void 0);return{confident:state.confident,deopt:state.deoptPath,value}},exports.evaluateTruthy=function(){const res=this.evaluate();if(res.confident)return!!res.value};const VALID_OBJECT_CALLEES=["Number","String","Math"],VALID_IDENTIFIER_CALLEES=["isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent",null,null],INVALID_METHODS=["random"];function isValidObjectCallee(val){return VALID_OBJECT_CALLEES.includes(val)}function deopt(path,state){state.confident&&(state.deoptPath=path,state.confident=!1)}const Globals=new Map([["undefined",void 0],["Infinity",1/0],["NaN",NaN]]);function evaluateCached(path,state){const{node}=path,{seen}=state;if(seen.has(node)){const existing=seen.get(node);return existing.resolved?existing.value:void deopt(path,state)}{const item={resolved:!1};seen.set(node,item);const val=function(path,state){if(!state.confident)return;if(path.isSequenceExpression()){const exprs=path.get("expressions");return evaluateCached(exprs[exprs.length-1],state)}if(path.isStringLiteral()||path.isNumericLiteral()||path.isBooleanLiteral())return path.node.value;if(path.isNullLiteral())return null;if(path.isTemplateLiteral())return evaluateQuasis(path,path.node.quasis,state);if(path.isTaggedTemplateExpression()&&path.get("tag").isMemberExpression()){const object=path.get("tag.object"),{node:{name}}=object,property=path.get("tag.property");if(object.isIdentifier()&&"String"===name&&!path.scope.getBinding(name)&&property.isIdentifier()&&"raw"===property.node.name)return evaluateQuasis(path,path.node.quasi.quasis,state,!0)}if(path.isConditionalExpression()){const testResult=evaluateCached(path.get("test"),state);if(!state.confident)return;return evaluateCached(testResult?path.get("consequent"):path.get("alternate"),state)}if(path.isExpressionWrapper())return evaluateCached(path.get("expression"),state);if(path.isMemberExpression()&&!path.parentPath.isCallExpression({callee:path.node})){const property=path.get("property"),object=path.get("object");if(object.isLiteral()){const value=object.node.value,type=typeof value;let key=null;if(path.node.computed){if(key=evaluateCached(property,state),!state.confident)return}else property.isIdentifier()&&(key=property.node.name);if(!("number"!==type&&"string"!==type||null==key||"number"!=typeof key&&"string"!=typeof key))return value[key]}}if(path.isReferencedIdentifier()){const binding=path.scope.getBinding(path.node.name);if(binding){if(binding.constantViolations.length>0||path.node.start1?void deopt(resolved,state):value}if(path.isUnaryExpression({prefix:!0})){if("void"===path.node.operator)return;const argument=path.get("argument");if("typeof"===path.node.operator&&(argument.isFunction()||argument.isClass()))return"function";const arg=evaluateCached(argument,state);if(!state.confident)return;switch(path.node.operator){case"!":return!arg;case"+":return+arg;case"-":return-arg;case"~":return~arg;case"typeof":return typeof arg}}if(path.isArrayExpression()){const arr=[],elems=path.get("elements");for(const elem of elems){const elemValue=elem.evaluate();if(!elemValue.confident)return void deopt(elemValue.deopt,state);arr.push(elemValue.value)}return arr}if(path.isObjectExpression()){const obj={},props=path.get("properties");for(const prop of props){if(prop.isObjectMethod()||prop.isSpreadElement())return void deopt(prop,state);const keyPath=prop.get("key");let key;if(prop.node.computed){if(key=keyPath.evaluate(),!key.confident)return void deopt(key.deopt,state);key=key.value}else key=keyPath.isIdentifier()?keyPath.node.name:keyPath.node.value;let value=prop.get("value").evaluate();if(!value.confident)return void deopt(value.deopt,state);value=value.value,obj[key]=value}return obj}if(path.isLogicalExpression()){const wasConfident=state.confident,left=evaluateCached(path.get("left"),state),leftConfident=state.confident;state.confident=wasConfident;const right=evaluateCached(path.get("right"),state),rightConfident=state.confident;switch(path.node.operator){case"||":if(state.confident=leftConfident&&(!!left||rightConfident),!state.confident)return;return left||right;case"&&":if(state.confident=leftConfident&&(!left||rightConfident),!state.confident)return;return left&&right;case"??":if(state.confident=leftConfident&&(null!=left||rightConfident),!state.confident)return;return null!=left?left:right}}if(path.isBinaryExpression()){const left=evaluateCached(path.get("left"),state);if(!state.confident)return;const right=evaluateCached(path.get("right"),state);if(!state.confident)return;switch(path.node.operator){case"-":return left-right;case"+":return left+right;case"/":return left/right;case"*":return left*right;case"%":return left%right;case"**":return Math.pow(left,right);case"<":return left":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right;case"|":return left|right;case"&":return left&right;case"^":return left^right;case"<<":return left<>":return left>>right;case">>>":return left>>>right}}if(path.isCallExpression()){const callee=path.get("callee");let context,func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name)&&(isValidObjectCallee(callee.node.name)||function(val){return VALID_IDENTIFIER_CALLEES.includes(val)}(callee.node.name))&&(func=global[callee.node.name]),callee.isMemberExpression()){const object=callee.get("object"),property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&isValidObjectCallee(object.node.name)&&!function(val){return INVALID_METHODS.includes(val)}(property.node.name)){context=global[object.node.name];const key=property.node.name;hasOwnProperty.call(context,key)&&(func=context[key])}if(object.isLiteral()&&property.isIdentifier()){const type=typeof object.node.value;"string"!==type&&"number"!==type||(context=object.node.value,func=context[property.node.name])}}if(func){const args=path.get("arguments").map(arg=>evaluateCached(arg,state));if(!state.confident)return;return func.apply(context,args)}}deopt(path,state)}(path,state);return state.confident&&(item.resolved=!0,item.value=val),val}}function evaluateQuasis(path,quasis,state,raw=!1){let str="",i=0;const exprs=path.isTemplateLiteral()?path.get("expressions"):path.get("quasi.expressions");for(const elem of quasis){if(!state.confident)break;str+=raw?elem.value.raw:elem.value.cooked;const expr=exprs[i++];expr&&(str+=String(evaluateCached(expr,state)))}if(state.confident)return str}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/family.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getKey=_getKey,exports._getPattern=_getPattern,exports.get=function(key,context=!0){!0===context&&(context=this.context);const parts=key.split(".");return 1===parts.length?_getKey.call(this,key,context):_getPattern.call(this,parts,context)},exports.getAllNextSiblings=function(){let _key=this.key,sibling=this.getSibling(++_key);const siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(++_key);return siblings},exports.getAllPrevSiblings=function(){let _key=this.key,sibling=this.getSibling(--_key);const siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(--_key);return siblings},exports.getAssignmentIdentifiers=function(){return _getAssignmentIdentifiers(this.node)},exports.getBindingIdentifierPaths=function(duplicates=!1,outerOnly=!1){const search=[this],ids=Object.create(null);for(;search.length;){const id=search.shift();if(!id)continue;if(!id.node)continue;const keys=_getBindingIdentifiers.keys[id.node.type];if(id.isIdentifier())if(duplicates){(ids[id.node.name]=ids[id.node.name]||[]).push(id)}else ids[id.node.name]=id;else{if(id.isExportDeclaration()){const declaration=id.get("declaration");declaration.isDeclaration()&&search.push(declaration);continue}if(outerOnly){if(id.isFunctionDeclaration()){search.push(id.get("id"));continue}if(id.isFunctionExpression())continue}if(keys)for(let i=0;ir.path)},exports.getNextSibling=function(){return this.getSibling(this.key+1)},exports.getOpposite=function(){if("left"===this.key)return this.getSibling("right");if("right"===this.key)return this.getSibling("left");return null},exports.getOuterBindingIdentifierPaths=function(duplicates=!1){return this.getBindingIdentifierPaths(duplicates,!0)},exports.getOuterBindingIdentifiers=function(duplicates){return _getOuterBindingIdentifiers(this.node,duplicates)},exports.getPrevSibling=function(){return this.getSibling(this.key-1)},exports.getSibling=function(key){return _index.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key}).setContext(this.context)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{getAssignmentIdentifiers:_getAssignmentIdentifiers,getBindingIdentifiers:_getBindingIdentifiers,getOuterBindingIdentifiers:_getOuterBindingIdentifiers,numericLiteral,unaryExpression}=_t,NORMAL_COMPLETION=0,BREAK_COMPLETION=1;function addCompletionRecords(path,records,context){return path&&records.push(..._getCompletionRecords(path,context)),records}function normalCompletionToBreak(completions){completions.forEach(c=>{c.type=BREAK_COMPLETION})}function replaceBreakStatementInBreakCompletion(completions,reachable){completions.forEach(c=>{c.path.isBreakStatement({label:null})&&(reachable?c.path.replaceWith(unaryExpression("void",numericLiteral(0))):c.path.remove())})}function getStatementListCompletion(paths,context){const completions=[];if(context.canHaveBreak){let lastNormalCompletions=[];for(let i=0;i0&&statementCompletions.every(c=>c.type===BREAK_COMPLETION)){lastNormalCompletions.length>0&&statementCompletions.every(c=>c.path.isBreakStatement({label:null}))?(normalCompletionToBreak(lastNormalCompletions),completions.push(...lastNormalCompletions),lastNormalCompletions.some(c=>c.path.isDeclaration())&&(completions.push(...statementCompletions),context.shouldPreserveBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!0)),context.shouldPreserveBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!1)):(completions.push(...statementCompletions),context.shouldPopulateBreak||context.shouldPreserveBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!0));break}if(i===paths.length-1)completions.push(...statementCompletions);else{lastNormalCompletions=[];for(let i=0;i=0;i--){const pathCompletions=_getCompletionRecords(paths[i],context);if(pathCompletions.length>1||1===pathCompletions.length&&!pathCompletions[0].path.isVariableDeclaration()&&!pathCompletions[0].path.isEmptyStatement()){completions.push(...pathCompletions);break}}return completions}function _getCompletionRecords(path,context){let records=[];if(path.isIfStatement())records=addCompletionRecords(path.get("consequent"),records,context),records=addCompletionRecords(path.get("alternate"),records,context);else{if(path.isDoExpression()||path.isFor()||path.isWhile()||path.isLabeledStatement())return addCompletionRecords(path.get("body"),records,context);if(path.isProgram()||path.isBlockStatement())return getStatementListCompletion(path.get("body"),context);if(path.isFunction())return _getCompletionRecords(path.get("body"),context);if(path.isTryStatement())records=addCompletionRecords(path.get("block"),records,context),records=addCompletionRecords(path.get("handler"),records,context);else{if(path.isCatchClause())return addCompletionRecords(path.get("body"),records,context);if(path.isSwitchStatement())return function(cases,records,context){let lastNormalCompletions=[];for(let i=0;i_index.default.get({listKey:key,parentPath:this,parent:node,container,key:i}).setContext(context)):_index.default.get({parentPath:this,parent:node,container:node,key}).setContext(context)}function _getPattern(parts,context){let path=this;for(const part of parts)path="."===part?path.parentPath:Array.isArray(path)?path[part]:path.get(part,context);return path}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.SHOULD_STOP=exports.SHOULD_SKIP=exports.REMOVED=void 0;var virtualTypes=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/virtual-types.js"),_debug=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/index.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),t=_t,cache=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js"),_generator=__webpack_require__("./node_modules/.pnpm/@babel+generator@7.28.0/node_modules/@babel/generator/lib/index.js"),NodePath_ancestry=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/ancestry.js"),NodePath_inference=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/index.js"),NodePath_replacement=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/replacement.js"),NodePath_evaluation=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/evaluation.js"),NodePath_conversion=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/conversion.js"),NodePath_introspection=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/introspection.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js"),NodePath_context=_context,NodePath_removal=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/removal.js"),NodePath_modification=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/modification.js"),NodePath_family=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/family.js"),NodePath_comments=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/comments.js"),NodePath_virtual_types_validator=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js");const{validate}=_t,debug=_debug("babel"),NodePath_Final=(exports.REMOVED=1,exports.SHOULD_STOP=2,exports.SHOULD_SKIP=4,exports.default=class NodePath{constructor(hub,parent){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=parent,this.hub=hub,this.data=null,this.context=null,this.scope=null}get removed(){return(1&this._traverseFlags)>0}set removed(v){v?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(2&this._traverseFlags)>0}set shouldStop(v){v?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(4&this._traverseFlags)>0}set shouldSkip(v){v?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub,parentPath,parent,container,listKey,key}){if(!hub&&parentPath&&(hub=parentPath.hub),!parent)throw new Error("To get a node path the parent needs to exist");const targetNode=container[key],paths=cache.getOrCreateCachedPaths(parent,parentPath);let path=paths.get(targetNode);return path||(path=new NodePath(hub,parent),targetNode&&paths.set(targetNode,path)),_context.setup.call(path,parentPath,container,listKey,key),path}getScope(scope){return this.isScope()?new _index2.default(this):scope}setData(key,val){return null==this.data&&(this.data=Object.create(null)),this.data[key]=val}getData(key,def){null==this.data&&(this.data=Object.create(null));let val=this.data[key];return void 0===val&&void 0!==def&&(val=this.data[key]=def),val}hasNode(){return null!=this.node}buildCodeFrameError(msg,Error=SyntaxError){return this.hub.buildError(this.node,msg,Error)}traverse(visitor,state){(0,_index.default)(this.node,visitor,this.scope,state,this)}set(key,node){validate(this.node,key,node),this.node[key]=node}getPathLocation(){const parts=[];let path=this;do{let key=path.key;path.inList&&(key=`${path.listKey}[${key}]`),parts.unshift(key)}while(path=path.parentPath);return parts.join(".")}debug(message){debug.enabled&&debug(`${this.getPathLocation()} ${this.type}: ${message}`)}toString(){return(0,_generator.default)(this.node).code}get inList(){return!!this.listKey}set inList(inList){inList||(this.listKey=null)}get parentKey(){return this.listKey||this.key}}),methods={findParent:NodePath_ancestry.findParent,find:NodePath_ancestry.find,getFunctionParent:NodePath_ancestry.getFunctionParent,getStatementParent:NodePath_ancestry.getStatementParent,getEarliestCommonAncestorFrom:NodePath_ancestry.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:NodePath_ancestry.getDeepestCommonAncestorFrom,getAncestry:NodePath_ancestry.getAncestry,isAncestor:NodePath_ancestry.isAncestor,isDescendant:NodePath_ancestry.isDescendant,inType:NodePath_ancestry.inType,getTypeAnnotation:NodePath_inference.getTypeAnnotation,isBaseType:NodePath_inference.isBaseType,couldBeBaseType:NodePath_inference.couldBeBaseType,baseTypeStrictlyMatches:NodePath_inference.baseTypeStrictlyMatches,isGenericType:NodePath_inference.isGenericType,replaceWithMultiple:NodePath_replacement.replaceWithMultiple,replaceWithSourceString:NodePath_replacement.replaceWithSourceString,replaceWith:NodePath_replacement.replaceWith,replaceExpressionWithStatements:NodePath_replacement.replaceExpressionWithStatements,replaceInline:NodePath_replacement.replaceInline,evaluateTruthy:NodePath_evaluation.evaluateTruthy,evaluate:NodePath_evaluation.evaluate,toComputedKey:NodePath_conversion.toComputedKey,ensureBlock:NodePath_conversion.ensureBlock,unwrapFunctionEnvironment:NodePath_conversion.unwrapFunctionEnvironment,arrowFunctionToExpression:NodePath_conversion.arrowFunctionToExpression,splitExportDeclaration:NodePath_conversion.splitExportDeclaration,ensureFunctionName:NodePath_conversion.ensureFunctionName,matchesPattern:NodePath_introspection.matchesPattern,isStatic:NodePath_introspection.isStatic,isNodeType:NodePath_introspection.isNodeType,canHaveVariableDeclarationOrExpression:NodePath_introspection.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:NodePath_introspection.canSwapBetweenExpressionAndStatement,isCompletionRecord:NodePath_introspection.isCompletionRecord,isStatementOrBlock:NodePath_introspection.isStatementOrBlock,referencesImport:NodePath_introspection.referencesImport,getSource:NodePath_introspection.getSource,willIMaybeExecuteBefore:NodePath_introspection.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:NodePath_introspection._guessExecutionStatusRelativeTo,resolve:NodePath_introspection.resolve,isConstantExpression:NodePath_introspection.isConstantExpression,isInStrictMode:NodePath_introspection.isInStrictMode,isDenylisted:NodePath_context.isDenylisted,visit:NodePath_context.visit,skip:NodePath_context.skip,skipKey:NodePath_context.skipKey,stop:NodePath_context.stop,setContext:NodePath_context.setContext,requeue:NodePath_context.requeue,requeueComputedKeyAndDecorators:NodePath_context.requeueComputedKeyAndDecorators,remove:NodePath_removal.remove,insertBefore:NodePath_modification.insertBefore,insertAfter:NodePath_modification.insertAfter,unshiftContainer:NodePath_modification.unshiftContainer,pushContainer:NodePath_modification.pushContainer,getOpposite:NodePath_family.getOpposite,getCompletionRecords:NodePath_family.getCompletionRecords,getSibling:NodePath_family.getSibling,getPrevSibling:NodePath_family.getPrevSibling,getNextSibling:NodePath_family.getNextSibling,getAllNextSiblings:NodePath_family.getAllNextSiblings,getAllPrevSiblings:NodePath_family.getAllPrevSiblings,get:NodePath_family.get,getAssignmentIdentifiers:NodePath_family.getAssignmentIdentifiers,getBindingIdentifiers:NodePath_family.getBindingIdentifiers,getOuterBindingIdentifiers:NodePath_family.getOuterBindingIdentifiers,getBindingIdentifierPaths:NodePath_family.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:NodePath_family.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:NodePath_comments.shareCommentsWithSiblings,addComment:NodePath_comments.addComment,addComments:NodePath_comments.addComments};Object.assign(NodePath_Final.prototype,methods),NodePath_Final.prototype.arrowFunctionToShadowed=NodePath_conversion[String("arrowFunctionToShadowed")],Object.assign(NodePath_Final.prototype,{has:NodePath_introspection[String("has")],is:NodePath_introspection[String("is")],isnt:NodePath_introspection[String("isnt")],equals:NodePath_introspection[String("equals")],hoist:NodePath_modification[String("hoist")],updateSiblingKeys:NodePath_modification.updateSiblingKeys,call:NodePath_context.call,isBlacklisted:NodePath_context[String("isBlacklisted")],setScope:NodePath_context.setScope,resync:NodePath_context.resync,popContext:NodePath_context.popContext,pushContext:NodePath_context.pushContext,setup:NodePath_context.setup,setKey:NodePath_context.setKey}),NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions=NodePath_introspection._guessExecutionStatusRelativeTo,NodePath_Final.prototype._guessExecutionStatusRelativeToDifferentFunctions=NodePath_introspection._guessExecutionStatusRelativeTo,Object.assign(NodePath_Final.prototype,{_getTypeAnnotation:NodePath_inference._getTypeAnnotation,_replaceWith:NodePath_replacement._replaceWith,_resolve:NodePath_introspection._resolve,_call:NodePath_context._call,_resyncParent:NodePath_context._resyncParent,_resyncKey:NodePath_context._resyncKey,_resyncList:NodePath_context._resyncList,_resyncRemoved:NodePath_context._resyncRemoved,_getQueueContexts:NodePath_context._getQueueContexts,_removeFromScope:NodePath_removal._removeFromScope,_callRemovalHooks:NodePath_removal._callRemovalHooks,_remove:NodePath_removal._remove,_markRemoved:NodePath_removal._markRemoved,_assertUnremoved:NodePath_removal._assertUnremoved,_containerInsert:NodePath_modification._containerInsert,_containerInsertBefore:NodePath_modification._containerInsertBefore,_containerInsertAfter:NodePath_modification._containerInsertAfter,_verifyNodeList:NodePath_modification._verifyNodeList,_getKey:NodePath_family._getKey,_getPattern:NodePath_family._getPattern});for(const type of t.TYPES){const typeKey=`is${type}`,fn=t[typeKey];NodePath_Final.prototype[typeKey]=function(opts){return fn(this.node,opts)},NodePath_Final.prototype[`assert${type}`]=function(opts){if(!fn(this.node,opts))throw new TypeError(`Expected node path of type ${type}`)}}Object.assign(NodePath_Final.prototype,NodePath_virtual_types_validator);for(const type of Object.keys(virtualTypes))"_"!==type[0]&&(t.TYPES.includes(type)||t.TYPES.push(type))},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getTypeAnnotation=_getTypeAnnotation,exports.baseTypeStrictlyMatches=function(rightArg){const left=this.getTypeAnnotation(),right=rightArg.getTypeAnnotation();if(!isAnyTypeAnnotation(left)&&isFlowBaseAnnotation(left))return right.type===left.type;return!1},exports.couldBeBaseType=function(name){const type=this.getTypeAnnotation();if(isAnyTypeAnnotation(type))return!0;if(isUnionTypeAnnotation(type)){for(const type2 of type.types)if(isAnyTypeAnnotation(type2)||_isBaseType(name,type2,!0))return!0;return!1}return _isBaseType(name,type,!0)},exports.getTypeAnnotation=function(){let type=this.getData("typeAnnotation");if(null!=type)return type;type=_getTypeAnnotation.call(this)||anyTypeAnnotation(),(isTypeAnnotation(type)||isTSTypeAnnotation(type))&&(type=type.typeAnnotation);return this.setData("typeAnnotation",type),type},exports.isBaseType=function(baseName,soft){return _isBaseType(baseName,this.getTypeAnnotation(),soft)},exports.isGenericType=function(genericName){const type=this.getTypeAnnotation();if("Array"===genericName&&(isTSArrayType(type)||isArrayTypeAnnotation(type)||isTupleTypeAnnotation(type)))return!0;return isGenericTypeAnnotation(type)&&isIdentifier(type.id,{name:genericName})||isTSTypeReference(type)&&isIdentifier(type.typeName,{name:genericName})};var inferers=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/inferers.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{anyTypeAnnotation,isAnyTypeAnnotation,isArrayTypeAnnotation,isBooleanTypeAnnotation,isEmptyTypeAnnotation,isFlowBaseAnnotation,isGenericTypeAnnotation,isIdentifier,isMixedTypeAnnotation,isNumberTypeAnnotation,isStringTypeAnnotation,isTSArrayType,isTSTypeAnnotation,isTSTypeReference,isTupleTypeAnnotation,isTypeAnnotation,isUnionTypeAnnotation,isVoidTypeAnnotation,stringTypeAnnotation,voidTypeAnnotation}=_t;const typeAnnotationInferringNodes=new WeakSet;function _getTypeAnnotation(){const node=this.node;if(node){if(node.typeAnnotation)return node.typeAnnotation;if(!typeAnnotationInferringNodes.has(node)){typeAnnotationInferringNodes.add(node);try{var _inferer;let inferer=inferers[node.type];if(inferer)return inferer.call(this,node);if(inferer=inferers[this.parentPath.type],null!=(_inferer=inferer)&&_inferer.validParent)return this.parentPath.getTypeAnnotation()}finally{typeAnnotationInferringNodes.delete(node)}}}else if("init"===this.key&&this.parentPath.isVariableDeclarator()){const declar=this.parentPath.parentPath,declarParent=declar.parentPath;return"left"===declar.key&&declarParent.isForInStatement()?stringTypeAnnotation():"left"===declar.key&&declarParent.isForOfStatement()?anyTypeAnnotation():voidTypeAnnotation()}}function _isBaseType(baseName,type,soft){if("string"===baseName)return isStringTypeAnnotation(type);if("number"===baseName)return isNumberTypeAnnotation(type);if("boolean"===baseName)return isBooleanTypeAnnotation(type);if("any"===baseName)return isAnyTypeAnnotation(type);if("mixed"===baseName)return isMixedTypeAnnotation(type);if("empty"===baseName)return isEmptyTypeAnnotation(type);if("void"===baseName)return isVoidTypeAnnotation(type);if(soft)return!1;throw new Error(`Unknown base type ${baseName}`)}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){if(!this.isReferenced())return;const binding=this.scope.getBinding(node.name);if(binding)return binding.identifier.typeAnnotation?binding.identifier.typeAnnotation:function(binding,path,name){const types=[],functionConstantViolations=[];let constantViolations=getConstantViolationsBefore(binding,path,functionConstantViolations);const testType=getConditionalAnnotation(binding,path,name);if(testType){const testConstantViolations=getConstantViolationsBefore(binding,testType.ifStatement);constantViolations=constantViolations.filter(path=>!testConstantViolations.includes(path)),types.push(testType.typeAnnotation)}if(constantViolations.length){constantViolations.push(...functionConstantViolations);for(const violation of constantViolations)types.push(violation.getTypeAnnotation())}if(!types.length)return;return(0,_util.createUnionType)(types)}(binding,this,node.name);if("undefined"===node.name)return voidTypeAnnotation();if("NaN"===node.name||"Infinity"===node.name)return numberTypeAnnotation();node.name};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_util=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/util.js");const{BOOLEAN_NUMBER_BINARY_OPERATORS,createTypeAnnotationBasedOnTypeof,numberTypeAnnotation,voidTypeAnnotation}=_t;function getConstantViolationsBefore(binding,path,functions){const violations=binding.constantViolations.slice();return violations.unshift(binding.path),violations.filter(violation=>{const status=(violation=violation.resolve())._guessExecutionStatusRelativeTo(path);return functions&&"unknown"===status&&functions.push(violation),"before"===status})}function inferAnnotationFromBinaryExpression(name,path){const operator=path.node.operator,right=path.get("right").resolve(),left=path.get("left").resolve();let target,typeofPath,typePath;if(left.isIdentifier({name})?target=right:right.isIdentifier({name})&&(target=left),target)return"==="===operator?target.getTypeAnnotation():BOOLEAN_NUMBER_BINARY_OPERATORS.includes(operator)?numberTypeAnnotation():void 0;if("==="!==operator&&"=="!==operator)return;if(left.isUnaryExpression({operator:"typeof"})?(typeofPath=left,typePath=right):right.isUnaryExpression({operator:"typeof"})&&(typeofPath=right,typePath=left),!typeofPath)return;if(!typeofPath.get("argument").isIdentifier({name}))return;if(typePath=typePath.resolve(),!typePath.isLiteral())return;const typeValue=typePath.node.value;return"string"==typeof typeValue?createTypeAnnotationBasedOnTypeof(typeValue):void 0}function getConditionalAnnotation(binding,path,name){const ifStatement=function(binding,path,name){let parentPath;for(;parentPath=path.parentPath;){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if("test"===path.key)return;return parentPath}if(parentPath.isFunction()&&parentPath.parentPath.scope.getBinding(name)!==binding)return;path=parentPath}}(binding,path,name);if(!ifStatement)return;const paths=[ifStatement.get("test")],types=[];for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ArrayExpression=ArrayExpression,exports.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},exports.BinaryExpression=function(node){const operator=node.operator;if(NUMBER_BINARY_OPERATORS.includes(operator))return numberTypeAnnotation();if(BOOLEAN_BINARY_OPERATORS.includes(operator))return booleanTypeAnnotation();if("+"===operator){const right=this.get("right"),left=this.get("left");return left.isBaseType("number")&&right.isBaseType("number")?numberTypeAnnotation():left.isBaseType("string")||right.isBaseType("string")?stringTypeAnnotation():unionTypeAnnotation([stringTypeAnnotation(),numberTypeAnnotation()])}},exports.BooleanLiteral=function(){return booleanTypeAnnotation()},exports.CallExpression=function(){const{callee}=this.node;if(isObjectKeys(callee))return arrayTypeAnnotation(stringTypeAnnotation());if(isArrayFrom(callee)||isObjectValues(callee)||isIdentifier(callee,{name:"Array"}))return arrayTypeAnnotation(anyTypeAnnotation());if(isObjectEntries(callee))return arrayTypeAnnotation(tupleTypeAnnotation([stringTypeAnnotation(),anyTypeAnnotation()]));return resolveCall(this.get("callee"))},exports.ConditionalExpression=function(){const argumentTypes=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];return(0,_util.createUnionType)(argumentTypes)},exports.ClassDeclaration=exports.ClassExpression=exports.FunctionDeclaration=exports.ArrowFunctionExpression=exports.FunctionExpression=function(){return genericTypeAnnotation(identifier("Function"))},Object.defineProperty(exports,"Identifier",{enumerable:!0,get:function(){return _infererReference.default}}),exports.LogicalExpression=function(){const argumentTypes=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];return(0,_util.createUnionType)(argumentTypes)},exports.NewExpression=function(node){if("Identifier"===node.callee.type)return genericTypeAnnotation(node.callee)},exports.NullLiteral=function(){return nullLiteralTypeAnnotation()},exports.NumericLiteral=function(){return numberTypeAnnotation()},exports.ObjectExpression=function(){return genericTypeAnnotation(identifier("Object"))},exports.ParenthesizedExpression=function(){return this.get("expression").getTypeAnnotation()},exports.RegExpLiteral=function(){return genericTypeAnnotation(identifier("RegExp"))},exports.RestElement=RestElement,exports.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},exports.StringLiteral=function(){return stringTypeAnnotation()},exports.TSAsExpression=TSAsExpression,exports.TSNonNullExpression=function(){return this.get("expression").getTypeAnnotation()},exports.TaggedTemplateExpression=function(){return resolveCall(this.get("tag"))},exports.TemplateLiteral=function(){return stringTypeAnnotation()},exports.TypeCastExpression=TypeCastExpression,exports.UnaryExpression=function(node){const operator=node.operator;if("void"===operator)return voidTypeAnnotation();if(NUMBER_UNARY_OPERATORS.includes(operator))return numberTypeAnnotation();if(STRING_UNARY_OPERATORS.includes(operator))return stringTypeAnnotation();if(BOOLEAN_UNARY_OPERATORS.includes(operator))return booleanTypeAnnotation()},exports.UpdateExpression=function(node){const operator=node.operator;if("++"===operator||"--"===operator)return numberTypeAnnotation()},exports.VariableDeclarator=function(){if(!this.get("id").isIdentifier())return;return this.get("init").getTypeAnnotation()};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_infererReference=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js"),_util=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/util.js");const{BOOLEAN_BINARY_OPERATORS,BOOLEAN_UNARY_OPERATORS,NUMBER_BINARY_OPERATORS,NUMBER_UNARY_OPERATORS,STRING_UNARY_OPERATORS,anyTypeAnnotation,arrayTypeAnnotation,booleanTypeAnnotation,buildMatchMemberExpression,genericTypeAnnotation,identifier,nullLiteralTypeAnnotation,numberTypeAnnotation,stringTypeAnnotation,tupleTypeAnnotation,unionTypeAnnotation,voidTypeAnnotation,isIdentifier}=_t;function TypeCastExpression(node){return node.typeAnnotation}function TSAsExpression(node){return node.typeAnnotation}function ArrayExpression(){return genericTypeAnnotation(identifier("Array"))}function RestElement(){return ArrayExpression()}TypeCastExpression.validParent=!0,TSAsExpression.validParent=!0,RestElement.validParent=!0;const isArrayFrom=buildMatchMemberExpression("Array.from"),isObjectKeys=buildMatchMemberExpression("Object.keys"),isObjectValues=buildMatchMemberExpression("Object.values"),isObjectEntries=buildMatchMemberExpression("Object.entries");function resolveCall(callee){if((callee=callee.resolve()).isFunction()){const{node}=callee;if(node.async)return node.generator?genericTypeAnnotation(identifier("AsyncIterator")):genericTypeAnnotation(identifier("Promise"));if(node.generator)return genericTypeAnnotation(identifier("Iterator"));if(callee.node.returnType)return callee.node.returnType}}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/inference/util.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.createUnionType=function(types){if(types.every(v=>isFlowType(v)))return createFlowUnionType?createFlowUnionType(types):createUnionTypeAnnotation(types);if(types.every(v=>isTSType(v))&&createTSUnionType)return createTSUnionType(types)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{createFlowUnionType,createTSUnionType,createUnionTypeAnnotation,isFlowType,isTSType}=_t},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/introspection.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._guessExecutionStatusRelativeTo=function(target){return _guessExecutionStatusRelativeToCached(this,target,new Map)},exports._resolve=_resolve,exports.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},exports.canSwapBetweenExpressionAndStatement=function(replacement){if("body"!==this.key||!this.parentPath.isArrowFunctionExpression())return!1;if(this.isExpression())return isBlockStatement(replacement);if(this.isBlockStatement())return isExpression(replacement);return!1},exports.getSource=function(){const node=this.node;if(node.end){const code=this.hub.getCode();if(code)return code.slice(node.start,node.end)}return""},exports.isCompletionRecord=function(allowInsideFunction){let path=this,first=!0;do{const{type,container}=path;if(!first&&(path.isFunction()||"StaticBlock"===type))return!!allowInsideFunction;if(first=!1,Array.isArray(container)&&path.key!==container.length-1)return!1}while((path=path.parentPath)&&!path.isProgram()&&!path.isDoExpression());return!0},exports.isConstantExpression=function(){if(this.isIdentifier()){const binding=this.scope.getBinding(this.node.name);return!!binding&&binding.constant}if(this.isLiteral())return!this.isRegExpLiteral()&&(!this.isTemplateLiteral()||this.get("expressions").every(expression=>expression.isConstantExpression()));if(this.isUnaryExpression())return"void"===this.node.operator&&this.get("argument").isConstantExpression();if(this.isBinaryExpression()){const{operator}=this.node;return"in"!==operator&&"instanceof"!==operator&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}if(this.isMemberExpression())return!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0});if(this.isCallExpression())return 1===this.node.arguments.length&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral();return!1},exports.isInStrictMode=function(){const start=this.isProgram()?this:this.parentPath;return!!start.find(path=>{if(path.isProgram({sourceType:"module"}))return!0;if(path.isClass())return!0;if(path.isArrowFunctionExpression()&&!path.get("body").isBlockStatement())return!1;let body;if(path.isFunction())body=path.node.body;else{if(!path.isProgram())return!1;body=path.node}for(const directive of body.directives)if("use strict"===directive.value.value)return!0})},exports.isNodeType=function(type){return isType(this.type,type)},exports.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!isBlockStatement(this.container)&&STATEMENT_OR_BLOCK_KEYS.includes(this.key)},exports.isStatic=function(){return this.scope.isStatic(this.node)},exports.matchesPattern=function(pattern,allowPartial){return _matchesPattern(this.node,pattern,allowPartial)},exports.referencesImport=function(moduleSource,importName){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===importName||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?isStringLiteral(this.node.property,{value:importName}):this.node.property.name===importName)){const object=this.get("object");return object.isReferencedIdentifier()&&object.referencesImport(moduleSource,"*")}return!1}const binding=this.scope.getBinding(this.node.name);if(!binding||"module"!==binding.kind)return!1;const path=binding.path,parent=path.parentPath;if(!parent.isImportDeclaration())return!1;if(parent.node.source.value!==moduleSource)return!1;if(!importName)return!0;if(path.isImportDefaultSpecifier()&&"default"===importName)return!0;if(path.isImportNamespaceSpecifier()&&"*"===importName)return!0;if(path.isImportSpecifier()&&isIdentifier(path.node.imported,{name:importName}))return!0;return!1},exports.resolve=function(dangerous,resolved){return _resolve.call(this,dangerous,resolved)||this},exports.willIMaybeExecuteBefore=function(target){return"after"!==this._guessExecutionStatusRelativeTo(target)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{STATEMENT_OR_BLOCK_KEYS,VISITOR_KEYS,isBlockStatement,isExpression,isIdentifier,isLiteral,isStringLiteral,isType,matchesPattern:_matchesPattern}=_t;function getOuterFunction(path){return path.isProgram()?path:(path.parentPath.scope.getFunctionParent()||path.parentPath.scope.getProgramParent()).path}function isExecutionUncertain(type,key){switch(type){case"LogicalExpression":case"AssignmentPattern":return"right"===key;case"ConditionalExpression":case"IfStatement":return"consequent"===key||"alternate"===key;case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return"body"===key;case"ForStatement":return"body"===key||"update"===key;case"SwitchStatement":return"cases"===key;case"TryStatement":return"handler"===key;case"OptionalMemberExpression":return"property"===key;case"OptionalCallExpression":return"arguments"===key;default:return!1}}function isExecutionUncertainInList(paths,maxIndex){for(let i=0;ipath.node===target.node))continue;if("callee"!==path.key||!path.parentPath.isCallExpression())return"unknown";const status=_guessExecutionStatusRelativeToCached(base,path,cache);if(allStatus&&allStatus!==status)return"unknown";allStatus=status}return allStatus}(base,target,cache);return nodeMap.set(target.node,result),result}(base,funcParent.target,cache);const paths={target:target.getAncestry(),this:base.getAncestry()};if(paths.target.includes(base))return"after";if(paths.this.includes(target))return"before";let commonPath;const commonIndex={target:0,this:0};for(;!commonPath&&commonIndex.this=0?commonPath=path:commonIndex.this++}if(!commonPath)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(isExecutionUncertainInList(paths.this,commonIndex.this-1)||isExecutionUncertainInList(paths.target,commonIndex.target-1))return"unknown";const divergence={this:paths.this[commonIndex.this-1],target:paths.target[commonIndex.target-1]};if(divergence.target.listKey&&divergence.this.listKey&&divergence.target.container===divergence.this.container)return divergence.target.key>divergence.this.key?"before":"after";const keys=VISITOR_KEYS[commonPath.type],keyPosition_this=keys.indexOf(divergence.this.parentKey);return keys.indexOf(divergence.target.parentKey)>keyPosition_this?"before":"after"}function _resolve(dangerous,resolved){var _resolved;if(null==(_resolved=resolved)||!_resolved.includes(this))if((resolved=resolved||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(dangerous,resolved)}else if(this.isReferencedIdentifier()){const binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if("module"===binding.kind)return;if(binding.path!==this){const ret=binding.path.resolve(dangerous,resolved);if(this.find(parent=>parent.node===ret.node))return;return ret}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(dangerous,resolved);if(dangerous&&this.isMemberExpression()){const targetKey=this.toComputedKey();if(!isLiteral(targetKey))return;const targetName=targetKey.value,target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){const props=target.get("properties");for(const prop of props){if(!prop.isProperty())continue;const key=prop.get("key");let match=prop.isnt("computed")&&key.isIdentifier({name:targetName});if(match=match||key.isLiteral({value:targetName}),match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){const elem=target.get("elements")[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/hoister.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_t2=_t;const{react}=_t,{cloneNode,jsxExpressionContainer,variableDeclaration,variableDeclarator}=_t2,referenceVisitor={ReferencedIdentifier(path,state){if(path.isJSXIdentifier()&&react.isCompatTag(path.node.name)&&!path.parentPath.isJSXMemberExpression())return;if("this"===path.node.name){let scope=path.scope;do{if(scope.path.isFunction()&&!scope.path.isArrowFunctionExpression())break}while(scope=scope.parent);scope&&state.breakOnScopePaths.push(scope.path)}const binding=path.scope.getBinding(path.node.name);if(binding){for(const violation of binding.constantViolations)if(violation.scope!==binding.path.scope)return state.mutableBinding=!0,void path.stop();binding===state.scope.getBinding(path.node.name)&&(state.bindings[path.node.name]=binding)}}};exports.default=class{constructor(path,scope){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=scope,this.path=path,this.attachAfter=!1}isCompatibleScope(scope){for(const key of Object.keys(this.bindings)){const binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier))return!1}return!0}getCompatibleScopes(){let scope=this.path.scope;do{if(!this.isCompatibleScope(scope))break;if(this.scopes.push(scope),this.breakOnScopePaths.includes(scope.path))break}while(scope=scope.parent)}getAttachmentPath(){let path=this._getAttachmentPath();if(!path)return;let targetScope=path.scope;if(targetScope.path===path&&(targetScope=path.scope.parent),targetScope.path.isProgram()||targetScope.path.isFunction())for(const name of Object.keys(this.bindings)){if(!targetScope.hasOwnBinding(name))continue;const binding=this.bindings[name];if("param"===binding.kind||"params"===binding.path.parentKey)continue;if(this.getAttachmentParentForPath(binding.path).key>=path.key){this.attachAfter=!0,path=binding.path;for(const violationPath of binding.constantViolations)this.getAttachmentParentForPath(violationPath).key>path.key&&(path=violationPath)}}return path}_getAttachmentPath(){const scope=this.scopes.pop();if(scope)if(scope.path.isFunction()){if(!this.hasOwnParamBindings(scope))return this.getNextScopeAttachmentParent();{if(this.scope===scope)return;const bodies=scope.path.get("body").get("body");for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hooks=void 0;exports.hooks=[function(self,parent){if("test"===self.key&&(parent.isWhile()||parent.isSwitchCase())||"declaration"===self.key&&parent.isExportDeclaration()||"body"===self.key&&parent.isLabeledStatement()||"declarations"===self.listKey&&parent.isVariableDeclaration()&&1===parent.node.declarations.length||"expression"===self.key&&parent.isExpressionStatement())return parent.remove(),!0},function(self,parent){if(parent.isSequenceExpression()&&1===parent.node.expressions.length)return parent.replaceWith(parent.node.expressions[0]),!0},function(self,parent){if(parent.isBinary())return"left"===self.key?parent.replaceWith(parent.node.right):parent.replaceWith(parent.node.left),!0},function(self,parent){if(parent.isIfStatement()&&"consequent"===self.key||"body"===self.key&&(parent.isLoop()||parent.isArrowFunctionExpression()))return self.replaceWith({type:"BlockStatement",body:[]}),!0}]},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isBindingIdentifier=function(){const{node,parent}=this,grandparent=this.parentPath.parent;return isIdentifier(node)&&isBinding(node,parent,grandparent)},exports.isBlockScoped=function(){return nodeIsBlockScoped(this.node)},exports.isExpression=function(){return this.isIdentifier()?this.isReferencedIdentifier():nodeIsExpression(this.node)},exports.isFlow=function(){const{node}=this;return!!nodeIsFlow(node)||(isImportDeclaration(node)?"type"===node.importKind||"typeof"===node.importKind:isExportDeclaration(node)?"type"===node.exportKind:!!isImportSpecifier(node)&&("type"===node.importKind||"typeof"===node.importKind))},exports.isForAwaitStatement=function(){return isForOfStatement(this.node,{await:!0})},exports.isGenerated=function(){return!this.isUser()},exports.isPure=function(constantsOnly){return this.scope.isPure(this.node,constantsOnly)},exports.isReferenced=function(){return nodeIsReferenced(this.node,this.parent)},exports.isReferencedIdentifier=function(opts){const{node,parent}=this;if(!isIdentifier(node,opts)&&!isJSXMemberExpression(parent,opts)){if(!isJSXIdentifier(node,opts))return!1;if(isCompatTag(node.name))return!1}return nodeIsReferenced(node,parent,this.parentPath.parent)},exports.isReferencedMemberExpression=function(){const{node,parent}=this;return isMemberExpression(node)&&nodeIsReferenced(node,parent)},exports.isRestProperty=function(){var _this$parentPath;return nodeIsRestElement(this.node)&&(null==(_this$parentPath=this.parentPath)?void 0:_this$parentPath.isObjectPattern())},exports.isScope=function(){return nodeIsScope(this.node,this.parent)},exports.isSpreadProperty=function(){var _this$parentPath2;return nodeIsRestElement(this.node)&&(null==(_this$parentPath2=this.parentPath)?void 0:_this$parentPath2.isObjectExpression())},exports.isStatement=function(){const{node,parent}=this;if(nodeIsStatement(node)){if(isVariableDeclaration(node)){if(isForXStatement(parent,{left:node}))return!1;if(isForStatement(parent,{init:node}))return!1}return!0}return!1},exports.isUser=function(){return this.node&&!!this.node.loc},exports.isVar=function(){return nodeIsVar(this.node)};var _t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js");const{isBinding,isBlockScoped:nodeIsBlockScoped,isExportDeclaration,isExpression:nodeIsExpression,isFlow:nodeIsFlow,isForStatement,isForXStatement,isIdentifier,isImportDeclaration,isImportSpecifier,isJSXIdentifier,isJSXMemberExpression,isMemberExpression,isRestElement:nodeIsRestElement,isReferenced:nodeIsReferenced,isScope:nodeIsScope,isStatement:nodeIsStatement,isVar:nodeIsVar,isVariableDeclaration,react,isForOfStatement}=_t,{isCompatTag}=react;exports.isExistentialTypeParam=function(){throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.")},exports.isNumericLiteralTypeAnnotation=function(){throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.")}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/virtual-types.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Var=exports.User=exports.Statement=exports.SpreadProperty=exports.Scope=exports.RestProperty=exports.ReferencedMemberExpression=exports.ReferencedIdentifier=exports.Referenced=exports.Pure=exports.NumericLiteralTypeAnnotation=exports.Generated=exports.ForAwaitStatement=exports.Flow=exports.Expression=exports.ExistentialTypeParam=exports.BlockScoped=exports.BindingIdentifier=void 0;exports.ReferencedIdentifier=["Identifier","JSXIdentifier"],exports.ReferencedMemberExpression=["MemberExpression"],exports.BindingIdentifier=["Identifier"],exports.Statement=["Statement"],exports.Expression=["Expression"],exports.Scope=["Scopable","Pattern"],exports.Referenced=null,exports.BlockScoped=null,exports.Var=["VariableDeclaration"],exports.User=null,exports.Generated=null,exports.Pure=null,exports.Flow=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],exports.RestProperty=["RestElement"],exports.SpreadProperty=["RestElement"],exports.ExistentialTypeParam=["ExistsTypeAnnotation"],exports.NumericLiteralTypeAnnotation=["NumberLiteralTypeAnnotation"],exports.ForAwaitStatement=["ForOfStatement"]},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/modification.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._containerInsert=_containerInsert,exports._containerInsertAfter=_containerInsertAfter,exports._containerInsertBefore=_containerInsertBefore,exports._verifyNodeList=_verifyNodeList,exports.insertAfter=function(nodes_){if(_removal._assertUnremoved.call(this),this.isSequenceExpression())return last(this.get("expressions")).insertAfter(nodes_);const nodes=_verifyNodeList.call(this,nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertAfter(nodes.map(node=>isExpression(node)?expressionStatement(node):node));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!parentPath.isJSXElement()||parentPath.isForStatement()&&"init"===this.key){const self=this;if(self.node){const node=self.node;let{scope}=this;if(scope.path.isPattern())return assertExpression(node),self.replaceWith(callExpression(arrowFunctionExpression([],node),[])),self.get("callee.body").insertAfter(nodes),[self];if(isHiddenInSequenceExpression(self))nodes.unshift(node);else if(isCallExpression(node)&&isSuper(node.callee))nodes.unshift(node),nodes.push(thisExpression());else if(function(node,scope){if(!isAssignmentExpression(node)||!isIdentifier(node.left))return!1;const blockScope=scope.getBlockParent();return blockScope.hasOwnBinding(node.left.name)&&blockScope.getOwnBinding(node.left.name).constantViolations.length<=1}(node,scope))nodes.unshift(node),nodes.push(cloneNode(node.left));else if(scope.isPure(node,!0))nodes.push(node);else{parentPath.isMethod({computed:!0,key:node})&&(scope=scope.parent);const temp=scope.generateDeclaredUidIdentifier();nodes.unshift(expressionStatement(assignmentExpression("=",cloneNode(temp),node))),nodes.push(expressionStatement(cloneNode(temp)))}}return this.replaceExpressionWithStatements(nodes)}if(Array.isArray(this.container))return _containerInsertAfter.call(this,nodes);if(this.isStatementOrBlock()){const node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||null!=node.expression);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.pushContainer("body",nodes)}throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")},exports.insertBefore=function(nodes_){_removal._assertUnremoved.call(this);const nodes=_verifyNodeList.call(this,nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertBefore(nodes);if(this.isNodeType("Expression")&&!this.isJSXElement()||parentPath.isForStatement()&&"init"===this.key)return this.node&&nodes.push(this.node),this.replaceExpressionWithStatements(nodes);if(Array.isArray(this.container))return _containerInsertBefore.call(this,nodes);if(this.isStatementOrBlock()){const node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||null!=node.expression);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.unshiftContainer("body",nodes)}throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")},exports.pushContainer=function(listKey,nodes){_removal._assertUnremoved.call(this);const verifiedNodes=_verifyNodeList.call(this,nodes),container=this.node[listKey];return _index.default.get({parentPath:this,parent:this.node,container,listKey,key:container.length}).setContext(this.context).replaceWithMultiple(verifiedNodes)},exports.unshiftContainer=function(listKey,nodes){_removal._assertUnremoved.call(this),nodes=_verifyNodeList.call(this,nodes);const path=_index.default.get({parentPath:this,parent:this.node,container:this.node[listKey],listKey,key:0}).setContext(this.context);return _containerInsertBefore.call(path,nodes)},exports.updateSiblingKeys=updateSiblingKeys;var _cache=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js"),_removal=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/removal.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_hoister=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/hoister.js");const{arrowFunctionExpression,assertExpression,assignmentExpression,blockStatement,callExpression,cloneNode,expressionStatement,isAssignmentExpression,isCallExpression,isExportNamedDeclaration,isExpression,isIdentifier,isSequenceExpression,isSuper,thisExpression}=_t;function _containerInsert(from,nodes){updateSiblingKeys.call(this,from,nodes.length);const paths=[];this.container.splice(from,0,...nodes);for(let i=0;iarr[arr.length-1];function isHiddenInSequenceExpression(path){return isSequenceExpression(path.parent)&&(last(path.parent.expressions)!==path.node||isHiddenInSequenceExpression(path.parentPath))}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;const paths=(0,_cache.getCachedPaths)(this);if(paths)for(const[,path]of paths)"number"==typeof path.key&&path.container===this.container&&path.key>=fromIndex&&(path.key+=incrementBy)}function _verifyNodeList(nodes){if(!nodes)return[];Array.isArray(nodes)||(nodes=[nodes]);for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._assertUnremoved=_assertUnremoved,exports._callRemovalHooks=_callRemovalHooks,exports._markRemoved=_markRemoved,exports._remove=_remove,exports._removeFromScope=_removeFromScope,exports.remove=function(){var _this$opts;if(_assertUnremoved.call(this),_context.resync.call(this),_callRemovalHooks.call(this))return void _markRemoved.call(this);null!=(_this$opts=this.opts)&&_this$opts.noScope||_removeFromScope.call(this);this.shareCommentsWithSiblings(),_remove.call(this),_markRemoved.call(this)};var _removalHooks=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"),_cache=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js"),_replacement=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/replacement.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_modification=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/modification.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{getBindingIdentifiers}=_t;function _removeFromScope(){const bindings=getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(bindings).forEach(name=>this.scope.removeBinding(name))}function _callRemovalHooks(){if(this.parentPath)for(const fn of _removalHooks.hooks)if(fn(this,this.parentPath))return!0}function _remove(){Array.isArray(this.container)?(this.container.splice(this.key,1),_modification.updateSiblingKeys.call(this,this.key,-1)):_replacement._replaceWith.call(this,null)}function _markRemoved(){var _getCachedPaths;(this._traverseFlags|=_index.SHOULD_SKIP|_index.REMOVED,this.parent)&&(null==(_getCachedPaths=(0,_cache.getCachedPaths)(this))||_getCachedPaths.delete(this.node));this.node=null}function _assertUnremoved(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/replacement.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._replaceWith=_replaceWith,exports.replaceExpressionWithStatements=function(nodes){_context.resync.call(this);const declars=[],nodesAsSingleExpression=gatherSequenceExpressions(nodes,declars);if(nodesAsSingleExpression){for(const id of declars)this.scope.push({id});return this.replaceWith(nodesAsSingleExpression)[0].get("expressions")}const functionParent=this.getFunctionParent(),isParentAsync=null==functionParent?void 0:functionParent.node.async,isParentGenerator=null==functionParent?void 0:functionParent.node.generator,container=arrowFunctionExpression([],blockStatement(nodes));this.replaceWith(callExpression(container,[]));const callee=this.get("callee");callee.get("body").scope.hoistVariables(id=>this.scope.push({id}));const completionRecords=callee.getCompletionRecords();for(const path of completionRecords){if(!path.isExpressionStatement())continue;const loop=path.findParent(path=>path.isLoop());if(loop){let uid=loop.getData("expressionReplacementReturnUid");uid?uid=identifier(uid.name):(uid=callee.scope.generateDeclaredUidIdentifier("ret"),callee.get("body").pushContainer("body",returnStatement(cloneNode(uid))),loop.setData("expressionReplacementReturnUid",uid)),path.get("expression").replaceWith(assignmentExpression("=",cloneNode(uid),path.node.expression))}else path.replaceWith(returnStatement(path.node.expression))}callee.arrowFunctionToExpression();const newCallee=callee,needToAwaitFunction=isParentAsync&&_index.default.hasType(this.get("callee.body").node,"AwaitExpression",FUNCTION_TYPES),needToYieldFunction=isParentGenerator&&_index.default.hasType(this.get("callee.body").node,"YieldExpression",FUNCTION_TYPES);needToAwaitFunction&&(newCallee.set("async",!0),needToYieldFunction||this.replaceWith(awaitExpression(this.node)));needToYieldFunction&&(newCallee.set("generator",!0),this.replaceWith(yieldExpression(this.node,!0)));return newCallee.get("body.body")},exports.replaceInline=function(nodes){if(_context.resync.call(this),Array.isArray(nodes)){if(Array.isArray(this.container)){nodes=_modification._verifyNodeList.call(this,nodes);const paths=_modification._containerInsertAfter.call(this,nodes);return this.remove(),paths}return this.replaceWithMultiple(nodes)}return this.replaceWith(nodes)},exports.replaceWith=function(replacementPath){if(_context.resync.call(this),this.removed)throw new Error("You can't replace this node, we've already removed it");let replacement=replacementPath instanceof _index2.default?replacementPath.node:replacementPath;if(!replacement)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===replacement)return[this];if(this.isProgram()&&!isProgram(replacement))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(replacement))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof replacement)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let nodePath="";this.isNodeType("Statement")&&isExpression(replacement)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(replacement)||this.parentPath.isExportDefaultDeclaration()||(replacement=expressionStatement(replacement),nodePath="expression"));if(this.isNodeType("Expression")&&isStatement(replacement)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(replacement))return this.replaceExpressionWithStatements([replacement]);const oldNode=this.node;oldNode&&(inheritsComments(replacement,oldNode),removeComments(oldNode));return _replaceWith.call(this,replacement),this.type=replacement.type,_context.setScope.call(this),this.requeue(),[nodePath?this.get(nodePath):this]},exports.replaceWithMultiple=function(nodes){var _getCachedPaths;_context.resync.call(this),nodes=_modification._verifyNodeList.call(this,nodes),inheritLeadingComments(nodes[0],this.node),inheritTrailingComments(nodes[nodes.length-1],this.node),null==(_getCachedPaths=(0,_cache.getCachedPaths)(this))||_getCachedPaths.delete(this.node),this.node=this.container[this.key]=null;const paths=this.insertAfter(nodes);this.node?this.requeue():this.remove();return paths},exports.replaceWithSourceString=function(replacement){let ast;_context.resync.call(this);try{replacement=`(${replacement})`,ast=(0,_parser.parse)(replacement)}catch(err){const loc=err.loc;throw loc&&(err.message+=" - make sure this is an expression.\n"+(0,_codeFrame.codeFrameColumns)(replacement,{start:{line:loc.line,column:loc.column+1}}),err.code="BABEL_REPLACE_SOURCE_ERROR"),err}const expressionAST=ast.program.body[0].expression;return _index.default.removeProperties(expressionAST),this.replaceWith(expressionAST)};var _codeFrame=__webpack_require__("./stubs/babel-codeframe.mjs"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),_cache=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js"),_modification=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/modification.js"),_parser=__webpack_require__("./node_modules/.pnpm/@babel+parser@7.28.0/node_modules/@babel/parser/lib/index.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{FUNCTION_TYPES,arrowFunctionExpression,assignmentExpression,awaitExpression,blockStatement,buildUndefinedNode,callExpression,cloneNode,conditionalExpression,expressionStatement,getBindingIdentifiers,identifier,inheritLeadingComments,inheritTrailingComments,inheritsComments,isBlockStatement,isEmptyStatement,isExpression,isExpressionStatement,isIfStatement,isProgram,isStatement,isVariableDeclaration,removeComments,returnStatement,sequenceExpression,validate,yieldExpression}=_t;function _replaceWith(node){var _getCachedPaths2;if(!this.container)throw new ReferenceError("Container is falsy");this.inList?validate(this.parent,this.key,[node]):validate(this.parent,this.key,node),this.debug(`Replace with ${null==node?void 0:node.type}`),null==(_getCachedPaths2=(0,_cache.getCachedPaths)(this))||_getCachedPaths2.set(node,this).delete(this.node),this.node=this.container[this.key]=node}function gatherSequenceExpressions(nodes,declars){const exprs=[];let ensureLastUndefined=!0;for(const node of nodes)if(isEmptyStatement(node)||(ensureLastUndefined=!1),isExpression(node))exprs.push(node);else if(isExpressionStatement(node))exprs.push(node.expression);else if(isVariableDeclaration(node)){if("var"!==node.kind)return;for(const declar of node.declarations){const bindings=getBindingIdentifiers(declar);for(const key of Object.keys(bindings))declars.push(cloneNode(bindings[key]));declar.init&&exprs.push(assignmentExpression("=",declar.id,declar.init))}ensureLastUndefined=!0}else if(isIfStatement(node)){const consequent=node.consequent?gatherSequenceExpressions([node.consequent],declars):buildUndefinedNode(),alternate=node.alternate?gatherSequenceExpressions([node.alternate],declars):buildUndefinedNode();if(!consequent||!alternate)return;exprs.push(conditionalExpression(node.test,consequent,alternate))}else if(isBlockStatement(node)){const body=gatherSequenceExpressions(node.body,declars);if(!body)return;exprs.push(body)}else{if(!isEmptyStatement(node))return;0===nodes.indexOf(node)&&(ensureLastUndefined=!0)}return ensureLastUndefined&&exprs.push(buildUndefinedNode()),1===exprs.length?exprs[0]:sequenceExpression(exprs)}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/binding.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default=class{constructor({identifier,scope,path,kind}){this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=identifier,this.scope=scope,this.path=path,this.kind=kind,"var"!==kind&&"hoisted"!==kind||!function(path){const isFunctionDeclarationOrHasInit=!path.isVariableDeclarator()||path.node.init;for(let{parentPath,key}=path;parentPath;({parentPath,key}=parentPath)){if(parentPath.isFunctionParent())return!1;if("left"===key&&parentPath.isForXStatement()||isFunctionDeclarationOrHasInit&&"body"===key&&parentPath.isLoop())return!0}return!1}(path)||this.reassign(path),this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(value){this.hasDeoptedValue||(this.hasValue=!0,this.value=value)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(path){this.constant=!1,this.constantViolations.includes(path)||this.constantViolations.push(path)}reference(path){this.referencePaths.includes(path)||(this.referenced=!0,this.references++,this.referencePaths.push(path))}dereference(){this.references--,this.referenced=!!this.references}}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _renamer=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/lib/renamer.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/index.js"),_binding=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/binding.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),t=_t,_cache=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/cache.js");const globalsBuiltinLower=__webpack_require__("./node_modules/.pnpm/@babel+helper-globals@7.28.0/node_modules/@babel/helper-globals/data/builtin-lower.json"),globalsBuiltinUpper=__webpack_require__("./node_modules/.pnpm/@babel+helper-globals@7.28.0/node_modules/@babel/helper-globals/data/builtin-upper.json"),{assignmentExpression,callExpression,cloneNode,getBindingIdentifiers,identifier,isArrayExpression,isBinary,isCallExpression,isClass,isClassBody,isClassDeclaration,isExportAllDeclaration,isExportDefaultDeclaration,isExportNamedDeclaration,isFunctionDeclaration,isIdentifier,isImportDeclaration,isLiteral,isMemberExpression,isMethod,isModuleSpecifier,isNullLiteral,isObjectExpression,isProperty,isPureish,isRegExpLiteral,isSuper,isTaggedTemplateExpression,isTemplateLiteral,isThisExpression,isUnaryExpression,isVariableDeclaration,expressionStatement,matchesPattern,memberExpression,numericLiteral,toIdentifier,variableDeclaration,variableDeclarator,isRecordExpression,isTupleExpression,isObjectProperty,isTopicReference,isMetaProperty,isPrivateName,isExportDeclaration,buildUndefinedNode,sequenceExpression}=_t;function gatherNodeParts(node,parts){switch(null==node?void 0:node.type){default:var _node$specifiers;if(isImportDeclaration(node)||isExportDeclaration(node))if((isExportAllDeclaration(node)||isExportNamedDeclaration(node)||isImportDeclaration(node))&&node.source)gatherNodeParts(node.source,parts);else if((isExportNamedDeclaration(node)||isImportDeclaration(node))&&null!=(_node$specifiers=node.specifiers)&&_node$specifiers.length)for(const e of node.specifiers)gatherNodeParts(e,parts);else(isExportDefaultDeclaration(node)||isExportNamedDeclaration(node))&&node.declaration&&gatherNodeParts(node.declaration,parts);else isModuleSpecifier(node)?gatherNodeParts(node.local,parts):!isLiteral(node)||isNullLiteral(node)||isRegExpLiteral(node)||isTemplateLiteral(node)||parts.push(node.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":gatherNodeParts(node.object,parts),gatherNodeParts(node.property,parts);break;case"Identifier":case"JSXIdentifier":parts.push(node.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":gatherNodeParts(node.callee,parts);break;case"ObjectExpression":case"ObjectPattern":for(const e of node.properties)gatherNodeParts(e,parts);break;case"SpreadElement":case"RestElement":case"UnaryExpression":case"UpdateExpression":gatherNodeParts(node.argument,parts);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":gatherNodeParts(node.key,parts);break;case"ThisExpression":parts.push("this");break;case"Super":parts.push("super");break;case"Import":case"ImportExpression":parts.push("import");break;case"DoExpression":parts.push("do");break;case"YieldExpression":parts.push("yield"),gatherNodeParts(node.argument,parts);break;case"AwaitExpression":parts.push("await"),gatherNodeParts(node.argument,parts);break;case"AssignmentExpression":gatherNodeParts(node.left,parts);break;case"VariableDeclarator":case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":case"PrivateName":gatherNodeParts(node.id,parts);break;case"ParenthesizedExpression":gatherNodeParts(node.expression,parts);break;case"MetaProperty":gatherNodeParts(node.meta,parts),gatherNodeParts(node.property,parts);break;case"JSXElement":gatherNodeParts(node.openingElement,parts);break;case"JSXOpeningElement":gatherNodeParts(node.name,parts);break;case"JSXFragment":gatherNodeParts(node.openingFragment,parts);break;case"JSXOpeningFragment":parts.push("Fragment");break;case"JSXNamespacedName":gatherNodeParts(node.namespace,parts),gatherNodeParts(node.name,parts)}}function resetScope(scope){scope.references=Object.create(null),scope.uids=Object.create(null),scope.bindings=Object.create(null),scope.globals=Object.create(null)}var NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding");const collectorVisitor={ForStatement(path){const declar=path.get("init");if(declar.isVar()){const{scope}=path;(scope.getFunctionParent()||scope.getProgramParent()).registerBinding("var",declar)}},Declaration(path){if(path.isBlockScoped())return;if(path.isImportDeclaration())return;if(path.isExportDeclaration())return;(path.scope.getFunctionParent()||path.scope.getProgramParent()).registerDeclaration(path)},ImportDeclaration(path){path.scope.getBlockParent().registerDeclaration(path)},TSImportEqualsDeclaration(path){path.scope.getBlockParent().registerDeclaration(path)},ReferencedIdentifier(path,state){t.isTSQualifiedName(path.parent)&&path.parent.right===path.node||path.parentPath.isTSImportEqualsDeclaration()||state.references.push(path)},ForXStatement(path,state){const left=path.get("left");if(left.isPattern()||left.isIdentifier())state.constantViolations.push(path);else if(left.isVar()){const{scope}=path;(scope.getFunctionParent()||scope.getProgramParent()).registerBinding("var",left)}},ExportDeclaration:{exit(path){const{node,scope}=path;if(isExportAllDeclaration(node))return;const declar=node.declaration;if(isClassDeclaration(declar)||isFunctionDeclaration(declar)){const id=declar.id;if(!id)return;const binding=scope.getBinding(id.name);null==binding||binding.reference(path)}else if(isVariableDeclaration(declar))for(const decl of declar.declarations)for(const name of Object.keys(getBindingIdentifiers(decl))){const binding=scope.getBinding(name);null==binding||binding.reference(path)}}},LabeledStatement(path){path.scope.getBlockParent().registerDeclaration(path)},AssignmentExpression(path,state){state.assignments.push(path)},UpdateExpression(path,state){state.constantViolations.push(path)},UnaryExpression(path,state){"delete"===path.node.operator&&state.constantViolations.push(path)},BlockScoped(path){let scope=path.scope;scope.path===path&&(scope=scope.parent);if(scope.getBlockParent().registerDeclaration(path),path.isClassDeclaration()&&path.node.id){const name=path.node.id.name;path.scope.bindings[name]=path.scope.parent.getBinding(name)}},CatchClause(path){path.scope.registerBinding("let",path)},Function(path){const params=path.get("params");for(const param of params)path.scope.registerBinding("param",param);path.isFunctionExpression()&&path.node.id&&!path.node.id[NOT_LOCAL_BINDING]&&path.scope.registerBinding("local",path.get("id"),path)},ClassExpression(path){path.node.id&&!path.node.id[NOT_LOCAL_BINDING]&&path.scope.registerBinding("local",path.get("id"),path)},TSTypeAnnotation(path){path.skip()}};let scopeVisitor,uid=0;class Scope{constructor(path){this.uid=void 0,this.path=void 0,this.block=void 0,this.inited=void 0,this.labels=void 0,this.bindings=void 0,this.referencesSet=void 0,this.globals=void 0,this.uidsSet=void 0,this.data=void 0,this.crawling=void 0;const{node}=path,cached=_cache.scope.get(node);if((null==cached?void 0:cached.path)===path)return cached;_cache.scope.set(node,this),this.uid=uid++,this.block=node,this.path=path,this.labels=new Map,this.inited=!1,Object.defineProperties(this,{references:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)},uids:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)}})}get parent(){var _parent;let parent,path=this.path;do{var _path;const shouldSkip="key"===path.key||"decorators"===path.listKey;path=path.parentPath,shouldSkip&&path.isMethod()&&(path=path.parentPath),null!=(_path=path)&&_path.isScope()&&(parent=path)}while(path&&!parent);return null==(_parent=parent)?void 0:_parent.scope}get references(){throw new Error("Scope#references is not available in Babel 8. Use Scope#referencesSet instead.")}get uids(){throw new Error("Scope#uids is not available in Babel 8. Use Scope#uidsSet instead.")}generateDeclaredUidIdentifier(name){const id=this.generateUidIdentifier(name);return this.push({id}),cloneNode(id)}generateUidIdentifier(name){return identifier(this.generateUid(name))}generateUid(name="temp"){let uid;name=toIdentifier(name).replace(/^_+/,"").replace(/\d+$/g,"");let i=0;do{uid=`_${name}`,i>=11?uid+=i-1:i>=9?uid+=i-9:i>=1&&(uid+=i+1),i++}while(this.hasLabel(uid)||this.hasBinding(uid)||this.hasGlobal(uid)||this.hasReference(uid));const program=this.getProgramParent();return program.references[uid]=!0,program.uids[uid]=!0,uid}generateUidBasedOnNode(node,defaultName){const parts=[];gatherNodeParts(node,parts);let id=parts.join("$");return id=id.replace(/^_/,"")||defaultName||"ref",this.generateUid(id.slice(0,20))}generateUidIdentifierBasedOnNode(node,defaultName){return identifier(this.generateUidBasedOnNode(node,defaultName))}isStatic(node){if(isThisExpression(node)||isSuper(node)||isTopicReference(node))return!0;if(isIdentifier(node)){const binding=this.getBinding(node.name);return binding?binding.constant:this.hasBinding(node.name)}return!1}maybeGenerateMemoised(node,dontPush){if(this.isStatic(node))return null;{const id=this.generateUidIdentifierBasedOnNode(node);return dontPush?id:(this.push({id}),cloneNode(id))}}checkBlockScopedCollisions(local,kind,name,id){if("param"===kind)return;if("local"===local.kind)return;if("let"===kind||"let"===local.kind||"const"===local.kind||"module"===local.kind||"param"===local.kind&&"const"===kind)throw this.path.hub.buildError(id,`Duplicate declaration "${name}"`,TypeError)}rename(oldName,newName){const binding=this.getBinding(oldName);if(binding){newName||(newName=this.generateUidIdentifier(oldName).name);new _renamer.default(binding,oldName,newName).rename(arguments[2])}}dump(){const sep="-".repeat(60);console.log(sep);let scope=this;do{console.log("#",scope.block.type);for(const name of Object.keys(scope.bindings)){const binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references,violations:binding.constantViolations.length,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)}hasLabel(name){return!!this.getLabel(name)}getLabel(name){return this.labels.get(name)}registerLabel(path){this.labels.set(path.node.label.name,path)}registerDeclaration(path){if(path.isLabeledStatement())this.registerLabel(path);else if(path.isFunctionDeclaration())this.registerBinding("hoisted",path.get("id"),path);else if(path.isVariableDeclaration()){const declarations=path.get("declarations"),{kind}=path.node;for(const declar of declarations)this.registerBinding("using"===kind||"await using"===kind?"const":kind,declar)}else if(path.isClassDeclaration()){if(path.node.declare)return;this.registerBinding("let",path)}else if(path.isImportDeclaration()){const isTypeDeclaration="type"===path.node.importKind||"typeof"===path.node.importKind,specifiers=path.get("specifiers");for(const specifier of specifiers){const isTypeSpecifier=isTypeDeclaration||specifier.isImportSpecifier()&&("type"===specifier.node.importKind||"typeof"===specifier.node.importKind);this.registerBinding(isTypeSpecifier?"unknown":"module",specifier)}}else if(path.isExportDeclaration()){const declar=path.get("declaration");(declar.isClassDeclaration()||declar.isFunctionDeclaration()||declar.isVariableDeclaration())&&this.registerDeclaration(declar)}else this.registerBinding("unknown",path)}buildUndefinedNode(){return buildUndefinedNode()}registerConstantViolation(path){const ids=path.getAssignmentIdentifiers();for(const name of Object.keys(ids)){var _this$getBinding;null==(_this$getBinding=this.getBinding(name))||_this$getBinding.reassign(path)}}registerBinding(kind,path,bindingPath=path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){const declarators=path.get("declarations");for(const declar of declarators)this.registerBinding(kind,declar);return}const parent=this.getProgramParent(),ids=path.getOuterBindingIdentifiers(!0);for(const name of Object.keys(ids)){parent.references[name]=!0;for(const id of ids[name]){const local=this.getOwnBinding(name);if(local){if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}local?local.reassign(bindingPath):this.bindings[name]=new _binding.default({identifier:id,scope:this,path:bindingPath,kind})}}}addGlobal(node){this.globals[node.name]=node}hasUid(name){{let scope=this;do{if(scope.uids[name])return!0}while(scope=scope.parent);return!1}}hasGlobal(name){let scope=this;do{if(scope.globals[name])return!0}while(scope=scope.parent);return!1}hasReference(name){return!!this.getProgramParent().references[name]}isPure(node,constantsOnly){if(isIdentifier(node)){const binding=this.getBinding(node.name);return!!binding&&(!constantsOnly||binding.constant)}if(isThisExpression(node)||isMetaProperty(node)||isTopicReference(node)||isPrivateName(node))return!0;var _node$decorators,_node$decorators2,_node$decorators3;if(isClass(node))return!(node.superClass&&!this.isPure(node.superClass,constantsOnly))&&(!((null==(_node$decorators=node.decorators)?void 0:_node$decorators.length)>0)&&this.isPure(node.body,constantsOnly));if(isClassBody(node)){for(const method of node.body)if(!this.isPure(method,constantsOnly))return!1;return!0}if(isBinary(node))return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly);if(isArrayExpression(node)||isTupleExpression(node)){for(const elem of node.elements)if(null!==elem&&!this.isPure(elem,constantsOnly))return!1;return!0}if(isObjectExpression(node)||isRecordExpression(node)){for(const prop of node.properties)if(!this.isPure(prop,constantsOnly))return!1;return!0}if(isMethod(node))return!(node.computed&&!this.isPure(node.key,constantsOnly))&&!((null==(_node$decorators2=node.decorators)?void 0:_node$decorators2.length)>0);if(isProperty(node))return!(node.computed&&!this.isPure(node.key,constantsOnly))&&(!((null==(_node$decorators3=node.decorators)?void 0:_node$decorators3.length)>0)&&!((isObjectProperty(node)||node.static)&&null!==node.value&&!this.isPure(node.value,constantsOnly)));if(isUnaryExpression(node))return this.isPure(node.argument,constantsOnly);if(isTemplateLiteral(node)){for(const expression of node.expressions)if(!this.isPure(expression,constantsOnly))return!1;return!0}return isTaggedTemplateExpression(node)?matchesPattern(node.tag,"String.raw")&&!this.hasBinding("String",{noGlobals:!0})&&this.isPure(node.quasi,constantsOnly):isMemberExpression(node)?!node.computed&&isIdentifier(node.object)&&"Symbol"===node.object.name&&isIdentifier(node.property)&&"for"!==node.property.name&&!this.hasBinding("Symbol",{noGlobals:!0}):isCallExpression(node)?matchesPattern(node.callee,"Symbol.for")&&!this.hasBinding("Symbol",{noGlobals:!0})&&1===node.arguments.length&&t.isStringLiteral(node.arguments[0]):isPureish(node)}setData(key,val){return this.data[key]=val}getData(key){let scope=this;do{const data=scope.data[key];if(null!=data)return data}while(scope=scope.parent)}removeData(key){let scope=this;do{null!=scope.data[key]&&(scope.data[key]=null)}while(scope=scope.parent)}init(){this.inited||(this.inited=!0,this.crawl())}crawl(){const path=this.path;resetScope(this),this.data=Object.create(null);let scope=this;do{if(scope.crawling)return;if(scope.path.isProgram())break}while(scope=scope.parent);const programParent=scope,state={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,scopeVisitor||(scopeVisitor=_index.default.visitors.merge([{Scope(path){resetScope(path.scope)}},collectorVisitor])),"Program"!==path.type){for(const visit of scopeVisitor.enter)visit.call(state,path,state);const typeVisitors=scopeVisitor[path.type];if(typeVisitors)for(const visit of typeVisitors.enter)visit.call(state,path,state)}path.traverse(scopeVisitor,state),this.crawling=!1;for(const path of state.assignments){const ids=path.getAssignmentIdentifiers();for(const name of Object.keys(ids))path.scope.getBinding(name)||programParent.addGlobal(ids[name]);path.scope.registerConstantViolation(path)}for(const ref of state.references){const binding=ref.scope.getBinding(ref.node.name);binding?binding.reference(ref):programParent.addGlobal(ref.node)}for(const path of state.constantViolations)path.scope.registerConstantViolation(path)}push(opts){let path=this.path;path.isPattern()?path=this.getPatternParent().path:path.isBlockStatement()||path.isProgram()||(path=this.getBlockParent().path),path.isSwitchStatement()&&(path=(this.getFunctionParent()||this.getProgramParent()).path);const{init,unique,kind="var",id}=opts;if(!init&&!unique&&("var"===kind||"let"===kind)&&path.isFunction()&&!path.node.name&&isCallExpression(path.parent,{callee:path.node})&&path.parent.arguments.length<=path.node.params.length&&isIdentifier(id))return path.pushContainer("params",id),void path.scope.registerBinding("param",path.get("params")[path.node.params.length-1]);(path.isLoop()||path.isCatchClause()||path.isFunction())&&(path.ensureBlock(),path=path.get("body"));const blockHoist=null==opts._blockHoist?2:opts._blockHoist,dataKey=`declaration:${kind}:${blockHoist}`;let declarPath=!unique&&path.getData(dataKey);if(!declarPath){const declar=variableDeclaration(kind,[]);declar._blockHoist=blockHoist,[declarPath]=path.unshiftContainer("body",[declar]),unique||path.setData(dataKey,declarPath)}const declarator=variableDeclarator(id,init),len=declarPath.node.declarations.push(declarator);path.scope.registerBinding(kind,declarPath.get("declarations")[len-1])}getProgramParent(){let scope=this;do{if(scope.path.isProgram())return scope}while(scope=scope.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let scope=this;do{if(scope.path.isFunctionParent())return scope}while(scope=scope.parent);return null}getBlockParent(){let scope=this;do{if(scope.path.isBlockParent())return scope}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getPatternParent(){let scope=this;do{if(!scope.path.isPattern())return scope.getBlockParent()}while(scope=scope.parent.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){const ids=Object.create(null);let scope=this;do{for(const key of Object.keys(scope.bindings))key in ids==!1&&(ids[key]=scope.bindings[key]);scope=scope.parent}while(scope);return ids}bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node}getBinding(name){let previousPath,scope=this;do{const binding=scope.getOwnBinding(name);var _previousPath;if(binding){if(null==(_previousPath=previousPath)||!_previousPath.isPattern()||"param"===binding.kind||"local"===binding.kind)return binding}else if(!binding&&"arguments"===name&&scope.path.isFunction()&&!scope.path.isArrowFunctionExpression())break;previousPath=scope.path}while(scope=scope.parent)}getOwnBinding(name){return this.bindings[name]}getBindingIdentifier(name){var _this$getBinding2;return null==(_this$getBinding2=this.getBinding(name))?void 0:_this$getBinding2.identifier}getOwnBindingIdentifier(name){const binding=this.bindings[name];return null==binding?void 0:binding.identifier}hasOwnBinding(name){return!!this.getOwnBinding(name)}hasBinding(name,opts){if(!name)return!1;let noGlobals,noUids,upToScope;"object"==typeof opts?(noGlobals=opts.noGlobals,noUids=opts.noUids,upToScope=opts.upToScope):"boolean"==typeof opts&&(noGlobals=opts);let scope=this;do{if(upToScope===scope)break;if(scope.hasOwnBinding(name))return!0}while(scope=scope.parent);return!(noUids||!this.hasUid(name))||(!(noGlobals||!Scope.globals.includes(name))||!(noGlobals||!Scope.contextVariables.includes(name)))}parentHasBinding(name,opts){var _this$parent;return null==(_this$parent=this.parent)?void 0:_this$parent.hasBinding(name,opts)}moveBindingTo(name,scope){const info=this.getBinding(name);info&&(info.scope.removeOwnBinding(name),info.scope=scope,scope.bindings[name]=info)}removeOwnBinding(name){delete this.bindings[name]}removeBinding(name){var _this$getBinding3;null==(_this$getBinding3=this.getBinding(name))||_this$getBinding3.scope.removeOwnBinding(name);{let scope=this;do{scope.uids[name]&&(scope.uids[name]=!1)}while(scope=scope.parent)}}hoistVariables(emit=id=>this.push({id})){this.crawl();const seen=new Set;for(const name of Object.keys(this.bindings)){const binding=this.bindings[name];if(!binding)continue;const{path}=binding;if(!path.isVariableDeclarator())continue;const{parent,parentPath}=path;if("var"!==parent.kind||seen.has(parent))continue;let firstId;seen.add(path.parent);const init=[];for(const decl of parent.declarations){null!=firstId||(firstId=decl.id),decl.init&&init.push(assignmentExpression("=",decl.id,decl.init));const ids=Object.keys(getBindingIdentifiers(decl,!1,!0,!0));for(const name of ids)emit(identifier(name),null!=decl.init)}if(parentPath.parentPath.isFor({left:parent}))parentPath.replaceWith(firstId);else if(0===init.length)parentPath.remove();else{const expr=1===init.length?init[0]:sequenceExpression(init);parentPath.parentPath.isForStatement({init:parent})?parentPath.replaceWith(expr):parentPath.replaceWith(expressionStatement(expr))}}}}exports.default=Scope,Scope.globals=[...globalsBuiltinLower,...globalsBuiltinUpper],Scope.contextVariables=["arguments","undefined","Infinity","NaN"],Scope.prototype._renameFromMap=function(map,oldName,newName,value){map[oldName]&&(map[newName]=value,map[oldName]=null)},Scope.prototype.traverse=function(node,opts,state){(0,_index.default)(node,opts,this,state,this.path)},Scope.prototype._generateUid=function(name,i){let id=name;return i>1&&(id+=i),`_${id}`},Scope.prototype.toArray=function(node,i,arrayLikeIsIterable){if(isIdentifier(node)){const binding=this.getBinding(node.name);if(null!=binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(isArrayExpression(node))return node;if(isIdentifier(node,{name:"arguments"}))return callExpression(memberExpression(memberExpression(memberExpression(identifier("Array"),identifier("prototype")),identifier("slice")),identifier("call")),[node]);let helperName;const args=[node];return!0===i?helperName="toConsumableArray":"number"==typeof i?(args.push(numericLiteral(i)),helperName="slicedToArray"):helperName="toArray",arrayLikeIsIterable&&(args.unshift(this.path.hub.addHelper(helperName)),helperName="maybeArrayLike"),callExpression(this.path.hub.addHelper(helperName),args)},Scope.prototype.getAllBindingsOfKind=function(...kinds){const ids=Object.create(null);for(const kind of kinds){let scope=this;do{for(const name of Object.keys(scope.bindings)){const binding=scope.bindings[name];binding.kind===kind&&(ids[name]=binding)}scope=scope.parent}while(scope)}return ids},Object.defineProperties(Scope.prototype,{parentBlock:{configurable:!0,enumerable:!0,get(){return this.path.parent}},hub:{configurable:!0,enumerable:!0,get(){return this.path.hub}}})},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/scope/lib/renamer.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_t=t,_traverseNode=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/traverse-node.js"),_visitors=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/visitors.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{getAssignmentIdentifiers}=_t,renameVisitor={ReferencedIdentifier({node},state){node.name===state.oldName&&(node.name=state.newName)},Scope(path,state){path.scope.bindingIdentifierEquals(state.oldName,state.binding.identifier)||(path.skip(),path.isMethod()&&(path.requeueComputedKeyAndDecorators?path.requeueComputedKeyAndDecorators():_context.requeueComputedKeyAndDecorators.call(path)))},ObjectProperty({node,scope},state){const{name}=node.key;var _node$extra;!node.shorthand||name!==state.oldName&&name!==state.newName||scope.getBindingIdentifier(name)!==state.binding.identifier||(node.shorthand=!1,null!=(_node$extra=node.extra)&&_node$extra.shorthand&&(node.extra.shorthand=!1))},"AssignmentExpression|Declaration|VariableDeclarator"(path,state){if(path.isVariableDeclaration())return;const ids=path.isAssignmentExpression()?getAssignmentIdentifiers(path.node):path.getOuterBindingIdentifiers();for(const name in ids)name===state.oldName&&(ids[name].name=state.newName)}};exports.default=class{constructor(binding,oldName,newName){this.newName=newName,this.oldName=oldName,this.binding=binding}maybeConvertFromExportDeclaration(parentDeclar){const maybeExportDeclar=parentDeclar.parentPath;if(maybeExportDeclar.isExportDeclaration()){if(maybeExportDeclar.isExportDefaultDeclaration()){const{declaration}=maybeExportDeclar.node;if(t.isDeclaration(declaration)&&!declaration.id)return}maybeExportDeclar.isExportAllDeclaration()||maybeExportDeclar.splitExportDeclaration()}}maybeConvertFromClassFunctionDeclaration(path){return path}maybeConvertFromClassFunctionExpression(path){return path}rename(){const{binding,oldName,newName}=this,{scope,path}=binding,parentDeclar=path.find(path=>path.isDeclaration()||path.isFunctionExpression()||path.isClassExpression());if(parentDeclar){parentDeclar.getOuterBindingIdentifiers()[oldName]===binding.identifier&&this.maybeConvertFromExportDeclaration(parentDeclar)}const blockToTraverse=arguments[0]||scope.block,skipKeys={discriminant:!0};t.isMethod(blockToTraverse)&&(blockToTraverse.computed&&(skipKeys.key=!0),t.isObjectMethod(blockToTraverse)||(skipKeys.decorators=!0)),(0,_traverseNode.traverseNode)(blockToTraverse,(0,_visitors.explode)(renameVisitor),scope,this,scope.path,skipKeys),arguments[0]||(scope.removeOwnBinding(oldName),scope.bindings[newName]=binding,this.binding.identifier.name=newName),parentDeclar&&(this.maybeConvertFromClassFunctionDeclaration(path),this.maybeConvertFromClassFunctionExpression(path))}}},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/traverse-node.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.traverseNode=function(node,opts,scope,state,path,skipKeys,visitSelf){const keys=VISITOR_KEYS[node.type];if(!keys)return!1;const context=new _context.default(scope,opts,state,path);if(visitSelf)return(null==skipKeys||!skipKeys[path.parentKey])&&context.visitQueue([path]);for(const key of keys)if((null==skipKeys||!skipKeys[key])&&context.visit(node,key))return!0;return!1};var _context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/context.js"),_t=(__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/index.js"),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"));__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{VISITOR_KEYS}=_t},"./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/visitors.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.environmentVisitor=function(visitor){return merge([_environmentVisitor,visitor])},exports.explode=explode$1,exports.isExplodedVisitor=isExplodedVisitor,exports.merge=merge,exports.verify=verify$1;var virtualTypes=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/virtual-types.js"),virtualTypesValidators=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/lib/virtual-types-validator.js"),_t=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js"),_context=__webpack_require__("./node_modules/.pnpm/@babel+traverse@7.28.0/node_modules/@babel/traverse/lib/path/context.js");const{DEPRECATED_KEYS,DEPRECATED_ALIASES,FLIPPED_ALIAS_KEYS,TYPES,__internal__deprecationWarning:deprecationWarning}=_t;function isVirtualType(type){return type in virtualTypes}function isExplodedVisitor(visitor){return null==visitor?void 0:visitor._exploded}function explode$1(visitor){if(isExplodedVisitor(visitor))return visitor;visitor._exploded=!0;for(const nodeType of Object.keys(visitor)){if(shouldIgnoreKey(nodeType))continue;const parts=nodeType.split("|");if(1===parts.length)continue;const fns=visitor[nodeType];delete visitor[nodeType];for(const part of parts)visitor[part]=fns}verify$1(visitor),delete visitor.__esModule,function(obj){for(const key of Object.keys(obj)){if(shouldIgnoreKey(key))continue;const fns=obj[key];"function"==typeof fns&&(obj[key]={enter:fns})}}(visitor),ensureCallbackArrays(visitor);for(const nodeType of Object.keys(visitor)){if(shouldIgnoreKey(nodeType))continue;if(!isVirtualType(nodeType))continue;const fns=visitor[nodeType];for(const type of Object.keys(fns))fns[type]=wrapCheck(nodeType,fns[type]);delete visitor[nodeType];const types=virtualTypes[nodeType];if(null!==types)for(const type of types)visitor[type]?mergePair(visitor[type],fns):visitor[type]=fns;else mergePair(visitor,fns)}for(const nodeType of Object.keys(visitor)){if(shouldIgnoreKey(nodeType))continue;let aliases=FLIPPED_ALIAS_KEYS[nodeType];if(nodeType in DEPRECATED_KEYS){const deprecatedKey=DEPRECATED_KEYS[nodeType];deprecationWarning(nodeType,deprecatedKey,"Visitor "),aliases=[deprecatedKey]}else if(nodeType in DEPRECATED_ALIASES){const deprecatedAlias=DEPRECATED_ALIASES[nodeType];deprecationWarning(nodeType,deprecatedAlias,"Visitor "),aliases=FLIPPED_ALIAS_KEYS[deprecatedAlias]}if(!aliases)continue;const fns=visitor[nodeType];delete visitor[nodeType];for(const alias of aliases){const existing=visitor[alias];existing?mergePair(existing,fns):visitor[alias]=Object.assign({},fns)}}for(const nodeType of Object.keys(visitor))shouldIgnoreKey(nodeType)||ensureCallbackArrays(visitor[nodeType]);return visitor}function verify$1(visitor){if(!visitor._verified){if("function"==typeof visitor)throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");for(const nodeType of Object.keys(visitor)){if("enter"!==nodeType&&"exit"!==nodeType||validateVisitorMethods(nodeType,visitor[nodeType]),shouldIgnoreKey(nodeType))continue;if(!TYPES.includes(nodeType))throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse 7.28.0`);const visitors=visitor[nodeType];if("object"==typeof visitors)for(const visitorKey of Object.keys(visitors)){if("enter"!==visitorKey&&"exit"!==visitorKey)throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);validateVisitorMethods(`${nodeType}.${visitorKey}`,visitors[visitorKey])}}visitor._verified=!0}}function validateVisitorMethods(path,val){const fns=[].concat(val);for(const fn of fns)if("function"!=typeof fn)throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`)}function merge(visitors,states=[],wrapper){const mergedVisitor={_verified:!0,_exploded:!0};Object.defineProperty(mergedVisitor,"_exploded",{enumerable:!1}),Object.defineProperty(mergedVisitor,"_verified",{enumerable:!1});for(let i=0;ifn.toString()),newFn}),newVisitor[phase]=fns)}return newVisitor}function ensureCallbackArrays(obj){obj.enter&&!Array.isArray(obj.enter)&&(obj.enter=[obj.enter]),obj.exit&&!Array.isArray(obj.exit)&&(obj.exit=[obj.exit])}function wrapCheck(nodeType,fn){const validator=virtualTypesValidators[`is${nodeType}`],newFn=function(path){if(validator.call(path))return fn.apply(this,arguments)};return newFn.toString=()=>fn.toString(),newFn}function shouldIgnoreKey(key){return"_"===key[0]||("enter"===key||"exit"===key||"shouldSkip"===key||("denylist"===key||"noScope"===key||"skipKeys"===key||"blacklist"===key))}function mergePair(dest,src){for(const phase of["enter","exit"])src[phase]&&(dest[phase]=[].concat(dest[phase]||[],src[phase]))}const _environmentVisitor={FunctionParent(path){path.isArrowFunctionExpression()||(path.skip(),path.isMethod()&&(path.requeueComputedKeyAndDecorators?path.requeueComputedKeyAndDecorators():_context.requeueComputedKeyAndDecorators.call(path)))},Property(path){path.isObjectProperty()||(path.skip(),path.requeueComputedKeyAndDecorators?path.requeueComputedKeyAndDecorators():_context.requeueComputedKeyAndDecorators.call(path))}}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/asserts/assertNode.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){if(!(0,_isNode.default)(node)){var _node$type;const type=null!=(_node$type=null==node?void 0:node.type)?_node$type:JSON.stringify(node);throw new TypeError(`Not a valid node of type "${type}"`)}};var _isNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isNode.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/asserts/generated/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assertAccessor=function(node,opts){assert("Accessor",node,opts)},exports.assertAnyTypeAnnotation=function(node,opts){assert("AnyTypeAnnotation",node,opts)},exports.assertArgumentPlaceholder=function(node,opts){assert("ArgumentPlaceholder",node,opts)},exports.assertArrayExpression=function(node,opts){assert("ArrayExpression",node,opts)},exports.assertArrayPattern=function(node,opts){assert("ArrayPattern",node,opts)},exports.assertArrayTypeAnnotation=function(node,opts){assert("ArrayTypeAnnotation",node,opts)},exports.assertArrowFunctionExpression=function(node,opts){assert("ArrowFunctionExpression",node,opts)},exports.assertAssignmentExpression=function(node,opts){assert("AssignmentExpression",node,opts)},exports.assertAssignmentPattern=function(node,opts){assert("AssignmentPattern",node,opts)},exports.assertAwaitExpression=function(node,opts){assert("AwaitExpression",node,opts)},exports.assertBigIntLiteral=function(node,opts){assert("BigIntLiteral",node,opts)},exports.assertBinary=function(node,opts){assert("Binary",node,opts)},exports.assertBinaryExpression=function(node,opts){assert("BinaryExpression",node,opts)},exports.assertBindExpression=function(node,opts){assert("BindExpression",node,opts)},exports.assertBlock=function(node,opts){assert("Block",node,opts)},exports.assertBlockParent=function(node,opts){assert("BlockParent",node,opts)},exports.assertBlockStatement=function(node,opts){assert("BlockStatement",node,opts)},exports.assertBooleanLiteral=function(node,opts){assert("BooleanLiteral",node,opts)},exports.assertBooleanLiteralTypeAnnotation=function(node,opts){assert("BooleanLiteralTypeAnnotation",node,opts)},exports.assertBooleanTypeAnnotation=function(node,opts){assert("BooleanTypeAnnotation",node,opts)},exports.assertBreakStatement=function(node,opts){assert("BreakStatement",node,opts)},exports.assertCallExpression=function(node,opts){assert("CallExpression",node,opts)},exports.assertCatchClause=function(node,opts){assert("CatchClause",node,opts)},exports.assertClass=function(node,opts){assert("Class",node,opts)},exports.assertClassAccessorProperty=function(node,opts){assert("ClassAccessorProperty",node,opts)},exports.assertClassBody=function(node,opts){assert("ClassBody",node,opts)},exports.assertClassDeclaration=function(node,opts){assert("ClassDeclaration",node,opts)},exports.assertClassExpression=function(node,opts){assert("ClassExpression",node,opts)},exports.assertClassImplements=function(node,opts){assert("ClassImplements",node,opts)},exports.assertClassMethod=function(node,opts){assert("ClassMethod",node,opts)},exports.assertClassPrivateMethod=function(node,opts){assert("ClassPrivateMethod",node,opts)},exports.assertClassPrivateProperty=function(node,opts){assert("ClassPrivateProperty",node,opts)},exports.assertClassProperty=function(node,opts){assert("ClassProperty",node,opts)},exports.assertCompletionStatement=function(node,opts){assert("CompletionStatement",node,opts)},exports.assertConditional=function(node,opts){assert("Conditional",node,opts)},exports.assertConditionalExpression=function(node,opts){assert("ConditionalExpression",node,opts)},exports.assertContinueStatement=function(node,opts){assert("ContinueStatement",node,opts)},exports.assertDebuggerStatement=function(node,opts){assert("DebuggerStatement",node,opts)},exports.assertDecimalLiteral=function(node,opts){assert("DecimalLiteral",node,opts)},exports.assertDeclaration=function(node,opts){assert("Declaration",node,opts)},exports.assertDeclareClass=function(node,opts){assert("DeclareClass",node,opts)},exports.assertDeclareExportAllDeclaration=function(node,opts){assert("DeclareExportAllDeclaration",node,opts)},exports.assertDeclareExportDeclaration=function(node,opts){assert("DeclareExportDeclaration",node,opts)},exports.assertDeclareFunction=function(node,opts){assert("DeclareFunction",node,opts)},exports.assertDeclareInterface=function(node,opts){assert("DeclareInterface",node,opts)},exports.assertDeclareModule=function(node,opts){assert("DeclareModule",node,opts)},exports.assertDeclareModuleExports=function(node,opts){assert("DeclareModuleExports",node,opts)},exports.assertDeclareOpaqueType=function(node,opts){assert("DeclareOpaqueType",node,opts)},exports.assertDeclareTypeAlias=function(node,opts){assert("DeclareTypeAlias",node,opts)},exports.assertDeclareVariable=function(node,opts){assert("DeclareVariable",node,opts)},exports.assertDeclaredPredicate=function(node,opts){assert("DeclaredPredicate",node,opts)},exports.assertDecorator=function(node,opts){assert("Decorator",node,opts)},exports.assertDirective=function(node,opts){assert("Directive",node,opts)},exports.assertDirectiveLiteral=function(node,opts){assert("DirectiveLiteral",node,opts)},exports.assertDoExpression=function(node,opts){assert("DoExpression",node,opts)},exports.assertDoWhileStatement=function(node,opts){assert("DoWhileStatement",node,opts)},exports.assertEmptyStatement=function(node,opts){assert("EmptyStatement",node,opts)},exports.assertEmptyTypeAnnotation=function(node,opts){assert("EmptyTypeAnnotation",node,opts)},exports.assertEnumBody=function(node,opts){assert("EnumBody",node,opts)},exports.assertEnumBooleanBody=function(node,opts){assert("EnumBooleanBody",node,opts)},exports.assertEnumBooleanMember=function(node,opts){assert("EnumBooleanMember",node,opts)},exports.assertEnumDeclaration=function(node,opts){assert("EnumDeclaration",node,opts)},exports.assertEnumDefaultedMember=function(node,opts){assert("EnumDefaultedMember",node,opts)},exports.assertEnumMember=function(node,opts){assert("EnumMember",node,opts)},exports.assertEnumNumberBody=function(node,opts){assert("EnumNumberBody",node,opts)},exports.assertEnumNumberMember=function(node,opts){assert("EnumNumberMember",node,opts)},exports.assertEnumStringBody=function(node,opts){assert("EnumStringBody",node,opts)},exports.assertEnumStringMember=function(node,opts){assert("EnumStringMember",node,opts)},exports.assertEnumSymbolBody=function(node,opts){assert("EnumSymbolBody",node,opts)},exports.assertExistsTypeAnnotation=function(node,opts){assert("ExistsTypeAnnotation",node,opts)},exports.assertExportAllDeclaration=function(node,opts){assert("ExportAllDeclaration",node,opts)},exports.assertExportDeclaration=function(node,opts){assert("ExportDeclaration",node,opts)},exports.assertExportDefaultDeclaration=function(node,opts){assert("ExportDefaultDeclaration",node,opts)},exports.assertExportDefaultSpecifier=function(node,opts){assert("ExportDefaultSpecifier",node,opts)},exports.assertExportNamedDeclaration=function(node,opts){assert("ExportNamedDeclaration",node,opts)},exports.assertExportNamespaceSpecifier=function(node,opts){assert("ExportNamespaceSpecifier",node,opts)},exports.assertExportSpecifier=function(node,opts){assert("ExportSpecifier",node,opts)},exports.assertExpression=function(node,opts){assert("Expression",node,opts)},exports.assertExpressionStatement=function(node,opts){assert("ExpressionStatement",node,opts)},exports.assertExpressionWrapper=function(node,opts){assert("ExpressionWrapper",node,opts)},exports.assertFile=function(node,opts){assert("File",node,opts)},exports.assertFlow=function(node,opts){assert("Flow",node,opts)},exports.assertFlowBaseAnnotation=function(node,opts){assert("FlowBaseAnnotation",node,opts)},exports.assertFlowDeclaration=function(node,opts){assert("FlowDeclaration",node,opts)},exports.assertFlowPredicate=function(node,opts){assert("FlowPredicate",node,opts)},exports.assertFlowType=function(node,opts){assert("FlowType",node,opts)},exports.assertFor=function(node,opts){assert("For",node,opts)},exports.assertForInStatement=function(node,opts){assert("ForInStatement",node,opts)},exports.assertForOfStatement=function(node,opts){assert("ForOfStatement",node,opts)},exports.assertForStatement=function(node,opts){assert("ForStatement",node,opts)},exports.assertForXStatement=function(node,opts){assert("ForXStatement",node,opts)},exports.assertFunction=function(node,opts){assert("Function",node,opts)},exports.assertFunctionDeclaration=function(node,opts){assert("FunctionDeclaration",node,opts)},exports.assertFunctionExpression=function(node,opts){assert("FunctionExpression",node,opts)},exports.assertFunctionParameter=function(node,opts){assert("FunctionParameter",node,opts)},exports.assertFunctionParent=function(node,opts){assert("FunctionParent",node,opts)},exports.assertFunctionTypeAnnotation=function(node,opts){assert("FunctionTypeAnnotation",node,opts)},exports.assertFunctionTypeParam=function(node,opts){assert("FunctionTypeParam",node,opts)},exports.assertGenericTypeAnnotation=function(node,opts){assert("GenericTypeAnnotation",node,opts)},exports.assertIdentifier=function(node,opts){assert("Identifier",node,opts)},exports.assertIfStatement=function(node,opts){assert("IfStatement",node,opts)},exports.assertImmutable=function(node,opts){assert("Immutable",node,opts)},exports.assertImport=function(node,opts){assert("Import",node,opts)},exports.assertImportAttribute=function(node,opts){assert("ImportAttribute",node,opts)},exports.assertImportDeclaration=function(node,opts){assert("ImportDeclaration",node,opts)},exports.assertImportDefaultSpecifier=function(node,opts){assert("ImportDefaultSpecifier",node,opts)},exports.assertImportExpression=function(node,opts){assert("ImportExpression",node,opts)},exports.assertImportNamespaceSpecifier=function(node,opts){assert("ImportNamespaceSpecifier",node,opts)},exports.assertImportOrExportDeclaration=function(node,opts){assert("ImportOrExportDeclaration",node,opts)},exports.assertImportSpecifier=function(node,opts){assert("ImportSpecifier",node,opts)},exports.assertIndexedAccessType=function(node,opts){assert("IndexedAccessType",node,opts)},exports.assertInferredPredicate=function(node,opts){assert("InferredPredicate",node,opts)},exports.assertInterfaceDeclaration=function(node,opts){assert("InterfaceDeclaration",node,opts)},exports.assertInterfaceExtends=function(node,opts){assert("InterfaceExtends",node,opts)},exports.assertInterfaceTypeAnnotation=function(node,opts){assert("InterfaceTypeAnnotation",node,opts)},exports.assertInterpreterDirective=function(node,opts){assert("InterpreterDirective",node,opts)},exports.assertIntersectionTypeAnnotation=function(node,opts){assert("IntersectionTypeAnnotation",node,opts)},exports.assertJSX=function(node,opts){assert("JSX",node,opts)},exports.assertJSXAttribute=function(node,opts){assert("JSXAttribute",node,opts)},exports.assertJSXClosingElement=function(node,opts){assert("JSXClosingElement",node,opts)},exports.assertJSXClosingFragment=function(node,opts){assert("JSXClosingFragment",node,opts)},exports.assertJSXElement=function(node,opts){assert("JSXElement",node,opts)},exports.assertJSXEmptyExpression=function(node,opts){assert("JSXEmptyExpression",node,opts)},exports.assertJSXExpressionContainer=function(node,opts){assert("JSXExpressionContainer",node,opts)},exports.assertJSXFragment=function(node,opts){assert("JSXFragment",node,opts)},exports.assertJSXIdentifier=function(node,opts){assert("JSXIdentifier",node,opts)},exports.assertJSXMemberExpression=function(node,opts){assert("JSXMemberExpression",node,opts)},exports.assertJSXNamespacedName=function(node,opts){assert("JSXNamespacedName",node,opts)},exports.assertJSXOpeningElement=function(node,opts){assert("JSXOpeningElement",node,opts)},exports.assertJSXOpeningFragment=function(node,opts){assert("JSXOpeningFragment",node,opts)},exports.assertJSXSpreadAttribute=function(node,opts){assert("JSXSpreadAttribute",node,opts)},exports.assertJSXSpreadChild=function(node,opts){assert("JSXSpreadChild",node,opts)},exports.assertJSXText=function(node,opts){assert("JSXText",node,opts)},exports.assertLVal=function(node,opts){assert("LVal",node,opts)},exports.assertLabeledStatement=function(node,opts){assert("LabeledStatement",node,opts)},exports.assertLiteral=function(node,opts){assert("Literal",node,opts)},exports.assertLogicalExpression=function(node,opts){assert("LogicalExpression",node,opts)},exports.assertLoop=function(node,opts){assert("Loop",node,opts)},exports.assertMemberExpression=function(node,opts){assert("MemberExpression",node,opts)},exports.assertMetaProperty=function(node,opts){assert("MetaProperty",node,opts)},exports.assertMethod=function(node,opts){assert("Method",node,opts)},exports.assertMiscellaneous=function(node,opts){assert("Miscellaneous",node,opts)},exports.assertMixedTypeAnnotation=function(node,opts){assert("MixedTypeAnnotation",node,opts)},exports.assertModuleDeclaration=function(node,opts){(0,_deprecationWarning.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),assert("ModuleDeclaration",node,opts)},exports.assertModuleExpression=function(node,opts){assert("ModuleExpression",node,opts)},exports.assertModuleSpecifier=function(node,opts){assert("ModuleSpecifier",node,opts)},exports.assertNewExpression=function(node,opts){assert("NewExpression",node,opts)},exports.assertNoop=function(node,opts){assert("Noop",node,opts)},exports.assertNullLiteral=function(node,opts){assert("NullLiteral",node,opts)},exports.assertNullLiteralTypeAnnotation=function(node,opts){assert("NullLiteralTypeAnnotation",node,opts)},exports.assertNullableTypeAnnotation=function(node,opts){assert("NullableTypeAnnotation",node,opts)},exports.assertNumberLiteral=function(node,opts){(0,_deprecationWarning.default)("assertNumberLiteral","assertNumericLiteral"),assert("NumberLiteral",node,opts)},exports.assertNumberLiteralTypeAnnotation=function(node,opts){assert("NumberLiteralTypeAnnotation",node,opts)},exports.assertNumberTypeAnnotation=function(node,opts){assert("NumberTypeAnnotation",node,opts)},exports.assertNumericLiteral=function(node,opts){assert("NumericLiteral",node,opts)},exports.assertObjectExpression=function(node,opts){assert("ObjectExpression",node,opts)},exports.assertObjectMember=function(node,opts){assert("ObjectMember",node,opts)},exports.assertObjectMethod=function(node,opts){assert("ObjectMethod",node,opts)},exports.assertObjectPattern=function(node,opts){assert("ObjectPattern",node,opts)},exports.assertObjectProperty=function(node,opts){assert("ObjectProperty",node,opts)},exports.assertObjectTypeAnnotation=function(node,opts){assert("ObjectTypeAnnotation",node,opts)},exports.assertObjectTypeCallProperty=function(node,opts){assert("ObjectTypeCallProperty",node,opts)},exports.assertObjectTypeIndexer=function(node,opts){assert("ObjectTypeIndexer",node,opts)},exports.assertObjectTypeInternalSlot=function(node,opts){assert("ObjectTypeInternalSlot",node,opts)},exports.assertObjectTypeProperty=function(node,opts){assert("ObjectTypeProperty",node,opts)},exports.assertObjectTypeSpreadProperty=function(node,opts){assert("ObjectTypeSpreadProperty",node,opts)},exports.assertOpaqueType=function(node,opts){assert("OpaqueType",node,opts)},exports.assertOptionalCallExpression=function(node,opts){assert("OptionalCallExpression",node,opts)},exports.assertOptionalIndexedAccessType=function(node,opts){assert("OptionalIndexedAccessType",node,opts)},exports.assertOptionalMemberExpression=function(node,opts){assert("OptionalMemberExpression",node,opts)},exports.assertParenthesizedExpression=function(node,opts){assert("ParenthesizedExpression",node,opts)},exports.assertPattern=function(node,opts){assert("Pattern",node,opts)},exports.assertPatternLike=function(node,opts){assert("PatternLike",node,opts)},exports.assertPipelineBareFunction=function(node,opts){assert("PipelineBareFunction",node,opts)},exports.assertPipelinePrimaryTopicReference=function(node,opts){assert("PipelinePrimaryTopicReference",node,opts)},exports.assertPipelineTopicExpression=function(node,opts){assert("PipelineTopicExpression",node,opts)},exports.assertPlaceholder=function(node,opts){assert("Placeholder",node,opts)},exports.assertPrivate=function(node,opts){assert("Private",node,opts)},exports.assertPrivateName=function(node,opts){assert("PrivateName",node,opts)},exports.assertProgram=function(node,opts){assert("Program",node,opts)},exports.assertProperty=function(node,opts){assert("Property",node,opts)},exports.assertPureish=function(node,opts){assert("Pureish",node,opts)},exports.assertQualifiedTypeIdentifier=function(node,opts){assert("QualifiedTypeIdentifier",node,opts)},exports.assertRecordExpression=function(node,opts){assert("RecordExpression",node,opts)},exports.assertRegExpLiteral=function(node,opts){assert("RegExpLiteral",node,opts)},exports.assertRegexLiteral=function(node,opts){(0,_deprecationWarning.default)("assertRegexLiteral","assertRegExpLiteral"),assert("RegexLiteral",node,opts)},exports.assertRestElement=function(node,opts){assert("RestElement",node,opts)},exports.assertRestProperty=function(node,opts){(0,_deprecationWarning.default)("assertRestProperty","assertRestElement"),assert("RestProperty",node,opts)},exports.assertReturnStatement=function(node,opts){assert("ReturnStatement",node,opts)},exports.assertScopable=function(node,opts){assert("Scopable",node,opts)},exports.assertSequenceExpression=function(node,opts){assert("SequenceExpression",node,opts)},exports.assertSpreadElement=function(node,opts){assert("SpreadElement",node,opts)},exports.assertSpreadProperty=function(node,opts){(0,_deprecationWarning.default)("assertSpreadProperty","assertSpreadElement"),assert("SpreadProperty",node,opts)},exports.assertStandardized=function(node,opts){assert("Standardized",node,opts)},exports.assertStatement=function(node,opts){assert("Statement",node,opts)},exports.assertStaticBlock=function(node,opts){assert("StaticBlock",node,opts)},exports.assertStringLiteral=function(node,opts){assert("StringLiteral",node,opts)},exports.assertStringLiteralTypeAnnotation=function(node,opts){assert("StringLiteralTypeAnnotation",node,opts)},exports.assertStringTypeAnnotation=function(node,opts){assert("StringTypeAnnotation",node,opts)},exports.assertSuper=function(node,opts){assert("Super",node,opts)},exports.assertSwitchCase=function(node,opts){assert("SwitchCase",node,opts)},exports.assertSwitchStatement=function(node,opts){assert("SwitchStatement",node,opts)},exports.assertSymbolTypeAnnotation=function(node,opts){assert("SymbolTypeAnnotation",node,opts)},exports.assertTSAnyKeyword=function(node,opts){assert("TSAnyKeyword",node,opts)},exports.assertTSArrayType=function(node,opts){assert("TSArrayType",node,opts)},exports.assertTSAsExpression=function(node,opts){assert("TSAsExpression",node,opts)},exports.assertTSBaseType=function(node,opts){assert("TSBaseType",node,opts)},exports.assertTSBigIntKeyword=function(node,opts){assert("TSBigIntKeyword",node,opts)},exports.assertTSBooleanKeyword=function(node,opts){assert("TSBooleanKeyword",node,opts)},exports.assertTSCallSignatureDeclaration=function(node,opts){assert("TSCallSignatureDeclaration",node,opts)},exports.assertTSConditionalType=function(node,opts){assert("TSConditionalType",node,opts)},exports.assertTSConstructSignatureDeclaration=function(node,opts){assert("TSConstructSignatureDeclaration",node,opts)},exports.assertTSConstructorType=function(node,opts){assert("TSConstructorType",node,opts)},exports.assertTSDeclareFunction=function(node,opts){assert("TSDeclareFunction",node,opts)},exports.assertTSDeclareMethod=function(node,opts){assert("TSDeclareMethod",node,opts)},exports.assertTSEntityName=function(node,opts){assert("TSEntityName",node,opts)},exports.assertTSEnumBody=function(node,opts){assert("TSEnumBody",node,opts)},exports.assertTSEnumDeclaration=function(node,opts){assert("TSEnumDeclaration",node,opts)},exports.assertTSEnumMember=function(node,opts){assert("TSEnumMember",node,opts)},exports.assertTSExportAssignment=function(node,opts){assert("TSExportAssignment",node,opts)},exports.assertTSExpressionWithTypeArguments=function(node,opts){assert("TSExpressionWithTypeArguments",node,opts)},exports.assertTSExternalModuleReference=function(node,opts){assert("TSExternalModuleReference",node,opts)},exports.assertTSFunctionType=function(node,opts){assert("TSFunctionType",node,opts)},exports.assertTSImportEqualsDeclaration=function(node,opts){assert("TSImportEqualsDeclaration",node,opts)},exports.assertTSImportType=function(node,opts){assert("TSImportType",node,opts)},exports.assertTSIndexSignature=function(node,opts){assert("TSIndexSignature",node,opts)},exports.assertTSIndexedAccessType=function(node,opts){assert("TSIndexedAccessType",node,opts)},exports.assertTSInferType=function(node,opts){assert("TSInferType",node,opts)},exports.assertTSInstantiationExpression=function(node,opts){assert("TSInstantiationExpression",node,opts)},exports.assertTSInterfaceBody=function(node,opts){assert("TSInterfaceBody",node,opts)},exports.assertTSInterfaceDeclaration=function(node,opts){assert("TSInterfaceDeclaration",node,opts)},exports.assertTSIntersectionType=function(node,opts){assert("TSIntersectionType",node,opts)},exports.assertTSIntrinsicKeyword=function(node,opts){assert("TSIntrinsicKeyword",node,opts)},exports.assertTSLiteralType=function(node,opts){assert("TSLiteralType",node,opts)},exports.assertTSMappedType=function(node,opts){assert("TSMappedType",node,opts)},exports.assertTSMethodSignature=function(node,opts){assert("TSMethodSignature",node,opts)},exports.assertTSModuleBlock=function(node,opts){assert("TSModuleBlock",node,opts)},exports.assertTSModuleDeclaration=function(node,opts){assert("TSModuleDeclaration",node,opts)},exports.assertTSNamedTupleMember=function(node,opts){assert("TSNamedTupleMember",node,opts)},exports.assertTSNamespaceExportDeclaration=function(node,opts){assert("TSNamespaceExportDeclaration",node,opts)},exports.assertTSNeverKeyword=function(node,opts){assert("TSNeverKeyword",node,opts)},exports.assertTSNonNullExpression=function(node,opts){assert("TSNonNullExpression",node,opts)},exports.assertTSNullKeyword=function(node,opts){assert("TSNullKeyword",node,opts)},exports.assertTSNumberKeyword=function(node,opts){assert("TSNumberKeyword",node,opts)},exports.assertTSObjectKeyword=function(node,opts){assert("TSObjectKeyword",node,opts)},exports.assertTSOptionalType=function(node,opts){assert("TSOptionalType",node,opts)},exports.assertTSParameterProperty=function(node,opts){assert("TSParameterProperty",node,opts)},exports.assertTSParenthesizedType=function(node,opts){assert("TSParenthesizedType",node,opts)},exports.assertTSPropertySignature=function(node,opts){assert("TSPropertySignature",node,opts)},exports.assertTSQualifiedName=function(node,opts){assert("TSQualifiedName",node,opts)},exports.assertTSRestType=function(node,opts){assert("TSRestType",node,opts)},exports.assertTSSatisfiesExpression=function(node,opts){assert("TSSatisfiesExpression",node,opts)},exports.assertTSStringKeyword=function(node,opts){assert("TSStringKeyword",node,opts)},exports.assertTSSymbolKeyword=function(node,opts){assert("TSSymbolKeyword",node,opts)},exports.assertTSTemplateLiteralType=function(node,opts){assert("TSTemplateLiteralType",node,opts)},exports.assertTSThisType=function(node,opts){assert("TSThisType",node,opts)},exports.assertTSTupleType=function(node,opts){assert("TSTupleType",node,opts)},exports.assertTSType=function(node,opts){assert("TSType",node,opts)},exports.assertTSTypeAliasDeclaration=function(node,opts){assert("TSTypeAliasDeclaration",node,opts)},exports.assertTSTypeAnnotation=function(node,opts){assert("TSTypeAnnotation",node,opts)},exports.assertTSTypeAssertion=function(node,opts){assert("TSTypeAssertion",node,opts)},exports.assertTSTypeElement=function(node,opts){assert("TSTypeElement",node,opts)},exports.assertTSTypeLiteral=function(node,opts){assert("TSTypeLiteral",node,opts)},exports.assertTSTypeOperator=function(node,opts){assert("TSTypeOperator",node,opts)},exports.assertTSTypeParameter=function(node,opts){assert("TSTypeParameter",node,opts)},exports.assertTSTypeParameterDeclaration=function(node,opts){assert("TSTypeParameterDeclaration",node,opts)},exports.assertTSTypeParameterInstantiation=function(node,opts){assert("TSTypeParameterInstantiation",node,opts)},exports.assertTSTypePredicate=function(node,opts){assert("TSTypePredicate",node,opts)},exports.assertTSTypeQuery=function(node,opts){assert("TSTypeQuery",node,opts)},exports.assertTSTypeReference=function(node,opts){assert("TSTypeReference",node,opts)},exports.assertTSUndefinedKeyword=function(node,opts){assert("TSUndefinedKeyword",node,opts)},exports.assertTSUnionType=function(node,opts){assert("TSUnionType",node,opts)},exports.assertTSUnknownKeyword=function(node,opts){assert("TSUnknownKeyword",node,opts)},exports.assertTSVoidKeyword=function(node,opts){assert("TSVoidKeyword",node,opts)},exports.assertTaggedTemplateExpression=function(node,opts){assert("TaggedTemplateExpression",node,opts)},exports.assertTemplateElement=function(node,opts){assert("TemplateElement",node,opts)},exports.assertTemplateLiteral=function(node,opts){assert("TemplateLiteral",node,opts)},exports.assertTerminatorless=function(node,opts){assert("Terminatorless",node,opts)},exports.assertThisExpression=function(node,opts){assert("ThisExpression",node,opts)},exports.assertThisTypeAnnotation=function(node,opts){assert("ThisTypeAnnotation",node,opts)},exports.assertThrowStatement=function(node,opts){assert("ThrowStatement",node,opts)},exports.assertTopicReference=function(node,opts){assert("TopicReference",node,opts)},exports.assertTryStatement=function(node,opts){assert("TryStatement",node,opts)},exports.assertTupleExpression=function(node,opts){assert("TupleExpression",node,opts)},exports.assertTupleTypeAnnotation=function(node,opts){assert("TupleTypeAnnotation",node,opts)},exports.assertTypeAlias=function(node,opts){assert("TypeAlias",node,opts)},exports.assertTypeAnnotation=function(node,opts){assert("TypeAnnotation",node,opts)},exports.assertTypeCastExpression=function(node,opts){assert("TypeCastExpression",node,opts)},exports.assertTypeParameter=function(node,opts){assert("TypeParameter",node,opts)},exports.assertTypeParameterDeclaration=function(node,opts){assert("TypeParameterDeclaration",node,opts)},exports.assertTypeParameterInstantiation=function(node,opts){assert("TypeParameterInstantiation",node,opts)},exports.assertTypeScript=function(node,opts){assert("TypeScript",node,opts)},exports.assertTypeofTypeAnnotation=function(node,opts){assert("TypeofTypeAnnotation",node,opts)},exports.assertUnaryExpression=function(node,opts){assert("UnaryExpression",node,opts)},exports.assertUnaryLike=function(node,opts){assert("UnaryLike",node,opts)},exports.assertUnionTypeAnnotation=function(node,opts){assert("UnionTypeAnnotation",node,opts)},exports.assertUpdateExpression=function(node,opts){assert("UpdateExpression",node,opts)},exports.assertUserWhitespacable=function(node,opts){assert("UserWhitespacable",node,opts)},exports.assertV8IntrinsicIdentifier=function(node,opts){assert("V8IntrinsicIdentifier",node,opts)},exports.assertVariableDeclaration=function(node,opts){assert("VariableDeclaration",node,opts)},exports.assertVariableDeclarator=function(node,opts){assert("VariableDeclarator",node,opts)},exports.assertVariance=function(node,opts){assert("Variance",node,opts)},exports.assertVoidPattern=function(node,opts){assert("VoidPattern",node,opts)},exports.assertVoidTypeAnnotation=function(node,opts){assert("VoidTypeAnnotation",node,opts)},exports.assertWhile=function(node,opts){assert("While",node,opts)},exports.assertWhileStatement=function(node,opts){assert("WhileStatement",node,opts)},exports.assertWithStatement=function(node,opts){assert("WithStatement",node,opts)},exports.assertYieldExpression=function(node,opts){assert("YieldExpression",node,opts)};var _is=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/is.js"),_deprecationWarning=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/deprecationWarning.js");function assert(type,node,opts){if(!(0,_is.default)(type,node,opts))throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, but instead got "${node.type}".`)}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(types){const flattened=(0,_removeTypeDuplicates.default)(types);return 1===flattened.length?flattened[0]:(0,_index.unionTypeAnnotation)(flattened)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js"),_removeTypeDuplicates=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js");exports.default=function(type){switch(type){case"string":return(0,_index.stringTypeAnnotation)();case"number":return(0,_index.numberTypeAnnotation)();case"undefined":return(0,_index.voidTypeAnnotation)();case"boolean":return(0,_index.booleanTypeAnnotation)();case"function":return(0,_index.genericTypeAnnotation)((0,_index.identifier)("Function"));case"object":return(0,_index.genericTypeAnnotation)((0,_index.identifier)("Object"));case"symbol":return(0,_index.genericTypeAnnotation)((0,_index.identifier)("Symbol"));case"bigint":return(0,_index.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+type)}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _lowercase=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/lowercase.js");Object.keys(_lowercase).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_lowercase[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _lowercase[key]}}))});var _uppercase=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/uppercase.js");Object.keys(_uppercase).forEach(function(key){"default"!==key&&"__esModule"!==key&&(key in exports&&exports[key]===_uppercase[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _uppercase[key]}}))})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/lowercase.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.anyTypeAnnotation=function(){return{type:"AnyTypeAnnotation"}},exports.argumentPlaceholder=function(){return{type:"ArgumentPlaceholder"}},exports.arrayExpression=function(elements=[]){const node={type:"ArrayExpression",elements},defs=NODE_FIELDS.ArrayExpression;return validate(defs.elements,node,"elements",elements,1),node},exports.arrayPattern=function(elements){const node={type:"ArrayPattern",elements},defs=NODE_FIELDS.ArrayPattern;return validate(defs.elements,node,"elements",elements,1),node},exports.arrayTypeAnnotation=function(elementType){const node={type:"ArrayTypeAnnotation",elementType},defs=NODE_FIELDS.ArrayTypeAnnotation;return validate(defs.elementType,node,"elementType",elementType,1),node},exports.arrowFunctionExpression=function(params,body,async=!1){const node={type:"ArrowFunctionExpression",params,body,async,expression:null},defs=NODE_FIELDS.ArrowFunctionExpression;return validate(defs.params,node,"params",params,1),validate(defs.body,node,"body",body,1),validate(defs.async,node,"async",async),node},exports.assignmentExpression=function(operator,left,right){const node={type:"AssignmentExpression",operator,left,right},defs=NODE_FIELDS.AssignmentExpression;return validate(defs.operator,node,"operator",operator),validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),node},exports.assignmentPattern=function(left,right){const node={type:"AssignmentPattern",left,right},defs=NODE_FIELDS.AssignmentPattern;return validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),node},exports.awaitExpression=function(argument){const node={type:"AwaitExpression",argument},defs=NODE_FIELDS.AwaitExpression;return validate(defs.argument,node,"argument",argument,1),node},exports.bigIntLiteral=function(value){"bigint"==typeof value&&(value=value.toString());const node={type:"BigIntLiteral",value},defs=NODE_FIELDS.BigIntLiteral;return validate(defs.value,node,"value",value),node},exports.binaryExpression=function(operator,left,right){const node={type:"BinaryExpression",operator,left,right},defs=NODE_FIELDS.BinaryExpression;return validate(defs.operator,node,"operator",operator),validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),node},exports.bindExpression=function(object,callee){const node={type:"BindExpression",object,callee},defs=NODE_FIELDS.BindExpression;return validate(defs.object,node,"object",object,1),validate(defs.callee,node,"callee",callee,1),node},exports.blockStatement=function(body,directives=[]){const node={type:"BlockStatement",body,directives},defs=NODE_FIELDS.BlockStatement;return validate(defs.body,node,"body",body,1),validate(defs.directives,node,"directives",directives,1),node},exports.booleanLiteral=function(value){const node={type:"BooleanLiteral",value},defs=NODE_FIELDS.BooleanLiteral;return validate(defs.value,node,"value",value),node},exports.booleanLiteralTypeAnnotation=function(value){const node={type:"BooleanLiteralTypeAnnotation",value},defs=NODE_FIELDS.BooleanLiteralTypeAnnotation;return validate(defs.value,node,"value",value),node},exports.booleanTypeAnnotation=function(){return{type:"BooleanTypeAnnotation"}},exports.breakStatement=function(label=null){const node={type:"BreakStatement",label},defs=NODE_FIELDS.BreakStatement;return validate(defs.label,node,"label",label,1),node},exports.callExpression=function(callee,_arguments){const node={type:"CallExpression",callee,arguments:_arguments},defs=NODE_FIELDS.CallExpression;return validate(defs.callee,node,"callee",callee,1),validate(defs.arguments,node,"arguments",_arguments,1),node},exports.catchClause=function(param=null,body){const node={type:"CatchClause",param,body},defs=NODE_FIELDS.CatchClause;return validate(defs.param,node,"param",param,1),validate(defs.body,node,"body",body,1),node},exports.classAccessorProperty=function(key,value=null,typeAnnotation=null,decorators=null,computed=!1,_static=!1){const node={type:"ClassAccessorProperty",key,value,typeAnnotation,decorators,computed,static:_static},defs=NODE_FIELDS.ClassAccessorProperty;return validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),validate(defs.decorators,node,"decorators",decorators,1),validate(defs.computed,node,"computed",computed),validate(defs.static,node,"static",_static),node},exports.classBody=function(body){const node={type:"ClassBody",body},defs=NODE_FIELDS.ClassBody;return validate(defs.body,node,"body",body,1),node},exports.classDeclaration=function(id=null,superClass=null,body,decorators=null){const node={type:"ClassDeclaration",id,superClass,body,decorators},defs=NODE_FIELDS.ClassDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.superClass,node,"superClass",superClass,1),validate(defs.body,node,"body",body,1),validate(defs.decorators,node,"decorators",decorators,1),node},exports.classExpression=function(id=null,superClass=null,body,decorators=null){const node={type:"ClassExpression",id,superClass,body,decorators},defs=NODE_FIELDS.ClassExpression;return validate(defs.id,node,"id",id,1),validate(defs.superClass,node,"superClass",superClass,1),validate(defs.body,node,"body",body,1),validate(defs.decorators,node,"decorators",decorators,1),node},exports.classImplements=function(id,typeParameters=null){const node={type:"ClassImplements",id,typeParameters},defs=NODE_FIELDS.ClassImplements;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.classMethod=function(kind="method",key,params,body,computed=!1,_static=!1,generator=!1,async=!1){const node={type:"ClassMethod",kind,key,params,body,computed,static:_static,generator,async},defs=NODE_FIELDS.ClassMethod;return validate(defs.kind,node,"kind",kind),validate(defs.key,node,"key",key,1),validate(defs.params,node,"params",params,1),validate(defs.body,node,"body",body,1),validate(defs.computed,node,"computed",computed),validate(defs.static,node,"static",_static),validate(defs.generator,node,"generator",generator),validate(defs.async,node,"async",async),node},exports.classPrivateMethod=function(kind="method",key,params,body,_static=!1){const node={type:"ClassPrivateMethod",kind,key,params,body,static:_static},defs=NODE_FIELDS.ClassPrivateMethod;return validate(defs.kind,node,"kind",kind),validate(defs.key,node,"key",key,1),validate(defs.params,node,"params",params,1),validate(defs.body,node,"body",body,1),validate(defs.static,node,"static",_static),node},exports.classPrivateProperty=function(key,value=null,decorators=null,_static=!1){const node={type:"ClassPrivateProperty",key,value,decorators,static:_static},defs=NODE_FIELDS.ClassPrivateProperty;return validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),validate(defs.decorators,node,"decorators",decorators,1),validate(defs.static,node,"static",_static),node},exports.classProperty=function(key,value=null,typeAnnotation=null,decorators=null,computed=!1,_static=!1){const node={type:"ClassProperty",key,value,typeAnnotation,decorators,computed,static:_static},defs=NODE_FIELDS.ClassProperty;return validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),validate(defs.decorators,node,"decorators",decorators,1),validate(defs.computed,node,"computed",computed),validate(defs.static,node,"static",_static),node},exports.conditionalExpression=function(test,consequent,alternate){const node={type:"ConditionalExpression",test,consequent,alternate},defs=NODE_FIELDS.ConditionalExpression;return validate(defs.test,node,"test",test,1),validate(defs.consequent,node,"consequent",consequent,1),validate(defs.alternate,node,"alternate",alternate,1),node},exports.continueStatement=function(label=null){const node={type:"ContinueStatement",label},defs=NODE_FIELDS.ContinueStatement;return validate(defs.label,node,"label",label,1),node},exports.debuggerStatement=function(){return{type:"DebuggerStatement"}},exports.decimalLiteral=function(value){const node={type:"DecimalLiteral",value},defs=NODE_FIELDS.DecimalLiteral;return validate(defs.value,node,"value",value),node},exports.declareClass=function(id,typeParameters=null,_extends=null,body){const node={type:"DeclareClass",id,typeParameters,extends:_extends,body},defs=NODE_FIELDS.DeclareClass;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.extends,node,"extends",_extends,1),validate(defs.body,node,"body",body,1),node},exports.declareExportAllDeclaration=function(source,attributes=null){const node={type:"DeclareExportAllDeclaration",source,attributes},defs=NODE_FIELDS.DeclareExportAllDeclaration;return validate(defs.source,node,"source",source,1),validate(defs.attributes,node,"attributes",attributes,1),node},exports.declareExportDeclaration=function(declaration=null,specifiers=null,source=null,attributes=null){const node={type:"DeclareExportDeclaration",declaration,specifiers,source,attributes},defs=NODE_FIELDS.DeclareExportDeclaration;return validate(defs.declaration,node,"declaration",declaration,1),validate(defs.specifiers,node,"specifiers",specifiers,1),validate(defs.source,node,"source",source,1),validate(defs.attributes,node,"attributes",attributes,1),node},exports.declareFunction=function(id){const node={type:"DeclareFunction",id},defs=NODE_FIELDS.DeclareFunction;return validate(defs.id,node,"id",id,1),node},exports.declareInterface=function(id,typeParameters=null,_extends=null,body){const node={type:"DeclareInterface",id,typeParameters,extends:_extends,body},defs=NODE_FIELDS.DeclareInterface;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.extends,node,"extends",_extends,1),validate(defs.body,node,"body",body,1),node},exports.declareModule=function(id,body,kind=null){const node={type:"DeclareModule",id,body,kind},defs=NODE_FIELDS.DeclareModule;return validate(defs.id,node,"id",id,1),validate(defs.body,node,"body",body,1),validate(defs.kind,node,"kind",kind),node},exports.declareModuleExports=function(typeAnnotation){const node={type:"DeclareModuleExports",typeAnnotation},defs=NODE_FIELDS.DeclareModuleExports;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.declareOpaqueType=function(id,typeParameters=null,supertype=null){const node={type:"DeclareOpaqueType",id,typeParameters,supertype},defs=NODE_FIELDS.DeclareOpaqueType;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.supertype,node,"supertype",supertype,1),node},exports.declareTypeAlias=function(id,typeParameters=null,right){const node={type:"DeclareTypeAlias",id,typeParameters,right},defs=NODE_FIELDS.DeclareTypeAlias;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.right,node,"right",right,1),node},exports.declareVariable=function(id){const node={type:"DeclareVariable",id},defs=NODE_FIELDS.DeclareVariable;return validate(defs.id,node,"id",id,1),node},exports.declaredPredicate=function(value){const node={type:"DeclaredPredicate",value},defs=NODE_FIELDS.DeclaredPredicate;return validate(defs.value,node,"value",value,1),node},exports.decorator=function(expression){const node={type:"Decorator",expression},defs=NODE_FIELDS.Decorator;return validate(defs.expression,node,"expression",expression,1),node},exports.directive=function(value){const node={type:"Directive",value},defs=NODE_FIELDS.Directive;return validate(defs.value,node,"value",value,1),node},exports.directiveLiteral=function(value){const node={type:"DirectiveLiteral",value},defs=NODE_FIELDS.DirectiveLiteral;return validate(defs.value,node,"value",value),node},exports.doExpression=function(body,async=!1){const node={type:"DoExpression",body,async},defs=NODE_FIELDS.DoExpression;return validate(defs.body,node,"body",body,1),validate(defs.async,node,"async",async),node},exports.doWhileStatement=function(test,body){const node={type:"DoWhileStatement",test,body},defs=NODE_FIELDS.DoWhileStatement;return validate(defs.test,node,"test",test,1),validate(defs.body,node,"body",body,1),node},exports.emptyStatement=function(){return{type:"EmptyStatement"}},exports.emptyTypeAnnotation=function(){return{type:"EmptyTypeAnnotation"}},exports.enumBooleanBody=function(members){const node={type:"EnumBooleanBody",members,explicitType:null,hasUnknownMembers:null},defs=NODE_FIELDS.EnumBooleanBody;return validate(defs.members,node,"members",members,1),node},exports.enumBooleanMember=function(id){const node={type:"EnumBooleanMember",id,init:null},defs=NODE_FIELDS.EnumBooleanMember;return validate(defs.id,node,"id",id,1),node},exports.enumDeclaration=function(id,body){const node={type:"EnumDeclaration",id,body},defs=NODE_FIELDS.EnumDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.body,node,"body",body,1),node},exports.enumDefaultedMember=function(id){const node={type:"EnumDefaultedMember",id},defs=NODE_FIELDS.EnumDefaultedMember;return validate(defs.id,node,"id",id,1),node},exports.enumNumberBody=function(members){const node={type:"EnumNumberBody",members,explicitType:null,hasUnknownMembers:null},defs=NODE_FIELDS.EnumNumberBody;return validate(defs.members,node,"members",members,1),node},exports.enumNumberMember=function(id,init){const node={type:"EnumNumberMember",id,init},defs=NODE_FIELDS.EnumNumberMember;return validate(defs.id,node,"id",id,1),validate(defs.init,node,"init",init,1),node},exports.enumStringBody=function(members){const node={type:"EnumStringBody",members,explicitType:null,hasUnknownMembers:null},defs=NODE_FIELDS.EnumStringBody;return validate(defs.members,node,"members",members,1),node},exports.enumStringMember=function(id,init){const node={type:"EnumStringMember",id,init},defs=NODE_FIELDS.EnumStringMember;return validate(defs.id,node,"id",id,1),validate(defs.init,node,"init",init,1),node},exports.enumSymbolBody=function(members){const node={type:"EnumSymbolBody",members,hasUnknownMembers:null},defs=NODE_FIELDS.EnumSymbolBody;return validate(defs.members,node,"members",members,1),node},exports.existsTypeAnnotation=function(){return{type:"ExistsTypeAnnotation"}},exports.exportAllDeclaration=function(source){const node={type:"ExportAllDeclaration",source},defs=NODE_FIELDS.ExportAllDeclaration;return validate(defs.source,node,"source",source,1),node},exports.exportDefaultDeclaration=function(declaration){const node={type:"ExportDefaultDeclaration",declaration},defs=NODE_FIELDS.ExportDefaultDeclaration;return validate(defs.declaration,node,"declaration",declaration,1),node},exports.exportDefaultSpecifier=function(exported){const node={type:"ExportDefaultSpecifier",exported},defs=NODE_FIELDS.ExportDefaultSpecifier;return validate(defs.exported,node,"exported",exported,1),node},exports.exportNamedDeclaration=function(declaration=null,specifiers=[],source=null){const node={type:"ExportNamedDeclaration",declaration,specifiers,source},defs=NODE_FIELDS.ExportNamedDeclaration;return validate(defs.declaration,node,"declaration",declaration,1),validate(defs.specifiers,node,"specifiers",specifiers,1),validate(defs.source,node,"source",source,1),node},exports.exportNamespaceSpecifier=function(exported){const node={type:"ExportNamespaceSpecifier",exported},defs=NODE_FIELDS.ExportNamespaceSpecifier;return validate(defs.exported,node,"exported",exported,1),node},exports.exportSpecifier=function(local,exported){const node={type:"ExportSpecifier",local,exported},defs=NODE_FIELDS.ExportSpecifier;return validate(defs.local,node,"local",local,1),validate(defs.exported,node,"exported",exported,1),node},exports.expressionStatement=function(expression){const node={type:"ExpressionStatement",expression},defs=NODE_FIELDS.ExpressionStatement;return validate(defs.expression,node,"expression",expression,1),node},exports.file=function(program,comments=null,tokens=null){const node={type:"File",program,comments,tokens},defs=NODE_FIELDS.File;return validate(defs.program,node,"program",program,1),validate(defs.comments,node,"comments",comments,1),validate(defs.tokens,node,"tokens",tokens),node},exports.forInStatement=function(left,right,body){const node={type:"ForInStatement",left,right,body},defs=NODE_FIELDS.ForInStatement;return validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),validate(defs.body,node,"body",body,1),node},exports.forOfStatement=function(left,right,body,_await=!1){const node={type:"ForOfStatement",left,right,body,await:_await},defs=NODE_FIELDS.ForOfStatement;return validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),validate(defs.body,node,"body",body,1),validate(defs.await,node,"await",_await),node},exports.forStatement=function(init=null,test=null,update=null,body){const node={type:"ForStatement",init,test,update,body},defs=NODE_FIELDS.ForStatement;return validate(defs.init,node,"init",init,1),validate(defs.test,node,"test",test,1),validate(defs.update,node,"update",update,1),validate(defs.body,node,"body",body,1),node},exports.functionDeclaration=function(id=null,params,body,generator=!1,async=!1){const node={type:"FunctionDeclaration",id,params,body,generator,async},defs=NODE_FIELDS.FunctionDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.params,node,"params",params,1),validate(defs.body,node,"body",body,1),validate(defs.generator,node,"generator",generator),validate(defs.async,node,"async",async),node},exports.functionExpression=function(id=null,params,body,generator=!1,async=!1){const node={type:"FunctionExpression",id,params,body,generator,async},defs=NODE_FIELDS.FunctionExpression;return validate(defs.id,node,"id",id,1),validate(defs.params,node,"params",params,1),validate(defs.body,node,"body",body,1),validate(defs.generator,node,"generator",generator),validate(defs.async,node,"async",async),node},exports.functionTypeAnnotation=function(typeParameters=null,params,rest=null,returnType){const node={type:"FunctionTypeAnnotation",typeParameters,params,rest,returnType},defs=NODE_FIELDS.FunctionTypeAnnotation;return validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.params,node,"params",params,1),validate(defs.rest,node,"rest",rest,1),validate(defs.returnType,node,"returnType",returnType,1),node},exports.functionTypeParam=function(name=null,typeAnnotation){const node={type:"FunctionTypeParam",name,typeAnnotation},defs=NODE_FIELDS.FunctionTypeParam;return validate(defs.name,node,"name",name,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.genericTypeAnnotation=function(id,typeParameters=null){const node={type:"GenericTypeAnnotation",id,typeParameters},defs=NODE_FIELDS.GenericTypeAnnotation;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.identifier=function(name){const node={type:"Identifier",name},defs=NODE_FIELDS.Identifier;return validate(defs.name,node,"name",name),node},exports.ifStatement=function(test,consequent,alternate=null){const node={type:"IfStatement",test,consequent,alternate},defs=NODE_FIELDS.IfStatement;return validate(defs.test,node,"test",test,1),validate(defs.consequent,node,"consequent",consequent,1),validate(defs.alternate,node,"alternate",alternate,1),node},exports.import=function(){return{type:"Import"}},exports.importAttribute=function(key,value){const node={type:"ImportAttribute",key,value},defs=NODE_FIELDS.ImportAttribute;return validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),node},exports.importDeclaration=function(specifiers,source){const node={type:"ImportDeclaration",specifiers,source},defs=NODE_FIELDS.ImportDeclaration;return validate(defs.specifiers,node,"specifiers",specifiers,1),validate(defs.source,node,"source",source,1),node},exports.importDefaultSpecifier=function(local){const node={type:"ImportDefaultSpecifier",local},defs=NODE_FIELDS.ImportDefaultSpecifier;return validate(defs.local,node,"local",local,1),node},exports.importExpression=function(source,options=null){const node={type:"ImportExpression",source,options},defs=NODE_FIELDS.ImportExpression;return validate(defs.source,node,"source",source,1),validate(defs.options,node,"options",options,1),node},exports.importNamespaceSpecifier=function(local){const node={type:"ImportNamespaceSpecifier",local},defs=NODE_FIELDS.ImportNamespaceSpecifier;return validate(defs.local,node,"local",local,1),node},exports.importSpecifier=function(local,imported){const node={type:"ImportSpecifier",local,imported},defs=NODE_FIELDS.ImportSpecifier;return validate(defs.local,node,"local",local,1),validate(defs.imported,node,"imported",imported,1),node},exports.indexedAccessType=function(objectType,indexType){const node={type:"IndexedAccessType",objectType,indexType},defs=NODE_FIELDS.IndexedAccessType;return validate(defs.objectType,node,"objectType",objectType,1),validate(defs.indexType,node,"indexType",indexType,1),node},exports.inferredPredicate=function(){return{type:"InferredPredicate"}},exports.interfaceDeclaration=function(id,typeParameters=null,_extends=null,body){const node={type:"InterfaceDeclaration",id,typeParameters,extends:_extends,body},defs=NODE_FIELDS.InterfaceDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.extends,node,"extends",_extends,1),validate(defs.body,node,"body",body,1),node},exports.interfaceExtends=function(id,typeParameters=null){const node={type:"InterfaceExtends",id,typeParameters},defs=NODE_FIELDS.InterfaceExtends;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.interfaceTypeAnnotation=function(_extends=null,body){const node={type:"InterfaceTypeAnnotation",extends:_extends,body},defs=NODE_FIELDS.InterfaceTypeAnnotation;return validate(defs.extends,node,"extends",_extends,1),validate(defs.body,node,"body",body,1),node},exports.interpreterDirective=function(value){const node={type:"InterpreterDirective",value},defs=NODE_FIELDS.InterpreterDirective;return validate(defs.value,node,"value",value),node},exports.intersectionTypeAnnotation=function(types){const node={type:"IntersectionTypeAnnotation",types},defs=NODE_FIELDS.IntersectionTypeAnnotation;return validate(defs.types,node,"types",types,1),node},exports.jSXAttribute=exports.jsxAttribute=function(name,value=null){const node={type:"JSXAttribute",name,value},defs=NODE_FIELDS.JSXAttribute;return validate(defs.name,node,"name",name,1),validate(defs.value,node,"value",value,1),node},exports.jSXClosingElement=exports.jsxClosingElement=function(name){const node={type:"JSXClosingElement",name},defs=NODE_FIELDS.JSXClosingElement;return validate(defs.name,node,"name",name,1),node},exports.jSXClosingFragment=exports.jsxClosingFragment=function(){return{type:"JSXClosingFragment"}},exports.jSXElement=exports.jsxElement=function(openingElement,closingElement=null,children,selfClosing=null){const node={type:"JSXElement",openingElement,closingElement,children,selfClosing},defs=NODE_FIELDS.JSXElement;return validate(defs.openingElement,node,"openingElement",openingElement,1),validate(defs.closingElement,node,"closingElement",closingElement,1),validate(defs.children,node,"children",children,1),validate(defs.selfClosing,node,"selfClosing",selfClosing),node},exports.jSXEmptyExpression=exports.jsxEmptyExpression=function(){return{type:"JSXEmptyExpression"}},exports.jSXExpressionContainer=exports.jsxExpressionContainer=function(expression){const node={type:"JSXExpressionContainer",expression},defs=NODE_FIELDS.JSXExpressionContainer;return validate(defs.expression,node,"expression",expression,1),node},exports.jSXFragment=exports.jsxFragment=function(openingFragment,closingFragment,children){const node={type:"JSXFragment",openingFragment,closingFragment,children},defs=NODE_FIELDS.JSXFragment;return validate(defs.openingFragment,node,"openingFragment",openingFragment,1),validate(defs.closingFragment,node,"closingFragment",closingFragment,1),validate(defs.children,node,"children",children,1),node},exports.jSXIdentifier=exports.jsxIdentifier=function(name){const node={type:"JSXIdentifier",name},defs=NODE_FIELDS.JSXIdentifier;return validate(defs.name,node,"name",name),node},exports.jSXMemberExpression=exports.jsxMemberExpression=function(object,property){const node={type:"JSXMemberExpression",object,property},defs=NODE_FIELDS.JSXMemberExpression;return validate(defs.object,node,"object",object,1),validate(defs.property,node,"property",property,1),node},exports.jSXNamespacedName=exports.jsxNamespacedName=function(namespace,name){const node={type:"JSXNamespacedName",namespace,name},defs=NODE_FIELDS.JSXNamespacedName;return validate(defs.namespace,node,"namespace",namespace,1),validate(defs.name,node,"name",name,1),node},exports.jSXOpeningElement=exports.jsxOpeningElement=function(name,attributes,selfClosing=!1){const node={type:"JSXOpeningElement",name,attributes,selfClosing},defs=NODE_FIELDS.JSXOpeningElement;return validate(defs.name,node,"name",name,1),validate(defs.attributes,node,"attributes",attributes,1),validate(defs.selfClosing,node,"selfClosing",selfClosing),node},exports.jSXOpeningFragment=exports.jsxOpeningFragment=function(){return{type:"JSXOpeningFragment"}},exports.jSXSpreadAttribute=exports.jsxSpreadAttribute=function(argument){const node={type:"JSXSpreadAttribute",argument},defs=NODE_FIELDS.JSXSpreadAttribute;return validate(defs.argument,node,"argument",argument,1),node},exports.jSXSpreadChild=exports.jsxSpreadChild=function(expression){const node={type:"JSXSpreadChild",expression},defs=NODE_FIELDS.JSXSpreadChild;return validate(defs.expression,node,"expression",expression,1),node},exports.jSXText=exports.jsxText=function(value){const node={type:"JSXText",value},defs=NODE_FIELDS.JSXText;return validate(defs.value,node,"value",value),node},exports.labeledStatement=function(label,body){const node={type:"LabeledStatement",label,body},defs=NODE_FIELDS.LabeledStatement;return validate(defs.label,node,"label",label,1),validate(defs.body,node,"body",body,1),node},exports.logicalExpression=function(operator,left,right){const node={type:"LogicalExpression",operator,left,right},defs=NODE_FIELDS.LogicalExpression;return validate(defs.operator,node,"operator",operator),validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),node},exports.memberExpression=function(object,property,computed=!1,optional=null){const node={type:"MemberExpression",object,property,computed,optional},defs=NODE_FIELDS.MemberExpression;return validate(defs.object,node,"object",object,1),validate(defs.property,node,"property",property,1),validate(defs.computed,node,"computed",computed),validate(defs.optional,node,"optional",optional),node},exports.metaProperty=function(meta,property){const node={type:"MetaProperty",meta,property},defs=NODE_FIELDS.MetaProperty;return validate(defs.meta,node,"meta",meta,1),validate(defs.property,node,"property",property,1),node},exports.mixedTypeAnnotation=function(){return{type:"MixedTypeAnnotation"}},exports.moduleExpression=function(body){const node={type:"ModuleExpression",body},defs=NODE_FIELDS.ModuleExpression;return validate(defs.body,node,"body",body,1),node},exports.newExpression=function(callee,_arguments){const node={type:"NewExpression",callee,arguments:_arguments},defs=NODE_FIELDS.NewExpression;return validate(defs.callee,node,"callee",callee,1),validate(defs.arguments,node,"arguments",_arguments,1),node},exports.noop=function(){return{type:"Noop"}},exports.nullLiteral=function(){return{type:"NullLiteral"}},exports.nullLiteralTypeAnnotation=function(){return{type:"NullLiteralTypeAnnotation"}},exports.nullableTypeAnnotation=function(typeAnnotation){const node={type:"NullableTypeAnnotation",typeAnnotation},defs=NODE_FIELDS.NullableTypeAnnotation;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.numberLiteral=function(value){return(0,_deprecationWarning.default)("NumberLiteral","NumericLiteral","The node type "),numericLiteral(value)},exports.numberLiteralTypeAnnotation=function(value){const node={type:"NumberLiteralTypeAnnotation",value},defs=NODE_FIELDS.NumberLiteralTypeAnnotation;return validate(defs.value,node,"value",value),node},exports.numberTypeAnnotation=function(){return{type:"NumberTypeAnnotation"}},exports.numericLiteral=numericLiteral,exports.objectExpression=function(properties){const node={type:"ObjectExpression",properties},defs=NODE_FIELDS.ObjectExpression;return validate(defs.properties,node,"properties",properties,1),node},exports.objectMethod=function(kind="method",key,params,body,computed=!1,generator=!1,async=!1){const node={type:"ObjectMethod",kind,key,params,body,computed,generator,async},defs=NODE_FIELDS.ObjectMethod;return validate(defs.kind,node,"kind",kind),validate(defs.key,node,"key",key,1),validate(defs.params,node,"params",params,1),validate(defs.body,node,"body",body,1),validate(defs.computed,node,"computed",computed),validate(defs.generator,node,"generator",generator),validate(defs.async,node,"async",async),node},exports.objectPattern=function(properties){const node={type:"ObjectPattern",properties},defs=NODE_FIELDS.ObjectPattern;return validate(defs.properties,node,"properties",properties,1),node},exports.objectProperty=function(key,value,computed=!1,shorthand=!1,decorators=null){const node={type:"ObjectProperty",key,value,computed,shorthand,decorators},defs=NODE_FIELDS.ObjectProperty;return validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),validate(defs.computed,node,"computed",computed),validate(defs.shorthand,node,"shorthand",shorthand),validate(defs.decorators,node,"decorators",decorators,1),node},exports.objectTypeAnnotation=function(properties,indexers=[],callProperties=[],internalSlots=[],exact=!1){const node={type:"ObjectTypeAnnotation",properties,indexers,callProperties,internalSlots,exact},defs=NODE_FIELDS.ObjectTypeAnnotation;return validate(defs.properties,node,"properties",properties,1),validate(defs.indexers,node,"indexers",indexers,1),validate(defs.callProperties,node,"callProperties",callProperties,1),validate(defs.internalSlots,node,"internalSlots",internalSlots,1),validate(defs.exact,node,"exact",exact),node},exports.objectTypeCallProperty=function(value){const node={type:"ObjectTypeCallProperty",value,static:null},defs=NODE_FIELDS.ObjectTypeCallProperty;return validate(defs.value,node,"value",value,1),node},exports.objectTypeIndexer=function(id=null,key,value,variance=null){const node={type:"ObjectTypeIndexer",id,key,value,variance,static:null},defs=NODE_FIELDS.ObjectTypeIndexer;return validate(defs.id,node,"id",id,1),validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),validate(defs.variance,node,"variance",variance,1),node},exports.objectTypeInternalSlot=function(id,value,optional,_static,method){const node={type:"ObjectTypeInternalSlot",id,value,optional,static:_static,method},defs=NODE_FIELDS.ObjectTypeInternalSlot;return validate(defs.id,node,"id",id,1),validate(defs.value,node,"value",value,1),validate(defs.optional,node,"optional",optional),validate(defs.static,node,"static",_static),validate(defs.method,node,"method",method),node},exports.objectTypeProperty=function(key,value,variance=null){const node={type:"ObjectTypeProperty",key,value,variance,kind:null,method:null,optional:null,proto:null,static:null},defs=NODE_FIELDS.ObjectTypeProperty;return validate(defs.key,node,"key",key,1),validate(defs.value,node,"value",value,1),validate(defs.variance,node,"variance",variance,1),node},exports.objectTypeSpreadProperty=function(argument){const node={type:"ObjectTypeSpreadProperty",argument},defs=NODE_FIELDS.ObjectTypeSpreadProperty;return validate(defs.argument,node,"argument",argument,1),node},exports.opaqueType=function(id,typeParameters=null,supertype=null,impltype){const node={type:"OpaqueType",id,typeParameters,supertype,impltype},defs=NODE_FIELDS.OpaqueType;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.supertype,node,"supertype",supertype,1),validate(defs.impltype,node,"impltype",impltype,1),node},exports.optionalCallExpression=function(callee,_arguments,optional){const node={type:"OptionalCallExpression",callee,arguments:_arguments,optional},defs=NODE_FIELDS.OptionalCallExpression;return validate(defs.callee,node,"callee",callee,1),validate(defs.arguments,node,"arguments",_arguments,1),validate(defs.optional,node,"optional",optional),node},exports.optionalIndexedAccessType=function(objectType,indexType){const node={type:"OptionalIndexedAccessType",objectType,indexType,optional:null},defs=NODE_FIELDS.OptionalIndexedAccessType;return validate(defs.objectType,node,"objectType",objectType,1),validate(defs.indexType,node,"indexType",indexType,1),node},exports.optionalMemberExpression=function(object,property,computed=!1,optional){const node={type:"OptionalMemberExpression",object,property,computed,optional},defs=NODE_FIELDS.OptionalMemberExpression;return validate(defs.object,node,"object",object,1),validate(defs.property,node,"property",property,1),validate(defs.computed,node,"computed",computed),validate(defs.optional,node,"optional",optional),node},exports.parenthesizedExpression=function(expression){const node={type:"ParenthesizedExpression",expression},defs=NODE_FIELDS.ParenthesizedExpression;return validate(defs.expression,node,"expression",expression,1),node},exports.pipelineBareFunction=function(callee){const node={type:"PipelineBareFunction",callee},defs=NODE_FIELDS.PipelineBareFunction;return validate(defs.callee,node,"callee",callee,1),node},exports.pipelinePrimaryTopicReference=function(){return{type:"PipelinePrimaryTopicReference"}},exports.pipelineTopicExpression=function(expression){const node={type:"PipelineTopicExpression",expression},defs=NODE_FIELDS.PipelineTopicExpression;return validate(defs.expression,node,"expression",expression,1),node},exports.placeholder=function(expectedNode,name){const node={type:"Placeholder",expectedNode,name},defs=NODE_FIELDS.Placeholder;return validate(defs.expectedNode,node,"expectedNode",expectedNode),validate(defs.name,node,"name",name,1),node},exports.privateName=function(id){const node={type:"PrivateName",id},defs=NODE_FIELDS.PrivateName;return validate(defs.id,node,"id",id,1),node},exports.program=function(body,directives=[],sourceType="script",interpreter=null){const node={type:"Program",body,directives,sourceType,interpreter},defs=NODE_FIELDS.Program;return validate(defs.body,node,"body",body,1),validate(defs.directives,node,"directives",directives,1),validate(defs.sourceType,node,"sourceType",sourceType),validate(defs.interpreter,node,"interpreter",interpreter,1),node},exports.qualifiedTypeIdentifier=function(id,qualification){const node={type:"QualifiedTypeIdentifier",id,qualification},defs=NODE_FIELDS.QualifiedTypeIdentifier;return validate(defs.id,node,"id",id,1),validate(defs.qualification,node,"qualification",qualification,1),node},exports.recordExpression=function(properties){const node={type:"RecordExpression",properties},defs=NODE_FIELDS.RecordExpression;return validate(defs.properties,node,"properties",properties,1),node},exports.regExpLiteral=regExpLiteral,exports.regexLiteral=function(pattern,flags=""){return(0,_deprecationWarning.default)("RegexLiteral","RegExpLiteral","The node type "),regExpLiteral(pattern,flags)},exports.restElement=restElement,exports.restProperty=function(argument){return(0,_deprecationWarning.default)("RestProperty","RestElement","The node type "),restElement(argument)},exports.returnStatement=function(argument=null){const node={type:"ReturnStatement",argument},defs=NODE_FIELDS.ReturnStatement;return validate(defs.argument,node,"argument",argument,1),node},exports.sequenceExpression=function(expressions){const node={type:"SequenceExpression",expressions},defs=NODE_FIELDS.SequenceExpression;return validate(defs.expressions,node,"expressions",expressions,1),node},exports.spreadElement=spreadElement,exports.spreadProperty=function(argument){return(0,_deprecationWarning.default)("SpreadProperty","SpreadElement","The node type "),spreadElement(argument)},exports.staticBlock=function(body){const node={type:"StaticBlock",body},defs=NODE_FIELDS.StaticBlock;return validate(defs.body,node,"body",body,1),node},exports.stringLiteral=function(value){const node={type:"StringLiteral",value},defs=NODE_FIELDS.StringLiteral;return validate(defs.value,node,"value",value),node},exports.stringLiteralTypeAnnotation=function(value){const node={type:"StringLiteralTypeAnnotation",value},defs=NODE_FIELDS.StringLiteralTypeAnnotation;return validate(defs.value,node,"value",value),node},exports.stringTypeAnnotation=function(){return{type:"StringTypeAnnotation"}},exports.super=function(){return{type:"Super"}},exports.switchCase=function(test=null,consequent){const node={type:"SwitchCase",test,consequent},defs=NODE_FIELDS.SwitchCase;return validate(defs.test,node,"test",test,1),validate(defs.consequent,node,"consequent",consequent,1),node},exports.switchStatement=function(discriminant,cases){const node={type:"SwitchStatement",discriminant,cases},defs=NODE_FIELDS.SwitchStatement;return validate(defs.discriminant,node,"discriminant",discriminant,1),validate(defs.cases,node,"cases",cases,1),node},exports.symbolTypeAnnotation=function(){return{type:"SymbolTypeAnnotation"}},exports.taggedTemplateExpression=function(tag,quasi){const node={type:"TaggedTemplateExpression",tag,quasi},defs=NODE_FIELDS.TaggedTemplateExpression;return validate(defs.tag,node,"tag",tag,1),validate(defs.quasi,node,"quasi",quasi,1),node},exports.templateElement=function(value,tail=!1){const node={type:"TemplateElement",value,tail},defs=NODE_FIELDS.TemplateElement;return validate(defs.value,node,"value",value),validate(defs.tail,node,"tail",tail),node},exports.templateLiteral=function(quasis,expressions){const node={type:"TemplateLiteral",quasis,expressions},defs=NODE_FIELDS.TemplateLiteral;return validate(defs.quasis,node,"quasis",quasis,1),validate(defs.expressions,node,"expressions",expressions,1),node},exports.thisExpression=function(){return{type:"ThisExpression"}},exports.thisTypeAnnotation=function(){return{type:"ThisTypeAnnotation"}},exports.throwStatement=function(argument){const node={type:"ThrowStatement",argument},defs=NODE_FIELDS.ThrowStatement;return validate(defs.argument,node,"argument",argument,1),node},exports.topicReference=function(){return{type:"TopicReference"}},exports.tryStatement=function(block,handler=null,finalizer=null){const node={type:"TryStatement",block,handler,finalizer},defs=NODE_FIELDS.TryStatement;return validate(defs.block,node,"block",block,1),validate(defs.handler,node,"handler",handler,1),validate(defs.finalizer,node,"finalizer",finalizer,1),node},exports.tSAnyKeyword=exports.tsAnyKeyword=function(){return{type:"TSAnyKeyword"}},exports.tSArrayType=exports.tsArrayType=function(elementType){const node={type:"TSArrayType",elementType},defs=NODE_FIELDS.TSArrayType;return validate(defs.elementType,node,"elementType",elementType,1),node},exports.tSAsExpression=exports.tsAsExpression=function(expression,typeAnnotation){const node={type:"TSAsExpression",expression,typeAnnotation},defs=NODE_FIELDS.TSAsExpression;return validate(defs.expression,node,"expression",expression,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSBigIntKeyword=exports.tsBigIntKeyword=function(){return{type:"TSBigIntKeyword"}},exports.tSBooleanKeyword=exports.tsBooleanKeyword=function(){return{type:"TSBooleanKeyword"}},exports.tSCallSignatureDeclaration=exports.tsCallSignatureDeclaration=function(typeParameters=null,parameters,typeAnnotation=null){const node={type:"TSCallSignatureDeclaration",typeParameters,parameters,typeAnnotation},defs=NODE_FIELDS.TSCallSignatureDeclaration;return validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.parameters,node,"parameters",parameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSConditionalType=exports.tsConditionalType=function(checkType,extendsType,trueType,falseType){const node={type:"TSConditionalType",checkType,extendsType,trueType,falseType},defs=NODE_FIELDS.TSConditionalType;return validate(defs.checkType,node,"checkType",checkType,1),validate(defs.extendsType,node,"extendsType",extendsType,1),validate(defs.trueType,node,"trueType",trueType,1),validate(defs.falseType,node,"falseType",falseType,1),node},exports.tSConstructSignatureDeclaration=exports.tsConstructSignatureDeclaration=function(typeParameters=null,parameters,typeAnnotation=null){const node={type:"TSConstructSignatureDeclaration",typeParameters,parameters,typeAnnotation},defs=NODE_FIELDS.TSConstructSignatureDeclaration;return validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.parameters,node,"parameters",parameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSConstructorType=exports.tsConstructorType=function(typeParameters=null,parameters,typeAnnotation=null){const node={type:"TSConstructorType",typeParameters,parameters,typeAnnotation},defs=NODE_FIELDS.TSConstructorType;return validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.parameters,node,"parameters",parameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSDeclareFunction=exports.tsDeclareFunction=function(id=null,typeParameters=null,params,returnType=null){const node={type:"TSDeclareFunction",id,typeParameters,params,returnType},defs=NODE_FIELDS.TSDeclareFunction;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.params,node,"params",params,1),validate(defs.returnType,node,"returnType",returnType,1),node},exports.tSDeclareMethod=exports.tsDeclareMethod=function(decorators=null,key,typeParameters=null,params,returnType=null){const node={type:"TSDeclareMethod",decorators,key,typeParameters,params,returnType},defs=NODE_FIELDS.TSDeclareMethod;return validate(defs.decorators,node,"decorators",decorators,1),validate(defs.key,node,"key",key,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.params,node,"params",params,1),validate(defs.returnType,node,"returnType",returnType,1),node},exports.tSEnumBody=exports.tsEnumBody=function(members){const node={type:"TSEnumBody",members},defs=NODE_FIELDS.TSEnumBody;return validate(defs.members,node,"members",members,1),node},exports.tSEnumDeclaration=exports.tsEnumDeclaration=function(id,members){const node={type:"TSEnumDeclaration",id,members},defs=NODE_FIELDS.TSEnumDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.members,node,"members",members,1),node},exports.tSEnumMember=exports.tsEnumMember=function(id,initializer=null){const node={type:"TSEnumMember",id,initializer},defs=NODE_FIELDS.TSEnumMember;return validate(defs.id,node,"id",id,1),validate(defs.initializer,node,"initializer",initializer,1),node},exports.tSExportAssignment=exports.tsExportAssignment=function(expression){const node={type:"TSExportAssignment",expression},defs=NODE_FIELDS.TSExportAssignment;return validate(defs.expression,node,"expression",expression,1),node},exports.tSExpressionWithTypeArguments=exports.tsExpressionWithTypeArguments=function(expression,typeParameters=null){const node={type:"TSExpressionWithTypeArguments",expression,typeParameters},defs=NODE_FIELDS.TSExpressionWithTypeArguments;return validate(defs.expression,node,"expression",expression,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.tSExternalModuleReference=exports.tsExternalModuleReference=function(expression){const node={type:"TSExternalModuleReference",expression},defs=NODE_FIELDS.TSExternalModuleReference;return validate(defs.expression,node,"expression",expression,1),node},exports.tSFunctionType=exports.tsFunctionType=function(typeParameters=null,parameters,typeAnnotation=null){const node={type:"TSFunctionType",typeParameters,parameters,typeAnnotation},defs=NODE_FIELDS.TSFunctionType;return validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.parameters,node,"parameters",parameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSImportEqualsDeclaration=exports.tsImportEqualsDeclaration=function(id,moduleReference){const node={type:"TSImportEqualsDeclaration",id,moduleReference,isExport:null},defs=NODE_FIELDS.TSImportEqualsDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.moduleReference,node,"moduleReference",moduleReference,1),node},exports.tSImportType=exports.tsImportType=function(argument,qualifier=null,typeParameters=null){const node={type:"TSImportType",argument,qualifier,typeParameters},defs=NODE_FIELDS.TSImportType;return validate(defs.argument,node,"argument",argument,1),validate(defs.qualifier,node,"qualifier",qualifier,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.tSIndexSignature=exports.tsIndexSignature=function(parameters,typeAnnotation=null){const node={type:"TSIndexSignature",parameters,typeAnnotation},defs=NODE_FIELDS.TSIndexSignature;return validate(defs.parameters,node,"parameters",parameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSIndexedAccessType=exports.tsIndexedAccessType=function(objectType,indexType){const node={type:"TSIndexedAccessType",objectType,indexType},defs=NODE_FIELDS.TSIndexedAccessType;return validate(defs.objectType,node,"objectType",objectType,1),validate(defs.indexType,node,"indexType",indexType,1),node},exports.tSInferType=exports.tsInferType=function(typeParameter){const node={type:"TSInferType",typeParameter},defs=NODE_FIELDS.TSInferType;return validate(defs.typeParameter,node,"typeParameter",typeParameter,1),node},exports.tSInstantiationExpression=exports.tsInstantiationExpression=function(expression,typeParameters=null){const node={type:"TSInstantiationExpression",expression,typeParameters},defs=NODE_FIELDS.TSInstantiationExpression;return validate(defs.expression,node,"expression",expression,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.tSInterfaceBody=exports.tsInterfaceBody=function(body){const node={type:"TSInterfaceBody",body},defs=NODE_FIELDS.TSInterfaceBody;return validate(defs.body,node,"body",body,1),node},exports.tSInterfaceDeclaration=exports.tsInterfaceDeclaration=function(id,typeParameters=null,_extends=null,body){const node={type:"TSInterfaceDeclaration",id,typeParameters,extends:_extends,body},defs=NODE_FIELDS.TSInterfaceDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.extends,node,"extends",_extends,1),validate(defs.body,node,"body",body,1),node},exports.tSIntersectionType=exports.tsIntersectionType=function(types){const node={type:"TSIntersectionType",types},defs=NODE_FIELDS.TSIntersectionType;return validate(defs.types,node,"types",types,1),node},exports.tSIntrinsicKeyword=exports.tsIntrinsicKeyword=function(){return{type:"TSIntrinsicKeyword"}},exports.tSLiteralType=exports.tsLiteralType=function(literal){const node={type:"TSLiteralType",literal},defs=NODE_FIELDS.TSLiteralType;return validate(defs.literal,node,"literal",literal,1),node},exports.tSMappedType=exports.tsMappedType=function(typeParameter,typeAnnotation=null,nameType=null){const node={type:"TSMappedType",typeParameter,typeAnnotation,nameType},defs=NODE_FIELDS.TSMappedType;return validate(defs.typeParameter,node,"typeParameter",typeParameter,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),validate(defs.nameType,node,"nameType",nameType,1),node},exports.tSMethodSignature=exports.tsMethodSignature=function(key,typeParameters=null,parameters,typeAnnotation=null){const node={type:"TSMethodSignature",key,typeParameters,parameters,typeAnnotation,kind:null},defs=NODE_FIELDS.TSMethodSignature;return validate(defs.key,node,"key",key,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.parameters,node,"parameters",parameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSModuleBlock=exports.tsModuleBlock=function(body){const node={type:"TSModuleBlock",body},defs=NODE_FIELDS.TSModuleBlock;return validate(defs.body,node,"body",body,1),node},exports.tSModuleDeclaration=exports.tsModuleDeclaration=function(id,body){const node={type:"TSModuleDeclaration",id,body,kind:null},defs=NODE_FIELDS.TSModuleDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.body,node,"body",body,1),node},exports.tSNamedTupleMember=exports.tsNamedTupleMember=function(label,elementType,optional=!1){const node={type:"TSNamedTupleMember",label,elementType,optional},defs=NODE_FIELDS.TSNamedTupleMember;return validate(defs.label,node,"label",label,1),validate(defs.elementType,node,"elementType",elementType,1),validate(defs.optional,node,"optional",optional),node},exports.tSNamespaceExportDeclaration=exports.tsNamespaceExportDeclaration=function(id){const node={type:"TSNamespaceExportDeclaration",id},defs=NODE_FIELDS.TSNamespaceExportDeclaration;return validate(defs.id,node,"id",id,1),node},exports.tSNeverKeyword=exports.tsNeverKeyword=function(){return{type:"TSNeverKeyword"}},exports.tSNonNullExpression=exports.tsNonNullExpression=function(expression){const node={type:"TSNonNullExpression",expression},defs=NODE_FIELDS.TSNonNullExpression;return validate(defs.expression,node,"expression",expression,1),node},exports.tSNullKeyword=exports.tsNullKeyword=function(){return{type:"TSNullKeyword"}},exports.tSNumberKeyword=exports.tsNumberKeyword=function(){return{type:"TSNumberKeyword"}},exports.tSObjectKeyword=exports.tsObjectKeyword=function(){return{type:"TSObjectKeyword"}},exports.tSOptionalType=exports.tsOptionalType=function(typeAnnotation){const node={type:"TSOptionalType",typeAnnotation},defs=NODE_FIELDS.TSOptionalType;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSParameterProperty=exports.tsParameterProperty=function(parameter){const node={type:"TSParameterProperty",parameter},defs=NODE_FIELDS.TSParameterProperty;return validate(defs.parameter,node,"parameter",parameter,1),node},exports.tSParenthesizedType=exports.tsParenthesizedType=function(typeAnnotation){const node={type:"TSParenthesizedType",typeAnnotation},defs=NODE_FIELDS.TSParenthesizedType;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSPropertySignature=exports.tsPropertySignature=function(key,typeAnnotation=null){const node={type:"TSPropertySignature",key,typeAnnotation},defs=NODE_FIELDS.TSPropertySignature;return validate(defs.key,node,"key",key,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSQualifiedName=exports.tsQualifiedName=function(left,right){const node={type:"TSQualifiedName",left,right},defs=NODE_FIELDS.TSQualifiedName;return validate(defs.left,node,"left",left,1),validate(defs.right,node,"right",right,1),node},exports.tSRestType=exports.tsRestType=function(typeAnnotation){const node={type:"TSRestType",typeAnnotation},defs=NODE_FIELDS.TSRestType;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSSatisfiesExpression=exports.tsSatisfiesExpression=function(expression,typeAnnotation){const node={type:"TSSatisfiesExpression",expression,typeAnnotation},defs=NODE_FIELDS.TSSatisfiesExpression;return validate(defs.expression,node,"expression",expression,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSStringKeyword=exports.tsStringKeyword=function(){return{type:"TSStringKeyword"}},exports.tSSymbolKeyword=exports.tsSymbolKeyword=function(){return{type:"TSSymbolKeyword"}},exports.tSTemplateLiteralType=exports.tsTemplateLiteralType=function(quasis,types){const node={type:"TSTemplateLiteralType",quasis,types},defs=NODE_FIELDS.TSTemplateLiteralType;return validate(defs.quasis,node,"quasis",quasis,1),validate(defs.types,node,"types",types,1),node},exports.tSThisType=exports.tsThisType=function(){return{type:"TSThisType"}},exports.tSTupleType=exports.tsTupleType=function(elementTypes){const node={type:"TSTupleType",elementTypes},defs=NODE_FIELDS.TSTupleType;return validate(defs.elementTypes,node,"elementTypes",elementTypes,1),node},exports.tSTypeAliasDeclaration=exports.tsTypeAliasDeclaration=function(id,typeParameters=null,typeAnnotation){const node={type:"TSTypeAliasDeclaration",id,typeParameters,typeAnnotation},defs=NODE_FIELDS.TSTypeAliasDeclaration;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSTypeAnnotation=exports.tsTypeAnnotation=function(typeAnnotation){const node={type:"TSTypeAnnotation",typeAnnotation},defs=NODE_FIELDS.TSTypeAnnotation;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.tSTypeAssertion=exports.tsTypeAssertion=function(typeAnnotation,expression){const node={type:"TSTypeAssertion",typeAnnotation,expression},defs=NODE_FIELDS.TSTypeAssertion;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),validate(defs.expression,node,"expression",expression,1),node},exports.tSTypeLiteral=exports.tsTypeLiteral=function(members){const node={type:"TSTypeLiteral",members},defs=NODE_FIELDS.TSTypeLiteral;return validate(defs.members,node,"members",members,1),node},exports.tSTypeOperator=exports.tsTypeOperator=function(typeAnnotation,operator){const node={type:"TSTypeOperator",typeAnnotation,operator},defs=NODE_FIELDS.TSTypeOperator;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),validate(defs.operator,node,"operator",operator),node},exports.tSTypeParameter=exports.tsTypeParameter=function(constraint=null,_default=null,name){const node={type:"TSTypeParameter",constraint,default:_default,name},defs=NODE_FIELDS.TSTypeParameter;return validate(defs.constraint,node,"constraint",constraint,1),validate(defs.default,node,"default",_default,1),validate(defs.name,node,"name",name),node},exports.tSTypeParameterDeclaration=exports.tsTypeParameterDeclaration=function(params){const node={type:"TSTypeParameterDeclaration",params},defs=NODE_FIELDS.TSTypeParameterDeclaration;return validate(defs.params,node,"params",params,1),node},exports.tSTypeParameterInstantiation=exports.tsTypeParameterInstantiation=function(params){const node={type:"TSTypeParameterInstantiation",params},defs=NODE_FIELDS.TSTypeParameterInstantiation;return validate(defs.params,node,"params",params,1),node},exports.tSTypePredicate=exports.tsTypePredicate=function(parameterName,typeAnnotation=null,asserts=null){const node={type:"TSTypePredicate",parameterName,typeAnnotation,asserts},defs=NODE_FIELDS.TSTypePredicate;return validate(defs.parameterName,node,"parameterName",parameterName,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),validate(defs.asserts,node,"asserts",asserts),node},exports.tSTypeQuery=exports.tsTypeQuery=function(exprName,typeParameters=null){const node={type:"TSTypeQuery",exprName,typeParameters},defs=NODE_FIELDS.TSTypeQuery;return validate(defs.exprName,node,"exprName",exprName,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.tSTypeReference=exports.tsTypeReference=function(typeName,typeParameters=null){const node={type:"TSTypeReference",typeName,typeParameters},defs=NODE_FIELDS.TSTypeReference;return validate(defs.typeName,node,"typeName",typeName,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),node},exports.tSUndefinedKeyword=exports.tsUndefinedKeyword=function(){return{type:"TSUndefinedKeyword"}},exports.tSUnionType=exports.tsUnionType=function(types){const node={type:"TSUnionType",types},defs=NODE_FIELDS.TSUnionType;return validate(defs.types,node,"types",types,1),node},exports.tSUnknownKeyword=exports.tsUnknownKeyword=function(){return{type:"TSUnknownKeyword"}},exports.tSVoidKeyword=exports.tsVoidKeyword=function(){return{type:"TSVoidKeyword"}},exports.tupleExpression=function(elements=[]){const node={type:"TupleExpression",elements},defs=NODE_FIELDS.TupleExpression;return validate(defs.elements,node,"elements",elements,1),node},exports.tupleTypeAnnotation=function(types){const node={type:"TupleTypeAnnotation",types},defs=NODE_FIELDS.TupleTypeAnnotation;return validate(defs.types,node,"types",types,1),node},exports.typeAlias=function(id,typeParameters=null,right){const node={type:"TypeAlias",id,typeParameters,right},defs=NODE_FIELDS.TypeAlias;return validate(defs.id,node,"id",id,1),validate(defs.typeParameters,node,"typeParameters",typeParameters,1),validate(defs.right,node,"right",right,1),node},exports.typeAnnotation=function(typeAnnotation){const node={type:"TypeAnnotation",typeAnnotation},defs=NODE_FIELDS.TypeAnnotation;return validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.typeCastExpression=function(expression,typeAnnotation){const node={type:"TypeCastExpression",expression,typeAnnotation},defs=NODE_FIELDS.TypeCastExpression;return validate(defs.expression,node,"expression",expression,1),validate(defs.typeAnnotation,node,"typeAnnotation",typeAnnotation,1),node},exports.typeParameter=function(bound=null,_default=null,variance=null){const node={type:"TypeParameter",bound,default:_default,variance,name:null},defs=NODE_FIELDS.TypeParameter;return validate(defs.bound,node,"bound",bound,1),validate(defs.default,node,"default",_default,1),validate(defs.variance,node,"variance",variance,1),node},exports.typeParameterDeclaration=function(params){const node={type:"TypeParameterDeclaration",params},defs=NODE_FIELDS.TypeParameterDeclaration;return validate(defs.params,node,"params",params,1),node},exports.typeParameterInstantiation=function(params){const node={type:"TypeParameterInstantiation",params},defs=NODE_FIELDS.TypeParameterInstantiation;return validate(defs.params,node,"params",params,1),node},exports.typeofTypeAnnotation=function(argument){const node={type:"TypeofTypeAnnotation",argument},defs=NODE_FIELDS.TypeofTypeAnnotation;return validate(defs.argument,node,"argument",argument,1),node},exports.unaryExpression=function(operator,argument,prefix=!0){const node={type:"UnaryExpression",operator,argument,prefix},defs=NODE_FIELDS.UnaryExpression;return validate(defs.operator,node,"operator",operator),validate(defs.argument,node,"argument",argument,1),validate(defs.prefix,node,"prefix",prefix),node},exports.unionTypeAnnotation=function(types){const node={type:"UnionTypeAnnotation",types},defs=NODE_FIELDS.UnionTypeAnnotation;return validate(defs.types,node,"types",types,1),node},exports.updateExpression=function(operator,argument,prefix=!1){const node={type:"UpdateExpression",operator,argument,prefix},defs=NODE_FIELDS.UpdateExpression;return validate(defs.operator,node,"operator",operator),validate(defs.argument,node,"argument",argument,1),validate(defs.prefix,node,"prefix",prefix),node},exports.v8IntrinsicIdentifier=function(name){const node={type:"V8IntrinsicIdentifier",name},defs=NODE_FIELDS.V8IntrinsicIdentifier;return validate(defs.name,node,"name",name),node},exports.variableDeclaration=function(kind,declarations){const node={type:"VariableDeclaration",kind,declarations},defs=NODE_FIELDS.VariableDeclaration;return validate(defs.kind,node,"kind",kind),validate(defs.declarations,node,"declarations",declarations,1),node},exports.variableDeclarator=function(id,init=null){const node={type:"VariableDeclarator",id,init},defs=NODE_FIELDS.VariableDeclarator;return validate(defs.id,node,"id",id,1),validate(defs.init,node,"init",init,1),node},exports.variance=function(kind){const node={type:"Variance",kind},defs=NODE_FIELDS.Variance;return validate(defs.kind,node,"kind",kind),node},exports.voidPattern=function(){return{type:"VoidPattern"}},exports.voidTypeAnnotation=function(){return{type:"VoidTypeAnnotation"}},exports.whileStatement=function(test,body){const node={type:"WhileStatement",test,body},defs=NODE_FIELDS.WhileStatement;return validate(defs.test,node,"test",test,1),validate(defs.body,node,"body",body,1),node},exports.withStatement=function(object,body){const node={type:"WithStatement",object,body},defs=NODE_FIELDS.WithStatement;return validate(defs.object,node,"object",object,1),validate(defs.body,node,"body",body,1),node},exports.yieldExpression=function(argument=null,delegate=!1){const node={type:"YieldExpression",argument,delegate},defs=NODE_FIELDS.YieldExpression;return validate(defs.argument,node,"argument",argument,1),validate(defs.delegate,node,"delegate",delegate),node};var _validate=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/validate.js"),_deprecationWarning=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/deprecationWarning.js"),utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js");const{validateInternal:validate}=_validate,{NODE_FIELDS}=utils;function numericLiteral(value){const node={type:"NumericLiteral",value},defs=NODE_FIELDS.NumericLiteral;return validate(defs.value,node,"value",value),node}function regExpLiteral(pattern,flags=""){const node={type:"RegExpLiteral",pattern,flags},defs=NODE_FIELDS.RegExpLiteral;return validate(defs.pattern,node,"pattern",pattern),validate(defs.flags,node,"flags",flags),node}function restElement(argument){const node={type:"RestElement",argument},defs=NODE_FIELDS.RestElement;return validate(defs.argument,node,"argument",argument,1),node}function spreadElement(argument){const node={type:"SpreadElement",argument},defs=NODE_FIELDS.SpreadElement;return validate(defs.argument,node,"argument",argument,1),node}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/uppercase.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JSXIdentifier=exports.JSXFragment=exports.JSXExpressionContainer=exports.JSXEmptyExpression=exports.JSXElement=exports.JSXClosingFragment=exports.JSXClosingElement=exports.JSXAttribute=exports.IntersectionTypeAnnotation=exports.InterpreterDirective=exports.InterfaceTypeAnnotation=exports.InterfaceExtends=exports.InterfaceDeclaration=exports.InferredPredicate=exports.IndexedAccessType=exports.ImportSpecifier=exports.ImportNamespaceSpecifier=exports.ImportExpression=exports.ImportDefaultSpecifier=exports.ImportDeclaration=exports.ImportAttribute=exports.Import=exports.IfStatement=exports.Identifier=exports.GenericTypeAnnotation=exports.FunctionTypeParam=exports.FunctionTypeAnnotation=exports.FunctionExpression=exports.FunctionDeclaration=exports.ForStatement=exports.ForOfStatement=exports.ForInStatement=exports.File=exports.ExpressionStatement=exports.ExportSpecifier=exports.ExportNamespaceSpecifier=exports.ExportNamedDeclaration=exports.ExportDefaultSpecifier=exports.ExportDefaultDeclaration=exports.ExportAllDeclaration=exports.ExistsTypeAnnotation=exports.EnumSymbolBody=exports.EnumStringMember=exports.EnumStringBody=exports.EnumNumberMember=exports.EnumNumberBody=exports.EnumDefaultedMember=exports.EnumDeclaration=exports.EnumBooleanMember=exports.EnumBooleanBody=exports.EmptyTypeAnnotation=exports.EmptyStatement=exports.DoWhileStatement=exports.DoExpression=exports.DirectiveLiteral=exports.Directive=exports.Decorator=exports.DeclaredPredicate=exports.DeclareVariable=exports.DeclareTypeAlias=exports.DeclareOpaqueType=exports.DeclareModuleExports=exports.DeclareModule=exports.DeclareInterface=exports.DeclareFunction=exports.DeclareExportDeclaration=exports.DeclareExportAllDeclaration=exports.DeclareClass=exports.DecimalLiteral=exports.DebuggerStatement=exports.ContinueStatement=exports.ConditionalExpression=exports.ClassProperty=exports.ClassPrivateProperty=exports.ClassPrivateMethod=exports.ClassMethod=exports.ClassImplements=exports.ClassExpression=exports.ClassDeclaration=exports.ClassBody=exports.ClassAccessorProperty=exports.CatchClause=exports.CallExpression=exports.BreakStatement=exports.BooleanTypeAnnotation=exports.BooleanLiteralTypeAnnotation=exports.BooleanLiteral=exports.BlockStatement=exports.BindExpression=exports.BinaryExpression=exports.BigIntLiteral=exports.AwaitExpression=exports.AssignmentPattern=exports.AssignmentExpression=exports.ArrowFunctionExpression=exports.ArrayTypeAnnotation=exports.ArrayPattern=exports.ArrayExpression=exports.ArgumentPlaceholder=exports.AnyTypeAnnotation=void 0,exports.TSNumberKeyword=exports.TSNullKeyword=exports.TSNonNullExpression=exports.TSNeverKeyword=exports.TSNamespaceExportDeclaration=exports.TSNamedTupleMember=exports.TSModuleDeclaration=exports.TSModuleBlock=exports.TSMethodSignature=exports.TSMappedType=exports.TSLiteralType=exports.TSIntrinsicKeyword=exports.TSIntersectionType=exports.TSInterfaceDeclaration=exports.TSInterfaceBody=exports.TSInstantiationExpression=exports.TSInferType=exports.TSIndexedAccessType=exports.TSIndexSignature=exports.TSImportType=exports.TSImportEqualsDeclaration=exports.TSFunctionType=exports.TSExternalModuleReference=exports.TSExpressionWithTypeArguments=exports.TSExportAssignment=exports.TSEnumMember=exports.TSEnumDeclaration=exports.TSEnumBody=exports.TSDeclareMethod=exports.TSDeclareFunction=exports.TSConstructorType=exports.TSConstructSignatureDeclaration=exports.TSConditionalType=exports.TSCallSignatureDeclaration=exports.TSBooleanKeyword=exports.TSBigIntKeyword=exports.TSAsExpression=exports.TSArrayType=exports.TSAnyKeyword=exports.SymbolTypeAnnotation=exports.SwitchStatement=exports.SwitchCase=exports.Super=exports.StringTypeAnnotation=exports.StringLiteralTypeAnnotation=exports.StringLiteral=exports.StaticBlock=exports.SpreadProperty=exports.SpreadElement=exports.SequenceExpression=exports.ReturnStatement=exports.RestProperty=exports.RestElement=exports.RegexLiteral=exports.RegExpLiteral=exports.RecordExpression=exports.QualifiedTypeIdentifier=exports.Program=exports.PrivateName=exports.Placeholder=exports.PipelineTopicExpression=exports.PipelinePrimaryTopicReference=exports.PipelineBareFunction=exports.ParenthesizedExpression=exports.OptionalMemberExpression=exports.OptionalIndexedAccessType=exports.OptionalCallExpression=exports.OpaqueType=exports.ObjectTypeSpreadProperty=exports.ObjectTypeProperty=exports.ObjectTypeInternalSlot=exports.ObjectTypeIndexer=exports.ObjectTypeCallProperty=exports.ObjectTypeAnnotation=exports.ObjectProperty=exports.ObjectPattern=exports.ObjectMethod=exports.ObjectExpression=exports.NumericLiteral=exports.NumberTypeAnnotation=exports.NumberLiteralTypeAnnotation=exports.NumberLiteral=exports.NullableTypeAnnotation=exports.NullLiteralTypeAnnotation=exports.NullLiteral=exports.Noop=exports.NewExpression=exports.ModuleExpression=exports.MixedTypeAnnotation=exports.MetaProperty=exports.MemberExpression=exports.LogicalExpression=exports.LabeledStatement=exports.JSXText=exports.JSXSpreadChild=exports.JSXSpreadAttribute=exports.JSXOpeningFragment=exports.JSXOpeningElement=exports.JSXNamespacedName=exports.JSXMemberExpression=void 0,exports.YieldExpression=exports.WithStatement=exports.WhileStatement=exports.VoidTypeAnnotation=exports.VoidPattern=exports.Variance=exports.VariableDeclarator=exports.VariableDeclaration=exports.V8IntrinsicIdentifier=exports.UpdateExpression=exports.UnionTypeAnnotation=exports.UnaryExpression=exports.TypeofTypeAnnotation=exports.TypeParameterInstantiation=exports.TypeParameterDeclaration=exports.TypeParameter=exports.TypeCastExpression=exports.TypeAnnotation=exports.TypeAlias=exports.TupleTypeAnnotation=exports.TupleExpression=exports.TryStatement=exports.TopicReference=exports.ThrowStatement=exports.ThisTypeAnnotation=exports.ThisExpression=exports.TemplateLiteral=exports.TemplateElement=exports.TaggedTemplateExpression=exports.TSVoidKeyword=exports.TSUnknownKeyword=exports.TSUnionType=exports.TSUndefinedKeyword=exports.TSTypeReference=exports.TSTypeQuery=exports.TSTypePredicate=exports.TSTypeParameterInstantiation=exports.TSTypeParameterDeclaration=exports.TSTypeParameter=exports.TSTypeOperator=exports.TSTypeLiteral=exports.TSTypeAssertion=exports.TSTypeAnnotation=exports.TSTypeAliasDeclaration=exports.TSTupleType=exports.TSThisType=exports.TSTemplateLiteralType=exports.TSSymbolKeyword=exports.TSStringKeyword=exports.TSSatisfiesExpression=exports.TSRestType=exports.TSQualifiedName=exports.TSPropertySignature=exports.TSParenthesizedType=exports.TSParameterProperty=exports.TSOptionalType=exports.TSObjectKeyword=void 0;var b=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/lowercase.js");__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/deprecationWarning.js");function alias(lowercase){return b[lowercase]}exports.ArrayExpression=alias("arrayExpression"),exports.AssignmentExpression=alias("assignmentExpression"),exports.BinaryExpression=alias("binaryExpression"),exports.InterpreterDirective=alias("interpreterDirective"),exports.Directive=alias("directive"),exports.DirectiveLiteral=alias("directiveLiteral"),exports.BlockStatement=alias("blockStatement"),exports.BreakStatement=alias("breakStatement"),exports.CallExpression=alias("callExpression"),exports.CatchClause=alias("catchClause"),exports.ConditionalExpression=alias("conditionalExpression"),exports.ContinueStatement=alias("continueStatement"),exports.DebuggerStatement=alias("debuggerStatement"),exports.DoWhileStatement=alias("doWhileStatement"),exports.EmptyStatement=alias("emptyStatement"),exports.ExpressionStatement=alias("expressionStatement"),exports.File=alias("file"),exports.ForInStatement=alias("forInStatement"),exports.ForStatement=alias("forStatement"),exports.FunctionDeclaration=alias("functionDeclaration"),exports.FunctionExpression=alias("functionExpression"),exports.Identifier=alias("identifier"),exports.IfStatement=alias("ifStatement"),exports.LabeledStatement=alias("labeledStatement"),exports.StringLiteral=alias("stringLiteral"),exports.NumericLiteral=alias("numericLiteral"),exports.NullLiteral=alias("nullLiteral"),exports.BooleanLiteral=alias("booleanLiteral"),exports.RegExpLiteral=alias("regExpLiteral"),exports.LogicalExpression=alias("logicalExpression"),exports.MemberExpression=alias("memberExpression"),exports.NewExpression=alias("newExpression"),exports.Program=alias("program"),exports.ObjectExpression=alias("objectExpression"),exports.ObjectMethod=alias("objectMethod"),exports.ObjectProperty=alias("objectProperty"),exports.RestElement=alias("restElement"),exports.ReturnStatement=alias("returnStatement"),exports.SequenceExpression=alias("sequenceExpression"),exports.ParenthesizedExpression=alias("parenthesizedExpression"),exports.SwitchCase=alias("switchCase"),exports.SwitchStatement=alias("switchStatement"),exports.ThisExpression=alias("thisExpression"),exports.ThrowStatement=alias("throwStatement"),exports.TryStatement=alias("tryStatement"),exports.UnaryExpression=alias("unaryExpression"),exports.UpdateExpression=alias("updateExpression"),exports.VariableDeclaration=alias("variableDeclaration"),exports.VariableDeclarator=alias("variableDeclarator"),exports.WhileStatement=alias("whileStatement"),exports.WithStatement=alias("withStatement"),exports.AssignmentPattern=alias("assignmentPattern"),exports.ArrayPattern=alias("arrayPattern"),exports.ArrowFunctionExpression=alias("arrowFunctionExpression"),exports.ClassBody=alias("classBody"),exports.ClassExpression=alias("classExpression"),exports.ClassDeclaration=alias("classDeclaration"),exports.ExportAllDeclaration=alias("exportAllDeclaration"),exports.ExportDefaultDeclaration=alias("exportDefaultDeclaration"),exports.ExportNamedDeclaration=alias("exportNamedDeclaration"),exports.ExportSpecifier=alias("exportSpecifier"),exports.ForOfStatement=alias("forOfStatement"),exports.ImportDeclaration=alias("importDeclaration"),exports.ImportDefaultSpecifier=alias("importDefaultSpecifier"),exports.ImportNamespaceSpecifier=alias("importNamespaceSpecifier"),exports.ImportSpecifier=alias("importSpecifier"),exports.ImportExpression=alias("importExpression"),exports.MetaProperty=alias("metaProperty"),exports.ClassMethod=alias("classMethod"),exports.ObjectPattern=alias("objectPattern"),exports.SpreadElement=alias("spreadElement"),exports.Super=alias("super"),exports.TaggedTemplateExpression=alias("taggedTemplateExpression"),exports.TemplateElement=alias("templateElement"),exports.TemplateLiteral=alias("templateLiteral"),exports.YieldExpression=alias("yieldExpression"),exports.AwaitExpression=alias("awaitExpression"),exports.Import=alias("import"),exports.BigIntLiteral=alias("bigIntLiteral"),exports.ExportNamespaceSpecifier=alias("exportNamespaceSpecifier"),exports.OptionalMemberExpression=alias("optionalMemberExpression"),exports.OptionalCallExpression=alias("optionalCallExpression"),exports.ClassProperty=alias("classProperty"),exports.ClassAccessorProperty=alias("classAccessorProperty"),exports.ClassPrivateProperty=alias("classPrivateProperty"),exports.ClassPrivateMethod=alias("classPrivateMethod"),exports.PrivateName=alias("privateName"),exports.StaticBlock=alias("staticBlock"),exports.ImportAttribute=alias("importAttribute"),exports.AnyTypeAnnotation=alias("anyTypeAnnotation"),exports.ArrayTypeAnnotation=alias("arrayTypeAnnotation"),exports.BooleanTypeAnnotation=alias("booleanTypeAnnotation"),exports.BooleanLiteralTypeAnnotation=alias("booleanLiteralTypeAnnotation"),exports.NullLiteralTypeAnnotation=alias("nullLiteralTypeAnnotation"),exports.ClassImplements=alias("classImplements"),exports.DeclareClass=alias("declareClass"),exports.DeclareFunction=alias("declareFunction"),exports.DeclareInterface=alias("declareInterface"),exports.DeclareModule=alias("declareModule"),exports.DeclareModuleExports=alias("declareModuleExports"),exports.DeclareTypeAlias=alias("declareTypeAlias"),exports.DeclareOpaqueType=alias("declareOpaqueType"),exports.DeclareVariable=alias("declareVariable"),exports.DeclareExportDeclaration=alias("declareExportDeclaration"),exports.DeclareExportAllDeclaration=alias("declareExportAllDeclaration"),exports.DeclaredPredicate=alias("declaredPredicate"),exports.ExistsTypeAnnotation=alias("existsTypeAnnotation"),exports.FunctionTypeAnnotation=alias("functionTypeAnnotation"),exports.FunctionTypeParam=alias("functionTypeParam"),exports.GenericTypeAnnotation=alias("genericTypeAnnotation"),exports.InferredPredicate=alias("inferredPredicate"),exports.InterfaceExtends=alias("interfaceExtends"),exports.InterfaceDeclaration=alias("interfaceDeclaration"),exports.InterfaceTypeAnnotation=alias("interfaceTypeAnnotation"),exports.IntersectionTypeAnnotation=alias("intersectionTypeAnnotation"),exports.MixedTypeAnnotation=alias("mixedTypeAnnotation"),exports.EmptyTypeAnnotation=alias("emptyTypeAnnotation"),exports.NullableTypeAnnotation=alias("nullableTypeAnnotation"),exports.NumberLiteralTypeAnnotation=alias("numberLiteralTypeAnnotation"),exports.NumberTypeAnnotation=alias("numberTypeAnnotation"),exports.ObjectTypeAnnotation=alias("objectTypeAnnotation"),exports.ObjectTypeInternalSlot=alias("objectTypeInternalSlot"),exports.ObjectTypeCallProperty=alias("objectTypeCallProperty"),exports.ObjectTypeIndexer=alias("objectTypeIndexer"),exports.ObjectTypeProperty=alias("objectTypeProperty"),exports.ObjectTypeSpreadProperty=alias("objectTypeSpreadProperty"),exports.OpaqueType=alias("opaqueType"),exports.QualifiedTypeIdentifier=alias("qualifiedTypeIdentifier"),exports.StringLiteralTypeAnnotation=alias("stringLiteralTypeAnnotation"),exports.StringTypeAnnotation=alias("stringTypeAnnotation"),exports.SymbolTypeAnnotation=alias("symbolTypeAnnotation"),exports.ThisTypeAnnotation=alias("thisTypeAnnotation"),exports.TupleTypeAnnotation=alias("tupleTypeAnnotation"),exports.TypeofTypeAnnotation=alias("typeofTypeAnnotation"),exports.TypeAlias=alias("typeAlias"),exports.TypeAnnotation=alias("typeAnnotation"),exports.TypeCastExpression=alias("typeCastExpression"),exports.TypeParameter=alias("typeParameter"),exports.TypeParameterDeclaration=alias("typeParameterDeclaration"),exports.TypeParameterInstantiation=alias("typeParameterInstantiation"),exports.UnionTypeAnnotation=alias("unionTypeAnnotation"),exports.Variance=alias("variance"),exports.VoidTypeAnnotation=alias("voidTypeAnnotation"),exports.EnumDeclaration=alias("enumDeclaration"),exports.EnumBooleanBody=alias("enumBooleanBody"),exports.EnumNumberBody=alias("enumNumberBody"),exports.EnumStringBody=alias("enumStringBody"),exports.EnumSymbolBody=alias("enumSymbolBody"),exports.EnumBooleanMember=alias("enumBooleanMember"),exports.EnumNumberMember=alias("enumNumberMember"),exports.EnumStringMember=alias("enumStringMember"),exports.EnumDefaultedMember=alias("enumDefaultedMember"),exports.IndexedAccessType=alias("indexedAccessType"),exports.OptionalIndexedAccessType=alias("optionalIndexedAccessType"),exports.JSXAttribute=alias("jsxAttribute"),exports.JSXClosingElement=alias("jsxClosingElement"),exports.JSXElement=alias("jsxElement"),exports.JSXEmptyExpression=alias("jsxEmptyExpression"),exports.JSXExpressionContainer=alias("jsxExpressionContainer"),exports.JSXSpreadChild=alias("jsxSpreadChild"),exports.JSXIdentifier=alias("jsxIdentifier"),exports.JSXMemberExpression=alias("jsxMemberExpression"),exports.JSXNamespacedName=alias("jsxNamespacedName"),exports.JSXOpeningElement=alias("jsxOpeningElement"),exports.JSXSpreadAttribute=alias("jsxSpreadAttribute"),exports.JSXText=alias("jsxText"),exports.JSXFragment=alias("jsxFragment"),exports.JSXOpeningFragment=alias("jsxOpeningFragment"),exports.JSXClosingFragment=alias("jsxClosingFragment"),exports.Noop=alias("noop"),exports.Placeholder=alias("placeholder"),exports.V8IntrinsicIdentifier=alias("v8IntrinsicIdentifier"),exports.ArgumentPlaceholder=alias("argumentPlaceholder"),exports.BindExpression=alias("bindExpression"),exports.Decorator=alias("decorator"),exports.DoExpression=alias("doExpression"),exports.ExportDefaultSpecifier=alias("exportDefaultSpecifier"),exports.RecordExpression=alias("recordExpression"),exports.TupleExpression=alias("tupleExpression"),exports.DecimalLiteral=alias("decimalLiteral"),exports.ModuleExpression=alias("moduleExpression"),exports.TopicReference=alias("topicReference"),exports.PipelineTopicExpression=alias("pipelineTopicExpression"),exports.PipelineBareFunction=alias("pipelineBareFunction"),exports.PipelinePrimaryTopicReference=alias("pipelinePrimaryTopicReference"),exports.VoidPattern=alias("voidPattern"),exports.TSParameterProperty=alias("tsParameterProperty"),exports.TSDeclareFunction=alias("tsDeclareFunction"),exports.TSDeclareMethod=alias("tsDeclareMethod"),exports.TSQualifiedName=alias("tsQualifiedName"),exports.TSCallSignatureDeclaration=alias("tsCallSignatureDeclaration"),exports.TSConstructSignatureDeclaration=alias("tsConstructSignatureDeclaration"),exports.TSPropertySignature=alias("tsPropertySignature"),exports.TSMethodSignature=alias("tsMethodSignature"),exports.TSIndexSignature=alias("tsIndexSignature"),exports.TSAnyKeyword=alias("tsAnyKeyword"),exports.TSBooleanKeyword=alias("tsBooleanKeyword"),exports.TSBigIntKeyword=alias("tsBigIntKeyword"),exports.TSIntrinsicKeyword=alias("tsIntrinsicKeyword"),exports.TSNeverKeyword=alias("tsNeverKeyword"),exports.TSNullKeyword=alias("tsNullKeyword"),exports.TSNumberKeyword=alias("tsNumberKeyword"),exports.TSObjectKeyword=alias("tsObjectKeyword"),exports.TSStringKeyword=alias("tsStringKeyword"),exports.TSSymbolKeyword=alias("tsSymbolKeyword"),exports.TSUndefinedKeyword=alias("tsUndefinedKeyword"),exports.TSUnknownKeyword=alias("tsUnknownKeyword"),exports.TSVoidKeyword=alias("tsVoidKeyword"),exports.TSThisType=alias("tsThisType"),exports.TSFunctionType=alias("tsFunctionType"),exports.TSConstructorType=alias("tsConstructorType"),exports.TSTypeReference=alias("tsTypeReference"),exports.TSTypePredicate=alias("tsTypePredicate"),exports.TSTypeQuery=alias("tsTypeQuery"),exports.TSTypeLiteral=alias("tsTypeLiteral"),exports.TSArrayType=alias("tsArrayType"),exports.TSTupleType=alias("tsTupleType"),exports.TSOptionalType=alias("tsOptionalType"),exports.TSRestType=alias("tsRestType"),exports.TSNamedTupleMember=alias("tsNamedTupleMember"),exports.TSUnionType=alias("tsUnionType"),exports.TSIntersectionType=alias("tsIntersectionType"),exports.TSConditionalType=alias("tsConditionalType"),exports.TSInferType=alias("tsInferType"),exports.TSParenthesizedType=alias("tsParenthesizedType"),exports.TSTypeOperator=alias("tsTypeOperator"),exports.TSIndexedAccessType=alias("tsIndexedAccessType"),exports.TSMappedType=alias("tsMappedType"),exports.TSTemplateLiteralType=alias("tsTemplateLiteralType"),exports.TSLiteralType=alias("tsLiteralType"),exports.TSExpressionWithTypeArguments=alias("tsExpressionWithTypeArguments"),exports.TSInterfaceDeclaration=alias("tsInterfaceDeclaration"),exports.TSInterfaceBody=alias("tsInterfaceBody"),exports.TSTypeAliasDeclaration=alias("tsTypeAliasDeclaration"),exports.TSInstantiationExpression=alias("tsInstantiationExpression"),exports.TSAsExpression=alias("tsAsExpression"),exports.TSSatisfiesExpression=alias("tsSatisfiesExpression"),exports.TSTypeAssertion=alias("tsTypeAssertion"),exports.TSEnumBody=alias("tsEnumBody"),exports.TSEnumDeclaration=alias("tsEnumDeclaration"),exports.TSEnumMember=alias("tsEnumMember"),exports.TSModuleDeclaration=alias("tsModuleDeclaration"),exports.TSModuleBlock=alias("tsModuleBlock"),exports.TSImportType=alias("tsImportType"),exports.TSImportEqualsDeclaration=alias("tsImportEqualsDeclaration"),exports.TSExternalModuleReference=alias("tsExternalModuleReference"),exports.TSNonNullExpression=alias("tsNonNullExpression"),exports.TSExportAssignment=alias("tsExportAssignment"),exports.TSNamespaceExportDeclaration=alias("tsNamespaceExportDeclaration"),exports.TSTypeAnnotation=alias("tsTypeAnnotation"),exports.TSTypeParameterInstantiation=alias("tsTypeParameterInstantiation"),exports.TSTypeParameterDeclaration=alias("tsTypeParameterDeclaration"),exports.TSTypeParameter=alias("tsTypeParameter"),exports.NumberLiteral=b.numberLiteral,exports.RegexLiteral=b.regexLiteral,exports.RestProperty=b.restProperty,exports.SpreadProperty=b.spreadProperty},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/productions.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildUndefinedNode=function(){return(0,_index.unaryExpression)("void",(0,_index.numericLiteral)(0),!0)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/react/buildChildren.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){const elements=[];for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(typeAnnotations){const types=typeAnnotations.map(type=>(0,_index2.isTSTypeAnnotation)(type)?type.typeAnnotation:type),flattened=(0,_removeTypeDuplicates.default)(types);return 1===flattened.length?flattened[0]:(0,_index.tsUnionType)(flattened)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js"),_removeTypeDuplicates=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/clone.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_cloneNode.default)(node,!1)};var _cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneDeep.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_cloneNode.default)(node)};var _cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_cloneNode.default)(node,!0,!0)};var _cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,deep=!0,withoutLoc=!1){return cloneNodeInternal(node,deep,withoutLoc,new Map)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js");const{hasOwn}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function cloneIfNode(obj,deep,withoutLoc,commentsCache){return obj&&"string"==typeof obj.type?cloneNodeInternal(obj,deep,withoutLoc,commentsCache):obj}function cloneIfNodeOrArray(obj,deep,withoutLoc,commentsCache){return Array.isArray(obj)?obj.map(node=>cloneIfNode(node,deep,withoutLoc,commentsCache)):cloneIfNode(obj,deep,withoutLoc,commentsCache)}function cloneNodeInternal(node,deep=!0,withoutLoc=!1,commentsCache){if(!node)return node;const{type}=node,newNode={type:node.type};if((0,_index2.isIdentifier)(node))newNode.name=node.name,hasOwn(node,"optional")&&"boolean"==typeof node.optional&&(newNode.optional=node.optional),hasOwn(node,"typeAnnotation")&&(newNode.typeAnnotation=deep?cloneIfNodeOrArray(node.typeAnnotation,!0,withoutLoc,commentsCache):node.typeAnnotation),hasOwn(node,"decorators")&&(newNode.decorators=deep?cloneIfNodeOrArray(node.decorators,!0,withoutLoc,commentsCache):node.decorators);else{if(!hasOwn(_index.NODE_FIELDS,type))throw new Error(`Unknown node type: "${type}"`);for(const field of Object.keys(_index.NODE_FIELDS[type]))hasOwn(node,field)&&(newNode[field]=deep?(0,_index2.isFile)(node)&&"comments"===field?maybeCloneComments(node.comments,deep,withoutLoc,commentsCache):cloneIfNodeOrArray(node[field],!0,withoutLoc,commentsCache):node[field])}return hasOwn(node,"loc")&&(newNode.loc=withoutLoc?null:node.loc),hasOwn(node,"leadingComments")&&(newNode.leadingComments=maybeCloneComments(node.leadingComments,deep,withoutLoc,commentsCache)),hasOwn(node,"innerComments")&&(newNode.innerComments=maybeCloneComments(node.innerComments,deep,withoutLoc,commentsCache)),hasOwn(node,"trailingComments")&&(newNode.trailingComments=maybeCloneComments(node.trailingComments,deep,withoutLoc,commentsCache)),hasOwn(node,"extra")&&(newNode.extra=Object.assign({},node.extra)),newNode}function maybeCloneComments(comments,deep,withoutLoc,commentsCache){return comments&&deep?comments.map(comment=>{const cache=commentsCache.get(comment);if(cache)return cache;const{type,value,loc}=comment,ret={type,value,loc};return withoutLoc&&(ret.loc=null),commentsCache.set(comment,ret),ret}):comments}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_cloneNode.default)(node,!1,!0)};var _cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/addComment.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,type,content,line){return(0,_addComments.default)(node,type,[{type:line?"CommentLine":"CommentBlock",value:content}])};var _addComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/addComments.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/addComments.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,type,comments){if(!comments||!node)return node;const key=`${type}Comments`;node[key]?"leading"===type?node[key]=comments.concat(node[key]):node[key].push(...comments):node[key]=comments;return node}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritInnerComments.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(child,parent){(0,_inherit.default)("innerComments",child,parent)};var _inherit=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/inherit.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritLeadingComments.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(child,parent){(0,_inherit.default)("leadingComments",child,parent)};var _inherit=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/inherit.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritTrailingComments.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(child,parent){(0,_inherit.default)("trailingComments",child,parent)};var _inherit=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/inherit.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritsComments.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(child,parent){return(0,_inheritTrailingComments.default)(child,parent),(0,_inheritLeadingComments.default)(child,parent),(0,_inheritInnerComments.default)(child,parent),child};var _inheritTrailingComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"),_inheritLeadingComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"),_inheritInnerComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritInnerComments.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/removeComments.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return _index.COMMENT_KEYS.forEach(key=>{node[key]=null}),node};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/generated/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WHILE_TYPES=exports.USERWHITESPACABLE_TYPES=exports.UNARYLIKE_TYPES=exports.TYPESCRIPT_TYPES=exports.TSTYPE_TYPES=exports.TSTYPEELEMENT_TYPES=exports.TSENTITYNAME_TYPES=exports.TSBASETYPE_TYPES=exports.TERMINATORLESS_TYPES=exports.STATEMENT_TYPES=exports.STANDARDIZED_TYPES=exports.SCOPABLE_TYPES=exports.PUREISH_TYPES=exports.PROPERTY_TYPES=exports.PRIVATE_TYPES=exports.PATTERN_TYPES=exports.PATTERNLIKE_TYPES=exports.OBJECTMEMBER_TYPES=exports.MODULESPECIFIER_TYPES=exports.MODULEDECLARATION_TYPES=exports.MISCELLANEOUS_TYPES=exports.METHOD_TYPES=exports.LVAL_TYPES=exports.LOOP_TYPES=exports.LITERAL_TYPES=exports.JSX_TYPES=exports.IMPORTOREXPORTDECLARATION_TYPES=exports.IMMUTABLE_TYPES=exports.FUNCTION_TYPES=exports.FUNCTIONPARENT_TYPES=exports.FUNCTIONPARAMETER_TYPES=exports.FOR_TYPES=exports.FORXSTATEMENT_TYPES=exports.FLOW_TYPES=exports.FLOWTYPE_TYPES=exports.FLOWPREDICATE_TYPES=exports.FLOWDECLARATION_TYPES=exports.FLOWBASEANNOTATION_TYPES=exports.EXPRESSION_TYPES=exports.EXPRESSIONWRAPPER_TYPES=exports.EXPORTDECLARATION_TYPES=exports.ENUMMEMBER_TYPES=exports.ENUMBODY_TYPES=exports.DECLARATION_TYPES=exports.CONDITIONAL_TYPES=exports.COMPLETIONSTATEMENT_TYPES=exports.CLASS_TYPES=exports.BLOCK_TYPES=exports.BLOCKPARENT_TYPES=exports.BINARY_TYPES=exports.ACCESSOR_TYPES=void 0;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js");exports.STANDARDIZED_TYPES=_index.FLIPPED_ALIAS_KEYS.Standardized,exports.EXPRESSION_TYPES=_index.FLIPPED_ALIAS_KEYS.Expression,exports.BINARY_TYPES=_index.FLIPPED_ALIAS_KEYS.Binary,exports.SCOPABLE_TYPES=_index.FLIPPED_ALIAS_KEYS.Scopable,exports.BLOCKPARENT_TYPES=_index.FLIPPED_ALIAS_KEYS.BlockParent,exports.BLOCK_TYPES=_index.FLIPPED_ALIAS_KEYS.Block,exports.STATEMENT_TYPES=_index.FLIPPED_ALIAS_KEYS.Statement,exports.TERMINATORLESS_TYPES=_index.FLIPPED_ALIAS_KEYS.Terminatorless,exports.COMPLETIONSTATEMENT_TYPES=_index.FLIPPED_ALIAS_KEYS.CompletionStatement,exports.CONDITIONAL_TYPES=_index.FLIPPED_ALIAS_KEYS.Conditional,exports.LOOP_TYPES=_index.FLIPPED_ALIAS_KEYS.Loop,exports.WHILE_TYPES=_index.FLIPPED_ALIAS_KEYS.While,exports.EXPRESSIONWRAPPER_TYPES=_index.FLIPPED_ALIAS_KEYS.ExpressionWrapper,exports.FOR_TYPES=_index.FLIPPED_ALIAS_KEYS.For,exports.FORXSTATEMENT_TYPES=_index.FLIPPED_ALIAS_KEYS.ForXStatement,exports.FUNCTION_TYPES=_index.FLIPPED_ALIAS_KEYS.Function,exports.FUNCTIONPARENT_TYPES=_index.FLIPPED_ALIAS_KEYS.FunctionParent,exports.PUREISH_TYPES=_index.FLIPPED_ALIAS_KEYS.Pureish,exports.DECLARATION_TYPES=_index.FLIPPED_ALIAS_KEYS.Declaration,exports.FUNCTIONPARAMETER_TYPES=_index.FLIPPED_ALIAS_KEYS.FunctionParameter,exports.PATTERNLIKE_TYPES=_index.FLIPPED_ALIAS_KEYS.PatternLike,exports.LVAL_TYPES=_index.FLIPPED_ALIAS_KEYS.LVal,exports.TSENTITYNAME_TYPES=_index.FLIPPED_ALIAS_KEYS.TSEntityName,exports.LITERAL_TYPES=_index.FLIPPED_ALIAS_KEYS.Literal,exports.IMMUTABLE_TYPES=_index.FLIPPED_ALIAS_KEYS.Immutable,exports.USERWHITESPACABLE_TYPES=_index.FLIPPED_ALIAS_KEYS.UserWhitespacable,exports.METHOD_TYPES=_index.FLIPPED_ALIAS_KEYS.Method,exports.OBJECTMEMBER_TYPES=_index.FLIPPED_ALIAS_KEYS.ObjectMember,exports.PROPERTY_TYPES=_index.FLIPPED_ALIAS_KEYS.Property,exports.UNARYLIKE_TYPES=_index.FLIPPED_ALIAS_KEYS.UnaryLike,exports.PATTERN_TYPES=_index.FLIPPED_ALIAS_KEYS.Pattern,exports.CLASS_TYPES=_index.FLIPPED_ALIAS_KEYS.Class;const IMPORTOREXPORTDECLARATION_TYPES=exports.IMPORTOREXPORTDECLARATION_TYPES=_index.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration;exports.EXPORTDECLARATION_TYPES=_index.FLIPPED_ALIAS_KEYS.ExportDeclaration,exports.MODULESPECIFIER_TYPES=_index.FLIPPED_ALIAS_KEYS.ModuleSpecifier,exports.ACCESSOR_TYPES=_index.FLIPPED_ALIAS_KEYS.Accessor,exports.PRIVATE_TYPES=_index.FLIPPED_ALIAS_KEYS.Private,exports.FLOW_TYPES=_index.FLIPPED_ALIAS_KEYS.Flow,exports.FLOWTYPE_TYPES=_index.FLIPPED_ALIAS_KEYS.FlowType,exports.FLOWBASEANNOTATION_TYPES=_index.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,exports.FLOWDECLARATION_TYPES=_index.FLIPPED_ALIAS_KEYS.FlowDeclaration,exports.FLOWPREDICATE_TYPES=_index.FLIPPED_ALIAS_KEYS.FlowPredicate,exports.ENUMBODY_TYPES=_index.FLIPPED_ALIAS_KEYS.EnumBody,exports.ENUMMEMBER_TYPES=_index.FLIPPED_ALIAS_KEYS.EnumMember,exports.JSX_TYPES=_index.FLIPPED_ALIAS_KEYS.JSX,exports.MISCELLANEOUS_TYPES=_index.FLIPPED_ALIAS_KEYS.Miscellaneous,exports.TYPESCRIPT_TYPES=_index.FLIPPED_ALIAS_KEYS.TypeScript,exports.TSTYPEELEMENT_TYPES=_index.FLIPPED_ALIAS_KEYS.TSTypeElement,exports.TSTYPE_TYPES=_index.FLIPPED_ALIAS_KEYS.TSType,exports.TSBASETYPE_TYPES=_index.FLIPPED_ALIAS_KEYS.TSBaseType,exports.MODULEDECLARATION_TYPES=IMPORTOREXPORTDECLARATION_TYPES},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/index.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UPDATE_OPERATORS=exports.UNARY_OPERATORS=exports.STRING_UNARY_OPERATORS=exports.STATEMENT_OR_BLOCK_KEYS=exports.NUMBER_UNARY_OPERATORS=exports.NUMBER_BINARY_OPERATORS=exports.LOGICAL_OPERATORS=exports.INHERIT_KEYS=exports.FOR_INIT_KEYS=exports.FLATTENABLE_KEYS=exports.EQUALITY_BINARY_OPERATORS=exports.COMPARISON_BINARY_OPERATORS=exports.COMMENT_KEYS=exports.BOOLEAN_UNARY_OPERATORS=exports.BOOLEAN_NUMBER_BINARY_OPERATORS=exports.BOOLEAN_BINARY_OPERATORS=exports.BINARY_OPERATORS=exports.ASSIGNMENT_OPERATORS=void 0;exports.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],exports.FLATTENABLE_KEYS=["body","expressions"],exports.FOR_INIT_KEYS=["left","init"],exports.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];const LOGICAL_OPERATORS=exports.LOGICAL_OPERATORS=["||","&&","??"],BOOLEAN_NUMBER_BINARY_OPERATORS=(exports.UPDATE_OPERATORS=["++","--"],exports.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),EQUALITY_BINARY_OPERATORS=exports.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],COMPARISON_BINARY_OPERATORS=exports.COMPARISON_BINARY_OPERATORS=[...EQUALITY_BINARY_OPERATORS,"in","instanceof"],BOOLEAN_BINARY_OPERATORS=exports.BOOLEAN_BINARY_OPERATORS=[...COMPARISON_BINARY_OPERATORS,...BOOLEAN_NUMBER_BINARY_OPERATORS],NUMBER_BINARY_OPERATORS=exports.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],BOOLEAN_UNARY_OPERATORS=(exports.BINARY_OPERATORS=["+",...NUMBER_BINARY_OPERATORS,...BOOLEAN_BINARY_OPERATORS,"|>"],exports.ASSIGNMENT_OPERATORS=["=","+=",...NUMBER_BINARY_OPERATORS.map(op=>op+"="),...LOGICAL_OPERATORS.map(op=>op+"=")],exports.BOOLEAN_UNARY_OPERATORS=["delete","!"]),NUMBER_UNARY_OPERATORS=exports.NUMBER_UNARY_OPERATORS=["+","-","~"],STRING_UNARY_OPERATORS=exports.STRING_UNARY_OPERATORS=["typeof"];exports.UNARY_OPERATORS=["void","throw",...BOOLEAN_UNARY_OPERATORS,...NUMBER_UNARY_OPERATORS,...STRING_UNARY_OPERATORS],exports.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};exports.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped"),exports.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/ensureBlock.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,key="body"){const result=(0,_toBlock.default)(node[key],node);return node[key]=result,result};var _toBlock=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toBlock.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function gatherSequenceExpressions(nodes,declars){const exprs=[];let ensureLastUndefined=!0;for(const node of nodes)if((0,_index.isEmptyStatement)(node)||(ensureLastUndefined=!1),(0,_index.isExpression)(node))exprs.push(node);else if((0,_index.isExpressionStatement)(node))exprs.push(node.expression);else if((0,_index.isVariableDeclaration)(node)){if("var"!==node.kind)return;for(const declar of node.declarations){const bindings=(0,_getBindingIdentifiers.default)(declar);for(const key of Object.keys(bindings))declars.push({kind:node.kind,id:(0,_cloneNode.default)(bindings[key])});declar.init&&exprs.push((0,_index2.assignmentExpression)("=",declar.id,declar.init))}ensureLastUndefined=!0}else if((0,_index.isIfStatement)(node)){const consequent=node.consequent?gatherSequenceExpressions([node.consequent],declars):(0,_productions.buildUndefinedNode)(),alternate=node.alternate?gatherSequenceExpressions([node.alternate],declars):(0,_productions.buildUndefinedNode)();if(!consequent||!alternate)return;exprs.push((0,_index2.conditionalExpression)(node.test,consequent,alternate))}else if((0,_index.isBlockStatement)(node)){const body=gatherSequenceExpressions(node.body,declars);if(!body)return;exprs.push(body)}else{if(!(0,_index.isEmptyStatement)(node))return;0===nodes.indexOf(node)&&(ensureLastUndefined=!0)}ensureLastUndefined&&exprs.push((0,_productions.buildUndefinedNode)());return 1===exprs.length?exprs[0]:(0,_index2.sequenceExpression)(exprs)};var _getBindingIdentifiers=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js"),_productions=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/productions.js"),_cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(name){"eval"!==(name=(0,_toIdentifier.default)(name))&&"arguments"!==name||(name="_"+name);return name};var _toIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toIdentifier.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toBlock.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,parent){if((0,_index.isBlockStatement)(node))return node;let blockNodes=[];(0,_index.isEmptyStatement)(node)?blockNodes=[]:((0,_index.isStatement)(node)||(node=(0,_index.isFunction)(parent)?(0,_index2.returnStatement)(node):(0,_index2.expressionStatement)(node)),blockNodes=[node]);return(0,_index2.blockStatement)(blockNodes)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toComputedKey.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,key=node.key||node.property){!node.computed&&(0,_index.isIdentifier)(key)&&(key=(0,_index2.stringLiteral)(key.name));return key};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toExpression.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js");exports.default=function(node){(0,_index.isExpressionStatement)(node)&&(node=node.expression);if((0,_index.isExpression)(node))return node;(0,_index.isClass)(node)?(node.type="ClassExpression",node.abstract=!1):(0,_index.isFunction)(node)&&(node.type="FunctionExpression");if(!(0,_index.isExpression)(node))throw new Error(`cannot turn ${node.type} to an expression`);return node}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toIdentifier.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(input){input+="";let name="";for(const c of input)name+=(0,_helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0))?c:"-";name=name.replace(/^[-0-9]+/,""),name=name.replace(/[-\s]+(.)?/g,function(match,c){return c?c.toUpperCase():""}),(0,_isValidIdentifier.default)(name)||(name=`_${name}`);return name||"_"};var _isValidIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidIdentifier.js"),_helperValidatorIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toKeyAlias.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=toKeyAlias;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),_cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js"),_removePropertiesDeep=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js");function toKeyAlias(node,key=node.key){let alias;return"method"===node.kind?toKeyAlias.increment()+"":(alias=(0,_index.isIdentifier)(key)?key.name:(0,_index.isStringLiteral)(key)?JSON.stringify(key.value):JSON.stringify((0,_removePropertiesDeep.default)((0,_cloneNode.default)(key))),node.computed&&(alias=`[${alias}]`),node.static&&(alias=`static:${alias}`),alias)}toKeyAlias.uid=0,toKeyAlias.increment=function(){return toKeyAlias.uid>=Number.MAX_SAFE_INTEGER?toKeyAlias.uid=0:toKeyAlias.uid++}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toSequenceExpression.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(nodes,scope){if(null==nodes||!nodes.length)return;const declars=[],result=(0,_gatherSequenceExpressions.default)(nodes,declars);if(!result)return;for(const declar of declars)scope.push(declar);return result};var _gatherSequenceExpressions=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toStatement.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js");exports.default=function(node,ignore){if((0,_index.isStatement)(node))return node;let newType,mustHaveId=!1;if((0,_index.isClass)(node))mustHaveId=!0,newType="ClassDeclaration";else if((0,_index.isFunction)(node))mustHaveId=!0,newType="FunctionDeclaration";else if((0,_index.isAssignmentExpression)(node))return(0,_index2.expressionStatement)(node);mustHaveId&&!node.id&&(newType=!1);if(!newType){if(ignore)return!1;throw new Error(`cannot turn ${node.type} to a statement`)}return node.type=newType,node}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/valueToNode.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _isValidIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidIdentifier.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js");exports.default=function valueToNode(value){if(void 0===value)return(0,_index.identifier)("undefined");if(!0===value||!1===value)return(0,_index.booleanLiteral)(value);if(null===value)return(0,_index.nullLiteral)();if("string"==typeof value)return(0,_index.stringLiteral)(value);if("number"==typeof value){let result;if(Number.isFinite(value))result=(0,_index.numericLiteral)(Math.abs(value));else{let numerator;numerator=Number.isNaN(value)?(0,_index.numericLiteral)(0):(0,_index.numericLiteral)(1),result=(0,_index.binaryExpression)("/",numerator,(0,_index.numericLiteral)(0))}return(value<0||Object.is(value,-0))&&(result=(0,_index.unaryExpression)("-",result)),result}if("bigint"==typeof value)return value<0?(0,_index.unaryExpression)("-",(0,_index.bigIntLiteral)(-value)):(0,_index.bigIntLiteral)(value);if(function(value){return"[object RegExp]"===objectToString(value)}(value)){const pattern=value.source,flags=/\/([a-z]*)$/.exec(value.toString())[1];return(0,_index.regExpLiteral)(pattern,flags)}if(Array.isArray(value))return(0,_index.arrayExpression)(value.map(valueToNode));if(function(value){if("object"!=typeof value||null===value||"[object Object]"!==Object.prototype.toString.call(value))return!1;const proto=Object.getPrototypeOf(value);return null===proto||null===Object.getPrototypeOf(proto)}(value)){const props=[];for(const key of Object.keys(value)){let nodeKey,computed=!1;(0,_isValidIdentifier.default)(key)?"__proto__"===key?(computed=!0,nodeKey=(0,_index.stringLiteral)(key)):nodeKey=(0,_index.identifier)(key):nodeKey=(0,_index.stringLiteral)(key),props.push((0,_index.objectProperty)(nodeKey,valueToNode(value[key]),computed))}return(0,_index.objectExpression)(props)}throw new Error("don't know how to turn this value into a node")};const objectToString=Function.call.bind(Object.prototype.toString)},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/core.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.patternLikeCommon=exports.importAttributes=exports.functionTypeAnnotationCommon=exports.functionDeclarationCommon=exports.functionCommon=exports.classMethodOrPropertyCommon=exports.classMethodOrDeclareMethodCommon=void 0;var _is=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/is.js"),_isValidIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidIdentifier.js"),_helperValidatorIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js"),_helperStringParser=__webpack_require__("./node_modules/.pnpm/@babel+helper-string-parser@7.27.1/node_modules/@babel/helper-string-parser/lib/index.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/index.js"),_utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js");const defineType=(0,_utils.defineAliasedType)("Standardized");defineType("ArrayExpression",{fields:{elements:{validate:(0,_utils.arrayOf)((0,_utils.assertNodeOrValueType)("null","Expression","SpreadElement")),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]}),defineType("AssignmentExpression",{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){const identifier=(0,_utils.assertOneOf)(..._index.ASSIGNMENT_OPERATORS),pattern=(0,_utils.assertOneOf)("=");return function(node,key,val){((0,_is.default)("Pattern",node.left)?pattern:identifier)(node,key,val)}}(),{oneOf:_index.ASSIGNMENT_OPERATORS}):(0,_utils.assertValueType)("string")},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,_utils.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,_utils.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),defineType("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,_utils.assertOneOf)(..._index.BINARY_OPERATORS)},left:{validate:function(){const expression=(0,_utils.assertNodeType)("Expression"),inOp=(0,_utils.assertNodeType)("Expression","PrivateName");return Object.assign(function(node,key,val){("in"===node.operator?inOp:expression)(node,key,val)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,_utils.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),defineType("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("string")}}}),defineType("Directive",{visitor:["value"],fields:{value:{validate:(0,_utils.assertNodeType)("DirectiveLiteral")}}}),defineType("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("string")}}}),defineType("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,_utils.arrayOfType)("Directive"),default:[]},body:(0,_utils.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),defineType("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,_utils.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),defineType("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,_utils.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,_utils.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,_utils.assertNodeType)("TypeParameterInstantiation"),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,_utils.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),defineType("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,_utils.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,_utils.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]}),defineType("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,_utils.assertNodeType)("Expression")},consequent:{validate:(0,_utils.assertNodeType)("Expression")},alternate:{validate:(0,_utils.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),defineType("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,_utils.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),defineType("DebuggerStatement",{aliases:["Statement"]}),defineType("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,_utils.assertNodeType)("Expression")},body:{validate:(0,_utils.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),defineType("EmptyStatement",{aliases:["Statement"]}),defineType("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,_utils.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),defineType("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,_utils.assertNodeType)("Program")},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.assertEach)((0,_utils.assertNodeType)("CommentBlock","CommentLine")):Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,_utils.assertEach)(Object.assign(()=>{},{type:"any"})),optional:!0}}}),defineType("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,_utils.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,_utils.assertNodeType)("Expression")},body:{validate:(0,_utils.assertNodeType)("Statement")}}}),defineType("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,_utils.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0},update:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0},body:{validate:(0,_utils.assertNodeType)("Statement")}}});const functionCommon=()=>({params:(0,_utils.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});exports.functionCommon=functionCommon;const functionTypeAnnotationCommon=()=>({returnType:{validate:(0,_utils.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,_utils.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});exports.functionTypeAnnotationCommon=functionTypeAnnotationCommon;const functionDeclarationCommon=()=>Object.assign({},functionCommon(),{declare:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},id:{validate:(0,_utils.assertNodeType)("Identifier"),optional:!0}});exports.functionDeclarationCommon=functionDeclarationCommon,defineType("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},functionDeclarationCommon(),functionTypeAnnotationCommon(),{body:{validate:(0,_utils.assertNodeType)("BlockStatement")},predicate:{validate:(0,_utils.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){const identifier=(0,_utils.assertNodeType)("Identifier");return function(parent,key,node){(0,_is.default)("ExportDefaultDeclaration",parent)||identifier(node,"id",node.id)}}():void 0}),defineType("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},functionCommon(),functionTypeAnnotationCommon(),{id:{validate:(0,_utils.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,_utils.assertNodeType)("BlockStatement")},predicate:{validate:(0,_utils.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});const patternLikeCommon=()=>({typeAnnotation:{validate:(0,_utils.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0}});exports.patternLikeCommon=patternLikeCommon,defineType("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},patternLikeCommon(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertValueType)("string"),Object.assign(function(node,key,val){if(!(0,_isValidIdentifier.default)(val,!1))throw new TypeError(`"${val}" is not a valid identifier name`)},{type:"string"})):(0,_utils.assertValueType)("string")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(parent,key,node){const match=/\.(\w+)$/.exec(key.toString());if(!match)return;const[,parentKey]=match,nonComp={computed:!1};if("property"===parentKey){if((0,_is.default)("MemberExpression",parent,nonComp))return;if((0,_is.default)("OptionalMemberExpression",parent,nonComp))return}else if("key"===parentKey){if((0,_is.default)("Property",parent,nonComp))return;if((0,_is.default)("Method",parent,nonComp))return}else if("exported"===parentKey){if((0,_is.default)("ExportSpecifier",parent))return}else if("imported"===parentKey){if((0,_is.default)("ImportSpecifier",parent,{imported:node}))return}else if("meta"===parentKey&&(0,_is.default)("MetaProperty",parent,{meta:node}))return;if(((0,_helperValidatorIdentifier.isKeyword)(node.name)||(0,_helperValidatorIdentifier.isReservedWord)(node.name,!1))&&"this"!==node.name)throw new TypeError(`"${node.name}" is not a valid identifier`)}:void 0}),defineType("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,_utils.assertNodeType)("Expression")},consequent:{validate:(0,_utils.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,_utils.assertNodeType)("Statement")}}}),defineType("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,_utils.assertNodeType)("Identifier")},body:{validate:(0,_utils.assertNodeType)("Statement")}}}),defineType("StringLiteral",{builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),defineType("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,_utils.chain)((0,_utils.assertValueType)("number"),Object.assign(function(node,key,val){if(1/val<0||!Number.isFinite(val)){new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${val}) instead.`)}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),defineType("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),defineType("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),defineType("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,_utils.assertValueType)("string")},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertValueType)("string"),Object.assign(function(node,key,val){const invalid=/[^gimsuy]/.exec(val);if(invalid)throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`)},{type:"string"})):(0,_utils.assertValueType)("string"),default:""}}}),defineType("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,_utils.assertOneOf)(..._index.LOGICAL_OPERATORS)},left:{validate:(0,_utils.assertNodeType)("Expression")},right:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("MemberExpression",{builder:["object","property","computed",...process.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],fields:Object.assign({object:{validate:(0,_utils.assertNodeType)("Expression","Super")},property:{validate:function(){const normal=(0,_utils.assertNodeType)("Identifier","PrivateName"),computed=(0,_utils.assertNodeType)("Expression"),validator=function(node,key,val){(node.computed?computed:normal)(node,key,val)};return validator.oneOfNodeTypes=["Expression","Identifier","PrivateName"],validator}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,_utils.assertValueType)("boolean"),optional:!0}})}),defineType("NewExpression",{inherits:"CallExpression"}),defineType("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,_utils.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,_utils.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,_utils.arrayOfType)("Directive"),default:[]},body:(0,_utils.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]}),defineType("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,_utils.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}}),defineType("ObjectMethod",{builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],fields:Object.assign({},functionCommon(),functionTypeAnnotationCommon(),{kind:Object.assign({validate:(0,_utils.assertOneOf)("method","get","set")},process.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){const normal=(0,_utils.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),computed=(0,_utils.assertNodeType)("Expression"),validator=function(node,key,val){(node.computed?computed:normal)(node,key,val)};return validator.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],validator}()},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,_utils.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),defineType("ObjectProperty",{builder:["key","value","computed","shorthand",...process.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],fields:{computed:{default:!1},key:{validate:function(){const normal=(0,_utils.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),computed=(0,_utils.assertNodeType)("Expression");return Object.assign(function(node,key,val){(node.computed?computed:normal)(node,key,val)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,_utils.assertNodeType)("Expression","PatternLike")},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertValueType)("boolean"),Object.assign(function(node,key,shorthand){if(shorthand){if(node.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,_is.default)("Identifier",node.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})):(0,_utils.assertValueType)("boolean"),default:!1},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){const pattern=(0,_utils.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),expression=(0,_utils.assertNodeType)("Expression");return function(parent,key,node){((0,_is.default)("ObjectPattern",parent)?pattern:expression)(node,"value",node.value)}}():void 0}),defineType("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},patternLikeCommon(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,_utils.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(parent,key){const match=/(\w+)\[(\d+)\]/.exec(key.toString());if(!match)throw new Error("Internal Babel error: malformed key.");const[,listKey,index]=match;if(parent[listKey].length>+index+1)throw new TypeError(`RestElement must be last element of ${listKey}`)}:void 0}),defineType("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0}}}),defineType("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,_utils.validateArrayOfType)("Expression")},aliases:["Expression"]}),defineType("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0},consequent:(0,_utils.validateArrayOfType)("Statement")}}),defineType("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,_utils.assertNodeType)("Expression")},cases:(0,_utils.validateArrayOfType)("SwitchCase")}}),defineType("ThisExpression",{aliases:["Expression"]}),defineType("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertNodeType)("BlockStatement"),Object.assign(function(node){if(!node.handler&&!node.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]})):(0,_utils.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,_utils.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,_utils.assertNodeType)("BlockStatement")}}}),defineType("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,_utils.assertNodeType)("Expression")},operator:{validate:(0,_utils.assertOneOf)(..._index.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),defineType("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.assertNodeType)("Identifier","MemberExpression"):(0,_utils.assertNodeType)("Expression")},operator:{validate:(0,_utils.assertOneOf)(..._index.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),defineType("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},kind:{validate:(0,_utils.assertOneOf)("var","let","const","using","await using")},declarations:(0,_utils.validateArrayOfType)("VariableDeclarator")},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{const withoutInit=(0,_utils.assertNodeType)("Identifier","Placeholder"),constOrLetOrVar=(0,_utils.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),usingOrAwaitUsing=(0,_utils.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(parent,key,node){const{kind,declarations}=node,parentIsForX=(0,_is.default)("ForXStatement",parent,{left:node});if(parentIsForX&&1!==declarations.length)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);for(const decl of declarations)"const"===kind||"let"===kind||"var"===kind?parentIsForX||decl.init?constOrLetOrVar(decl,"id",decl.id):withoutInit(decl,"id",decl.id):usingOrAwaitUsing(decl,"id",decl.id)}})():void 0}),defineType("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,_utils.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,_utils.assertValueType)("boolean")},init:{optional:!0,validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,_utils.assertNodeType)("Expression")},body:{validate:(0,_utils.assertNodeType)("Statement")}}}),defineType("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,_utils.assertNodeType)("Expression")},body:{validate:(0,_utils.assertNodeType)("Statement")}}}),defineType("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},patternLikeCommon(),{left:{validate:(0,_utils.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,_utils.assertNodeType)("Expression")},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0}})}),defineType("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},patternLikeCommon(),{elements:{validate:(0,_utils.chain)((0,_utils.assertValueType)("array"),(0,_utils.assertEach)((0,_utils.assertNodeOrValueType)("null","PatternLike")))}})}),defineType("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},functionCommon(),functionTypeAnnotationCommon(),{expression:{validate:(0,_utils.assertValueType)("boolean")},body:{validate:(0,_utils.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,_utils.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})}),defineType("ClassBody",{visitor:["body"],fields:{body:(0,_utils.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),defineType("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,_utils.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,_utils.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,_utils.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,_utils.assertNodeType)("Expression")},superTypeParameters:{validate:(0,_utils.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,_utils.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,_utils.assertNodeType)("InterfaceExtends"),optional:!0}}}),defineType("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,_utils.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,_utils.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,_utils.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,_utils.assertNodeType)("Expression")},superTypeParameters:{validate:(0,_utils.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,_utils.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,_utils.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,_utils.assertValueType)("boolean"),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){const identifier=(0,_utils.assertNodeType)("Identifier");return function(parent,key,node){(0,_is.default)("ExportDefaultDeclaration",parent)||identifier(node,"id",node.id)}}():void 0});const importAttributes=exports.importAttributes={attributes:{optional:!0,validate:(0,_utils.arrayOfType)("ImportAttribute")},assertions:{deprecated:!0,optional:!0,validate:(0,_utils.arrayOfType)("ImportAttribute")}};defineType("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,_utils.assertNodeType)("StringLiteral")},exportKind:(0,_utils.validateOptional)((0,_utils.assertOneOf)("type","value"))},importAttributes)}),defineType("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,_utils.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,_utils.validateOptional)((0,_utils.assertOneOf)("value"))}}),defineType("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertNodeType)("Declaration"),Object.assign(function(node,key,val){if(val&&node.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(val&&node.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["Declaration"]})):(0,_utils.assertNodeType)("Declaration")}},importAttributes,{specifiers:{default:[],validate:(0,_utils.arrayOf)(function(){const sourced=(0,_utils.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),sourceless=(0,_utils.assertNodeType)("ExportSpecifier");return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(node,key,val){(node.source?sourced:sourceless)(node,key,val)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):sourced}())},source:{validate:(0,_utils.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,_utils.validateOptional)((0,_utils.assertOneOf)("type","value"))})}),defineType("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_utils.assertNodeType)("Identifier")},exported:{validate:(0,_utils.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,_utils.assertOneOf)("type","value"),optional:!0}}}),defineType("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,_utils.assertNodeType)("VariableDeclaration","LVal");const declaration=(0,_utils.assertNodeType)("VariableDeclaration"),lval=(0,_utils.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign(function(node,key,val){(0,_is.default)("VariableDeclaration",val)?declaration(node,key,val):lval(node,key,val)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,_utils.assertNodeType)("Expression")},body:{validate:(0,_utils.assertNodeType)("Statement")},await:{default:!1}}}),defineType("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},importAttributes,{module:{optional:!0,validate:(0,_utils.assertValueType)("boolean")},phase:{default:null,validate:(0,_utils.assertOneOf)("source","defer")},specifiers:(0,_utils.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,_utils.assertNodeType)("StringLiteral")},importKind:{validate:(0,_utils.assertOneOf)("type","typeof","value"),optional:!0}})}),defineType("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_utils.assertNodeType)("Identifier")}}}),defineType("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_utils.assertNodeType)("Identifier")}}}),defineType("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,_utils.assertNodeType)("Identifier")},imported:{validate:(0,_utils.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,_utils.assertOneOf)("type","typeof","value"),optional:!0}}}),defineType("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,_utils.assertOneOf)("source","defer")},source:{validate:(0,_utils.assertNodeType)("Expression")},options:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0}}}),defineType("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertNodeType)("Identifier"),Object.assign(function(node,key,val){let property;switch(val.name){case"function":property="sent";break;case"new":property="target";break;case"import":property="meta"}if(!(0,_is.default)("Identifier",node.property,{name:property}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]})):(0,_utils.assertNodeType)("Identifier")},property:{validate:(0,_utils.assertNodeType)("Identifier")}}});const classMethodOrPropertyCommon=()=>({abstract:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,_utils.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},key:{validate:(0,_utils.chain)(function(){const normal=(0,_utils.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),computed=(0,_utils.assertNodeType)("Expression");return function(node,key,val){(node.computed?computed:normal)(node,key,val)}}(),(0,_utils.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});exports.classMethodOrPropertyCommon=classMethodOrPropertyCommon;const classMethodOrDeclareMethodCommon=()=>Object.assign({},functionCommon(),classMethodOrPropertyCommon(),{params:(0,_utils.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,_utils.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,_utils.chain)((0,_utils.assertValueType)("string"),(0,_utils.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0}});exports.classMethodOrDeclareMethodCommon=classMethodOrDeclareMethodCommon,defineType("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"],fields:Object.assign({},classMethodOrDeclareMethodCommon(),functionTypeAnnotationCommon(),{body:{validate:(0,_utils.assertNodeType)("BlockStatement")}})}),defineType("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},patternLikeCommon(),{properties:(0,_utils.validateArrayOfType)("RestElement","ObjectProperty")})}),defineType("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("Super",{aliases:["Expression"]}),defineType("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,_utils.assertNodeType)("Expression")},quasi:{validate:(0,_utils.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,_utils.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),defineType("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,_utils.chain)((0,_utils.assertShape)({raw:{validate:(0,_utils.assertValueType)("string")},cooked:{validate:(0,_utils.assertValueType)("string"),optional:!0}}),function(node){const raw=node.value.raw;let unterminatedCalled=!1;const error=()=>{throw new Error("Internal @babel/types error.")},{str,firstInvalidLoc}=(0,_helperStringParser.readStringContents)("template",raw,0,0,0,{unterminated(){unterminatedCalled=!0},strictNumericEscape:error,invalidEscapeSequence:error,numericSeparatorInEscapeSequence:error,unexpectedNumericSeparator:error,invalidDigit:error,invalidCodePoint:error});if(!unterminatedCalled)throw new Error("Invalid raw");node.value.cooked=firstInvalidLoc?null:str})},tail:{default:!1}}}),defineType("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,_utils.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,_utils.chain)((0,_utils.assertValueType)("array"),(0,_utils.assertEach)((0,_utils.assertNodeType)("Expression","TSType")),function(node,key,val){if(node.quasis.length!==val.length+1)throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length+1} quasis but got ${node.quasis.length}`)})}}}),defineType("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertValueType)("boolean"),Object.assign(function(node,key,val){if(val&&!node.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})):(0,_utils.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("Import",{aliases:["Expression"]}),defineType("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),defineType("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,_utils.assertNodeType)("Identifier")}}}),defineType("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,_utils.assertNodeType)("Expression")},property:{validate:function(){const normal=(0,_utils.assertNodeType)("Identifier"),computed=(0,_utils.assertNodeType)("Expression");return Object.assign(function(node,key,val){(node.computed?computed:normal)(node,key,val)},{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertValueType)("boolean"),(0,_utils.assertOptionalChainStart)()):(0,_utils.assertValueType)("boolean")}}}),defineType("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,_utils.assertNodeType)("Expression")},arguments:(0,_utils.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,_utils.chain)((0,_utils.assertValueType)("boolean"),(0,_utils.assertOptionalChainStart)()):(0,_utils.assertValueType)("boolean")},typeArguments:{validate:(0,_utils.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,_utils.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),defineType("ClassProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"],fields:Object.assign({},classMethodOrPropertyCommon(),{value:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,_utils.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},declare:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},variance:{validate:(0,_utils.assertNodeType)("Variance"),optional:!0}})}),defineType("ClassAccessorProperty",{visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"],fields:Object.assign({},classMethodOrPropertyCommon(),{key:{validate:(0,_utils.chain)(function(){const normal=(0,_utils.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),computed=(0,_utils.assertNodeType)("Expression");return function(node,key,val){(node.computed?computed:normal)(node,key,val)}}(),(0,_utils.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,_utils.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},declare:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},variance:{validate:(0,_utils.assertNodeType)("Variance"),optional:!0}})}),defineType("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,_utils.assertNodeType)("PrivateName")},value:{validate:(0,_utils.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,_utils.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,_utils.assertValueType)("boolean"),default:!1},readonly:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},optional:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},definite:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},variance:{validate:(0,_utils.assertNodeType)("Variance"),optional:!0}}}),defineType("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},classMethodOrDeclareMethodCommon(),functionTypeAnnotationCommon(),{kind:{validate:(0,_utils.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,_utils.assertNodeType)("PrivateName")},body:{validate:(0,_utils.assertNodeType)("BlockStatement")}})}),defineType("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,_utils.assertNodeType)("Identifier")}}}),defineType("StaticBlock",{visitor:["body"],fields:{body:(0,_utils.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),defineType("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,_utils.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,_utils.assertNodeType)("StringLiteral")}}})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/deprecated-aliases.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEPRECATED_ALIASES=void 0;exports.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/experimental.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js");(0,_utils.default)("ArgumentPlaceholder",{}),(0,_utils.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,_utils.assertNodeType)("Expression")},callee:{validate:(0,_utils.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}}),(0,_utils.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,_utils.assertNodeType)("Expression")}}}),(0,_utils.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,_utils.assertNodeType)("BlockStatement")},async:{validate:(0,_utils.assertValueType)("boolean"),default:!1}}}),(0,_utils.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,_utils.assertNodeType)("Identifier")}}}),(0,_utils.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,_utils.validateArrayOfType)("ObjectProperty","SpreadElement")}}),(0,_utils.default)("TupleExpression",{fields:{elements:{validate:(0,_utils.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,_utils.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,_utils.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,_utils.assertNodeType)("Program")}},aliases:["Expression"]}),(0,_utils.default)("TopicReference",{aliases:["Expression"]}),(0,_utils.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,_utils.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,_utils.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,_utils.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,_utils.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]}),(0,_utils.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/flow.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _core=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/core.js"),_utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js");const defineType=(0,_utils.defineAliasedType)("Flow"),defineInterfaceishType=name=>{const isDeclareClass="DeclareClass"===name;defineType(name,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...isDeclareClass?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterDeclaration"),extends:(0,_utils.validateOptional)((0,_utils.arrayOfType)("InterfaceExtends"))},isDeclareClass?{mixins:(0,_utils.validateOptional)((0,_utils.arrayOfType)("InterfaceExtends")),implements:(0,_utils.validateOptional)((0,_utils.arrayOfType)("ClassImplements"))}:{},{body:(0,_utils.validateType)("ObjectTypeAnnotation")})})};defineType("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,_utils.validateType)("FlowType")}}),defineType("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterInstantiation")}}),defineInterfaceishType("DeclareClass"),defineType("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier"),predicate:(0,_utils.validateOptionalType)("DeclaredPredicate")}}),defineInterfaceishType("DeclareInterface"),defineType("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier","StringLiteral"),body:(0,_utils.validateType)("BlockStatement"),kind:(0,_utils.validateOptional)((0,_utils.assertOneOf)("CommonJS","ES"))}}),defineType("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,_utils.validateType)("TypeAnnotation")}}),defineType("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterDeclaration"),right:(0,_utils.validateType)("FlowType")}}),defineType("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,_utils.validateOptionalType)("FlowType"),impltype:(0,_utils.validateOptionalType)("FlowType")}}),defineType("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier")}}),defineType("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,_utils.validateOptionalType)("Flow"),specifiers:(0,_utils.validateOptional)((0,_utils.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,_utils.validateOptionalType)("StringLiteral"),default:(0,_utils.validateOptional)((0,_utils.assertValueType)("boolean"))},_core.importAttributes)}),defineType("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,_utils.validateType)("StringLiteral"),exportKind:(0,_utils.validateOptional)((0,_utils.assertOneOf)("type","value"))},_core.importAttributes)}),defineType("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,_utils.validateType)("Flow")}}),defineType("ExistsTypeAnnotation",{aliases:["FlowType"]}),defineType("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,_utils.validateOptionalType)("TypeParameterDeclaration"),params:(0,_utils.validateArrayOfType)("FunctionTypeParam"),rest:(0,_utils.validateOptionalType)("FunctionTypeParam"),this:(0,_utils.validateOptionalType)("FunctionTypeParam"),returnType:(0,_utils.validateType)("FlowType")}}),defineType("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,_utils.validateOptionalType)("Identifier"),typeAnnotation:(0,_utils.validateType)("FlowType"),optional:(0,_utils.validateOptional)((0,_utils.assertValueType)("boolean"))}}),defineType("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,_utils.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterInstantiation")}}),defineType("InferredPredicate",{aliases:["FlowPredicate"]}),defineType("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,_utils.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterInstantiation")}}),defineInterfaceishType("InterfaceDeclaration"),defineType("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,_utils.validateOptional)((0,_utils.arrayOfType)("InterfaceExtends")),body:(0,_utils.validateType)("ObjectTypeAnnotation")}}),defineType("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,_utils.validate)((0,_utils.arrayOfType)("FlowType"))}}),defineType("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,_utils.validateType)("FlowType")}}),defineType("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,_utils.validate)((0,_utils.assertValueType)("number"))}}),defineType("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,_utils.validate)((0,_utils.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,_utils.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,_utils.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,_utils.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,_utils.assertValueType)("boolean"),default:!1},inexact:(0,_utils.validateOptional)((0,_utils.assertValueType)("boolean"))}}),defineType("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,_utils.validateType)("Identifier"),value:(0,_utils.validateType)("FlowType"),optional:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),static:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),method:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,_utils.validateType)("FlowType"),static:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,_utils.validateOptionalType)("Identifier"),key:(0,_utils.validateType)("FlowType"),value:(0,_utils.validateType)("FlowType"),static:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),variance:(0,_utils.validateOptionalType)("Variance")}}),defineType("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,_utils.validateType)("Identifier","StringLiteral"),value:(0,_utils.validateType)("FlowType"),kind:(0,_utils.validate)((0,_utils.assertOneOf)("init","get","set")),static:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),proto:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),optional:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),variance:(0,_utils.validateOptionalType)("Variance"),method:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,_utils.validateType)("FlowType")}}),defineType("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,_utils.validateOptionalType)("FlowType"),impltype:(0,_utils.validateType)("FlowType")}}),defineType("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,_utils.validateType)("Identifier"),qualification:(0,_utils.validateType)("Identifier","QualifiedTypeIdentifier")}}),defineType("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,_utils.validate)((0,_utils.assertValueType)("string"))}}),defineType("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,_utils.validate)((0,_utils.arrayOfType)("FlowType"))}}),defineType("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,_utils.validateType)("FlowType")}}),defineType("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TypeParameterDeclaration"),right:(0,_utils.validateType)("FlowType")}}),defineType("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,_utils.validateType)("FlowType")}}),defineType("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,_utils.validateType)("Expression"),typeAnnotation:(0,_utils.validateType)("TypeAnnotation")}}),defineType("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,_utils.validate)((0,_utils.assertValueType)("string")),bound:(0,_utils.validateOptionalType)("TypeAnnotation"),default:(0,_utils.validateOptionalType)("FlowType"),variance:(0,_utils.validateOptionalType)("Variance")}}),defineType("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,_utils.validate)((0,_utils.arrayOfType)("TypeParameter"))}}),defineType("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,_utils.validate)((0,_utils.arrayOfType)("FlowType"))}}),defineType("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,_utils.validate)((0,_utils.arrayOfType)("FlowType"))}}),defineType("Variance",{builder:["kind"],fields:{kind:(0,_utils.validate)((0,_utils.assertOneOf)("minus","plus"))}}),defineType("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),defineType("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,_utils.validateType)("Identifier"),body:(0,_utils.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}}),defineType("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),members:(0,_utils.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),members:(0,_utils.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,_utils.validate)((0,_utils.assertValueType)("boolean")),members:(0,_utils.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,_utils.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}}),defineType("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,_utils.validateType)("Identifier"),init:(0,_utils.validateType)("BooleanLiteral")}}),defineType("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,_utils.validateType)("Identifier"),init:(0,_utils.validateType)("NumericLiteral")}}),defineType("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,_utils.validateType)("Identifier"),init:(0,_utils.validateType)("StringLiteral")}}),defineType("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,_utils.validateType)("Identifier")}}),defineType("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,_utils.validateType)("FlowType"),indexType:(0,_utils.validateType)("FlowType")}}),defineType("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,_utils.validateType)("FlowType"),indexType:(0,_utils.validateType)("FlowType"),optional:(0,_utils.validate)((0,_utils.assertValueType)("boolean"))}})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ALIAS_KEYS",{enumerable:!0,get:function(){return _utils.ALIAS_KEYS}}),Object.defineProperty(exports,"BUILDER_KEYS",{enumerable:!0,get:function(){return _utils.BUILDER_KEYS}}),Object.defineProperty(exports,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return _deprecatedAliases.DEPRECATED_ALIASES}}),Object.defineProperty(exports,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return _utils.DEPRECATED_KEYS}}),Object.defineProperty(exports,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return _utils.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(exports,"NODE_FIELDS",{enumerable:!0,get:function(){return _utils.NODE_FIELDS}}),Object.defineProperty(exports,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return _utils.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(exports,"PLACEHOLDERS",{enumerable:!0,get:function(){return _placeholders.PLACEHOLDERS}}),Object.defineProperty(exports,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return _placeholders.PLACEHOLDERS_ALIAS}}),Object.defineProperty(exports,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS}}),exports.TYPES=void 0,Object.defineProperty(exports,"VISITOR_KEYS",{enumerable:!0,get:function(){return _utils.VISITOR_KEYS}}),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/core.js"),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/flow.js"),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/jsx.js"),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/misc.js"),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/experimental.js"),__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/typescript.js");var _utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js"),_placeholders=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/placeholders.js"),_deprecatedAliases=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/deprecated-aliases.js");Object.keys(_deprecatedAliases.DEPRECATED_ALIASES).forEach(deprecatedAlias=>{_utils.FLIPPED_ALIAS_KEYS[deprecatedAlias]=_utils.FLIPPED_ALIAS_KEYS[_deprecatedAliases.DEPRECATED_ALIASES[deprecatedAlias]]});for(const{types,set}of _utils.allExpandedTypes)for(const type of types){const aliases=_utils.FLIPPED_ALIAS_KEYS[type];aliases?aliases.forEach(set.add,set):set.add(type)}exports.TYPES=[].concat(Object.keys(_utils.VISITOR_KEYS),Object.keys(_utils.FLIPPED_ALIAS_KEYS),Object.keys(_utils.DEPRECATED_KEYS))},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/jsx.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js");const defineType=(0,_utils.defineAliasedType)("JSX");defineType("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,_utils.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,_utils.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),defineType("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,_utils.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),defineType("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,_utils.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,_utils.assertNodeType)("JSXClosingElement")},children:(0,_utils.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,_utils.assertValueType)("boolean"),optional:!0}})}),defineType("JSXEmptyExpression",{}),defineType("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,_utils.assertNodeType)("Expression","JSXEmptyExpression")}}}),defineType("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,_utils.assertValueType)("string")}}}),defineType("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,_utils.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,_utils.assertNodeType)("JSXIdentifier")}}}),defineType("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,_utils.assertNodeType)("JSXIdentifier")},name:{validate:(0,_utils.assertNodeType)("JSXIdentifier")}}}),defineType("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,_utils.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,_utils.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,_utils.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,_utils.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),defineType("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,_utils.assertNodeType)("Expression")}}}),defineType("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,_utils.assertValueType)("string")}}}),defineType("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,_utils.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,_utils.assertNodeType)("JSXClosingFragment")},children:(0,_utils.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),defineType("JSXOpeningFragment",{aliases:["Immutable"]}),defineType("JSXClosingFragment",{aliases:["Immutable"]})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/misc.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js"),_placeholders=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/placeholders.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/core.js");const defineType=(0,_utils.defineAliasedType)("Miscellaneous");defineType("Noop",{visitor:[]}),defineType("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,_utils.assertNodeType)("Identifier")},expectedNode:{validate:(0,_utils.assertOneOf)(..._placeholders.PLACEHOLDERS)}},(0,_core.patternLikeCommon)())}),defineType("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,_utils.assertValueType)("string")}}})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/placeholders.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PLACEHOLDERS_FLIPPED_ALIAS=exports.PLACEHOLDERS_ALIAS=exports.PLACEHOLDERS=void 0;var _utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js");const PLACEHOLDERS=exports.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],PLACEHOLDERS_ALIAS=exports.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const type of PLACEHOLDERS){const alias=_utils.ALIAS_KEYS[type];null!=alias&&alias.length&&(PLACEHOLDERS_ALIAS[type]=alias)}const PLACEHOLDERS_FLIPPED_ALIAS=exports.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(PLACEHOLDERS_ALIAS).forEach(type=>{PLACEHOLDERS_ALIAS[type].forEach(alias=>{hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS,alias)||(PLACEHOLDERS_FLIPPED_ALIAS[alias]=[]),PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type)})})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/typescript.js":(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{"use strict";var _utils=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js"),_core=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/core.js"),_is=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/is.js");const defineType=(0,_utils.defineAliasedType)("TypeScript"),bool=(0,_utils.assertValueType)("boolean"),tSFunctionTypeAnnotationCommon=()=>({returnType:{validate:(0,_utils.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,_utils.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});defineType("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,_utils.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,_utils.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,_utils.arrayOfType)("Decorator"),optional:!0}}}),defineType("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,_core.functionDeclarationCommon)(),tSFunctionTypeAnnotationCommon())}),defineType("TSDeclareMethod",{visitor:["decorators","key","typeParameters","params","returnType"],fields:Object.assign({},(0,_core.classMethodOrDeclareMethodCommon)(),tSFunctionTypeAnnotationCommon())}),defineType("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,_utils.validateType)("TSEntityName"),right:(0,_utils.validateType)("Identifier")}});const signatureDeclarationCommon=()=>({typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,_utils.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,_utils.validateOptionalType)("TSTypeAnnotation")}),callConstructSignatureDeclaration={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:signatureDeclarationCommon()};defineType("TSCallSignatureDeclaration",callConstructSignatureDeclaration),defineType("TSConstructSignatureDeclaration",callConstructSignatureDeclaration);const namedTypeElementCommon=()=>({key:(0,_utils.validateType)("Expression"),computed:{default:!1},optional:(0,_utils.validateOptional)(bool)});defineType("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},namedTypeElementCommon(),{readonly:(0,_utils.validateOptional)(bool),typeAnnotation:(0,_utils.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,_utils.assertOneOf)("get","set")}})}),defineType("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},signatureDeclarationCommon(),namedTypeElementCommon(),{kind:{validate:(0,_utils.assertOneOf)("method","get","set")}})}),defineType("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,_utils.validateOptional)(bool),static:(0,_utils.validateOptional)(bool),parameters:(0,_utils.validateArrayOfType)("Identifier"),typeAnnotation:(0,_utils.validateOptionalType)("TSTypeAnnotation")}});const tsKeywordTypes=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const type of tsKeywordTypes)defineType(type,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});defineType("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const fnOrCtrBase={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};defineType("TSFunctionType",Object.assign({},fnOrCtrBase,{fields:signatureDeclarationCommon()})),defineType("TSConstructorType",Object.assign({},fnOrCtrBase,{fields:Object.assign({},signatureDeclarationCommon(),{abstract:(0,_utils.validateOptional)(bool)})})),defineType("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,_utils.validateType)("TSEntityName"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterInstantiation")}}),defineType("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,_utils.validateType)("Identifier","TSThisType"),typeAnnotation:(0,_utils.validateOptionalType)("TSTypeAnnotation"),asserts:(0,_utils.validateOptional)(bool)}}),defineType("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,_utils.validateType)("TSEntityName","TSImportType"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterInstantiation")}}),defineType("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,_utils.validateArrayOfType)("TSTypeElement")}}),defineType("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,_utils.validateType)("TSType")}}),defineType("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,_utils.validateArrayOfType)("TSType","TSNamedTupleMember")}}),defineType("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,_utils.validateType)("TSType")}}),defineType("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,_utils.validateType)("TSType")}}),defineType("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,_utils.validateType)("Identifier"),optional:{validate:bool,default:!1},elementType:(0,_utils.validateType)("TSType")}});const unionOrIntersection={aliases:["TSType"],visitor:["types"],fields:{types:(0,_utils.validateArrayOfType)("TSType")}};defineType("TSUnionType",unionOrIntersection),defineType("TSIntersectionType",unionOrIntersection),defineType("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,_utils.validateType)("TSType"),extendsType:(0,_utils.validateType)("TSType"),trueType:(0,_utils.validateType)("TSType"),falseType:(0,_utils.validateType)("TSType")}}),defineType("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,_utils.validateType)("TSTypeParameter")}}),defineType("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,_utils.validateType)("TSType")}}),defineType("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,_utils.assertValueType)("string")},typeAnnotation:(0,_utils.validateType)("TSType")}}),defineType("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,_utils.validateType)("TSType"),indexType:(0,_utils.validateType)("TSType")}}),defineType("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,_utils.validateType)("TSTypeParameter")},{readonly:(0,_utils.validateOptional)((0,_utils.assertOneOf)(!0,!1,"+","-")),optional:(0,_utils.validateOptional)((0,_utils.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,_utils.validateOptionalType)("TSType"),nameType:(0,_utils.validateOptionalType)("TSType")})}),defineType("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,_utils.validateArrayOfType)("TemplateElement"),types:{validate:(0,_utils.chain)((0,_utils.assertValueType)("array"),(0,_utils.assertEach)((0,_utils.assertNodeType)("TSType")),function(node,key,val){if(node.quasis.length!==val.length+1)throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of types.\nExpected ${val.length+1} quasis but got ${node.quasis.length}`)})}}}),defineType("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const unaryExpression=(0,_utils.assertNodeType)("NumericLiteral","BigIntLiteral"),unaryOperator=(0,_utils.assertOneOf)("-"),literal=(0,_utils.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral");function validator(parent,key,node){(0,_is.default)("UnaryExpression",node)?(unaryOperator(node,"operator",node.operator),unaryExpression(node,"argument",node.argument)):literal(parent,key,node)}return validator.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],validator}()}}}),defineType("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,_utils.validateType)("TSEntityName"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterInstantiation")}}),defineType("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,_utils.validateOptional)(bool),id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,_utils.validateOptional)((0,_utils.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,_utils.validateType)("TSInterfaceBody")}}),defineType("TSInterfaceBody",{visitor:["body"],fields:{body:(0,_utils.validateArrayOfType)("TSTypeElement")}}),defineType("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,_utils.validateOptional)(bool),id:(0,_utils.validateType)("Identifier"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,_utils.validateType)("TSType")}}),defineType("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,_utils.validateType)("Expression"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterInstantiation")}});const TSTypeExpression={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,_utils.validateType)("Expression"),typeAnnotation:(0,_utils.validateType)("TSType")}};defineType("TSAsExpression",TSTypeExpression),defineType("TSSatisfiesExpression",TSTypeExpression),defineType("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,_utils.validateType)("TSType"),expression:(0,_utils.validateType)("Expression")}}),defineType("TSEnumBody",{visitor:["members"],fields:{members:(0,_utils.validateArrayOfType)("TSEnumMember")}}),defineType("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,_utils.validateOptional)(bool),const:(0,_utils.validateOptional)(bool),id:(0,_utils.validateType)("Identifier"),members:(0,_utils.validateArrayOfType)("TSEnumMember"),initializer:(0,_utils.validateOptionalType)("Expression"),body:(0,_utils.validateOptionalType)("TSEnumBody")}}),defineType("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,_utils.validateType)("Identifier","StringLiteral"),initializer:(0,_utils.validateOptionalType)("Expression")}}),defineType("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,_utils.assertOneOf)("global","module","namespace")},declare:(0,_utils.validateOptional)(bool)},{global:(0,_utils.validateOptional)(bool)},{id:(0,_utils.validateType)("Identifier","StringLiteral"),body:(0,_utils.validateType)("TSModuleBlock","TSModuleDeclaration")})}),defineType("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,_utils.validateArrayOfType)("Statement")}}),defineType("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:{argument:(0,_utils.validateType)("StringLiteral"),qualifier:(0,_utils.validateOptionalType)("TSEntityName"),typeParameters:(0,_utils.validateOptionalType)("TSTypeParameterInstantiation"),options:{validate:(0,_utils.assertNodeType)("ObjectExpression"),optional:!0}}}),defineType("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,_utils.validate)(bool)},{id:(0,_utils.validateType)("Identifier"),moduleReference:(0,_utils.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,_utils.assertOneOf)("type","value"),optional:!0}})}),defineType("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,_utils.validateType)("StringLiteral")}}),defineType("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,_utils.validateType)("Expression")}}),defineType("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,_utils.validateType)("Expression")}}),defineType("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,_utils.validateType)("Identifier")}}),defineType("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,_utils.assertNodeType)("TSType")}}}),defineType("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,_utils.validateArrayOfType)("TSType")}}),defineType("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,_utils.validateArrayOfType)("TSTypeParameter")}}),defineType("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,_utils.assertValueType)("string")},in:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},out:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},const:{validate:(0,_utils.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,_utils.assertNodeType)("TSType"),optional:!0},default:{validate:(0,_utils.assertNodeType)("TSType"),optional:!0}}})},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/utils.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.allExpandedTypes=exports.VISITOR_KEYS=exports.NODE_PARENT_VALIDATIONS=exports.NODE_FIELDS=exports.FLIPPED_ALIAS_KEYS=exports.DEPRECATED_KEYS=exports.BUILDER_KEYS=exports.ALIAS_KEYS=void 0,exports.arrayOf=arrayOf,exports.arrayOfType=arrayOfType,exports.assertEach=assertEach,exports.assertNodeOrValueType=function(...types){function validate(node,key,val){const primitiveType=getType(val);for(const type of types)if(primitiveType===type||(0,_is.default)(type,val))return void(0,_validate.validateChild)(node,key,val);throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(null==val?void 0:val.type)}`)}return validate.oneOfNodeOrValueTypes=types,validate},exports.assertNodeType=assertNodeType,exports.assertOneOf=function(...values){function validate(node,key,val){if(!values.includes(val))throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`)}return validate.oneOf=values,validate},exports.assertOptionalChainStart=function(){return function(node){var _current;let current=node;for(;node;){const{type}=current;if("OptionalCallExpression"!==type){if("OptionalMemberExpression"!==type)break;if(current.optional)return;current=current.object}else{if(current.optional)return;current=current.callee}}throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${null==(_current=current)?void 0:_current.type}`)}},exports.assertShape=function(shape){const keys=Object.keys(shape);function validate(node,key,val){const errors=[];for(const property of keys)try{(0,_validate.validateField)(node,property,val[property],shape[property])}catch(error){if(error instanceof TypeError){errors.push(error.message);continue}throw error}if(errors.length)throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`)}return validate.shapeOf=shape,validate},exports.assertValueType=assertValueType,exports.chain=chain,exports.default=defineType,exports.defineAliasedType=function(...aliases){return(type,opts={})=>{let defined=opts.aliases;var _store$opts$inherits$;defined||(opts.inherits&&(defined=null==(_store$opts$inherits$=store[opts.inherits].aliases)?void 0:_store$opts$inherits$.slice()),null!=defined||(defined=[]),opts.aliases=defined);const additional=aliases.filter(a=>!defined.includes(a));defined.unshift(...additional),defineType(type,opts)}},exports.validate=validate,exports.validateArrayOfType=function(...typeNames){return validate(arrayOfType(...typeNames))},exports.validateOptional=function(validate){return{validate,optional:!0}},exports.validateOptionalType=function(...typeNames){return{validate:assertNodeType(...typeNames),optional:!0}},exports.validateType=function(...typeNames){return validate(assertNodeType(...typeNames))};var _is=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/is.js"),_validate=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/validate.js");const VISITOR_KEYS=exports.VISITOR_KEYS={},ALIAS_KEYS=exports.ALIAS_KEYS={},FLIPPED_ALIAS_KEYS=exports.FLIPPED_ALIAS_KEYS={},NODE_FIELDS=exports.NODE_FIELDS={},BUILDER_KEYS=exports.BUILDER_KEYS={},DEPRECATED_KEYS=exports.DEPRECATED_KEYS={},NODE_PARENT_VALIDATIONS=exports.NODE_PARENT_VALIDATIONS={};function getType(val){return Array.isArray(val)?"array":null===val?"null":typeof val}function validate(validate){return{validate}}function arrayOf(elementType){return chain(assertValueType("array"),assertEach(elementType))}function arrayOfType(...typeNames){return arrayOf(assertNodeType(...typeNames))}function assertEach(callback){const childValidator=process.env.BABEL_TYPES_8_BREAKING?_validate.validateChild:()=>{};function validator(node,key,val){if(!Array.isArray(val))return;let i=0;const subKey={toString:()=>`${key}[${i}]`};for(;i=2&&"type"in fns[0]&&"array"===fns[0].type&&!("each"in fns[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return validate}const validTypeOpts=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate"]),validFieldKeys=new Set(["default","optional","deprecated","validate"]),store={};function defineType(type,opts={}){const inherits=opts.inherits&&store[opts.inherits]||{};let fields=opts.fields;if(!fields&&(fields={},inherits.fields)){const keys=Object.getOwnPropertyNames(inherits.fields);for(const key of keys){const field=inherits.fields[key],def=field.default;if(Array.isArray(def)?def.length>0:def&&"object"==typeof def)throw new Error("field defaults can only be primitives or empty arrays currently");fields[key]={default:Array.isArray(def)?[]:def,optional:field.optional,deprecated:field.deprecated,validate:field.validate}}}const visitor=opts.visitor||inherits.visitor||[],aliases=opts.aliases||inherits.aliases||[],builder=opts.builder||inherits.builder||opts.visitor||[];for(const k of Object.keys(opts))if(!validTypeOpts.has(k))throw new Error(`Unknown type option "${k}" on ${type}`);opts.deprecatedAlias&&(DEPRECATED_KEYS[opts.deprecatedAlias]=type);for(const key of visitor.concat(builder))fields[key]=fields[key]||{};for(const key of Object.keys(fields)){const field=fields[key];void 0===field.default||builder.includes(key)||(field.optional=!0),void 0===field.default?field.default=null:field.validate||null==field.default||(field.validate=assertValueType(getType(field.default)));for(const k of Object.keys(field))if(!validFieldKeys.has(k))throw new Error(`Unknown field key "${k}" on ${type}.${key}`)}VISITOR_KEYS[type]=opts.visitor=visitor,BUILDER_KEYS[type]=opts.builder=builder,NODE_FIELDS[type]=opts.fields=fields,ALIAS_KEYS[type]=opts.aliases=aliases,aliases.forEach(alias=>{FLIPPED_ALIAS_KEYS[alias]=FLIPPED_ALIAS_KEYS[alias]||[],FLIPPED_ALIAS_KEYS[alias].push(type)}),opts.validate&&(NODE_PARENT_VALIDATIONS[type]=opts.validate),store[type]=opts}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(exports,"__internal__deprecationWarning",{enumerable:!0,get:function(){return _deprecationWarning.default}}),Object.defineProperty(exports,"addComment",{enumerable:!0,get:function(){return _addComment.default}}),Object.defineProperty(exports,"addComments",{enumerable:!0,get:function(){return _addComments.default}}),Object.defineProperty(exports,"appendToMemberExpression",{enumerable:!0,get:function(){return _appendToMemberExpression.default}}),Object.defineProperty(exports,"assertNode",{enumerable:!0,get:function(){return _assertNode.default}}),Object.defineProperty(exports,"buildMatchMemberExpression",{enumerable:!0,get:function(){return _buildMatchMemberExpression.default}}),Object.defineProperty(exports,"clone",{enumerable:!0,get:function(){return _clone.default}}),Object.defineProperty(exports,"cloneDeep",{enumerable:!0,get:function(){return _cloneDeep.default}}),Object.defineProperty(exports,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return _cloneDeepWithoutLoc.default}}),Object.defineProperty(exports,"cloneNode",{enumerable:!0,get:function(){return _cloneNode.default}}),Object.defineProperty(exports,"cloneWithoutLoc",{enumerable:!0,get:function(){return _cloneWithoutLoc.default}}),Object.defineProperty(exports,"createFlowUnionType",{enumerable:!0,get:function(){return _createFlowUnionType.default}}),Object.defineProperty(exports,"createTSUnionType",{enumerable:!0,get:function(){return _createTSUnionType.default}}),Object.defineProperty(exports,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return _createTypeAnnotationBasedOnTypeof.default}}),Object.defineProperty(exports,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return _createFlowUnionType.default}}),Object.defineProperty(exports,"ensureBlock",{enumerable:!0,get:function(){return _ensureBlock.default}}),Object.defineProperty(exports,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return _getAssignmentIdentifiers.default}}),Object.defineProperty(exports,"getBindingIdentifiers",{enumerable:!0,get:function(){return _getBindingIdentifiers.default}}),Object.defineProperty(exports,"getFunctionName",{enumerable:!0,get:function(){return _getFunctionName.default}}),Object.defineProperty(exports,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return _getOuterBindingIdentifiers.default}}),Object.defineProperty(exports,"inheritInnerComments",{enumerable:!0,get:function(){return _inheritInnerComments.default}}),Object.defineProperty(exports,"inheritLeadingComments",{enumerable:!0,get:function(){return _inheritLeadingComments.default}}),Object.defineProperty(exports,"inheritTrailingComments",{enumerable:!0,get:function(){return _inheritTrailingComments.default}}),Object.defineProperty(exports,"inherits",{enumerable:!0,get:function(){return _inherits.default}}),Object.defineProperty(exports,"inheritsComments",{enumerable:!0,get:function(){return _inheritsComments.default}}),Object.defineProperty(exports,"is",{enumerable:!0,get:function(){return _is.default}}),Object.defineProperty(exports,"isBinding",{enumerable:!0,get:function(){return _isBinding.default}}),Object.defineProperty(exports,"isBlockScoped",{enumerable:!0,get:function(){return _isBlockScoped.default}}),Object.defineProperty(exports,"isImmutable",{enumerable:!0,get:function(){return _isImmutable.default}}),Object.defineProperty(exports,"isLet",{enumerable:!0,get:function(){return _isLet.default}}),Object.defineProperty(exports,"isNode",{enumerable:!0,get:function(){return _isNode.default}}),Object.defineProperty(exports,"isNodesEquivalent",{enumerable:!0,get:function(){return _isNodesEquivalent.default}}),Object.defineProperty(exports,"isPlaceholderType",{enumerable:!0,get:function(){return _isPlaceholderType.default}}),Object.defineProperty(exports,"isReferenced",{enumerable:!0,get:function(){return _isReferenced.default}}),Object.defineProperty(exports,"isScope",{enumerable:!0,get:function(){return _isScope.default}}),Object.defineProperty(exports,"isSpecifierDefault",{enumerable:!0,get:function(){return _isSpecifierDefault.default}}),Object.defineProperty(exports,"isType",{enumerable:!0,get:function(){return _isType.default}}),Object.defineProperty(exports,"isValidES3Identifier",{enumerable:!0,get:function(){return _isValidES3Identifier.default}}),Object.defineProperty(exports,"isValidIdentifier",{enumerable:!0,get:function(){return _isValidIdentifier.default}}),Object.defineProperty(exports,"isVar",{enumerable:!0,get:function(){return _isVar.default}}),Object.defineProperty(exports,"matchesPattern",{enumerable:!0,get:function(){return _matchesPattern.default}}),Object.defineProperty(exports,"prependToMemberExpression",{enumerable:!0,get:function(){return _prependToMemberExpression.default}}),exports.react=void 0,Object.defineProperty(exports,"removeComments",{enumerable:!0,get:function(){return _removeComments.default}}),Object.defineProperty(exports,"removeProperties",{enumerable:!0,get:function(){return _removeProperties.default}}),Object.defineProperty(exports,"removePropertiesDeep",{enumerable:!0,get:function(){return _removePropertiesDeep.default}}),Object.defineProperty(exports,"removeTypeDuplicates",{enumerable:!0,get:function(){return _removeTypeDuplicates.default}}),Object.defineProperty(exports,"shallowEqual",{enumerable:!0,get:function(){return _shallowEqual.default}}),Object.defineProperty(exports,"toBindingIdentifierName",{enumerable:!0,get:function(){return _toBindingIdentifierName.default}}),Object.defineProperty(exports,"toBlock",{enumerable:!0,get:function(){return _toBlock.default}}),Object.defineProperty(exports,"toComputedKey",{enumerable:!0,get:function(){return _toComputedKey.default}}),Object.defineProperty(exports,"toExpression",{enumerable:!0,get:function(){return _toExpression.default}}),Object.defineProperty(exports,"toIdentifier",{enumerable:!0,get:function(){return _toIdentifier.default}}),Object.defineProperty(exports,"toKeyAlias",{enumerable:!0,get:function(){return _toKeyAlias.default}}),Object.defineProperty(exports,"toStatement",{enumerable:!0,get:function(){return _toStatement.default}}),Object.defineProperty(exports,"traverse",{enumerable:!0,get:function(){return _traverse.default}}),Object.defineProperty(exports,"traverseFast",{enumerable:!0,get:function(){return _traverseFast.default}}),Object.defineProperty(exports,"validate",{enumerable:!0,get:function(){return _validate.default}}),Object.defineProperty(exports,"valueToNode",{enumerable:!0,get:function(){return _valueToNode.default}});var _isReactComponent=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/react/isReactComponent.js"),_isCompatTag=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/react/isCompatTag.js"),_buildChildren=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/react/buildChildren.js"),_assertNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/asserts/assertNode.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/asserts/generated/index.js");Object.keys(_index).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_index[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _index[key]}}))});var _createTypeAnnotationBasedOnTypeof=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"),_createFlowUnionType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"),_createTSUnionType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"),_productions=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/productions.js");Object.keys(_productions).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_productions[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _productions[key]}}))});var _index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js");Object.keys(_index2).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_index2[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _index2[key]}}))});var _cloneNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneNode.js"),_clone=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/clone.js"),_cloneDeep=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneDeep.js"),_cloneDeepWithoutLoc=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"),_cloneWithoutLoc=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"),_addComment=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/addComment.js"),_addComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/addComments.js"),_inheritInnerComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritInnerComments.js"),_inheritLeadingComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"),_inheritsComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritsComments.js"),_inheritTrailingComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"),_removeComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/removeComments.js"),_index3=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/generated/index.js");Object.keys(_index3).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_index3[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _index3[key]}}))});var _index4=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/index.js");Object.keys(_index4).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_index4[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _index4[key]}}))});var _ensureBlock=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/ensureBlock.js"),_toBindingIdentifierName=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"),_toBlock=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toBlock.js"),_toComputedKey=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toComputedKey.js"),_toExpression=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toExpression.js"),_toIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toIdentifier.js"),_toKeyAlias=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toKeyAlias.js"),_toStatement=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toStatement.js"),_valueToNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/valueToNode.js"),_index5=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js");Object.keys(_index5).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_index5[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _index5[key]}}))});var _appendToMemberExpression=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"),_inherits=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/inherits.js"),_prependToMemberExpression=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"),_removeProperties=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/removeProperties.js"),_removePropertiesDeep=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"),_removeTypeDuplicates=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"),_getAssignmentIdentifiers=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js"),_getBindingIdentifiers=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"),_getOuterBindingIdentifiers=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"),_getFunctionName=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getFunctionName.js"),_traverse=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/traverse/traverse.js");Object.keys(_traverse).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_traverse[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _traverse[key]}}))});var _traverseFast=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/traverse/traverseFast.js"),_shallowEqual=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/shallowEqual.js"),_is=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/is.js"),_isBinding=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isBinding.js"),_isBlockScoped=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isBlockScoped.js"),_isImmutable=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isImmutable.js"),_isLet=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isLet.js"),_isNode=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isNode.js"),_isNodesEquivalent=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"),_isPlaceholderType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isPlaceholderType.js"),_isReferenced=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isReferenced.js"),_isScope=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isScope.js"),_isSpecifierDefault=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"),_isType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isType.js"),_isValidES3Identifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"),_isValidIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidIdentifier.js"),_isVar=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isVar.js"),_matchesPattern=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/matchesPattern.js"),_validate=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/validate.js"),_buildMatchMemberExpression=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"),_index6=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js");Object.keys(_index6).forEach(function(key){"default"!==key&&"__esModule"!==key&&(Object.prototype.hasOwnProperty.call(_exportNames,key)||key in exports&&exports[key]===_index6[key]||Object.defineProperty(exports,key,{enumerable:!0,get:function(){return _index6[key]}}))});var _deprecationWarning=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/deprecationWarning.js"),_toSequenceExpression=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/converters/toSequenceExpression.js");exports.react={isReactComponent:_isReactComponent.default,isCompatTag:_isCompatTag.default,buildChildren:_buildChildren.default};exports.toSequenceExpression=_toSequenceExpression.default,process.env.BABEL_TYPES_8_BREAKING&&console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(member,append,computed=!1){return member.object=(0,_index.memberExpression)(member.object,member.property,member.computed),member.property=append,member.computed=!!computed,member};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function removeTypeDuplicates(nodesIn){const nodes=Array.from(nodesIn),generics=new Map,bases=new Map,typeGroups=new Set,types=[];for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(child,parent){if(!child||!parent)return child;for(const key of _index.INHERIT_KEYS.optional)null==child[key]&&(child[key]=parent[key]);for(const key of Object.keys(parent))"_"===key[0]&&"__clone"!==key&&(child[key]=parent[key]);for(const key of _index.INHERIT_KEYS.force)child[key]=parent[key];return(0,_inheritsComments.default)(child,parent),child};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/index.js"),_inheritsComments=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/comments/inheritsComments.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(member,prepend){if((0,_index2.isSuper)(member.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return member.object=(0,_index.memberExpression)(prepend,member.object),member};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/builders/generated/index.js"),_index2=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/removeProperties.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,opts={}){const map=opts.preserveComments?CLEAR_KEYS:CLEAR_KEYS_PLUS_COMMENTS;for(const key of map)null!=node[key]&&(node[key]=void 0);for(const key of Object.keys(node))"_"===key[0]&&null!=node[key]&&(node[key]=void 0);const symbols=Object.getOwnPropertySymbols(node);for(const sym of symbols)node[sym]=null};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/constants/index.js");const CLEAR_KEYS=["tokens","start","end","loc","raw","rawValue"],CLEAR_KEYS_PLUS_COMMENTS=[..._index.COMMENT_KEYS,"comments",...CLEAR_KEYS]},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(tree,opts){return(0,_traverseFast.default)(tree,_removeProperties.default,opts),tree};var _traverseFast=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/traverse/traverseFast.js"),_removeProperties=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/removeProperties.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function removeTypeDuplicates(nodesIn){const nodes=Array.from(nodesIn),generics=new Map,bases=new Map,typeGroups=new Set,types=[];for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){const search=[].concat(node),ids=Object.create(null);for(;search.length;){const id=search.pop();if(id)switch(id.type){case"ArrayPattern":search.push(...id.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":search.push(id.left);break;case"ObjectPattern":search.push(...id.properties);break;case"ObjectProperty":search.push(id.value);break;case"RestElement":case"UpdateExpression":search.push(id.argument);break;case"UnaryExpression":"delete"===id.operator&&search.push(id.argument);break;case"Identifier":ids[id.name]=id}}return ids}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=getBindingIdentifiers;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js");function getBindingIdentifiers(node,duplicates,outerOnly,newBindingsOnly){const search=[].concat(node),ids=Object.create(null);for(;search.length;){const id=search.shift();if(!id)continue;if(newBindingsOnly&&((0,_index.isAssignmentExpression)(id)||(0,_index.isUnaryExpression)(id)||(0,_index.isUpdateExpression)(id)))continue;if((0,_index.isIdentifier)(id)){if(duplicates){(ids[id.name]=ids[id.name]||[]).push(id)}else ids[id.name]=id;continue}if((0,_index.isExportDeclaration)(id)&&!(0,_index.isExportAllDeclaration)(id)){(0,_index.isDeclaration)(id.declaration)&&search.push(id.declaration);continue}if(outerOnly){if((0,_index.isFunctionDeclaration)(id)){search.push(id.id);continue}if((0,_index.isFunctionExpression)(id))continue}const keys=getBindingIdentifiers.keys[id.type];if(keys)for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,parent){if("id"in node&&node.id)return{name:node.id.name,originalNode:node.id};let id,prefix="";(0,_index.isObjectProperty)(parent,{value:node})?id=getObjectMemberKey(parent):(0,_index.isObjectMethod)(node)||(0,_index.isClassMethod)(node)?(id=getObjectMemberKey(node),"get"===node.kind?prefix="get ":"set"===node.kind&&(prefix="set ")):(0,_index.isVariableDeclarator)(parent,{init:node})?id=parent.id:(0,_index.isAssignmentExpression)(parent,{operator:"=",right:node})&&(id=parent.left);if(!id)return null;const name=(0,_index.isLiteral)(id)?function(id){if((0,_index.isNullLiteral)(id))return"null";if((0,_index.isRegExpLiteral)(id))return`/${id.pattern}/${id.flags}`;if((0,_index.isTemplateLiteral)(id))return id.quasis.map(quasi=>quasi.value.raw).join("");if(void 0!==id.value)return String(id.value);return null}(id):(0,_index.isIdentifier)(id)?id.name:(0,_index.isPrivateName)(id)?id.id.name:null;return null==name?null:{name:prefix+name,originalNode:id}};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js");function getObjectMemberKey(node){if(!node.computed||(0,_index.isLiteral)(node.key))return node.key}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _getBindingIdentifiers=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js");exports.default=function(node,duplicates){return(0,_getBindingIdentifiers.default)(node,duplicates,!0)}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/traverse/traverse.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,handlers,state){"function"==typeof handlers&&(handlers={enter:handlers});const{enter,exit}=handlers;traverseSimpleImpl(node,enter,exit,state,[])};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js");function traverseSimpleImpl(node,enter,exit,state,ancestors){const keys=_index.VISITOR_KEYS[node.type];if(keys){enter&&enter(node,ancestors,state);for(const key of keys){const subNode=node[key];if(Array.isArray(subNode))for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=traverseFast;var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js");const _skip=Symbol(),_stop=Symbol();function traverseFast(node,enter,opts){if(!node)return!1;const keys=_index.VISITOR_KEYS[node.type];if(!keys)return!1;const ret=enter(node,opts=opts||{});if(void 0!==ret)switch(ret){case _skip:return!1;case _stop:return!0}for(const key of keys){const subNode=node[key];if(subNode)if(Array.isArray(subNode)){for(const node of subNode)if(traverseFast(node,enter,opts))return!0}else if(traverseFast(subNode,enter,opts))return!0}return!1}traverseFast.skip=_skip,traverseFast.stop=_stop},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/deprecationWarning.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(oldName,newName,prefix="",cacheKey=oldName){if(warnings.has(cacheKey))return;warnings.add(cacheKey);const{internal,trace}=function(skip,length){const{stackTraceLimit,prepareStackTrace}=Error;let stackTrace;if(Error.stackTraceLimit=1+skip+length,Error.prepareStackTrace=function(err,stack){stackTrace=stack},(new Error).stack,Error.stackTraceLimit=stackTraceLimit,Error.prepareStackTrace=prepareStackTrace,!stackTrace)return{internal:!1,trace:""};const shortStackTrace=stackTrace.slice(1+skip,1+skip+length);return{internal:/[\\/]@babel[\\/]/.test(shortStackTrace[1].getFileName()),trace:shortStackTrace.map(frame=>` at ${frame}`).join("\n")}}(1,2);if(internal)return;console.warn(`${prefix}\`${oldName}\` has been deprecated, please migrate to \`${newName}\`\n${trace}`)};const warnings=new Set},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/inherit.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(key,child,parent){child&&parent&&(child[key]=Array.from(new Set([].concat(child[key],parent[key]).filter(Boolean))))}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(child,args){const lines=child.value.split(/\r\n|\n|\r/);let lastNonEmptyLine=0;for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(actual,expected){const keys=Object.keys(expected);for(const key of keys)if(actual[key]!==expected[key])return!1;return!0}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(match,allowPartial){const parts=match.split(".");return member=>(0,_matchesPattern.default)(member,parts,allowPartial)};var _matchesPattern=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/matchesPattern.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isAccessor=function(node,opts){if(!node)return!1;if("ClassAccessorProperty"!==node.type)return!1;return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isAnyTypeAnnotation=function(node,opts){return!!node&&("AnyTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isArgumentPlaceholder=function(node,opts){return!!node&&("ArgumentPlaceholder"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isArrayExpression=function(node,opts){return!!node&&("ArrayExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isArrayPattern=function(node,opts){return!!node&&("ArrayPattern"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isArrayTypeAnnotation=function(node,opts){return!!node&&("ArrayTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isArrowFunctionExpression=function(node,opts){return!!node&&("ArrowFunctionExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isAssignmentExpression=function(node,opts){return!!node&&("AssignmentExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isAssignmentPattern=function(node,opts){return!!node&&("AssignmentPattern"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isAwaitExpression=function(node,opts){return!!node&&("AwaitExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBigIntLiteral=function(node,opts){return!!node&&("BigIntLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBinary=function(node,opts){if(!node)return!1;switch(node.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isBinaryExpression=function(node,opts){return!!node&&("BinaryExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBindExpression=function(node,opts){return!!node&&("BindExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBlock=function(node,opts){if(!node)return!1;switch(node.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isBlockParent=function(node,opts){if(!node)return!1;switch(node.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isBlockStatement=function(node,opts){return!!node&&("BlockStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBooleanLiteral=function(node,opts){return!!node&&("BooleanLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBooleanLiteralTypeAnnotation=function(node,opts){return!!node&&("BooleanLiteralTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBooleanTypeAnnotation=function(node,opts){return!!node&&("BooleanTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isBreakStatement=function(node,opts){return!!node&&("BreakStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isCallExpression=function(node,opts){return!!node&&("CallExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isCatchClause=function(node,opts){return!!node&&("CatchClause"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClass=function(node,opts){if(!node)return!1;switch(node.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isClassAccessorProperty=function(node,opts){return!!node&&("ClassAccessorProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassBody=function(node,opts){return!!node&&("ClassBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassDeclaration=function(node,opts){return!!node&&("ClassDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassExpression=function(node,opts){return!!node&&("ClassExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassImplements=function(node,opts){return!!node&&("ClassImplements"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassMethod=function(node,opts){return!!node&&("ClassMethod"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassPrivateMethod=function(node,opts){return!!node&&("ClassPrivateMethod"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassPrivateProperty=function(node,opts){return!!node&&("ClassPrivateProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isClassProperty=function(node,opts){return!!node&&("ClassProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isCompletionStatement=function(node,opts){if(!node)return!1;switch(node.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isConditional=function(node,opts){if(!node)return!1;switch(node.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isConditionalExpression=function(node,opts){return!!node&&("ConditionalExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isContinueStatement=function(node,opts){return!!node&&("ContinueStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDebuggerStatement=function(node,opts){return!!node&&("DebuggerStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDecimalLiteral=function(node,opts){return!!node&&("DecimalLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclaration=function(node,opts){if(!node)return!1;switch(node.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if("Declaration"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isDeclareClass=function(node,opts){return!!node&&("DeclareClass"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareExportAllDeclaration=function(node,opts){return!!node&&("DeclareExportAllDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareExportDeclaration=function(node,opts){return!!node&&("DeclareExportDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareFunction=function(node,opts){return!!node&&("DeclareFunction"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareInterface=function(node,opts){return!!node&&("DeclareInterface"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareModule=function(node,opts){return!!node&&("DeclareModule"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareModuleExports=function(node,opts){return!!node&&("DeclareModuleExports"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareOpaqueType=function(node,opts){return!!node&&("DeclareOpaqueType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareTypeAlias=function(node,opts){return!!node&&("DeclareTypeAlias"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclareVariable=function(node,opts){return!!node&&("DeclareVariable"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDeclaredPredicate=function(node,opts){return!!node&&("DeclaredPredicate"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDecorator=function(node,opts){return!!node&&("Decorator"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDirective=function(node,opts){return!!node&&("Directive"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDirectiveLiteral=function(node,opts){return!!node&&("DirectiveLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDoExpression=function(node,opts){return!!node&&("DoExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isDoWhileStatement=function(node,opts){return!!node&&("DoWhileStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEmptyStatement=function(node,opts){return!!node&&("EmptyStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEmptyTypeAnnotation=function(node,opts){return!!node&&("EmptyTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumBody=function(node,opts){if(!node)return!1;switch(node.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isEnumBooleanBody=function(node,opts){return!!node&&("EnumBooleanBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumBooleanMember=function(node,opts){return!!node&&("EnumBooleanMember"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumDeclaration=function(node,opts){return!!node&&("EnumDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumDefaultedMember=function(node,opts){return!!node&&("EnumDefaultedMember"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumMember=function(node,opts){if(!node)return!1;switch(node.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isEnumNumberBody=function(node,opts){return!!node&&("EnumNumberBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumNumberMember=function(node,opts){return!!node&&("EnumNumberMember"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumStringBody=function(node,opts){return!!node&&("EnumStringBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumStringMember=function(node,opts){return!!node&&("EnumStringMember"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isEnumSymbolBody=function(node,opts){return!!node&&("EnumSymbolBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExistsTypeAnnotation=function(node,opts){return!!node&&("ExistsTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExportAllDeclaration=function(node,opts){return!!node&&("ExportAllDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExportDeclaration=function(node,opts){if(!node)return!1;switch(node.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isExportDefaultDeclaration=function(node,opts){return!!node&&("ExportDefaultDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExportDefaultSpecifier=function(node,opts){return!!node&&("ExportDefaultSpecifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExportNamedDeclaration=function(node,opts){return!!node&&("ExportNamedDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExportNamespaceSpecifier=function(node,opts){return!!node&&("ExportNamespaceSpecifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExportSpecifier=function(node,opts){return!!node&&("ExportSpecifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExpression=function(node,opts){if(!node)return!1;switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(node.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isExpressionStatement=function(node,opts){return!!node&&("ExpressionStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isExpressionWrapper=function(node,opts){if(!node)return!1;switch(node.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFile=function(node,opts){return!!node&&("File"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isFlow=function(node,opts){if(!node)return!1;switch(node.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFlowBaseAnnotation=function(node,opts){if(!node)return!1;switch(node.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFlowDeclaration=function(node,opts){if(!node)return!1;switch(node.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFlowPredicate=function(node,opts){if(!node)return!1;switch(node.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFlowType=function(node,opts){if(!node)return!1;switch(node.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFor=function(node,opts){if(!node)return!1;switch(node.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isForInStatement=function(node,opts){return!!node&&("ForInStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isForOfStatement=function(node,opts){return!!node&&("ForOfStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isForStatement=function(node,opts){return!!node&&("ForStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isForXStatement=function(node,opts){if(!node)return!1;switch(node.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFunction=function(node,opts){if(!node)return!1;switch(node.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFunctionDeclaration=function(node,opts){return!!node&&("FunctionDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isFunctionExpression=function(node,opts){return!!node&&("FunctionExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isFunctionParameter=function(node,opts){if(!node)return!1;switch(node.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Identifier"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFunctionParent=function(node,opts){if(!node)return!1;switch(node.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isFunctionTypeAnnotation=function(node,opts){return!!node&&("FunctionTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isFunctionTypeParam=function(node,opts){return!!node&&("FunctionTypeParam"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isGenericTypeAnnotation=function(node,opts){return!!node&&("GenericTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isIdentifier=function(node,opts){return!!node&&("Identifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isIfStatement=function(node,opts){return!!node&&("IfStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImmutable=function(node,opts){if(!node)return!1;switch(node.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isImport=function(node,opts){return!!node&&("Import"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImportAttribute=function(node,opts){return!!node&&("ImportAttribute"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImportDeclaration=function(node,opts){return!!node&&("ImportDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImportDefaultSpecifier=function(node,opts){return!!node&&("ImportDefaultSpecifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImportExpression=function(node,opts){return!!node&&("ImportExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImportNamespaceSpecifier=function(node,opts){return!!node&&("ImportNamespaceSpecifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isImportOrExportDeclaration=isImportOrExportDeclaration,exports.isImportSpecifier=function(node,opts){return!!node&&("ImportSpecifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isIndexedAccessType=function(node,opts){return!!node&&("IndexedAccessType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isInferredPredicate=function(node,opts){return!!node&&("InferredPredicate"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isInterfaceDeclaration=function(node,opts){return!!node&&("InterfaceDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isInterfaceExtends=function(node,opts){return!!node&&("InterfaceExtends"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isInterfaceTypeAnnotation=function(node,opts){return!!node&&("InterfaceTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isInterpreterDirective=function(node,opts){return!!node&&("InterpreterDirective"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isIntersectionTypeAnnotation=function(node,opts){return!!node&&("IntersectionTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSX=function(node,opts){if(!node)return!1;switch(node.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isJSXAttribute=function(node,opts){return!!node&&("JSXAttribute"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXClosingElement=function(node,opts){return!!node&&("JSXClosingElement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXClosingFragment=function(node,opts){return!!node&&("JSXClosingFragment"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXElement=function(node,opts){return!!node&&("JSXElement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXEmptyExpression=function(node,opts){return!!node&&("JSXEmptyExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXExpressionContainer=function(node,opts){return!!node&&("JSXExpressionContainer"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXFragment=function(node,opts){return!!node&&("JSXFragment"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXIdentifier=function(node,opts){return!!node&&("JSXIdentifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXMemberExpression=function(node,opts){return!!node&&("JSXMemberExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXNamespacedName=function(node,opts){return!!node&&("JSXNamespacedName"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXOpeningElement=function(node,opts){return!!node&&("JSXOpeningElement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXOpeningFragment=function(node,opts){return!!node&&("JSXOpeningFragment"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXSpreadAttribute=function(node,opts){return!!node&&("JSXSpreadAttribute"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXSpreadChild=function(node,opts){return!!node&&("JSXSpreadChild"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isJSXText=function(node,opts){return!!node&&("JSXText"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isLVal=function(node,opts){if(!node)return!1;switch(node.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(node.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isLabeledStatement=function(node,opts){return!!node&&("LabeledStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isLiteral=function(node,opts){if(!node)return!1;switch(node.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isLogicalExpression=function(node,opts){return!!node&&("LogicalExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isLoop=function(node,opts){if(!node)return!1;switch(node.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isMemberExpression=function(node,opts){return!!node&&("MemberExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isMetaProperty=function(node,opts){return!!node&&("MetaProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isMethod=function(node,opts){if(!node)return!1;switch(node.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isMiscellaneous=function(node,opts){if(!node)return!1;switch(node.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isMixedTypeAnnotation=function(node,opts){return!!node&&("MixedTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isModuleDeclaration=function(node,opts){return(0,_deprecationWarning.default)("isModuleDeclaration","isImportOrExportDeclaration"),isImportOrExportDeclaration(node,opts)},exports.isModuleExpression=function(node,opts){return!!node&&("ModuleExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isModuleSpecifier=function(node,opts){if(!node)return!1;switch(node.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isNewExpression=function(node,opts){return!!node&&("NewExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNoop=function(node,opts){return!!node&&("Noop"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNullLiteral=function(node,opts){return!!node&&("NullLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNullLiteralTypeAnnotation=function(node,opts){return!!node&&("NullLiteralTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNullableTypeAnnotation=function(node,opts){return!!node&&("NullableTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNumberLiteral=function(node,opts){return(0,_deprecationWarning.default)("isNumberLiteral","isNumericLiteral"),!!node&&("NumberLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNumberLiteralTypeAnnotation=function(node,opts){return!!node&&("NumberLiteralTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNumberTypeAnnotation=function(node,opts){return!!node&&("NumberTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isNumericLiteral=function(node,opts){return!!node&&("NumericLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectExpression=function(node,opts){return!!node&&("ObjectExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectMember=function(node,opts){if(!node)return!1;switch(node.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isObjectMethod=function(node,opts){return!!node&&("ObjectMethod"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectPattern=function(node,opts){return!!node&&("ObjectPattern"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectProperty=function(node,opts){return!!node&&("ObjectProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectTypeAnnotation=function(node,opts){return!!node&&("ObjectTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectTypeCallProperty=function(node,opts){return!!node&&("ObjectTypeCallProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectTypeIndexer=function(node,opts){return!!node&&("ObjectTypeIndexer"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectTypeInternalSlot=function(node,opts){return!!node&&("ObjectTypeInternalSlot"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectTypeProperty=function(node,opts){return!!node&&("ObjectTypeProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isObjectTypeSpreadProperty=function(node,opts){return!!node&&("ObjectTypeSpreadProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isOpaqueType=function(node,opts){return!!node&&("OpaqueType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isOptionalCallExpression=function(node,opts){return!!node&&("OptionalCallExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isOptionalIndexedAccessType=function(node,opts){return!!node&&("OptionalIndexedAccessType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isOptionalMemberExpression=function(node,opts){return!!node&&("OptionalMemberExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isParenthesizedExpression=function(node,opts){return!!node&&("ParenthesizedExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isPattern=function(node,opts){if(!node)return!1;switch(node.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Pattern"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isPatternLike=function(node,opts){if(!node)return!1;switch(node.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(node.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isPipelineBareFunction=function(node,opts){return!!node&&("PipelineBareFunction"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isPipelinePrimaryTopicReference=function(node,opts){return!!node&&("PipelinePrimaryTopicReference"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isPipelineTopicExpression=function(node,opts){return!!node&&("PipelineTopicExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isPlaceholder=function(node,opts){return!!node&&("Placeholder"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isPrivate=function(node,opts){if(!node)return!1;switch(node.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isPrivateName=function(node,opts){return!!node&&("PrivateName"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isProgram=function(node,opts){return!!node&&("Program"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isProperty=function(node,opts){if(!node)return!1;switch(node.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isPureish=function(node,opts){if(!node)return!1;switch(node.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isQualifiedTypeIdentifier=function(node,opts){return!!node&&("QualifiedTypeIdentifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isRecordExpression=function(node,opts){return!!node&&("RecordExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isRegExpLiteral=function(node,opts){return!!node&&("RegExpLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isRegexLiteral=function(node,opts){return(0,_deprecationWarning.default)("isRegexLiteral","isRegExpLiteral"),!!node&&("RegexLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isRestElement=function(node,opts){return!!node&&("RestElement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isRestProperty=function(node,opts){return(0,_deprecationWarning.default)("isRestProperty","isRestElement"),!!node&&("RestProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isReturnStatement=function(node,opts){return!!node&&("ReturnStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isScopable=function(node,opts){if(!node)return!1;switch(node.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isSequenceExpression=function(node,opts){return!!node&&("SequenceExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isSpreadElement=function(node,opts){return!!node&&("SpreadElement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isSpreadProperty=function(node,opts){return(0,_deprecationWarning.default)("isSpreadProperty","isSpreadElement"),!!node&&("SpreadProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isStandardized=function(node,opts){if(!node)return!1;switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(node.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isStatement=function(node,opts){if(!node)return!1;switch(node.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(node.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isStaticBlock=function(node,opts){return!!node&&("StaticBlock"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isStringLiteral=function(node,opts){return!!node&&("StringLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isStringLiteralTypeAnnotation=function(node,opts){return!!node&&("StringLiteralTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isStringTypeAnnotation=function(node,opts){return!!node&&("StringTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isSuper=function(node,opts){return!!node&&("Super"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isSwitchCase=function(node,opts){return!!node&&("SwitchCase"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isSwitchStatement=function(node,opts){return!!node&&("SwitchStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isSymbolTypeAnnotation=function(node,opts){return!!node&&("SymbolTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSAnyKeyword=function(node,opts){return!!node&&("TSAnyKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSArrayType=function(node,opts){return!!node&&("TSArrayType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSAsExpression=function(node,opts){return!!node&&("TSAsExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSBaseType=function(node,opts){if(!node)return!1;switch(node.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isTSBigIntKeyword=function(node,opts){return!!node&&("TSBigIntKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSBooleanKeyword=function(node,opts){return!!node&&("TSBooleanKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSCallSignatureDeclaration=function(node,opts){return!!node&&("TSCallSignatureDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSConditionalType=function(node,opts){return!!node&&("TSConditionalType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSConstructSignatureDeclaration=function(node,opts){return!!node&&("TSConstructSignatureDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSConstructorType=function(node,opts){return!!node&&("TSConstructorType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSDeclareFunction=function(node,opts){return!!node&&("TSDeclareFunction"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSDeclareMethod=function(node,opts){return!!node&&("TSDeclareMethod"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSEntityName=function(node,opts){if(!node)return!1;switch(node.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if("Identifier"===node.expectedNode)break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isTSEnumBody=function(node,opts){return!!node&&("TSEnumBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSEnumDeclaration=function(node,opts){return!!node&&("TSEnumDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSEnumMember=function(node,opts){return!!node&&("TSEnumMember"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSExportAssignment=function(node,opts){return!!node&&("TSExportAssignment"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSExpressionWithTypeArguments=function(node,opts){return!!node&&("TSExpressionWithTypeArguments"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSExternalModuleReference=function(node,opts){return!!node&&("TSExternalModuleReference"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSFunctionType=function(node,opts){return!!node&&("TSFunctionType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSImportEqualsDeclaration=function(node,opts){return!!node&&("TSImportEqualsDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSImportType=function(node,opts){return!!node&&("TSImportType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSIndexSignature=function(node,opts){return!!node&&("TSIndexSignature"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSIndexedAccessType=function(node,opts){return!!node&&("TSIndexedAccessType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSInferType=function(node,opts){return!!node&&("TSInferType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSInstantiationExpression=function(node,opts){return!!node&&("TSInstantiationExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSInterfaceBody=function(node,opts){return!!node&&("TSInterfaceBody"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSInterfaceDeclaration=function(node,opts){return!!node&&("TSInterfaceDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSIntersectionType=function(node,opts){return!!node&&("TSIntersectionType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSIntrinsicKeyword=function(node,opts){return!!node&&("TSIntrinsicKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSLiteralType=function(node,opts){return!!node&&("TSLiteralType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSMappedType=function(node,opts){return!!node&&("TSMappedType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSMethodSignature=function(node,opts){return!!node&&("TSMethodSignature"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSModuleBlock=function(node,opts){return!!node&&("TSModuleBlock"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSModuleDeclaration=function(node,opts){return!!node&&("TSModuleDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSNamedTupleMember=function(node,opts){return!!node&&("TSNamedTupleMember"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSNamespaceExportDeclaration=function(node,opts){return!!node&&("TSNamespaceExportDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSNeverKeyword=function(node,opts){return!!node&&("TSNeverKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSNonNullExpression=function(node,opts){return!!node&&("TSNonNullExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSNullKeyword=function(node,opts){return!!node&&("TSNullKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSNumberKeyword=function(node,opts){return!!node&&("TSNumberKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSObjectKeyword=function(node,opts){return!!node&&("TSObjectKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSOptionalType=function(node,opts){return!!node&&("TSOptionalType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSParameterProperty=function(node,opts){return!!node&&("TSParameterProperty"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSParenthesizedType=function(node,opts){return!!node&&("TSParenthesizedType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSPropertySignature=function(node,opts){return!!node&&("TSPropertySignature"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSQualifiedName=function(node,opts){return!!node&&("TSQualifiedName"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSRestType=function(node,opts){return!!node&&("TSRestType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSSatisfiesExpression=function(node,opts){return!!node&&("TSSatisfiesExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSStringKeyword=function(node,opts){return!!node&&("TSStringKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSSymbolKeyword=function(node,opts){return!!node&&("TSSymbolKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTemplateLiteralType=function(node,opts){return!!node&&("TSTemplateLiteralType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSThisType=function(node,opts){return!!node&&("TSThisType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTupleType=function(node,opts){return!!node&&("TSTupleType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSType=function(node,opts){if(!node)return!1;switch(node.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isTSTypeAliasDeclaration=function(node,opts){return!!node&&("TSTypeAliasDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeAnnotation=function(node,opts){return!!node&&("TSTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeAssertion=function(node,opts){return!!node&&("TSTypeAssertion"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeElement=function(node,opts){if(!node)return!1;switch(node.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isTSTypeLiteral=function(node,opts){return!!node&&("TSTypeLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeOperator=function(node,opts){return!!node&&("TSTypeOperator"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeParameter=function(node,opts){return!!node&&("TSTypeParameter"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeParameterDeclaration=function(node,opts){return!!node&&("TSTypeParameterDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeParameterInstantiation=function(node,opts){return!!node&&("TSTypeParameterInstantiation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypePredicate=function(node,opts){return!!node&&("TSTypePredicate"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeQuery=function(node,opts){return!!node&&("TSTypeQuery"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSTypeReference=function(node,opts){return!!node&&("TSTypeReference"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSUndefinedKeyword=function(node,opts){return!!node&&("TSUndefinedKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSUnionType=function(node,opts){return!!node&&("TSUnionType"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSUnknownKeyword=function(node,opts){return!!node&&("TSUnknownKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTSVoidKeyword=function(node,opts){return!!node&&("TSVoidKeyword"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTaggedTemplateExpression=function(node,opts){return!!node&&("TaggedTemplateExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTemplateElement=function(node,opts){return!!node&&("TemplateElement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTemplateLiteral=function(node,opts){return!!node&&("TemplateLiteral"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTerminatorless=function(node,opts){if(!node)return!1;switch(node.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isThisExpression=function(node,opts){return!!node&&("ThisExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isThisTypeAnnotation=function(node,opts){return!!node&&("ThisTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isThrowStatement=function(node,opts){return!!node&&("ThrowStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTopicReference=function(node,opts){return!!node&&("TopicReference"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTryStatement=function(node,opts){return!!node&&("TryStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTupleExpression=function(node,opts){return!!node&&("TupleExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTupleTypeAnnotation=function(node,opts){return!!node&&("TupleTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeAlias=function(node,opts){return!!node&&("TypeAlias"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeAnnotation=function(node,opts){return!!node&&("TypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeCastExpression=function(node,opts){return!!node&&("TypeCastExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeParameter=function(node,opts){return!!node&&("TypeParameter"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeParameterDeclaration=function(node,opts){return!!node&&("TypeParameterDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeParameterInstantiation=function(node,opts){return!!node&&("TypeParameterInstantiation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isTypeScript=function(node,opts){if(!node)return!1;switch(node.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isTypeofTypeAnnotation=function(node,opts){return!!node&&("TypeofTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isUnaryExpression=function(node,opts){return!!node&&("UnaryExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isUnaryLike=function(node,opts){if(!node)return!1;switch(node.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isUnionTypeAnnotation=function(node,opts){return!!node&&("UnionTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isUpdateExpression=function(node,opts){return!!node&&("UpdateExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isUserWhitespacable=function(node,opts){if(!node)return!1;switch(node.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isV8IntrinsicIdentifier=function(node,opts){return!!node&&("V8IntrinsicIdentifier"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isVariableDeclaration=function(node,opts){return!!node&&("VariableDeclaration"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isVariableDeclarator=function(node,opts){return!!node&&("VariableDeclarator"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isVariance=function(node,opts){return!!node&&("Variance"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isVoidPattern=function(node,opts){return!!node&&("VoidPattern"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isVoidTypeAnnotation=function(node,opts){return!!node&&("VoidTypeAnnotation"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isWhile=function(node,opts){if(!node)return!1;switch(node.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)},exports.isWhileStatement=function(node,opts){return!!node&&("WhileStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isWithStatement=function(node,opts){return!!node&&("WithStatement"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))},exports.isYieldExpression=function(node,opts){return!!node&&("YieldExpression"===node.type&&(null==opts||(0,_shallowEqual.default)(node,opts)))};var _shallowEqual=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/shallowEqual.js"),_deprecationWarning=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/deprecationWarning.js");function isImportOrExportDeclaration(node,opts){if(!node)return!1;switch(node.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return null==opts||(0,_shallowEqual.default)(node,opts)}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/is.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(type,node,opts){if(!node)return!1;if(!(0,_isType.default)(node.type,type))return!opts&&"Placeholder"===node.type&&type in _index.FLIPPED_ALIAS_KEYS&&(0,_isPlaceholderType.default)(node.expectedNode,type);return void 0===opts||(0,_shallowEqual.default)(node,opts)};var _shallowEqual=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/utils/shallowEqual.js"),_isType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isType.js"),_isPlaceholderType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isPlaceholderType.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isBinding.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,parent,grandparent){if(grandparent&&"Identifier"===node.type&&"ObjectProperty"===parent.type&&"ObjectExpression"===grandparent.type)return!1;const keys=_getBindingIdentifiers.default.keys[parent.type];if(keys)for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_index.isFunctionDeclaration)(node)||(0,_index.isClassDeclaration)(node)||(0,_isLet.default)(node)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),_isLet=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isLet.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isImmutable.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){if((0,_isType.default)(node.type,"Immutable"))return!0;if((0,_index.isIdentifier)(node))return"undefined"===node.name;return!1};var _isType=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isType.js"),_index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isLet.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_index.isVariableDeclaration)(node)&&("var"!==node.kind||node[BLOCK_SCOPED_SYMBOL])};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isNode.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return!(!node||!_index.VISITOR_KEYS[node.type])};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isNodesEquivalent.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function isNodesEquivalent(a,b){if("object"!=typeof a||"object"!=typeof b||null==a||null==b)return a===b;if(a.type!==b.type)return!1;const fields=Object.keys(_index.NODE_FIELDS[a.type]||a.type),visitorKeys=_index.VISITOR_KEYS[a.type];for(const field of fields){const val_a=a[field],val_b=b[field];if(typeof val_a!=typeof val_b)return!1;if(null!=val_a||null!=val_b){if(null==val_a||null==val_b)return!1;if(Array.isArray(val_a)){if(!Array.isArray(val_b))return!1;if(val_a.length!==val_b.length)return!1;for(let i=0;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(placeholderType,targetType){if(placeholderType===targetType)return!0;const aliases=_index.PLACEHOLDERS_ALIAS[placeholderType];return!(null==aliases||!aliases.includes(targetType))};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isReferenced.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,parent,grandparent){switch(parent.type){case"MemberExpression":case"OptionalMemberExpression":return parent.property===node?!!parent.computed:parent.object===node;case"JSXMemberExpression":return parent.object===node;case"VariableDeclarator":return parent.init===node;case"ArrowFunctionExpression":return parent.body===node;case"PrivateName":case"LabeledStatement":case"CatchClause":case"RestElement":case"BreakStatement":case"ContinueStatement":case"FunctionDeclaration":case"FunctionExpression":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportAttribute":case"JSXAttribute":case"ObjectPattern":case"ArrayPattern":case"MetaProperty":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return parent.key===node&&!!parent.computed;case"ObjectProperty":return parent.key===node?!!parent.computed:!grandparent||"ObjectPattern"!==grandparent.type;case"ClassProperty":case"ClassAccessorProperty":case"TSPropertySignature":return parent.key!==node||!!parent.computed;case"ClassPrivateProperty":case"ObjectTypeProperty":return parent.key!==node;case"ClassDeclaration":case"ClassExpression":return parent.superClass===node;case"AssignmentExpression":case"AssignmentPattern":return parent.right===node;case"ExportSpecifier":return(null==grandparent||!grandparent.source)&&parent.local===node;case"TSEnumMember":return parent.id!==node}return!0}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isScope.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,parent){if((0,_index.isBlockStatement)(node)&&((0,_index.isFunction)(parent)||(0,_index.isCatchClause)(parent)))return!1;if((0,_index.isPattern)(node)&&((0,_index.isFunction)(parent)||(0,_index.isCatchClause)(parent)))return!0;return(0,_index.isScopable)(node)};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isSpecifierDefault.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(specifier){return(0,_index.isImportDefaultSpecifier)(specifier)||(0,_index.isIdentifier)(specifier.imported||specifier.exported,{name:"default"})};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isType.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(nodeType,targetType){if(nodeType===targetType)return!0;if(null==nodeType)return!1;if(_index.ALIAS_KEYS[targetType])return!1;const aliases=_index.FLIPPED_ALIAS_KEYS[targetType];return!(null==aliases||!aliases.includes(nodeType))};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidES3Identifier.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(name){return(0,_isValidIdentifier.default)(name)&&!RESERVED_WORDS_ES3_ONLY.has(name)};var _isValidIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidIdentifier.js");const RESERVED_WORDS_ES3_ONLY=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"])},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isValidIdentifier.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(name,reserved=!0){if("string"!=typeof name)return!1;if(reserved&&((0,_helperValidatorIdentifier.isKeyword)(name)||(0,_helperValidatorIdentifier.isStrictReservedWord)(name,!0)))return!1;return(0,_helperValidatorIdentifier.isIdentifierName)(name)};var _helperValidatorIdentifier=__webpack_require__("./node_modules/.pnpm/@babel+helper-validator-identifier@7.27.1/node_modules/@babel/helper-validator-identifier/lib/index.js")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/isVar.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node){return(0,_index.isVariableDeclaration)(node,{kind:"var"})&&!node[BLOCK_SCOPED_SYMBOL]};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/generated/index.js"),BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped")},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/matchesPattern.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(member,match,allowPartial){if(!isMemberExpressionLike(member))return!1;const parts=Array.isArray(match)?match:match.split("."),nodes=[];let node;for(node=member;isMemberExpressionLike(node);node=null!=(_object=node.object)?_object:node.meta){var _object;nodes.push(node.property)}if(nodes.push(node),nodes.lengthparts.length)return!1;for(let i=0,j=nodes.length-1;i{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(tagName){return!!tagName&&/^[a-z]/.test(tagName)}},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/react/isReactComponent.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const isReactComponent=(0,__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js").default)("React.Component");exports.default=isReactComponent},"./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/validators/validate.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(node,key,val){if(!node)return;const fields=_index.NODE_FIELDS[node.type];if(!fields)return;const field=fields[key];validateField(node,key,val,field),validateChild(node,key,val)},exports.validateChild=validateChild,exports.validateField=validateField,exports.validateInternal=function(field,node,key,val,maybeNode){if(null==field||!field.validate)return;if(field.optional&&null==val)return;if(field.validate(node,key,val),maybeNode){var _NODE_PARENT_VALIDATI;const type=val.type;if(null==type)return;null==(_NODE_PARENT_VALIDATI=_index.NODE_PARENT_VALIDATIONS[type])||_NODE_PARENT_VALIDATI.call(_index.NODE_PARENT_VALIDATIONS,node,key,val)}};var _index=__webpack_require__("./node_modules/.pnpm/@babel+types@7.28.1/node_modules/@babel/types/lib/definitions/index.js");function validateField(node,key,val,field){null!=field&&field.validate&&(field.optional&&null==val||field.validate(node,key,val))}function validateChild(node,key,val){var _NODE_PARENT_VALIDATI2;const type=null==val?void 0:val.type;null!=type&&(null==(_NODE_PARENT_VALIDATI2=_index.NODE_PARENT_VALIDATIONS[type])||_NODE_PARENT_VALIDATI2.call(_index.NODE_PARENT_VALIDATIONS,node,key,val))}},"./node_modules/.pnpm/@jridgewell+gen-mapping@0.3.12/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js":function(module,__unused_webpack_exports,__webpack_require__){!function(module,require_sourcemapCodec,require_traceMapping){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},__copyProps(!isNodeMode&&mod&&mod.__esModule?target:__defProp(target,"default",{value:mod,enumerable:!0}),mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),require_sourcemap_codec=__commonJS({"umd:@jridgewell/sourcemap-codec"(exports,module2){module2.exports=require_sourcemapCodec}}),require_trace_mapping=__commonJS({"umd:@jridgewell/trace-mapping"(exports,module2){module2.exports=require_traceMapping}}),gen_mapping_exports={};__export(gen_mapping_exports,{GenMapping:()=>GenMapping,addMapping:()=>addMapping,addSegment:()=>addSegment,allMappings:()=>allMappings,fromMap:()=>fromMap,maybeAddMapping:()=>maybeAddMapping,maybeAddSegment:()=>maybeAddSegment,setIgnore:()=>setIgnore,setSourceContent:()=>setSourceContent,toDecodedMap:()=>toDecodedMap,toEncodedMap:()=>toEncodedMap}),module.exports=__toCommonJS(gen_mapping_exports);var SetArray=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function cast(set){return set}function get(setarr,key){return cast(setarr)._indexes[key]}function put(setarr,key){const index=get(setarr,key);if(void 0!==index)return index;const{array,_indexes:indexes}=cast(setarr),length=array.push(key);return indexes[key]=length-1}function remove(setarr,key){const index=get(setarr,key);if(void 0===index)return;const{array,_indexes:indexes}=cast(setarr);for(let i=index+1;iaddSegmentInternal(!0,map,genLine,genColumn,source,sourceLine,sourceColumn,name,content),maybeAddMapping=(map,mapping)=>addMappingInternal(!0,map,mapping);function setSourceContent(map,source,content){const{_sources:sources,_sourcesContent:sourcesContent}=cast2(map);sourcesContent[put(sources,source)]=content}function setIgnore(map,source,ignore=!0){const{_sources:sources,_sourcesContent:sourcesContent,_ignoreList:ignoreList}=cast2(map),index=put(sources,source);index===sourcesContent.length&&(sourcesContent[index]=null),ignore?put(ignoreList,index):remove(ignoreList,index)}function toDecodedMap(map){const{_mappings:mappings,_sources:sources,_sourcesContent:sourcesContent,_names:names,_ignoreList:ignoreList}=cast2(map);return removeEmptyFinalLines(mappings),{version:3,file:map.file||void 0,names:names.array,sourceRoot:map.sourceRoot||void 0,sources:sources.array,sourcesContent,mappings,ignoreList:ignoreList.array}}function toEncodedMap(map){const decoded=toDecodedMap(map);return Object.assign({},decoded,{mappings:(0,import_sourcemap_codec.encode)(decoded.mappings)})}function fromMap(input){const map=new import_trace_mapping.TraceMap(input),gen=new GenMapping({file:map.file,sourceRoot:map.sourceRoot});return putAll(cast2(gen)._names,map.names),putAll(cast2(gen)._sources,map.sources),cast2(gen)._sourcesContent=map.sourcesContent||map.sources.map(()=>null),cast2(gen)._mappings=(0,import_trace_mapping.decodedMappings)(map),map.ignoreList&&putAll(cast2(gen)._ignoreList,map.ignoreList),gen}function allMappings(map){const out=[],{_mappings:mappings,_sources:sources,_names:names}=cast2(map);for(let i=0;i=0&&!(genColumn>=line[i][COLUMN]);index=i--);return index}function insert(array,index,value){for(let i=array.length;i>index;i--)array[i]=array[i-1];array[index]=value}function removeEmptyFinalLines(mappings){const{length}=mappings;let len=length;for(let i=len-1;i>=0&&!(mappings[i].length>0);len=i,i--);leninputType&&(inputType=baseType)}normalizePath(url,inputType);const queryHash=url.query+url.hash;switch(inputType){case 2:case 3:return queryHash;case 4:{const path=url.path.slice(1);return path?isRelative(base||input)&&!isRelative(path)?"./"+path+queryHash:path+queryHash:queryHash||"."}case 5:return url.path+queryHash;default:return url.scheme+"//"+url.user+url.host+url.port+url.path+queryHash}}return resolve}()},"./node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.4/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js":function(module,__unused_webpack_exports,__webpack_require__){!function(module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),sourcemap_codec_exports={};((target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})})(sourcemap_codec_exports,{decode:()=>decode,decodeGeneratedRanges:()=>decodeGeneratedRanges,decodeOriginalScopes:()=>decodeOriginalScopes,encode:()=>encode,encodeGeneratedRanges:()=>encodeGeneratedRanges,encodeOriginalScopes:()=>encodeOriginalScopes}),module.exports=__toCommonJS(sourcemap_codec_exports);var comma=",".charCodeAt(0),semicolon=";".charCodeAt(0),chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",intToChar=new Uint8Array(64),charToInt=new Uint8Array(128);for(let i=0;i>>=1,shouldNegate&&(value=-2147483648|-value),relative+value}function encodeInteger(builder,num,relative){let delta=num-relative;delta=delta<0?-delta<<1|1:delta<<1;do{let clamped=31δdelta>>>=5,delta>0&&(clamped|=32),builder.write(intToChar[clamped])}while(delta>0);return num}function hasMoreVlq(reader,max){return!(reader.pos>=max)&&reader.peek()!==comma}var bufLength=16384,td="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:buf=>Buffer.from(buf.buffer,buf.byteOffset,buf.byteLength).toString()}:{decode(buf){let out="";for(let i=0;i0?out+td.decode(buffer.subarray(0,pos)):out}},StringReader=class{constructor(buffer){this.pos=0,this.buffer=buffer}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(char){const{buffer,pos}=this,idx=buffer.indexOf(char,pos);return-1===idx?buffer.length:idx}},EMPTY=[];function decodeOriginalScopes(input){const{length}=input,reader=new StringReader(input),scopes=[],stack=[];let line=0;for(;reader.pos0&&writer.write(comma),state[0]=encodeInteger(writer,startLine,state[0]),encodeInteger(writer,startColumn,0),encodeInteger(writer,kind,0),encodeInteger(writer,6===scope.length?1:0,0),6===scope.length&&encodeInteger(writer,scope[5],0);for(const v of vars)encodeInteger(writer,v,0);for(index++;indexendLine||l===endLine&&c>=endColumn)break;index=_encodeOriginalScopes(scopes,index,writer,state)}return writer.write(comma),state[0]=encodeInteger(writer,endLine,state[0]),encodeInteger(writer,endColumn,0),index}function decodeGeneratedRanges(input){const{length}=input,reader=new StringReader(input),ranges=[],stack=[];let genLine=0,definitionSourcesIndex=0,definitionScopeIndex=0,callsiteSourcesIndex=0,callsiteLine=0,callsiteColumn=0,bindingLine=0,bindingColumn=0;do{const semi=reader.indexOf(";");let genColumn=0;for(;reader.posexpressionsCount;i--){const prevBl=bindingLine;bindingLine=decodeInteger(reader,bindingLine),bindingColumn=decodeInteger(reader,bindingLine===prevBl?bindingColumn:0);const expression=decodeInteger(reader,0);expressionRanges.push([expression,bindingLine,bindingColumn])}}else expressionRanges=[[expressionsCount]];bindings.push(expressionRanges)}while(hasMoreVlq(reader,semi))}range.bindings=bindings,ranges.push(range),stack.push(range)}genLine++,reader.pos=semi+1}while(reader.pos0&&writer.write(comma),state[1]=encodeInteger(writer,range[1],state[1]),encodeInteger(writer,(6===range.length?1:0)|(callsite?2:0)|(isScope?4:0),0),6===range.length){const{4:sourcesIndex,5:scopesIndex}=range;sourcesIndex!==state[2]&&(state[3]=0),state[2]=encodeInteger(writer,sourcesIndex,state[2]),state[3]=encodeInteger(writer,scopesIndex,state[3])}if(callsite){const{0:sourcesIndex,1:callLine,2:callColumn}=range.callsite;sourcesIndex!==state[4]?(state[5]=0,state[6]=0):callLine!==state[5]&&(state[6]=0),state[4]=encodeInteger(writer,sourcesIndex,state[4]),state[5]=encodeInteger(writer,callLine,state[5]),state[6]=encodeInteger(writer,callColumn,state[6])}if(bindings)for(const binding of bindings){binding.length>1&&encodeInteger(writer,-binding.length,0),encodeInteger(writer,binding[0][0],0);let bindingStartLine=startLine,bindingStartColumn=startColumn;for(let i=1;iendLine||l===endLine&&c>=endColumn)break;index=_encodeGeneratedRanges(ranges,index,writer,state)}return state[0]0&&writer.write(semicolon),0===line.length)continue;let genColumn=0;for(let j=0;j0&&writer.write(comma),genColumn=encodeInteger(writer,segment[0],genColumn),1!==segment.length&&(sourcesIndex=encodeInteger(writer,segment[1],sourcesIndex),sourceLine=encodeInteger(writer,segment[2],sourceLine),sourceColumn=encodeInteger(writer,segment[3],sourceColumn),4!==segment.length&&(namesIndex=encodeInteger(writer,segment[4],namesIndex)))}}return writer.flush()}}(module=__webpack_require__.nmd(module))},"./node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js":function(module,__unused_webpack_exports,__webpack_require__){!function(module,require_resolveURI,require_sourcemapCodec){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports},__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM=(mod,isNodeMode,target)=>(target=null!=mod?__create(__getProtoOf(mod)):{},__copyProps(!isNodeMode&&mod&&mod.__esModule?target:__defProp(target,"default",{value:mod,enumerable:!0}),mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),require_sourcemap_codec=__commonJS({"umd:@jridgewell/sourcemap-codec"(exports,module2){module2.exports=require_sourcemapCodec}}),require_resolve_uri=__commonJS({"umd:@jridgewell/resolve-uri"(exports,module2){module2.exports=require_resolveURI}}),trace_mapping_exports={};__export(trace_mapping_exports,{AnyMap:()=>FlattenMap,FlattenMap:()=>FlattenMap,GREATEST_LOWER_BOUND:()=>GREATEST_LOWER_BOUND,LEAST_UPPER_BOUND:()=>LEAST_UPPER_BOUND,TraceMap:()=>TraceMap,allGeneratedPositionsFor:()=>allGeneratedPositionsFor,decodedMap:()=>decodedMap,decodedMappings:()=>decodedMappings,eachMapping:()=>eachMapping,encodedMap:()=>encodedMap,encodedMappings:()=>encodedMappings,generatedPositionFor:()=>generatedPositionFor,isIgnored:()=>isIgnored,originalPositionFor:()=>originalPositionFor,presortedDecodedMap:()=>presortedDecodedMap,sourceContentFor:()=>sourceContentFor,traceSegment:()=>traceSegment}),module.exports=__toCommonJS(trace_mapping_exports);var import_sourcemap_codec=__toESM(require_sourcemap_codec()),import_resolve_uri=__toESM(require_resolve_uri());function stripFilename(path){if(!path)return"";const index=path.lastIndexOf("/");return path.slice(0,index+1)}function resolver(mapUrl,sourceRoot){const from=stripFilename(mapUrl),prefix=sourceRoot?sourceRoot+"/":"";return source=>(0,import_resolve_uri.default)(prefix+(source||""),from)}var COLUMN=0,SOURCES_INDEX=1,SOURCE_LINE=2,SOURCE_COLUMN=3,NAMES_INDEX=4,REV_GENERATED_LINE=1,REV_GENERATED_COLUMN=2;function maybeSort(mappings,owned){const unsortedIndex=nextUnsortedSegmentLine(mappings,0);if(unsortedIndex===mappings.length)return mappings;owned||(mappings=mappings.slice());for(let i=unsortedIndex;i>1),cmp=haystack[mid][COLUMN]-needle;if(0===cmp)return found=!0,mid;cmp<0?low=mid+1:high=mid-1}return found=!1,low-1}function upperBound(haystack,needle,index){for(let i=index+1;i=0&&haystack[i][COLUMN]===needle;index=i--);return index}function memoizedState(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function memoizedBinarySearch(haystack,needle,state,key){const{lastKey,lastNeedle,lastIndex}=state;let low=0,high=haystack.length-1;if(key===lastKey){if(needle===lastNeedle)return found=-1!==lastIndex&&haystack[lastIndex][COLUMN]===needle,lastIndex;needle>=lastNeedle?low=-1===lastIndex?0:lastIndex:high=lastIndex}return state.lastKey=key,state.lastNeedle=needle,state.lastIndex=binarySearch(haystack,needle,low,high)}function buildBySources(decoded,memos){const sources=memos.map(buildNullArray);for(let i=0;iindex;i--)array[i]=array[i-1];array[index]=value}function buildNullArray(){return{__proto__:null}}function parse(map){return"string"==typeof map?JSON.parse(map):map}var FlattenMap=function(map,mapUrl){const parsed=parse(map);if(!("sections"in parsed))return new TraceMap(parsed,mapUrl);const mappings=[],sources=[],sourcesContent=[],names=[],ignoreList=[];return recurse(parsed,mapUrl,mappings,sources,sourcesContent,names,ignoreList,0,0,1/0,1/0),presortedDecodedMap({version:3,file:parsed.file,names,sources,sourcesContent,mappings,ignoreList})};function recurse(input,mapUrl,mappings,sources,sourcesContent,names,ignoreList,lineOffset,columnOffset,stopLine,stopColumn){const{sections}=input;for(let i=0;istopLine)return;const out=getLine(mappings,lineI),cOffset=0===i?columnOffset:0,line=decoded[i];for(let j=0;j=stopColumn)return;if(1===seg.length){out.push([column]);continue}const sourcesIndex=sourcesOffset+seg[SOURCES_INDEX],sourceLine=seg[SOURCE_LINE],sourceColumn=seg[SOURCE_COLUMN];out.push(4===seg.length?[column,sourcesIndex,sourceLine,sourceColumn]:[column,sourcesIndex,sourceLine,sourceColumn,namesOffset+seg[NAMES_INDEX]])}}}function append(arr,other){for(let i=0;i=decoded.length)return null;const segments=decoded[line],index=traceSegmentInternal(segments,cast(map)._decodedMemo,line,column,GREATEST_LOWER_BOUND);return-1===index?null:segments[index]}function originalPositionFor(map,needle){let{line,column,bias}=needle;if(line--,line<0)throw new Error(LINE_GTR_ZERO);if(column<0)throw new Error(COL_GTR_EQ_ZERO);const decoded=decodedMappings(map);if(line>=decoded.length)return OMapping(null,null,null,null);const segments=decoded[line],index=traceSegmentInternal(segments,cast(map)._decodedMemo,line,column,bias||GREATEST_LOWER_BOUND);if(-1===index)return OMapping(null,null,null,null);const segment=segments[index];if(1===segment.length)return OMapping(null,null,null,null);const{names,resolvedSources}=map;return OMapping(resolvedSources[segment[SOURCES_INDEX]],segment[SOURCE_LINE]+1,segment[SOURCE_COLUMN],5===segment.length?names[segment[NAMES_INDEX]]:null)}function generatedPositionFor(map,needle){const{source,line,column,bias}=needle;return generatedPosition(map,source,line,column,bias||GREATEST_LOWER_BOUND,!1)}function allGeneratedPositionsFor(map,needle){const{source,line,column,bias}=needle;return generatedPosition(map,source,line,column,bias||LEAST_UPPER_BOUND,!0)}function eachMapping(map,cb){const decoded=decodedMappings(map),{names,resolvedSources}=map;for(let i=0;i{"use strict";var _path=__webpack_require__("path");function isInType(path){switch(path.parent.type){case"TSTypeReference":case"TSQualifiedName":case"TSExpressionWithTypeArguments":case"TSTypeQuery":return!0;default:return!1}}module.exports=function(_ref){var types=_ref.types,decoratorExpressionForConstructor=function(decorator,param){return function(className){var resultantDecorator=types.callExpression(decorator.expression,[types.Identifier(className),types.Identifier("undefined"),types.NumericLiteral(param.key)]),resultantDecoratorWithFallback=types.logicalExpression("||",resultantDecorator,types.Identifier(className)),assignment=types.assignmentExpression("=",types.Identifier(className),resultantDecoratorWithFallback);return types.expressionStatement(assignment)}},decoratorExpressionForMethod=function(decorator,param){return function(className,functionName){var resultantDecorator=types.callExpression(decorator.expression,[types.Identifier("".concat(className,".prototype")),types.StringLiteral(functionName),types.NumericLiteral(param.key)]);return types.expressionStatement(resultantDecorator)}};return{visitor:{Program:function(path,state){var extension=(0,_path.extname)(state.file.opts.filename);".ts"!==extension&&".tsx"!==extension||function(){var decorators=Object.create(null);path.node.body.filter(function(it){var type=it.type,declaration=it.declaration;switch(type){case"ClassDeclaration":return!0;case"ExportNamedDeclaration":case"ExportDefaultDeclaration":return declaration&&"ClassDeclaration"===declaration.type;default:return!1}}).map(function(it){return"ClassDeclaration"===it.type?it:it.declaration}).forEach(function(clazz){clazz.body.body.forEach(function(body){(body.params||[]).forEach(function(param){(param.decorators||[]).forEach(function(decorator){decorator.expression.callee?decorators[decorator.expression.callee.name]=decorator:decorators[decorator.expression.name]=decorator})})})});var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=path.get("body")[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var stmt=_step.value;if("ImportDeclaration"===stmt.node.type){if(0===stmt.node.specifiers.length)continue;var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_loop=function(){var specifier=_step2.value,binding=stmt.scope.getBinding(specifier.local.name);binding.referencePaths.length?binding.referencePaths.reduce(function(prev,next){return prev||isInType(next)},!1)&&Object.keys(decorators).forEach(function(k){var decorator=decorators[k];(decorator.expression.arguments||[]).forEach(function(arg){arg.name===specifier.local.name&&binding.referencePaths.push({parent:decorator.expression})})}):decorators[specifier.local.name]&&binding.referencePaths.push({parent:decorators[specifier.local.name]})},_iterator2=stmt.node.specifiers[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)_loop()}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{_iteratorNormalCompletion2||null==_iterator2.return||_iterator2.return()}finally{if(_didIteratorError2)throw _iteratorError2}}}}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{_iteratorNormalCompletion||null==_iterator.return||_iterator.return()}finally{if(_didIteratorError)throw _iteratorError}}}()},Function:function(path){var functionName="";path.node.id?functionName=path.node.id.name:path.node.key&&(functionName=path.node.key.name),(path.get("params")||[]).slice().forEach(function(param){var decorators=param.node.decorators||[],transformable=decorators.length;if(decorators.slice().forEach(function(decorator){if("ClassMethod"===path.type){var classIdentifier,parentNode=path.parentPath.parentPath,classDeclaration=path.findParent(function(p){return"ClassDeclaration"===p.type});if(classDeclaration?classIdentifier=classDeclaration.node.id.name:(parentNode.insertAfter(null),classIdentifier=function(path){var assignment=path.findParent(function(p){return"AssignmentExpression"===p.node.type});return"SequenceExpression"===assignment.node.right.type?assignment.node.right.expressions[1].name:"ClassExpression"===assignment.node.right.type?assignment.node.left.name:null}(path)),"constructor"===functionName){var expression=decoratorExpressionForConstructor(decorator,param)(classIdentifier);parentNode.insertAfter(expression)}else{var _expression=decoratorExpressionForMethod(decorator,param)(classIdentifier,functionName);parentNode.insertAfter(_expression)}}else{var className=path.findParent(function(p){return"VariableDeclarator"===p.node.type}).node.id.name;if(functionName===className){var _expression2=decoratorExpressionForConstructor(decorator,param)(className);if("body"===path.parentKey)path.insertAfter(_expression2);else path.findParent(function(p){return"body"===p.parentKey}).insertAfter(_expression2)}else{var classParent=path.findParent(function(p){return"CallExpression"===p.node.type}),_expression3=decoratorExpressionForMethod(decorator,param)(className,functionName);classParent.insertAfter(_expression3)}}}),transformable){var replacement=function(path){switch(path.node.type){case"ObjectPattern":return types.ObjectPattern(path.node.properties);case"AssignmentPattern":return types.AssignmentPattern(path.node.left,path.node.right);case"TSParameterProperty":return types.Identifier(path.node.parameter.name);default:return types.Identifier(path.node.name)}}(param);param.replaceWith(replacement)}})}}}}},"./node_modules/.pnpm/convert-source-map@2.0.0/node_modules/convert-source-map/index.js":(__unused_webpack_module,exports)=>{"use strict";var decodeBase64;function Converter(sm,opts){(opts=opts||{}).hasComment&&(sm=function(sm){return sm.split(",").pop()}(sm)),"base64"===opts.encoding?sm=decodeBase64(sm):"uri"===opts.encoding&&(sm=decodeURIComponent(sm)),(opts.isJSON||opts.encoding)&&(sm=JSON.parse(sm)),this.sourcemap=sm}function makeConverter(sm){return new Converter(sm,{isJSON:!0})}Object.defineProperty(exports,"commentRegex",{get:function(){return/^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm}}),Object.defineProperty(exports,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/gm}}),decodeBase64="undefined"!=typeof Buffer?"function"==typeof Buffer.from?function(base64){return Buffer.from(base64,"base64").toString()}:function(base64){if("number"==typeof value)throw new TypeError("The value to decode must not be of type number.");return new Buffer(base64,"base64").toString()}:function(base64){return decodeURIComponent(escape(atob(base64)))},Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)},"undefined"!=typeof Buffer?"function"==typeof Buffer.from?Converter.prototype.toBase64=function(){var json=this.toJSON();return Buffer.from(json,"utf8").toString("base64")}:Converter.prototype.toBase64=function(){var json=this.toJSON();if("number"==typeof json)throw new TypeError("The json to encode must not be of type number.");return new Buffer(json,"utf8").toString("base64")}:Converter.prototype.toBase64=function(){var json=this.toJSON();return btoa(unescape(encodeURIComponent(json)))},Converter.prototype.toURI=function(){var json=this.toJSON();return encodeURIComponent(json)},Converter.prototype.toComment=function(options){var encoding,content,data;return null!=options&&"uri"===options.encoding?(encoding="",content=this.toURI()):(encoding=";base64",content=this.toBase64()),data="sourceMappingURL=data:application/json;charset=utf-8"+encoding+","+content,null!=options&&options.multiline?"/*# "+data+" */":"//# "+data},Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())},Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error('property "'+key+'" already exists on the sourcemap, use set property instead');return this.setProperty(key,value)},Converter.prototype.setProperty=function(key,value){return this.sourcemap[key]=value,this},Converter.prototype.getProperty=function(key){return this.sourcemap[key]},exports.fromObject=function(obj){return new Converter(obj)},exports.fromJSON=function(json){return new Converter(json,{isJSON:!0})},exports.fromURI=function(uri){return new Converter(uri,{encoding:"uri"})},exports.fromBase64=function(base64){return new Converter(base64,{encoding:"base64"})},exports.fromComment=function(comment){var m;return new Converter(comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),{encoding:(m=exports.commentRegex.exec(comment))&&m[4]||"uri",hasComment:!0})},exports.fromMapFileComment=function(comment,read){if("string"==typeof read)throw new Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var sm=function(sm,read){var r=exports.mapFileCommentRegex.exec(sm),filename=r[1]||r[2];try{return null!=(sm=read(filename))&&"function"==typeof sm.catch?sm.catch(throwError):sm}catch(e){throwError(e)}function throwError(e){throw new Error("An error occurred while trying to read the map file at "+filename+"\n"+e.stack)}}(comment,read);return null!=sm&&"function"==typeof sm.then?sm.then(makeConverter):makeConverter(sm)},exports.fromSource=function(content){var m=content.match(exports.commentRegex);return m?exports.fromComment(m.pop()):null},exports.fromMapFileSource=function(content,read){if("string"==typeof read)throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var m=content.match(exports.mapFileCommentRegex);return m?exports.fromMapFileComment(m.pop(),read):null},exports.removeComments=function(src){return src.replace(exports.commentRegex,"")},exports.removeMapFileComments=function(src){return src.replace(exports.mapFileCommentRegex,"")},exports.generateMapFileComment=function(file,options){var data="sourceMappingURL="+file;return options&&options.multiline?"/*# "+data+" */":"//# "+data}},"./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js":(module,exports,__webpack_require__)=>{exports.formatArgs=function(args){if(args[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+args[0]+(this.useColors?"%c ":" ")+"+"+module.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;args.splice(1,0,c,"color: inherit");let index=0,lastC=0;args[0].replace(/%[a-zA-Z%]/g,match=>{"%%"!==match&&(index++,"%c"===match&&(lastC=index))}),args.splice(lastC,0,c)},exports.save=function(namespaces){try{namespaces?exports.storage.setItem("debug",namespaces):exports.storage.removeItem("debug")}catch(error){}},exports.load=function(){let r;try{r=exports.storage.getItem("debug")||exports.storage.getItem("DEBUG")}catch(error){}!r&&"undefined"!=typeof process&&"env"in process&&(r=process.env.DEBUG);return r},exports.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let m;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(m=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(m[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},exports.storage=function(){try{return localStorage}catch(error){}}(),exports.destroy=(()=>{let warned=!1;return()=>{warned||(warned=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),exports.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],exports.log=console.debug||console.log||(()=>{}),module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js")(exports);const{formatters}=module.exports;formatters.j=function(v){try{return JSON.stringify(v)}catch(error){return"[UnexpectedJSONParseError]: "+error.message}}},"./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=function(env){function createDebug(namespace){let prevTime,namespacesCache,enabledCache,enableOverride=null;function debug(...args){if(!debug.enabled)return;const self=debug,curr=Number(new Date),ms=curr-(prevTime||curr);self.diff=ms,self.prev=prevTime,self.curr=curr,prevTime=curr,args[0]=createDebug.coerce(args[0]),"string"!=typeof args[0]&&args.unshift("%O");let index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,(match,format)=>{if("%%"===match)return"%";index++;const formatter=createDebug.formatters[format];if("function"==typeof formatter){const val=args[index];match=formatter.call(self,val),args.splice(index,1),index--}return match}),createDebug.formatArgs.call(self,args);(self.log||createDebug.log).apply(self,args)}return debug.namespace=namespace,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(namespace),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==enableOverride?enableOverride:(namespacesCache!==createDebug.namespaces&&(namespacesCache=createDebug.namespaces,enabledCache=createDebug.enabled(namespace)),enabledCache),set:v=>{enableOverride=v}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(namespace,delimiter){const newDebug=createDebug(this.namespace+(void 0===delimiter?":":delimiter)+namespace);return newDebug.log=this.log,newDebug}function matchesTemplate(search,template){let searchIndex=0,templateIndex=0,starIndex=-1,matchIndex=0;for(;searchIndex"-"+namespace)].join(",");return createDebug.enable(""),namespaces},createDebug.enable=function(namespaces){createDebug.save(namespaces),createDebug.namespaces=namespaces,createDebug.names=[],createDebug.skips=[];const split=("string"==typeof namespaces?namespaces:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const ns of split)"-"===ns[0]?createDebug.skips.push(ns.slice(1)):createDebug.names.push(ns)},createDebug.enabled=function(name){for(const skip of createDebug.skips)if(matchesTemplate(name,skip))return!1;for(const ns of createDebug.names)if(matchesTemplate(name,ns))return!0;return!1},createDebug.humanize=__webpack_require__("./node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"),createDebug.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(env).forEach(key=>{createDebug[key]=env[key]}),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function(namespace){let hash=0;for(let i=0;i{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js"):module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js")},"./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js":(module,exports,__webpack_require__)=>{const tty=__webpack_require__("tty"),util=__webpack_require__("util");exports.init=function(debug){debug.inspectOpts={};const keys=Object.keys(exports.inspectOpts);for(let i=0;i{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),exports.colors=[6,2,3,4,5,1];try{const supportsColor=__webpack_require__("./node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js");supportsColor&&(supportsColor.stderr||supportsColor).level>=2&&(exports.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(error){}exports.inspectOpts=Object.keys(process.env).filter(key=>/^debug_/i.test(key)).reduce((obj,key)=>{const prop=key.substring(6).toLowerCase().replace(/_([a-z])/g,(_,k)=>k.toUpperCase());let val=process.env[key];return val=!!/^(yes|on|true|enabled)$/i.test(val)||!/^(no|off|false|disabled)$/i.test(val)&&("null"===val?null:Number(val)),obj[prop]=val,obj},{}),module.exports=__webpack_require__("./node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js")(exports);const{formatters}=module.exports;formatters.o=function(v){return this.inspectOpts.colors=this.useColors,util.inspect(v,this.inspectOpts).split("\n").map(str=>str.trim()).join(" ")},formatters.O=function(v){return this.inspectOpts.colors=this.useColors,util.inspect(v,this.inspectOpts)}},"./node_modules/.pnpm/gensync@1.0.0-beta.2/node_modules/gensync/index.js":module=>{"use strict";const GENSYNC_START=Symbol.for("gensync:v1:start"),GENSYNC_SUSPEND=Symbol.for("gensync:v1:suspend");function assertTypeof(type,name,value,allowUndefined){if(typeof value===type||allowUndefined&&void 0===value)return;let msg;throw msg=allowUndefined?`Expected opts.${name} to be either a ${type}, or undefined.`:`Expected opts.${name} to be a ${type}.`,makeError(msg,"GENSYNC_OPTIONS_ERROR")}function makeError(msg,code){return Object.assign(new Error(msg),{code})}function buildOperation({name,arity,sync,async}){return setFunctionMetadata(name,arity,function*(...args){const resume=yield GENSYNC_START;if(!resume){return sync.call(this,args)}let result;try{async.call(this,args,value=>{result||(result={value},resume())},err=>{result||(result={err},resume())})}catch(err){result={err},resume()}if(yield GENSYNC_SUSPEND,result.hasOwnProperty("err"))throw result.err;return result.value})}function evaluateSync(gen){let value;for(;!({value}=gen.next()).done;)assertStart(value,gen);return value}function evaluateAsync(gen,resolve,reject){!function step(){try{let value;for(;!({value}=gen.next()).done;){assertStart(value,gen);let sync=!0,didSyncResume=!1;const out=gen.next(()=>{sync?didSyncResume=!0:step()});if(sync=!1,assertSuspend(out,gen),!didSyncResume)return}return resolve(value)}catch(err){return reject(err)}}()}function assertStart(value,gen){value!==GENSYNC_START&&throwError(gen,makeError(`Got unexpected yielded value in gensync generator: ${JSON.stringify(value)}. Did you perhaps mean to use 'yield*' instead of 'yield'?`,"GENSYNC_EXPECTED_START"))}function assertSuspend({value,done},gen){(done||value!==GENSYNC_SUSPEND)&&throwError(gen,makeError(done?"Unexpected generator completion. If you get this, it is probably a gensync bug.":`Expected GENSYNC_SUSPEND, got ${JSON.stringify(value)}. If you get this, it is probably a gensync bug.`,"GENSYNC_EXPECTED_SUSPEND"))}function throwError(gen,err){throw gen.throw&&gen.throw(err),err}function setFunctionMetadata(name,arity,fn){if("string"==typeof name){const nameDesc=Object.getOwnPropertyDescriptor(fn,"name");nameDesc&&!nameDesc.configurable||Object.defineProperty(fn,"name",Object.assign(nameDesc||{},{configurable:!0,value:name}))}if("number"==typeof arity){const lengthDesc=Object.getOwnPropertyDescriptor(fn,"length");lengthDesc&&!lengthDesc.configurable||Object.defineProperty(fn,"length",Object.assign(lengthDesc||{},{configurable:!0,value:arity}))}return fn}module.exports=Object.assign(function(optsOrFn){let genFn=optsOrFn;return genFn="function"!=typeof optsOrFn?function({name,arity,sync,async,errback}){if(assertTypeof("string","name",name,!0),assertTypeof("number","arity",arity,!0),assertTypeof("function","sync",sync),assertTypeof("function","async",async,!0),assertTypeof("function","errback",errback,!0),async&&errback)throw makeError("Expected one of either opts.async or opts.errback, but got _both_.","GENSYNC_OPTIONS_ERROR");if("string"!=typeof name){let fnName;errback&&errback.name&&"errback"!==errback.name&&(fnName=errback.name),async&&async.name&&"async"!==async.name&&(fnName=async.name.replace(/Async$/,"")),sync&&sync.name&&"sync"!==sync.name&&(fnName=sync.name.replace(/Sync$/,"")),"string"==typeof fnName&&(name=fnName)}"number"!=typeof arity&&(arity=sync.length);return buildOperation({name,arity,sync:function(args){return sync.apply(this,args)},async:function(args,resolve,reject){async?async.apply(this,args).then(resolve,reject):errback?errback.call(this,...args,(err,value)=>{null==err?resolve(value):reject(err)}):resolve(sync.apply(this,args))}})}(optsOrFn):function(genFn){return setFunctionMetadata(genFn.name,genFn.length,function(...args){return genFn.apply(this,args)})}(optsOrFn),Object.assign(genFn,function(genFn){const fns={sync:function(...args){return evaluateSync(genFn.apply(this,args))},async:function(...args){return new Promise((resolve,reject)=>{evaluateAsync(genFn.apply(this,args),resolve,reject)})},errback:function(...args){const cb=args.pop();if("function"!=typeof cb)throw makeError("Asynchronous function called without callback","GENSYNC_ERRBACK_NO_CALLBACK");let gen;try{gen=genFn.apply(this,args)}catch(err){return void cb(err)}evaluateAsync(gen,val=>cb(void 0,val),err=>cb(err))}};return fns}(genFn))},{all:buildOperation({name:"all",arity:1,sync:function(args){return Array.from(args[0]).map(item=>evaluateSync(item))},async:function(args,resolve,reject){const items=Array.from(args[0]);if(0===items.length)return void Promise.resolve().then(()=>resolve([]));let count=0;const results=items.map(()=>{});items.forEach((item,i)=>{evaluateAsync(item,val=>{results[i]=val,count+=1,count===results.length&&resolve(results)},reject)})}}),race:buildOperation({name:"race",arity:1,sync:function(args){const items=Array.from(args[0]);if(0===items.length)throw makeError("Must race at least 1 item","GENSYNC_RACE_NONEMPTY");return evaluateSync(items[0])},async:function(args,resolve,reject){const items=Array.from(args[0]);if(0===items.length)throw makeError("Must race at least 1 item","GENSYNC_RACE_NONEMPTY");for(const item of items)evaluateAsync(item,resolve,reject)}})})},"./node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js":module=>{"use strict";module.exports=(flag,argv=process.argv)=>{const prefix=flag.startsWith("-")?"":1===flag.length?"-":"--",position=argv.indexOf(prefix+flag),terminatorPosition=argv.indexOf("--");return-1!==position&&(-1===terminatorPosition||position{"use strict";const object={},hasOwnProperty=object.hasOwnProperty,forOwn=(object,callback)=>{for(const key in object)hasOwnProperty.call(object,key)&&callback(key,object[key])},fourHexEscape=hex=>"\\u"+("0000"+hex).slice(-4),hexadecimal=(code,lowercase)=>{let hexadecimal=code.toString(16);return lowercase?hexadecimal:hexadecimal.toUpperCase()},toString=object.toString,isArray=Array.isArray,isBigInt=value=>"bigint"==typeof value,singleEscapes={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},regexSingleEscape=/[\\\b\f\n\r\t]/,regexDigit=/[0-9]/,regexWhitespace=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,escapeEverythingRegex=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,escapeNonAsciiRegex=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,jsesc=(argument,options)=>{const increaseIndentation=()=>{oldIndent=indent,++options.indentLevel,indent=options.indent.repeat(options.indentLevel)},defaults={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",indentLevel:0,__inline1__:!1,__inline2__:!1},json=options&&options.json;var destination,source;json&&(defaults.quotes="double",defaults.wrap=!0),destination=defaults,"single"!=(options=(source=options)?(forOwn(source,(key,value)=>{destination[key]=value}),destination):destination).quotes&&"double"!=options.quotes&&"backtick"!=options.quotes&&(options.quotes="single");const quote="double"==options.quotes?'"':"backtick"==options.quotes?"`":"'",compact=options.compact,lowercaseHex=options.lowercaseHex;let indent=options.indent.repeat(options.indentLevel),oldIndent="";const inline1=options.__inline1__,inline2=options.__inline2__,newLine=compact?"":"\n";let result,isEmpty=!0;const useBinNumbers="binary"==options.numbers,useOctNumbers="octal"==options.numbers,useDecNumbers="decimal"==options.numbers,useHexNumbers="hexadecimal"==options.numbers;if(json&&argument&&(value=>"function"==typeof value)(argument.toJSON)&&(argument=argument.toJSON()),!(value=>"string"==typeof value||"[object String]"==toString.call(value))(argument)){if((value=>"[object Map]"==toString.call(value))(argument))return 0==argument.size?"new Map()":(compact||(options.__inline1__=!0,options.__inline2__=!1),"new Map("+jsesc(Array.from(argument),options)+")");if((value=>"[object Set]"==toString.call(value))(argument))return 0==argument.size?"new Set()":"new Set("+jsesc(Array.from(argument),options)+")";if((value=>"function"==typeof Buffer&&Buffer.isBuffer(value))(argument))return 0==argument.length?"Buffer.from([])":"Buffer.from("+jsesc(Array.from(argument),options)+")";if(isArray(argument))return result=[],options.wrap=!0,inline1&&(options.__inline1__=!1,options.__inline2__=!0),inline2||increaseIndentation(),((array,callback)=>{const length=array.length;let index=-1;for(;++index{isEmpty=!1,inline2&&(options.__inline2__=!1),result.push((compact||inline2?"":indent)+jsesc(value,options))}),isEmpty?"[]":inline2?"["+result.join(", ")+"]":"["+newLine+result.join(","+newLine)+newLine+(compact?"":oldIndent)+"]";if((value=>"number"==typeof value||"[object Number]"==toString.call(value))(argument)||isBigInt(argument)){if(json)return JSON.stringify(Number(argument));let result;if(useDecNumbers)result=String(argument);else if(useHexNumbers){let hexadecimal=argument.toString(16);lowercaseHex||(hexadecimal=hexadecimal.toUpperCase()),result="0x"+hexadecimal}else useBinNumbers?result="0b"+argument.toString(2):useOctNumbers&&(result="0o"+argument.toString(8));return isBigInt(argument)?result+"n":result}return isBigInt(argument)?json?JSON.stringify(Number(argument)):argument+"n":(value=>"[object Object]"==toString.call(value))(argument)?(result=[],options.wrap=!0,increaseIndentation(),forOwn(argument,(key,value)=>{isEmpty=!1,result.push((compact?"":indent)+jsesc(key,options)+":"+(compact?"":" ")+jsesc(value,options))}),isEmpty?"{}":"{"+newLine+result.join(","+newLine)+newLine+(compact?"":oldIndent)+"}"):json?JSON.stringify(argument)||"null":String(argument)}const regex=options.escapeEverything?escapeEverythingRegex:escapeNonAsciiRegex;return result=argument.replace(regex,(char,pair,lone,quoteChar,index,string)=>{if(pair){if(options.minimal)return pair;const first=pair.charCodeAt(0),second=pair.charCodeAt(1);if(options.es6){return"\\u{"+hexadecimal(1024*(first-55296)+second-56320+65536,lowercaseHex)+"}"}return fourHexEscape(hexadecimal(first,lowercaseHex))+fourHexEscape(hexadecimal(second,lowercaseHex))}if(lone)return fourHexEscape(hexadecimal(lone.charCodeAt(0),lowercaseHex));if("\0"==char&&!json&&!regexDigit.test(string.charAt(index+1)))return"\\0";if(quoteChar)return quoteChar==quote||options.escapeEverything?"\\"+quoteChar:quoteChar;if(regexSingleEscape.test(char))return singleEscapes[char];if(options.minimal&&!regexWhitespace.test(char))return char;const hex=hexadecimal(char.charCodeAt(0),lowercaseHex);return json||hex.length>2?fourHexEscape(hex):"\\x"+("00"+hex).slice(-2)}),"`"==quote&&(result=result.replace(/\$\{/g,"\\${")),options.isScriptContext&&(result=result.replace(/<\/(script|style)/gi,"<\\/$1").replace(/ + +-------------------------------------------------------------------------------- + + + + + +## Table of Contents + +- [Examples](#examples) + - [Consuming a source map](#consuming-a-source-map) + - [Generating a source map](#generating-a-source-map) + - [With SourceNode (high level API)](#with-sourcenode-high-level-api) + - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) +- [API](#api) + - [SourceMapConsumer](#sourcemapconsumer) + - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) + - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) + - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) + - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) + - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) + - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) + - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) + - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) + - [SourceMapGenerator](#sourcemapgenerator) + - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) + - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) + - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) + - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) + - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) + - [SourceNode](#sourcenode) + - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) + - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) + - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) + - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) + - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) + - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) + - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) + - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) + - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) + - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) + - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) + + + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// Node.js +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +```js +var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); +``` + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +```js +// Before: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] + +consumer.computeColumnSpans(); + +// After: +consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1, +// lastColumn: 9 }, +// { line: 2, +// column: 10, +// lastColumn: 19 }, +// { line: 2, +// column: 20, +// lastColumn: Infinity } ] + +``` + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. Line numbers in + this library are 1-based (note that the underlying source map + specification uses 0-based line numbers -- this library handles the + translation). + +* `column`: The column number in the generated source. Column numbers + in this library are 0-based. + +* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or + `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest + element that is smaller than or greater than the one we are searching for, + respectively, if the exact element cannot be found. Defaults to + `SourceMapConsumer.GREATEST_LOWER_BOUND`. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. The line number is 1-based. + +* `column`: The column number in the original source, or null if this + information is not available. The column number is 0-based. + +* `name`: The original identifier, or null if this information is not available. + +```js +consumer.originalPositionFor({ line: 2, column: 10 }) +// { source: 'foo.coffee', +// line: 2, +// column: 2, +// name: null } + +consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) +// { source: null, +// line: null, +// column: null, +// name: null } +``` + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: The column number in the original source. The column + number is 0-based. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) +// { line: 1, +// column: 56 } +``` + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source, line, +and column provided. If no column is provided, returns all mappings +corresponding to a either the line we are searching for or the next closest line +that has any mappings. Otherwise, returns all mappings corresponding to the +given line and either the column we are searching for or the next closest column +that has any offsets. + +The only argument is an object with the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. The line number is + 1-based. + +* `column`: Optional. The column number in the original source. The + column number is 0-based. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. The line + number is 1-based. + +* `column`: The column number in the generated source, or null. The + column number is 0-based. + +```js +consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) +// [ { line: 2, +// column: 1 }, +// { line: 2, +// column: 10 }, +// { line: 2, +// column: 20 } ] +``` + +#### SourceMapConsumer.prototype.hasContentsOfAllSources() + +Return true if we have the embedded source content for every source listed in +the source map, false otherwise. + +In other words, if this method returns `true`, then +`consumer.sourceContentFor(s)` will succeed for every source `s` in +`consumer.sources`. + +```js +// ... +if (consumer.hasContentsOfAllSources()) { + consumerReadyCallback(consumer); +} else { + fetchSources(consumer, consumerReadyCallback); +} +// ... +``` + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +```js +consumer.sources +// [ "my-cool-lib.clj" ] + +consumer.sourceContentFor("my-cool-lib.clj") +// "..." + +consumer.sourceContentFor("this is not in the source map"); +// Error: "this is not in the source map" is not in the source map + +consumer.sourceContentFor("this is not in the source map", true); +// null +``` + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +```js +consumer.eachMapping(function (m) { console.log(m); }) +// ... +// { source: 'illmatic.js', +// generatedLine: 1, +// generatedColumn: 0, +// originalLine: 1, +// originalColumn: 0, +// name: null } +// { source: 'illmatic.js', +// generatedLine: 2, +// generatedColumn: 0, +// originalLine: 2, +// originalColumn: 0, +// name: null } +// ... +``` +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +* `ignoreInvalidMapping`: Optional. When `true`, instead of throwing error on + invalid mapping, it will be ignored. + +```js +var generator = new sourceMap.SourceMapGenerator({ + file: "my-generated-javascript-file.js", + sourceRoot: "http://example.com/app/js/" +}); +``` + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer, sourceMapGeneratorOptions) + +Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. + +* `sourceMapConsumer` The SourceMap. + +* `sourceMapGeneratorOptions` options that will be passed to the SourceMapGenerator constructor which used under the hood. + +```js +var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer, { + ignoreInvalidMapping: true, +}); +``` + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +```js +generator.addMapping({ + source: "module-one.scm", + original: { line: 128, column: 0 }, + generated: { line: 3, column: 456 } +}) +``` + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +```js +generator.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimum of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +```js +generator.toString() +// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' +``` + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. The line number is 1-based. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. The column number + is 0-based. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +```js +var node = new SourceNode(1, 2, "a.cpp", [ + new SourceNode(3, 4, "b.cpp", "extern int status;\n"), + new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), + new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), +]); +``` + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +```js +var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); +var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), + consumer); +``` + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.add(" + "); +node.add(otherNode); +node.add([leftHandOperandNode, " + ", rightHandOperandNode]); +``` + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +```js +node.prepend("/** Build Id: f783haef86324gf **/\n\n"); +``` + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +```js +node.setSourceContent("module-one.scm", + fs.readFileSync("path/to/module-one.scm")) +``` + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.walk(function (code, loc) { console.log("WALK:", code, loc); }) +// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } +// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } +// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } +// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } +``` + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +```js +var a = new SourceNode(1, 2, "a.js", "generated from a"); +a.setSourceContent("a.js", "original a"); +var b = new SourceNode(1, 2, "b.js", "generated from b"); +b.setSourceContent("b.js", "original b"); +var c = new SourceNode(1, 2, "c.js", "generated from c"); +c.setSourceContent("c.js", "original c"); + +var node = new SourceNode(null, null, null, [a, b, c]); +node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) +// WALK: a.js : original a +// WALK: b.js : original b +// WALK: c.js : original c +``` + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +```js +var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); +var operand = new SourceNode(3, 4, "a.rs", "="); +var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); + +var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); +var joinedNode = node.join(" "); +``` + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming white space from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +```js +// Trim trailing white space. +node.replaceRight(/\s*$/, ""); +``` + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toString() +// 'unodostresquatro' +``` + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +```js +var node = new SourceNode(1, 2, "a.js", [ + new SourceNode(3, 4, "b.js", "uno"), + "dos", + [ + "tres", + new SourceNode(5, 6, "c.js", "quatro") + ] +]); + +node.toStringWithSourceMap({ file: "my-output-file.js" }) +// { code: 'unodostresquatro', +// map: [object SourceMapGenerator] } +``` diff --git a/node_modules/source-map-js/lib/array-set.js b/node_modules/source-map-js/lib/array-set.js new file mode 100644 index 0000000..fbd5c81 --- /dev/null +++ b/node_modules/source-map-js/lib/array-set.js @@ -0,0 +1,121 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; diff --git a/node_modules/source-map-js/lib/base64-vlq.js b/node_modules/source-map-js/lib/base64-vlq.js new file mode 100644 index 0000000..612b404 --- /dev/null +++ b/node_modules/source-map-js/lib/base64-vlq.js @@ -0,0 +1,140 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; diff --git a/node_modules/source-map-js/lib/base64.js b/node_modules/source-map-js/lib/base64.js new file mode 100644 index 0000000..8aa86b3 --- /dev/null +++ b/node_modules/source-map-js/lib/base64.js @@ -0,0 +1,67 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; diff --git a/node_modules/source-map-js/lib/binary-search.js b/node_modules/source-map-js/lib/binary-search.js new file mode 100644 index 0000000..010ac94 --- /dev/null +++ b/node_modules/source-map-js/lib/binary-search.js @@ -0,0 +1,111 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; diff --git a/node_modules/source-map-js/lib/mapping-list.js b/node_modules/source-map-js/lib/mapping-list.js new file mode 100644 index 0000000..06d1274 --- /dev/null +++ b/node_modules/source-map-js/lib/mapping-list.js @@ -0,0 +1,79 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; diff --git a/node_modules/source-map-js/lib/quick-sort.js b/node_modules/source-map-js/lib/quick-sort.js new file mode 100644 index 0000000..23f9eda --- /dev/null +++ b/node_modules/source-map-js/lib/quick-sort.js @@ -0,0 +1,132 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +function SortTemplate(comparator) { + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + + return doQuickSort; +} + +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + +let sortCache = new WeakMap(); +exports.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; diff --git a/node_modules/source-map-js/lib/source-map-consumer.d.ts b/node_modules/source-map-js/lib/source-map-consumer.d.ts new file mode 100644 index 0000000..744bda7 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.d.ts @@ -0,0 +1 @@ +export { SourceMapConsumer } from '..'; diff --git a/node_modules/source-map-js/lib/source-map-consumer.js b/node_modules/source-map-js/lib/source-map-consumer.js new file mode 100644 index 0000000..ee66114 --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-consumer.js @@ -0,0 +1,1188 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(sourceRoot, source, sourceMapURL); + } + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + +const compareGenerated = util.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort(array, compareGenerated, start); + } +} +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort(originalMappings[i], util.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content || content === '') { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + if(source !== null) { + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + } + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map-js/lib/source-map-generator.d.ts b/node_modules/source-map-js/lib/source-map-generator.d.ts new file mode 100644 index 0000000..f59d70a --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.d.ts @@ -0,0 +1 @@ +export { SourceMapGenerator } from '..'; diff --git a/node_modules/source-map-js/lib/source-map-generator.js b/node_modules/source-map-js/lib/source-map-generator.js new file mode 100644 index 0000000..bab04ff --- /dev/null +++ b/node_modules/source-map-js/lib/source-map-generator.js @@ -0,0 +1,444 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._ignoreInvalidMapping = util.getArg(aArgs, 'ignoreInvalidMapping', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator(Object.assign(generatorOps || {}, { + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + })); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + if (this._validateMapping(generated, original, source, name) === false) { + return; + } + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + var message = 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message); + } + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + var message = 'Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + }); + + if (this._ignoreInvalidMapping) { + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } + return false; + } else { + throw new Error(message) + } + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map-js/lib/source-node.d.ts b/node_modules/source-map-js/lib/source-node.d.ts new file mode 100644 index 0000000..4df6a1a --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.d.ts @@ -0,0 +1 @@ +export { SourceNode } from '..'; diff --git a/node_modules/source-map-js/lib/source-node.js b/node_modules/source-map-js/lib/source-node.js new file mode 100644 index 0000000..8bcdbe3 --- /dev/null +++ b/node_modules/source-map-js/lib/source-node.js @@ -0,0 +1,413 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; diff --git a/node_modules/source-map-js/lib/util.js b/node_modules/source-map-js/lib/util.js new file mode 100644 index 0000000..430e2d0 --- /dev/null +++ b/node_modules/source-map-js/lib/util.js @@ -0,0 +1,594 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +var MAX_CACHED_INPUTS = 32; + +/** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ +function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; +} + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +}); +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/source-map-js/package.json b/node_modules/source-map-js/package.json new file mode 100644 index 0000000..f58dbeb --- /dev/null +++ b/node_modules/source-map-js/package.json @@ -0,0 +1,71 @@ +{ + "name": "source-map-js", + "description": "Generates and consumes source maps", + "version": "1.2.1", + "homepage": "https://github.com/7rulnik/source-map-js", + "author": "Valentin 7rulnik Semirulnik ", + "contributors": [ + "Nick Fitzgerald ", + "Tobias Koppers ", + "Duncan Beevers ", + "Stephen Crane ", + "Ryan Seddon ", + "Miles Elam ", + "Mihai Bazon ", + "Michael Ficarra ", + "Todd Wolfson ", + "Alexander Solovyov ", + "Felix Gnass ", + "Conrad Irwin ", + "usrbincc ", + "David Glasser ", + "Chase Douglas ", + "Evan Wallace ", + "Heather Arthur ", + "Hugh Kennedy ", + "David Glasser ", + "Simon Lydell ", + "Jmeas Smith ", + "Michael Z Goddard ", + "azu ", + "John Gozde ", + "Adam Kirkton ", + "Chris Montgomery ", + "J. Ryan Stinnett ", + "Jack Herrington ", + "Chris Truter ", + "Daniel Espeset ", + "Jamie Wong ", + "Eddy Bruël ", + "Hawken Rives ", + "Gilad Peleg ", + "djchie ", + "Gary Ye ", + "Nicolas Lalevée " + ], + "repository": "7rulnik/source-map-js", + "main": "./source-map.js", + "files": [ + "source-map.js", + "source-map.d.ts", + "lib/" + ], + "engines": { + "node": ">=0.10.0" + }, + "license": "BSD-3-Clause", + "scripts": { + "test": "npm run build && node test/run-tests.js", + "build": "webpack --color", + "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" + }, + "devDependencies": { + "clean-publish": "^3.1.0", + "doctoc": "^0.15.0", + "webpack": "^1.12.0" + }, + "clean-publish": { + "cleanDocs": true + }, + "typings": "source-map.d.ts" +} diff --git a/node_modules/source-map-js/source-map.d.ts b/node_modules/source-map-js/source-map.d.ts new file mode 100644 index 0000000..ec8892f --- /dev/null +++ b/node_modules/source-map-js/source-map.d.ts @@ -0,0 +1,104 @@ +export interface StartOfSourceMap { + file?: string; + sourceRoot?: string; +} + +export interface RawSourceMap extends StartOfSourceMap { + version: string; + sources: string[]; + names: string[]; + sourcesContent?: string[]; + mappings: string; +} + +export interface Position { + line: number; + column: number; +} + +export interface LineRange extends Position { + lastColumn: number; +} + +export interface FindPosition extends Position { + // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND + bias?: number; +} + +export interface SourceFindPosition extends FindPosition { + source: string; +} + +export interface MappedPosition extends Position { + source: string; + name?: string; +} + +export interface MappingItem { + source: string | null; + generatedLine: number; + generatedColumn: number; + originalLine: number | null; + originalColumn: number | null; + name: string | null; +} + +export class SourceMapConsumer { + static GENERATED_ORDER: number; + static ORIGINAL_ORDER: number; + + static GREATEST_LOWER_BOUND: number; + static LEAST_UPPER_BOUND: number; + + constructor(rawSourceMap: RawSourceMap); + readonly file: string | undefined | null; + readonly sourceRoot: string | undefined | null; + readonly sourcesContent: readonly string[] | null | undefined; + readonly sources: readonly string[] + + computeColumnSpans(): void; + originalPositionFor(generatedPosition: FindPosition): MappedPosition; + generatedPositionFor(originalPosition: SourceFindPosition): LineRange; + allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; + hasContentsOfAllSources(): boolean; + sourceContentFor(source: string, returnNullOnMissing?: boolean): string | null; + eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; +} + +export interface Mapping { + generated: Position; + original?: Position | null; + source?: string | null; + name?: string | null; +} + +export class SourceMapGenerator { + constructor(startOfSourceMap?: StartOfSourceMap); + static fromSourceMap(sourceMapConsumer: SourceMapConsumer, startOfSourceMap?: StartOfSourceMap): SourceMapGenerator; + addMapping(mapping: Mapping): void; + setSourceContent(sourceFile: string, sourceContent: string | null | undefined): void; + applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; + toString(): string; + toJSON(): RawSourceMap; +} + +export interface CodeWithSourceMap { + code: string; + map: SourceMapGenerator; +} + +export class SourceNode { + constructor(); + constructor(line: number, column: number, source: string); + constructor(line: number, column: number, source: string, chunk?: string, name?: string); + static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; + add(chunk: string): void; + prepend(chunk: string): void; + setSourceContent(sourceFile: string, sourceContent: string): void; + walk(fn: (chunk: string, mapping: MappedPosition) => void): void; + walkSourceContents(fn: (file: string, content: string) => void): void; + join(sep: string): SourceNode; + replaceRight(pattern: string, replacement: string): SourceNode; + toString(): string; + toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; +} diff --git a/node_modules/source-map-js/source-map.js b/node_modules/source-map-js/source-map.js new file mode 100644 index 0000000..bc88fe8 --- /dev/null +++ b/node_modules/source-map-js/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/tailwindcss/LICENSE b/node_modules/tailwindcss/LICENSE new file mode 100644 index 0000000..d6a8229 --- /dev/null +++ b/node_modules/tailwindcss/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Tailwind Labs, Inc. + +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. diff --git a/node_modules/tailwindcss/README.md b/node_modules/tailwindcss/README.md new file mode 100644 index 0000000..95ec9d8 --- /dev/null +++ b/node_modules/tailwindcss/README.md @@ -0,0 +1,40 @@ +

+ + + + + Tailwind CSS + + +

+ +

+ A utility-first CSS framework for rapidly building custom user interfaces. +

+ +

+ Build Status + Total Downloads + Latest Release + License +

+ +--- + +## Documentation + +For full documentation, visit [tailwindcss.com](https://tailwindcss.com). + +## Community + +For help, discussion about best practices, or any other conversation that would benefit from being searchable: + +[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions) + +For chatting with others using the framework: + +[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe) + +## Contributing + +If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**. diff --git a/node_modules/tailwindcss/dist/chunk-4WXWQT6Y.mjs b/node_modules/tailwindcss/dist/chunk-4WXWQT6Y.mjs new file mode 100644 index 0000000..bf291d6 --- /dev/null +++ b/node_modules/tailwindcss/dist/chunk-4WXWQT6Y.mjs @@ -0,0 +1,35 @@ +import{a as Tt,b as D,c as J,d as E,e as lt,f as de,g as Ue,h as Pt}from"./chunk-G32FJCSR.mjs";import{a as Et}from"./chunk-HTB5LLOP.mjs";var Rt="4.1.11";var Ve=92,Ie=47,Fe=42,Ot=34,Kt=39,ii=58,ze=59,ie=10,Me=13,Ne=32,Le=9,_t=123,at=125,ft=40,jt=41,ni=91,oi=93,Dt=45,st=64,li=33;function me(r,t){let i=t?.from?{file:t.from,code:r}:null;r[0]==="\uFEFF"&&(r=" "+r.slice(1));let e=[],n=[],s=[],a=null,c=null,u="",f="",g=0,d;for(let m=0;m0&&r[b]===v[v.length-1]&&(v=v.slice(0,-1));let N=ut(u,k);if(!N)throw new Error("Invalid custom property, expected a value");i&&(N.src=[i,x,m],N.dst=[i,x,m]),a?a.nodes.push(N):e.push(N),u=""}else if(w===ze&&u.charCodeAt(0)===st)c=Se(u),i&&(c.src=[i,g,m],c.dst=[i,g,m]),a?a.nodes.push(c):e.push(c),u="",c=null;else if(w===ze&&f[f.length-1]!==")"){let v=ut(u);if(!v)throw u.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${u.trim()}\``);i&&(v.src=[i,g,m],v.dst=[i,g,m]),a?a.nodes.push(v):e.push(v),u=""}else if(w===_t&&f[f.length-1]!==")")f+="}",c=H(u.trim()),i&&(c.src=[i,g,m],c.dst=[i,g,m]),a&&a.nodes.push(c),s.push(a),a=c,u="",c=null;else if(w===at&&f[f.length-1]!==")"){if(f==="")throw new Error("Missing opening {");if(f=f.slice(0,-1),u.length>0)if(u.charCodeAt(0)===st)c=Se(u),i&&(c.src=[i,g,m],c.dst=[i,g,m]),a?a.nodes.push(c):e.push(c),u="",c=null;else{let x=u.indexOf(":");if(a){let k=ut(u,x);if(!k)throw new Error(`Invalid declaration: \`${u.trim()}\``);i&&(k.src=[i,g,m],k.dst=[i,g,m]),a.nodes.push(k)}}let v=s.pop()??null;v===null&&a&&e.push(a),a=v,u="",c=null}else if(w===ft)f+=")",u+="(";else if(w===jt){if(f[f.length-1]!==")")throw new Error("Missing opening (");f=f.slice(0,-1),u+=")"}else{if(u.length===0&&(w===Ne||w===ie||w===Le))continue;u===""&&(g=m),u+=String.fromCharCode(w)}}}if(u.charCodeAt(0)===st){let m=Se(u);i&&(m.src=[i,g,r.length],m.dst=[i,g,r.length]),e.push(m)}if(f.length>0&&a){if(a.kind==="rule")throw new Error(`Missing closing } at ${a.selector}`);if(a.kind==="at-rule")throw new Error(`Missing closing } at ${a.name} ${a.params}`)}return n.length>0?n.concat(e):e}function Se(r,t=[]){let i=r,e="";for(let n=5;n=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&a===45){s+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=t.charAt(e);continue}s+="\\"+t.charAt(e)}return s}function ge(r){return r.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,t=>t.length>2?String.fromCodePoint(Number.parseInt(t.slice(1).trim(),16)):t[1])}var Ft=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]]]);function It(r,t){return(Ft.get(t)??[]).some(i=>r===i||r.startsWith(`${i}-`))}var Be=class{constructor(t=new Map,i=new Set([])){this.values=t;this.keyframes=i}prefix=null;get size(){return this.values.size}add(t,i,e=0,n){if(t.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${t}\``);t==="--*"?this.values.clear():this.clearNamespace(t.slice(0,-2),0)}if(e&4){let s=this.values.get(t);if(s&&!(s.options&4))return}i==="initial"?this.values.delete(t):this.values.set(t,{value:i,options:e,src:n})}keysInNamespaces(t){let i=[];for(let e of t){let n=`${e}-`;for(let s of this.values.keys())s.startsWith(n)&&s.indexOf("--",2)===-1&&(It(s,e)||i.push(s.slice(n.length)))}return i}get(t){for(let i of t){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(t){return(this.getOptions(t)&4)===4}getOptions(t){return t=ge(this.#r(t)),this.values.get(t)?.options??0}entries(){return this.prefix?Array.from(this.values,t=>(t[0]=this.prefixKey(t[0]),t)):this.values.entries()}prefixKey(t){return this.prefix?`--${this.prefix}-${t.slice(2)}`:t}#r(t){return this.prefix?`--${t.slice(3+this.prefix.length)}`:t}clearNamespace(t,i){let e=Ft.get(t)??[];e:for(let n of this.values.keys())if(n.startsWith(t)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let s of e)if(n.startsWith(s))continue e;this.values.delete(n)}}#e(t,i){for(let e of i){let n=t!==null?`${e}-${t}`:e;if(!this.values.has(n))if(t!==null&&t.includes(".")){if(n=`${e}-${t.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!It(n,e))return n}return null}#t(t){let i=this.values.get(t);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${fe(this.prefixKey(t))}${e?`, ${e}`:""})`}markUsedVariable(t){let i=ge(this.#r(t)),e=this.values.get(i);if(!e)return!1;let n=e.options&16;return e.options|=16,!n}resolve(t,i,e=0){let n=this.#e(t,i);if(!n)return null;let s=this.values.get(n);return(e|s.options)&1?s.value:this.#t(n)}resolveValue(t,i){let e=this.#e(t,i);return e?this.values.get(e).value:null}resolveWith(t,i,e=[]){let n=this.#e(t,i);if(!n)return null;let s={};for(let c of e){let u=`${n}${c}`,f=this.values.get(u);f&&(f.options&1?s[c]=f.value:s[c]=this.#t(u))}let a=this.values.get(n);return a.options&1?[a.value,s]:[this.#t(n),s]}namespace(t){let i=new Map,e=`${t}-`;for(let[n,s]of this.values)n===t?i.set(null,s.value):n.startsWith(`${e}-`)?i.set(n.slice(t.length),s.value):n.startsWith(e)&&i.set(n.slice(e.length),s.value);return i}addKeyframes(t){this.keyframes.add(t)}getKeyframes(){return Array.from(this.keyframes)}};var B=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function pt(r){return{kind:"word",value:r}}function ai(r,t){return{kind:"function",value:r,nodes:t}}function si(r){return{kind:"separator",value:r}}function ee(r,t,i=null){for(let e=0;e0){let d=pt(n);e?e.nodes.push(d):t.push(d),n=""}let u=a,f=a+1;for(;f0){let f=pt(n);u?.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(c)}}return n.length>0&&t.push(pt(n)),t}function qe(r){let t=[];return ee(q(r),i=>{if(!(i.kind!=="function"||i.value!=="var"))return ee(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||t.push(e.value)}),1}),t}var mi=64;function M(r,t=[]){return{kind:"rule",selector:r,nodes:t}}function z(r,t="",i=[]){return{kind:"at-rule",name:r,params:t,nodes:i}}function H(r,t=[]){return r.charCodeAt(0)===mi?Se(r,t):M(r,t)}function l(r,t,i=!1){return{kind:"declaration",property:r,value:t,important:i}}function We(r){return{kind:"comment",value:r}}function le(r,t){return{kind:"context",context:r,nodes:t}}function L(r){return{kind:"at-root",nodes:r}}function F(r,t,i=[],e={}){for(let n=0;nnew Set),a=new B(()=>new Set),c=new Set,u=new Set,f=[],g=[],d=new B(()=>new Set);function m(v,x,k={},N=0){if(v.kind==="declaration"){if(v.property==="--tw-sort"||v.value===void 0||v.value===null)return;if(k.theme&&v.property[0]==="-"&&v.property[1]==="-"){if(v.value==="initial"){v.value=void 0;return}k.keyframes||s.get(x).add(v)}if(v.value.includes("var("))if(k.theme&&v.property[0]==="-"&&v.property[1]==="-")for(let b of qe(v.value))d.get(b).add(v.property);else t.trackUsedVariables(v.value);if(v.property==="animation")for(let b of Zt(v.value))u.add(b);i&2&&v.value.includes("color-mix(")&&a.get(x).add(v),x.push(v)}else if(v.kind==="rule")if(v.selector==="&")for(let b of v.nodes){let S=[];m(b,S,k,N+1),S.length>0&&x.push(...S)}else{let b={...v,nodes:[]};for(let S of v.nodes)m(S,b.nodes,k,N+1);b.nodes.length>0&&x.push(b)}else if(v.kind==="at-rule"&&v.name==="@property"&&N===0){if(n.has(v.params))return;if(i&1){let S=v.params,P=null,U=!1;for(let _ of v.nodes)_.kind==="declaration"&&(_.property==="initial-value"?P=_.value:_.property==="inherits"&&(U=_.value==="true"));let R=l(S,P??"initial");R.src=v.src,U?f.push(R):g.push(R)}n.add(v.params);let b={...v,nodes:[]};for(let S of v.nodes)m(S,b.nodes,k,N+1);x.push(b)}else if(v.kind==="at-rule"){v.name==="@keyframes"&&(k={...k,keyframes:!0});let b={...v,nodes:[]};for(let S of v.nodes)m(S,b.nodes,k,N+1);v.name==="@keyframes"&&k.theme&&c.add(b),(b.nodes.length>0||b.name==="@layer"||b.name==="@charset"||b.name==="@custom-media"||b.name==="@namespace"||b.name==="@import")&&x.push(b)}else if(v.kind==="at-root")for(let b of v.nodes){let S=[];m(b,S,k,0);for(let P of S)e.push(P)}else if(v.kind==="context"){if(v.context.reference)return;for(let b of v.nodes)m(b,x,{...k,...v.context},N)}else v.kind==="comment"&&x.push(v)}let w=[];for(let v of r)m(v,w,{},0);e:for(let[v,x]of s)for(let k of x){if(Qt(k.property,t.theme,d)){if(k.property.startsWith(t.theme.prefixKey("--animate-")))for(let S of Zt(k.value))u.add(S);continue}let b=v.indexOf(k);if(v.splice(b,1),v.length===0){let S=gi(w,P=>P.kind==="rule"&&P.nodes===v);if(!S||S.length===0)continue e;S.unshift({kind:"at-root",nodes:w});do{let P=S.pop();if(!P)break;let U=S[S.length-1];if(!U||U.kind!=="at-root"&&U.kind!=="at-rule")break;let R=U.nodes.indexOf(P);if(R===-1)break;U.nodes.splice(R,1)}while(!0);continue e}}for(let v of c)if(!u.has(v.params)){let x=e.indexOf(v);e.splice(x,1)}if(w=w.concat(e),i&2)for(let[v,x]of a)for(let k of x){let N=v.indexOf(k);if(N===-1||k.value==null)continue;let b=q(k.value),S=!1;if(ee(b,(R,{replaceWith:_})=>{if(R.kind!=="function"||R.value!=="color-mix")return;let K=!1,G=!1;if(ee(R.nodes,(I,{replaceWith:W})=>{if(I.kind=="word"&&I.value.toLowerCase()==="currentcolor"){G=!0,S=!0;return}let Z=I,re=null,o=new Set;do{if(Z.kind!=="function"||Z.value!=="var")return;let p=Z.nodes[0];if(!p||p.kind!=="word")return;let h=p.value;if(o.has(h)){K=!0;return}if(o.add(h),S=!0,re=t.theme.resolveValue(null,[p.value]),!re){K=!0;return}if(re.toLowerCase()==="currentcolor"){G=!0;return}re.startsWith("var(")?Z=q(re)[0]:Z=null}while(Z);W({kind:"word",value:re})}),K||G){let I=R.nodes.findIndex(Z=>Z.kind==="separator"&&Z.value.trim().includes(","));if(I===-1)return;let W=R.nodes.length>I?R.nodes[I+1]:null;if(!W)return;_(W)}else if(S){let I=R.nodes[2];I.kind==="word"&&(I.value==="oklab"||I.value==="oklch"||I.value==="lab"||I.value==="lch")&&(I.value="srgb")}}),!S)continue;let P={...k,value:Y(b)},U=H("@supports (color: color-mix(in lab, red, red))",[k]);U.src=k.src,v.splice(N,1,P,U)}if(i&1){let v=[];if(f.length>0){let x=H(":root, :host",f);x.src=f[0].src,v.push(x)}if(g.length>0){let x=H("*, ::before, ::after, ::backdrop",g);x.src=g[0].src,v.push(x)}if(v.length>0){let x=w.findIndex(b=>!(b.kind==="comment"||b.kind==="at-rule"&&(b.name==="@charset"||b.name==="@import"))),k=z("@layer","properties",[]);k.src=v[0].src,w.splice(x<0?w.length:x,0,k);let N=H("@layer properties",[z("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",v)]);N.src=v[0].src,N.nodes[0].src=v[0].src,w.push(N)}}return w}function ne(r,t){let i=0,e={file:null,code:""};function n(a,c=0){let u="",f=" ".repeat(c);if(a.kind==="declaration"){if(u+=`${f}${a.property}: ${a.value}${a.important?" !important":""}; +`,t){i+=f.length;let g=i;i+=a.property.length,i+=2,i+=a.value?.length??0,a.important&&(i+=11);let d=i;i+=2,a.dst=[e,g,d]}}else if(a.kind==="rule"){if(u+=`${f}${a.selector} { +`,t){i+=f.length;let g=i;i+=a.selector.length,i+=1;let d=i;a.dst=[e,g,d],i+=2}for(let g of a.nodes)u+=n(g,c+1);u+=`${f}} +`,t&&(i+=f.length,i+=2)}else if(a.kind==="at-rule"){if(a.nodes.length===0){let g=`${f}${a.name} ${a.params}; +`;if(t){i+=f.length;let d=i;i+=a.name.length,i+=1,i+=a.params.length;let m=i;i+=2,a.dst=[e,d,m]}return g}if(u+=`${f}${a.name}${a.params?` ${a.params} `:" "}{ +`,t){i+=f.length;let g=i;i+=a.name.length,a.params&&(i+=1,i+=a.params.length),i+=1;let d=i;a.dst=[e,g,d],i+=2}for(let g of a.nodes)u+=n(g,c+1);u+=`${f}} +`,t&&(i+=f.length,i+=2)}else if(a.kind==="comment"){if(u+=`${f}/*${a.value}*/ +`,t){i+=f.length;let g=i;i+=2+a.value.length+2;let d=i;a.dst=[e,g,d],i+=1}}else if(a.kind==="context"||a.kind==="at-root")return"";return u}let s="";for(let a of r)s+=n(a,0);return e.code=s,s}function gi(r,t){let i=[];return F(r,(e,{path:n})=>{if(t(e))return i=[...n],2}),i}function Qt(r,t,i,e=new Set){if(e.has(r)||(e.add(r),t.getOptions(r)&24))return!0;{let s=i.get(r)??[];for(let a of s)if(Qt(a,t,i,e))return!0}return!1}function Zt(r){return r.split(/[\s,]+/)}function ce(r){if(r.indexOf("(")===-1)return be(r);let t=q(r);return mt(t),r=Y(t),r=Tt(r),r}function be(r,t=!1){let i="";for(let e=0;e0&&n===gt[t-1]&&t--;break;case 59:if(t===0)return!1;break}}return!0}var vi=58,Xt=45,er=97,tr=122;function*rr(r,t){let i=D(r,":");if(t.theme.prefix){if(i.length===1||i[0]!==t.theme.prefix)return null;i.shift()}let e=i.pop(),n=[];for(let d=i.length-1;d>=0;--d){let m=t.parseVariant(i[d]);if(m===null)return;n.push(m)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),t.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:n,important:s,raw:r});let[a,c=null,u]=D(e,"/");if(u)return;let f=c===null?null:ht(c);if(c!==null&&f===null)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let d=a.charCodeAt(1);if(d!==Xt&&!(d>=er&&d<=tr))return;a=a.slice(1,-1);let m=a.indexOf(":");if(m===-1||m===0||m===a.length-1)return;let w=a.slice(0,m),v=ce(a.slice(m+1));if(!se(v))return;yield{kind:"arbitrary",property:w,value:v,modifier:f,variants:n,important:s,raw:r};return}let g;if(a[a.length-1]==="]"){let d=a.indexOf("-[");if(d===-1)return;let m=a.slice(0,d);if(!t.utilities.has(m,"functional"))return;let w=a.slice(d+1);g=[[m,w]]}else if(a[a.length-1]===")"){let d=a.indexOf("-(");if(d===-1)return;let m=a.slice(0,d);if(!t.utilities.has(m,"functional"))return;let w=a.slice(d+2,-1),v=D(w,":"),x=null;if(v.length===2&&(x=v[0],w=v[1]),w[0]!=="-"||w[1]!=="-"||!se(w))return;g=[[m,x===null?`[var(${w})]`:`[${x}:var(${w})]`]]}else g=nr(a,d=>t.utilities.has(d,"functional"));for(let[d,m]of g){let w={kind:"functional",root:d,modifier:f,value:null,variants:n,important:s,raw:r};if(m===null){yield w;continue}{let v=m.indexOf("[");if(v!==-1){if(m[m.length-1]!=="]")return;let k=ce(m.slice(v+1,-1));if(!se(k))continue;let N="";for(let b=0;b=er&&S<=tr))break}if(k.length===0||k.trim().length===0)continue;w.value={kind:"arbitrary",dataType:N||null,value:k}}else{let k=c===null||w.modifier?.kind==="arbitrary"?null:`${m}/${c}`;w.value={kind:"named",value:m,fraction:k}}}yield w}}function ht(r){if(r[0]==="["&&r[r.length-1]==="]"){let t=ce(r.slice(1,-1));return!se(t)||t.length===0||t.trim().length===0?null:{kind:"arbitrary",value:t}}return r[0]==="("&&r[r.length-1]===")"?(r=r.slice(1,-1),r[0]!=="-"||r[1]!=="-"||!se(r)?null:(r=`var(${r})`,{kind:"arbitrary",value:ce(r)})):{kind:"named",value:r}}function ir(r,t){if(r[0]==="["&&r[r.length-1]==="]"){if(r[1]==="@"&&r.includes("&"))return null;let i=ce(r.slice(1,-1));if(!se(i)||i.length===0||i.trim().length===0)return null;let e=i[0]===">"||i[0]==="+"||i[0]==="~";return!e&&i[0]!=="@"&&!i.includes("&")&&(i=`&:is(${i})`),{kind:"arbitrary",selector:i,relative:e}}{let[i,e=null,n]=D(r,"/");if(n)return null;let s=nr(i,a=>t.variants.has(a));for(let[a,c]of s)switch(t.variants.kind(a)){case"static":return c!==null||e!==null?null:{kind:"static",root:a};case"functional":{let u=e===null?null:ht(e);if(e!==null&&u===null)return null;if(c===null)return{kind:"functional",root:a,modifier:u,value:null};if(c[c.length-1]==="]"){if(c[0]!=="[")continue;let f=ce(c.slice(1,-1));return!se(f)||f.length===0||f.trim().length===0?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:f}}}if(c[c.length-1]===")"){if(c[0]!=="(")continue;let f=ce(c.slice(1,-1));return!se(f)||f.length===0||f.trim().length===0||f[0]!=="-"||f[1]!=="-"?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:`var(${f})`}}}return{kind:"functional",root:a,modifier:u,value:{kind:"named",value:c}}}case"compound":{if(c===null)return null;let u=t.parseVariant(c);if(u===null||!t.variants.compoundsWith(a,u))return null;let f=e===null?null:ht(e);return e!==null&&f===null?null:{kind:"compound",root:a,modifier:f,variant:u}}}}return null}function*nr(r,t){t(r)&&(yield[r,null]);let i=r.lastIndexOf("-");for(;i>0;){let e=r.slice(0,i);if(t(e)){let n=[e,r.slice(i+1)];if(n[1]==="")break;yield n}i=r.lastIndexOf("-",i-1)}r[0]==="@"&&t("@")&&(yield["@",r.slice(1)])}function or(r,t){let i=[];for(let n of t.variants)i.unshift(He(n));r.theme.prefix&&i.unshift(r.theme.prefix);let e="";if(t.kind==="static"&&(e+=t.root),t.kind==="functional"&&(e+=t.root,t.value))if(t.value.kind==="arbitrary"){if(t.value!==null){let n=wt(t.value.value),s=n?t.value.value.slice(4,-1):t.value.value,[a,c]=n?["(",")"]:["[","]"];t.value.dataType?e+=`-${a}${t.value.dataType}:${ke(s)}${c}`:e+=`-${a}${ke(s)}${c}`}}else t.value.kind==="named"&&(e+=`-${t.value.value}`);return t.kind==="arbitrary"&&(e+=`[${t.property}:${ke(t.value)}]`),(t.kind==="arbitrary"||t.kind==="functional")&&(e+=lr(t.modifier)),t.important&&(e+="!"),i.push(e),i.join(":")}function lr(r){if(r===null)return"";let t=wt(r.value),i=t?r.value.slice(4,-1):r.value,[e,n]=t?["(",")"]:["[","]"];return r.kind==="arbitrary"?`/${e}${ke(i)}${n}`:r.kind==="named"?`/${r.value}`:""}function He(r){if(r.kind==="static")return r.root;if(r.kind==="arbitrary")return`[${ke(bi(r.selector))}]`;let t="";if(r.kind==="functional"){t+=r.root;let i=r.root!=="@";if(r.value)if(r.value.kind==="arbitrary"){let e=wt(r.value.value),n=e?r.value.value.slice(4,-1):r.value.value,[s,a]=e?["(",")"]:["[","]"];t+=`${i?"-":""}${s}${ke(n)}${a}`}else r.value.kind==="named"&&(t+=`${i?"-":""}${r.value.value}`)}return r.kind==="compound"&&(t+=r.root,t+="-",t+=He(r.variant)),(r.kind==="functional"||r.kind==="compound")&&(t+=lr(r.modifier)),t}var wi=new B(r=>{let t=q(r),i=new Set;return ee(t,(e,{parent:n})=>{let s=n===null?t:n.nodes??[];if(e.kind==="word"&&(e.value==="+"||e.value==="-"||e.value==="*"||e.value==="/")){let a=s.indexOf(e)??-1;if(a===-1)return;let c=s[a-1];if(c?.kind!=="separator"||c.value!==" ")return;let u=s[a+1];if(u?.kind!=="separator"||u.value!==" ")return;i.add(c),i.add(u)}else e.kind==="separator"&&e.value.trim()==="/"?e.value="/":e.kind==="separator"&&e.value.length>0&&e.value.trim()===""?(s[0]===e||s[s.length-1]===e)&&i.add(e):e.kind==="separator"&&e.value.trim()===","&&(e.value=",")}),i.size>0&&ee(t,(e,{replaceWith:n})=>{i.has(e)&&(i.delete(e),n([]))}),vt(t),Y(t)});function ke(r){return wi.get(r)}var yi=new B(r=>{let t=q(r);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?Y(t[2].nodes):r});function bi(r){return yi.get(r)}function vt(r){for(let t of r)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=Te(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=Te(t.value);for(let i=0;i{let t=q(r);return t.length===1&&t[0].kind==="function"&&t[0].value==="var"});function wt(r){return ki.get(r)}function xi(r){throw new Error(`Unexpected value: ${r}`)}function Te(r){return r.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}function we(r,t,i){if(r===t)return 0;let e=r.indexOf("("),n=t.indexOf("("),s=e===-1?r.replace(/[\d.]+/g,""):r.slice(0,e),a=n===-1?t.replace(/[\d.]+/g,""):t.slice(0,n),c=(s===a?0:s{e=e.trim();let n=D(e," ").filter(f=>f.trim()!==""),s=null,a=null,c=null;for(let f of n)Ai.has(f)||(ar.test(f)?(a===null?a=f:c===null&&(c=f),ar.lastIndex=0):s===null&&(s=f));if(a===null||c===null)return e;let u=t(s??"currentcolor");return s!==null?e.replace(s,u):`${e} ${u}`}).join(", ")}var Ci=/^-?[a-z][a-zA-Z0-9/%._-]*$/,$i=/^-?[a-z][a-zA-Z0-9/%._-]*-\*$/,Ze=["0","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],yt=class{utilities=new B(()=>[]);completions=new Map;static(t,i){this.utilities.get(t).push({kind:"static",compileFn:i})}functional(t,i,e){this.utilities.get(t).push({kind:"functional",compileFn:i,options:e})}has(t,i){return this.utilities.has(t)&&this.utilities.get(t).some(e=>e.kind===i)}get(t){return this.utilities.has(t)?this.utilities.get(t):[]}getCompletions(t){return this.completions.get(t)?.()??[]}suggest(t,i){this.completions.set(t,i)}keys(t){let i=[];for(let[e,n]of this.utilities.entries())for(let s of n)if(s.kind===t){i.push(e);break}return i}};function $(r,t,i){return z("@property",r,[l("syntax",i?`"${i}"`:'"*"'),l("inherits","false"),...t?[l("initial-value",t)]:[]])}function Q(r,t){if(t===null)return r;let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),t==="100%"?r:`color-mix(in oklab, ${r} ${t}, transparent)`}function ur(r,t){let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),`oklab(from ${r} l a b / ${t})`}function X(r,t,i){if(!t)return r;if(t.kind==="arbitrary")return Q(r,t.value);let e=i.resolve(t.value,["--opacity"]);return e?Q(r,e):Ue(t.value)?Q(r,`${t.value}%`):null}function te(r,t,i){let e=null;switch(r.value.value){case"inherit":{e="inherit";break}case"transparent":{e="transparent";break}case"current":{e="currentcolor";break}default:{e=t.resolve(r.value.value,i);break}}return e?X(e,r.modifier,t):null}var fr=/(\d+)_(\d+)/g;function cr(r){let t=new yt;function i(o,p){function*h(y){for(let C of r.keysInNamespaces(y))yield C.replace(fr,(O,V,T)=>`${V}.${T}`)}let A=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"];t.suggest(o,()=>{let y=[];for(let C of p()){if(typeof C=="string"){y.push({values:[C],modifiers:[]});continue}let O=[...C.values??[],...h(C.valueThemeKeys??[])],V=[...C.modifiers??[],...h(C.modifierThemeKeys??[])];C.supportsFractions&&O.push(...A),C.hasDefaultValue&&O.unshift(null),y.push({supportsNegative:C.supportsNegative,values:O,modifiers:V})}return y})}function e(o,p){t.static(o,()=>p.map(h=>typeof h=="function"?h():l(h[0],h[1])))}function n(o,p){function h({negative:A}){return y=>{let C=null,O=null;if(y.value)if(y.value.kind==="arbitrary"){if(y.modifier)return;C=y.value.value,O=y.value.dataType}else{if(C=r.resolve(y.value.fraction??y.value.value,p.themeKeys??[]),C===null&&p.supportsFractions&&y.value.fraction){let[V,T]=D(y.value.fraction,"/");if(!E(V)||!E(T))return;C=`calc(${y.value.fraction} * 100%)`}if(C===null&&A&&p.handleNegativeBareValue){if(C=p.handleNegativeBareValue(y.value),!C?.includes("/")&&y.modifier)return;if(C!==null)return p.handle(C,null)}if(C===null&&p.handleBareValue&&(C=p.handleBareValue(y.value),!C?.includes("/")&&y.modifier))return}else{if(y.modifier)return;C=p.defaultValue!==void 0?p.defaultValue:r.resolve(null,p.themeKeys??[])}if(C!==null)return p.handle(A?`calc(${C} * -1)`:C,O)}}p.supportsNegative&&t.functional(`-${o}`,h({negative:!0})),t.functional(o,h({negative:!1})),i(o,()=>[{supportsNegative:p.supportsNegative,valueThemeKeys:p.themeKeys??[],hasDefaultValue:p.defaultValue!==void 0&&p.defaultValue!==null,supportsFractions:p.supportsFractions}])}function s(o,p){t.functional(o,h=>{if(!h.value)return;let A=null;if(h.value.kind==="arbitrary"?(A=h.value.value,A=X(A,h.modifier,r)):A=te(h,r,p.themeKeys),A!==null)return p.handle(A)}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:p.themeKeys,modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}function a(o,p,h,{supportsNegative:A=!1,supportsFractions:y=!1}={}){A&&t.static(`-${o}-px`,()=>h("-1px")),t.static(`${o}-px`,()=>h("1px")),n(o,{themeKeys:p,supportsFractions:y,supportsNegative:A,defaultValue:null,handleBareValue:({value:C})=>{let O=r.resolve(null,["--spacing"]);return!O||!de(C)?null:`calc(${O} * ${C})`},handleNegativeBareValue:({value:C})=>{let O=r.resolve(null,["--spacing"]);return!O||!de(C)?null:`calc(${O} * -${C})`},handle:h}),i(o,()=>[{values:r.get(["--spacing"])?Ze:[],supportsNegative:A,supportsFractions:y,valueThemeKeys:p}])}e("sr-only",[["position","absolute"],["width","1px"],["height","1px"],["padding","0"],["margin","-1px"],["overflow","hidden"],["clip","rect(0, 0, 0, 0)"],["white-space","nowrap"],["border-width","0"]]),e("not-sr-only",[["position","static"],["width","auto"],["height","auto"],["padding","0"],["margin","0"],["overflow","visible"],["clip","auto"],["white-space","normal"]]),e("pointer-events-none",[["pointer-events","none"]]),e("pointer-events-auto",[["pointer-events","auto"]]),e("visible",[["visibility","visible"]]),e("invisible",[["visibility","hidden"]]),e("collapse",[["visibility","collapse"]]),e("static",[["position","static"]]),e("fixed",[["position","fixed"]]),e("absolute",[["position","absolute"]]),e("relative",[["position","relative"]]),e("sticky",[["position","sticky"]]);for(let[o,p]of[["inset","inset"],["inset-x","inset-inline"],["inset-y","inset-block"],["start","inset-inline-start"],["end","inset-inline-end"],["top","top"],["right","right"],["bottom","bottom"],["left","left"]])e(`${o}-auto`,[[p,"auto"]]),e(`${o}-full`,[[p,"100%"]]),e(`-${o}-full`,[[p,"-100%"]]),a(o,["--inset","--spacing"],h=>[l(p,h)],{supportsNegative:!0,supportsFractions:!0});e("isolate",[["isolation","isolate"]]),e("isolation-auto",[["isolation","auto"]]),e("z-auto",[["z-index","auto"]]),n("z",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--z-index"],handle:o=>[l("z-index",o)]}),i("z",()=>[{supportsNegative:!0,values:["0","10","20","30","40","50"],valueThemeKeys:["--z-index"]}]),e("order-first",[["order","-9999"]]),e("order-last",[["order","9999"]]),n("order",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--order"],handle:o=>[l("order",o)]}),i("order",()=>[{supportsNegative:!0,values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--order"]}]),e("col-auto",[["grid-column","auto"]]),n("col",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column"],handle:o=>[l("grid-column",o)]}),e("col-span-full",[["grid-column","1 / -1"]]),n("col-span",{handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("grid-column",`span ${o} / span ${o}`)]}),e("col-start-auto",[["grid-column-start","auto"]]),n("col-start",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column-start"],handle:o=>[l("grid-column-start",o)]}),e("col-end-auto",[["grid-column-end","auto"]]),n("col-end",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-column-end"],handle:o=>[l("grid-column-end",o)]}),i("col-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("col-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-start"]}]),i("col-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-end"]}]),e("row-auto",[["grid-row","auto"]]),n("row",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row"],handle:o=>[l("grid-row",o)]}),e("row-span-full",[["grid-row","1 / -1"]]),n("row-span",{themeKeys:[],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("grid-row",`span ${o} / span ${o}`)]}),e("row-start-auto",[["grid-row-start","auto"]]),n("row-start",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row-start"],handle:o=>[l("grid-row-start",o)]}),e("row-end-auto",[["grid-row-end","auto"]]),n("row-end",{supportsNegative:!0,handleBareValue:({value:o})=>E(o)?o:null,themeKeys:["--grid-row-end"],handle:o=>[l("grid-row-end",o)]}),i("row-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("row-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-start"]}]),i("row-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-end"]}]),e("float-start",[["float","inline-start"]]),e("float-end",[["float","inline-end"]]),e("float-right",[["float","right"]]),e("float-left",[["float","left"]]),e("float-none",[["float","none"]]),e("clear-start",[["clear","inline-start"]]),e("clear-end",[["clear","inline-end"]]),e("clear-right",[["clear","right"]]),e("clear-left",[["clear","left"]]),e("clear-both",[["clear","both"]]),e("clear-none",[["clear","none"]]);for(let[o,p]of[["m","margin"],["mx","margin-inline"],["my","margin-block"],["ms","margin-inline-start"],["me","margin-inline-end"],["mt","margin-top"],["mr","margin-right"],["mb","margin-bottom"],["ml","margin-left"]])e(`${o}-auto`,[[p,"auto"]]),a(o,["--margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});e("box-border",[["box-sizing","border-box"]]),e("box-content",[["box-sizing","content-box"]]),e("line-clamp-none",[["overflow","visible"],["display","block"],["-webkit-box-orient","horizontal"],["-webkit-line-clamp","unset"]]),n("line-clamp",{themeKeys:["--line-clamp"],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("overflow","hidden"),l("display","-webkit-box"),l("-webkit-box-orient","vertical"),l("-webkit-line-clamp",o)]}),i("line-clamp",()=>[{values:["1","2","3","4","5","6"],valueThemeKeys:["--line-clamp"]}]),e("block",[["display","block"]]),e("inline-block",[["display","inline-block"]]),e("inline",[["display","inline"]]),e("hidden",[["display","none"]]),e("inline-flex",[["display","inline-flex"]]),e("table",[["display","table"]]),e("inline-table",[["display","inline-table"]]),e("table-caption",[["display","table-caption"]]),e("table-cell",[["display","table-cell"]]),e("table-column",[["display","table-column"]]),e("table-column-group",[["display","table-column-group"]]),e("table-footer-group",[["display","table-footer-group"]]),e("table-header-group",[["display","table-header-group"]]),e("table-row-group",[["display","table-row-group"]]),e("table-row",[["display","table-row"]]),e("flow-root",[["display","flow-root"]]),e("flex",[["display","flex"]]),e("grid",[["display","grid"]]),e("inline-grid",[["display","inline-grid"]]),e("contents",[["display","contents"]]),e("list-item",[["display","list-item"]]),e("field-sizing-content",[["field-sizing","content"]]),e("field-sizing-fixed",[["field-sizing","fixed"]]),e("aspect-auto",[["aspect-ratio","auto"]]),e("aspect-square",[["aspect-ratio","1 / 1"]]),n("aspect",{themeKeys:["--aspect"],handleBareValue:({fraction:o})=>{if(o===null)return null;let[p,h]=D(o,"/");return!E(p)||!E(h)?null:o},handle:o=>[l("aspect-ratio",o)]});for(let[o,p]of[["full","100%"],["svw","100svw"],["lvw","100lvw"],["dvw","100dvw"],["svh","100svh"],["lvh","100lvh"],["dvh","100dvh"],["min","min-content"],["max","max-content"],["fit","fit-content"]])e(`size-${o}`,[["--tw-sort","size"],["width",p],["height",p]]),e(`w-${o}`,[["width",p]]),e(`h-${o}`,[["height",p]]),e(`min-w-${o}`,[["min-width",p]]),e(`min-h-${o}`,[["min-height",p]]),e(`max-w-${o}`,[["max-width",p]]),e(`max-h-${o}`,[["max-height",p]]);e("size-auto",[["--tw-sort","size"],["width","auto"],["height","auto"]]),e("w-auto",[["width","auto"]]),e("h-auto",[["height","auto"]]),e("min-w-auto",[["min-width","auto"]]),e("min-h-auto",[["min-height","auto"]]),e("h-lh",[["height","1lh"]]),e("min-h-lh",[["min-height","1lh"]]),e("max-h-lh",[["max-height","1lh"]]),e("w-screen",[["width","100vw"]]),e("min-w-screen",[["min-width","100vw"]]),e("max-w-screen",[["max-width","100vw"]]),e("h-screen",[["height","100vh"]]),e("min-h-screen",[["min-height","100vh"]]),e("max-h-screen",[["max-height","100vh"]]),e("max-w-none",[["max-width","none"]]),e("max-h-none",[["max-height","none"]]),a("size",["--size","--spacing"],o=>[l("--tw-sort","size"),l("width",o),l("height",o)],{supportsFractions:!0});for(let[o,p,h]of[["w",["--width","--spacing","--container"],"width"],["min-w",["--min-width","--spacing","--container"],"min-width"],["max-w",["--max-width","--spacing","--container"],"max-width"],["h",["--height","--spacing"],"height"],["min-h",["--min-height","--height","--spacing"],"min-height"],["max-h",["--max-height","--height","--spacing"],"max-height"]])a(o,p,A=>[l(h,A)],{supportsFractions:!0});t.static("container",()=>{let o=[...r.namespace("--breakpoint").values()];o.sort((h,A)=>we(h,A,"asc"));let p=[l("--tw-sort","--tw-container-component"),l("width","100%")];for(let h of o)p.push(z("@media",`(width >= ${h})`,[l("max-width",h)]));return p}),e("flex-auto",[["flex","auto"]]),e("flex-initial",[["flex","0 auto"]]),e("flex-none",[["flex","none"]]),t.functional("flex",o=>{if(o.value){if(o.value.kind==="arbitrary")return o.modifier?void 0:[l("flex",o.value.value)];if(o.value.fraction){let[p,h]=D(o.value.fraction,"/");return!E(p)||!E(h)?void 0:[l("flex",`calc(${o.value.fraction} * 100%)`)]}if(E(o.value.value))return o.modifier?void 0:[l("flex",o.value.value)]}}),i("flex",()=>[{supportsFractions:!0}]),n("shrink",{defaultValue:"1",handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("flex-shrink",o)]}),n("grow",{defaultValue:"1",handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("flex-grow",o)]}),i("shrink",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),i("grow",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),e("basis-auto",[["flex-basis","auto"]]),e("basis-full",[["flex-basis","100%"]]),a("basis",["--flex-basis","--spacing","--container"],o=>[l("flex-basis",o)],{supportsFractions:!0}),e("table-auto",[["table-layout","auto"]]),e("table-fixed",[["table-layout","fixed"]]),e("caption-top",[["caption-side","top"]]),e("caption-bottom",[["caption-side","bottom"]]),e("border-collapse",[["border-collapse","collapse"]]),e("border-separate",[["border-collapse","separate"]]);let c=()=>L([$("--tw-border-spacing-x","0",""),$("--tw-border-spacing-y","0","")]);a("border-spacing",["--border-spacing","--spacing"],o=>[c(),l("--tw-border-spacing-x",o),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-x",["--border-spacing","--spacing"],o=>[c(),l("--tw-border-spacing-x",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-y",["--border-spacing","--spacing"],o=>[c(),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),e("origin-center",[["transform-origin","center"]]),e("origin-top",[["transform-origin","top"]]),e("origin-top-right",[["transform-origin","top right"]]),e("origin-right",[["transform-origin","right"]]),e("origin-bottom-right",[["transform-origin","bottom right"]]),e("origin-bottom",[["transform-origin","bottom"]]),e("origin-bottom-left",[["transform-origin","bottom left"]]),e("origin-left",[["transform-origin","left"]]),e("origin-top-left",[["transform-origin","top left"]]),n("origin",{themeKeys:["--transform-origin"],handle:o=>[l("transform-origin",o)]}),e("perspective-origin-center",[["perspective-origin","center"]]),e("perspective-origin-top",[["perspective-origin","top"]]),e("perspective-origin-top-right",[["perspective-origin","top right"]]),e("perspective-origin-right",[["perspective-origin","right"]]),e("perspective-origin-bottom-right",[["perspective-origin","bottom right"]]),e("perspective-origin-bottom",[["perspective-origin","bottom"]]),e("perspective-origin-bottom-left",[["perspective-origin","bottom left"]]),e("perspective-origin-left",[["perspective-origin","left"]]),e("perspective-origin-top-left",[["perspective-origin","top left"]]),n("perspective-origin",{themeKeys:["--perspective-origin"],handle:o=>[l("perspective-origin",o)]}),e("perspective-none",[["perspective","none"]]),n("perspective",{themeKeys:["--perspective"],handle:o=>[l("perspective",o)]});let u=()=>L([$("--tw-translate-x","0"),$("--tw-translate-y","0"),$("--tw-translate-z","0")]);e("translate-none",[["translate","none"]]),e("-translate-full",[u,["--tw-translate-x","-100%"],["--tw-translate-y","-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e("translate-full",[u,["--tw-translate-x","100%"],["--tw-translate-y","100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a("translate",["--translate","--spacing"],o=>[u(),l("--tw-translate-x",o),l("--tw-translate-y",o),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});for(let o of["x","y"])e(`-translate-${o}-full`,[u,[`--tw-translate-${o}`,"-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e(`translate-${o}-full`,[u,[`--tw-translate-${o}`,"100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a(`translate-${o}`,["--translate","--spacing"],p=>[u(),l(`--tw-translate-${o}`,p),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});a("translate-z",["--translate","--spacing"],o=>[u(),l("--tw-translate-z",o),l("translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")],{supportsNegative:!0}),e("translate-3d",[u,["translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);let f=()=>L([$("--tw-scale-x","1"),$("--tw-scale-y","1"),$("--tw-scale-z","1")]);e("scale-none",[["scale","none"]]);function g({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;return p.value.kind==="arbitrary"?(h=p.value.value,h=o?`calc(${h} * -1)`:h,[l("scale",h)]):(h=r.resolve(p.value.value,["--scale"]),!h&&E(p.value.value)&&(h=`${p.value.value}%`),h?(h=o?`calc(${h} * -1)`:h,[f(),l("--tw-scale-x",h),l("--tw-scale-y",h),l("--tw-scale-z",h),l("scale","var(--tw-scale-x) var(--tw-scale-y)")]):void 0)}}t.functional("-scale",g({negative:!0})),t.functional("scale",g({negative:!1})),i("scale",()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);for(let o of["x","y","z"])n(`scale-${o}`,{supportsNegative:!0,themeKeys:["--scale"],handleBareValue:({value:p})=>E(p)?`${p}%`:null,handle:p=>[f(),l(`--tw-scale-${o}`,p),l("scale",`var(--tw-scale-x) var(--tw-scale-y)${o==="z"?" var(--tw-scale-z)":""}`)]}),i(`scale-${o}`,()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);e("scale-3d",[f,["scale","var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]),e("rotate-none",[["rotate","none"]]);function d({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;if(p.value.kind==="arbitrary"){h=p.value.value;let A=p.value.dataType??J(h,["angle","vector"]);if(A==="vector")return[l("rotate",`${h} var(--tw-rotate)`)];if(A!=="angle")return[l("rotate",o?`calc(${h} * -1)`:h)]}else if(h=r.resolve(p.value.value,["--rotate"]),!h&&E(p.value.value)&&(h=`${p.value.value}deg`),!h)return;return[l("rotate",o?`calc(${h} * -1)`:h)]}}t.functional("-rotate",d({negative:!0})),t.functional("rotate",d({negative:!1})),i("rotate",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);{let o=["var(--tw-rotate-x,)","var(--tw-rotate-y,)","var(--tw-rotate-z,)","var(--tw-skew-x,)","var(--tw-skew-y,)"].join(" "),p=()=>L([$("--tw-rotate-x"),$("--tw-rotate-y"),$("--tw-rotate-z"),$("--tw-skew-x"),$("--tw-skew-y")]);for(let h of["x","y","z"])n(`rotate-${h}`,{supportsNegative:!0,themeKeys:["--rotate"],handleBareValue:({value:A})=>E(A)?`${A}deg`:null,handle:A=>[p(),l(`--tw-rotate-${h}`,`rotate${h.toUpperCase()}(${A})`),l("transform",o)]}),i(`rotate-${h}`,()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);n("skew",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>E(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),n("skew-x",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>E(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("transform",o)]}),n("skew-y",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>E(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),i("skew",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-x",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-y",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),t.functional("transform",h=>{if(h.modifier)return;let A=null;if(h.value?h.value.kind==="arbitrary"&&(A=h.value.value):A=o,A!==null)return[p(),l("transform",A)]}),i("transform",()=>[{hasDefaultValue:!0}]),e("transform-cpu",[["transform",o]]),e("transform-gpu",[["transform",`translateZ(0) ${o}`]]),e("transform-none",[["transform","none"]])}e("transform-flat",[["transform-style","flat"]]),e("transform-3d",[["transform-style","preserve-3d"]]),e("transform-content",[["transform-box","content-box"]]),e("transform-border",[["transform-box","border-box"]]),e("transform-fill",[["transform-box","fill-box"]]),e("transform-stroke",[["transform-box","stroke-box"]]),e("transform-view",[["transform-box","view-box"]]),e("backface-visible",[["backface-visibility","visible"]]),e("backface-hidden",[["backface-visibility","hidden"]]);for(let o of["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"])e(`cursor-${o}`,[["cursor",o]]);n("cursor",{themeKeys:["--cursor"],handle:o=>[l("cursor",o)]});for(let o of["auto","none","manipulation"])e(`touch-${o}`,[["touch-action",o]]);let m=()=>L([$("--tw-pan-x"),$("--tw-pan-y"),$("--tw-pinch-zoom")]);for(let o of["x","left","right"])e(`touch-pan-${o}`,[m,["--tw-pan-x",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["y","up","down"])e(`touch-pan-${o}`,[m,["--tw-pan-y",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);e("touch-pinch-zoom",[m,["--tw-pinch-zoom","pinch-zoom"],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["none","text","all","auto"])e(`select-${o}`,[["-webkit-user-select",o],["user-select",o]]);e("resize-none",[["resize","none"]]),e("resize-x",[["resize","horizontal"]]),e("resize-y",[["resize","vertical"]]),e("resize",[["resize","both"]]),e("snap-none",[["scroll-snap-type","none"]]);let w=()=>L([$("--tw-scroll-snap-strictness","proximity","*")]);for(let o of["x","y","both"])e(`snap-${o}`,[w,["scroll-snap-type",`${o} var(--tw-scroll-snap-strictness)`]]);e("snap-mandatory",[w,["--tw-scroll-snap-strictness","mandatory"]]),e("snap-proximity",[w,["--tw-scroll-snap-strictness","proximity"]]),e("snap-align-none",[["scroll-snap-align","none"]]),e("snap-start",[["scroll-snap-align","start"]]),e("snap-end",[["scroll-snap-align","end"]]),e("snap-center",[["scroll-snap-align","center"]]),e("snap-normal",[["scroll-snap-stop","normal"]]),e("snap-always",[["scroll-snap-stop","always"]]);for(let[o,p]of[["scroll-m","scroll-margin"],["scroll-mx","scroll-margin-inline"],["scroll-my","scroll-margin-block"],["scroll-ms","scroll-margin-inline-start"],["scroll-me","scroll-margin-inline-end"],["scroll-mt","scroll-margin-top"],["scroll-mr","scroll-margin-right"],["scroll-mb","scroll-margin-bottom"],["scroll-ml","scroll-margin-left"]])a(o,["--scroll-margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});for(let[o,p]of[["scroll-p","scroll-padding"],["scroll-px","scroll-padding-inline"],["scroll-py","scroll-padding-block"],["scroll-ps","scroll-padding-inline-start"],["scroll-pe","scroll-padding-inline-end"],["scroll-pt","scroll-padding-top"],["scroll-pr","scroll-padding-right"],["scroll-pb","scroll-padding-bottom"],["scroll-pl","scroll-padding-left"]])a(o,["--scroll-padding","--spacing"],h=>[l(p,h)]);e("list-inside",[["list-style-position","inside"]]),e("list-outside",[["list-style-position","outside"]]),e("list-none",[["list-style-type","none"]]),e("list-disc",[["list-style-type","disc"]]),e("list-decimal",[["list-style-type","decimal"]]),n("list",{themeKeys:["--list-style-type"],handle:o=>[l("list-style-type",o)]}),e("list-image-none",[["list-style-image","none"]]),n("list-image",{themeKeys:["--list-style-image"],handle:o=>[l("list-style-image",o)]}),e("appearance-none",[["appearance","none"]]),e("appearance-auto",[["appearance","auto"]]),e("scheme-normal",[["color-scheme","normal"]]),e("scheme-dark",[["color-scheme","dark"]]),e("scheme-light",[["color-scheme","light"]]),e("scheme-light-dark",[["color-scheme","light dark"]]),e("scheme-only-dark",[["color-scheme","only dark"]]),e("scheme-only-light",[["color-scheme","only light"]]),e("columns-auto",[["columns","auto"]]),n("columns",{themeKeys:["--columns","--container"],handleBareValue:({value:o})=>E(o)?o:null,handle:o=>[l("columns",o)]}),i("columns",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--columns","--container"]}]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-before-${o}`,[["break-before",o]]);for(let o of["auto","avoid","avoid-page","avoid-column"])e(`break-inside-${o}`,[["break-inside",o]]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-after-${o}`,[["break-after",o]]);e("grid-flow-row",[["grid-auto-flow","row"]]),e("grid-flow-col",[["grid-auto-flow","column"]]),e("grid-flow-dense",[["grid-auto-flow","dense"]]),e("grid-flow-row-dense",[["grid-auto-flow","row dense"]]),e("grid-flow-col-dense",[["grid-auto-flow","column dense"]]),e("auto-cols-auto",[["grid-auto-columns","auto"]]),e("auto-cols-min",[["grid-auto-columns","min-content"]]),e("auto-cols-max",[["grid-auto-columns","max-content"]]),e("auto-cols-fr",[["grid-auto-columns","minmax(0, 1fr)"]]),n("auto-cols",{themeKeys:["--grid-auto-columns"],handle:o=>[l("grid-auto-columns",o)]}),e("auto-rows-auto",[["grid-auto-rows","auto"]]),e("auto-rows-min",[["grid-auto-rows","min-content"]]),e("auto-rows-max",[["grid-auto-rows","max-content"]]),e("auto-rows-fr",[["grid-auto-rows","minmax(0, 1fr)"]]),n("auto-rows",{themeKeys:["--grid-auto-rows"],handle:o=>[l("grid-auto-rows",o)]}),e("grid-cols-none",[["grid-template-columns","none"]]),e("grid-cols-subgrid",[["grid-template-columns","subgrid"]]),n("grid-cols",{themeKeys:["--grid-template-columns"],handleBareValue:({value:o})=>lt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-columns",o)]}),e("grid-rows-none",[["grid-template-rows","none"]]),e("grid-rows-subgrid",[["grid-template-rows","subgrid"]]),n("grid-rows",{themeKeys:["--grid-template-rows"],handleBareValue:({value:o})=>lt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-rows",o)]}),i("grid-cols",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-columns"]}]),i("grid-rows",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-rows"]}]),e("flex-row",[["flex-direction","row"]]),e("flex-row-reverse",[["flex-direction","row-reverse"]]),e("flex-col",[["flex-direction","column"]]),e("flex-col-reverse",[["flex-direction","column-reverse"]]),e("flex-wrap",[["flex-wrap","wrap"]]),e("flex-nowrap",[["flex-wrap","nowrap"]]),e("flex-wrap-reverse",[["flex-wrap","wrap-reverse"]]),e("place-content-center",[["place-content","center"]]),e("place-content-start",[["place-content","start"]]),e("place-content-end",[["place-content","end"]]),e("place-content-center-safe",[["place-content","safe center"]]),e("place-content-end-safe",[["place-content","safe end"]]),e("place-content-between",[["place-content","space-between"]]),e("place-content-around",[["place-content","space-around"]]),e("place-content-evenly",[["place-content","space-evenly"]]),e("place-content-baseline",[["place-content","baseline"]]),e("place-content-stretch",[["place-content","stretch"]]),e("place-items-center",[["place-items","center"]]),e("place-items-start",[["place-items","start"]]),e("place-items-end",[["place-items","end"]]),e("place-items-center-safe",[["place-items","safe center"]]),e("place-items-end-safe",[["place-items","safe end"]]),e("place-items-baseline",[["place-items","baseline"]]),e("place-items-stretch",[["place-items","stretch"]]),e("content-normal",[["align-content","normal"]]),e("content-center",[["align-content","center"]]),e("content-start",[["align-content","flex-start"]]),e("content-end",[["align-content","flex-end"]]),e("content-center-safe",[["align-content","safe center"]]),e("content-end-safe",[["align-content","safe flex-end"]]),e("content-between",[["align-content","space-between"]]),e("content-around",[["align-content","space-around"]]),e("content-evenly",[["align-content","space-evenly"]]),e("content-baseline",[["align-content","baseline"]]),e("content-stretch",[["align-content","stretch"]]),e("items-center",[["align-items","center"]]),e("items-start",[["align-items","flex-start"]]),e("items-end",[["align-items","flex-end"]]),e("items-center-safe",[["align-items","safe center"]]),e("items-end-safe",[["align-items","safe flex-end"]]),e("items-baseline",[["align-items","baseline"]]),e("items-baseline-last",[["align-items","last baseline"]]),e("items-stretch",[["align-items","stretch"]]),e("justify-normal",[["justify-content","normal"]]),e("justify-center",[["justify-content","center"]]),e("justify-start",[["justify-content","flex-start"]]),e("justify-end",[["justify-content","flex-end"]]),e("justify-center-safe",[["justify-content","safe center"]]),e("justify-end-safe",[["justify-content","safe flex-end"]]),e("justify-between",[["justify-content","space-between"]]),e("justify-around",[["justify-content","space-around"]]),e("justify-evenly",[["justify-content","space-evenly"]]),e("justify-baseline",[["justify-content","baseline"]]),e("justify-stretch",[["justify-content","stretch"]]),e("justify-items-normal",[["justify-items","normal"]]),e("justify-items-center",[["justify-items","center"]]),e("justify-items-start",[["justify-items","start"]]),e("justify-items-end",[["justify-items","end"]]),e("justify-items-center-safe",[["justify-items","safe center"]]),e("justify-items-end-safe",[["justify-items","safe end"]]),e("justify-items-stretch",[["justify-items","stretch"]]),a("gap",["--gap","--spacing"],o=>[l("gap",o)]),a("gap-x",["--gap","--spacing"],o=>[l("column-gap",o)]),a("gap-y",["--gap","--spacing"],o=>[l("row-gap",o)]),a("space-x",["--space","--spacing"],o=>[L([$("--tw-space-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","0"),l("margin-inline-start",`calc(${o} * var(--tw-space-x-reverse))`),l("margin-inline-end",`calc(${o} * calc(1 - var(--tw-space-x-reverse)))`)])],{supportsNegative:!0}),a("space-y",["--space","--spacing"],o=>[L([$("--tw-space-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","0"),l("margin-block-start",`calc(${o} * var(--tw-space-y-reverse))`),l("margin-block-end",`calc(${o} * calc(1 - var(--tw-space-y-reverse)))`)])],{supportsNegative:!0}),e("space-x-reverse",[()=>L([$("--tw-space-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","1")])]),e("space-y-reverse",[()=>L([$("--tw-space-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","1")])]),e("accent-auto",[["accent-color","auto"]]),s("accent",{themeKeys:["--accent-color","--color"],handle:o=>[l("accent-color",o)]}),s("caret",{themeKeys:["--caret-color","--color"],handle:o=>[l("caret-color",o)]}),s("divide",{themeKeys:["--divide-color","--color"],handle:o=>[M(":where(& > :not(:last-child))",[l("--tw-sort","divide-color"),l("border-color",o)])]}),e("place-self-auto",[["place-self","auto"]]),e("place-self-start",[["place-self","start"]]),e("place-self-end",[["place-self","end"]]),e("place-self-center",[["place-self","center"]]),e("place-self-end-safe",[["place-self","safe end"]]),e("place-self-center-safe",[["place-self","safe center"]]),e("place-self-stretch",[["place-self","stretch"]]),e("self-auto",[["align-self","auto"]]),e("self-start",[["align-self","flex-start"]]),e("self-end",[["align-self","flex-end"]]),e("self-center",[["align-self","center"]]),e("self-end-safe",[["align-self","safe flex-end"]]),e("self-center-safe",[["align-self","safe center"]]),e("self-stretch",[["align-self","stretch"]]),e("self-baseline",[["align-self","baseline"]]),e("self-baseline-last",[["align-self","last baseline"]]),e("justify-self-auto",[["justify-self","auto"]]),e("justify-self-start",[["justify-self","flex-start"]]),e("justify-self-end",[["justify-self","flex-end"]]),e("justify-self-center",[["justify-self","center"]]),e("justify-self-end-safe",[["justify-self","safe flex-end"]]),e("justify-self-center-safe",[["justify-self","safe center"]]),e("justify-self-stretch",[["justify-self","stretch"]]);for(let o of["auto","hidden","clip","visible","scroll"])e(`overflow-${o}`,[["overflow",o]]),e(`overflow-x-${o}`,[["overflow-x",o]]),e(`overflow-y-${o}`,[["overflow-y",o]]);for(let o of["auto","contain","none"])e(`overscroll-${o}`,[["overscroll-behavior",o]]),e(`overscroll-x-${o}`,[["overscroll-behavior-x",o]]),e(`overscroll-y-${o}`,[["overscroll-behavior-y",o]]);e("scroll-auto",[["scroll-behavior","auto"]]),e("scroll-smooth",[["scroll-behavior","smooth"]]),e("truncate",[["overflow","hidden"],["text-overflow","ellipsis"],["white-space","nowrap"]]),e("text-ellipsis",[["text-overflow","ellipsis"]]),e("text-clip",[["text-overflow","clip"]]),e("hyphens-none",[["-webkit-hyphens","none"],["hyphens","none"]]),e("hyphens-manual",[["-webkit-hyphens","manual"],["hyphens","manual"]]),e("hyphens-auto",[["-webkit-hyphens","auto"],["hyphens","auto"]]),e("whitespace-normal",[["white-space","normal"]]),e("whitespace-nowrap",[["white-space","nowrap"]]),e("whitespace-pre",[["white-space","pre"]]),e("whitespace-pre-line",[["white-space","pre-line"]]),e("whitespace-pre-wrap",[["white-space","pre-wrap"]]),e("whitespace-break-spaces",[["white-space","break-spaces"]]),e("text-wrap",[["text-wrap","wrap"]]),e("text-nowrap",[["text-wrap","nowrap"]]),e("text-balance",[["text-wrap","balance"]]),e("text-pretty",[["text-wrap","pretty"]]),e("break-normal",[["overflow-wrap","normal"],["word-break","normal"]]),e("break-words",[["overflow-wrap","break-word"]]),e("break-all",[["word-break","break-all"]]),e("break-keep",[["word-break","keep-all"]]),e("wrap-anywhere",[["overflow-wrap","anywhere"]]),e("wrap-break-word",[["overflow-wrap","break-word"]]),e("wrap-normal",[["overflow-wrap","normal"]]);for(let[o,p]of[["rounded",["border-radius"]],["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]],["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]])e(`${o}-none`,p.map(h=>[h,"0"])),e(`${o}-full`,p.map(h=>[h,"calc(infinity * 1px)"])),n(o,{themeKeys:["--radius"],handle:h=>p.map(A=>l(A,h))});e("border-solid",[["--tw-border-style","solid"],["border-style","solid"]]),e("border-dashed",[["--tw-border-style","dashed"],["border-style","dashed"]]),e("border-dotted",[["--tw-border-style","dotted"],["border-style","dotted"]]),e("border-double",[["--tw-border-style","double"],["border-style","double"]]),e("border-hidden",[["--tw-border-style","hidden"],["border-style","hidden"]]),e("border-none",[["--tw-border-style","none"],["border-style","none"]]);{let p=function(h,A){t.functional(h,y=>{if(!y.value){if(y.modifier)return;let C=r.get(["--default-border-width"])??"1px",O=A.width(C);return O?[o(),...O]:void 0}if(y.value.kind==="arbitrary"){let C=y.value.value;switch(y.value.dataType??J(C,["color","line-width","length"])){case"line-width":case"length":{if(y.modifier)return;let V=A.width(C);return V?[o(),...V]:void 0}default:return C=X(C,y.modifier,r),C===null?void 0:A.color(C)}}{let C=te(y,r,["--border-color","--color"]);if(C)return A.color(C)}{if(y.modifier)return;let C=r.resolve(y.value.value,["--border-width"]);if(C){let O=A.width(C);return O?[o(),...O]:void 0}if(E(y.value.value)){let O=A.width(`${y.value.value}px`);return O?[o(),...O]:void 0}}}),i(h,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--border-color","--color"],modifiers:Array.from({length:21},(y,C)=>`${C*5}`),hasDefaultValue:!0},{values:["0","2","4","8"],valueThemeKeys:["--border-width"]}])};var K=p;let o=()=>L([$("--tw-border-style","solid")]);p("border",{width:h=>[l("border-style","var(--tw-border-style)"),l("border-width",h)],color:h=>[l("border-color",h)]}),p("border-x",{width:h=>[l("border-inline-style","var(--tw-border-style)"),l("border-inline-width",h)],color:h=>[l("border-inline-color",h)]}),p("border-y",{width:h=>[l("border-block-style","var(--tw-border-style)"),l("border-block-width",h)],color:h=>[l("border-block-color",h)]}),p("border-s",{width:h=>[l("border-inline-start-style","var(--tw-border-style)"),l("border-inline-start-width",h)],color:h=>[l("border-inline-start-color",h)]}),p("border-e",{width:h=>[l("border-inline-end-style","var(--tw-border-style)"),l("border-inline-end-width",h)],color:h=>[l("border-inline-end-color",h)]}),p("border-t",{width:h=>[l("border-top-style","var(--tw-border-style)"),l("border-top-width",h)],color:h=>[l("border-top-color",h)]}),p("border-r",{width:h=>[l("border-right-style","var(--tw-border-style)"),l("border-right-width",h)],color:h=>[l("border-right-color",h)]}),p("border-b",{width:h=>[l("border-bottom-style","var(--tw-border-style)"),l("border-bottom-width",h)],color:h=>[l("border-bottom-color",h)]}),p("border-l",{width:h=>[l("border-left-style","var(--tw-border-style)"),l("border-left-width",h)],color:h=>[l("border-left-color",h)]}),n("divide-x",{defaultValue:r.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>E(h)?`${h}px`:null,handle:h=>[L([$("--tw-divide-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-x-width"),o(),l("--tw-divide-x-reverse","0"),l("border-inline-style","var(--tw-border-style)"),l("border-inline-start-width",`calc(${h} * var(--tw-divide-x-reverse))`),l("border-inline-end-width",`calc(${h} * calc(1 - var(--tw-divide-x-reverse)))`)])]}),n("divide-y",{defaultValue:r.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>E(h)?`${h}px`:null,handle:h=>[L([$("--tw-divide-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-y-width"),o(),l("--tw-divide-y-reverse","0"),l("border-bottom-style","var(--tw-border-style)"),l("border-top-style","var(--tw-border-style)"),l("border-top-width",`calc(${h} * var(--tw-divide-y-reverse))`),l("border-bottom-width",`calc(${h} * calc(1 - var(--tw-divide-y-reverse)))`)])]}),i("divide-x",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),i("divide-y",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),e("divide-x-reverse",[()=>L([$("--tw-divide-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-x-reverse","1")])]),e("divide-y-reverse",[()=>L([$("--tw-divide-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-y-reverse","1")])]);for(let h of["solid","dashed","dotted","double","none"])e(`divide-${h}`,[()=>M(":where(& > :not(:last-child))",[l("--tw-sort","divide-style"),l("--tw-border-style",h),l("border-style",h)])])}e("bg-auto",[["background-size","auto"]]),e("bg-cover",[["background-size","cover"]]),e("bg-contain",[["background-size","contain"]]),n("bg-size",{handle(o){if(o)return[l("background-size",o)]}}),e("bg-fixed",[["background-attachment","fixed"]]),e("bg-local",[["background-attachment","local"]]),e("bg-scroll",[["background-attachment","scroll"]]),e("bg-top",[["background-position","top"]]),e("bg-top-left",[["background-position","left top"]]),e("bg-top-right",[["background-position","right top"]]),e("bg-bottom",[["background-position","bottom"]]),e("bg-bottom-left",[["background-position","left bottom"]]),e("bg-bottom-right",[["background-position","right bottom"]]),e("bg-left",[["background-position","left"]]),e("bg-right",[["background-position","right"]]),e("bg-center",[["background-position","center"]]),n("bg-position",{handle(o){if(o)return[l("background-position",o)]}}),e("bg-repeat",[["background-repeat","repeat"]]),e("bg-no-repeat",[["background-repeat","no-repeat"]]),e("bg-repeat-x",[["background-repeat","repeat-x"]]),e("bg-repeat-y",[["background-repeat","repeat-y"]]),e("bg-repeat-round",[["background-repeat","round"]]),e("bg-repeat-space",[["background-repeat","space"]]),e("bg-none",[["background-image","none"]]);{let h=function(C){let O="in oklab";if(C?.kind==="named")switch(C.value){case"longer":case"shorter":case"increasing":case"decreasing":O=`in oklch ${C.value} hue`;break;default:O=`in ${C.value}`}else C?.kind==="arbitrary"&&(O=C.value);return O},A=function({negative:C}){return O=>{if(!O.value)return;if(O.value.kind==="arbitrary"){if(O.modifier)return;let j=O.value.value;switch(O.value.dataType??J(j,["angle"])){case"angle":return j=C?`calc(${j} * -1)`:`${j}`,[l("--tw-gradient-position",j),l("background-image",`linear-gradient(var(--tw-gradient-stops,${j}))`)];default:return C?void 0:[l("--tw-gradient-position",j),l("background-image",`linear-gradient(var(--tw-gradient-stops,${j}))`)]}}let V=O.value.value;if(!C&&p.has(V))V=p.get(V);else if(E(V))V=C?`calc(${V}deg * -1)`:`${V}deg`;else return;let T=h(O.modifier);return[l("--tw-gradient-position",`${V}`),H("@supports (background-image: linear-gradient(in lab, red, red))",[l("--tw-gradient-position",`${V} ${T}`)]),l("background-image","linear-gradient(var(--tw-gradient-stops))")]}},y=function({negative:C}){return O=>{if(O.value?.kind==="arbitrary"){if(O.modifier)return;let j=O.value.value;return[l("--tw-gradient-position",j),l("background-image",`conic-gradient(var(--tw-gradient-stops,${j}))`)]}let V=h(O.modifier);if(!O.value)return[l("--tw-gradient-position",V),l("background-image","conic-gradient(var(--tw-gradient-stops))")];let T=O.value.value;if(E(T))return T=C?`calc(${T}deg * -1)`:`${T}deg`,[l("--tw-gradient-position",`from ${T} ${V}`),l("background-image","conic-gradient(var(--tw-gradient-stops))")]}};var G=h,I=A,W=y;let o=["oklab","oklch","srgb","hsl","longer","shorter","increasing","decreasing"],p=new Map([["to-t","to top"],["to-tr","to top right"],["to-r","to right"],["to-br","to bottom right"],["to-b","to bottom"],["to-bl","to bottom left"],["to-l","to left"],["to-tl","to top left"]]);t.functional("-bg-linear",A({negative:!0})),t.functional("bg-linear",A({negative:!1})),i("bg-linear",()=>[{values:[...p.keys()],modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),t.functional("-bg-conic",y({negative:!0})),t.functional("bg-conic",y({negative:!1})),i("bg-conic",()=>[{hasDefaultValue:!0,modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),t.functional("bg-radial",C=>{if(!C.value){let O=h(C.modifier);return[l("--tw-gradient-position",O),l("background-image","radial-gradient(var(--tw-gradient-stops))")]}if(C.value.kind==="arbitrary"){if(C.modifier)return;let O=C.value.value;return[l("--tw-gradient-position",O),l("background-image",`radial-gradient(var(--tw-gradient-stops,${O}))`)]}}),i("bg-radial",()=>[{hasDefaultValue:!0,modifiers:o}])}t.functional("bg",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["image","color","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("background-position",p)];case"bg-size":case"length":case"size":return o.modifier?void 0:[l("background-size",p)];case"image":case"url":return o.modifier?void 0:[l("background-image",p)];default:return p=X(p,o.modifier,r),p===null?void 0:[l("background-color",p)]}}{let p=te(o,r,["--background-color","--color"]);if(p)return[l("background-color",p)]}{if(o.modifier)return;let p=r.resolve(o.value.value,["--background-image"]);if(p)return[l("background-image",p)]}}}),i("bg",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--background-image"]}]);let v=()=>L([$("--tw-gradient-position"),$("--tw-gradient-from","#0000",""),$("--tw-gradient-via","#0000",""),$("--tw-gradient-to","#0000",""),$("--tw-gradient-stops"),$("--tw-gradient-via-stops"),$("--tw-gradient-from-position","0%",""),$("--tw-gradient-via-position","50%",""),$("--tw-gradient-to-position","100%","")]);function x(o,p){t.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??J(A,["color","length","percentage"])){case"length":case"percentage":return h.modifier?void 0:p.position(A);default:return A=X(A,h.modifier,r),A===null?void 0:p.color(A)}}{let A=te(h,r,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=r.resolve(h.value.value,["--gradient-color-stop-positions"]);if(A)return p.position(A);if(h.value.value[h.value.value.length-1]==="%"&&E(h.value.value.slice(0,-1)))return p.position(h.value.value)}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}])}x("from",{color:o=>[v(),l("--tw-sort","--tw-gradient-from"),l("--tw-gradient-from",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-from-position",o)]}),e("via-none",[["--tw-gradient-via-stops","initial"]]),x("via",{color:o=>[v(),l("--tw-sort","--tw-gradient-via"),l("--tw-gradient-via",o),l("--tw-gradient-via-stops","var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"),l("--tw-gradient-stops","var(--tw-gradient-via-stops)")],position:o=>[v(),l("--tw-gradient-via-position",o)]}),x("to",{color:o=>[v(),l("--tw-sort","--tw-gradient-to"),l("--tw-gradient-to",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-to-position",o)]}),e("mask-none",[["mask-image","none"]]),t.functional("mask",o=>{if(!o.value||o.modifier||o.value.kind!=="arbitrary")return;let p=o.value.value;switch(o.value.dataType??J(p,["image","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("mask-position",p)];case"bg-size":case"length":case"size":return[l("mask-size",p)];case"image":case"url":default:return[l("mask-image",p)]}}),e("mask-add",[["mask-composite","add"]]),e("mask-subtract",[["mask-composite","subtract"]]),e("mask-intersect",[["mask-composite","intersect"]]),e("mask-exclude",[["mask-composite","exclude"]]),e("mask-alpha",[["mask-mode","alpha"]]),e("mask-luminance",[["mask-mode","luminance"]]),e("mask-match",[["mask-mode","match-source"]]),e("mask-type-alpha",[["mask-type","alpha"]]),e("mask-type-luminance",[["mask-type","luminance"]]),e("mask-auto",[["mask-size","auto"]]),e("mask-cover",[["mask-size","cover"]]),e("mask-contain",[["mask-size","contain"]]),n("mask-size",{handle(o){if(o)return[l("mask-size",o)]}}),e("mask-top",[["mask-position","top"]]),e("mask-top-left",[["mask-position","left top"]]),e("mask-top-right",[["mask-position","right top"]]),e("mask-bottom",[["mask-position","bottom"]]),e("mask-bottom-left",[["mask-position","left bottom"]]),e("mask-bottom-right",[["mask-position","right bottom"]]),e("mask-left",[["mask-position","left"]]),e("mask-right",[["mask-position","right"]]),e("mask-center",[["mask-position","center"]]),n("mask-position",{handle(o){if(o)return[l("mask-position",o)]}}),e("mask-repeat",[["mask-repeat","repeat"]]),e("mask-no-repeat",[["mask-repeat","no-repeat"]]),e("mask-repeat-x",[["mask-repeat","repeat-x"]]),e("mask-repeat-y",[["mask-repeat","repeat-y"]]),e("mask-repeat-round",[["mask-repeat","round"]]),e("mask-repeat-space",[["mask-repeat","space"]]),e("mask-clip-border",[["mask-clip","border-box"]]),e("mask-clip-padding",[["mask-clip","padding-box"]]),e("mask-clip-content",[["mask-clip","content-box"]]),e("mask-clip-fill",[["mask-clip","fill-box"]]),e("mask-clip-stroke",[["mask-clip","stroke-box"]]),e("mask-clip-view",[["mask-clip","view-box"]]),e("mask-no-clip",[["mask-clip","no-clip"]]),e("mask-origin-border",[["mask-origin","border-box"]]),e("mask-origin-padding",[["mask-origin","padding-box"]]),e("mask-origin-content",[["mask-origin","content-box"]]),e("mask-origin-fill",[["mask-origin","fill-box"]]),e("mask-origin-stroke",[["mask-origin","stroke-box"]]),e("mask-origin-view",[["mask-origin","view-box"]]);let k=()=>L([$("--tw-mask-linear","linear-gradient(#fff, #fff)"),$("--tw-mask-radial","linear-gradient(#fff, #fff)"),$("--tw-mask-conic","linear-gradient(#fff, #fff)")]);function N(o,p){t.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??J(A,["length","percentage","color"])){case"color":return A=X(A,h.modifier,r),A===null?void 0:p.color(A);case"percentage":return h.modifier||!E(A.slice(0,-1))?void 0:p.position(A);default:return h.modifier?void 0:p.position(A)}}{let A=te(h,r,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=J(h.value.value,["number","percentage"]);if(!A)return;switch(A){case"number":{let y=r.resolve(null,["--spacing"]);return!y||!de(h.value.value)?void 0:p.position(`calc(${y} * ${h.value.value})`)}case"percentage":return E(h.value.value.slice(0,-1))?p.position(h.value.value):void 0;default:return}}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}]),i(o,()=>[{values:Array.from({length:21},(h,A)=>`${A*5}%`)},{values:r.get(["--spacing"])?Ze:[]},{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}let b=()=>L([$("--tw-mask-left","linear-gradient(#fff, #fff)"),$("--tw-mask-right","linear-gradient(#fff, #fff)"),$("--tw-mask-bottom","linear-gradient(#fff, #fff)"),$("--tw-mask-top","linear-gradient(#fff, #fff)")]);function S(o,p,h){N(o,{color(A){let y=[k(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(y.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),y.push(L([$(`--tw-mask-${C}-from-position`,"0%"),$(`--tw-mask-${C}-to-position`,"100%"),$(`--tw-mask-${C}-from-color`,"black"),$(`--tw-mask-${C}-to-color`,"transparent")])),y.push(l(`--tw-mask-${C}-${p}-color`,A)));return y},position(A){let y=[k(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(y.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),y.push(L([$(`--tw-mask-${C}-from-position`,"0%"),$(`--tw-mask-${C}-to-position`,"100%"),$(`--tw-mask-${C}-from-color`,"black"),$(`--tw-mask-${C}-to-color`,"transparent")])),y.push(l(`--tw-mask-${C}-${p}-position`,A)));return y}})}S("mask-x-from","from",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-x-to","to",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-y-from","from",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-y-to","to",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-t-from","from",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-t-to","to",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-r-from","from",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-r-to","to",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-b-from","from",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-b-to","to",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-l-from","from",{top:!1,right:!1,bottom:!1,left:!0}),S("mask-l-to","to",{top:!1,right:!1,bottom:!1,left:!0});let P=()=>L([$("--tw-mask-linear-position","0deg"),$("--tw-mask-linear-from-position","0%"),$("--tw-mask-linear-to-position","100%"),$("--tw-mask-linear-from-color","black"),$("--tw-mask-linear-to-color","transparent")]);n("mask-linear",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return E(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return E(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"),l("--tw-mask-linear-position",o)]}),i("mask-linear",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),N("mask-linear-from",{color:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-color",o)],position:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-position",o)]}),N("mask-linear-to",{color:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-color",o)],position:o=>[k(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-position",o)]});let U=()=>L([$("--tw-mask-radial-from-position","0%"),$("--tw-mask-radial-to-position","100%"),$("--tw-mask-radial-from-color","black"),$("--tw-mask-radial-to-color","transparent"),$("--tw-mask-radial-shape","ellipse"),$("--tw-mask-radial-size","farthest-corner"),$("--tw-mask-radial-position","center")]);e("mask-circle",[["--tw-mask-radial-shape","circle"]]),e("mask-ellipse",[["--tw-mask-radial-shape","ellipse"]]),e("mask-radial-closest-side",[["--tw-mask-radial-size","closest-side"]]),e("mask-radial-farthest-side",[["--tw-mask-radial-size","farthest-side"]]),e("mask-radial-closest-corner",[["--tw-mask-radial-size","closest-corner"]]),e("mask-radial-farthest-corner",[["--tw-mask-radial-size","farthest-corner"]]),e("mask-radial-at-top",[["--tw-mask-radial-position","top"]]),e("mask-radial-at-top-left",[["--tw-mask-radial-position","top left"]]),e("mask-radial-at-top-right",[["--tw-mask-radial-position","top right"]]),e("mask-radial-at-bottom",[["--tw-mask-radial-position","bottom"]]),e("mask-radial-at-bottom-left",[["--tw-mask-radial-position","bottom left"]]),e("mask-radial-at-bottom-right",[["--tw-mask-radial-position","bottom right"]]),e("mask-radial-at-left",[["--tw-mask-radial-position","left"]]),e("mask-radial-at-right",[["--tw-mask-radial-position","right"]]),e("mask-radial-at-center",[["--tw-mask-radial-position","center"]]),n("mask-radial-at",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[l("--tw-mask-radial-position",o)]}),n("mask-radial",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"),l("--tw-mask-radial-size",o)]}),N("mask-radial-from",{color:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-color",o)],position:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-position",o)]}),N("mask-radial-to",{color:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-color",o)],position:o=>[k(),U(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-position",o)]});let R=()=>L([$("--tw-mask-conic-position","0deg"),$("--tw-mask-conic-from-position","0%"),$("--tw-mask-conic-to-position","100%"),$("--tw-mask-conic-from-color","black"),$("--tw-mask-conic-to-color","transparent")]);n("mask-conic",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return E(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return E(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"),l("--tw-mask-conic-position",o)]}),i("mask-conic",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),N("mask-conic-from",{color:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-color",o)],position:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-position",o)]}),N("mask-conic-to",{color:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-color",o)],position:o=>[k(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-position",o)]}),e("box-decoration-slice",[["-webkit-box-decoration-break","slice"],["box-decoration-break","slice"]]),e("box-decoration-clone",[["-webkit-box-decoration-break","clone"],["box-decoration-break","clone"]]),e("bg-clip-text",[["background-clip","text"]]),e("bg-clip-border",[["background-clip","border-box"]]),e("bg-clip-padding",[["background-clip","padding-box"]]),e("bg-clip-content",[["background-clip","content-box"]]),e("bg-origin-border",[["background-origin","border-box"]]),e("bg-origin-padding",[["background-origin","padding-box"]]),e("bg-origin-content",[["background-origin","content-box"]]);for(let o of["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])e(`bg-blend-${o}`,[["background-blend-mode",o]]),e(`mix-blend-${o}`,[["mix-blend-mode",o]]);e("mix-blend-plus-darker",[["mix-blend-mode","plus-darker"]]),e("mix-blend-plus-lighter",[["mix-blend-mode","plus-lighter"]]),e("fill-none",[["fill","none"]]),t.functional("fill",o=>{if(!o.value)return;if(o.value.kind==="arbitrary"){let h=X(o.value.value,o.modifier,r);return h===null?void 0:[l("fill",h)]}let p=te(o,r,["--fill","--color"]);if(p)return[l("fill",p)]}),i("fill",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--fill","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)}]),e("stroke-none",[["stroke","none"]]),t.functional("stroke",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["color","number","length","percentage"])){case"number":case"length":case"percentage":return o.modifier?void 0:[l("stroke-width",p)];default:return p=X(o.value.value,o.modifier,r),p===null?void 0:[l("stroke",p)]}}{let p=te(o,r,["--stroke","--color"]);if(p)return[l("stroke",p)]}{let p=r.resolve(o.value.value,["--stroke-width"]);if(p)return[l("stroke-width",p)];if(E(o.value.value))return[l("stroke-width",o.value.value)]}}}),i("stroke",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--stroke","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","3"],valueThemeKeys:["--stroke-width"]}]),e("object-contain",[["object-fit","contain"]]),e("object-cover",[["object-fit","cover"]]),e("object-fill",[["object-fit","fill"]]),e("object-none",[["object-fit","none"]]),e("object-scale-down",[["object-fit","scale-down"]]),e("object-top",[["object-position","top"]]),e("object-top-left",[["object-position","left top"]]),e("object-top-right",[["object-position","right top"]]),e("object-bottom",[["object-position","bottom"]]),e("object-bottom-left",[["object-position","left bottom"]]),e("object-bottom-right",[["object-position","right bottom"]]),e("object-left",[["object-position","left"]]),e("object-right",[["object-position","right"]]),e("object-center",[["object-position","center"]]),n("object",{themeKeys:["--object-position"],handle:o=>[l("object-position",o)]});for(let[o,p]of[["p","padding"],["px","padding-inline"],["py","padding-block"],["ps","padding-inline-start"],["pe","padding-inline-end"],["pt","padding-top"],["pr","padding-right"],["pb","padding-bottom"],["pl","padding-left"]])a(o,["--padding","--spacing"],h=>[l(p,h)]);e("text-left",[["text-align","left"]]),e("text-center",[["text-align","center"]]),e("text-right",[["text-align","right"]]),e("text-justify",[["text-align","justify"]]),e("text-start",[["text-align","start"]]),e("text-end",[["text-align","end"]]),a("indent",["--text-indent","--spacing"],o=>[l("text-indent",o)],{supportsNegative:!0}),e("align-baseline",[["vertical-align","baseline"]]),e("align-top",[["vertical-align","top"]]),e("align-middle",[["vertical-align","middle"]]),e("align-bottom",[["vertical-align","bottom"]]),e("align-text-top",[["vertical-align","text-top"]]),e("align-text-bottom",[["vertical-align","text-bottom"]]),e("align-sub",[["vertical-align","sub"]]),e("align-super",[["vertical-align","super"]]),n("align",{themeKeys:[],handle:o=>[l("vertical-align",o)]}),t.functional("font",o=>{if(!(!o.value||o.modifier)){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["number","generic-name","family-name"])){case"generic-name":case"family-name":return[l("font-family",p)];default:return[L([$("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}{let p=r.resolveWith(o.value.value,["--font"],["--font-feature-settings","--font-variation-settings"]);if(p){let[h,A={}]=p;return[l("font-family",h),l("font-feature-settings",A["--font-feature-settings"]),l("font-variation-settings",A["--font-variation-settings"])]}}{let p=r.resolve(o.value.value,["--font-weight"]);if(p)return[L([$("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}}),i("font",()=>[{values:[],valueThemeKeys:["--font"]},{values:[],valueThemeKeys:["--font-weight"]}]),e("uppercase",[["text-transform","uppercase"]]),e("lowercase",[["text-transform","lowercase"]]),e("capitalize",[["text-transform","capitalize"]]),e("normal-case",[["text-transform","none"]]),e("italic",[["font-style","italic"]]),e("not-italic",[["font-style","normal"]]),e("underline",[["text-decoration-line","underline"]]),e("overline",[["text-decoration-line","overline"]]),e("line-through",[["text-decoration-line","line-through"]]),e("no-underline",[["text-decoration-line","none"]]),e("font-stretch-normal",[["font-stretch","normal"]]),e("font-stretch-ultra-condensed",[["font-stretch","ultra-condensed"]]),e("font-stretch-extra-condensed",[["font-stretch","extra-condensed"]]),e("font-stretch-condensed",[["font-stretch","condensed"]]),e("font-stretch-semi-condensed",[["font-stretch","semi-condensed"]]),e("font-stretch-semi-expanded",[["font-stretch","semi-expanded"]]),e("font-stretch-expanded",[["font-stretch","expanded"]]),e("font-stretch-extra-expanded",[["font-stretch","extra-expanded"]]),e("font-stretch-ultra-expanded",[["font-stretch","ultra-expanded"]]),n("font-stretch",{handleBareValue:({value:o})=>{if(!o.endsWith("%"))return null;let p=Number(o.slice(0,-1));return!E(p)||Number.isNaN(p)||p<50||p>200?null:o},handle:o=>[l("font-stretch",o)]}),i("font-stretch",()=>[{values:["50%","75%","90%","95%","100%","105%","110%","125%","150%","200%"]}]),s("placeholder",{themeKeys:["--background-color","--color"],handle:o=>[M("&::placeholder",[l("--tw-sort","placeholder-color"),l("color",o)])]}),e("decoration-solid",[["text-decoration-style","solid"]]),e("decoration-double",[["text-decoration-style","double"]]),e("decoration-dotted",[["text-decoration-style","dotted"]]),e("decoration-dashed",[["text-decoration-style","dashed"]]),e("decoration-wavy",[["text-decoration-style","wavy"]]),e("decoration-auto",[["text-decoration-thickness","auto"]]),e("decoration-from-font",[["text-decoration-thickness","from-font"]]),t.functional("decoration",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["color","length","percentage"])){case"length":case"percentage":return o.modifier?void 0:[l("text-decoration-thickness",p)];default:return p=X(p,o.modifier,r),p===null?void 0:[l("text-decoration-color",p)]}}{let p=r.resolve(o.value.value,["--text-decoration-thickness"]);if(p)return o.modifier?void 0:[l("text-decoration-thickness",p)];if(E(o.value.value))return o.modifier?void 0:[l("text-decoration-thickness",`${o.value.value}px`)]}{let p=te(o,r,["--text-decoration-color","--color"]);if(p)return[l("text-decoration-color",p)]}}}),i("decoration",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-decoration-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2"],valueThemeKeys:["--text-decoration-thickness"]}]),e("animate-none",[["animation","none"]]),n("animate",{themeKeys:["--animate"],handle:o=>[l("animation",o)]});{let o=["var(--tw-blur,)","var(--tw-brightness,)","var(--tw-contrast,)","var(--tw-grayscale,)","var(--tw-hue-rotate,)","var(--tw-invert,)","var(--tw-saturate,)","var(--tw-sepia,)","var(--tw-drop-shadow,)"].join(" "),p=["var(--tw-backdrop-blur,)","var(--tw-backdrop-brightness,)","var(--tw-backdrop-contrast,)","var(--tw-backdrop-grayscale,)","var(--tw-backdrop-hue-rotate,)","var(--tw-backdrop-invert,)","var(--tw-backdrop-opacity,)","var(--tw-backdrop-saturate,)","var(--tw-backdrop-sepia,)"].join(" "),h=()=>L([$("--tw-blur"),$("--tw-brightness"),$("--tw-contrast"),$("--tw-grayscale"),$("--tw-hue-rotate"),$("--tw-invert"),$("--tw-opacity"),$("--tw-saturate"),$("--tw-sepia"),$("--tw-drop-shadow"),$("--tw-drop-shadow-color"),$("--tw-drop-shadow-alpha","100%",""),$("--tw-drop-shadow-size")]),A=()=>L([$("--tw-backdrop-blur"),$("--tw-backdrop-brightness"),$("--tw-backdrop-contrast"),$("--tw-backdrop-grayscale"),$("--tw-backdrop-hue-rotate"),$("--tw-backdrop-invert"),$("--tw-backdrop-opacity"),$("--tw-backdrop-saturate"),$("--tw-backdrop-sepia")]);t.functional("filter",y=>{if(!y.modifier){if(y.value===null)return[h(),l("filter",o)];if(y.value.kind==="arbitrary")return[l("filter",y.value.value)];switch(y.value.value){case"none":return[l("filter","none")]}}}),t.functional("backdrop-filter",y=>{if(!y.modifier){if(y.value===null)return[A(),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)];if(y.value.kind==="arbitrary")return[l("-webkit-backdrop-filter",y.value.value),l("backdrop-filter",y.value.value)];switch(y.value.value){case"none":return[l("-webkit-backdrop-filter","none"),l("backdrop-filter","none")]}}}),n("blur",{themeKeys:["--blur"],handle:y=>[h(),l("--tw-blur",`blur(${y})`),l("filter",o)]}),e("blur-none",[h,["--tw-blur"," "],["filter",o]]),n("backdrop-blur",{themeKeys:["--backdrop-blur","--blur"],handle:y=>[A(),l("--tw-backdrop-blur",`blur(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),e("backdrop-blur-none",[A,["--tw-backdrop-blur"," "],["-webkit-backdrop-filter",p],["backdrop-filter",p]]),n("brightness",{themeKeys:["--brightness"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[h(),l("--tw-brightness",`brightness(${y})`),l("filter",o)]}),n("backdrop-brightness",{themeKeys:["--backdrop-brightness","--brightness"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-brightness",`brightness(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--brightness"]}]),i("backdrop-brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--backdrop-brightness","--brightness"]}]),n("contrast",{themeKeys:["--contrast"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[h(),l("--tw-contrast",`contrast(${y})`),l("filter",o)]}),n("backdrop-contrast",{themeKeys:["--backdrop-contrast","--contrast"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-contrast",`contrast(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--contrast"]}]),i("backdrop-contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--backdrop-contrast","--contrast"]}]),n("grayscale",{themeKeys:["--grayscale"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[h(),l("--tw-grayscale",`grayscale(${y})`),l("filter",o)]}),n("backdrop-grayscale",{themeKeys:["--backdrop-grayscale","--grayscale"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[A(),l("--tw-backdrop-grayscale",`grayscale(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--grayscale"],hasDefaultValue:!0}]),i("backdrop-grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-grayscale","--grayscale"],hasDefaultValue:!0}]),n("hue-rotate",{supportsNegative:!0,themeKeys:["--hue-rotate"],handleBareValue:({value:y})=>E(y)?`${y}deg`:null,handle:y=>[h(),l("--tw-hue-rotate",`hue-rotate(${y})`),l("filter",o)]}),n("backdrop-hue-rotate",{supportsNegative:!0,themeKeys:["--backdrop-hue-rotate","--hue-rotate"],handleBareValue:({value:y})=>E(y)?`${y}deg`:null,handle:y=>[A(),l("--tw-backdrop-hue-rotate",`hue-rotate(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--hue-rotate"]}]),i("backdrop-hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--backdrop-hue-rotate","--hue-rotate"]}]),n("invert",{themeKeys:["--invert"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[h(),l("--tw-invert",`invert(${y})`),l("filter",o)]}),n("backdrop-invert",{themeKeys:["--backdrop-invert","--invert"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[A(),l("--tw-backdrop-invert",`invert(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--invert"],hasDefaultValue:!0}]),i("backdrop-invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-invert","--invert"],hasDefaultValue:!0}]),n("saturate",{themeKeys:["--saturate"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[h(),l("--tw-saturate",`saturate(${y})`),l("filter",o)]}),n("backdrop-saturate",{themeKeys:["--backdrop-saturate","--saturate"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-saturate",`saturate(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--saturate"]}]),i("backdrop-saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--backdrop-saturate","--saturate"]}]),n("sepia",{themeKeys:["--sepia"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[h(),l("--tw-sepia",`sepia(${y})`),l("filter",o)]}),n("backdrop-sepia",{themeKeys:["--backdrop-sepia","--sepia"],handleBareValue:({value:y})=>E(y)?`${y}%`:null,defaultValue:"100%",handle:y=>[A(),l("--tw-backdrop-sepia",`sepia(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--sepia"],hasDefaultValue:!0}]),i("backdrop-sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--backdrop-sepia","--sepia"],hasDefaultValue:!0}]),e("drop-shadow-none",[h,["--tw-drop-shadow"," "],["filter",o]]),t.functional("drop-shadow",y=>{let C;if(y.modifier&&(y.modifier.kind==="arbitrary"?C=y.modifier.value:E(y.modifier.value)&&(C=`${y.modifier.value}%`)),!y.value){let O=r.get(["--drop-shadow"]),V=r.resolve(null,["--drop-shadow"]);return O===null||V===null?void 0:[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow",D(V,",").map(T=>`drop-shadow(${T})`).join(" ")),l("filter",o)]}if(y.value.kind==="arbitrary"){let O=y.value.value;switch(y.value.dataType??J(O,["color"])){case"color":return O=X(O,y.modifier,r),O===null?void 0:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")];default:return y.modifier&&!C?void 0:[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]}}{let O=r.get([`--drop-shadow-${y.value.value}`]),V=r.resolve(y.value.value,["--drop-shadow"]);if(O&&V)return y.modifier&&!C?void 0:C?[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]:[h(),l("--tw-drop-shadow-alpha",C),...Ye("--tw-drop-shadow-size",O,C,T=>`var(--tw-drop-shadow-color, ${T})`),l("--tw-drop-shadow",D(V,",").map(T=>`drop-shadow(${T})`).join(" ")),l("filter",o)]}{let O=te(y,r,["--drop-shadow-color","--color"]);if(O)return O==="inherit"?[h(),l("--tw-drop-shadow-color","inherit"),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]}}),i("drop-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--drop-shadow-color","--color"],modifiers:Array.from({length:21},(y,C)=>`${C*5}`)},{valueThemeKeys:["--drop-shadow"]}]),n("backdrop-opacity",{themeKeys:["--backdrop-opacity","--opacity"],handleBareValue:({value:y})=>Ue(y)?`${y}%`:null,handle:y=>[A(),l("--tw-backdrop-opacity",`opacity(${y})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("backdrop-opacity",()=>[{values:Array.from({length:21},(y,C)=>`${C*5}`),valueThemeKeys:["--backdrop-opacity","--opacity"]}])}{let o=`var(--tw-ease, ${r.resolve(null,["--default-transition-timing-function"])??"ease"})`,p=`var(--tw-duration, ${r.resolve(null,["--default-transition-duration"])??"0s"})`;e("transition-none",[["transition-property","none"]]),e("transition-all",[["transition-property","all"],["transition-timing-function",o],["transition-duration",p]]),e("transition-colors",[["transition-property","color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"],["transition-timing-function",o],["transition-duration",p]]),e("transition-opacity",[["transition-property","opacity"],["transition-timing-function",o],["transition-duration",p]]),e("transition-shadow",[["transition-property","box-shadow"],["transition-timing-function",o],["transition-duration",p]]),e("transition-transform",[["transition-property","transform, translate, scale, rotate"],["transition-timing-function",o],["transition-duration",p]]),n("transition",{defaultValue:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events",themeKeys:["--transition-property"],handle:h=>[l("transition-property",h),l("transition-timing-function",o),l("transition-duration",p)]}),e("transition-discrete",[["transition-behavior","allow-discrete"]]),e("transition-normal",[["transition-behavior","normal"]]),n("delay",{handleBareValue:({value:h})=>E(h)?`${h}ms`:null,themeKeys:["--transition-delay"],handle:h=>[l("transition-delay",h)]});{let h=()=>L([$("--tw-duration")]);e("duration-initial",[h,["--tw-duration","initial"]]),t.functional("duration",A=>{if(A.modifier||!A.value)return;let y=null;if(A.value.kind==="arbitrary"?y=A.value.value:(y=r.resolve(A.value.fraction??A.value.value,["--transition-duration"]),y===null&&E(A.value.value)&&(y=`${A.value.value}ms`)),y!==null)return[h(),l("--tw-duration",y),l("transition-duration",y)]})}i("delay",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-delay"]}]),i("duration",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-duration"]}])}{let o=()=>L([$("--tw-ease")]);e("ease-initial",[o,["--tw-ease","initial"]]),e("ease-linear",[o,["--tw-ease","linear"],["transition-timing-function","linear"]]),n("ease",{themeKeys:["--ease"],handle:p=>[o(),l("--tw-ease",p),l("transition-timing-function",p)]})}e("will-change-auto",[["will-change","auto"]]),e("will-change-scroll",[["will-change","scroll-position"]]),e("will-change-contents",[["will-change","contents"]]),e("will-change-transform",[["will-change","transform"]]),n("will-change",{themeKeys:[],handle:o=>[l("will-change",o)]}),e("content-none",[["--tw-content","none"],["content","none"]]),n("content",{themeKeys:[],handle:o=>[L([$("--tw-content",'""')]),l("--tw-content",o),l("content","var(--tw-content)")]});{let o="var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)",p=()=>L([$("--tw-contain-size"),$("--tw-contain-layout"),$("--tw-contain-paint"),$("--tw-contain-style")]);e("contain-none",[["contain","none"]]),e("contain-content",[["contain","content"]]),e("contain-strict",[["contain","strict"]]),e("contain-size",[p,["--tw-contain-size","size"],["contain",o]]),e("contain-inline-size",[p,["--tw-contain-size","inline-size"],["contain",o]]),e("contain-layout",[p,["--tw-contain-layout","layout"],["contain",o]]),e("contain-paint",[p,["--tw-contain-paint","paint"],["contain",o]]),e("contain-style",[p,["--tw-contain-style","style"],["contain",o]]),n("contain",{themeKeys:[],handle:h=>[l("contain",h)]})}e("forced-color-adjust-none",[["forced-color-adjust","none"]]),e("forced-color-adjust-auto",[["forced-color-adjust","auto"]]),e("leading-none",[()=>L([$("--tw-leading")]),["--tw-leading","1"],["line-height","1"]]),a("leading",["--leading","--spacing"],o=>[L([$("--tw-leading")]),l("--tw-leading",o),l("line-height",o)]),n("tracking",{supportsNegative:!0,themeKeys:["--tracking"],handle:o=>[L([$("--tw-tracking")]),l("--tw-tracking",o),l("letter-spacing",o)]}),e("antialiased",[["-webkit-font-smoothing","antialiased"],["-moz-osx-font-smoothing","grayscale"]]),e("subpixel-antialiased",[["-webkit-font-smoothing","auto"],["-moz-osx-font-smoothing","auto"]]);{let o="var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)",p=()=>L([$("--tw-ordinal"),$("--tw-slashed-zero"),$("--tw-numeric-figure"),$("--tw-numeric-spacing"),$("--tw-numeric-fraction")]);e("normal-nums",[["font-variant-numeric","normal"]]),e("ordinal",[p,["--tw-ordinal","ordinal"],["font-variant-numeric",o]]),e("slashed-zero",[p,["--tw-slashed-zero","slashed-zero"],["font-variant-numeric",o]]),e("lining-nums",[p,["--tw-numeric-figure","lining-nums"],["font-variant-numeric",o]]),e("oldstyle-nums",[p,["--tw-numeric-figure","oldstyle-nums"],["font-variant-numeric",o]]),e("proportional-nums",[p,["--tw-numeric-spacing","proportional-nums"],["font-variant-numeric",o]]),e("tabular-nums",[p,["--tw-numeric-spacing","tabular-nums"],["font-variant-numeric",o]]),e("diagonal-fractions",[p,["--tw-numeric-fraction","diagonal-fractions"],["font-variant-numeric",o]]),e("stacked-fractions",[p,["--tw-numeric-fraction","stacked-fractions"],["font-variant-numeric",o]])}{let o=()=>L([$("--tw-outline-style","solid")]);t.static("outline-hidden",()=>[l("--tw-outline-style","none"),l("outline-style","none"),z("@media","(forced-colors: active)",[l("outline","2px solid transparent"),l("outline-offset","2px")])]),e("outline-none",[["--tw-outline-style","none"],["outline-style","none"]]),e("outline-solid",[["--tw-outline-style","solid"],["outline-style","solid"]]),e("outline-dashed",[["--tw-outline-style","dashed"],["outline-style","dashed"]]),e("outline-dotted",[["--tw-outline-style","dotted"],["outline-style","dotted"]]),e("outline-double",[["--tw-outline-style","double"],["outline-style","double"]]),t.functional("outline",p=>{if(p.value===null){if(p.modifier)return;let h=r.get(["--default-outline-width"])??"1px";return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)]}if(p.value.kind==="arbitrary"){let h=p.value.value;switch(p.value.dataType??J(h,["color","length","number","percentage"])){case"length":case"number":case"percentage":return p.modifier?void 0:[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];default:return h=X(h,p.modifier,r),h===null?void 0:[l("outline-color",h)]}}{let h=te(p,r,["--outline-color","--color"]);if(h)return[l("outline-color",h)]}{if(p.modifier)return;let h=r.resolve(p.value.value,["--outline-width"]);if(h)return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];if(E(p.value.value))return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",`${p.value.value}px`)]}}),i("outline",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--outline-color","--color"],modifiers:Array.from({length:21},(p,h)=>`${h*5}`),hasDefaultValue:!0},{values:["0","1","2","4","8"],valueThemeKeys:["--outline-width"]}]),n("outline-offset",{supportsNegative:!0,themeKeys:["--outline-offset"],handleBareValue:({value:p})=>E(p)?`${p}px`:null,handle:p=>[l("outline-offset",p)]}),i("outline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--outline-offset"]}])}n("opacity",{themeKeys:["--opacity"],handleBareValue:({value:o})=>Ue(o)?`${o}%`:null,handle:o=>[l("opacity",o)]}),i("opacity",()=>[{values:Array.from({length:21},(o,p)=>`${p*5}`),valueThemeKeys:["--opacity"]}]),e("underline-offset-auto",[["text-underline-offset","auto"]]),n("underline-offset",{supportsNegative:!0,themeKeys:["--text-underline-offset"],handleBareValue:({value:o})=>E(o)?`${o}px`:null,handle:o=>[l("text-underline-offset",o)]}),i("underline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--text-underline-offset"]}]),t.functional("text",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??J(p,["color","length","percentage","absolute-size","relative-size"])){case"size":case"length":case"percentage":case"absolute-size":case"relative-size":{if(o.modifier){let A=o.modifier.kind==="arbitrary"?o.modifier.value:r.resolve(o.modifier.value,["--leading"]);if(!A&&de(o.modifier.value)){let y=r.resolve(null,["--spacing"]);if(!y)return null;A=`calc(${y} * ${o.modifier.value})`}return!A&&o.modifier.value==="none"&&(A="1"),A?[l("font-size",p),l("line-height",A)]:null}return[l("font-size",p)]}default:return p=X(p,o.modifier,r),p===null?void 0:[l("color",p)]}}{let p=te(o,r,["--text-color","--color"]);if(p)return[l("color",p)]}{let p=r.resolveWith(o.value.value,["--text"],["--line-height","--letter-spacing","--font-weight"]);if(p){let[h,A={}]=Array.isArray(p)?p:[p];if(o.modifier){let y=o.modifier.kind==="arbitrary"?o.modifier.value:r.resolve(o.modifier.value,["--leading"]);if(!y&&de(o.modifier.value)){let O=r.resolve(null,["--spacing"]);if(!O)return null;y=`calc(${O} * ${o.modifier.value})`}if(!y&&o.modifier.value==="none"&&(y="1"),!y)return null;let C=[l("font-size",h)];return y&&C.push(l("line-height",y)),C}return typeof A=="string"?[l("font-size",h),l("line-height",A)]:[l("font-size",h),l("line-height",A["--line-height"]?`var(--tw-leading, ${A["--line-height"]})`:void 0),l("letter-spacing",A["--letter-spacing"]?`var(--tw-tracking, ${A["--letter-spacing"]})`:void 0),l("font-weight",A["--font-weight"]?`var(--tw-font-weight, ${A["--font-weight"]})`:void 0)]}}}}),i("text",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--text"],modifiers:[],modifierThemeKeys:["--leading"]}]);let _=()=>L([$("--tw-text-shadow-color"),$("--tw-text-shadow-alpha","100%","")]);e("text-shadow-initial",[_,["--tw-text-shadow-color","initial"]]),t.functional("text-shadow",o=>{let p;if(o.modifier&&(o.modifier.kind==="arbitrary"?p=o.modifier.value:E(o.modifier.value)&&(p=`${o.modifier.value}%`)),!o.value){let h=r.get(["--text-shadow"]);return h===null?void 0:[_(),l("--tw-text-shadow-alpha",p),...ue("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}if(o.value.kind==="arbitrary"){let h=o.value.value;switch(o.value.dataType??J(h,["color"])){case"color":return h=X(h,o.modifier,r),h===null?void 0:[_(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))];default:return[_(),l("--tw-text-shadow-alpha",p),...ue("text-shadow",h,p,y=>`var(--tw-text-shadow-color, ${y})`)]}}switch(o.value.value){case"none":return o.modifier?void 0:[_(),l("text-shadow","none")];case"inherit":return o.modifier?void 0:[_(),l("--tw-text-shadow-color","inherit")]}{let h=r.get([`--text-shadow-${o.value.value}`]);if(h)return[_(),l("--tw-text-shadow-alpha",p),...ue("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}{let h=te(o,r,["--text-shadow-color","--color"]);if(h)return[_(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))]}}),i("text-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-shadow-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["none"]},{valueThemeKeys:["--text-shadow"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`),hasDefaultValue:r.get(["--text-shadow"])!==null}]);{let y=function(V){return`var(--tw-ring-inset,) 0 0 0 calc(${V} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${A})`},C=function(V){return`inset 0 0 0 ${V} var(--tw-inset-ring-color, currentcolor)`};var Z=y,re=C;let o=["var(--tw-inset-shadow)","var(--tw-inset-ring-shadow)","var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow)"].join(", "),p="0 0 #0000",h=()=>L([$("--tw-shadow",p),$("--tw-shadow-color"),$("--tw-shadow-alpha","100%",""),$("--tw-inset-shadow",p),$("--tw-inset-shadow-color"),$("--tw-inset-shadow-alpha","100%",""),$("--tw-ring-color"),$("--tw-ring-shadow",p),$("--tw-inset-ring-color"),$("--tw-inset-ring-shadow",p),$("--tw-ring-inset"),$("--tw-ring-offset-width","0px",""),$("--tw-ring-offset-color","#fff"),$("--tw-ring-offset-shadow",p)]);e("shadow-initial",[h,["--tw-shadow-color","initial"]]),t.functional("shadow",V=>{let T;if(V.modifier&&(V.modifier.kind==="arbitrary"?T=V.modifier.value:E(V.modifier.value)&&(T=`${V.modifier.value}%`)),!V.value){let j=r.get(["--shadow"]);return j===null?void 0:[h(),l("--tw-shadow-alpha",T),...ue("--tw-shadow",j,T,oe=>`var(--tw-shadow-color, ${oe})`),l("box-shadow",o)]}if(V.value.kind==="arbitrary"){let j=V.value.value;switch(V.value.dataType??J(j,["color"])){case"color":return j=X(j,V.modifier,r),j===null?void 0:[h(),l("--tw-shadow-color",Q(j,"var(--tw-shadow-alpha)"))];default:return[h(),l("--tw-shadow-alpha",T),...ue("--tw-shadow",j,T,ot=>`var(--tw-shadow-color, ${ot})`),l("box-shadow",o)]}}switch(V.value.value){case"none":return V.modifier?void 0:[h(),l("--tw-shadow",p),l("box-shadow",o)];case"inherit":return V.modifier?void 0:[h(),l("--tw-shadow-color","inherit")]}{let j=r.get([`--shadow-${V.value.value}`]);if(j)return[h(),l("--tw-shadow-alpha",T),...ue("--tw-shadow",j,T,oe=>`var(--tw-shadow-color, ${oe})`),l("box-shadow",o)]}{let j=te(V,r,["--box-shadow-color","--color"]);if(j)return[h(),l("--tw-shadow-color",Q(j,"var(--tw-shadow-alpha)"))]}}),i("shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["none"]},{valueThemeKeys:["--shadow"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`),hasDefaultValue:r.get(["--shadow"])!==null}]),e("inset-shadow-initial",[h,["--tw-inset-shadow-color","initial"]]),t.functional("inset-shadow",V=>{let T;if(V.modifier&&(V.modifier.kind==="arbitrary"?T=V.modifier.value:E(V.modifier.value)&&(T=`${V.modifier.value}%`)),!V.value){let j=r.get(["--inset-shadow"]);return j===null?void 0:[h(),l("--tw-inset-shadow-alpha",T),...ue("--tw-inset-shadow",j,T,oe=>`var(--tw-inset-shadow-color, ${oe})`),l("box-shadow",o)]}if(V.value.kind==="arbitrary"){let j=V.value.value;switch(V.value.dataType??J(j,["color"])){case"color":return j=X(j,V.modifier,r),j===null?void 0:[h(),l("--tw-inset-shadow-color",Q(j,"var(--tw-inset-shadow-alpha)"))];default:return[h(),l("--tw-inset-shadow-alpha",T),...ue("--tw-inset-shadow",j,T,ot=>`var(--tw-inset-shadow-color, ${ot})`,"inset "),l("box-shadow",o)]}}switch(V.value.value){case"none":return V.modifier?void 0:[h(),l("--tw-inset-shadow",p),l("box-shadow",o)];case"inherit":return V.modifier?void 0:[h(),l("--tw-inset-shadow-color","inherit")]}{let j=r.get([`--inset-shadow-${V.value.value}`]);if(j)return[h(),l("--tw-inset-shadow-alpha",T),...ue("--tw-inset-shadow",j,T,oe=>`var(--tw-inset-shadow-color, ${oe})`),l("box-shadow",o)]}{let j=te(V,r,["--box-shadow-color","--color"]);if(j)return[h(),l("--tw-inset-shadow-color",Q(j,"var(--tw-inset-shadow-alpha)"))]}}),i("inset-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["none"]},{valueThemeKeys:["--inset-shadow"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`),hasDefaultValue:r.get(["--inset-shadow"])!==null}]),e("ring-inset",[h,["--tw-ring-inset","inset"]]);let A=r.get(["--default-ring-color"])??"currentcolor";t.functional("ring",V=>{if(!V.value){if(V.modifier)return;let T=r.get(["--default-ring-width"])??"1px";return[h(),l("--tw-ring-shadow",y(T)),l("box-shadow",o)]}if(V.value.kind==="arbitrary"){let T=V.value.value;switch(V.value.dataType??J(T,["color","length"])){case"length":return V.modifier?void 0:[h(),l("--tw-ring-shadow",y(T)),l("box-shadow",o)];default:return T=X(T,V.modifier,r),T===null?void 0:[l("--tw-ring-color",T)]}}{let T=te(V,r,["--ring-color","--color"]);if(T)return[l("--tw-ring-color",T)]}{if(V.modifier)return;let T=r.resolve(V.value.value,["--ring-width"]);if(T===null&&E(V.value.value)&&(T=`${V.value.value}px`),T)return[h(),l("--tw-ring-shadow",y(T)),l("box-shadow",o)]}}),i("ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]),t.functional("inset-ring",V=>{if(!V.value)return V.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C("1px")),l("box-shadow",o)];if(V.value.kind==="arbitrary"){let T=V.value.value;switch(V.value.dataType??J(T,["color","length"])){case"length":return V.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C(T)),l("box-shadow",o)];default:return T=X(T,V.modifier,r),T===null?void 0:[l("--tw-inset-ring-color",T)]}}{let T=te(V,r,["--ring-color","--color"]);if(T)return[l("--tw-inset-ring-color",T)]}{if(V.modifier)return;let T=r.resolve(V.value.value,["--ring-width"]);if(T===null&&E(V.value.value)&&(T=`${V.value.value}px`),T)return[h(),l("--tw-inset-ring-shadow",C(T)),l("box-shadow",o)]}}),i("inset-ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},(V,T)=>`${T*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]);let O="var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";t.functional("ring-offset",V=>{if(V.value){if(V.value.kind==="arbitrary"){let T=V.value.value;switch(V.value.dataType??J(T,["color","length"])){case"length":return V.modifier?void 0:[l("--tw-ring-offset-width",T),l("--tw-ring-offset-shadow",O)];default:return T=X(T,V.modifier,r),T===null?void 0:[l("--tw-ring-offset-color",T)]}}{let T=r.resolve(V.value.value,["--ring-offset-width"]);if(T)return V.modifier?void 0:[l("--tw-ring-offset-width",T),l("--tw-ring-offset-shadow",O)];if(E(V.value.value))return V.modifier?void 0:[l("--tw-ring-offset-width",`${V.value.value}px`),l("--tw-ring-offset-shadow",O)]}{let T=te(V,r,["--ring-offset-color","--color"]);if(T)return[l("--tw-ring-offset-color",T)]}}})}return i("ring-offset",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-offset-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-offset-width"]}]),t.functional("@container",o=>{let p=null;if(o.value===null?p="inline-size":o.value.kind==="arbitrary"?p=o.value.value:o.value.kind==="named"&&o.value.value==="normal"&&(p="normal"),p!==null)return o.modifier?[l("container-type",p),l("container-name",o.modifier.value)]:[l("container-type",p)]}),i("@container",()=>[{values:["normal"],valueThemeKeys:[],hasDefaultValue:!0}]),t}var bt=["number","integer","ratio","percentage"];function pr(r){let t=r.params;return $i.test(t)?i=>{let e={"--value":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set},"--modifier":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set}};F(r.nodes,n=>{if(n.kind!=="declaration"||!n.value||!n.value.includes("--value(")&&!n.value.includes("--modifier("))return;let s=q(n.value);ee(s,a=>{if(a.kind!=="function")return;if(a.value==="--spacing"&&!(e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return ee(a.nodes,u=>{if(u.kind!=="function"||u.value!=="--value"&&u.value!=="--modifier")return;let f=u.value;for(let g of u.nodes)if(g.kind==="word"){if(g.value==="integer")e[f].usedSpacingInteger||=!0;else if(g.value==="number"&&(e[f].usedSpacingNumber||=!0,e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return 2}}),0;if(a.value!=="--value"&&a.value!=="--modifier")return;let c=D(Y(a.nodes),",");for(let[u,f]of c.entries())f=f.replace(/\\\*/g,"*"),f=f.replace(/--(.*?)\s--(.*?)/g,"--$1-*--$2"),f=f.replace(/\s+/g,""),f=f.replace(/(-\*){2,}/g,"-*"),f[0]==="-"&&f[1]==="-"&&!f.includes("-*")&&(f+="-*"),c[u]=f;a.nodes=q(c.join(","));for(let u of a.nodes)if(u.kind==="word"&&(u.value[0]==='"'||u.value[0]==="'")&&u.value[0]===u.value[u.value.length-1]){let f=u.value.slice(1,-1);e[a.value].literals.add(f)}else if(u.kind==="word"&&u.value[0]==="-"&&u.value[1]==="-"){let f=u.value.replace(/-\*.*$/g,"");e[a.value].themeKeys.add(f)}else if(u.kind==="word"&&!(u.value[0]==="["&&u.value[u.value.length-1]==="]")&&!bt.includes(u.value)){console.warn(`Unsupported bare value data type: "${u.value}". +Only valid data types are: ${bt.map(x=>`"${x}"`).join(", ")}. +`);let f=u.value,g=structuredClone(a),d="\xB6";ee(g.nodes,(x,{replaceWith:k})=>{x.kind==="word"&&x.value===f&&k({kind:"word",value:d})});let m="^".repeat(Y([u]).length),w=Y([g]).indexOf(d),v=["```css",Y([a])," ".repeat(w)+m,"```"].join(` +`);console.warn(v)}}),n.value=Y(s)}),i.utilities.functional(t.slice(0,-2),n=>{let s=structuredClone(r),a=n.value,c=n.modifier;if(a===null)return;let u=!1,f=!1,g=!1,d=!1,m=new Map,w=!1;if(F([s],(v,{parent:x,replaceWith:k})=>{if(x?.kind!=="rule"&&x?.kind!=="at-rule"||v.kind!=="declaration"||!v.value)return;let N=q(v.value);(ee(N,(S,{replaceWith:P})=>{if(S.kind==="function"){if(S.value==="--value"){u=!0;let U=sr(a,S,i);return U?(f=!0,U.ratio?w=!0:m.set(v,x),P(U.nodes),1):(u||=!1,k([]),2)}else if(S.value==="--modifier"){if(c===null)return k([]),2;g=!0;let U=sr(c,S,i);return U?(d=!0,P(U.nodes),1):(g||=!1,k([]),2)}}})??0)===0&&(v.value=Y(N))}),u&&!f||g&&!d||w&&d||c&&!w&&!d)return null;if(w)for(let[v,x]of m){let k=x.nodes.indexOf(v);k!==-1&&x.nodes.splice(k,1)}return s.nodes}),i.utilities.suggest(t.slice(0,-2),()=>{let n=[],s=[];for(let[a,{literals:c,usedSpacingNumber:u,usedSpacingInteger:f,themeKeys:g}]of[[n,e["--value"]],[s,e["--modifier"]]]){for(let d of c)a.push(d);if(u)a.push(...Ze);else if(f)for(let d of Ze)E(d)&&a.push(d);for(let d of i.theme.keysInNamespaces(g))a.push(d.replace(fr,(m,w,v)=>`${w}.${v}`))}return[{values:n,modifiers:s}]})}:Ci.test(t)?i=>{i.utilities.static(t,()=>structuredClone(r.nodes))}:null}function sr(r,t,i){for(let e of t.nodes){if(r.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===r.value)return{nodes:q(r.value)};if(r.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let n=e.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(r.value,[n]);if(s)return{nodes:q(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let a=[s.shift()],c=i.theme.resolveWith(r.value,a,s);if(c){let[,u={}]=c;{let f=u[s.pop()];if(f)return{nodes:q(f)}}}}}else if(r.kind==="named"&&e.kind==="word"){if(!bt.includes(e.value))continue;let n=e.value==="ratio"&&"fraction"in r?r.fraction:r.value;if(!n)continue;let s=J(n,[e.value]);if(s===null)continue;if(s==="ratio"){let[a,c]=D(n,"/");if(!E(a)||!E(c))continue}else{if(s==="number"&&!de(n))continue;if(s==="percentage"&&!E(n.slice(0,-1)))continue}return{nodes:q(n),ratio:s==="ratio"}}else if(r.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let n=e.value.slice(1,-1);if(n==="*")return{nodes:q(r.value)};if("dataType"in r&&r.dataType&&r.dataType!==n)continue;if("dataType"in r&&r.dataType)return{nodes:q(r.value)};if(J(r.value,[n])!==null)return{nodes:q(r.value)}}}}function ue(r,t,i,e,n=""){let s=!1,a=Ee(t,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(ur(u,i))));function c(u){return n?D(u,",").map(f=>n+f).join(","):u}return s?[l(r,c(Ee(t,e))),H("@supports (color: lab(from red l a b))",[l(r,c(a))])]:[l(r,c(a))]}function Ye(r,t,i,e,n=""){let s=!1,a=D(t,",").map(c=>Ee(c,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(ur(u,i))))).map(c=>`drop-shadow(${c})`).join(" ");return s?[l(r,n+D(t,",").map(c=>`drop-shadow(${Ee(c,e)})`).join(" ")),H("@supports (color: lab(from red l a b))",[l(r,n+a)])]:[l(r,n+a)]}var kt={"--alpha":Vi,"--spacing":Ni,"--theme":Si,theme:Ti};function Vi(r,t,i,...e){let[n,s]=D(i,"/").map(a=>a.trim());if(!n||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);if(e.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);return Q(n,s)}function Ni(r,t,i,...e){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(e.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${e.length+1}.`);let n=r.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function Si(r,t,i,...e){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),t.kind==="at-rule"&&(n=!0);let s=r.resolveThemeValue(i,n);if(!s){if(e.length>0)return e.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(e.length===0)return s;let a=e.join(", ");if(a==="initial")return s;if(s==="initial")return a;if(s.startsWith("var(")||s.startsWith("theme(")||s.startsWith("--theme(")){let c=q(s);return Pi(c,a),Y(c)}return s}function Ti(r,t,i,...e){i=Ei(i);let n=r.resolveThemeValue(i);if(!n&&e.length>0)return e.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var dr=new RegExp(Object.keys(kt).map(r=>`${r}\\(`).join("|"));function xe(r,t){let i=0;return F(r,e=>{if(e.kind==="declaration"&&e.value&&dr.test(e.value)){i|=8,e.value=mr(e.value,e,t);return}e.kind==="at-rule"&&(e.name==="@media"||e.name==="@custom-media"||e.name==="@container"||e.name==="@supports")&&dr.test(e.params)&&(i|=8,e.params=mr(e.params,e,t))}),i}function mr(r,t,i){let e=q(r);return ee(e,(n,{replaceWith:s})=>{if(n.kind==="function"&&n.value in kt){let a=D(Y(n.nodes).trim(),",").map(u=>u.trim()),c=kt[n.value](i,t,...a);return s(q(c))}}),Y(e)}function Ei(r){if(r[0]!=="'"&&r[0]!=='"')return r;let t="",i=r[0];for(let e=1;e{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${t}`});else{let e=i.nodes[i.nodes.length-1];e.kind==="word"&&e.value==="initial"&&(e.value=t)}})}function Qe(r,t){let i=r.length,e=t.length,n=i=48&&a<=57&&c>=48&&c<=57){let u=s,f=s+1,g=s,d=s+1;for(a=r.charCodeAt(f);a>=48&&a<=57;)a=r.charCodeAt(++f);for(c=t.charCodeAt(d);c>=48&&c<=57;)c=t.charCodeAt(++d);let m=r.slice(u,f),w=t.slice(g,d),v=Number(m)-Number(w);if(v)return v;if(mw)return 1;continue}if(a!==c)return a-c}return r.length-t.length}var Ri=/^\d+\/\d+$/;function gr(r){let t=new B(n=>({name:n,utility:n,fraction:!1,modifiers:[]}));for(let n of r.utilities.keys("static")){let s=t.get(n);s.fraction=!1,s.modifiers=[]}for(let n of r.utilities.keys("functional")){let s=r.utilities.getCompletions(n);for(let a of s)for(let c of a.values){let u=c!==null&&Ri.test(c),f=c===null?n:`${n}-${c}`,g=t.get(f);if(g.utility=n,g.fraction||=u,g.modifiers.push(...a.modifiers),a.supportsNegative){let d=t.get(`-${f}`);d.utility=`-${n}`,d.fraction||=u,d.modifiers.push(...a.modifiers)}}}if(t.size===0)return[];let i=Array.from(t.values());return i.sort((n,s)=>Qe(n.name,s.name)),Oi(i)}function Oi(r){let t=[],i=null,e=new Map,n=new B(()=>[]);for(let a of r){let{utility:c,fraction:u}=a;i||(i={utility:c,items:[]},e.set(c,i)),c!==i.utility&&(t.push(i),i={utility:c,items:[]},e.set(c,i)),u?n.get(c).push(a):i.items.push(a)}i&&t[t.length-1]!==i&&t.push(i);for(let[a,c]of n){let u=e.get(a);u&&u.items.push(...c)}let s=[];for(let a of t)for(let c of a.items)s.push([c.name,{modifiers:c.modifiers}]);return s}function hr(r){let t=[];for(let[e,n]of r.variants.entries()){let c=function({value:u,modifier:f}={}){let g=e;u&&(g+=s?`-${u}`:u),f&&(g+=`/${f}`);let d=r.parseVariant(g);if(!d)return[];let m=M(".__placeholder__",[]);if(Ae(m,d,r.variants)===null)return[];let w=[];return Ge(m.nodes,(v,{path:x})=>{if(v.kind!=="rule"&&v.kind!=="at-rule"||v.nodes.length>0)return;x.sort((b,S)=>{let P=b.kind==="at-rule",U=S.kind==="at-rule";return P&&!U?-1:!P&&U?1:0});let k=x.flatMap(b=>b.kind==="rule"?b.selector==="&"?[]:[b.selector]:b.kind==="at-rule"?[`${b.name} ${b.params}`]:[]),N="";for(let b=k.length-1;b>=0;b--)N=N===""?k[b]:`${k[b]} { ${N} }`;w.push(N)}),w};var i=c;if(n.kind==="arbitrary")continue;let s=e!=="@",a=r.variants.getCompletions(e);switch(n.kind){case"static":{t.push({name:e,values:a,isArbitrary:!1,hasDash:s,selectors:c});break}case"functional":{t.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:c});break}case"compound":{t.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:c});break}}}return t}function vr(r,t){let{astNodes:i,nodeSorting:e}=pe(Array.from(t),r),n=new Map(t.map(a=>[a,null])),s=0n;for(let a of i){let c=e.get(a)?.candidate;c&&n.set(c,n.get(c)??s++)}return t.map(a=>[a,n.get(a)??null])}var Xe=/^@?[a-zA-Z0-9_-]*$/;var xt=class{compareFns=new Map;variants=new Map;completions=new Map;groupOrder=null;lastOrder=0;static(t,i,{compounds:e,order:n}={}){this.set(t,{kind:"static",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}fromAst(t,i){let e=[];F(i,n=>{n.kind==="rule"?e.push(n.selector):n.kind==="at-rule"&&n.name!=="@slot"&&e.push(`${n.name} ${n.params}`)}),this.static(t,n=>{let s=structuredClone(i);At(s,n.nodes),n.nodes=s},{compounds:ye(e)})}functional(t,i,{compounds:e,order:n}={}){this.set(t,{kind:"functional",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}compound(t,i,e,{compounds:n,order:s}={}){this.set(t,{kind:"compound",applyFn:e,compoundsWith:i,compounds:n??2,order:s})}group(t,i){this.groupOrder=this.nextOrder(),i&&this.compareFns.set(this.groupOrder,i),t(),this.groupOrder=null}has(t){return this.variants.has(t)}get(t){return this.variants.get(t)}kind(t){return this.variants.get(t)?.kind}compoundsWith(t,i){let e=this.variants.get(t),n=typeof i=="string"?this.variants.get(i):i.kind==="arbitrary"?{compounds:ye([i.selector])}:this.variants.get(i.root);return!(!e||!n||e.kind!=="compound"||n.compounds===0||e.compoundsWith===0||(e.compoundsWith&n.compounds)===0)}suggest(t,i){this.completions.set(t,i)}getCompletions(t){return this.completions.get(t)?.()??[]}compare(t,i){if(t===i)return 0;if(t===null)return-1;if(i===null)return 1;if(t.kind==="arbitrary"&&i.kind==="arbitrary")return t.selector{m.nodes=g.map(w=>H(w,m.nodes))},{compounds:d})}i("*",[":is(& > *)"],{compounds:0}),i("**",[":is(& *)"],{compounds:0});function e(f,g){return g.map(d=>{d=d.trim();let m=D(d," ");return m[0]==="not"?m.slice(1).join(" "):f==="@container"?m[0][0]==="("?`not ${d}`:m[1]==="not"?`${m[0]} ${m.slice(2).join(" ")}`:`${m[0]} not ${m.slice(1).join(" ")}`:`not ${d}`})}let n=["@media","@supports","@container"];function s(f){for(let g of n){if(g!==f.name)continue;let d=D(f.params,",");return d.length>1?null:(d=e(f.name,d),z(f.name,d.join(", ")))}return null}function a(f){return f.includes("::")?null:`&:not(${D(f,",").map(d=>(d=d.replaceAll("&","*"),d)).join(", ")})`}t.compound("not",3,(f,g)=>{if(g.variant.kind==="arbitrary"&&g.variant.relative||g.modifier)return null;let d=!1;if(F([f],(m,{path:w})=>{if(m.kind!=="rule"&&m.kind!=="at-rule")return 0;if(m.nodes.length>0)return 0;let v=[],x=[];for(let N of w)N.kind==="at-rule"?v.push(N):N.kind==="rule"&&x.push(N);if(v.length>1)return 2;if(x.length>1)return 2;let k=[];for(let N of x){let b=a(N.selector);if(!b)return d=!1,2;k.push(M(b,[]))}for(let N of v){let b=s(N);if(!b)return d=!1,2;k.push(b)}return Object.assign(f,M("&",k)),d=!0,1}),f.kind==="rule"&&f.selector==="&"&&f.nodes.length===1&&Object.assign(f,f.nodes[0]),!d)return null}),t.suggest("not",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("not",f))),t.compound("group",2,(f,g)=>{if(g.variant.kind==="arbitrary"&&g.variant.relative)return null;let d=g.modifier?`:where(.${r.prefix?`${r.prefix}\\:`:""}group\\/${g.modifier.value})`:`:where(.${r.prefix?`${r.prefix}\\:`:""}group)`,m=!1;if(F([f],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let k of v.slice(0,-1))if(k.kind==="rule")return m=!1,2;let x=w.selector.replaceAll("&",d);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} *)`,m=!0}),!m)return null}),t.suggest("group",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("group",f))),t.compound("peer",2,(f,g)=>{if(g.variant.kind==="arbitrary"&&g.variant.relative)return null;let d=g.modifier?`:where(.${r.prefix?`${r.prefix}\\:`:""}peer\\/${g.modifier.value})`:`:where(.${r.prefix?`${r.prefix}\\:`:""}peer)`,m=!1;if(F([f],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let k of v.slice(0,-1))if(k.kind==="rule")return m=!1,2;let x=w.selector.replaceAll("&",d);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} ~ *)`,m=!0}),!m)return null}),t.suggest("peer",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("peer",f))),i("first-letter",["&::first-letter"]),i("first-line",["&::first-line"]),i("marker",["& *::marker","&::marker","& *::-webkit-details-marker","&::-webkit-details-marker"]),i("selection",["& *::selection","&::selection"]),i("file",["&::file-selector-button"]),i("placeholder",["&::placeholder"]),i("backdrop",["&::backdrop"]),i("details-content",["&::details-content"]);{let f=function(){return L([z("@property","--tw-content",[l("syntax",'"*"'),l("initial-value",'""'),l("inherits","false")])])};var c=f;t.static("before",g=>{g.nodes=[M("&::before",[f(),l("content","var(--tw-content)"),...g.nodes])]},{compounds:0}),t.static("after",g=>{g.nodes=[M("&::after",[f(),l("content","var(--tw-content)"),...g.nodes])]},{compounds:0})}i("first",["&:first-child"]),i("last",["&:last-child"]),i("only",["&:only-child"]),i("odd",["&:nth-child(odd)"]),i("even",["&:nth-child(even)"]),i("first-of-type",["&:first-of-type"]),i("last-of-type",["&:last-of-type"]),i("only-of-type",["&:only-of-type"]),i("visited",["&:visited"]),i("target",["&:target"]),i("open",["&:is([open], :popover-open, :open)"]),i("default",["&:default"]),i("checked",["&:checked"]),i("indeterminate",["&:indeterminate"]),i("placeholder-shown",["&:placeholder-shown"]),i("autofill",["&:autofill"]),i("optional",["&:optional"]),i("required",["&:required"]),i("valid",["&:valid"]),i("invalid",["&:invalid"]),i("user-valid",["&:user-valid"]),i("user-invalid",["&:user-invalid"]),i("in-range",["&:in-range"]),i("out-of-range",["&:out-of-range"]),i("read-only",["&:read-only"]),i("empty",["&:empty"]),i("focus-within",["&:focus-within"]),t.static("hover",f=>{f.nodes=[M("&:hover",[z("@media","(hover: hover)",f.nodes)])]}),i("focus",["&:focus"]),i("focus-visible",["&:focus-visible"]),i("active",["&:active"]),i("enabled",["&:enabled"]),i("disabled",["&:disabled"]),i("inert",["&:is([inert], [inert] *)"]),t.compound("in",2,(f,g)=>{if(g.modifier)return null;let d=!1;if(F([f],(m,{path:w})=>{if(m.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return d=!1,2;m.selector=`:where(${m.selector.replaceAll("&","*")}) &`,d=!0}),!d)return null}),t.suggest("in",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("in",f))),t.compound("has",2,(f,g)=>{if(g.modifier)return null;let d=!1;if(F([f],(m,{path:w})=>{if(m.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return d=!1,2;m.selector=`&:has(${m.selector.replaceAll("&","*")})`,d=!0}),!d)return null}),t.suggest("has",()=>Array.from(t.keys()).filter(f=>t.compoundsWith("has",f))),t.functional("aria",(f,g)=>{if(!g.value||g.modifier)return null;g.value.kind==="arbitrary"?f.nodes=[M(`&[aria-${wr(g.value.value)}]`,f.nodes)]:f.nodes=[M(`&[aria-${g.value.value}="true"]`,f.nodes)]}),t.suggest("aria",()=>["busy","checked","disabled","expanded","hidden","pressed","readonly","required","selected"]),t.functional("data",(f,g)=>{if(!g.value||g.modifier)return null;f.nodes=[M(`&[data-${wr(g.value.value)}]`,f.nodes)]}),t.functional("nth",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-child(${g.value.value})`,f.nodes)]}),t.functional("nth-last",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-last-child(${g.value.value})`,f.nodes)]}),t.functional("nth-of-type",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-of-type(${g.value.value})`,f.nodes)]}),t.functional("nth-last-of-type",(f,g)=>{if(!g.value||g.modifier||g.value.kind==="named"&&!E(g.value.value))return null;f.nodes=[M(`&:nth-last-of-type(${g.value.value})`,f.nodes)]}),t.functional("supports",(f,g)=>{if(!g.value||g.modifier)return null;let d=g.value.value;if(d===null)return null;if(/^[\w-]*\s*\(/.test(d)){let m=d.replace(/\b(and|or|not)\b/g," $1 ");f.nodes=[z("@supports",m,f.nodes)];return}d.includes(":")||(d=`${d}: var(--tw)`),(d[0]!=="("||d[d.length-1]!==")")&&(d=`(${d})`),f.nodes=[z("@supports",d,f.nodes)]},{compounds:1}),i("motion-safe",["@media (prefers-reduced-motion: no-preference)"]),i("motion-reduce",["@media (prefers-reduced-motion: reduce)"]),i("contrast-more",["@media (prefers-contrast: more)"]),i("contrast-less",["@media (prefers-contrast: less)"]);{let f=function(g,d,m,w){if(g===d)return 0;let v=w.get(g);if(v===null)return m==="asc"?-1:1;let x=w.get(d);return x===null?m==="asc"?1:-1:we(v,x,m)};var u=f;{let g=r.namespace("--breakpoint"),d=new B(m=>{switch(m.kind){case"static":return r.resolveValue(m.root,["--breakpoint"])??null;case"functional":{if(!m.value||m.modifier)return null;let w=null;return m.value.kind==="arbitrary"?w=m.value.value:m.value.kind==="named"&&(w=r.resolveValue(m.value.value,["--breakpoint"])),!w||w.includes("var(")?null:w}case"arbitrary":case"compound":return null}});t.group(()=>{t.functional("max",(m,w)=>{if(w.modifier)return null;let v=d.get(w);if(v===null)return null;m.nodes=[z("@media",`(width < ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"desc",d)),t.suggest("max",()=>Array.from(g.keys()).filter(m=>m!==null)),t.group(()=>{for(let[m,w]of r.namespace("--breakpoint"))m!==null&&t.static(m,v=>{v.nodes=[z("@media",`(width >= ${w})`,v.nodes)]},{compounds:1});t.functional("min",(m,w)=>{if(w.modifier)return null;let v=d.get(w);if(v===null)return null;m.nodes=[z("@media",`(width >= ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"asc",d)),t.suggest("min",()=>Array.from(g.keys()).filter(m=>m!==null))}{let g=r.namespace("--container"),d=new B(m=>{switch(m.kind){case"functional":{if(m.value===null)return null;let w=null;return m.value.kind==="arbitrary"?w=m.value.value:m.value.kind==="named"&&(w=r.resolveValue(m.value.value,["--container"])),!w||w.includes("var(")?null:w}case"static":case"arbitrary":case"compound":return null}});t.group(()=>{t.functional("@max",(m,w)=>{let v=d.get(w);if(v===null)return null;m.nodes=[z("@container",w.modifier?`${w.modifier.value} (width < ${v})`:`(width < ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"desc",d)),t.suggest("@max",()=>Array.from(g.keys()).filter(m=>m!==null)),t.group(()=>{t.functional("@",(m,w)=>{let v=d.get(w);if(v===null)return null;m.nodes=[z("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,m.nodes)]},{compounds:1}),t.functional("@min",(m,w)=>{let v=d.get(w);if(v===null)return null;m.nodes=[z("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,m.nodes)]},{compounds:1})},(m,w)=>f(m,w,"asc",d)),t.suggest("@min",()=>Array.from(g.keys()).filter(m=>m!==null)),t.suggest("@",()=>Array.from(g.keys()).filter(m=>m!==null))}}return i("portrait",["@media (orientation: portrait)"]),i("landscape",["@media (orientation: landscape)"]),i("ltr",['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']),i("rtl",['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']),i("dark",["@media (prefers-color-scheme: dark)"]),i("starting",["@starting-style"]),i("print",["@media print"]),i("forced-colors",["@media (forced-colors: active)"]),i("inverted-colors",["@media (inverted-colors: inverted)"]),i("pointer-none",["@media (pointer: none)"]),i("pointer-coarse",["@media (pointer: coarse)"]),i("pointer-fine",["@media (pointer: fine)"]),i("any-pointer-none",["@media (any-pointer: none)"]),i("any-pointer-coarse",["@media (any-pointer: coarse)"]),i("any-pointer-fine",["@media (any-pointer: fine)"]),i("noscript",["@media (scripting: none)"]),t}function wr(r){if(r.includes("=")){let[t,...i]=D(r,"="),e=i.join("=").trim();if(e[0]==="'"||e[0]==='"')return r;if(e.length>1){let n=e[e.length-1];if(e[e.length-2]===" "&&(n==="i"||n==="I"||n==="s"||n==="S"))return`${t}="${e.slice(0,-2)}" ${n}`}return`${t}="${e}"`}return r}function At(r,t){F(r,(i,{replaceWith:e})=>{if(i.kind==="at-rule"&&i.name==="@slot")e(t);else if(i.kind==="at-rule"&&(i.name==="@keyframes"||i.name==="@property"))return Object.assign(i,L([z(i.name,i.params,i.nodes)])),1})}function br(r){let t=cr(r),i=yr(r),e=new B(u=>ir(u,c)),n=new B(u=>Array.from(rr(u,c))),s=new B(u=>{let f=kr(u,c);try{xe(f.map(({node:g})=>g),c)}catch{return[]}return f}),a=new B(u=>{for(let f of qe(u))r.markUsedVariable(f)}),c={theme:r,utilities:t,variants:i,invalidCandidates:new Set,important:!1,candidatesToCss(u){let f=[];for(let g of u){let d=!1,{astNodes:m}=pe([g],this,{onInvalidCandidate(){d=!0}});m=ve(m,c,0),m.length===0||d?f.push(null):f.push(ne(m))}return f},getClassOrder(u){return vr(this,u)},getClassList(){return gr(this)},getVariants(){return hr(this)},parseCandidate(u){return n.get(u)},parseVariant(u){return e.get(u)},compileAstNodes(u){return s.get(u)},printCandidate(u){return or(c,u)},printVariant(u){return He(u)},getVariantOrder(){let u=Array.from(e.values());u.sort((m,w)=>this.variants.compare(m,w));let f=new Map,g,d=0;for(let m of u)m!==null&&(g!==void 0&&this.variants.compare(g,m)!==0&&d++,f.set(m,d),g=m);return f},resolveThemeValue(u,f=!0){let g=u.lastIndexOf("/"),d=null;g!==-1&&(d=u.slice(g+1).trim(),u=u.slice(0,g).trim());let m=r.resolve(null,[u],f?1:0)??void 0;return d&&m?Q(m,d):m},trackUsedVariables(u){a.get(u)}};return c}var Ct=["container-type","pointer-events","visibility","position","inset","inset-inline","inset-block","inset-inline-start","inset-inline-end","top","right","bottom","left","isolation","z-index","order","grid-column","grid-column-start","grid-column-end","grid-row","grid-row-start","grid-row-end","float","clear","--tw-container-component","margin","margin-inline","margin-block","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left","box-sizing","display","field-sizing","aspect-ratio","height","max-height","min-height","width","max-width","min-width","flex","flex-shrink","flex-grow","flex-basis","table-layout","caption-side","border-collapse","border-spacing","transform-origin","translate","--tw-translate-x","--tw-translate-y","--tw-translate-z","scale","--tw-scale-x","--tw-scale-y","--tw-scale-z","rotate","--tw-rotate-x","--tw-rotate-y","--tw-rotate-z","--tw-skew-x","--tw-skew-y","transform","animation","cursor","touch-action","--tw-pan-x","--tw-pan-y","--tw-pinch-zoom","resize","scroll-snap-type","--tw-scroll-snap-strictness","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-margin-inline","scroll-margin-block","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-padding","scroll-padding-inline","scroll-padding-block","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","list-style-position","list-style-type","list-style-image","appearance","columns","break-before","break-inside","break-after","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-template-columns","grid-template-rows","flex-direction","flex-wrap","place-content","place-items","align-content","align-items","justify-content","justify-items","gap","column-gap","row-gap","--tw-space-x-reverse","--tw-space-y-reverse","divide-x-width","divide-y-width","--tw-divide-y-reverse","divide-style","divide-color","place-self","align-self","justify-self","overflow","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-behavior","border-radius","border-start-radius","border-end-radius","border-top-radius","border-right-radius","border-bottom-radius","border-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-width","border-inline-width","border-block-width","border-inline-start-width","border-inline-end-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-inline-style","border-block-style","border-inline-start-style","border-inline-end-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-inline-color","border-block-color","border-inline-start-color","border-inline-end-color","border-top-color","border-right-color","border-bottom-color","border-left-color","background-color","background-image","--tw-gradient-position","--tw-gradient-stops","--tw-gradient-via-stops","--tw-gradient-from","--tw-gradient-from-position","--tw-gradient-via","--tw-gradient-via-position","--tw-gradient-to","--tw-gradient-to-position","mask-image","--tw-mask-top","--tw-mask-top-from-color","--tw-mask-top-from-position","--tw-mask-top-to-color","--tw-mask-top-to-position","--tw-mask-right","--tw-mask-right-from-color","--tw-mask-right-from-position","--tw-mask-right-to-color","--tw-mask-right-to-position","--tw-mask-bottom","--tw-mask-bottom-from-color","--tw-mask-bottom-from-position","--tw-mask-bottom-to-color","--tw-mask-bottom-to-position","--tw-mask-left","--tw-mask-left-from-color","--tw-mask-left-from-position","--tw-mask-left-to-color","--tw-mask-left-to-position","--tw-mask-linear","--tw-mask-linear-position","--tw-mask-linear-from-color","--tw-mask-linear-from-position","--tw-mask-linear-to-color","--tw-mask-linear-to-position","--tw-mask-radial","--tw-mask-radial-shape","--tw-mask-radial-size","--tw-mask-radial-position","--tw-mask-radial-from-color","--tw-mask-radial-from-position","--tw-mask-radial-to-color","--tw-mask-radial-to-position","--tw-mask-conic","--tw-mask-conic-position","--tw-mask-conic-from-color","--tw-mask-conic-from-position","--tw-mask-conic-to-color","--tw-mask-conic-to-position","box-decoration-break","background-size","background-attachment","background-clip","background-position","background-repeat","background-origin","mask-composite","mask-mode","mask-type","mask-size","mask-clip","mask-position","mask-repeat","mask-origin","fill","stroke","stroke-width","object-fit","object-position","padding","padding-inline","padding-block","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left","text-align","text-indent","vertical-align","font-family","font-size","line-height","font-weight","letter-spacing","text-wrap","overflow-wrap","word-break","text-overflow","hyphens","white-space","color","text-transform","font-style","font-stretch","font-variant-numeric","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","-webkit-font-smoothing","placeholder-color","caret-color","accent-color","color-scheme","opacity","background-blend-mode","mix-blend-mode","box-shadow","--tw-shadow","--tw-shadow-color","--tw-ring-shadow","--tw-ring-color","--tw-inset-shadow","--tw-inset-shadow-color","--tw-inset-ring-shadow","--tw-inset-ring-color","--tw-ring-offset-width","--tw-ring-offset-color","outline","outline-width","outline-offset","outline-color","--tw-blur","--tw-brightness","--tw-contrast","--tw-drop-shadow","--tw-grayscale","--tw-hue-rotate","--tw-invert","--tw-saturate","--tw-sepia","filter","--tw-backdrop-blur","--tw-backdrop-brightness","--tw-backdrop-contrast","--tw-backdrop-grayscale","--tw-backdrop-hue-rotate","--tw-backdrop-invert","--tw-backdrop-opacity","--tw-backdrop-saturate","--tw-backdrop-sepia","backdrop-filter","transition-property","transition-behavior","transition-delay","transition-duration","transition-timing-function","will-change","contain","content","forced-color-adjust"];function pe(r,t,{onInvalidCandidate:i}={}){let e=new Map,n=[],s=new Map;for(let c of r){if(t.invalidCandidates.has(c)){i?.(c);continue}let u=t.parseCandidate(c);if(u.length===0){i?.(c);continue}s.set(c,u)}let a=t.getVariantOrder();for(let[c,u]of s){let f=!1;for(let g of u){let d=t.compileAstNodes(g);if(d.length!==0){f=!0;for(let{node:m,propertySort:w}of d){let v=0n;for(let x of g.variants)v|=1n<{let f=e.get(c),g=e.get(u);if(f.variants-g.variants!==0n)return Number(f.variants-g.variants);let d=0;for(;d1)return null;for(let u of a.nodes)if(u.kind!=="rule"&&u.kind!=="at-rule"||n(u,t)===null)return null;F(a.nodes,u=>{if((u.kind==="rule"||u.kind==="at-rule")&&u.nodes.length<=0)return u.nodes=r.nodes,1}),r.nodes=a.nodes;return}if(n(r,t)===null)return null}function xr(r){let t=r.options?.types??[];return t.length>1&&t.includes("any")}function Ki(r,t){if(r.kind==="arbitrary"){let a=r.value;return r.modifier&&(a=X(a,r.modifier,t.theme)),a===null?[]:[[l(r.property,a)]]}let i=t.utilities.get(r.root)??[],e=[],n=i.filter(a=>!xr(a));for(let a of n){if(a.kind!==r.kind)continue;let c=a.compileFn(r);if(c!==void 0){if(c===null)return e;e.push(c)}}if(e.length>0)return e;let s=i.filter(a=>xr(a));for(let a of s){if(a.kind!==r.kind)continue;let c=a.compileFn(r);if(c!==void 0){if(c===null)return e;e.push(c)}}return e}function Ar(r){for(let t of r)t.kind!=="at-root"&&(t.kind==="declaration"?t.important=!0:(t.kind==="rule"||t.kind==="at-rule")&&Ar(t.nodes))}function _i(r){let t=new Set,i=0,e=r.slice(),n=!1;for(;e.length>0;){let s=e.shift();if(s.kind==="declaration"){if(s.value===void 0||(i++,n))continue;if(s.property==="--tw-sort"){let c=Ct.indexOf(s.value??"");if(c!==-1){t.add(c),n=!0;continue}}let a=Ct.indexOf(s.property);a!==-1&&t.add(a)}else if(s.kind==="rule"||s.kind==="at-rule")for(let a of s.nodes)e.push(a)}return{order:Array.from(t).sort((s,a)=>s-a),count:i}}function Oe(r,t){let i=0,e=H("&",r),n=new Set,s=new B(()=>new Set),a=new B(()=>new Set);F([e],(d,{parent:m,path:w})=>{if(d.kind==="at-rule"){if(d.name==="@keyframes")return F(d.nodes,v=>{if(v.kind==="at-rule"&&v.name==="@apply")throw new Error("You cannot use `@apply` inside `@keyframes`.")}),1;if(d.name==="@utility"){let v=d.params.replace(/-\*$/,"");a.get(v).add(d),F(d.nodes,x=>{if(!(x.kind!=="at-rule"||x.name!=="@apply")){n.add(d);for(let k of Cr(x,t))s.get(d).add(k)}});return}if(d.name==="@apply"){if(m===null)return;i|=1,n.add(m);for(let v of Cr(d,t))for(let x of w)x!==d&&n.has(x)&&s.get(x).add(v)}}});let c=new Set,u=[],f=new Set;function g(d,m=[]){if(!c.has(d)){if(f.has(d)){let w=m[(m.indexOf(d)+1)%m.length];throw d.kind==="at-rule"&&d.name==="@utility"&&w.kind==="at-rule"&&w.name==="@utility"&&F(d.nodes,v=>{if(v.kind!=="at-rule"||v.name!=="@apply")return;let x=v.params.split(/\s+/g);for(let k of x)for(let N of t.parseCandidate(k))switch(N.kind){case"arbitrary":break;case"static":case"functional":if(w.params.replace(/-\*$/,"")===N.root)throw new Error(`You cannot \`@apply\` the \`${k}\` utility here because it creates a circular dependency.`);break;default:}}),new Error(`Circular dependency detected: + +${ne([d])} +Relies on: + +${ne([w])}`)}f.add(d);for(let w of s.get(d))for(let v of a.get(w))m.push(d),g(v,m),m.pop();c.add(d),f.delete(d),u.push(d)}}for(let d of n)g(d);for(let d of u)"nodes"in d&&F(d.nodes,(m,{replaceWith:w})=>{if(m.kind!=="at-rule"||m.name!=="@apply")return;let v=m.params.split(/(\s+)/g),x={},k=0;for(let[N,b]of v.entries())N%2===0&&(x[b]=k),k+=b.length;{let N=Object.keys(x),b=pe(N,t,{onInvalidCandidate:R=>{if(t.theme.prefix&&!R.startsWith(t.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${R}\`. Did you mean \`${t.theme.prefix}:${R}\`?`);if(t.invalidCandidates.has(R))throw new Error(`Cannot apply utility class \`${R}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let _=D(R,":");if(_.length>1){let K=_.pop();if(t.candidatesToCss([K])[0]){let G=t.candidatesToCss(_.map(W=>`${W}:[--tw-variant-check:1]`)),I=_.filter((W,Z)=>G[Z]===null);if(I.length>0){if(I.length===1)throw new Error(`Cannot apply utility class \`${R}\` because the ${I.map(W=>`\`${W}\``)} variant does not exist.`);{let W=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${R}\` because the ${W.format(I.map(Z=>`\`${Z}\``))} variants do not exist.`)}}}}throw t.theme.size===0?new Error(`Cannot apply unknown utility class \`${R}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${R}\``)}}),S=m.src,P=b.astNodes.map(R=>{let _=b.nodeSorting.get(R)?.candidate,K=_?x[_]:void 0;if(R=structuredClone(R),!S||!_||K===void 0)return F([R],I=>{I.src=S}),R;let G=[S[0],S[1],S[2]];return G[1]+=7+K,G[2]=G[1]+_.length,F([R],I=>{I.src=G}),R}),U=[];for(let R of P)if(R.kind==="rule")for(let _ of R.nodes)U.push(_);else U.push(R);w(U)}});return i}function*Cr(r,t){for(let i of r.params.split(/\s+/g))for(let e of t.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function $t(r,t,i,e=0,n=!1){let s=0,a=[];return F(r,(c,{replaceWith:u})=>{if(c.kind==="at-rule"&&(c.name==="@import"||c.name==="@reference")){let f=ji(q(c.params));if(f===null)return;c.name==="@reference"&&(f.media="reference"),s|=2;let{uri:g,layer:d,media:m,supports:w}=f;if(g.startsWith("data:")||g.startsWith("http://")||g.startsWith("https://"))return;let v=le({},[]);return a.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${g}\` in \`${t}\`)`);let x=await i(g,t),k=me(x.content,{from:n?x.path:void 0});await $t(k,x.base,i,e+1,n),v.nodes=Di(c,[le({base:x.base},k)],d,m,w)})()),u(v),1}}),a.length>0&&await Promise.all(a),s}function ji(r){let t,i=null,e=null,n=null;for(let s=0;s/g,"1")),e[0]==="opacity"&&(typeof n=="number"||typeof n=="string")){let a=typeof n=="string"?parseFloat(n):n;a>=0&&a<=1&&(n=a*100+"%")}let s=et(e);s&&r.theme.add(`--${s}`,""+n,7)}if(Object.hasOwn(t,"fontFamily")){let e=5;{let n=Ce(t.fontFamily.sans);n&&r.theme.hasDefault("--font-sans")&&(r.theme.add("--default-font-family",n,e),r.theme.add("--default-font-feature-settings",Ce(t.fontFamily.sans,"fontFeatureSettings")??"normal",e),r.theme.add("--default-font-variation-settings",Ce(t.fontFamily.sans,"fontVariationSettings")??"normal",e))}{let n=Ce(t.fontFamily.mono);n&&r.theme.hasDefault("--font-mono")&&(r.theme.add("--default-mono-font-family",n,e),r.theme.add("--default-mono-font-feature-settings",Ce(t.fontFamily.mono,"fontFeatureSettings")??"normal",e),r.theme.add("--default-mono-font-variation-settings",Ce(t.fontFamily.mono,"fontVariationSettings")??"normal",e))}}return t}function Ui(r){let t=[];return Vr(r,[],(i,e)=>{if(Fi(i))return t.push([e,i]),1;if(Li(i)){t.push([e,i[0]]);for(let n of Reflect.ownKeys(i[1]))t.push([[...e,`-${n}`],i[1][n]]);return 1}if(Array.isArray(i)&&i.every(n=>typeof n=="string"))return e[0]==="fontSize"?(t.push([e,i[0]]),i.length>=2&&t.push([[...e,"-line-height"],i[1]])):t.push([e,i.join(", ")]),1}),t}var Ii=/^[a-zA-Z0-9-_%/\.]+$/;function et(r){if(r[0]==="container")return null;r=structuredClone(r),r[0]==="animation"&&(r[0]="animate"),r[0]==="aspectRatio"&&(r[0]="aspect"),r[0]==="borderRadius"&&(r[0]="radius"),r[0]==="boxShadow"&&(r[0]="shadow"),r[0]==="colors"&&(r[0]="color"),r[0]==="containers"&&(r[0]="container"),r[0]==="fontFamily"&&(r[0]="font"),r[0]==="fontSize"&&(r[0]="text"),r[0]==="letterSpacing"&&(r[0]="tracking"),r[0]==="lineHeight"&&(r[0]="leading"),r[0]==="maxWidth"&&(r[0]="container"),r[0]==="screens"&&(r[0]="breakpoint"),r[0]==="transitionTimingFunction"&&(r[0]="ease");for(let t of r)if(!Ii.test(t))return null;return r.map((t,i,e)=>t==="1"&&i!==e.length-1?"":t).map(t=>t.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(i,e,n)=>`${e}-${n.toLowerCase()}`)).filter((t,i)=>t!=="DEFAULT"||i!==r.length-1).join("-")}function Fi(r){return typeof r=="number"||typeof r=="string"}function Li(r){if(!Array.isArray(r)||r.length!==2||typeof r[0]!="string"&&typeof r[0]!="number"||r[1]===void 0||r[1]===null||typeof r[1]!="object")return!1;for(let t of Reflect.ownKeys(r[1]))if(typeof t!="string"||typeof r[1][t]!="string"&&typeof r[1][t]!="number")return!1;return!0}function Vr(r,t=[],i){for(let e of Reflect.ownKeys(r)){let n=r[e];if(n==null)continue;let s=[...t,e],a=i(n,s)??0;if(a!==1){if(a===2)return 2;if(!(!Array.isArray(n)&&typeof n!="object")&&Vr(n,s,i)===2)return 2}}}function tt(r){let t=[];for(let i of D(r,".")){if(!i.includes("[")){t.push(i);continue}let e=0;for(;;){let n=i.indexOf("[",e),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>e&&t.push(i.slice(e,n)),t.push(i.slice(n+1,s)),e=s+1}e<=i.length-1&&t.push(i.slice(e))}return t}function $e(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let t=Object.getPrototypeOf(r);return t===null||Object.getPrototypeOf(t)===null}function Ke(r,t,i,e=[]){for(let n of t)if(n!=null)for(let s of Reflect.ownKeys(n)){e.push(s);let a=i(r[s],n[s],e);a!==void 0?r[s]=a:!$e(r[s])||!$e(n[s])?r[s]=n[s]:r[s]=Ke({},[r[s],n[s]],i,e),e.pop()}return r}function rt(r,t,i){return function(n,s){let a=n.lastIndexOf("/"),c=null;a!==-1&&(c=n.slice(a+1).trim(),n=n.slice(0,a).trim());let u=(()=>{let f=tt(n),[g,d]=zi(r.theme,f),m=i(Nr(t()??{},f)??null);if(typeof m=="string"&&(m=m.replace("","1")),typeof g!="object")return typeof d!="object"&&d&4?m??g:g;if(m!==null&&typeof m=="object"&&!Array.isArray(m)){let w=Ke({},[m],(v,x)=>x);if(g===null&&Object.hasOwn(m,"__CSS_VALUES__")){let v={};for(let x in m.__CSS_VALUES__)v[x]=m[x],delete w[x];g=v}for(let v in g)v!=="__CSS_VALUES__"&&(m?.__CSS_VALUES__?.[v]&4&&Nr(w,v.split("-"))!==void 0||(w[ge(v)]=g[v]));return w}if(Array.isArray(g)&&Array.isArray(d)&&Array.isArray(m)){let w=g[0],v=g[1];d[0]&4&&(w=m[0]??w);for(let x of Object.keys(v))d[1][x]&4&&(v[x]=m[1][x]??v[x]);return[w,v]}return g??m})();return c&&typeof u=="string"&&(u=Q(u,c)),u??s}}function zi(r,t){if(t.length===1&&t[0].startsWith("--"))return[r.get([t[0]]),r.getOptions(t[0])];let i=et(t),e=new Map,n=new B(()=>new Map),s=r.namespace(`--${i}`);if(s.size===0)return[null,0];let a=new Map;for(let[g,d]of s){if(!g||!g.includes("--")){e.set(g,d),a.set(g,r.getOptions(g?`--${i}-${g}`:`--${i}`));continue}let m=g.indexOf("--"),w=g.slice(0,m),v=g.slice(m+2);v=v.replace(/-([a-z])/g,(x,k)=>k.toUpperCase()),n.get(w===""?null:w).set(v,[d,r.getOptions(`--${i}${g}`)])}let c=r.getOptions(`--${i}`);for(let[g,d]of n){let m=e.get(g);if(typeof m!="string")continue;let w={},v={};for(let[x,[k,N]]of d)w[x]=k,v[x]=N;e.set(g,[m,w]),a.set(g,[c,v])}let u={},f={};for(let[g,d]of e)Sr(u,[g??"DEFAULT"],d);for(let[g,d]of a)Sr(f,[g??"DEFAULT"],d);return t[t.length-1]==="DEFAULT"?[u?.DEFAULT??null,f.DEFAULT??0]:"DEFAULT"in u&&Object.keys(u).length===1?[u.DEFAULT,f.DEFAULT??0]:(u.__CSS_VALUES__=f,[u,f])}function Nr(r,t){for(let i=0;i0){let m=_e(n);e?e.nodes.push(m):t.push(m),n=""}let u=a,f=a+1;for(;f0){let f=_e(n);u.nodes.push(f),n=""}i.length>0?e=i[i.length-1]:e=null;break}case Yi:case Ji:case Zi:{if(n.length>0){let u=_e(n);e?e.nodes.push(u):t.push(u)}n=String.fromCharCode(c);break}case Kr:{if(n.length>0){let g=_e(n);e?e.nodes.push(g):t.push(g)}n="";let u=a,f=0;for(let g=a+1;g0&&t.push(_e(n)),t}var Fr=/^[a-z@][a-zA-Z0-9/%._-]*$/;function Vt({designSystem:r,ast:t,resolvedConfig:i,featuresRef:e,referenceMode:n}){let s={addBase(a){if(n)return;let c=ae(a);e.current|=xe(c,r),t.push(z("@layer","base",c))},addVariant(a,c){if(!Xe.test(a))throw new Error(`\`addVariant('${a}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(typeof c=="string"){if(c.includes(":merge("))return}else if(Array.isArray(c)){if(c.some(f=>f.includes(":merge(")))return}else if(typeof c=="object"){let f=function(g,d){return Object.entries(g).some(([m,w])=>m.includes(d)||typeof w=="object"&&f(w,d))};var u=f;if(f(c,":merge("))return}typeof c=="string"||Array.isArray(c)?r.variants.static(a,f=>{f.nodes=Lr(c,f.nodes)},{compounds:ye(typeof c=="string"?[c]:c)}):typeof c=="object"&&r.variants.fromAst(a,ae(c))},matchVariant(a,c,u){function f(d,m,w){let v=c(d,{modifier:m?.value??null});return Lr(v,w)}try{let d=c("a",{modifier:null});if(typeof d=="string"&&d.includes(":merge("))return;if(Array.isArray(d)&&d.some(m=>m.includes(":merge(")))return}catch{}let g=Object.keys(u?.values??{});r.variants.group(()=>{r.variants.functional(a,(d,m)=>{if(!m.value){if(u?.values&&"DEFAULT"in u.values){d.nodes=f(u.values.DEFAULT,m.modifier,d.nodes);return}return null}if(m.value.kind==="arbitrary")d.nodes=f(m.value.value,m.modifier,d.nodes);else if(m.value.kind==="named"&&u?.values){let w=u.values[m.value.value];if(typeof w!="string")return;d.nodes=f(w,m.modifier,d.nodes)}})},(d,m)=>{if(d.kind!=="functional"||m.kind!=="functional")return 0;let w=d.value?d.value.value:"DEFAULT",v=m.value?m.value.value:"DEFAULT",x=u?.values?.[w]??w,k=u?.values?.[v]??v;if(u&&typeof u.sort=="function")return u.sort({value:x,modifier:d.modifier?.value??null},{value:k,modifier:m.modifier?.value??null});let N=g.indexOf(w),b=g.indexOf(v);return N=N===-1?g.length:N,b=b===-1?g.length:b,N!==b?N-b:xObject.entries(f));c=c.flatMap(([f,g])=>D(f,",").map(d=>[d.trim(),g]));let u=new B(()=>[]);for(let[f,g]of c){if(f.startsWith("@keyframes ")){n||t.push(H(f,ae(g)));continue}let d=it(f),m=!1;if(je(d,w=>{if(w.kind==="selector"&&w.value[0]==="."&&Fr.test(w.value.slice(1))){let v=w.value;w.value="&";let x=De(d),k=v.slice(1),N=x==="&"?ae(g):[H(x,ae(g))];u.get(k).push(...N),m=!0,w.value=v;return}if(w.kind==="function"&&w.value===":not")return 1}),!m)throw new Error(`\`addUtilities({ '${f}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[f,g]of u)r.theme.prefix&&F(g,d=>{if(d.kind==="rule"){let m=it(d.selector);je(m,w=>{w.kind==="selector"&&w.value[0]==="."&&(w.value=`.${r.theme.prefix}\\:${w.value.slice(1)}`)}),d.selector=De(m)}}),r.utilities.static(f,d=>{let m=structuredClone(g);return zr(m,f,d.raw),e.current|=Oe(m,r),m})},matchUtilities(a,c){let u=c?.type?Array.isArray(c?.type)?c.type:[c.type]:["any"];for(let[g,d]of Object.entries(a)){let m=function({negative:w}){return v=>{if(v.value?.kind==="arbitrary"&&u.length>0&&!u.includes("any")&&(v.value.dataType&&!u.includes(v.value.dataType)||!v.value.dataType&&!J(v.value.value,u)))return;let x=u.includes("color"),k=null,N=!1;{let P=c?.values??{};x&&(P=Object.assign({inherit:"inherit",transparent:"transparent",current:"currentcolor"},P)),v.value?v.value.kind==="arbitrary"?k=v.value.value:v.value.fraction&&P[v.value.fraction]?(k=P[v.value.fraction],N=!0):P[v.value.value]?k=P[v.value.value]:P.__BARE_VALUE__&&(k=P.__BARE_VALUE__(v.value)??null,N=(v.value.fraction!==null&&k?.includes("/"))??!1):k=P.DEFAULT??null}if(k===null)return;let b;{let P=c?.modifiers??null;v.modifier?P==="any"||v.modifier.kind==="arbitrary"?b=v.modifier.value:P?.[v.modifier.value]?b=P[v.modifier.value]:x&&!Number.isNaN(Number(v.modifier.value))?b=`${v.modifier.value}%`:b=null:b=null}if(v.modifier&&b===null&&!N)return v.value?.kind==="arbitrary"?null:void 0;x&&b!==null&&(k=Q(k,b)),w&&(k=`calc(${k} * -1)`);let S=ae(d(k,{modifier:b}));return zr(S,g,v.raw),e.current|=Oe(S,r),S}};var f=m;if(!Fr.test(g))throw new Error(`\`matchUtilities({ '${g}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);c?.supportsNegativeValues&&r.utilities.functional(`-${g}`,m({negative:!0}),{types:u}),r.utilities.functional(g,m({negative:!1}),{types:u}),r.utilities.suggest(g,()=>{let w=c?.values??{},v=new Set(Object.keys(w));v.delete("__BARE_VALUE__"),v.has("DEFAULT")&&(v.delete("DEFAULT"),v.add(null));let x=c?.modifiers??{},k=x==="any"?[]:Object.keys(x);return[{supportsNegative:c?.supportsNegativeValues??!1,values:Array.from(v),modifiers:k}]})}},addComponents(a,c){this.addUtilities(a,c)},matchComponents(a,c){this.matchUtilities(a,c)},theme:rt(r,()=>i.theme??{},a=>a),prefix(a){return a},config(a,c){let u=i;if(!a)return u;let f=tt(a);for(let g=0;gObject.entries(e));for(let[e,n]of i)if(typeof n!="object"){if(!e.startsWith("--")){if(n==="@slot"){t.push(H(e,[z("@slot")]));continue}e=e.replace(/([A-Z])/g,"-$1").toLowerCase()}t.push(l(e,String(n)))}else if(Array.isArray(n))for(let s of n)typeof s=="string"?t.push(l(e,s)):t.push(H(e,ae(s)));else n!==null&&t.push(H(e,ae(n)));return t}function Lr(r,t){return(typeof r=="string"?[r]:r).flatMap(e=>{if(e.trim().endsWith("}")){let n=e.replace("}","{@slot}}"),s=me(n);return At(s,t),s}else return H(e,t)})}function zr(r,t,i){F(r,e=>{if(e.kind==="rule"){let n=it(e.selector);je(n,s=>{s.kind==="selector"&&s.value===`.${t}`&&(s.value=`.${fe(i)}`)}),e.selector=De(n)}})}function Mr(r,t,i){for(let e of en(t))r.theme.addKeyframes(e)}function en(r){let t=[];if("keyframes"in r.theme)for(let[i,e]of Object.entries(r.theme.keyframes))t.push(z("@keyframes",i,ae(e)));return t}function Wr(r){return{theme:{...Pt,colors:({theme:t})=>t("color",{}),extend:{fontSize:({theme:t})=>({...t("text",{})}),boxShadow:({theme:t})=>({...t("shadow",{})}),animation:({theme:t})=>({...t("animate",{})}),aspectRatio:({theme:t})=>({...t("aspect",{})}),borderRadius:({theme:t})=>({...t("radius",{})}),screens:({theme:t})=>({...t("breakpoint",{})}),letterSpacing:({theme:t})=>({...t("tracking",{})}),lineHeight:({theme:t})=>({...t("leading",{})}),transitionDuration:{DEFAULT:r.get(["--default-transition-duration"])??null},transitionTimingFunction:{DEFAULT:r.get(["--default-transition-timing-function"])??null},maxWidth:({theme:t})=>({...t("container",{})})}}}}var tn={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function St(r,t){let i={design:r,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(tn)};for(let n of t)Nt(i,n);for(let n of i.configs)"darkMode"in n&&n.darkMode!==void 0&&(i.result.darkMode=n.darkMode??null),"prefix"in n&&n.prefix!==void 0&&(i.result.prefix=n.prefix??""),"blocklist"in n&&n.blocklist!==void 0&&(i.result.blocklist=n.blocklist??[]),"important"in n&&n.important!==void 0&&(i.result.important=n.important??!1);let e=nn(i);return{resolvedConfig:{...i.result,content:i.content,theme:i.theme,plugins:i.plugins},replacedThemeKeys:e}}function rn(r,t){if(Array.isArray(r)&&$e(r[0]))return r.concat(t);if(Array.isArray(t)&&$e(t[0])&&$e(r))return[r,...t];if(Array.isArray(t))return t}function Nt(r,{config:t,base:i,path:e,reference:n}){let s=[];for(let u of t.plugins??[])"__isOptionsFunction"in u?s.push({...u(),reference:n}):"handler"in u?s.push({...u,reference:n}):s.push({handler:u,reference:n});if(Array.isArray(t.presets)&&t.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let u of t.presets??[])Nt(r,{path:e,base:i,config:u,reference:n});for(let u of s)r.plugins.push(u),u.config&&Nt(r,{path:e,base:i,config:u.config,reference:!!u.reference});let a=t.content??[],c=Array.isArray(a)?a:a.files;for(let u of c)r.content.files.push(typeof u=="object"?u:{base:i,pattern:u});r.configs.push(t)}function nn(r){let t=new Set,i=rt(r.design,()=>r.theme,n),e=Object.assign(i,{theme:i,colors:Et});function n(s){return typeof s=="function"?s(e)??null:s??null}for(let s of r.configs){let a=s.theme??{},c=a.extend??{};for(let u in a)u!=="extend"&&t.add(u);Object.assign(r.theme,a);for(let u in c)r.extend[u]??=[],r.extend[u].push(c[u])}delete r.theme.extend;for(let s in r.extend){let a=[r.theme[s],...r.extend[s]];r.theme[s]=()=>{let c=a.map(n);return Ke({},c,rn)}}for(let s in r.theme)r.theme[s]=n(r.theme[s]);if(r.theme.screens&&typeof r.theme.screens=="object")for(let s of Object.keys(r.theme.screens)){let a=r.theme.screens[s];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(r.theme.screens[s]=a.min))}return t}function Br(r,t){let i=r.theme.container||{};if(typeof i!="object"||i===null)return;let e=on(i,t);e.length!==0&&t.utilities.static("container",()=>structuredClone(e))}function on({center:r,padding:t,screens:i},e){let n=[],s=null;if(r&&n.push(l("margin-inline","auto")),(typeof t=="string"||typeof t=="object"&&t!==null&&"DEFAULT"in t)&&n.push(l("padding-inline",typeof t=="string"?t:t.DEFAULT)),typeof i=="object"&&i!==null){s=new Map;let a=Array.from(e.theme.namespace("--breakpoint").entries());if(a.sort((c,u)=>we(c[1],u[1],"asc")),a.length>0){let[c]=a[0];n.push(z("@media",`(width >= --theme(--breakpoint-${c}))`,[l("max-width","none")]))}for(let[c,u]of Object.entries(i)){if(typeof u=="object")if("min"in u)u=u.min;else continue;s.set(c,z("@media",`(width >= ${u})`,[l("max-width",u)]))}}if(typeof t=="object"&&t!==null){let a=Object.entries(t).filter(([c])=>c!=="DEFAULT").map(([c,u])=>[c,e.theme.resolveValue(c,["--breakpoint"]),u]).filter(Boolean);a.sort((c,u)=>we(c[1],u[1],"asc"));for(let[c,,u]of a)if(s&&s.has(c))s.get(c).nodes.push(l("padding-inline",u));else{if(s)continue;n.push(z("@media",`(width >= theme(--breakpoint-${c}))`,[l("padding-inline",u)]))}}if(s)for(let[,a]of s)n.push(a);return n}function qr({addVariant:r,config:t}){let i=t("darkMode",null),[e,n=".dark"]=Array.isArray(i)?i:[i];if(e==="variant"){let s;if(Array.isArray(n)||typeof n=="function"?s=n:typeof n=="string"&&(s=[n]),Array.isArray(s))for(let a of s)a===".dark"?(e=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):a.includes("&")||(e=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));n=s}e===null||(e==="selector"?r("dark",`&:where(${n}, ${n} *)`):e==="media"?r("dark","@media (prefers-color-scheme: dark)"):e==="variant"?r("dark",n):e==="class"&&r("dark",`&:is(${n} *)`))}function Gr(r){for(let[t,i]of[["t","top"],["tr","top right"],["r","right"],["br","bottom right"],["b","bottom"],["bl","bottom left"],["l","left"],["tl","top left"]])r.utilities.static(`bg-gradient-to-${t}`,()=>[l("--tw-gradient-position",`to ${i} in oklab`),l("background-image","linear-gradient(var(--tw-gradient-stops))")]);r.utilities.static("bg-left-top",()=>[l("background-position","left top")]),r.utilities.static("bg-right-top",()=>[l("background-position","right top")]),r.utilities.static("bg-left-bottom",()=>[l("background-position","left bottom")]),r.utilities.static("bg-right-bottom",()=>[l("background-position","right bottom")]),r.utilities.static("object-left-top",()=>[l("object-position","left top")]),r.utilities.static("object-right-top",()=>[l("object-position","right top")]),r.utilities.static("object-left-bottom",()=>[l("object-position","left bottom")]),r.utilities.static("object-right-bottom",()=>[l("object-position","right bottom")]),r.utilities.functional("max-w-screen",t=>{if(!t.value||t.value.kind==="arbitrary")return;let i=r.theme.resolve(t.value.value,["--breakpoint"]);if(i)return[l("max-width",i)]}),r.utilities.static("overflow-ellipsis",()=>[l("text-overflow","ellipsis")]),r.utilities.static("decoration-slice",()=>[l("-webkit-box-decoration-break","slice"),l("box-decoration-break","slice")]),r.utilities.static("decoration-clone",()=>[l("-webkit-box-decoration-break","clone"),l("box-decoration-break","clone")]),r.utilities.functional("flex-shrink",t=>{if(!t.modifier){if(!t.value)return[l("flex-shrink","1")];if(t.value.kind==="arbitrary")return[l("flex-shrink",t.value.value)];if(E(t.value.value))return[l("flex-shrink",t.value.value)]}}),r.utilities.functional("flex-grow",t=>{if(!t.modifier){if(!t.value)return[l("flex-grow","1")];if(t.value.kind==="arbitrary")return[l("flex-grow",t.value.value)];if(E(t.value.value))return[l("flex-grow",t.value.value)]}}),r.utilities.static("order-none",()=>[l("order","0")])}function Jr(r,t){let i=r.theme.screens||{},e=t.variants.get("min")?.order??0,n=[];for(let[a,c]of Object.entries(i)){let m=function(w){t.variants.static(a,v=>{v.nodes=[z("@media",d,v.nodes)]},{order:w})};var s=m;let u=t.variants.get(a),f=t.theme.resolveValue(a,["--breakpoint"]);if(u&&f&&!t.theme.hasDefault(`--breakpoint-${a}`))continue;let g=!0;typeof c=="string"&&(g=!1);let d=ln(c);g?n.push(m):m(e)}if(n.length!==0){for(let[,a]of t.variants.variants)a.order>e&&(a.order+=n.length);t.variants.compareFns=new Map(Array.from(t.variants.compareFns).map(([a,c])=>(a>e&&(a+=n.length),[a,c])));for(let[a,c]of n.entries())c(e+a+1)}}function ln(r){return(Array.isArray(r)?r:[r]).map(i=>typeof i=="string"?{min:i}:i&&typeof i=="object"?i:null).map(i=>{if(i===null)return null;if("raw"in i)return i.raw;let e="";return i.max!==void 0&&(e+=`${i.max} >= `),e+="width",i.min!==void 0&&(e+=` >= ${i.min}`),`(${e})`}).filter(Boolean).join(", ")}function Hr(r,t){let i=r.theme.aria||{},e=r.theme.supports||{},n=r.theme.data||{};if(Object.keys(i).length>0){let s=t.variants.get("aria"),a=s?.applyFn,c=s?.compounds;t.variants.functional("aria",(u,f)=>{let g=f.value;return g&&g.kind==="named"&&g.value in i?a?.(u,{...f,value:{kind:"arbitrary",value:i[g.value]}}):a?.(u,f)},{compounds:c})}if(Object.keys(e).length>0){let s=t.variants.get("supports"),a=s?.applyFn,c=s?.compounds;t.variants.functional("supports",(u,f)=>{let g=f.value;return g&&g.kind==="named"&&g.value in e?a?.(u,{...f,value:{kind:"arbitrary",value:e[g.value]}}):a?.(u,f)},{compounds:c})}if(Object.keys(n).length>0){let s=t.variants.get("data"),a=s?.applyFn,c=s?.compounds;t.variants.functional("data",(u,f)=>{let g=f.value;return g&&g.kind==="named"&&g.value in n?a?.(u,{...f,value:{kind:"arbitrary",value:n[g.value]}}):a?.(u,f)},{compounds:c})}}var an=/^[a-z]+$/;async function Zr({designSystem:r,base:t,ast:i,loadModule:e,sources:n}){let s=0,a=[],c=[];F(i,(d,{parent:m,replaceWith:w,context:v})=>{if(d.kind==="at-rule"){if(d.name==="@plugin"){if(m!==null)throw new Error("`@plugin` cannot be nested.");let x=d.params.slice(1,-1);if(x.length===0)throw new Error("`@plugin` must have a path.");let k={};for(let N of d.nodes??[]){if(N.kind!=="declaration")throw new Error(`Unexpected \`@plugin\` option: + +${ne([N])} + +\`@plugin\` options must be a flat list of declarations.`);if(N.value===void 0)continue;let b=N.value,S=D(b,",").map(P=>{if(P=P.trim(),P==="null")return null;if(P==="true")return!0;if(P==="false")return!1;if(Number.isNaN(Number(P))){if(P[0]==='"'&&P[P.length-1]==='"'||P[0]==="'"&&P[P.length-1]==="'")return P.slice(1,-1);if(P[0]==="{"&&P[P.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ne([N]).trim()}\` is not supported. + +Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(P);return P});k[N.property]=S.length===1?S[0]:S}a.push([{id:x,base:v.base,reference:!!v.reference},Object.keys(k).length>0?k:null]),w([]),s|=4;return}if(d.name==="@config"){if(d.nodes.length>0)throw new Error("`@config` cannot have a body.");if(m!==null)throw new Error("`@config` cannot be nested.");c.push({id:d.params.slice(1,-1),base:v.base,reference:!!v.reference}),w([]),s|=4;return}}}),Gr(r);let u=r.resolveThemeValue;if(r.resolveThemeValue=function(m,w){return m.startsWith("--")?u(m,w):(s|=Yr({designSystem:r,base:t,ast:i,sources:n,configs:[],pluginDetails:[]}),r.resolveThemeValue(m,w))},!a.length&&!c.length)return 0;let[f,g]=await Promise.all([Promise.all(c.map(async({id:d,base:m,reference:w})=>{let v=await e(d,m,"config");return{path:d,base:v.base,config:v.module,reference:w}})),Promise.all(a.map(async([{id:d,base:m,reference:w},v])=>{let x=await e(d,m,"plugin");return{path:d,base:x.base,plugin:x.module,options:v,reference:w}}))]);return s|=Yr({designSystem:r,base:t,ast:i,sources:n,configs:f,pluginDetails:g}),s}function Yr({designSystem:r,base:t,ast:i,sources:e,configs:n,pluginDetails:s}){let a=0,u=[...s.map(k=>{if(!k.options)return{config:{plugins:[k.plugin]},base:k.base,reference:k.reference};if("__isOptionsFunction"in k.plugin)return{config:{plugins:[k.plugin(k.options)]},base:k.base,reference:k.reference};throw new Error(`The plugin "${k.path}" does not accept options`)}),...n],{resolvedConfig:f}=St(r,[{config:Wr(r.theme),base:t,reference:!0},...u,{config:{plugins:[qr]},base:t,reference:!0}]),{resolvedConfig:g,replacedThemeKeys:d}=St(r,u),m=r.resolveThemeValue;r.resolveThemeValue=function(N,b){if(N[0]==="-"&&N[1]==="-")return m(N,b);let S=v.theme(N,void 0);if(Array.isArray(S)&&S.length===2)return S[0];if(Array.isArray(S))return S.join(", ");if(typeof S=="string")return S};let w={designSystem:r,ast:i,resolvedConfig:f,featuresRef:{set current(k){a|=k}}},v=Vt({...w,referenceMode:!1}),x;for(let{handler:k,reference:N}of f.plugins)N?(x||=Vt({...w,referenceMode:!0}),k(x)):k(v);if($r(r,g,d),Mr(r,g,d),Hr(g,r),Jr(g,r),Br(g,r),!r.theme.prefix&&f.prefix){if(f.prefix.endsWith("-")&&(f.prefix=f.prefix.slice(0,-1),console.warn(`The prefix "${f.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!an.test(f.prefix))throw new Error(`The prefix "${f.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);r.theme.prefix=f.prefix}if(!r.important&&f.important===!0&&(r.important=!0),typeof f.important=="string"){let k=f.important;F(i,(N,{replaceWith:b,parent:S})=>{if(N.kind==="at-rule"&&!(N.name!=="@tailwind"||N.params!=="utilities"))return S?.kind==="rule"&&S.selector===k?2:(b(M(k,[N])),2)})}for(let k of f.blocklist)r.invalidCandidates.add(k);for(let k of f.content.files){if("raw"in k)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry: + +${JSON.stringify(k,null,2)} + +This feature is not currently supported.`);let N=!1;k.pattern[0]=="!"&&(N=!0,k.pattern=k.pattern.slice(1)),e.push({...k,negated:N})}return a}function Qr(r){let t=[0];for(let n=0;n0;){let u=(a|0)>>1,f=s+u;t[f]<=n?(s=f+1,a=a-u-1):a=u}s-=1;let c=n-t[s];return{line:s+1,column:c}}function e({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),t.length-1);let a=t[n],c=t[n+1]??a;return Math.min(Math.max(a+s,0),c)}return{find:i,findOffset:e}}function Xr({ast:r}){let t=new B(n=>Qr(n.code)),i=new B(n=>({url:n.file,content:n.code,ignore:!1})),e={file:null,sources:[],mappings:[]};F(r,n=>{if(!n.src||!n.dst)return;let s=i.get(n.src[0]);if(!s.content)return;let a=t.get(n.src[0]),c=t.get(n.dst[0]),u=s.content.slice(n.src[1],n.src[2]),f=0;for(let m of u.split(` +`)){if(m.trim()!==""){let w=a.find(n.src[1]+f),v=c.find(n.dst[1]);e.mappings.push({name:null,originalPosition:{source:s,...w},generatedPosition:v})}f+=m.length,f+=1}let g=a.find(n.src[2]),d=c.find(n.dst[2]);e.mappings.push({name:null,originalPosition:{source:s,...g},generatedPosition:d})});for(let n of t.keys())e.sources.push(i.get(n));return e.mappings.sort((n,s)=>n.generatedPosition.line-s.generatedPosition.line||n.generatedPosition.column-s.generatedPosition.column||(n.originalPosition?.line??0)-(s.originalPosition?.line??0)||(n.originalPosition?.column??0)-(s.originalPosition?.column??0)),e}var ei=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function nt(r){let t=r.indexOf("{");if(t===-1)return[r];let i=[],e=r.slice(0,t),n=r.slice(t),s=0,a=n.lastIndexOf("}");for(let d=0;dnt(d));let g=nt(u);for(let d of g)for(let m of f)i.push(e+m+d);return i}function sn(r){return ei.test(r)}function un(r){let t=r.match(ei);if(!t)return[r];let[,i,e,n]=t,s=n?parseInt(n,10):void 0,a=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let c=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=c<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let f=c0&&(s=-s);for(let g=c;f?g<=u:g>=u;g+=s)a.push(g.toString())}return a}var fn=/^[a-z]+$/,dt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(dt||{});function cn(){throw new Error("No `loadModule` function provided to `compile`")}function pn(){throw new Error("No `loadStylesheet` function provided to `compile`")}function dn(r){let t=0,i=null;for(let e of D(r," "))e==="reference"?t|=2:e==="inline"?t|=1:e==="default"?t|=4:e==="static"?t|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[t,i]}var Pe=(c=>(c[c.None=0]="None",c[c.AtApply=1]="AtApply",c[c.AtImport=2]="AtImport",c[c.JsPluginCompat=4]="JsPluginCompat",c[c.ThemeFunction=8]="ThemeFunction",c[c.Utilities=16]="Utilities",c[c.Variants=32]="Variants",c))(Pe||{});async function ti(r,{base:t="",from:i,loadModule:e=cn,loadStylesheet:n=pn}={}){let s=0;r=[le({base:t},r)],s|=await $t(r,t,n,0,i!==void 0);let a=null,c=new Be,u=[],f=[],g=null,d=null,m=[],w=[],v=[],x=[],k=null;F(r,(b,{parent:S,replaceWith:P,context:U})=>{if(b.kind==="at-rule"){if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(d!==null){P([]);return}if(U.reference){P([]);return}let R=D(b.params," ");for(let _ of R)if(_.startsWith("source(")){let K=_.slice(7,-1);if(K==="none"){k=K;continue}if(K[0]==='"'&&K[K.length-1]!=='"'||K[0]==="'"&&K[K.length-1]!=="'"||K[0]!=="'"&&K[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");k={base:U.sourceBase??U.base,pattern:K.slice(1,-1)}}d=b,s|=16}if(b.name==="@utility"){if(S!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let R=pr(b);if(R===null)throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);f.push(R)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.");if(S!==null)throw new Error("`@source` cannot be nested.");let R=!1,_=!1,K=b.params;if(K[0]==="n"&&K.startsWith("not ")&&(R=!0,K=K.slice(4)),K[0]==="i"&&K.startsWith("inline(")&&(_=!0,K=K.slice(7,-1)),K[0]==='"'&&K[K.length-1]!=='"'||K[0]==="'"&&K[K.length-1]!=="'"||K[0]!=="'"&&K[0]!=='"')throw new Error("`@source` paths must be quoted.");let G=K.slice(1,-1);if(_){let I=R?x:v,W=D(G," ");for(let Z of W)for(let re of nt(Z))I.push(re)}else w.push({base:U.base,pattern:G,negated:R});P([]);return}if(b.name==="@variant"&&(S===null?b.nodes.length===0?b.name="@custom-variant":(F(b.nodes,R=>{if(R.kind==="at-rule"&&R.name==="@slot")return b.name="@custom-variant",2}),b.name==="@variant"&&m.push(b)):m.push(b)),b.name==="@custom-variant"){if(S!==null)throw new Error("`@custom-variant` cannot be nested.");P([]);let[R,_]=D(b.params," ");if(!Xe.test(R))throw new Error(`\`@custom-variant ${R}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(b.nodes.length>0&&_)throw new Error(`\`@custom-variant ${R}\` cannot have both a selector and a body.`);if(b.nodes.length===0){if(!_)throw new Error(`\`@custom-variant ${R}\` has no selector or body.`);let K=D(_.slice(1,-1),",");if(K.length===0||K.some(W=>W.trim()===""))throw new Error(`\`@custom-variant ${R} (${K.join(",")})\` selector is invalid.`);let G=[],I=[];for(let W of K)W=W.trim(),W[0]==="@"?G.push(W):I.push(W);u.push(W=>{W.variants.static(R,Z=>{let re=[];I.length>0&&re.push(M(I.join(", "),Z.nodes));for(let o of G)re.push(H(o,Z.nodes));Z.nodes=re},{compounds:ye([...I,...G])})});return}else{u.push(K=>{K.variants.fromAst(R,b.nodes)});return}}if(b.name==="@media"){let R=D(b.params," "),_=[];for(let K of R)if(K.startsWith("source(")){let G=K.slice(7,-1);F(b.nodes,(I,{replaceWith:W})=>{if(I.kind==="at-rule"&&I.name==="@tailwind"&&I.params==="utilities")return I.params+=` source(${G})`,W([le({sourceBase:U.base},[I])]),2})}else if(K.startsWith("theme(")){let G=K.slice(6,-1),I=G.includes("reference");F(b.nodes,W=>{if(W.kind!=="at-rule"){if(I)throw new Error('Files imported with `@import "\u2026" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "\u2026";` instead.');return 0}if(W.name==="@theme")return W.params+=" "+G,1})}else if(K.startsWith("prefix(")){let G=K.slice(7,-1);F(b.nodes,I=>{if(I.kind==="at-rule"&&I.name==="@theme")return I.params+=` prefix(${G})`,1})}else K==="important"?a=!0:K==="reference"?b.nodes=[le({reference:!0},b.nodes)]:_.push(K);_.length>0?b.params=_.join(" "):R.length>0&&P(b.nodes)}if(b.name==="@theme"){let[R,_]=dn(b.params);if(U.reference&&(R|=2),_){if(!fn.test(_))throw new Error(`The prefix "${_}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);c.prefix=_}return F(b.nodes,K=>{if(K.kind==="at-rule"&&K.name==="@keyframes")return c.addKeyframes(K),1;if(K.kind==="comment")return;if(K.kind==="declaration"&&K.property.startsWith("--")){c.add(ge(K.property),K.value??"",R,K.src);return}let G=ne([z(b.name,b.params,[K])]).split(` +`).map((I,W,Z)=>`${W===0||W>=Z.length-2?" ":">"} ${I}`).join(` +`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`. + +${G}`)}),g?P([]):(g=M(":root, :host",[]),g.src=b.src,P([g])),1}}});let N=br(c);if(a&&(N.important=a),x.length>0)for(let b of x)N.invalidCandidates.add(b);s|=await Zr({designSystem:N,base:t,ast:r,loadModule:e,sources:w});for(let b of u)b(N);for(let b of f)b(N);if(g){let b=[];for(let[P,U]of N.theme.entries()){if(U.options&2)continue;let R=l(fe(P),U.value);R.src=U.src,b.push(R)}let S=N.theme.getKeyframes();for(let P of S)r.push(le({theme:!0},[L([P])]));g.nodes=[le({theme:!0},b)]}if(m.length>0){for(let b of m){let S=M("&",b.nodes),P=b.params,U=N.parseVariant(P);if(U===null)throw new Error(`Cannot use \`@variant\` with unknown variant: ${P}`);if(Ae(S,U,N.variants)===null)throw new Error(`Cannot use \`@variant\` with variant: ${P}`);Object.assign(b,S)}s|=32}if(s|=xe(r,N),s|=Oe(r,N),d){let b=d;b.kind="context",b.context={}}return F(r,(b,{replaceWith:S})=>{if(b.kind==="at-rule")return b.name==="@utility"&&S([]),1}),{designSystem:N,ast:r,sources:w,root:k,utilitiesNode:d,features:s,inlineCandidates:v}}async function mn(r,t={}){let{designSystem:i,ast:e,sources:n,root:s,utilitiesNode:a,features:c,inlineCandidates:u}=await ti(r,t);e.unshift(We(`! tailwindcss v${Rt} | MIT License | https://tailwindcss.com `));function f(v){i.invalidCandidates.add(v)}let g=new Set,d=null,m=0,w=!1;for(let v of u)i.invalidCandidates.has(v)||(g.add(v),w=!0);return{sources:n,root:s,features:c,build(v){if(c===0)return r;if(!a)return d??=ve(e,i,t.polyfills),d;let x=w,k=!1;w=!1;let N=g.size;for(let S of v)if(!i.invalidCandidates.has(S))if(S[0]==="-"&&S[1]==="-"){let P=i.theme.markUsedVariable(S);x||=P,k||=P}else g.add(S),x||=g.size!==N;if(!x)return d??=ve(e,i,t.polyfills),d;let b=pe(g,i,{onInvalidCandidate:f}).astNodes;return t.from&&F(b,S=>{S.src??=a.src}),!k&&m===b.length?(d??=ve(e,i,t.polyfills),d):(m=b.length,a.nodes=b,d=ve(e,i,t.polyfills),d)}}}async function Ca(r,t={}){let i=me(r,{from:t.from}),e=await mn(i,t),n=i,s=r;return{...e,build(a){let c=e.build(a);return c===n||(s=ne(c,!!t.from),n=c),s},buildSourceMap(){return Xr({ast:n})}}}async function $a(r,t={}){return(await ti(me(r),t)).designSystem}function gn(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}export{dt as a,Pe as b,mn as c,Ca as d,$a as e,gn as f}; diff --git a/node_modules/tailwindcss/dist/chunk-G32FJCSR.mjs b/node_modules/tailwindcss/dist/chunk-G32FJCSR.mjs new file mode 100644 index 0000000..86a6941 --- /dev/null +++ b/node_modules/tailwindcss/dist/chunk-G32FJCSR.mjs @@ -0,0 +1 @@ +import{a as k}from"./chunk-HTB5LLOP.mjs";var _=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","transparent","currentcolor","canvas","canvastext","linktext","visitedtext","activetext","buttonface","buttontext","buttonborder","field","fieldtext","highlight","highlighttext","selecteditem","selecteditemtext","mark","marktext","graytext","accentcolor","accentcolortext"]),U=/^(rgba?|hsla?|hwb|color|(ok)?(lab|lch)|light-dark|color-mix)\(/i;function S(e){return e.charCodeAt(0)===35||U.test(e)||_.has(e.toLowerCase())}var A=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function b(e){return e.indexOf("(")!==-1&&A.some(t=>e.includes(`${t}(`))}function oe(e){if(!A.some(n=>e.includes(n)))return e;let t="",r=[],s=null,m=null;for(let n=0;n=48&&a<=57||s!==null&&(a===37||a>=97&&a<=122||a>=65&&a<=90)?s=n:(m=s,s=null),a===40){t+=e[n];let i=n;for(let p=n-1;p>=0;p--){let c=e.charCodeAt(p);if(c>=48&&c<=57)i=p;else if(c>=97&&c<=122)i=p;else break}let o=e.slice(i,n);if(A.includes(o)){r.unshift(!0);continue}else if(r[0]&&o===""){r.unshift(!0);continue}r.unshift(!1);continue}else if(a===41)t+=e[n],r.shift();else if(a===44&&r[0]){t+=", ";continue}else{if(a===32&&r[0]&&t.charCodeAt(t.length-1)===32)continue;if((a===43||a===42||a===47||a===45)&&r[0]){let i=t.trimEnd(),o=i.charCodeAt(i.length-1),p=i.charCodeAt(i.length-2),c=e.charCodeAt(n+1);if((o===101||o===69)&&p>=48&&p<=57){t+=e[n];continue}else if(o===43||o===42||o===47||o===45){t+=e[n];continue}else if(o===40||o===44){t+=e[n];continue}else e.charCodeAt(n-1)===32?t+=`${e[n]} `:o>=48&&o<=57||c>=48&&c<=57||o===41||c===40||c===43||c===42||c===47||c===45||m!==null&&m===n-1?t+=` ${e[n]} `:t+=e[n]}else t+=e[n]}}return t}var E=new Uint8Array(256);function d(e,t){let r=0,s=[],m=0,n=e.length,a=t.charCodeAt(0);for(let i=0;i0&&o===E[r-1]&&r--;break}}return s.push(e.slice(m)),s}var P={color:S,length:y,percentage:C,ratio:G,number:v,integer:u,url:R,position:K,"bg-size":Y,"line-width":T,image:F,"family-name":M,"generic-name":H,"absolute-size":$,"relative-size":W,angle:X,vector:te};function me(e,t){if(e.startsWith("var("))return null;for(let r of t)if(P[r]?.(e))return r;return null}var z=/^url\(.*\)$/;function R(e){return z.test(e)}function T(e){return d(e," ").every(t=>y(t)||v(t)||t==="thin"||t==="medium"||t==="thick")}var D=/^(?:element|image|cross-fade|image-set)\(/,I=/^(repeating-)?(conic|linear|radial)-gradient\(/;function F(e){let t=0;for(let r of d(e,","))if(!r.startsWith("var(")){if(R(r)){t+=1;continue}if(I.test(r)){t+=1;continue}if(D.test(r)){t+=1;continue}return!1}return t>0}function H(e){return e==="serif"||e==="sans-serif"||e==="monospace"||e==="cursive"||e==="fantasy"||e==="system-ui"||e==="ui-serif"||e==="ui-sans-serif"||e==="ui-monospace"||e==="ui-rounded"||e==="math"||e==="emoji"||e==="fangsong"}function M(e){let t=0;for(let r of d(e,",")){let s=r.charCodeAt(0);if(s>=48&&s<=57)return!1;r.startsWith("var(")||(t+=1)}return t>0}function $(e){return e==="xx-small"||e==="x-small"||e==="small"||e==="medium"||e==="large"||e==="x-large"||e==="xx-large"||e==="xxx-large"}function W(e){return e==="larger"||e==="smaller"}var x=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,B=new RegExp(`^${x.source}$`);function v(e){return B.test(e)||b(e)}var q=new RegExp(`^${x.source}%$`);function C(e){return q.test(e)||b(e)}var V=new RegExp(`^${x.source}s*/s*${x.source}$`);function G(e){return V.test(e)||b(e)}var Z=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],j=new RegExp(`^${x.source}(${Z.join("|")})$`);function y(e){return j.test(e)||b(e)}function K(e){let t=0;for(let r of d(e," ")){if(r==="center"||r==="top"||r==="right"||r==="bottom"||r==="left"){t+=1;continue}if(!r.startsWith("var(")){if(y(r)||C(r)){t+=1;continue}return!1}}return t>0}function Y(e){let t=0;for(let r of d(e,",")){if(r==="cover"||r==="contain"){t+=1;continue}let s=d(r," ");if(s.length!==1&&s.length!==2)return!1;if(s.every(m=>m==="auto"||y(m)||C(m))){t+=1;continue}}return t>0}var Q=["deg","rad","grad","turn"],J=new RegExp(`^${x.source}(${Q.join("|")})$`);function X(e){return J.test(e)}var ee=new RegExp(`^${x.source} +${x.source} +${x.source}$`);function te(e){return ee.test(e)}function u(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}function pe(e){let t=Number(e);return Number.isInteger(t)&&t>0&&String(t)===String(e)}function ge(e){return N(e,.25)}function ue(e){return N(e,.25)}function N(e,t){let r=Number(e);return r>=0&&r%t===0&&String(r)===String(e)}function h(e){return{__BARE_VALUE__:e}}var g=h(e=>{if(u(e.value))return e.value}),l=h(e=>{if(u(e.value))return`${e.value}%`}),f=h(e=>{if(u(e.value))return`${e.value}px`}),O=h(e=>{if(u(e.value))return`${e.value}ms`}),w=h(e=>{if(u(e.value))return`${e.value}deg`}),re=h(e=>{if(e.fraction===null)return;let[t,r]=d(e.fraction,"/");if(!(!u(t)||!u(r)))return e.fraction}),L=h(e=>{if(u(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),be={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...re},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...l}),backdropContrast:({theme:e})=>({...e("contrast"),...l}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...l}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...w}),backdropInvert:({theme:e})=>({...e("invert"),...l}),backdropOpacity:({theme:e})=>({...e("opacity"),...l}),backdropSaturate:({theme:e})=>({...e("saturate"),...l}),backdropSepia:({theme:e})=>({...e("sepia"),...l}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...f},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...l},caretColor:({theme:e})=>e("colors"),colors:()=>({...k}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...g},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...l},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...f}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...g},flexShrink:{0:"0",DEFAULT:"1",...g},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...l},grayscale:{0:"0",DEFAULT:"100%",...l},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...L},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...L},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...w},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...l},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...g},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...l},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...g},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...w},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...l},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...l},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...l},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...w},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...g},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...f},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...O},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...O},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...g}};export{oe as a,d as b,me as c,u as d,pe as e,ge as f,ue as g,be as h}; diff --git a/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs b/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs new file mode 100644 index 0000000..8a95483 --- /dev/null +++ b/node_modules/tailwindcss/dist/chunk-HTB5LLOP.mjs @@ -0,0 +1 @@ +var l={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};export{l as a}; diff --git a/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts b/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts new file mode 100644 index 0000000..8f187dc --- /dev/null +++ b/node_modules/tailwindcss/dist/colors-b_6i0Oi7.d.ts @@ -0,0 +1,295 @@ +declare const _default: { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; +}; + +export { _default as _ }; diff --git a/node_modules/tailwindcss/dist/colors.d.mts b/node_modules/tailwindcss/dist/colors.d.mts new file mode 100644 index 0000000..5ea4701 --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.d.mts @@ -0,0 +1,295 @@ +declare const _default: { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; +}; + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/colors.d.ts b/node_modules/tailwindcss/dist/colors.d.ts new file mode 100644 index 0000000..e9d15d3 --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.d.ts @@ -0,0 +1,5 @@ +import { _ as _default } from './colors-b_6i0Oi7.js'; + + + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/colors.js b/node_modules/tailwindcss/dist/colors.js new file mode 100644 index 0000000..409c0d5 --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.js @@ -0,0 +1 @@ +"use strict";var l={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};module.exports=l; diff --git a/node_modules/tailwindcss/dist/colors.mjs b/node_modules/tailwindcss/dist/colors.mjs new file mode 100644 index 0000000..9d20fbc --- /dev/null +++ b/node_modules/tailwindcss/dist/colors.mjs @@ -0,0 +1 @@ +import{a}from"./chunk-HTB5LLOP.mjs";export{a as default}; diff --git a/node_modules/tailwindcss/dist/default-theme.d.mts b/node_modules/tailwindcss/dist/default-theme.d.mts new file mode 100644 index 0000000..1b80d8a --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.d.mts @@ -0,0 +1,1147 @@ +import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-QUZ9b-Gn.mjs'; +import './colors.mjs'; + +declare const _default: { + accentColor: ({ theme }: PluginUtils) => any; + animation: { + none: string; + spin: string; + ping: string; + pulse: string; + bounce: string; + }; + aria: { + busy: string; + checked: string; + disabled: string; + expanded: string; + hidden: string; + pressed: string; + readonly: string; + required: string; + selected: string; + }; + aspectRatio: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + square: string; + video: string; + }; + backdropBlur: ({ theme }: PluginUtils) => any; + backdropBrightness: ({ theme }: PluginUtils) => any; + backdropContrast: ({ theme }: PluginUtils) => any; + backdropGrayscale: ({ theme }: PluginUtils) => any; + backdropHueRotate: ({ theme }: PluginUtils) => any; + backdropInvert: ({ theme }: PluginUtils) => any; + backdropOpacity: ({ theme }: PluginUtils) => any; + backdropSaturate: ({ theme }: PluginUtils) => any; + backdropSepia: ({ theme }: PluginUtils) => any; + backgroundColor: ({ theme }: PluginUtils) => any; + backgroundImage: { + none: string; + 'gradient-to-t': string; + 'gradient-to-tr': string; + 'gradient-to-r': string; + 'gradient-to-br': string; + 'gradient-to-b': string; + 'gradient-to-bl': string; + 'gradient-to-l': string; + 'gradient-to-tl': string; + }; + backgroundOpacity: ({ theme }: PluginUtils) => any; + backgroundPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + backgroundSize: { + auto: string; + cover: string; + contain: string; + }; + blur: { + 0: string; + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + }; + borderColor: ({ theme }: PluginUtils) => any; + borderOpacity: ({ theme }: PluginUtils) => any; + borderRadius: { + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + full: string; + }; + borderSpacing: ({ theme }: PluginUtils) => any; + borderWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 2: string; + 4: string; + 8: string; + }; + boxShadow: { + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + inner: string; + none: string; + }; + boxShadowColor: ({ theme }: PluginUtils) => any; + brightness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + 200: string; + }; + caretColor: ({ theme }: PluginUtils) => any; + colors: () => { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + }; + columns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + '3xs': string; + '2xs': string; + xs: string; + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + '4xl': string; + '5xl': string; + '6xl': string; + '7xl': string; + }; + container: {}; + content: { + none: string; + }; + contrast: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 100: string; + 125: string; + 150: string; + 200: string; + }; + cursor: { + auto: string; + default: string; + pointer: string; + wait: string; + text: string; + move: string; + help: string; + 'not-allowed': string; + none: string; + 'context-menu': string; + progress: string; + cell: string; + crosshair: string; + 'vertical-text': string; + alias: string; + copy: string; + 'no-drop': string; + grab: string; + grabbing: string; + 'all-scroll': string; + 'col-resize': string; + 'row-resize': string; + 'n-resize': string; + 'e-resize': string; + 's-resize': string; + 'w-resize': string; + 'ne-resize': string; + 'nw-resize': string; + 'se-resize': string; + 'sw-resize': string; + 'ew-resize': string; + 'ns-resize': string; + 'nesw-resize': string; + 'nwse-resize': string; + 'zoom-in': string; + 'zoom-out': string; + }; + divideColor: ({ theme }: PluginUtils) => any; + divideOpacity: ({ theme }: PluginUtils) => any; + divideWidth: ({ theme }: PluginUtils) => any; + dropShadow: { + sm: string; + DEFAULT: string[]; + md: string[]; + lg: string[]; + xl: string[]; + '2xl': string; + none: string; + }; + fill: ({ theme }: PluginUtils) => any; + flex: { + 1: string; + auto: string; + initial: string; + none: string; + }; + flexBasis: ({ theme }: PluginUtils) => any; + flexGrow: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + flexShrink: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + fontFamily: { + sans: string[]; + serif: string[]; + mono: string[]; + }; + fontSize: { + xs: (string | { + lineHeight: string; + })[]; + sm: (string | { + lineHeight: string; + })[]; + base: (string | { + lineHeight: string; + })[]; + lg: (string | { + lineHeight: string; + })[]; + xl: (string | { + lineHeight: string; + })[]; + '2xl': (string | { + lineHeight: string; + })[]; + '3xl': (string | { + lineHeight: string; + })[]; + '4xl': (string | { + lineHeight: string; + })[]; + '5xl': (string | { + lineHeight: string; + })[]; + '6xl': (string | { + lineHeight: string; + })[]; + '7xl': (string | { + lineHeight: string; + })[]; + '8xl': (string | { + lineHeight: string; + })[]; + '9xl': (string | { + lineHeight: string; + })[]; + }; + fontWeight: { + thin: string; + extralight: string; + light: string; + normal: string; + medium: string; + semibold: string; + bold: string; + extrabold: string; + black: string; + }; + gap: ({ theme }: PluginUtils) => any; + gradientColorStops: ({ theme }: PluginUtils) => any; + gradientColorStopPositions: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + '0%': string; + '5%': string; + '10%': string; + '15%': string; + '20%': string; + '25%': string; + '30%': string; + '35%': string; + '40%': string; + '45%': string; + '50%': string; + '55%': string; + '60%': string; + '65%': string; + '70%': string; + '75%': string; + '80%': string; + '85%': string; + '90%': string; + '95%': string; + '100%': string; + }; + grayscale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + gridAutoColumns: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridAutoRows: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridColumn: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridColumnEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridColumnStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRow: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridRowEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRowStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridTemplateColumns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + gridTemplateRows: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + height: ({ theme }: PluginUtils) => any; + hueRotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 15: string; + 30: string; + 60: string; + 90: string; + 180: string; + }; + inset: ({ theme }: PluginUtils) => any; + invert: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + keyframes: { + spin: { + to: { + transform: string; + }; + }; + ping: { + '75%, 100%': { + transform: string; + opacity: string; + }; + }; + pulse: { + '50%': { + opacity: string; + }; + }; + bounce: { + '0%, 100%': { + transform: string; + animationTimingFunction: string; + }; + '50%': { + transform: string; + animationTimingFunction: string; + }; + }; + }; + letterSpacing: { + tighter: string; + tight: string; + normal: string; + wide: string; + wider: string; + widest: string; + }; + lineHeight: { + none: string; + tight: string; + snug: string; + normal: string; + relaxed: string; + loose: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + }; + listStyleType: { + none: string; + disc: string; + decimal: string; + }; + listStyleImage: { + none: string; + }; + margin: ({ theme }: PluginUtils) => any; + lineClamp: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + }; + maxHeight: ({ theme }: PluginUtils) => any; + maxWidth: ({ theme }: PluginUtils) => any; + minHeight: ({ theme }: PluginUtils) => any; + minWidth: ({ theme }: PluginUtils) => any; + objectPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + opacity: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 5: string; + 10: string; + 15: string; + 20: string; + 25: string; + 30: string; + 35: string; + 40: string; + 45: string; + 50: string; + 55: string; + 60: string; + 65: string; + 70: string; + 75: string; + 80: string; + 85: string; + 90: string; + 95: string; + 100: string; + }; + order: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + first: string; + last: string; + none: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + outlineColor: ({ theme }: PluginUtils) => any; + outlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + outlineWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + padding: ({ theme }: PluginUtils) => any; + placeholderColor: ({ theme }: PluginUtils) => any; + placeholderOpacity: ({ theme }: PluginUtils) => any; + ringColor: ({ theme }: PluginUtils) => any; + ringOffsetColor: ({ theme }: PluginUtils) => any; + ringOffsetWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + ringOpacity: ({ theme }: PluginUtils) => any; + ringWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + rotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + 45: string; + 90: string; + 180: string; + }; + saturate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + }; + scale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + }; + screens: { + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + }; + scrollMargin: ({ theme }: PluginUtils) => any; + scrollPadding: ({ theme }: PluginUtils) => any; + sepia: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + skew: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + }; + space: ({ theme }: PluginUtils) => any; + spacing: { + px: string; + 0: string; + 0.5: string; + 1: string; + 1.5: string; + 2: string; + 2.5: string; + 3: string; + 3.5: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 14: string; + 16: string; + 20: string; + 24: string; + 28: string; + 32: string; + 36: string; + 40: string; + 44: string; + 48: string; + 52: string; + 56: string; + 60: string; + 64: string; + 72: string; + 80: string; + 96: string; + }; + stroke: ({ theme }: PluginUtils) => any; + strokeWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + }; + supports: {}; + data: {}; + textColor: ({ theme }: PluginUtils) => any; + textDecorationColor: ({ theme }: PluginUtils) => any; + textDecorationThickness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 'from-font': string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + textIndent: ({ theme }: PluginUtils) => any; + textOpacity: ({ theme }: PluginUtils) => any; + textUnderlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + transformOrigin: { + center: string; + top: string; + 'top-right': string; + right: string; + 'bottom-right': string; + bottom: string; + 'bottom-left': string; + left: string; + 'top-left': string; + }; + transitionDelay: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionDuration: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionProperty: { + none: string; + all: string; + DEFAULT: string; + colors: string; + opacity: string; + shadow: string; + transform: string; + }; + transitionTimingFunction: { + DEFAULT: string; + linear: string; + in: string; + out: string; + 'in-out': string; + }; + translate: ({ theme }: PluginUtils) => any; + size: ({ theme }: PluginUtils) => any; + width: ({ theme }: PluginUtils) => any; + willChange: { + auto: string; + scroll: string; + contents: string; + transform: string; + }; + zIndex: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 10: string; + 20: string; + 30: string; + 40: string; + 50: string; + }; +}; + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/default-theme.d.ts b/node_modules/tailwindcss/dist/default-theme.d.ts new file mode 100644 index 0000000..6d36e26 --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.d.ts @@ -0,0 +1,1147 @@ +import { P as PluginUtils, N as NamedUtilityValue } from './resolve-config-BIFUA2FY.js'; +import './colors-b_6i0Oi7.js'; + +declare const _default: { + accentColor: ({ theme }: PluginUtils) => any; + animation: { + none: string; + spin: string; + ping: string; + pulse: string; + bounce: string; + }; + aria: { + busy: string; + checked: string; + disabled: string; + expanded: string; + hidden: string; + pressed: string; + readonly: string; + required: string; + selected: string; + }; + aspectRatio: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + square: string; + video: string; + }; + backdropBlur: ({ theme }: PluginUtils) => any; + backdropBrightness: ({ theme }: PluginUtils) => any; + backdropContrast: ({ theme }: PluginUtils) => any; + backdropGrayscale: ({ theme }: PluginUtils) => any; + backdropHueRotate: ({ theme }: PluginUtils) => any; + backdropInvert: ({ theme }: PluginUtils) => any; + backdropOpacity: ({ theme }: PluginUtils) => any; + backdropSaturate: ({ theme }: PluginUtils) => any; + backdropSepia: ({ theme }: PluginUtils) => any; + backgroundColor: ({ theme }: PluginUtils) => any; + backgroundImage: { + none: string; + 'gradient-to-t': string; + 'gradient-to-tr': string; + 'gradient-to-r': string; + 'gradient-to-br': string; + 'gradient-to-b': string; + 'gradient-to-bl': string; + 'gradient-to-l': string; + 'gradient-to-tl': string; + }; + backgroundOpacity: ({ theme }: PluginUtils) => any; + backgroundPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + backgroundSize: { + auto: string; + cover: string; + contain: string; + }; + blur: { + 0: string; + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + }; + borderColor: ({ theme }: PluginUtils) => any; + borderOpacity: ({ theme }: PluginUtils) => any; + borderRadius: { + none: string; + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + full: string; + }; + borderSpacing: ({ theme }: PluginUtils) => any; + borderWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 2: string; + 4: string; + 8: string; + }; + boxShadow: { + sm: string; + DEFAULT: string; + md: string; + lg: string; + xl: string; + '2xl': string; + inner: string; + none: string; + }; + boxShadowColor: ({ theme }: PluginUtils) => any; + brightness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + 200: string; + }; + caretColor: ({ theme }: PluginUtils) => any; + colors: () => { + inherit: string; + current: string; + transparent: string; + black: string; + white: string; + slate: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + gray: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + zinc: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + neutral: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + stone: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + red: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + orange: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + amber: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + yellow: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + lime: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + green: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + emerald: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + teal: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + cyan: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + sky: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + blue: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + indigo: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + violet: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + purple: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + fuchsia: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + pink: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + rose: { + '50': string; + '100': string; + '200': string; + '300': string; + '400': string; + '500': string; + '600': string; + '700': string; + '800': string; + '900': string; + '950': string; + }; + }; + columns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + '3xs': string; + '2xs': string; + xs: string; + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + '3xl': string; + '4xl': string; + '5xl': string; + '6xl': string; + '7xl': string; + }; + container: {}; + content: { + none: string; + }; + contrast: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 100: string; + 125: string; + 150: string; + 200: string; + }; + cursor: { + auto: string; + default: string; + pointer: string; + wait: string; + text: string; + move: string; + help: string; + 'not-allowed': string; + none: string; + 'context-menu': string; + progress: string; + cell: string; + crosshair: string; + 'vertical-text': string; + alias: string; + copy: string; + 'no-drop': string; + grab: string; + grabbing: string; + 'all-scroll': string; + 'col-resize': string; + 'row-resize': string; + 'n-resize': string; + 'e-resize': string; + 's-resize': string; + 'w-resize': string; + 'ne-resize': string; + 'nw-resize': string; + 'se-resize': string; + 'sw-resize': string; + 'ew-resize': string; + 'ns-resize': string; + 'nesw-resize': string; + 'nwse-resize': string; + 'zoom-in': string; + 'zoom-out': string; + }; + divideColor: ({ theme }: PluginUtils) => any; + divideOpacity: ({ theme }: PluginUtils) => any; + divideWidth: ({ theme }: PluginUtils) => any; + dropShadow: { + sm: string; + DEFAULT: string[]; + md: string[]; + lg: string[]; + xl: string[]; + '2xl': string; + none: string; + }; + fill: ({ theme }: PluginUtils) => any; + flex: { + 1: string; + auto: string; + initial: string; + none: string; + }; + flexBasis: ({ theme }: PluginUtils) => any; + flexGrow: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + flexShrink: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + fontFamily: { + sans: string[]; + serif: string[]; + mono: string[]; + }; + fontSize: { + xs: (string | { + lineHeight: string; + })[]; + sm: (string | { + lineHeight: string; + })[]; + base: (string | { + lineHeight: string; + })[]; + lg: (string | { + lineHeight: string; + })[]; + xl: (string | { + lineHeight: string; + })[]; + '2xl': (string | { + lineHeight: string; + })[]; + '3xl': (string | { + lineHeight: string; + })[]; + '4xl': (string | { + lineHeight: string; + })[]; + '5xl': (string | { + lineHeight: string; + })[]; + '6xl': (string | { + lineHeight: string; + })[]; + '7xl': (string | { + lineHeight: string; + })[]; + '8xl': (string | { + lineHeight: string; + })[]; + '9xl': (string | { + lineHeight: string; + })[]; + }; + fontWeight: { + thin: string; + extralight: string; + light: string; + normal: string; + medium: string; + semibold: string; + bold: string; + extrabold: string; + black: string; + }; + gap: ({ theme }: PluginUtils) => any; + gradientColorStops: ({ theme }: PluginUtils) => any; + gradientColorStopPositions: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + '0%': string; + '5%': string; + '10%': string; + '15%': string; + '20%': string; + '25%': string; + '30%': string; + '35%': string; + '40%': string; + '45%': string; + '50%': string; + '55%': string; + '60%': string; + '65%': string; + '70%': string; + '75%': string; + '80%': string; + '85%': string; + '90%': string; + '95%': string; + '100%': string; + }; + grayscale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + gridAutoColumns: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridAutoRows: { + auto: string; + min: string; + max: string; + fr: string; + }; + gridColumn: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridColumnEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridColumnStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRow: { + auto: string; + 'span-1': string; + 'span-2': string; + 'span-3': string; + 'span-4': string; + 'span-5': string; + 'span-6': string; + 'span-7': string; + 'span-8': string; + 'span-9': string; + 'span-10': string; + 'span-11': string; + 'span-12': string; + 'span-full': string; + }; + gridRowEnd: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridRowStart: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + }; + gridTemplateColumns: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + gridTemplateRows: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + none: string; + subgrid: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + height: ({ theme }: PluginUtils) => any; + hueRotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 15: string; + 30: string; + 60: string; + 90: string; + 180: string; + }; + inset: ({ theme }: PluginUtils) => any; + invert: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + keyframes: { + spin: { + to: { + transform: string; + }; + }; + ping: { + '75%, 100%': { + transform: string; + opacity: string; + }; + }; + pulse: { + '50%': { + opacity: string; + }; + }; + bounce: { + '0%, 100%': { + transform: string; + animationTimingFunction: string; + }; + '50%': { + transform: string; + animationTimingFunction: string; + }; + }; + }; + letterSpacing: { + tighter: string; + tight: string; + normal: string; + wide: string; + wider: string; + widest: string; + }; + lineHeight: { + none: string; + tight: string; + snug: string; + normal: string; + relaxed: string; + loose: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + }; + listStyleType: { + none: string; + disc: string; + decimal: string; + }; + listStyleImage: { + none: string; + }; + margin: ({ theme }: PluginUtils) => any; + lineClamp: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + }; + maxHeight: ({ theme }: PluginUtils) => any; + maxWidth: ({ theme }: PluginUtils) => any; + minHeight: ({ theme }: PluginUtils) => any; + minWidth: ({ theme }: PluginUtils) => any; + objectPosition: { + bottom: string; + center: string; + left: string; + 'left-bottom': string; + 'left-top': string; + right: string; + 'right-bottom': string; + 'right-top': string; + top: string; + }; + opacity: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 5: string; + 10: string; + 15: string; + 20: string; + 25: string; + 30: string; + 35: string; + 40: string; + 45: string; + 50: string; + 55: string; + 60: string; + 65: string; + 70: string; + 75: string; + 80: string; + 85: string; + 90: string; + 95: string; + 100: string; + }; + order: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + first: string; + last: string; + none: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + }; + outlineColor: ({ theme }: PluginUtils) => any; + outlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + outlineWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + padding: ({ theme }: PluginUtils) => any; + placeholderColor: ({ theme }: PluginUtils) => any; + placeholderOpacity: ({ theme }: PluginUtils) => any; + ringColor: ({ theme }: PluginUtils) => any; + ringOffsetColor: ({ theme }: PluginUtils) => any; + ringOffsetWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + ringOpacity: ({ theme }: PluginUtils) => any; + ringWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + rotate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + 45: string; + 90: string; + 180: string; + }; + saturate: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 100: string; + 150: string; + 200: string; + }; + scale: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 50: string; + 75: string; + 90: string; + 95: string; + 100: string; + 105: string; + 110: string; + 125: string; + 150: string; + }; + screens: { + sm: string; + md: string; + lg: string; + xl: string; + '2xl': string; + }; + scrollMargin: ({ theme }: PluginUtils) => any; + scrollPadding: ({ theme }: PluginUtils) => any; + sepia: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + DEFAULT: string; + }; + skew: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + 3: string; + 6: string; + 12: string; + }; + space: ({ theme }: PluginUtils) => any; + spacing: { + px: string; + 0: string; + 0.5: string; + 1: string; + 1.5: string; + 2: string; + 2.5: string; + 3: string; + 3.5: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 14: string; + 16: string; + 20: string; + 24: string; + 28: string; + 32: string; + 36: string; + 40: string; + 44: string; + 48: string; + 52: string; + 56: string; + 60: string; + 64: string; + 72: string; + 80: string; + 96: string; + }; + stroke: ({ theme }: PluginUtils) => any; + strokeWidth: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 1: string; + 2: string; + }; + supports: {}; + data: {}; + textColor: ({ theme }: PluginUtils) => any; + textDecorationColor: ({ theme }: PluginUtils) => any; + textDecorationThickness: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 'from-font': string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + textIndent: ({ theme }: PluginUtils) => any; + textOpacity: ({ theme }: PluginUtils) => any; + textUnderlineOffset: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 1: string; + 2: string; + 4: string; + 8: string; + }; + transformOrigin: { + center: string; + top: string; + 'top-right': string; + right: string; + 'bottom-right': string; + bottom: string; + 'bottom-left': string; + left: string; + 'top-left': string; + }; + transitionDelay: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionDuration: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + DEFAULT: string; + 0: string; + 75: string; + 100: string; + 150: string; + 200: string; + 300: string; + 500: string; + 700: string; + 1000: string; + }; + transitionProperty: { + none: string; + all: string; + DEFAULT: string; + colors: string; + opacity: string; + shadow: string; + transform: string; + }; + transitionTimingFunction: { + DEFAULT: string; + linear: string; + in: string; + out: string; + 'in-out': string; + }; + translate: ({ theme }: PluginUtils) => any; + size: ({ theme }: PluginUtils) => any; + width: ({ theme }: PluginUtils) => any; + willChange: { + auto: string; + scroll: string; + contents: string; + transform: string; + }; + zIndex: { + __BARE_VALUE__: (value: NamedUtilityValue) => string | undefined; + auto: string; + 0: string; + 10: string; + 20: string; + 30: string; + 40: string; + 50: string; + }; +}; + +export { _default as default }; diff --git a/node_modules/tailwindcss/dist/default-theme.js b/node_modules/tailwindcss/dist/default-theme.js new file mode 100644 index 0000000..48982db --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.js @@ -0,0 +1 @@ +"use strict";var m=new Uint8Array(256);function d(e,c){let t=0,g=[],u=0,k=e.length,w=c.charCodeAt(0);for(let n=0;n0&&h===m[t-1]&&t--;break}}return g.push(e.slice(u)),g}var l=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,z=new RegExp(`^${l.source}$`);var T=new RegExp(`^${l.source}%$`);var D=new RegExp(`^${l.source}s*/s*${l.source}$`);var A=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],I=new RegExp(`^${l.source}(${A.join("|")})$`);var C=["deg","rad","grad","turn"],F=new RegExp(`^${l.source}(${C.join("|")})$`);var H=new RegExp(`^${l.source} +${l.source} +${l.source}$`);function i(e){let c=Number(e);return Number.isInteger(c)&&c>=0&&String(c)===String(e)}var f={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function s(e){return{__BARE_VALUE__:e}}var r=s(e=>{if(i(e.value))return e.value}),o=s(e=>{if(i(e.value))return`${e.value}%`}),a=s(e=>{if(i(e.value))return`${e.value}px`}),b=s(e=>{if(i(e.value))return`${e.value}ms`}),p=s(e=>{if(i(e.value))return`${e.value}deg`}),S=s(e=>{if(e.fraction===null)return;let[c,t]=d(e.fraction,"/");if(!(!i(c)||!i(t)))return e.fraction}),E=s(e=>{if(i(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),y={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...S},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...o}),backdropContrast:({theme:e})=>({...e("contrast"),...o}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...o}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...p}),backdropInvert:({theme:e})=>({...e("invert"),...o}),backdropOpacity:({theme:e})=>({...e("opacity"),...o}),backdropSaturate:({theme:e})=>({...e("saturate"),...o}),backdropSepia:({theme:e})=>({...e("sepia"),...o}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...a},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...o},caretColor:({theme:e})=>e("colors"),colors:()=>({...f}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...r},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...o},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...a}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...r},flexShrink:{0:"0",DEFAULT:"1",...r},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...o},grayscale:{0:"0",DEFAULT:"100%",...o},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...r},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...E},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...E},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...p},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...o},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...r},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...o},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...r},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...p},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...o},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...o},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...o},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...p},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...r},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...a},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...b},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...r}};module.exports=y; diff --git a/node_modules/tailwindcss/dist/default-theme.mjs b/node_modules/tailwindcss/dist/default-theme.mjs new file mode 100644 index 0000000..2fca4a6 --- /dev/null +++ b/node_modules/tailwindcss/dist/default-theme.mjs @@ -0,0 +1 @@ +import{h as a}from"./chunk-G32FJCSR.mjs";import"./chunk-HTB5LLOP.mjs";export{a as default}; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.d.mts b/node_modules/tailwindcss/dist/flatten-color-palette.d.mts new file mode 100644 index 0000000..1151604 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.d.mts @@ -0,0 +1,6 @@ +type Colors = { + [key: string | number]: string | Colors; +}; +declare function flattenColorPalette(colors: Colors): Record; + +export { flattenColorPalette as default }; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.d.ts b/node_modules/tailwindcss/dist/flatten-color-palette.d.ts new file mode 100644 index 0000000..1151604 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.d.ts @@ -0,0 +1,6 @@ +type Colors = { + [key: string | number]: string | Colors; +}; +declare function flattenColorPalette(colors: Colors): Record; + +export { flattenColorPalette as default }; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.js b/node_modules/tailwindcss/dist/flatten-color-palette.js new file mode 100644 index 0000000..b9e6c33 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.js @@ -0,0 +1,3 @@ +"use strict";function _(e){return{kind:"word",value:e}}function se(e,t){return{kind:"function",value:e,nodes:t}}function ue(e){return{kind:"separator",value:e}}function v(e,t,i=null){for(let r=0;r0){let M=_(n);r?r.nodes.push(M):t.push(M),n=""}let a=l,u=l+1;for(;u0){let u=_(n);a?.nodes.push(u),n=""}i.length>0?r=i[i.length-1]:r=null;break}default:n+=String.fromCharCode(s)}}return n.length>0&&t.push(_(n)),t}var c=class extends Map{constructor(i){super();this.factory=i}get(i){let r=super.get(i);return r===void 0&&(r=this.factory(i,this),this.set(i,r)),r}};var He=new Uint8Array(256);var T=new Uint8Array(256);function p(e,t){let i=0,r=[],n=0,o=e.length,l=t.charCodeAt(0);for(let s=0;s0&&a===T[i-1]&&i--;break}}return r.push(e.slice(n)),r}var tt=new c(e=>{let t=m(e),i=new Set;return v(t,(r,{parent:n})=>{let o=n===null?t:n.nodes??[];if(r.kind==="word"&&(r.value==="+"||r.value==="-"||r.value==="*"||r.value==="/")){let l=o.indexOf(r)??-1;if(l===-1)return;let s=o[l-1];if(s?.kind!=="separator"||s.value!==" ")return;let a=o[l+1];if(a?.kind!=="separator"||a.value!==" ")return;i.add(s),i.add(a)}else r.kind==="separator"&&r.value.trim()==="/"?r.value="/":r.kind==="separator"&&r.value.length>0&&r.value.trim()===""?(o[0]===r||o[o.length-1]===r)&&i.add(r):r.kind==="separator"&&r.value.trim()===","&&(r.value=",")}),i.size>0&&v(t,(r,{replaceWith:n})=>{i.has(r)&&(i.delete(r),n([]))}),D(t),h(t)});var rt=new c(e=>{let t=m(e);return t.length===3&&t[0].kind==="word"&&t[0].value==="&"&&t[1].kind==="separator"&&t[1].value===":"&&t[2].kind==="function"&&t[2].value==="is"?h(t[2].nodes):e});function D(e){for(let t of e)switch(t.kind){case"function":{if(t.value==="url"||t.value.endsWith("_url")){t.value=N(t.value);break}if(t.value==="var"||t.value.endsWith("_var")||t.value==="theme"||t.value.endsWith("_theme")){t.value=N(t.value);for(let i=0;i{let t=m(e);return t.length===1&&t[0].kind==="function"&&t[0].value==="var"});function me(e){throw new Error(`Unexpected value: ${e}`)}function N(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var w=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,pt=new RegExp(`^${w.source}$`);var dt=new RegExp(`^${w.source}%$`);var mt=new RegExp(`^${w.source}s*/s*${w.source}$`);var ge=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],gt=new RegExp(`^${w.source}(${ge.join("|")})$`);var he=["deg","rad","grad","turn"],ht=new RegExp(`^${w.source}(${he.join("|")})$`);var vt=new RegExp(`^${w.source} +${w.source} +${w.source}$`);function d(e){let t=Number(e);return Number.isInteger(t)&&t>=0&&String(t)===String(e)}function S(e,t){if(t===null)return e;let i=Number(t);return Number.isNaN(i)||(t=`${i*100}%`),t==="100%"?e:`color-mix(in oklab, ${e} ${t}, transparent)`}var ke={"--alpha":be,"--spacing":ye,"--theme":xe,theme:Ae};function be(e,t,i,...r){let[n,o]=p(i,"/").map(l=>l.trim());if(!n||!o)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${o||"50%"})\``);if(r.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${o||"50%"})\``);return S(n,o)}function ye(e,t,i,...r){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(r.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${r.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function xe(e,t,i,...r){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),t.kind==="at-rule"&&(n=!0);let o=e.resolveThemeValue(i,n);if(!o){if(r.length>0)return r.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(r.length===0)return o;let l=r.join(", ");if(l==="initial")return o;if(o==="initial")return l;if(o.startsWith("var(")||o.startsWith("theme(")||o.startsWith("--theme(")){let s=m(o);return $e(s,l),h(s)}return o}function Ae(e,t,i,...r){i=Ce(i);let n=e.resolveThemeValue(i);if(!n&&r.length>0)return r.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Ut=new RegExp(Object.keys(ke).map(e=>`${e}\\(`).join("|"));function Ce(e){if(e[0]!=="'"&&e[0]!=='"')return e;let t="",i=e[0];for(let r=1;r{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${t}`});else{let r=i.nodes[i.nodes.length-1];r.kind==="word"&&r.value==="initial"&&(r.value=t)}})}var F={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function C(e){return{__BARE_VALUE__:e}}var g=C(e=>{if(d(e.value))return e.value}),f=C(e=>{if(d(e.value))return`${e.value}%`}),y=C(e=>{if(d(e.value))return`${e.value}px`}),le=C(e=>{if(d(e.value))return`${e.value}ms`}),P=C(e=>{if(d(e.value))return`${e.value}deg`}),Ie=C(e=>{if(e.fraction===null)return;let[t,i]=p(e.fraction,"/");if(!(!d(t)||!d(i)))return e.fraction}),ae=C(e=>{if(d(Number(e.value)))return`repeat(${e.value}, minmax(0, 1fr))`}),ze={accentColor:({theme:e})=>e("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...Ie},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>({...e("brightness"),...f}),backdropContrast:({theme:e})=>({...e("contrast"),...f}),backdropGrayscale:({theme:e})=>({...e("grayscale"),...f}),backdropHueRotate:({theme:e})=>({...e("hueRotate"),...P}),backdropInvert:({theme:e})=>({...e("invert"),...f}),backdropOpacity:({theme:e})=>({...e("opacity"),...f}),backdropSaturate:({theme:e})=>({...e("saturate"),...f}),backdropSepia:({theme:e})=>({...e("sepia"),...f}),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>e("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...y},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...f},caretColor:({theme:e})=>e("colors"),colors:()=>({...F}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...g},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...f},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>({...e("borderWidth"),...y}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>e("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...e("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...g},flexShrink:{0:"0",DEFAULT:"1",...g},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...f},grayscale:{0:"0",DEFAULT:"100%",...f},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...g},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ae},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ae},height:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...P},inset:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),invert:{0:"0",DEFAULT:"100%",...f},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...g},maxHeight:({theme:e})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),maxWidth:({theme:e})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e("spacing")}),minHeight:({theme:e})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),minWidth:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...f},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...g},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:"currentcolor",...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...P},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...f},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...f},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:e})=>e("spacing"),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%",...f},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...P},space:({theme:e})=>e("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...g},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},textIndent:({theme:e})=>e("spacing"),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...y},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...le},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...le},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...e("spacing")}),size:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),width:({theme:e})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...e("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...g}};function O(e){let t={};for(let[i,r]of Object.entries(e??{}))if(i!=="__CSS_VALUES__")if(typeof r=="object"&&r!==null)for(let[n,o]of Object.entries(O(r)))t[`${i}${n==="DEFAULT"?"":`-${n}`}`]=o;else t[i]=r;if("__CSS_VALUES__"in e)for(let[i,r]of Object.entries(e.__CSS_VALUES__))(Number(r)&4)===0&&(t[i]=e[i]);return t}module.exports=O; diff --git a/node_modules/tailwindcss/dist/flatten-color-palette.mjs b/node_modules/tailwindcss/dist/flatten-color-palette.mjs new file mode 100644 index 0000000..d047645 --- /dev/null +++ b/node_modules/tailwindcss/dist/flatten-color-palette.mjs @@ -0,0 +1 @@ +import"./chunk-4WXWQT6Y.mjs";import"./chunk-G32FJCSR.mjs";import"./chunk-HTB5LLOP.mjs";function i(r){let n={};for(let[e,t]of Object.entries(r??{}))if(e!=="__CSS_VALUES__")if(typeof t=="object"&&t!==null)for(let[o,f]of Object.entries(i(t)))n[`${e}${o==="DEFAULT"?"":`-${o}`}`]=f;else n[e]=t;if("__CSS_VALUES__"in r)for(let[e,t]of Object.entries(r.__CSS_VALUES__))(Number(t)&4)===0&&(n[e]=r[e]);return n}export{i as default}; diff --git a/node_modules/tailwindcss/dist/lib.d.mts b/node_modules/tailwindcss/dist/lib.d.mts new file mode 100644 index 0000000..df2c563 --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.d.mts @@ -0,0 +1,373 @@ +import { U as UserConfig, P as Plugin } from './types-B254mqw1.mjs'; +import { V as Variant, C as Candidate } from './resolve-config-QUZ9b-Gn.mjs'; +import './colors.mjs'; + +declare const enum ThemeOptions { + NONE = 0, + INLINE = 1, + REFERENCE = 2, + DEFAULT = 4, + STATIC = 8, + USED = 16 +} +declare class Theme { + #private; + private values; + private keyframes; + prefix: string | null; + constructor(values?: Map, keyframes?: Set); + get size(): number; + add(key: string, value: string, options?: ThemeOptions, src?: Declaration['src']): void; + keysInNamespaces(themeKeys: Iterable): string[]; + get(themeKeys: ThemeKey[]): string | null; + hasDefault(key: string): boolean; + getOptions(key: string): ThemeOptions; + entries(): IterableIterator<[string, { + value: string; + options: ThemeOptions; + src: Declaration["src"]; + }]> | [string, { + value: string; + options: ThemeOptions; + src: Declaration["src"]; + }][]; + prefixKey(key: string): string; + clearNamespace(namespace: string, clearOptions: ThemeOptions): void; + markUsedVariable(themeKey: string): boolean; + resolve(candidateValue: string | null, themeKeys: ThemeKey[], options?: ThemeOptions): string | null; + resolveValue(candidateValue: string | null, themeKeys: ThemeKey[]): string | null; + resolveWith(candidateValue: string, themeKeys: ThemeKey[], nestedKeys?: `--${string}`[]): [string, Record] | null; + namespace(namespace: string): Map; + addKeyframes(value: AtRule): void; + getKeyframes(): AtRule[]; +} +type ThemeKey = `--${string}`; + +type VariantFn = (rule: Rule, variant: Extract) => null | void; +type CompareFn = (a: Variant, z: Variant) => number; +declare const enum Compounds { + Never = 0, + AtRules = 1, + StyleRules = 2 +} +declare class Variants { + compareFns: Map; + variants: Map; + compoundsWith: Compounds; + compounds: Compounds; + }>; + private completions; + /** + * Registering a group of variants should result in the same sort number for + * all the variants. This is to ensure that the variants are applied in the + * correct order. + */ + private groupOrder; + /** + * Keep track of the last sort order instead of using the size of the map to + * avoid unnecessarily skipping order numbers. + */ + private lastOrder; + static(name: string, applyFn: VariantFn<'static'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + fromAst(name: string, ast: AstNode[]): void; + functional(name: string, applyFn: VariantFn<'functional'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + compound(name: string, compoundsWith: Compounds, applyFn: VariantFn<'compound'>, { compounds, order }?: { + compounds?: Compounds; + order?: number; + }): void; + group(fn: () => void, compareFn?: CompareFn): void; + has(name: string): boolean; + get(name: string): { + kind: Variant["kind"]; + order: number; + applyFn: VariantFn; + compoundsWith: Compounds; + compounds: Compounds; + } | undefined; + kind(name: string): "static" | "arbitrary" | "functional" | "compound"; + compoundsWith(parent: string, child: string | Variant): boolean; + suggest(name: string, suggestions: () => string[]): void; + getCompletions(name: string): string[]; + compare(a: Variant | null, z: Variant | null): number; + keys(): IterableIterator; + entries(): IterableIterator<[string, { + kind: Variant["kind"]; + order: number; + applyFn: VariantFn; + compoundsWith: Compounds; + compounds: Compounds; + }]>; + private set; + private nextOrder; +} + +declare function compileAstNodes(candidate: Candidate, designSystem: DesignSystem): { + node: AstNode; + propertySort: { + order: number[]; + count: number; + }; +}[]; + +interface ClassMetadata { + modifiers: string[]; +} +type ClassEntry = [string, ClassMetadata]; +interface SelectorOptions { + modifier?: string; + value?: string; +} +interface VariantEntry { + name: string; + isArbitrary: boolean; + values: string[]; + hasDash: boolean; + selectors: (options: SelectorOptions) => string[]; +} + +type CompileFn = (value: Extract) => AstNode[] | undefined | null; +interface SuggestionGroup { + supportsNegative?: boolean; + values: (string | null)[]; + modifiers: string[]; +} +type UtilityOptions = { + types: string[]; +}; +type Utility = { + kind: 'static' | 'functional'; + compileFn: CompileFn; + options?: UtilityOptions; +}; +declare class Utilities { + private utilities; + private completions; + static(name: string, compileFn: CompileFn<'static'>): void; + functional(name: string, compileFn: CompileFn<'functional'>, options?: UtilityOptions): void; + has(name: string, kind: 'static' | 'functional'): boolean; + get(name: string): Utility[]; + getCompletions(name: string): SuggestionGroup[]; + suggest(name: string, groups: () => SuggestionGroup[]): void; + keys(kind: 'static' | 'functional'): string[]; +} + +type DesignSystem = { + theme: Theme; + utilities: Utilities; + variants: Variants; + invalidCandidates: Set; + important: boolean; + getClassOrder(classes: string[]): [string, bigint | null][]; + getClassList(): ClassEntry[]; + getVariants(): VariantEntry[]; + parseCandidate(candidate: string): Readonly[]; + parseVariant(variant: string): Readonly | null; + compileAstNodes(candidate: Candidate): ReturnType; + printCandidate(candidate: Candidate): string; + printVariant(variant: Variant): string; + getVariantOrder(): Map; + resolveThemeValue(path: string, forceInline?: boolean): string | undefined; + trackUsedVariables(raw: string): void; + candidatesToCss(classes: string[]): (string | null)[]; +}; + +/** + * The source code for one or more nodes in the AST + * + * This generally corresponds to a stylesheet + */ +interface Source { + /** + * The path to the file that contains the referenced source code + * + * If this references the *output* source code, this is `null`. + */ + file: string | null; + /** + * The referenced source code + */ + code: string; +} +/** + * The file and offsets within it that this node covers + * + * This can represent either: + * - A location in the original CSS which caused this node to be created + * - A location in the output CSS where this node resides + */ +type SourceLocation = [source: Source, start: number, end: number]; + +type StyleRule = { + kind: 'rule'; + selector: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type AtRule = { + kind: 'at-rule'; + name: string; + params: string; + nodes: AstNode[]; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Declaration = { + kind: 'declaration'; + property: string; + value: string | undefined; + important: boolean; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Comment = { + kind: 'comment'; + value: string; + src?: SourceLocation; + dst?: SourceLocation; +}; +type Context = { + kind: 'context'; + context: Record; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type AtRoot = { + kind: 'at-root'; + nodes: AstNode[]; + src?: undefined; + dst?: undefined; +}; +type Rule = StyleRule | AtRule; +type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot; + +/** + * Line offset tables are the key to generating our source maps. They allow us + * to store indexes with our AST nodes and later convert them into positions as + * when given the source that the indexes refer to. + */ +/** + * A position in source code + * + * https://tc39.es/ecma426/#sec-position-record-type + */ +interface Position { + /** The line number, one-based */ + line: number; + /** The column/character number, one-based */ + column: number; +} + +interface OriginalPosition extends Position { + source: DecodedSource; +} +/** + * A "decoded" sourcemap + * + * @see https://tc39.es/ecma426/#decoded-source-map-record + */ +interface DecodedSourceMap { + file: string | null; + sources: DecodedSource[]; + mappings: DecodedMapping[]; +} +/** + * A "decoded" source + * + * @see https://tc39.es/ecma426/#decoded-source-record + */ +interface DecodedSource { + url: string | null; + content: string | null; + ignore: boolean; +} +/** + * A "decoded" mapping + * + * @see https://tc39.es/ecma426/#decoded-mapping-record + */ +interface DecodedMapping { + originalPosition: OriginalPosition | null; + generatedPosition: Position; + name: string | null; +} + +type Config = UserConfig; +declare const enum Polyfills { + None = 0, + AtProperty = 1, + ColorMix = 2, + All = 3 +} +type CompileOptions = { + base?: string; + from?: string; + polyfills?: Polyfills; + loadModule?: (id: string, base: string, resourceHint: 'plugin' | 'config') => Promise<{ + path: string; + base: string; + module: Plugin | Config; + }>; + loadStylesheet?: (id: string, base: string) => Promise<{ + path: string; + base: string; + content: string; + }>; +}; +type Root = null | 'none' | { + base: string; + pattern: string; +}; +declare const enum Features { + None = 0, + AtApply = 1, + AtImport = 2, + JsPluginCompat = 4, + ThemeFunction = 8, + Utilities = 16, + Variants = 32 +} +declare function compileAst(input: AstNode[], opts?: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: Root; + features: Features; + build(candidates: string[]): AstNode[]; +}>; + +declare function compile(css: string, opts?: CompileOptions): Promise<{ + sources: { + base: string; + pattern: string; + negated: boolean; + }[]; + root: Root; + features: Features; + build(candidates: string[]): string; + buildSourceMap(): DecodedSourceMap; +}>; +declare function __unstable__loadDesignSystem(css: string, opts?: CompileOptions): Promise; +declare function postcssPluginWarning(): void; + +export { type Config, type DecodedSourceMap, Features, Polyfills, __unstable__loadDesignSystem, compile, compileAst, postcssPluginWarning as default }; diff --git a/node_modules/tailwindcss/dist/lib.d.ts b/node_modules/tailwindcss/dist/lib.d.ts new file mode 100644 index 0000000..411ce06 --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.d.ts @@ -0,0 +1,3 @@ +declare function postcssPluginWarning(): void; + +export { postcssPluginWarning as default }; diff --git a/node_modules/tailwindcss/dist/lib.js b/node_modules/tailwindcss/dist/lib.js new file mode 100644 index 0000000..c62b83b --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.js @@ -0,0 +1,35 @@ +"use strict";var xi=Object.defineProperty;var Ai=(t,r)=>{for(var i in r)xi(t,i,{get:r[i],enumerable:!0})};var vt={};Ai(vt,{Features:()=>Se,Polyfills:()=>tt,__unstable__loadDesignSystem:()=>uo,compile:()=>so,compileAst:()=>yi,default:()=>We});var Mt="4.1.11";var Pe=92,Be=47,qe=42,Wt=34,Bt=39,Ni=58,Ge=59,ne=10,Ye=13,Oe=32,He=9,qt=123,kt=125,xt=40,Ht=41,$i=91,Vi=93,Gt=45,bt=64,Si=33;function ve(t,r){let i=r?.from?{file:r.from,code:t}:null;t[0]==="\uFEFF"&&(t=" "+t.slice(1));let e=[],n=[],s=[],a=null,f=null,u="",c="",d=0,m;for(let g=0;g0&&t[b]===v[v.length-1]&&(v=v.slice(0,-1));let V=yt(u,y);if(!V)throw new Error("Invalid custom property, expected a value");i&&(V.src=[i,x,g],V.dst=[i,x,g]),a?a.nodes.push(V):e.push(V),u=""}else if(w===Ge&&u.charCodeAt(0)===bt)f=_e(u),i&&(f.src=[i,d,g],f.dst=[i,d,g]),a?a.nodes.push(f):e.push(f),u="",f=null;else if(w===Ge&&c[c.length-1]!==")"){let v=yt(u);if(!v)throw u.length===0?new Error("Unexpected semicolon"):new Error(`Invalid declaration: \`${u.trim()}\``);i&&(v.src=[i,d,g],v.dst=[i,d,g]),a?a.nodes.push(v):e.push(v),u=""}else if(w===qt&&c[c.length-1]!==")")c+="}",f=G(u.trim()),i&&(f.src=[i,d,g],f.dst=[i,d,g]),a&&a.nodes.push(f),s.push(a),a=f,u="",f=null;else if(w===kt&&c[c.length-1]!==")"){if(c==="")throw new Error("Missing opening {");if(c=c.slice(0,-1),u.length>0)if(u.charCodeAt(0)===bt)f=_e(u),i&&(f.src=[i,d,g],f.dst=[i,d,g]),a?a.nodes.push(f):e.push(f),u="",f=null;else{let x=u.indexOf(":");if(a){let y=yt(u,x);if(!y)throw new Error(`Invalid declaration: \`${u.trim()}\``);i&&(y.src=[i,d,g],y.dst=[i,d,g]),a.nodes.push(y)}}let v=s.pop()??null;v===null&&a&&e.push(a),a=v,u="",f=null}else if(w===xt)c+=")",u+="(";else if(w===Ht){if(c[c.length-1]!==")")throw new Error("Missing opening (");c=c.slice(0,-1),u+=")"}else{if(u.length===0&&(w===Oe||w===ne||w===He))continue;u===""&&(d=g),u+=String.fromCharCode(w)}}}if(u.charCodeAt(0)===bt){let g=_e(u);i&&(g.src=[i,d,t.length],g.dst=[i,d,t.length]),e.push(g)}if(c.length>0&&a){if(a.kind==="rule")throw new Error(`Missing closing } at ${a.selector}`);if(a.kind==="at-rule")throw new Error(`Missing closing } at ${a.name} ${a.params}`)}return n.length>0?n.concat(e):e}function _e(t,r=[]){let i=t,e="";for(let n=5;n=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&a===45){s+="\\"+n.toString(16)+" ";continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(e);continue}s+="\\"+r.charAt(e)}return s}function we(t){return t.replace(/\\([\dA-Fa-f]{1,6}[\t\n\f\r ]?|[\S\s])/g,r=>r.length>2?String.fromCodePoint(Number.parseInt(r.slice(1).trim(),16)):r[1])}var Jt=new Map([["--font",["--font-weight","--font-size"]],["--inset",["--inset-shadow","--inset-ring"]],["--text",["--text-color","--text-decoration-color","--text-decoration-thickness","--text-indent","--text-shadow","--text-underline-offset"]]]);function Zt(t,r){return(Jt.get(r)??[]).some(i=>t===i||t.startsWith(`${i}-`))}var Je=class{constructor(r=new Map,i=new Set([])){this.values=r;this.keyframes=i}prefix=null;get size(){return this.values.size}add(r,i,e=0,n){if(r.endsWith("-*")){if(i!=="initial")throw new Error(`Invalid theme value \`${i}\` for namespace \`${r}\``);r==="--*"?this.values.clear():this.clearNamespace(r.slice(0,-2),0)}if(e&4){let s=this.values.get(r);if(s&&!(s.options&4))return}i==="initial"?this.values.delete(r):this.values.set(r,{value:i,options:e,src:n})}keysInNamespaces(r){let i=[];for(let e of r){let n=`${e}-`;for(let s of this.values.keys())s.startsWith(n)&&s.indexOf("--",2)===-1&&(Zt(s,e)||i.push(s.slice(n.length)))}return i}get(r){for(let i of r){let e=this.values.get(i);if(e)return e.value}return null}hasDefault(r){return(this.getOptions(r)&4)===4}getOptions(r){return r=we(this.#r(r)),this.values.get(r)?.options??0}entries(){return this.prefix?Array.from(this.values,r=>(r[0]=this.prefixKey(r[0]),r)):this.values.entries()}prefixKey(r){return this.prefix?`--${this.prefix}-${r.slice(2)}`:r}#r(r){return this.prefix?`--${r.slice(3+this.prefix.length)}`:r}clearNamespace(r,i){let e=Jt.get(r)??[];e:for(let n of this.values.keys())if(n.startsWith(r)){if(i!==0&&(this.getOptions(n)&i)!==i)continue;for(let s of e)if(n.startsWith(s))continue e;this.values.delete(n)}}#e(r,i){for(let e of i){let n=r!==null?`${e}-${r}`:e;if(!this.values.has(n))if(r!==null&&r.includes(".")){if(n=`${e}-${r.replaceAll(".","_")}`,!this.values.has(n))continue}else continue;if(!Zt(n,e))return n}return null}#t(r){let i=this.values.get(r);if(!i)return null;let e=null;return i.options&2&&(e=i.value),`var(${de(this.prefixKey(r))}${e?`, ${e}`:""})`}markUsedVariable(r){let i=we(this.#r(r)),e=this.values.get(i);if(!e)return!1;let n=e.options&16;return e.options|=16,!n}resolve(r,i,e=0){let n=this.#e(r,i);if(!n)return null;let s=this.values.get(n);return(e|s.options)&1?s.value:this.#t(n)}resolveValue(r,i){let e=this.#e(r,i);return e?this.values.get(e).value:null}resolveWith(r,i,e=[]){let n=this.#e(r,i);if(!n)return null;let s={};for(let f of e){let u=`${n}${f}`,c=this.values.get(u);c&&(c.options&1?s[f]=c.value:s[f]=this.#t(u))}let a=this.values.get(n);return a.options&1?[a.value,s]:[this.#t(n),s]}namespace(r){let i=new Map,e=`${r}-`;for(let[n,s]of this.values)n===r?i.set(null,s.value):n.startsWith(`${e}-`)?i.set(n.slice(r.length),s.value):n.startsWith(e)&&i.set(n.slice(e.length),s.value);return i}addKeyframes(r){this.keyframes.add(r)}getKeyframes(){return Array.from(this.keyframes)}};var B=class extends Map{constructor(i){super();this.factory=i}get(i){let e=super.get(i);return e===void 0&&(e=this.factory(i,this),this.set(i,e)),e}};function Ct(t){return{kind:"word",value:t}}function Ei(t,r){return{kind:"function",value:t,nodes:r}}function Ti(t){return{kind:"separator",value:t}}function ee(t,r,i=null){for(let e=0;e0){let m=Ct(n);e?e.nodes.push(m):r.push(m),n=""}let u=a,c=a+1;for(;c0){let c=Ct(n);u?.nodes.push(c),n=""}i.length>0?e=i[i.length-1]:e=null;break}default:n+=String.fromCharCode(f)}}return n.length>0&&r.push(Ct(n)),r}function Qe(t){let r=[];return ee(q(t),i=>{if(!(i.kind!=="function"||i.value!=="var"))return ee(i.nodes,e=>{e.kind!=="word"||e.value[0]!=="-"||e.value[1]!=="-"||r.push(e.value)}),1}),r}var Ki=64;function M(t,r=[]){return{kind:"rule",selector:t,nodes:r}}function F(t,r="",i=[]){return{kind:"at-rule",name:t,params:r,nodes:i}}function G(t,r=[]){return t.charCodeAt(0)===Ki?_e(t,r):M(t,r)}function l(t,r,i=!1){return{kind:"declaration",property:t,value:r,important:i}}function Ze(t){return{kind:"comment",value:t}}function se(t,r){return{kind:"context",context:t,nodes:r}}function z(t){return{kind:"at-root",nodes:t}}function I(t,r,i=[],e={}){for(let n=0;nnew Set),a=new B(()=>new Set),f=new Set,u=new Set,c=[],d=[],m=new B(()=>new Set);function g(v,x,y={},V=0){if(v.kind==="declaration"){if(v.property==="--tw-sort"||v.value===void 0||v.value===null)return;if(y.theme&&v.property[0]==="-"&&v.property[1]==="-"){if(v.value==="initial"){v.value=void 0;return}y.keyframes||s.get(x).add(v)}if(v.value.includes("var("))if(y.theme&&v.property[0]==="-"&&v.property[1]==="-")for(let b of Qe(v.value))m.get(b).add(v.property);else r.trackUsedVariables(v.value);if(v.property==="animation")for(let b of sr(v.value))u.add(b);i&2&&v.value.includes("color-mix(")&&a.get(x).add(v),x.push(v)}else if(v.kind==="rule")if(v.selector==="&")for(let b of v.nodes){let S=[];g(b,S,y,V+1),S.length>0&&x.push(...S)}else{let b={...v,nodes:[]};for(let S of v.nodes)g(S,b.nodes,y,V+1);b.nodes.length>0&&x.push(b)}else if(v.kind==="at-rule"&&v.name==="@property"&&V===0){if(n.has(v.params))return;if(i&1){let S=v.params,R=null,L=!1;for(let K of v.nodes)K.kind==="declaration"&&(K.property==="initial-value"?R=K.value:K.property==="inherits"&&(L=K.value==="true"));let P=l(S,R??"initial");P.src=v.src,L?c.push(P):d.push(P)}n.add(v.params);let b={...v,nodes:[]};for(let S of v.nodes)g(S,b.nodes,y,V+1);x.push(b)}else if(v.kind==="at-rule"){v.name==="@keyframes"&&(y={...y,keyframes:!0});let b={...v,nodes:[]};for(let S of v.nodes)g(S,b.nodes,y,V+1);v.name==="@keyframes"&&y.theme&&f.add(b),(b.nodes.length>0||b.name==="@layer"||b.name==="@charset"||b.name==="@custom-media"||b.name==="@namespace"||b.name==="@import")&&x.push(b)}else if(v.kind==="at-root")for(let b of v.nodes){let S=[];g(b,S,y,0);for(let R of S)e.push(R)}else if(v.kind==="context"){if(v.context.reference)return;for(let b of v.nodes)g(b,x,{...y,...v.context},V)}else v.kind==="comment"&&x.push(v)}let w=[];for(let v of t)g(v,w,{},0);e:for(let[v,x]of s)for(let y of x){if(ur(y.property,r.theme,m)){if(y.property.startsWith(r.theme.prefixKey("--animate-")))for(let S of sr(y.value))u.add(S);continue}let b=v.indexOf(y);if(v.splice(b,1),v.length===0){let S=Ui(w,R=>R.kind==="rule"&&R.nodes===v);if(!S||S.length===0)continue e;S.unshift({kind:"at-root",nodes:w});do{let R=S.pop();if(!R)break;let L=S[S.length-1];if(!L||L.kind!=="at-root"&&L.kind!=="at-rule")break;let P=L.nodes.indexOf(R);if(P===-1)break;L.nodes.splice(P,1)}while(!0);continue e}}for(let v of f)if(!u.has(v.params)){let x=e.indexOf(v);e.splice(x,1)}if(w=w.concat(e),i&2)for(let[v,x]of a)for(let y of x){let V=v.indexOf(y);if(V===-1||y.value==null)continue;let b=q(y.value),S=!1;if(ee(b,(P,{replaceWith:K})=>{if(P.kind!=="function"||P.value!=="color-mix")return;let _=!1,H=!1;if(ee(P.nodes,(j,{replaceWith:W})=>{if(j.kind=="word"&&j.value.toLowerCase()==="currentcolor"){H=!0,S=!0;return}let J=j,ie=null,o=new Set;do{if(J.kind!=="function"||J.value!=="var")return;let p=J.nodes[0];if(!p||p.kind!=="word")return;let h=p.value;if(o.has(h)){_=!0;return}if(o.add(h),S=!0,ie=r.theme.resolveValue(null,[p.value]),!ie){_=!0;return}if(ie.toLowerCase()==="currentcolor"){H=!0;return}ie.startsWith("var(")?J=q(ie)[0]:J=null}while(J);W({kind:"word",value:ie})}),_||H){let j=P.nodes.findIndex(J=>J.kind==="separator"&&J.value.trim().includes(","));if(j===-1)return;let W=P.nodes.length>j?P.nodes[j+1]:null;if(!W)return;K(W)}else if(S){let j=P.nodes[2];j.kind==="word"&&(j.value==="oklab"||j.value==="oklch"||j.value==="lab"||j.value==="lch")&&(j.value="srgb")}}),!S)continue;let R={...y,value:Z(b)},L=G("@supports (color: color-mix(in lab, red, red))",[y]);L.src=y.src,v.splice(V,1,R,L)}if(i&1){let v=[];if(c.length>0){let x=G(":root, :host",c);x.src=c[0].src,v.push(x)}if(d.length>0){let x=G("*, ::before, ::after, ::backdrop",d);x.src=d[0].src,v.push(x)}if(v.length>0){let x=w.findIndex(b=>!(b.kind==="comment"||b.kind==="at-rule"&&(b.name==="@charset"||b.name==="@import"))),y=F("@layer","properties",[]);y.src=v[0].src,w.splice(x<0?w.length:x,0,y);let V=G("@layer properties",[F("@supports","((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))",v)]);V.src=v[0].src,V.nodes[0].src=v[0].src,w.push(V)}}return w}function oe(t,r){let i=0,e={file:null,code:""};function n(a,f=0){let u="",c=" ".repeat(f);if(a.kind==="declaration"){if(u+=`${c}${a.property}: ${a.value}${a.important?" !important":""}; +`,r){i+=c.length;let d=i;i+=a.property.length,i+=2,i+=a.value?.length??0,a.important&&(i+=11);let m=i;i+=2,a.dst=[e,d,m]}}else if(a.kind==="rule"){if(u+=`${c}${a.selector} { +`,r){i+=c.length;let d=i;i+=a.selector.length,i+=1;let m=i;a.dst=[e,d,m],i+=2}for(let d of a.nodes)u+=n(d,f+1);u+=`${c}} +`,r&&(i+=c.length,i+=2)}else if(a.kind==="at-rule"){if(a.nodes.length===0){let d=`${c}${a.name} ${a.params}; +`;if(r){i+=c.length;let m=i;i+=a.name.length,i+=1,i+=a.params.length;let g=i;i+=2,a.dst=[e,m,g]}return d}if(u+=`${c}${a.name}${a.params?` ${a.params} `:" "}{ +`,r){i+=c.length;let d=i;i+=a.name.length,a.params&&(i+=1,i+=a.params.length),i+=1;let m=i;a.dst=[e,d,m],i+=2}for(let d of a.nodes)u+=n(d,f+1);u+=`${c}} +`,r&&(i+=c.length,i+=2)}else if(a.kind==="comment"){if(u+=`${c}/*${a.value}*/ +`,r){i+=c.length;let d=i;i+=2+a.value.length+2;let m=i;a.dst=[e,d,m],i+=1}}else if(a.kind==="context"||a.kind==="at-root")return"";return u}let s="";for(let a of t)s+=n(a,0);return e.code=s,s}function Ui(t,r){let i=[];return I(t,(e,{path:n})=>{if(r(e))return i=[...n],2}),i}function ur(t,r,i,e=new Set){if(e.has(t)||(e.add(t),r.getOptions(t)&24))return!0;{let s=i.get(t)??[];for(let a of s)if(ur(a,r,i,e))return!0}return!1}function sr(t){return t.split(/[\s,]+/)}var Nt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function De(t){return t.indexOf("(")!==-1&&Nt.some(r=>t.includes(`${r}(`))}function cr(t){if(!Nt.some(s=>t.includes(s)))return t;let r="",i=[],e=null,n=null;for(let s=0;s=48&&a<=57||e!==null&&(a===37||a>=97&&a<=122||a>=65&&a<=90)?e=s:(n=e,e=null),a===40){r+=t[s];let f=s;for(let c=s-1;c>=0;c--){let d=t.charCodeAt(c);if(d>=48&&d<=57)f=c;else if(d>=97&&d<=122)f=c;else break}let u=t.slice(f,s);if(Nt.includes(u)){i.unshift(!0);continue}else if(i[0]&&u===""){i.unshift(!0);continue}i.unshift(!1);continue}else if(a===41)r+=t[s],i.shift();else if(a===44&&i[0]){r+=", ";continue}else{if(a===32&&i[0]&&r.charCodeAt(r.length-1)===32)continue;if((a===43||a===42||a===47||a===45)&&i[0]){let f=r.trimEnd(),u=f.charCodeAt(f.length-1),c=f.charCodeAt(f.length-2),d=t.charCodeAt(s+1);if((u===101||u===69)&&c>=48&&c<=57){r+=t[s];continue}else if(u===43||u===42||u===47||u===45){r+=t[s];continue}else if(u===40||u===44){r+=t[s];continue}else t.charCodeAt(s-1)===32?r+=`${t[s]} `:u>=48&&u<=57||d>=48&&d<=57||u===41||d===40||d===43||d===42||d===47||d===45||n!==null&&n===s-1?r+=` ${t[s]} `:r+=t[s]}else r+=t[s]}}return r}function me(t){if(t.indexOf("(")===-1)return Ne(t);let r=q(t);return $t(r),t=Z(r),t=cr(t),t}function Ne(t,r=!1){let i="";for(let e=0;e0&&n===Vt[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var rt=new Uint8Array(256);function D(t,r){let i=0,e=[],n=0,s=t.length,a=r.charCodeAt(0);for(let f=0;f0&&u===rt[i-1]&&i--;break}}return e.push(t.slice(n)),e}var ji=58,fr=45,pr=97,dr=122;function*mr(t,r){let i=D(t,":");if(r.theme.prefix){if(i.length===1||i[0]!==r.theme.prefix)return null;i.shift()}let e=i.pop(),n=[];for(let m=i.length-1;m>=0;--m){let g=r.parseVariant(i[m]);if(g===null)return;n.push(g)}let s=!1;e[e.length-1]==="!"?(s=!0,e=e.slice(0,-1)):e[0]==="!"&&(s=!0,e=e.slice(1)),r.utilities.has(e,"static")&&!e.includes("[")&&(yield{kind:"static",root:e,variants:n,important:s,raw:t});let[a,f=null,u]=D(e,"/");if(u)return;let c=f===null?null:St(f);if(f!==null&&c===null)return;if(a[0]==="["){if(a[a.length-1]!=="]")return;let m=a.charCodeAt(1);if(m!==fr&&!(m>=pr&&m<=dr))return;a=a.slice(1,-1);let g=a.indexOf(":");if(g===-1||g===0||g===a.length-1)return;let w=a.slice(0,g),v=me(a.slice(g+1));if(!ce(v))return;yield{kind:"arbitrary",property:w,value:v,modifier:c,variants:n,important:s,raw:t};return}let d;if(a[a.length-1]==="]"){let m=a.indexOf("-[");if(m===-1)return;let g=a.slice(0,m);if(!r.utilities.has(g,"functional"))return;let w=a.slice(m+1);d=[[g,w]]}else if(a[a.length-1]===")"){let m=a.indexOf("-(");if(m===-1)return;let g=a.slice(0,m);if(!r.utilities.has(g,"functional"))return;let w=a.slice(m+2,-1),v=D(w,":"),x=null;if(v.length===2&&(x=v[0],w=v[1]),w[0]!=="-"||w[1]!=="-"||!ce(w))return;d=[[g,x===null?`[var(${w})]`:`[${x}:var(${w})]`]]}else d=hr(a,m=>r.utilities.has(m,"functional"));for(let[m,g]of d){let w={kind:"functional",root:m,modifier:c,value:null,variants:n,important:s,raw:t};if(g===null){yield w;continue}{let v=g.indexOf("[");if(v!==-1){if(g[g.length-1]!=="]")return;let y=me(g.slice(v+1,-1));if(!ce(y))continue;let V="";for(let b=0;b=pr&&S<=dr))break}if(y.length===0||y.trim().length===0)continue;w.value={kind:"arbitrary",dataType:V||null,value:y}}else{let y=f===null||w.modifier?.kind==="arbitrary"?null:`${g}/${f}`;w.value={kind:"named",value:g,fraction:y}}}yield w}}function St(t){if(t[0]==="["&&t[t.length-1]==="]"){let r=me(t.slice(1,-1));return!ce(r)||r.length===0||r.trim().length===0?null:{kind:"arbitrary",value:r}}return t[0]==="("&&t[t.length-1]===")"?(t=t.slice(1,-1),t[0]!=="-"||t[1]!=="-"||!ce(t)?null:(t=`var(${t})`,{kind:"arbitrary",value:me(t)})):{kind:"named",value:t}}function gr(t,r){if(t[0]==="["&&t[t.length-1]==="]"){if(t[1]==="@"&&t.includes("&"))return null;let i=me(t.slice(1,-1));if(!ce(i)||i.length===0||i.trim().length===0)return null;let e=i[0]===">"||i[0]==="+"||i[0]==="~";return!e&&i[0]!=="@"&&!i.includes("&")&&(i=`&:is(${i})`),{kind:"arbitrary",selector:i,relative:e}}{let[i,e=null,n]=D(t,"/");if(n)return null;let s=hr(i,a=>r.variants.has(a));for(let[a,f]of s)switch(r.variants.kind(a)){case"static":return f!==null||e!==null?null:{kind:"static",root:a};case"functional":{let u=e===null?null:St(e);if(e!==null&&u===null)return null;if(f===null)return{kind:"functional",root:a,modifier:u,value:null};if(f[f.length-1]==="]"){if(f[0]!=="[")continue;let c=me(f.slice(1,-1));return!ce(c)||c.length===0||c.trim().length===0?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:c}}}if(f[f.length-1]===")"){if(f[0]!=="(")continue;let c=me(f.slice(1,-1));return!ce(c)||c.length===0||c.trim().length===0||c[0]!=="-"||c[1]!=="-"?null:{kind:"functional",root:a,modifier:u,value:{kind:"arbitrary",value:`var(${c})`}}}return{kind:"functional",root:a,modifier:u,value:{kind:"named",value:f}}}case"compound":{if(f===null)return null;let u=r.parseVariant(f);if(u===null||!r.variants.compoundsWith(a,u))return null;let c=e===null?null:St(e);return e!==null&&c===null?null:{kind:"compound",root:a,modifier:c,variant:u}}}}return null}function*hr(t,r){r(t)&&(yield[t,null]);let i=t.lastIndexOf("-");for(;i>0;){let e=t.slice(0,i);if(r(e)){let n=[e,t.slice(i+1)];if(n[1]==="")break;yield n}i=t.lastIndexOf("-",i-1)}t[0]==="@"&&r("@")&&(yield["@",t.slice(1)])}function vr(t,r){let i=[];for(let n of r.variants)i.unshift(it(n));t.theme.prefix&&i.unshift(t.theme.prefix);let e="";if(r.kind==="static"&&(e+=r.root),r.kind==="functional"&&(e+=r.root,r.value))if(r.value.kind==="arbitrary"){if(r.value!==null){let n=Tt(r.value.value),s=n?r.value.value.slice(4,-1):r.value.value,[a,f]=n?["(",")"]:["[","]"];r.value.dataType?e+=`-${a}${r.value.dataType}:${$e(s)}${f}`:e+=`-${a}${$e(s)}${f}`}}else r.value.kind==="named"&&(e+=`-${r.value.value}`);return r.kind==="arbitrary"&&(e+=`[${r.property}:${$e(r.value)}]`),(r.kind==="arbitrary"||r.kind==="functional")&&(e+=wr(r.modifier)),r.important&&(e+="!"),i.push(e),i.join(":")}function wr(t){if(t===null)return"";let r=Tt(t.value),i=r?t.value.slice(4,-1):t.value,[e,n]=r?["(",")"]:["[","]"];return t.kind==="arbitrary"?`/${e}${$e(i)}${n}`:t.kind==="named"?`/${t.value}`:""}function it(t){if(t.kind==="static")return t.root;if(t.kind==="arbitrary")return`[${$e(Fi(t.selector))}]`;let r="";if(t.kind==="functional"){r+=t.root;let i=t.root!=="@";if(t.value)if(t.value.kind==="arbitrary"){let e=Tt(t.value.value),n=e?t.value.value.slice(4,-1):t.value.value,[s,a]=e?["(",")"]:["[","]"];r+=`${i?"-":""}${s}${$e(n)}${a}`}else t.value.kind==="named"&&(r+=`${i?"-":""}${t.value.value}`)}return t.kind==="compound"&&(r+=t.root,r+="-",r+=it(t.variant)),(t.kind==="functional"||t.kind==="compound")&&(r+=wr(t.modifier)),r}var Ii=new B(t=>{let r=q(t),i=new Set;return ee(r,(e,{parent:n})=>{let s=n===null?r:n.nodes??[];if(e.kind==="word"&&(e.value==="+"||e.value==="-"||e.value==="*"||e.value==="/")){let a=s.indexOf(e)??-1;if(a===-1)return;let f=s[a-1];if(f?.kind!=="separator"||f.value!==" ")return;let u=s[a+1];if(u?.kind!=="separator"||u.value!==" ")return;i.add(f),i.add(u)}else e.kind==="separator"&&e.value.trim()==="/"?e.value="/":e.kind==="separator"&&e.value.length>0&&e.value.trim()===""?(s[0]===e||s[s.length-1]===e)&&i.add(e):e.kind==="separator"&&e.value.trim()===","&&(e.value=",")}),i.size>0&&ee(r,(e,{replaceWith:n})=>{i.has(e)&&(i.delete(e),n([]))}),Et(r),Z(r)});function $e(t){return Ii.get(t)}var zi=new B(t=>{let r=q(t);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?Z(r[2].nodes):t});function Fi(t){return zi.get(t)}function Et(t){for(let r of t)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=Ke(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=Ke(r.value);for(let i=0;i{let r=q(t);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function Tt(t){return Mi.get(t)}function Wi(t){throw new Error(`Unexpected value: ${t}`)}function Ke(t){return t.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}function ye(t,r,i){if(t===r)return 0;let e=t.indexOf("("),n=r.indexOf("("),s=e===-1?t.replace(/[\d.]+/g,""):t.slice(0,e),a=n===-1?r.replace(/[\d.]+/g,""):r.slice(0,n),f=(s===a?0:snt(r)||yr(r)||r==="thin"||r==="medium"||r==="thick")}var Zi=/^(?:element|image|cross-fade|image-set)\(/,Ji=/^(repeating-)?(conic|linear|radial)-gradient\(/;function Qi(t){let r=0;for(let i of D(t,","))if(!i.startsWith("var(")){if(br(i)){r+=1;continue}if(Ji.test(i)){r+=1;continue}if(Zi.test(i)){r+=1;continue}return!1}return r>0}function Xi(t){return t==="serif"||t==="sans-serif"||t==="monospace"||t==="cursive"||t==="fantasy"||t==="system-ui"||t==="ui-serif"||t==="ui-sans-serif"||t==="ui-monospace"||t==="ui-rounded"||t==="math"||t==="emoji"||t==="fangsong"}function en(t){let r=0;for(let i of D(t,",")){let e=i.charCodeAt(0);if(e>=48&&e<=57)return!1;i.startsWith("var(")||(r+=1)}return r>0}function tn(t){return t==="xx-small"||t==="x-small"||t==="small"||t==="medium"||t==="large"||t==="x-large"||t==="xx-large"||t==="xxx-large"}function rn(t){return t==="larger"||t==="smaller"}var fe=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,nn=new RegExp(`^${fe.source}$`);function yr(t){return nn.test(t)||De(t)}var on=new RegExp(`^${fe.source}%$`);function Rt(t){return on.test(t)||De(t)}var ln=new RegExp(`^${fe.source}s*/s*${fe.source}$`);function an(t){return ln.test(t)||De(t)}var sn=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],un=new RegExp(`^${fe.source}(${sn.join("|")})$`);function nt(t){return un.test(t)||De(t)}function cn(t){let r=0;for(let i of D(t," ")){if(i==="center"||i==="top"||i==="right"||i==="bottom"||i==="left"){r+=1;continue}if(!i.startsWith("var(")){if(nt(i)||Rt(i)){r+=1;continue}return!1}}return r>0}function fn(t){let r=0;for(let i of D(t,",")){if(i==="cover"||i==="contain"){r+=1;continue}let e=D(i," ");if(e.length!==1&&e.length!==2)return!1;if(e.every(n=>n==="auto"||nt(n)||Rt(n))){r+=1;continue}}return r>0}var pn=["deg","rad","grad","turn"],dn=new RegExp(`^${fe.source}(${pn.join("|")})$`);function mn(t){return dn.test(t)}var gn=new RegExp(`^${fe.source} +${fe.source} +${fe.source}$`);function hn(t){return gn.test(t)}function T(t){let r=Number(t);return Number.isInteger(r)&&r>=0&&String(r)===String(t)}function Pt(t){let r=Number(t);return Number.isInteger(r)&&r>0&&String(r)===String(t)}function xe(t){return xr(t,.25)}function ot(t){return xr(t,.25)}function xr(t,r){let i=Number(t);return i>=0&&i%r===0&&String(i)===String(t)}var vn=new Set(["inset","inherit","initial","revert","unset"]),Ar=/^-?(\d+|\.\d+)(.*?)$/g;function Ue(t,r){return D(t,",").map(e=>{e=e.trim();let n=D(e," ").filter(c=>c.trim()!==""),s=null,a=null,f=null;for(let c of n)vn.has(c)||(Ar.test(c)?(a===null?a=c:f===null&&(f=c),Ar.lastIndex=0):s===null&&(s=c));if(a===null||f===null)return e;let u=r(s??"currentcolor");return s!==null?e.replace(s,u):`${e} ${u}`}).join(", ")}var wn=/^-?[a-z][a-zA-Z0-9/%._-]*$/,kn=/^-?[a-z][a-zA-Z0-9/%._-]*-\*$/,at=["0","0.5","1","1.5","2","2.5","3","3.5","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96"],Ot=class{utilities=new B(()=>[]);completions=new Map;static(r,i){this.utilities.get(r).push({kind:"static",compileFn:i})}functional(r,i,e){this.utilities.get(r).push({kind:"functional",compileFn:i,options:e})}has(r,i){return this.utilities.has(r)&&this.utilities.get(r).some(e=>e.kind===i)}get(r){return this.utilities.has(r)?this.utilities.get(r):[]}getCompletions(r){return this.completions.get(r)?.()??[]}suggest(r,i){this.completions.set(r,i)}keys(r){let i=[];for(let[e,n]of this.utilities.entries())for(let s of n)if(s.kind===r){i.push(e);break}return i}};function N(t,r,i){return F("@property",t,[l("syntax",i?`"${i}"`:'"*"'),l("inherits","false"),...r?[l("initial-value",r)]:[]])}function Q(t,r){if(r===null)return t;let i=Number(r);return Number.isNaN(i)||(r=`${i*100}%`),r==="100%"?t:`color-mix(in oklab, ${t} ${r}, transparent)`}function Nr(t,r){let i=Number(r);return Number.isNaN(i)||(r=`${i*100}%`),`oklab(from ${t} l a b / ${r})`}function X(t,r,i){if(!r)return t;if(r.kind==="arbitrary")return Q(t,r.value);let e=i.resolve(r.value,["--opacity"]);return e?Q(t,e):ot(r.value)?Q(t,`${r.value}%`):null}function te(t,r,i){let e=null;switch(t.value.value){case"inherit":{e="inherit";break}case"transparent":{e="transparent";break}case"current":{e="currentcolor";break}default:{e=r.resolve(t.value.value,i);break}}return e?X(e,t.modifier,r):null}var $r=/(\d+)_(\d+)/g;function Vr(t){let r=new Ot;function i(o,p){function*h(k){for(let C of t.keysInNamespaces(k))yield C.replace($r,(O,$,E)=>`${$}.${E}`)}let A=["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"];r.suggest(o,()=>{let k=[];for(let C of p()){if(typeof C=="string"){k.push({values:[C],modifiers:[]});continue}let O=[...C.values??[],...h(C.valueThemeKeys??[])],$=[...C.modifiers??[],...h(C.modifierThemeKeys??[])];C.supportsFractions&&O.push(...A),C.hasDefaultValue&&O.unshift(null),k.push({supportsNegative:C.supportsNegative,values:O,modifiers:$})}return k})}function e(o,p){r.static(o,()=>p.map(h=>typeof h=="function"?h():l(h[0],h[1])))}function n(o,p){function h({negative:A}){return k=>{let C=null,O=null;if(k.value)if(k.value.kind==="arbitrary"){if(k.modifier)return;C=k.value.value,O=k.value.dataType}else{if(C=t.resolve(k.value.fraction??k.value.value,p.themeKeys??[]),C===null&&p.supportsFractions&&k.value.fraction){let[$,E]=D(k.value.fraction,"/");if(!T($)||!T(E))return;C=`calc(${k.value.fraction} * 100%)`}if(C===null&&A&&p.handleNegativeBareValue){if(C=p.handleNegativeBareValue(k.value),!C?.includes("/")&&k.modifier)return;if(C!==null)return p.handle(C,null)}if(C===null&&p.handleBareValue&&(C=p.handleBareValue(k.value),!C?.includes("/")&&k.modifier))return}else{if(k.modifier)return;C=p.defaultValue!==void 0?p.defaultValue:t.resolve(null,p.themeKeys??[])}if(C!==null)return p.handle(A?`calc(${C} * -1)`:C,O)}}p.supportsNegative&&r.functional(`-${o}`,h({negative:!0})),r.functional(o,h({negative:!1})),i(o,()=>[{supportsNegative:p.supportsNegative,valueThemeKeys:p.themeKeys??[],hasDefaultValue:p.defaultValue!==void 0&&p.defaultValue!==null,supportsFractions:p.supportsFractions}])}function s(o,p){r.functional(o,h=>{if(!h.value)return;let A=null;if(h.value.kind==="arbitrary"?(A=h.value.value,A=X(A,h.modifier,t)):A=te(h,t,p.themeKeys),A!==null)return p.handle(A)}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:p.themeKeys,modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}function a(o,p,h,{supportsNegative:A=!1,supportsFractions:k=!1}={}){A&&r.static(`-${o}-px`,()=>h("-1px")),r.static(`${o}-px`,()=>h("1px")),n(o,{themeKeys:p,supportsFractions:k,supportsNegative:A,defaultValue:null,handleBareValue:({value:C})=>{let O=t.resolve(null,["--spacing"]);return!O||!xe(C)?null:`calc(${O} * ${C})`},handleNegativeBareValue:({value:C})=>{let O=t.resolve(null,["--spacing"]);return!O||!xe(C)?null:`calc(${O} * -${C})`},handle:h}),i(o,()=>[{values:t.get(["--spacing"])?at:[],supportsNegative:A,supportsFractions:k,valueThemeKeys:p}])}e("sr-only",[["position","absolute"],["width","1px"],["height","1px"],["padding","0"],["margin","-1px"],["overflow","hidden"],["clip","rect(0, 0, 0, 0)"],["white-space","nowrap"],["border-width","0"]]),e("not-sr-only",[["position","static"],["width","auto"],["height","auto"],["padding","0"],["margin","0"],["overflow","visible"],["clip","auto"],["white-space","normal"]]),e("pointer-events-none",[["pointer-events","none"]]),e("pointer-events-auto",[["pointer-events","auto"]]),e("visible",[["visibility","visible"]]),e("invisible",[["visibility","hidden"]]),e("collapse",[["visibility","collapse"]]),e("static",[["position","static"]]),e("fixed",[["position","fixed"]]),e("absolute",[["position","absolute"]]),e("relative",[["position","relative"]]),e("sticky",[["position","sticky"]]);for(let[o,p]of[["inset","inset"],["inset-x","inset-inline"],["inset-y","inset-block"],["start","inset-inline-start"],["end","inset-inline-end"],["top","top"],["right","right"],["bottom","bottom"],["left","left"]])e(`${o}-auto`,[[p,"auto"]]),e(`${o}-full`,[[p,"100%"]]),e(`-${o}-full`,[[p,"-100%"]]),a(o,["--inset","--spacing"],h=>[l(p,h)],{supportsNegative:!0,supportsFractions:!0});e("isolate",[["isolation","isolate"]]),e("isolation-auto",[["isolation","auto"]]),e("z-auto",[["z-index","auto"]]),n("z",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--z-index"],handle:o=>[l("z-index",o)]}),i("z",()=>[{supportsNegative:!0,values:["0","10","20","30","40","50"],valueThemeKeys:["--z-index"]}]),e("order-first",[["order","-9999"]]),e("order-last",[["order","9999"]]),n("order",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--order"],handle:o=>[l("order",o)]}),i("order",()=>[{supportsNegative:!0,values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--order"]}]),e("col-auto",[["grid-column","auto"]]),n("col",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-column"],handle:o=>[l("grid-column",o)]}),e("col-span-full",[["grid-column","1 / -1"]]),n("col-span",{handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("grid-column",`span ${o} / span ${o}`)]}),e("col-start-auto",[["grid-column-start","auto"]]),n("col-start",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-column-start"],handle:o=>[l("grid-column-start",o)]}),e("col-end-auto",[["grid-column-end","auto"]]),n("col-end",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-column-end"],handle:o=>[l("grid-column-end",o)]}),i("col-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("col-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-start"]}]),i("col-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-column-end"]}]),e("row-auto",[["grid-row","auto"]]),n("row",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-row"],handle:o=>[l("grid-row",o)]}),e("row-span-full",[["grid-row","1 / -1"]]),n("row-span",{themeKeys:[],handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("grid-row",`span ${o} / span ${o}`)]}),e("row-start-auto",[["grid-row-start","auto"]]),n("row-start",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-row-start"],handle:o=>[l("grid-row-start",o)]}),e("row-end-auto",[["grid-row-end","auto"]]),n("row-end",{supportsNegative:!0,handleBareValue:({value:o})=>T(o)?o:null,themeKeys:["--grid-row-end"],handle:o=>[l("grid-row-end",o)]}),i("row-span",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:[]}]),i("row-start",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-start"]}]),i("row-end",()=>[{supportsNegative:!0,values:Array.from({length:13},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-row-end"]}]),e("float-start",[["float","inline-start"]]),e("float-end",[["float","inline-end"]]),e("float-right",[["float","right"]]),e("float-left",[["float","left"]]),e("float-none",[["float","none"]]),e("clear-start",[["clear","inline-start"]]),e("clear-end",[["clear","inline-end"]]),e("clear-right",[["clear","right"]]),e("clear-left",[["clear","left"]]),e("clear-both",[["clear","both"]]),e("clear-none",[["clear","none"]]);for(let[o,p]of[["m","margin"],["mx","margin-inline"],["my","margin-block"],["ms","margin-inline-start"],["me","margin-inline-end"],["mt","margin-top"],["mr","margin-right"],["mb","margin-bottom"],["ml","margin-left"]])e(`${o}-auto`,[[p,"auto"]]),a(o,["--margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});e("box-border",[["box-sizing","border-box"]]),e("box-content",[["box-sizing","content-box"]]),e("line-clamp-none",[["overflow","visible"],["display","block"],["-webkit-box-orient","horizontal"],["-webkit-line-clamp","unset"]]),n("line-clamp",{themeKeys:["--line-clamp"],handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("overflow","hidden"),l("display","-webkit-box"),l("-webkit-box-orient","vertical"),l("-webkit-line-clamp",o)]}),i("line-clamp",()=>[{values:["1","2","3","4","5","6"],valueThemeKeys:["--line-clamp"]}]),e("block",[["display","block"]]),e("inline-block",[["display","inline-block"]]),e("inline",[["display","inline"]]),e("hidden",[["display","none"]]),e("inline-flex",[["display","inline-flex"]]),e("table",[["display","table"]]),e("inline-table",[["display","inline-table"]]),e("table-caption",[["display","table-caption"]]),e("table-cell",[["display","table-cell"]]),e("table-column",[["display","table-column"]]),e("table-column-group",[["display","table-column-group"]]),e("table-footer-group",[["display","table-footer-group"]]),e("table-header-group",[["display","table-header-group"]]),e("table-row-group",[["display","table-row-group"]]),e("table-row",[["display","table-row"]]),e("flow-root",[["display","flow-root"]]),e("flex",[["display","flex"]]),e("grid",[["display","grid"]]),e("inline-grid",[["display","inline-grid"]]),e("contents",[["display","contents"]]),e("list-item",[["display","list-item"]]),e("field-sizing-content",[["field-sizing","content"]]),e("field-sizing-fixed",[["field-sizing","fixed"]]),e("aspect-auto",[["aspect-ratio","auto"]]),e("aspect-square",[["aspect-ratio","1 / 1"]]),n("aspect",{themeKeys:["--aspect"],handleBareValue:({fraction:o})=>{if(o===null)return null;let[p,h]=D(o,"/");return!T(p)||!T(h)?null:o},handle:o=>[l("aspect-ratio",o)]});for(let[o,p]of[["full","100%"],["svw","100svw"],["lvw","100lvw"],["dvw","100dvw"],["svh","100svh"],["lvh","100lvh"],["dvh","100dvh"],["min","min-content"],["max","max-content"],["fit","fit-content"]])e(`size-${o}`,[["--tw-sort","size"],["width",p],["height",p]]),e(`w-${o}`,[["width",p]]),e(`h-${o}`,[["height",p]]),e(`min-w-${o}`,[["min-width",p]]),e(`min-h-${o}`,[["min-height",p]]),e(`max-w-${o}`,[["max-width",p]]),e(`max-h-${o}`,[["max-height",p]]);e("size-auto",[["--tw-sort","size"],["width","auto"],["height","auto"]]),e("w-auto",[["width","auto"]]),e("h-auto",[["height","auto"]]),e("min-w-auto",[["min-width","auto"]]),e("min-h-auto",[["min-height","auto"]]),e("h-lh",[["height","1lh"]]),e("min-h-lh",[["min-height","1lh"]]),e("max-h-lh",[["max-height","1lh"]]),e("w-screen",[["width","100vw"]]),e("min-w-screen",[["min-width","100vw"]]),e("max-w-screen",[["max-width","100vw"]]),e("h-screen",[["height","100vh"]]),e("min-h-screen",[["min-height","100vh"]]),e("max-h-screen",[["max-height","100vh"]]),e("max-w-none",[["max-width","none"]]),e("max-h-none",[["max-height","none"]]),a("size",["--size","--spacing"],o=>[l("--tw-sort","size"),l("width",o),l("height",o)],{supportsFractions:!0});for(let[o,p,h]of[["w",["--width","--spacing","--container"],"width"],["min-w",["--min-width","--spacing","--container"],"min-width"],["max-w",["--max-width","--spacing","--container"],"max-width"],["h",["--height","--spacing"],"height"],["min-h",["--min-height","--height","--spacing"],"min-height"],["max-h",["--max-height","--height","--spacing"],"max-height"]])a(o,p,A=>[l(h,A)],{supportsFractions:!0});r.static("container",()=>{let o=[...t.namespace("--breakpoint").values()];o.sort((h,A)=>ye(h,A,"asc"));let p=[l("--tw-sort","--tw-container-component"),l("width","100%")];for(let h of o)p.push(F("@media",`(width >= ${h})`,[l("max-width",h)]));return p}),e("flex-auto",[["flex","auto"]]),e("flex-initial",[["flex","0 auto"]]),e("flex-none",[["flex","none"]]),r.functional("flex",o=>{if(o.value){if(o.value.kind==="arbitrary")return o.modifier?void 0:[l("flex",o.value.value)];if(o.value.fraction){let[p,h]=D(o.value.fraction,"/");return!T(p)||!T(h)?void 0:[l("flex",`calc(${o.value.fraction} * 100%)`)]}if(T(o.value.value))return o.modifier?void 0:[l("flex",o.value.value)]}}),i("flex",()=>[{supportsFractions:!0}]),n("shrink",{defaultValue:"1",handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("flex-shrink",o)]}),n("grow",{defaultValue:"1",handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("flex-grow",o)]}),i("shrink",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),i("grow",()=>[{values:["0"],valueThemeKeys:[],hasDefaultValue:!0}]),e("basis-auto",[["flex-basis","auto"]]),e("basis-full",[["flex-basis","100%"]]),a("basis",["--flex-basis","--spacing","--container"],o=>[l("flex-basis",o)],{supportsFractions:!0}),e("table-auto",[["table-layout","auto"]]),e("table-fixed",[["table-layout","fixed"]]),e("caption-top",[["caption-side","top"]]),e("caption-bottom",[["caption-side","bottom"]]),e("border-collapse",[["border-collapse","collapse"]]),e("border-separate",[["border-collapse","separate"]]);let f=()=>z([N("--tw-border-spacing-x","0",""),N("--tw-border-spacing-y","0","")]);a("border-spacing",["--border-spacing","--spacing"],o=>[f(),l("--tw-border-spacing-x",o),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-x",["--border-spacing","--spacing"],o=>[f(),l("--tw-border-spacing-x",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),a("border-spacing-y",["--border-spacing","--spacing"],o=>[f(),l("--tw-border-spacing-y",o),l("border-spacing","var(--tw-border-spacing-x) var(--tw-border-spacing-y)")]),e("origin-center",[["transform-origin","center"]]),e("origin-top",[["transform-origin","top"]]),e("origin-top-right",[["transform-origin","top right"]]),e("origin-right",[["transform-origin","right"]]),e("origin-bottom-right",[["transform-origin","bottom right"]]),e("origin-bottom",[["transform-origin","bottom"]]),e("origin-bottom-left",[["transform-origin","bottom left"]]),e("origin-left",[["transform-origin","left"]]),e("origin-top-left",[["transform-origin","top left"]]),n("origin",{themeKeys:["--transform-origin"],handle:o=>[l("transform-origin",o)]}),e("perspective-origin-center",[["perspective-origin","center"]]),e("perspective-origin-top",[["perspective-origin","top"]]),e("perspective-origin-top-right",[["perspective-origin","top right"]]),e("perspective-origin-right",[["perspective-origin","right"]]),e("perspective-origin-bottom-right",[["perspective-origin","bottom right"]]),e("perspective-origin-bottom",[["perspective-origin","bottom"]]),e("perspective-origin-bottom-left",[["perspective-origin","bottom left"]]),e("perspective-origin-left",[["perspective-origin","left"]]),e("perspective-origin-top-left",[["perspective-origin","top left"]]),n("perspective-origin",{themeKeys:["--perspective-origin"],handle:o=>[l("perspective-origin",o)]}),e("perspective-none",[["perspective","none"]]),n("perspective",{themeKeys:["--perspective"],handle:o=>[l("perspective",o)]});let u=()=>z([N("--tw-translate-x","0"),N("--tw-translate-y","0"),N("--tw-translate-z","0")]);e("translate-none",[["translate","none"]]),e("-translate-full",[u,["--tw-translate-x","-100%"],["--tw-translate-y","-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e("translate-full",[u,["--tw-translate-x","100%"],["--tw-translate-y","100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a("translate",["--translate","--spacing"],o=>[u(),l("--tw-translate-x",o),l("--tw-translate-y",o),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});for(let o of["x","y"])e(`-translate-${o}-full`,[u,[`--tw-translate-${o}`,"-100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),e(`translate-${o}-full`,[u,[`--tw-translate-${o}`,"100%"],["translate","var(--tw-translate-x) var(--tw-translate-y)"]]),a(`translate-${o}`,["--translate","--spacing"],p=>[u(),l(`--tw-translate-${o}`,p),l("translate","var(--tw-translate-x) var(--tw-translate-y)")],{supportsNegative:!0,supportsFractions:!0});a("translate-z",["--translate","--spacing"],o=>[u(),l("--tw-translate-z",o),l("translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)")],{supportsNegative:!0}),e("translate-3d",[u,["translate","var(--tw-translate-x) var(--tw-translate-y) var(--tw-translate-z)"]]);let c=()=>z([N("--tw-scale-x","1"),N("--tw-scale-y","1"),N("--tw-scale-z","1")]);e("scale-none",[["scale","none"]]);function d({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;return p.value.kind==="arbitrary"?(h=p.value.value,h=o?`calc(${h} * -1)`:h,[l("scale",h)]):(h=t.resolve(p.value.value,["--scale"]),!h&&T(p.value.value)&&(h=`${p.value.value}%`),h?(h=o?`calc(${h} * -1)`:h,[c(),l("--tw-scale-x",h),l("--tw-scale-y",h),l("--tw-scale-z",h),l("scale","var(--tw-scale-x) var(--tw-scale-y)")]):void 0)}}r.functional("-scale",d({negative:!0})),r.functional("scale",d({negative:!1})),i("scale",()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);for(let o of["x","y","z"])n(`scale-${o}`,{supportsNegative:!0,themeKeys:["--scale"],handleBareValue:({value:p})=>T(p)?`${p}%`:null,handle:p=>[c(),l(`--tw-scale-${o}`,p),l("scale",`var(--tw-scale-x) var(--tw-scale-y)${o==="z"?" var(--tw-scale-z)":""}`)]}),i(`scale-${o}`,()=>[{supportsNegative:!0,values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--scale"]}]);e("scale-3d",[c,["scale","var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)"]]),e("rotate-none",[["rotate","none"]]);function m({negative:o}){return p=>{if(!p.value||p.modifier)return;let h;if(p.value.kind==="arbitrary"){h=p.value.value;let A=p.value.dataType??Y(h,["angle","vector"]);if(A==="vector")return[l("rotate",`${h} var(--tw-rotate)`)];if(A!=="angle")return[l("rotate",o?`calc(${h} * -1)`:h)]}else if(h=t.resolve(p.value.value,["--rotate"]),!h&&T(p.value.value)&&(h=`${p.value.value}deg`),!h)return;return[l("rotate",o?`calc(${h} * -1)`:h)]}}r.functional("-rotate",m({negative:!0})),r.functional("rotate",m({negative:!1})),i("rotate",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);{let o=["var(--tw-rotate-x,)","var(--tw-rotate-y,)","var(--tw-rotate-z,)","var(--tw-skew-x,)","var(--tw-skew-y,)"].join(" "),p=()=>z([N("--tw-rotate-x"),N("--tw-rotate-y"),N("--tw-rotate-z"),N("--tw-skew-x"),N("--tw-skew-y")]);for(let h of["x","y","z"])n(`rotate-${h}`,{supportsNegative:!0,themeKeys:["--rotate"],handleBareValue:({value:A})=>T(A)?`${A}deg`:null,handle:A=>[p(),l(`--tw-rotate-${h}`,`rotate${h.toUpperCase()}(${A})`),l("transform",o)]}),i(`rotate-${h}`,()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"],valueThemeKeys:["--rotate"]}]);n("skew",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>T(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),n("skew-x",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>T(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-x",`skewX(${h})`),l("transform",o)]}),n("skew-y",{supportsNegative:!0,themeKeys:["--skew"],handleBareValue:({value:h})=>T(h)?`${h}deg`:null,handle:h=>[p(),l("--tw-skew-y",`skewY(${h})`),l("transform",o)]}),i("skew",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-x",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),i("skew-y",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12"],valueThemeKeys:["--skew"]}]),r.functional("transform",h=>{if(h.modifier)return;let A=null;if(h.value?h.value.kind==="arbitrary"&&(A=h.value.value):A=o,A!==null)return[p(),l("transform",A)]}),i("transform",()=>[{hasDefaultValue:!0}]),e("transform-cpu",[["transform",o]]),e("transform-gpu",[["transform",`translateZ(0) ${o}`]]),e("transform-none",[["transform","none"]])}e("transform-flat",[["transform-style","flat"]]),e("transform-3d",[["transform-style","preserve-3d"]]),e("transform-content",[["transform-box","content-box"]]),e("transform-border",[["transform-box","border-box"]]),e("transform-fill",[["transform-box","fill-box"]]),e("transform-stroke",[["transform-box","stroke-box"]]),e("transform-view",[["transform-box","view-box"]]),e("backface-visible",[["backface-visibility","visible"]]),e("backface-hidden",[["backface-visibility","hidden"]]);for(let o of["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out"])e(`cursor-${o}`,[["cursor",o]]);n("cursor",{themeKeys:["--cursor"],handle:o=>[l("cursor",o)]});for(let o of["auto","none","manipulation"])e(`touch-${o}`,[["touch-action",o]]);let g=()=>z([N("--tw-pan-x"),N("--tw-pan-y"),N("--tw-pinch-zoom")]);for(let o of["x","left","right"])e(`touch-pan-${o}`,[g,["--tw-pan-x",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["y","up","down"])e(`touch-pan-${o}`,[g,["--tw-pan-y",`pan-${o}`],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);e("touch-pinch-zoom",[g,["--tw-pinch-zoom","pinch-zoom"],["touch-action","var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)"]]);for(let o of["none","text","all","auto"])e(`select-${o}`,[["-webkit-user-select",o],["user-select",o]]);e("resize-none",[["resize","none"]]),e("resize-x",[["resize","horizontal"]]),e("resize-y",[["resize","vertical"]]),e("resize",[["resize","both"]]),e("snap-none",[["scroll-snap-type","none"]]);let w=()=>z([N("--tw-scroll-snap-strictness","proximity","*")]);for(let o of["x","y","both"])e(`snap-${o}`,[w,["scroll-snap-type",`${o} var(--tw-scroll-snap-strictness)`]]);e("snap-mandatory",[w,["--tw-scroll-snap-strictness","mandatory"]]),e("snap-proximity",[w,["--tw-scroll-snap-strictness","proximity"]]),e("snap-align-none",[["scroll-snap-align","none"]]),e("snap-start",[["scroll-snap-align","start"]]),e("snap-end",[["scroll-snap-align","end"]]),e("snap-center",[["scroll-snap-align","center"]]),e("snap-normal",[["scroll-snap-stop","normal"]]),e("snap-always",[["scroll-snap-stop","always"]]);for(let[o,p]of[["scroll-m","scroll-margin"],["scroll-mx","scroll-margin-inline"],["scroll-my","scroll-margin-block"],["scroll-ms","scroll-margin-inline-start"],["scroll-me","scroll-margin-inline-end"],["scroll-mt","scroll-margin-top"],["scroll-mr","scroll-margin-right"],["scroll-mb","scroll-margin-bottom"],["scroll-ml","scroll-margin-left"]])a(o,["--scroll-margin","--spacing"],h=>[l(p,h)],{supportsNegative:!0});for(let[o,p]of[["scroll-p","scroll-padding"],["scroll-px","scroll-padding-inline"],["scroll-py","scroll-padding-block"],["scroll-ps","scroll-padding-inline-start"],["scroll-pe","scroll-padding-inline-end"],["scroll-pt","scroll-padding-top"],["scroll-pr","scroll-padding-right"],["scroll-pb","scroll-padding-bottom"],["scroll-pl","scroll-padding-left"]])a(o,["--scroll-padding","--spacing"],h=>[l(p,h)]);e("list-inside",[["list-style-position","inside"]]),e("list-outside",[["list-style-position","outside"]]),e("list-none",[["list-style-type","none"]]),e("list-disc",[["list-style-type","disc"]]),e("list-decimal",[["list-style-type","decimal"]]),n("list",{themeKeys:["--list-style-type"],handle:o=>[l("list-style-type",o)]}),e("list-image-none",[["list-style-image","none"]]),n("list-image",{themeKeys:["--list-style-image"],handle:o=>[l("list-style-image",o)]}),e("appearance-none",[["appearance","none"]]),e("appearance-auto",[["appearance","auto"]]),e("scheme-normal",[["color-scheme","normal"]]),e("scheme-dark",[["color-scheme","dark"]]),e("scheme-light",[["color-scheme","light"]]),e("scheme-light-dark",[["color-scheme","light dark"]]),e("scheme-only-dark",[["color-scheme","only dark"]]),e("scheme-only-light",[["color-scheme","only light"]]),e("columns-auto",[["columns","auto"]]),n("columns",{themeKeys:["--columns","--container"],handleBareValue:({value:o})=>T(o)?o:null,handle:o=>[l("columns",o)]}),i("columns",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--columns","--container"]}]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-before-${o}`,[["break-before",o]]);for(let o of["auto","avoid","avoid-page","avoid-column"])e(`break-inside-${o}`,[["break-inside",o]]);for(let o of["auto","avoid","all","avoid-page","page","left","right","column"])e(`break-after-${o}`,[["break-after",o]]);e("grid-flow-row",[["grid-auto-flow","row"]]),e("grid-flow-col",[["grid-auto-flow","column"]]),e("grid-flow-dense",[["grid-auto-flow","dense"]]),e("grid-flow-row-dense",[["grid-auto-flow","row dense"]]),e("grid-flow-col-dense",[["grid-auto-flow","column dense"]]),e("auto-cols-auto",[["grid-auto-columns","auto"]]),e("auto-cols-min",[["grid-auto-columns","min-content"]]),e("auto-cols-max",[["grid-auto-columns","max-content"]]),e("auto-cols-fr",[["grid-auto-columns","minmax(0, 1fr)"]]),n("auto-cols",{themeKeys:["--grid-auto-columns"],handle:o=>[l("grid-auto-columns",o)]}),e("auto-rows-auto",[["grid-auto-rows","auto"]]),e("auto-rows-min",[["grid-auto-rows","min-content"]]),e("auto-rows-max",[["grid-auto-rows","max-content"]]),e("auto-rows-fr",[["grid-auto-rows","minmax(0, 1fr)"]]),n("auto-rows",{themeKeys:["--grid-auto-rows"],handle:o=>[l("grid-auto-rows",o)]}),e("grid-cols-none",[["grid-template-columns","none"]]),e("grid-cols-subgrid",[["grid-template-columns","subgrid"]]),n("grid-cols",{themeKeys:["--grid-template-columns"],handleBareValue:({value:o})=>Pt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-columns",o)]}),e("grid-rows-none",[["grid-template-rows","none"]]),e("grid-rows-subgrid",[["grid-template-rows","subgrid"]]),n("grid-rows",{themeKeys:["--grid-template-rows"],handleBareValue:({value:o})=>Pt(o)?`repeat(${o}, minmax(0, 1fr))`:null,handle:o=>[l("grid-template-rows",o)]}),i("grid-cols",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-columns"]}]),i("grid-rows",()=>[{values:Array.from({length:12},(o,p)=>`${p+1}`),valueThemeKeys:["--grid-template-rows"]}]),e("flex-row",[["flex-direction","row"]]),e("flex-row-reverse",[["flex-direction","row-reverse"]]),e("flex-col",[["flex-direction","column"]]),e("flex-col-reverse",[["flex-direction","column-reverse"]]),e("flex-wrap",[["flex-wrap","wrap"]]),e("flex-nowrap",[["flex-wrap","nowrap"]]),e("flex-wrap-reverse",[["flex-wrap","wrap-reverse"]]),e("place-content-center",[["place-content","center"]]),e("place-content-start",[["place-content","start"]]),e("place-content-end",[["place-content","end"]]),e("place-content-center-safe",[["place-content","safe center"]]),e("place-content-end-safe",[["place-content","safe end"]]),e("place-content-between",[["place-content","space-between"]]),e("place-content-around",[["place-content","space-around"]]),e("place-content-evenly",[["place-content","space-evenly"]]),e("place-content-baseline",[["place-content","baseline"]]),e("place-content-stretch",[["place-content","stretch"]]),e("place-items-center",[["place-items","center"]]),e("place-items-start",[["place-items","start"]]),e("place-items-end",[["place-items","end"]]),e("place-items-center-safe",[["place-items","safe center"]]),e("place-items-end-safe",[["place-items","safe end"]]),e("place-items-baseline",[["place-items","baseline"]]),e("place-items-stretch",[["place-items","stretch"]]),e("content-normal",[["align-content","normal"]]),e("content-center",[["align-content","center"]]),e("content-start",[["align-content","flex-start"]]),e("content-end",[["align-content","flex-end"]]),e("content-center-safe",[["align-content","safe center"]]),e("content-end-safe",[["align-content","safe flex-end"]]),e("content-between",[["align-content","space-between"]]),e("content-around",[["align-content","space-around"]]),e("content-evenly",[["align-content","space-evenly"]]),e("content-baseline",[["align-content","baseline"]]),e("content-stretch",[["align-content","stretch"]]),e("items-center",[["align-items","center"]]),e("items-start",[["align-items","flex-start"]]),e("items-end",[["align-items","flex-end"]]),e("items-center-safe",[["align-items","safe center"]]),e("items-end-safe",[["align-items","safe flex-end"]]),e("items-baseline",[["align-items","baseline"]]),e("items-baseline-last",[["align-items","last baseline"]]),e("items-stretch",[["align-items","stretch"]]),e("justify-normal",[["justify-content","normal"]]),e("justify-center",[["justify-content","center"]]),e("justify-start",[["justify-content","flex-start"]]),e("justify-end",[["justify-content","flex-end"]]),e("justify-center-safe",[["justify-content","safe center"]]),e("justify-end-safe",[["justify-content","safe flex-end"]]),e("justify-between",[["justify-content","space-between"]]),e("justify-around",[["justify-content","space-around"]]),e("justify-evenly",[["justify-content","space-evenly"]]),e("justify-baseline",[["justify-content","baseline"]]),e("justify-stretch",[["justify-content","stretch"]]),e("justify-items-normal",[["justify-items","normal"]]),e("justify-items-center",[["justify-items","center"]]),e("justify-items-start",[["justify-items","start"]]),e("justify-items-end",[["justify-items","end"]]),e("justify-items-center-safe",[["justify-items","safe center"]]),e("justify-items-end-safe",[["justify-items","safe end"]]),e("justify-items-stretch",[["justify-items","stretch"]]),a("gap",["--gap","--spacing"],o=>[l("gap",o)]),a("gap-x",["--gap","--spacing"],o=>[l("column-gap",o)]),a("gap-y",["--gap","--spacing"],o=>[l("row-gap",o)]),a("space-x",["--space","--spacing"],o=>[z([N("--tw-space-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","0"),l("margin-inline-start",`calc(${o} * var(--tw-space-x-reverse))`),l("margin-inline-end",`calc(${o} * calc(1 - var(--tw-space-x-reverse)))`)])],{supportsNegative:!0}),a("space-y",["--space","--spacing"],o=>[z([N("--tw-space-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","0"),l("margin-block-start",`calc(${o} * var(--tw-space-y-reverse))`),l("margin-block-end",`calc(${o} * calc(1 - var(--tw-space-y-reverse)))`)])],{supportsNegative:!0}),e("space-x-reverse",[()=>z([N("--tw-space-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","row-gap"),l("--tw-space-x-reverse","1")])]),e("space-y-reverse",[()=>z([N("--tw-space-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-sort","column-gap"),l("--tw-space-y-reverse","1")])]),e("accent-auto",[["accent-color","auto"]]),s("accent",{themeKeys:["--accent-color","--color"],handle:o=>[l("accent-color",o)]}),s("caret",{themeKeys:["--caret-color","--color"],handle:o=>[l("caret-color",o)]}),s("divide",{themeKeys:["--divide-color","--color"],handle:o=>[M(":where(& > :not(:last-child))",[l("--tw-sort","divide-color"),l("border-color",o)])]}),e("place-self-auto",[["place-self","auto"]]),e("place-self-start",[["place-self","start"]]),e("place-self-end",[["place-self","end"]]),e("place-self-center",[["place-self","center"]]),e("place-self-end-safe",[["place-self","safe end"]]),e("place-self-center-safe",[["place-self","safe center"]]),e("place-self-stretch",[["place-self","stretch"]]),e("self-auto",[["align-self","auto"]]),e("self-start",[["align-self","flex-start"]]),e("self-end",[["align-self","flex-end"]]),e("self-center",[["align-self","center"]]),e("self-end-safe",[["align-self","safe flex-end"]]),e("self-center-safe",[["align-self","safe center"]]),e("self-stretch",[["align-self","stretch"]]),e("self-baseline",[["align-self","baseline"]]),e("self-baseline-last",[["align-self","last baseline"]]),e("justify-self-auto",[["justify-self","auto"]]),e("justify-self-start",[["justify-self","flex-start"]]),e("justify-self-end",[["justify-self","flex-end"]]),e("justify-self-center",[["justify-self","center"]]),e("justify-self-end-safe",[["justify-self","safe flex-end"]]),e("justify-self-center-safe",[["justify-self","safe center"]]),e("justify-self-stretch",[["justify-self","stretch"]]);for(let o of["auto","hidden","clip","visible","scroll"])e(`overflow-${o}`,[["overflow",o]]),e(`overflow-x-${o}`,[["overflow-x",o]]),e(`overflow-y-${o}`,[["overflow-y",o]]);for(let o of["auto","contain","none"])e(`overscroll-${o}`,[["overscroll-behavior",o]]),e(`overscroll-x-${o}`,[["overscroll-behavior-x",o]]),e(`overscroll-y-${o}`,[["overscroll-behavior-y",o]]);e("scroll-auto",[["scroll-behavior","auto"]]),e("scroll-smooth",[["scroll-behavior","smooth"]]),e("truncate",[["overflow","hidden"],["text-overflow","ellipsis"],["white-space","nowrap"]]),e("text-ellipsis",[["text-overflow","ellipsis"]]),e("text-clip",[["text-overflow","clip"]]),e("hyphens-none",[["-webkit-hyphens","none"],["hyphens","none"]]),e("hyphens-manual",[["-webkit-hyphens","manual"],["hyphens","manual"]]),e("hyphens-auto",[["-webkit-hyphens","auto"],["hyphens","auto"]]),e("whitespace-normal",[["white-space","normal"]]),e("whitespace-nowrap",[["white-space","nowrap"]]),e("whitespace-pre",[["white-space","pre"]]),e("whitespace-pre-line",[["white-space","pre-line"]]),e("whitespace-pre-wrap",[["white-space","pre-wrap"]]),e("whitespace-break-spaces",[["white-space","break-spaces"]]),e("text-wrap",[["text-wrap","wrap"]]),e("text-nowrap",[["text-wrap","nowrap"]]),e("text-balance",[["text-wrap","balance"]]),e("text-pretty",[["text-wrap","pretty"]]),e("break-normal",[["overflow-wrap","normal"],["word-break","normal"]]),e("break-words",[["overflow-wrap","break-word"]]),e("break-all",[["word-break","break-all"]]),e("break-keep",[["word-break","keep-all"]]),e("wrap-anywhere",[["overflow-wrap","anywhere"]]),e("wrap-break-word",[["overflow-wrap","break-word"]]),e("wrap-normal",[["overflow-wrap","normal"]]);for(let[o,p]of[["rounded",["border-radius"]],["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]],["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]])e(`${o}-none`,p.map(h=>[h,"0"])),e(`${o}-full`,p.map(h=>[h,"calc(infinity * 1px)"])),n(o,{themeKeys:["--radius"],handle:h=>p.map(A=>l(A,h))});e("border-solid",[["--tw-border-style","solid"],["border-style","solid"]]),e("border-dashed",[["--tw-border-style","dashed"],["border-style","dashed"]]),e("border-dotted",[["--tw-border-style","dotted"],["border-style","dotted"]]),e("border-double",[["--tw-border-style","double"],["border-style","double"]]),e("border-hidden",[["--tw-border-style","hidden"],["border-style","hidden"]]),e("border-none",[["--tw-border-style","none"],["border-style","none"]]);{let p=function(h,A){r.functional(h,k=>{if(!k.value){if(k.modifier)return;let C=t.get(["--default-border-width"])??"1px",O=A.width(C);return O?[o(),...O]:void 0}if(k.value.kind==="arbitrary"){let C=k.value.value;switch(k.value.dataType??Y(C,["color","line-width","length"])){case"line-width":case"length":{if(k.modifier)return;let $=A.width(C);return $?[o(),...$]:void 0}default:return C=X(C,k.modifier,t),C===null?void 0:A.color(C)}}{let C=te(k,t,["--border-color","--color"]);if(C)return A.color(C)}{if(k.modifier)return;let C=t.resolve(k.value.value,["--border-width"]);if(C){let O=A.width(C);return O?[o(),...O]:void 0}if(T(k.value.value)){let O=A.width(`${k.value.value}px`);return O?[o(),...O]:void 0}}}),i(h,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--border-color","--color"],modifiers:Array.from({length:21},(k,C)=>`${C*5}`),hasDefaultValue:!0},{values:["0","2","4","8"],valueThemeKeys:["--border-width"]}])};var _=p;let o=()=>z([N("--tw-border-style","solid")]);p("border",{width:h=>[l("border-style","var(--tw-border-style)"),l("border-width",h)],color:h=>[l("border-color",h)]}),p("border-x",{width:h=>[l("border-inline-style","var(--tw-border-style)"),l("border-inline-width",h)],color:h=>[l("border-inline-color",h)]}),p("border-y",{width:h=>[l("border-block-style","var(--tw-border-style)"),l("border-block-width",h)],color:h=>[l("border-block-color",h)]}),p("border-s",{width:h=>[l("border-inline-start-style","var(--tw-border-style)"),l("border-inline-start-width",h)],color:h=>[l("border-inline-start-color",h)]}),p("border-e",{width:h=>[l("border-inline-end-style","var(--tw-border-style)"),l("border-inline-end-width",h)],color:h=>[l("border-inline-end-color",h)]}),p("border-t",{width:h=>[l("border-top-style","var(--tw-border-style)"),l("border-top-width",h)],color:h=>[l("border-top-color",h)]}),p("border-r",{width:h=>[l("border-right-style","var(--tw-border-style)"),l("border-right-width",h)],color:h=>[l("border-right-color",h)]}),p("border-b",{width:h=>[l("border-bottom-style","var(--tw-border-style)"),l("border-bottom-width",h)],color:h=>[l("border-bottom-color",h)]}),p("border-l",{width:h=>[l("border-left-style","var(--tw-border-style)"),l("border-left-width",h)],color:h=>[l("border-left-color",h)]}),n("divide-x",{defaultValue:t.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>T(h)?`${h}px`:null,handle:h=>[z([N("--tw-divide-x-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-x-width"),o(),l("--tw-divide-x-reverse","0"),l("border-inline-style","var(--tw-border-style)"),l("border-inline-start-width",`calc(${h} * var(--tw-divide-x-reverse))`),l("border-inline-end-width",`calc(${h} * calc(1 - var(--tw-divide-x-reverse)))`)])]}),n("divide-y",{defaultValue:t.get(["--default-border-width"])??"1px",themeKeys:["--divide-width","--border-width"],handleBareValue:({value:h})=>T(h)?`${h}px`:null,handle:h=>[z([N("--tw-divide-y-reverse","0")]),M(":where(& > :not(:last-child))",[l("--tw-sort","divide-y-width"),o(),l("--tw-divide-y-reverse","0"),l("border-bottom-style","var(--tw-border-style)"),l("border-top-style","var(--tw-border-style)"),l("border-top-width",`calc(${h} * var(--tw-divide-y-reverse))`),l("border-bottom-width",`calc(${h} * calc(1 - var(--tw-divide-y-reverse)))`)])]}),i("divide-x",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),i("divide-y",()=>[{values:["0","2","4","8"],valueThemeKeys:["--divide-width","--border-width"],hasDefaultValue:!0}]),e("divide-x-reverse",[()=>z([N("--tw-divide-x-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-x-reverse","1")])]),e("divide-y-reverse",[()=>z([N("--tw-divide-y-reverse","0")]),()=>M(":where(& > :not(:last-child))",[l("--tw-divide-y-reverse","1")])]);for(let h of["solid","dashed","dotted","double","none"])e(`divide-${h}`,[()=>M(":where(& > :not(:last-child))",[l("--tw-sort","divide-style"),l("--tw-border-style",h),l("border-style",h)])])}e("bg-auto",[["background-size","auto"]]),e("bg-cover",[["background-size","cover"]]),e("bg-contain",[["background-size","contain"]]),n("bg-size",{handle(o){if(o)return[l("background-size",o)]}}),e("bg-fixed",[["background-attachment","fixed"]]),e("bg-local",[["background-attachment","local"]]),e("bg-scroll",[["background-attachment","scroll"]]),e("bg-top",[["background-position","top"]]),e("bg-top-left",[["background-position","left top"]]),e("bg-top-right",[["background-position","right top"]]),e("bg-bottom",[["background-position","bottom"]]),e("bg-bottom-left",[["background-position","left bottom"]]),e("bg-bottom-right",[["background-position","right bottom"]]),e("bg-left",[["background-position","left"]]),e("bg-right",[["background-position","right"]]),e("bg-center",[["background-position","center"]]),n("bg-position",{handle(o){if(o)return[l("background-position",o)]}}),e("bg-repeat",[["background-repeat","repeat"]]),e("bg-no-repeat",[["background-repeat","no-repeat"]]),e("bg-repeat-x",[["background-repeat","repeat-x"]]),e("bg-repeat-y",[["background-repeat","repeat-y"]]),e("bg-repeat-round",[["background-repeat","round"]]),e("bg-repeat-space",[["background-repeat","space"]]),e("bg-none",[["background-image","none"]]);{let h=function(C){let O="in oklab";if(C?.kind==="named")switch(C.value){case"longer":case"shorter":case"increasing":case"decreasing":O=`in oklch ${C.value} hue`;break;default:O=`in ${C.value}`}else C?.kind==="arbitrary"&&(O=C.value);return O},A=function({negative:C}){return O=>{if(!O.value)return;if(O.value.kind==="arbitrary"){if(O.modifier)return;let U=O.value.value;switch(O.value.dataType??Y(U,["angle"])){case"angle":return U=C?`calc(${U} * -1)`:`${U}`,[l("--tw-gradient-position",U),l("background-image",`linear-gradient(var(--tw-gradient-stops,${U}))`)];default:return C?void 0:[l("--tw-gradient-position",U),l("background-image",`linear-gradient(var(--tw-gradient-stops,${U}))`)]}}let $=O.value.value;if(!C&&p.has($))$=p.get($);else if(T($))$=C?`calc(${$}deg * -1)`:`${$}deg`;else return;let E=h(O.modifier);return[l("--tw-gradient-position",`${$}`),G("@supports (background-image: linear-gradient(in lab, red, red))",[l("--tw-gradient-position",`${$} ${E}`)]),l("background-image","linear-gradient(var(--tw-gradient-stops))")]}},k=function({negative:C}){return O=>{if(O.value?.kind==="arbitrary"){if(O.modifier)return;let U=O.value.value;return[l("--tw-gradient-position",U),l("background-image",`conic-gradient(var(--tw-gradient-stops,${U}))`)]}let $=h(O.modifier);if(!O.value)return[l("--tw-gradient-position",$),l("background-image","conic-gradient(var(--tw-gradient-stops))")];let E=O.value.value;if(T(E))return E=C?`calc(${E}deg * -1)`:`${E}deg`,[l("--tw-gradient-position",`from ${E} ${$}`),l("background-image","conic-gradient(var(--tw-gradient-stops))")]}};var H=h,j=A,W=k;let o=["oklab","oklch","srgb","hsl","longer","shorter","increasing","decreasing"],p=new Map([["to-t","to top"],["to-tr","to top right"],["to-r","to right"],["to-br","to bottom right"],["to-b","to bottom"],["to-bl","to bottom left"],["to-l","to left"],["to-tl","to top left"]]);r.functional("-bg-linear",A({negative:!0})),r.functional("bg-linear",A({negative:!1})),i("bg-linear",()=>[{values:[...p.keys()],modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),r.functional("-bg-conic",k({negative:!0})),r.functional("bg-conic",k({negative:!1})),i("bg-conic",()=>[{hasDefaultValue:!0,modifiers:o},{values:["0","30","60","90","120","150","180","210","240","270","300","330"],supportsNegative:!0,modifiers:o}]),r.functional("bg-radial",C=>{if(!C.value){let O=h(C.modifier);return[l("--tw-gradient-position",O),l("background-image","radial-gradient(var(--tw-gradient-stops))")]}if(C.value.kind==="arbitrary"){if(C.modifier)return;let O=C.value.value;return[l("--tw-gradient-position",O),l("background-image",`radial-gradient(var(--tw-gradient-stops,${O}))`)]}}),i("bg-radial",()=>[{hasDefaultValue:!0,modifiers:o}])}r.functional("bg",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["image","color","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("background-position",p)];case"bg-size":case"length":case"size":return o.modifier?void 0:[l("background-size",p)];case"image":case"url":return o.modifier?void 0:[l("background-image",p)];default:return p=X(p,o.modifier,t),p===null?void 0:[l("background-color",p)]}}{let p=te(o,t,["--background-color","--color"]);if(p)return[l("background-color",p)]}{if(o.modifier)return;let p=t.resolve(o.value.value,["--background-image"]);if(p)return[l("background-image",p)]}}}),i("bg",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--background-image"]}]);let v=()=>z([N("--tw-gradient-position"),N("--tw-gradient-from","#0000",""),N("--tw-gradient-via","#0000",""),N("--tw-gradient-to","#0000",""),N("--tw-gradient-stops"),N("--tw-gradient-via-stops"),N("--tw-gradient-from-position","0%",""),N("--tw-gradient-via-position","50%",""),N("--tw-gradient-to-position","100%","")]);function x(o,p){r.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??Y(A,["color","length","percentage"])){case"length":case"percentage":return h.modifier?void 0:p.position(A);default:return A=X(A,h.modifier,t),A===null?void 0:p.color(A)}}{let A=te(h,t,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=t.resolve(h.value.value,["--gradient-color-stop-positions"]);if(A)return p.position(A);if(h.value.value[h.value.value.length-1]==="%"&&T(h.value.value.slice(0,-1)))return p.position(h.value.value)}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}])}x("from",{color:o=>[v(),l("--tw-sort","--tw-gradient-from"),l("--tw-gradient-from",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-from-position",o)]}),e("via-none",[["--tw-gradient-via-stops","initial"]]),x("via",{color:o=>[v(),l("--tw-sort","--tw-gradient-via"),l("--tw-gradient-via",o),l("--tw-gradient-via-stops","var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position)"),l("--tw-gradient-stops","var(--tw-gradient-via-stops)")],position:o=>[v(),l("--tw-gradient-via-position",o)]}),x("to",{color:o=>[v(),l("--tw-sort","--tw-gradient-to"),l("--tw-gradient-to",o),l("--tw-gradient-stops","var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))")],position:o=>[v(),l("--tw-gradient-to-position",o)]}),e("mask-none",[["mask-image","none"]]),r.functional("mask",o=>{if(!o.value||o.modifier||o.value.kind!=="arbitrary")return;let p=o.value.value;switch(o.value.dataType??Y(p,["image","percentage","position","bg-size","length","url"])){case"percentage":case"position":return o.modifier?void 0:[l("mask-position",p)];case"bg-size":case"length":case"size":return[l("mask-size",p)];case"image":case"url":default:return[l("mask-image",p)]}}),e("mask-add",[["mask-composite","add"]]),e("mask-subtract",[["mask-composite","subtract"]]),e("mask-intersect",[["mask-composite","intersect"]]),e("mask-exclude",[["mask-composite","exclude"]]),e("mask-alpha",[["mask-mode","alpha"]]),e("mask-luminance",[["mask-mode","luminance"]]),e("mask-match",[["mask-mode","match-source"]]),e("mask-type-alpha",[["mask-type","alpha"]]),e("mask-type-luminance",[["mask-type","luminance"]]),e("mask-auto",[["mask-size","auto"]]),e("mask-cover",[["mask-size","cover"]]),e("mask-contain",[["mask-size","contain"]]),n("mask-size",{handle(o){if(o)return[l("mask-size",o)]}}),e("mask-top",[["mask-position","top"]]),e("mask-top-left",[["mask-position","left top"]]),e("mask-top-right",[["mask-position","right top"]]),e("mask-bottom",[["mask-position","bottom"]]),e("mask-bottom-left",[["mask-position","left bottom"]]),e("mask-bottom-right",[["mask-position","right bottom"]]),e("mask-left",[["mask-position","left"]]),e("mask-right",[["mask-position","right"]]),e("mask-center",[["mask-position","center"]]),n("mask-position",{handle(o){if(o)return[l("mask-position",o)]}}),e("mask-repeat",[["mask-repeat","repeat"]]),e("mask-no-repeat",[["mask-repeat","no-repeat"]]),e("mask-repeat-x",[["mask-repeat","repeat-x"]]),e("mask-repeat-y",[["mask-repeat","repeat-y"]]),e("mask-repeat-round",[["mask-repeat","round"]]),e("mask-repeat-space",[["mask-repeat","space"]]),e("mask-clip-border",[["mask-clip","border-box"]]),e("mask-clip-padding",[["mask-clip","padding-box"]]),e("mask-clip-content",[["mask-clip","content-box"]]),e("mask-clip-fill",[["mask-clip","fill-box"]]),e("mask-clip-stroke",[["mask-clip","stroke-box"]]),e("mask-clip-view",[["mask-clip","view-box"]]),e("mask-no-clip",[["mask-clip","no-clip"]]),e("mask-origin-border",[["mask-origin","border-box"]]),e("mask-origin-padding",[["mask-origin","padding-box"]]),e("mask-origin-content",[["mask-origin","content-box"]]),e("mask-origin-fill",[["mask-origin","fill-box"]]),e("mask-origin-stroke",[["mask-origin","stroke-box"]]),e("mask-origin-view",[["mask-origin","view-box"]]);let y=()=>z([N("--tw-mask-linear","linear-gradient(#fff, #fff)"),N("--tw-mask-radial","linear-gradient(#fff, #fff)"),N("--tw-mask-conic","linear-gradient(#fff, #fff)")]);function V(o,p){r.functional(o,h=>{if(h.value){if(h.value.kind==="arbitrary"){let A=h.value.value;switch(h.value.dataType??Y(A,["length","percentage","color"])){case"color":return A=X(A,h.modifier,t),A===null?void 0:p.color(A);case"percentage":return h.modifier||!T(A.slice(0,-1))?void 0:p.position(A);default:return h.modifier?void 0:p.position(A)}}{let A=te(h,t,["--background-color","--color"]);if(A)return p.color(A)}{if(h.modifier)return;let A=Y(h.value.value,["number","percentage"]);if(!A)return;switch(A){case"number":{let k=t.resolve(null,["--spacing"]);return!k||!xe(h.value.value)?void 0:p.position(`calc(${k} * ${h.value.value})`)}case"percentage":return T(h.value.value.slice(0,-1))?p.position(h.value.value):void 0;default:return}}}}),i(o,()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)},{values:Array.from({length:21},(h,A)=>`${A*5}%`),valueThemeKeys:["--gradient-color-stop-positions"]}]),i(o,()=>[{values:Array.from({length:21},(h,A)=>`${A*5}%`)},{values:t.get(["--spacing"])?at:[]},{values:["current","inherit","transparent"],valueThemeKeys:["--background-color","--color"],modifiers:Array.from({length:21},(h,A)=>`${A*5}`)}])}let b=()=>z([N("--tw-mask-left","linear-gradient(#fff, #fff)"),N("--tw-mask-right","linear-gradient(#fff, #fff)"),N("--tw-mask-bottom","linear-gradient(#fff, #fff)"),N("--tw-mask-top","linear-gradient(#fff, #fff)")]);function S(o,p,h){V(o,{color(A){let k=[y(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(k.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),k.push(z([N(`--tw-mask-${C}-from-position`,"0%"),N(`--tw-mask-${C}-to-position`,"100%"),N(`--tw-mask-${C}-from-color`,"black"),N(`--tw-mask-${C}-to-color`,"transparent")])),k.push(l(`--tw-mask-${C}-${p}-color`,A)));return k},position(A){let k=[y(),b(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","var(--tw-mask-left), var(--tw-mask-right), var(--tw-mask-bottom), var(--tw-mask-top)")];for(let C of["top","right","bottom","left"])h[C]&&(k.push(l(`--tw-mask-${C}`,`linear-gradient(to ${C}, var(--tw-mask-${C}-from-color) var(--tw-mask-${C}-from-position), var(--tw-mask-${C}-to-color) var(--tw-mask-${C}-to-position))`)),k.push(z([N(`--tw-mask-${C}-from-position`,"0%"),N(`--tw-mask-${C}-to-position`,"100%"),N(`--tw-mask-${C}-from-color`,"black"),N(`--tw-mask-${C}-to-color`,"transparent")])),k.push(l(`--tw-mask-${C}-${p}-position`,A)));return k}})}S("mask-x-from","from",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-x-to","to",{top:!1,right:!0,bottom:!1,left:!0}),S("mask-y-from","from",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-y-to","to",{top:!0,right:!1,bottom:!0,left:!1}),S("mask-t-from","from",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-t-to","to",{top:!0,right:!1,bottom:!1,left:!1}),S("mask-r-from","from",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-r-to","to",{top:!1,right:!0,bottom:!1,left:!1}),S("mask-b-from","from",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-b-to","to",{top:!1,right:!1,bottom:!0,left:!1}),S("mask-l-from","from",{top:!1,right:!1,bottom:!1,left:!0}),S("mask-l-to","to",{top:!1,right:!1,bottom:!1,left:!0});let R=()=>z([N("--tw-mask-linear-position","0deg"),N("--tw-mask-linear-from-position","0%"),N("--tw-mask-linear-to-position","100%"),N("--tw-mask-linear-from-color","black"),N("--tw-mask-linear-to-color","transparent")]);n("mask-linear",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return T(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return T(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops, var(--tw-mask-linear-position)))"),l("--tw-mask-linear-position",o)]}),i("mask-linear",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),V("mask-linear-from",{color:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-color",o)],position:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-from-position",o)]}),V("mask-linear-to",{color:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-color",o)],position:o=>[y(),R(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-linear-stops","var(--tw-mask-linear-position), var(--tw-mask-linear-from-color) var(--tw-mask-linear-from-position), var(--tw-mask-linear-to-color) var(--tw-mask-linear-to-position)"),l("--tw-mask-linear","linear-gradient(var(--tw-mask-linear-stops))"),l("--tw-mask-linear-to-position",o)]});let L=()=>z([N("--tw-mask-radial-from-position","0%"),N("--tw-mask-radial-to-position","100%"),N("--tw-mask-radial-from-color","black"),N("--tw-mask-radial-to-color","transparent"),N("--tw-mask-radial-shape","ellipse"),N("--tw-mask-radial-size","farthest-corner"),N("--tw-mask-radial-position","center")]);e("mask-circle",[["--tw-mask-radial-shape","circle"]]),e("mask-ellipse",[["--tw-mask-radial-shape","ellipse"]]),e("mask-radial-closest-side",[["--tw-mask-radial-size","closest-side"]]),e("mask-radial-farthest-side",[["--tw-mask-radial-size","farthest-side"]]),e("mask-radial-closest-corner",[["--tw-mask-radial-size","closest-corner"]]),e("mask-radial-farthest-corner",[["--tw-mask-radial-size","farthest-corner"]]),e("mask-radial-at-top",[["--tw-mask-radial-position","top"]]),e("mask-radial-at-top-left",[["--tw-mask-radial-position","top left"]]),e("mask-radial-at-top-right",[["--tw-mask-radial-position","top right"]]),e("mask-radial-at-bottom",[["--tw-mask-radial-position","bottom"]]),e("mask-radial-at-bottom-left",[["--tw-mask-radial-position","bottom left"]]),e("mask-radial-at-bottom-right",[["--tw-mask-radial-position","bottom right"]]),e("mask-radial-at-left",[["--tw-mask-radial-position","left"]]),e("mask-radial-at-right",[["--tw-mask-radial-position","right"]]),e("mask-radial-at-center",[["--tw-mask-radial-position","center"]]),n("mask-radial-at",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[l("--tw-mask-radial-position",o)]}),n("mask-radial",{defaultValue:null,supportsNegative:!1,supportsFractions:!1,handle:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops, var(--tw-mask-radial-size)))"),l("--tw-mask-radial-size",o)]}),V("mask-radial-from",{color:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-color",o)],position:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-from-position",o)]}),V("mask-radial-to",{color:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-color",o)],position:o=>[y(),L(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-radial-stops","var(--tw-mask-radial-shape) var(--tw-mask-radial-size) at var(--tw-mask-radial-position), var(--tw-mask-radial-from-color) var(--tw-mask-radial-from-position), var(--tw-mask-radial-to-color) var(--tw-mask-radial-to-position)"),l("--tw-mask-radial","radial-gradient(var(--tw-mask-radial-stops))"),l("--tw-mask-radial-to-position",o)]});let P=()=>z([N("--tw-mask-conic-position","0deg"),N("--tw-mask-conic-from-position","0%"),N("--tw-mask-conic-to-position","100%"),N("--tw-mask-conic-from-color","black"),N("--tw-mask-conic-to-color","transparent")]);n("mask-conic",{defaultValue:null,supportsNegative:!0,supportsFractions:!1,handleBareValue(o){return T(o.value)?`calc(1deg * ${o.value})`:null},handleNegativeBareValue(o){return T(o.value)?`calc(1deg * -${o.value})`:null},handle:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops, var(--tw-mask-conic-position)))"),l("--tw-mask-conic-position",o)]}),i("mask-conic",()=>[{supportsNegative:!0,values:["0","1","2","3","6","12","45","90","180"]}]),V("mask-conic-from",{color:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-color",o)],position:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-from-position",o)]}),V("mask-conic-to",{color:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-color",o)],position:o=>[y(),P(),l("mask-image","var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic)"),l("mask-composite","intersect"),l("--tw-mask-conic-stops","from var(--tw-mask-conic-position), var(--tw-mask-conic-from-color) var(--tw-mask-conic-from-position), var(--tw-mask-conic-to-color) var(--tw-mask-conic-to-position)"),l("--tw-mask-conic","conic-gradient(var(--tw-mask-conic-stops))"),l("--tw-mask-conic-to-position",o)]}),e("box-decoration-slice",[["-webkit-box-decoration-break","slice"],["box-decoration-break","slice"]]),e("box-decoration-clone",[["-webkit-box-decoration-break","clone"],["box-decoration-break","clone"]]),e("bg-clip-text",[["background-clip","text"]]),e("bg-clip-border",[["background-clip","border-box"]]),e("bg-clip-padding",[["background-clip","padding-box"]]),e("bg-clip-content",[["background-clip","content-box"]]),e("bg-origin-border",[["background-origin","border-box"]]),e("bg-origin-padding",[["background-origin","padding-box"]]),e("bg-origin-content",[["background-origin","content-box"]]);for(let o of["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])e(`bg-blend-${o}`,[["background-blend-mode",o]]),e(`mix-blend-${o}`,[["mix-blend-mode",o]]);e("mix-blend-plus-darker",[["mix-blend-mode","plus-darker"]]),e("mix-blend-plus-lighter",[["mix-blend-mode","plus-lighter"]]),e("fill-none",[["fill","none"]]),r.functional("fill",o=>{if(!o.value)return;if(o.value.kind==="arbitrary"){let h=X(o.value.value,o.modifier,t);return h===null?void 0:[l("fill",h)]}let p=te(o,t,["--fill","--color"]);if(p)return[l("fill",p)]}),i("fill",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--fill","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)}]),e("stroke-none",[["stroke","none"]]),r.functional("stroke",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["color","number","length","percentage"])){case"number":case"length":case"percentage":return o.modifier?void 0:[l("stroke-width",p)];default:return p=X(o.value.value,o.modifier,t),p===null?void 0:[l("stroke",p)]}}{let p=te(o,t,["--stroke","--color"]);if(p)return[l("stroke",p)]}{let p=t.resolve(o.value.value,["--stroke-width"]);if(p)return[l("stroke-width",p)];if(T(o.value.value))return[l("stroke-width",o.value.value)]}}}),i("stroke",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--stroke","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","3"],valueThemeKeys:["--stroke-width"]}]),e("object-contain",[["object-fit","contain"]]),e("object-cover",[["object-fit","cover"]]),e("object-fill",[["object-fit","fill"]]),e("object-none",[["object-fit","none"]]),e("object-scale-down",[["object-fit","scale-down"]]),e("object-top",[["object-position","top"]]),e("object-top-left",[["object-position","left top"]]),e("object-top-right",[["object-position","right top"]]),e("object-bottom",[["object-position","bottom"]]),e("object-bottom-left",[["object-position","left bottom"]]),e("object-bottom-right",[["object-position","right bottom"]]),e("object-left",[["object-position","left"]]),e("object-right",[["object-position","right"]]),e("object-center",[["object-position","center"]]),n("object",{themeKeys:["--object-position"],handle:o=>[l("object-position",o)]});for(let[o,p]of[["p","padding"],["px","padding-inline"],["py","padding-block"],["ps","padding-inline-start"],["pe","padding-inline-end"],["pt","padding-top"],["pr","padding-right"],["pb","padding-bottom"],["pl","padding-left"]])a(o,["--padding","--spacing"],h=>[l(p,h)]);e("text-left",[["text-align","left"]]),e("text-center",[["text-align","center"]]),e("text-right",[["text-align","right"]]),e("text-justify",[["text-align","justify"]]),e("text-start",[["text-align","start"]]),e("text-end",[["text-align","end"]]),a("indent",["--text-indent","--spacing"],o=>[l("text-indent",o)],{supportsNegative:!0}),e("align-baseline",[["vertical-align","baseline"]]),e("align-top",[["vertical-align","top"]]),e("align-middle",[["vertical-align","middle"]]),e("align-bottom",[["vertical-align","bottom"]]),e("align-text-top",[["vertical-align","text-top"]]),e("align-text-bottom",[["vertical-align","text-bottom"]]),e("align-sub",[["vertical-align","sub"]]),e("align-super",[["vertical-align","super"]]),n("align",{themeKeys:[],handle:o=>[l("vertical-align",o)]}),r.functional("font",o=>{if(!(!o.value||o.modifier)){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["number","generic-name","family-name"])){case"generic-name":case"family-name":return[l("font-family",p)];default:return[z([N("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}{let p=t.resolveWith(o.value.value,["--font"],["--font-feature-settings","--font-variation-settings"]);if(p){let[h,A={}]=p;return[l("font-family",h),l("font-feature-settings",A["--font-feature-settings"]),l("font-variation-settings",A["--font-variation-settings"])]}}{let p=t.resolve(o.value.value,["--font-weight"]);if(p)return[z([N("--tw-font-weight")]),l("--tw-font-weight",p),l("font-weight",p)]}}}),i("font",()=>[{values:[],valueThemeKeys:["--font"]},{values:[],valueThemeKeys:["--font-weight"]}]),e("uppercase",[["text-transform","uppercase"]]),e("lowercase",[["text-transform","lowercase"]]),e("capitalize",[["text-transform","capitalize"]]),e("normal-case",[["text-transform","none"]]),e("italic",[["font-style","italic"]]),e("not-italic",[["font-style","normal"]]),e("underline",[["text-decoration-line","underline"]]),e("overline",[["text-decoration-line","overline"]]),e("line-through",[["text-decoration-line","line-through"]]),e("no-underline",[["text-decoration-line","none"]]),e("font-stretch-normal",[["font-stretch","normal"]]),e("font-stretch-ultra-condensed",[["font-stretch","ultra-condensed"]]),e("font-stretch-extra-condensed",[["font-stretch","extra-condensed"]]),e("font-stretch-condensed",[["font-stretch","condensed"]]),e("font-stretch-semi-condensed",[["font-stretch","semi-condensed"]]),e("font-stretch-semi-expanded",[["font-stretch","semi-expanded"]]),e("font-stretch-expanded",[["font-stretch","expanded"]]),e("font-stretch-extra-expanded",[["font-stretch","extra-expanded"]]),e("font-stretch-ultra-expanded",[["font-stretch","ultra-expanded"]]),n("font-stretch",{handleBareValue:({value:o})=>{if(!o.endsWith("%"))return null;let p=Number(o.slice(0,-1));return!T(p)||Number.isNaN(p)||p<50||p>200?null:o},handle:o=>[l("font-stretch",o)]}),i("font-stretch",()=>[{values:["50%","75%","90%","95%","100%","105%","110%","125%","150%","200%"]}]),s("placeholder",{themeKeys:["--background-color","--color"],handle:o=>[M("&::placeholder",[l("--tw-sort","placeholder-color"),l("color",o)])]}),e("decoration-solid",[["text-decoration-style","solid"]]),e("decoration-double",[["text-decoration-style","double"]]),e("decoration-dotted",[["text-decoration-style","dotted"]]),e("decoration-dashed",[["text-decoration-style","dashed"]]),e("decoration-wavy",[["text-decoration-style","wavy"]]),e("decoration-auto",[["text-decoration-thickness","auto"]]),e("decoration-from-font",[["text-decoration-thickness","from-font"]]),r.functional("decoration",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["color","length","percentage"])){case"length":case"percentage":return o.modifier?void 0:[l("text-decoration-thickness",p)];default:return p=X(p,o.modifier,t),p===null?void 0:[l("text-decoration-color",p)]}}{let p=t.resolve(o.value.value,["--text-decoration-thickness"]);if(p)return o.modifier?void 0:[l("text-decoration-thickness",p)];if(T(o.value.value))return o.modifier?void 0:[l("text-decoration-thickness",`${o.value.value}px`)]}{let p=te(o,t,["--text-decoration-color","--color"]);if(p)return[l("text-decoration-color",p)]}}}),i("decoration",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-decoration-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2"],valueThemeKeys:["--text-decoration-thickness"]}]),e("animate-none",[["animation","none"]]),n("animate",{themeKeys:["--animate"],handle:o=>[l("animation",o)]});{let o=["var(--tw-blur,)","var(--tw-brightness,)","var(--tw-contrast,)","var(--tw-grayscale,)","var(--tw-hue-rotate,)","var(--tw-invert,)","var(--tw-saturate,)","var(--tw-sepia,)","var(--tw-drop-shadow,)"].join(" "),p=["var(--tw-backdrop-blur,)","var(--tw-backdrop-brightness,)","var(--tw-backdrop-contrast,)","var(--tw-backdrop-grayscale,)","var(--tw-backdrop-hue-rotate,)","var(--tw-backdrop-invert,)","var(--tw-backdrop-opacity,)","var(--tw-backdrop-saturate,)","var(--tw-backdrop-sepia,)"].join(" "),h=()=>z([N("--tw-blur"),N("--tw-brightness"),N("--tw-contrast"),N("--tw-grayscale"),N("--tw-hue-rotate"),N("--tw-invert"),N("--tw-opacity"),N("--tw-saturate"),N("--tw-sepia"),N("--tw-drop-shadow"),N("--tw-drop-shadow-color"),N("--tw-drop-shadow-alpha","100%",""),N("--tw-drop-shadow-size")]),A=()=>z([N("--tw-backdrop-blur"),N("--tw-backdrop-brightness"),N("--tw-backdrop-contrast"),N("--tw-backdrop-grayscale"),N("--tw-backdrop-hue-rotate"),N("--tw-backdrop-invert"),N("--tw-backdrop-opacity"),N("--tw-backdrop-saturate"),N("--tw-backdrop-sepia")]);r.functional("filter",k=>{if(!k.modifier){if(k.value===null)return[h(),l("filter",o)];if(k.value.kind==="arbitrary")return[l("filter",k.value.value)];switch(k.value.value){case"none":return[l("filter","none")]}}}),r.functional("backdrop-filter",k=>{if(!k.modifier){if(k.value===null)return[A(),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)];if(k.value.kind==="arbitrary")return[l("-webkit-backdrop-filter",k.value.value),l("backdrop-filter",k.value.value)];switch(k.value.value){case"none":return[l("-webkit-backdrop-filter","none"),l("backdrop-filter","none")]}}}),n("blur",{themeKeys:["--blur"],handle:k=>[h(),l("--tw-blur",`blur(${k})`),l("filter",o)]}),e("blur-none",[h,["--tw-blur"," "],["filter",o]]),n("backdrop-blur",{themeKeys:["--backdrop-blur","--blur"],handle:k=>[A(),l("--tw-backdrop-blur",`blur(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),e("backdrop-blur-none",[A,["--tw-backdrop-blur"," "],["-webkit-backdrop-filter",p],["backdrop-filter",p]]),n("brightness",{themeKeys:["--brightness"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[h(),l("--tw-brightness",`brightness(${k})`),l("filter",o)]}),n("backdrop-brightness",{themeKeys:["--backdrop-brightness","--brightness"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-brightness",`brightness(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--brightness"]}]),i("backdrop-brightness",()=>[{values:["0","50","75","90","95","100","105","110","125","150","200"],valueThemeKeys:["--backdrop-brightness","--brightness"]}]),n("contrast",{themeKeys:["--contrast"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[h(),l("--tw-contrast",`contrast(${k})`),l("filter",o)]}),n("backdrop-contrast",{themeKeys:["--backdrop-contrast","--contrast"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-contrast",`contrast(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--contrast"]}]),i("backdrop-contrast",()=>[{values:["0","50","75","100","125","150","200"],valueThemeKeys:["--backdrop-contrast","--contrast"]}]),n("grayscale",{themeKeys:["--grayscale"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[h(),l("--tw-grayscale",`grayscale(${k})`),l("filter",o)]}),n("backdrop-grayscale",{themeKeys:["--backdrop-grayscale","--grayscale"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[A(),l("--tw-backdrop-grayscale",`grayscale(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--grayscale"],hasDefaultValue:!0}]),i("backdrop-grayscale",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-grayscale","--grayscale"],hasDefaultValue:!0}]),n("hue-rotate",{supportsNegative:!0,themeKeys:["--hue-rotate"],handleBareValue:({value:k})=>T(k)?`${k}deg`:null,handle:k=>[h(),l("--tw-hue-rotate",`hue-rotate(${k})`),l("filter",o)]}),n("backdrop-hue-rotate",{supportsNegative:!0,themeKeys:["--backdrop-hue-rotate","--hue-rotate"],handleBareValue:({value:k})=>T(k)?`${k}deg`:null,handle:k=>[A(),l("--tw-backdrop-hue-rotate",`hue-rotate(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--hue-rotate"]}]),i("backdrop-hue-rotate",()=>[{values:["0","15","30","60","90","180"],valueThemeKeys:["--backdrop-hue-rotate","--hue-rotate"]}]),n("invert",{themeKeys:["--invert"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[h(),l("--tw-invert",`invert(${k})`),l("filter",o)]}),n("backdrop-invert",{themeKeys:["--backdrop-invert","--invert"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[A(),l("--tw-backdrop-invert",`invert(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--invert"],hasDefaultValue:!0}]),i("backdrop-invert",()=>[{values:["0","25","50","75","100"],valueThemeKeys:["--backdrop-invert","--invert"],hasDefaultValue:!0}]),n("saturate",{themeKeys:["--saturate"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[h(),l("--tw-saturate",`saturate(${k})`),l("filter",o)]}),n("backdrop-saturate",{themeKeys:["--backdrop-saturate","--saturate"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-saturate",`saturate(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--saturate"]}]),i("backdrop-saturate",()=>[{values:["0","50","100","150","200"],valueThemeKeys:["--backdrop-saturate","--saturate"]}]),n("sepia",{themeKeys:["--sepia"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[h(),l("--tw-sepia",`sepia(${k})`),l("filter",o)]}),n("backdrop-sepia",{themeKeys:["--backdrop-sepia","--sepia"],handleBareValue:({value:k})=>T(k)?`${k}%`:null,defaultValue:"100%",handle:k=>[A(),l("--tw-backdrop-sepia",`sepia(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--sepia"],hasDefaultValue:!0}]),i("backdrop-sepia",()=>[{values:["0","50","100"],valueThemeKeys:["--backdrop-sepia","--sepia"],hasDefaultValue:!0}]),e("drop-shadow-none",[h,["--tw-drop-shadow"," "],["filter",o]]),r.functional("drop-shadow",k=>{let C;if(k.modifier&&(k.modifier.kind==="arbitrary"?C=k.modifier.value:T(k.modifier.value)&&(C=`${k.modifier.value}%`)),!k.value){let O=t.get(["--drop-shadow"]),$=t.resolve(null,["--drop-shadow"]);return O===null||$===null?void 0:[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow",D($,",").map(E=>`drop-shadow(${E})`).join(" ")),l("filter",o)]}if(k.value.kind==="arbitrary"){let O=k.value.value;switch(k.value.dataType??Y(O,["color"])){case"color":return O=X(O,k.modifier,t),O===null?void 0:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")];default:return k.modifier&&!C?void 0:[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]}}{let O=t.get([`--drop-shadow-${k.value.value}`]),$=t.resolve(k.value.value,["--drop-shadow"]);if(O&&$)return k.modifier&&!C?void 0:C?[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow","var(--tw-drop-shadow-size)"),l("filter",o)]:[h(),l("--tw-drop-shadow-alpha",C),...lt("--tw-drop-shadow-size",O,C,E=>`var(--tw-drop-shadow-color, ${E})`),l("--tw-drop-shadow",D($,",").map(E=>`drop-shadow(${E})`).join(" ")),l("filter",o)]}{let O=te(k,t,["--drop-shadow-color","--color"]);if(O)return O==="inherit"?[h(),l("--tw-drop-shadow-color","inherit"),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]:[h(),l("--tw-drop-shadow-color",Q(O,"var(--tw-drop-shadow-alpha)")),l("--tw-drop-shadow","var(--tw-drop-shadow-size)")]}}),i("drop-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--drop-shadow-color","--color"],modifiers:Array.from({length:21},(k,C)=>`${C*5}`)},{valueThemeKeys:["--drop-shadow"]}]),n("backdrop-opacity",{themeKeys:["--backdrop-opacity","--opacity"],handleBareValue:({value:k})=>ot(k)?`${k}%`:null,handle:k=>[A(),l("--tw-backdrop-opacity",`opacity(${k})`),l("-webkit-backdrop-filter",p),l("backdrop-filter",p)]}),i("backdrop-opacity",()=>[{values:Array.from({length:21},(k,C)=>`${C*5}`),valueThemeKeys:["--backdrop-opacity","--opacity"]}])}{let o=`var(--tw-ease, ${t.resolve(null,["--default-transition-timing-function"])??"ease"})`,p=`var(--tw-duration, ${t.resolve(null,["--default-transition-duration"])??"0s"})`;e("transition-none",[["transition-property","none"]]),e("transition-all",[["transition-property","all"],["transition-timing-function",o],["transition-duration",p]]),e("transition-colors",[["transition-property","color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to"],["transition-timing-function",o],["transition-duration",p]]),e("transition-opacity",[["transition-property","opacity"],["transition-timing-function",o],["transition-duration",p]]),e("transition-shadow",[["transition-property","box-shadow"],["transition-timing-function",o],["transition-duration",p]]),e("transition-transform",[["transition-property","transform, translate, scale, rotate"],["transition-timing-function",o],["transition-duration",p]]),n("transition",{defaultValue:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events",themeKeys:["--transition-property"],handle:h=>[l("transition-property",h),l("transition-timing-function",o),l("transition-duration",p)]}),e("transition-discrete",[["transition-behavior","allow-discrete"]]),e("transition-normal",[["transition-behavior","normal"]]),n("delay",{handleBareValue:({value:h})=>T(h)?`${h}ms`:null,themeKeys:["--transition-delay"],handle:h=>[l("transition-delay",h)]});{let h=()=>z([N("--tw-duration")]);e("duration-initial",[h,["--tw-duration","initial"]]),r.functional("duration",A=>{if(A.modifier||!A.value)return;let k=null;if(A.value.kind==="arbitrary"?k=A.value.value:(k=t.resolve(A.value.fraction??A.value.value,["--transition-duration"]),k===null&&T(A.value.value)&&(k=`${A.value.value}ms`)),k!==null)return[h(),l("--tw-duration",k),l("transition-duration",k)]})}i("delay",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-delay"]}]),i("duration",()=>[{values:["75","100","150","200","300","500","700","1000"],valueThemeKeys:["--transition-duration"]}])}{let o=()=>z([N("--tw-ease")]);e("ease-initial",[o,["--tw-ease","initial"]]),e("ease-linear",[o,["--tw-ease","linear"],["transition-timing-function","linear"]]),n("ease",{themeKeys:["--ease"],handle:p=>[o(),l("--tw-ease",p),l("transition-timing-function",p)]})}e("will-change-auto",[["will-change","auto"]]),e("will-change-scroll",[["will-change","scroll-position"]]),e("will-change-contents",[["will-change","contents"]]),e("will-change-transform",[["will-change","transform"]]),n("will-change",{themeKeys:[],handle:o=>[l("will-change",o)]}),e("content-none",[["--tw-content","none"],["content","none"]]),n("content",{themeKeys:[],handle:o=>[z([N("--tw-content",'""')]),l("--tw-content",o),l("content","var(--tw-content)")]});{let o="var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)",p=()=>z([N("--tw-contain-size"),N("--tw-contain-layout"),N("--tw-contain-paint"),N("--tw-contain-style")]);e("contain-none",[["contain","none"]]),e("contain-content",[["contain","content"]]),e("contain-strict",[["contain","strict"]]),e("contain-size",[p,["--tw-contain-size","size"],["contain",o]]),e("contain-inline-size",[p,["--tw-contain-size","inline-size"],["contain",o]]),e("contain-layout",[p,["--tw-contain-layout","layout"],["contain",o]]),e("contain-paint",[p,["--tw-contain-paint","paint"],["contain",o]]),e("contain-style",[p,["--tw-contain-style","style"],["contain",o]]),n("contain",{themeKeys:[],handle:h=>[l("contain",h)]})}e("forced-color-adjust-none",[["forced-color-adjust","none"]]),e("forced-color-adjust-auto",[["forced-color-adjust","auto"]]),e("leading-none",[()=>z([N("--tw-leading")]),["--tw-leading","1"],["line-height","1"]]),a("leading",["--leading","--spacing"],o=>[z([N("--tw-leading")]),l("--tw-leading",o),l("line-height",o)]),n("tracking",{supportsNegative:!0,themeKeys:["--tracking"],handle:o=>[z([N("--tw-tracking")]),l("--tw-tracking",o),l("letter-spacing",o)]}),e("antialiased",[["-webkit-font-smoothing","antialiased"],["-moz-osx-font-smoothing","grayscale"]]),e("subpixel-antialiased",[["-webkit-font-smoothing","auto"],["-moz-osx-font-smoothing","auto"]]);{let o="var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)",p=()=>z([N("--tw-ordinal"),N("--tw-slashed-zero"),N("--tw-numeric-figure"),N("--tw-numeric-spacing"),N("--tw-numeric-fraction")]);e("normal-nums",[["font-variant-numeric","normal"]]),e("ordinal",[p,["--tw-ordinal","ordinal"],["font-variant-numeric",o]]),e("slashed-zero",[p,["--tw-slashed-zero","slashed-zero"],["font-variant-numeric",o]]),e("lining-nums",[p,["--tw-numeric-figure","lining-nums"],["font-variant-numeric",o]]),e("oldstyle-nums",[p,["--tw-numeric-figure","oldstyle-nums"],["font-variant-numeric",o]]),e("proportional-nums",[p,["--tw-numeric-spacing","proportional-nums"],["font-variant-numeric",o]]),e("tabular-nums",[p,["--tw-numeric-spacing","tabular-nums"],["font-variant-numeric",o]]),e("diagonal-fractions",[p,["--tw-numeric-fraction","diagonal-fractions"],["font-variant-numeric",o]]),e("stacked-fractions",[p,["--tw-numeric-fraction","stacked-fractions"],["font-variant-numeric",o]])}{let o=()=>z([N("--tw-outline-style","solid")]);r.static("outline-hidden",()=>[l("--tw-outline-style","none"),l("outline-style","none"),F("@media","(forced-colors: active)",[l("outline","2px solid transparent"),l("outline-offset","2px")])]),e("outline-none",[["--tw-outline-style","none"],["outline-style","none"]]),e("outline-solid",[["--tw-outline-style","solid"],["outline-style","solid"]]),e("outline-dashed",[["--tw-outline-style","dashed"],["outline-style","dashed"]]),e("outline-dotted",[["--tw-outline-style","dotted"],["outline-style","dotted"]]),e("outline-double",[["--tw-outline-style","double"],["outline-style","double"]]),r.functional("outline",p=>{if(p.value===null){if(p.modifier)return;let h=t.get(["--default-outline-width"])??"1px";return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)]}if(p.value.kind==="arbitrary"){let h=p.value.value;switch(p.value.dataType??Y(h,["color","length","number","percentage"])){case"length":case"number":case"percentage":return p.modifier?void 0:[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];default:return h=X(h,p.modifier,t),h===null?void 0:[l("outline-color",h)]}}{let h=te(p,t,["--outline-color","--color"]);if(h)return[l("outline-color",h)]}{if(p.modifier)return;let h=t.resolve(p.value.value,["--outline-width"]);if(h)return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",h)];if(T(p.value.value))return[o(),l("outline-style","var(--tw-outline-style)"),l("outline-width",`${p.value.value}px`)]}}),i("outline",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--outline-color","--color"],modifiers:Array.from({length:21},(p,h)=>`${h*5}`),hasDefaultValue:!0},{values:["0","1","2","4","8"],valueThemeKeys:["--outline-width"]}]),n("outline-offset",{supportsNegative:!0,themeKeys:["--outline-offset"],handleBareValue:({value:p})=>T(p)?`${p}px`:null,handle:p=>[l("outline-offset",p)]}),i("outline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--outline-offset"]}])}n("opacity",{themeKeys:["--opacity"],handleBareValue:({value:o})=>ot(o)?`${o}%`:null,handle:o=>[l("opacity",o)]}),i("opacity",()=>[{values:Array.from({length:21},(o,p)=>`${p*5}`),valueThemeKeys:["--opacity"]}]),e("underline-offset-auto",[["text-underline-offset","auto"]]),n("underline-offset",{supportsNegative:!0,themeKeys:["--text-underline-offset"],handleBareValue:({value:o})=>T(o)?`${o}px`:null,handle:o=>[l("text-underline-offset",o)]}),i("underline-offset",()=>[{supportsNegative:!0,values:["0","1","2","4","8"],valueThemeKeys:["--text-underline-offset"]}]),r.functional("text",o=>{if(o.value){if(o.value.kind==="arbitrary"){let p=o.value.value;switch(o.value.dataType??Y(p,["color","length","percentage","absolute-size","relative-size"])){case"size":case"length":case"percentage":case"absolute-size":case"relative-size":{if(o.modifier){let A=o.modifier.kind==="arbitrary"?o.modifier.value:t.resolve(o.modifier.value,["--leading"]);if(!A&&xe(o.modifier.value)){let k=t.resolve(null,["--spacing"]);if(!k)return null;A=`calc(${k} * ${o.modifier.value})`}return!A&&o.modifier.value==="none"&&(A="1"),A?[l("font-size",p),l("line-height",A)]:null}return[l("font-size",p)]}default:return p=X(p,o.modifier,t),p===null?void 0:[l("color",p)]}}{let p=te(o,t,["--text-color","--color"]);if(p)return[l("color",p)]}{let p=t.resolveWith(o.value.value,["--text"],["--line-height","--letter-spacing","--font-weight"]);if(p){let[h,A={}]=Array.isArray(p)?p:[p];if(o.modifier){let k=o.modifier.kind==="arbitrary"?o.modifier.value:t.resolve(o.modifier.value,["--leading"]);if(!k&&xe(o.modifier.value)){let O=t.resolve(null,["--spacing"]);if(!O)return null;k=`calc(${O} * ${o.modifier.value})`}if(!k&&o.modifier.value==="none"&&(k="1"),!k)return null;let C=[l("font-size",h)];return k&&C.push(l("line-height",k)),C}return typeof A=="string"?[l("font-size",h),l("line-height",A)]:[l("font-size",h),l("line-height",A["--line-height"]?`var(--tw-leading, ${A["--line-height"]})`:void 0),l("letter-spacing",A["--letter-spacing"]?`var(--tw-tracking, ${A["--letter-spacing"]})`:void 0),l("font-weight",A["--font-weight"]?`var(--tw-font-weight, ${A["--font-weight"]})`:void 0)]}}}}),i("text",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:[],valueThemeKeys:["--text"],modifiers:[],modifierThemeKeys:["--leading"]}]);let K=()=>z([N("--tw-text-shadow-color"),N("--tw-text-shadow-alpha","100%","")]);e("text-shadow-initial",[K,["--tw-text-shadow-color","initial"]]),r.functional("text-shadow",o=>{let p;if(o.modifier&&(o.modifier.kind==="arbitrary"?p=o.modifier.value:T(o.modifier.value)&&(p=`${o.modifier.value}%`)),!o.value){let h=t.get(["--text-shadow"]);return h===null?void 0:[K(),l("--tw-text-shadow-alpha",p),...pe("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}if(o.value.kind==="arbitrary"){let h=o.value.value;switch(o.value.dataType??Y(h,["color"])){case"color":return h=X(h,o.modifier,t),h===null?void 0:[K(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))];default:return[K(),l("--tw-text-shadow-alpha",p),...pe("text-shadow",h,p,k=>`var(--tw-text-shadow-color, ${k})`)]}}switch(o.value.value){case"none":return o.modifier?void 0:[K(),l("text-shadow","none")];case"inherit":return o.modifier?void 0:[K(),l("--tw-text-shadow-color","inherit")]}{let h=t.get([`--text-shadow-${o.value.value}`]);if(h)return[K(),l("--tw-text-shadow-alpha",p),...pe("text-shadow",h,p,A=>`var(--tw-text-shadow-color, ${A})`)]}{let h=te(o,t,["--text-shadow-color","--color"]);if(h)return[K(),l("--tw-text-shadow-color",Q(h,"var(--tw-text-shadow-alpha)"))]}}),i("text-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--text-shadow-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["none"]},{valueThemeKeys:["--text-shadow"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`),hasDefaultValue:t.get(["--text-shadow"])!==null}]);{let k=function($){return`var(--tw-ring-inset,) 0 0 0 calc(${$} + var(--tw-ring-offset-width)) var(--tw-ring-color, ${A})`},C=function($){return`inset 0 0 0 ${$} var(--tw-inset-ring-color, currentcolor)`};var J=k,ie=C;let o=["var(--tw-inset-shadow)","var(--tw-inset-ring-shadow)","var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow)"].join(", "),p="0 0 #0000",h=()=>z([N("--tw-shadow",p),N("--tw-shadow-color"),N("--tw-shadow-alpha","100%",""),N("--tw-inset-shadow",p),N("--tw-inset-shadow-color"),N("--tw-inset-shadow-alpha","100%",""),N("--tw-ring-color"),N("--tw-ring-shadow",p),N("--tw-inset-ring-color"),N("--tw-inset-ring-shadow",p),N("--tw-ring-inset"),N("--tw-ring-offset-width","0px",""),N("--tw-ring-offset-color","#fff"),N("--tw-ring-offset-shadow",p)]);e("shadow-initial",[h,["--tw-shadow-color","initial"]]),r.functional("shadow",$=>{let E;if($.modifier&&($.modifier.kind==="arbitrary"?E=$.modifier.value:T($.modifier.value)&&(E=`${$.modifier.value}%`)),!$.value){let U=t.get(["--shadow"]);return U===null?void 0:[h(),l("--tw-shadow-alpha",E),...pe("--tw-shadow",U,E,ae=>`var(--tw-shadow-color, ${ae})`),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let U=$.value.value;switch($.value.dataType??Y(U,["color"])){case"color":return U=X(U,$.modifier,t),U===null?void 0:[h(),l("--tw-shadow-color",Q(U,"var(--tw-shadow-alpha)"))];default:return[h(),l("--tw-shadow-alpha",E),...pe("--tw-shadow",U,E,wt=>`var(--tw-shadow-color, ${wt})`),l("box-shadow",o)]}}switch($.value.value){case"none":return $.modifier?void 0:[h(),l("--tw-shadow",p),l("box-shadow",o)];case"inherit":return $.modifier?void 0:[h(),l("--tw-shadow-color","inherit")]}{let U=t.get([`--shadow-${$.value.value}`]);if(U)return[h(),l("--tw-shadow-alpha",E),...pe("--tw-shadow",U,E,ae=>`var(--tw-shadow-color, ${ae})`),l("box-shadow",o)]}{let U=te($,t,["--box-shadow-color","--color"]);if(U)return[h(),l("--tw-shadow-color",Q(U,"var(--tw-shadow-alpha)"))]}}),i("shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["none"]},{valueThemeKeys:["--shadow"],modifiers:Array.from({length:21},($,E)=>`${E*5}`),hasDefaultValue:t.get(["--shadow"])!==null}]),e("inset-shadow-initial",[h,["--tw-inset-shadow-color","initial"]]),r.functional("inset-shadow",$=>{let E;if($.modifier&&($.modifier.kind==="arbitrary"?E=$.modifier.value:T($.modifier.value)&&(E=`${$.modifier.value}%`)),!$.value){let U=t.get(["--inset-shadow"]);return U===null?void 0:[h(),l("--tw-inset-shadow-alpha",E),...pe("--tw-inset-shadow",U,E,ae=>`var(--tw-inset-shadow-color, ${ae})`),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let U=$.value.value;switch($.value.dataType??Y(U,["color"])){case"color":return U=X(U,$.modifier,t),U===null?void 0:[h(),l("--tw-inset-shadow-color",Q(U,"var(--tw-inset-shadow-alpha)"))];default:return[h(),l("--tw-inset-shadow-alpha",E),...pe("--tw-inset-shadow",U,E,wt=>`var(--tw-inset-shadow-color, ${wt})`,"inset "),l("box-shadow",o)]}}switch($.value.value){case"none":return $.modifier?void 0:[h(),l("--tw-inset-shadow",p),l("box-shadow",o)];case"inherit":return $.modifier?void 0:[h(),l("--tw-inset-shadow-color","inherit")]}{let U=t.get([`--inset-shadow-${$.value.value}`]);if(U)return[h(),l("--tw-inset-shadow-alpha",E),...pe("--tw-inset-shadow",U,E,ae=>`var(--tw-inset-shadow-color, ${ae})`),l("box-shadow",o)]}{let U=te($,t,["--box-shadow-color","--color"]);if(U)return[h(),l("--tw-inset-shadow-color",Q(U,"var(--tw-inset-shadow-alpha)"))]}}),i("inset-shadow",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--box-shadow-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["none"]},{valueThemeKeys:["--inset-shadow"],modifiers:Array.from({length:21},($,E)=>`${E*5}`),hasDefaultValue:t.get(["--inset-shadow"])!==null}]),e("ring-inset",[h,["--tw-ring-inset","inset"]]);let A=t.get(["--default-ring-color"])??"currentcolor";r.functional("ring",$=>{if(!$.value){if($.modifier)return;let E=t.get(["--default-ring-width"])??"1px";return[h(),l("--tw-ring-shadow",k(E)),l("box-shadow",o)]}if($.value.kind==="arbitrary"){let E=$.value.value;switch($.value.dataType??Y(E,["color","length"])){case"length":return $.modifier?void 0:[h(),l("--tw-ring-shadow",k(E)),l("box-shadow",o)];default:return E=X(E,$.modifier,t),E===null?void 0:[l("--tw-ring-color",E)]}}{let E=te($,t,["--ring-color","--color"]);if(E)return[l("--tw-ring-color",E)]}{if($.modifier)return;let E=t.resolve($.value.value,["--ring-width"]);if(E===null&&T($.value.value)&&(E=`${$.value.value}px`),E)return[h(),l("--tw-ring-shadow",k(E)),l("box-shadow",o)]}}),i("ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]),r.functional("inset-ring",$=>{if(!$.value)return $.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C("1px")),l("box-shadow",o)];if($.value.kind==="arbitrary"){let E=$.value.value;switch($.value.dataType??Y(E,["color","length"])){case"length":return $.modifier?void 0:[h(),l("--tw-inset-ring-shadow",C(E)),l("box-shadow",o)];default:return E=X(E,$.modifier,t),E===null?void 0:[l("--tw-inset-ring-color",E)]}}{let E=te($,t,["--ring-color","--color"]);if(E)return[l("--tw-inset-ring-color",E)]}{if($.modifier)return;let E=t.resolve($.value.value,["--ring-width"]);if(E===null&&T($.value.value)&&(E=`${$.value.value}px`),E)return[h(),l("--tw-inset-ring-shadow",C(E)),l("box-shadow",o)]}}),i("inset-ring",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-color","--color"],modifiers:Array.from({length:21},($,E)=>`${E*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-width"],hasDefaultValue:!0}]);let O="var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)";r.functional("ring-offset",$=>{if($.value){if($.value.kind==="arbitrary"){let E=$.value.value;switch($.value.dataType??Y(E,["color","length"])){case"length":return $.modifier?void 0:[l("--tw-ring-offset-width",E),l("--tw-ring-offset-shadow",O)];default:return E=X(E,$.modifier,t),E===null?void 0:[l("--tw-ring-offset-color",E)]}}{let E=t.resolve($.value.value,["--ring-offset-width"]);if(E)return $.modifier?void 0:[l("--tw-ring-offset-width",E),l("--tw-ring-offset-shadow",O)];if(T($.value.value))return $.modifier?void 0:[l("--tw-ring-offset-width",`${$.value.value}px`),l("--tw-ring-offset-shadow",O)]}{let E=te($,t,["--ring-offset-color","--color"]);if(E)return[l("--tw-ring-offset-color",E)]}}})}return i("ring-offset",()=>[{values:["current","inherit","transparent"],valueThemeKeys:["--ring-offset-color","--color"],modifiers:Array.from({length:21},(o,p)=>`${p*5}`)},{values:["0","1","2","4","8"],valueThemeKeys:["--ring-offset-width"]}]),r.functional("@container",o=>{let p=null;if(o.value===null?p="inline-size":o.value.kind==="arbitrary"?p=o.value.value:o.value.kind==="named"&&o.value.value==="normal"&&(p="normal"),p!==null)return o.modifier?[l("container-type",p),l("container-name",o.modifier.value)]:[l("container-type",p)]}),i("@container",()=>[{values:["normal"],valueThemeKeys:[],hasDefaultValue:!0}]),r}var _t=["number","integer","ratio","percentage"];function Sr(t){let r=t.params;return kn.test(r)?i=>{let e={"--value":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set},"--modifier":{usedSpacingInteger:!1,usedSpacingNumber:!1,themeKeys:new Set,literals:new Set}};I(t.nodes,n=>{if(n.kind!=="declaration"||!n.value||!n.value.includes("--value(")&&!n.value.includes("--modifier("))return;let s=q(n.value);ee(s,a=>{if(a.kind!=="function")return;if(a.value==="--spacing"&&!(e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return ee(a.nodes,u=>{if(u.kind!=="function"||u.value!=="--value"&&u.value!=="--modifier")return;let c=u.value;for(let d of u.nodes)if(d.kind==="word"){if(d.value==="integer")e[c].usedSpacingInteger||=!0;else if(d.value==="number"&&(e[c].usedSpacingNumber||=!0,e["--modifier"].usedSpacingNumber&&e["--value"].usedSpacingNumber))return 2}}),0;if(a.value!=="--value"&&a.value!=="--modifier")return;let f=D(Z(a.nodes),",");for(let[u,c]of f.entries())c=c.replace(/\\\*/g,"*"),c=c.replace(/--(.*?)\s--(.*?)/g,"--$1-*--$2"),c=c.replace(/\s+/g,""),c=c.replace(/(-\*){2,}/g,"-*"),c[0]==="-"&&c[1]==="-"&&!c.includes("-*")&&(c+="-*"),f[u]=c;a.nodes=q(f.join(","));for(let u of a.nodes)if(u.kind==="word"&&(u.value[0]==='"'||u.value[0]==="'")&&u.value[0]===u.value[u.value.length-1]){let c=u.value.slice(1,-1);e[a.value].literals.add(c)}else if(u.kind==="word"&&u.value[0]==="-"&&u.value[1]==="-"){let c=u.value.replace(/-\*.*$/g,"");e[a.value].themeKeys.add(c)}else if(u.kind==="word"&&!(u.value[0]==="["&&u.value[u.value.length-1]==="]")&&!_t.includes(u.value)){console.warn(`Unsupported bare value data type: "${u.value}". +Only valid data types are: ${_t.map(x=>`"${x}"`).join(", ")}. +`);let c=u.value,d=structuredClone(a),m="\xB6";ee(d.nodes,(x,{replaceWith:y})=>{x.kind==="word"&&x.value===c&&y({kind:"word",value:m})});let g="^".repeat(Z([u]).length),w=Z([d]).indexOf(m),v=["```css",Z([a])," ".repeat(w)+g,"```"].join(` +`);console.warn(v)}}),n.value=Z(s)}),i.utilities.functional(r.slice(0,-2),n=>{let s=structuredClone(t),a=n.value,f=n.modifier;if(a===null)return;let u=!1,c=!1,d=!1,m=!1,g=new Map,w=!1;if(I([s],(v,{parent:x,replaceWith:y})=>{if(x?.kind!=="rule"&&x?.kind!=="at-rule"||v.kind!=="declaration"||!v.value)return;let V=q(v.value);(ee(V,(S,{replaceWith:R})=>{if(S.kind==="function"){if(S.value==="--value"){u=!0;let L=Cr(a,S,i);return L?(c=!0,L.ratio?w=!0:g.set(v,x),R(L.nodes),1):(u||=!1,y([]),2)}else if(S.value==="--modifier"){if(f===null)return y([]),2;d=!0;let L=Cr(f,S,i);return L?(m=!0,R(L.nodes),1):(d||=!1,y([]),2)}}})??0)===0&&(v.value=Z(V))}),u&&!c||d&&!m||w&&m||f&&!w&&!m)return null;if(w)for(let[v,x]of g){let y=x.nodes.indexOf(v);y!==-1&&x.nodes.splice(y,1)}return s.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],s=[];for(let[a,{literals:f,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:d}]of[[n,e["--value"]],[s,e["--modifier"]]]){for(let m of f)a.push(m);if(u)a.push(...at);else if(c)for(let m of at)T(m)&&a.push(m);for(let m of i.theme.keysInNamespaces(d))a.push(m.replace($r,(g,w,v)=>`${w}.${v}`))}return[{values:n,modifiers:s}]})}:wn.test(r)?i=>{i.utilities.static(r,()=>structuredClone(t.nodes))}:null}function Cr(t,r,i){for(let e of r.nodes){if(t.kind==="named"&&e.kind==="word"&&(e.value[0]==="'"||e.value[0]==='"')&&e.value[e.value.length-1]===e.value[0]&&e.value.slice(1,-1)===t.value)return{nodes:q(t.value)};if(t.kind==="named"&&e.kind==="word"&&e.value[0]==="-"&&e.value[1]==="-"){let n=e.value;if(n.endsWith("-*")){n=n.slice(0,-2);let s=i.theme.resolve(t.value,[n]);if(s)return{nodes:q(s)}}else{let s=n.split("-*");if(s.length<=1)continue;let a=[s.shift()],f=i.theme.resolveWith(t.value,a,s);if(f){let[,u={}]=f;{let c=u[s.pop()];if(c)return{nodes:q(c)}}}}}else if(t.kind==="named"&&e.kind==="word"){if(!_t.includes(e.value))continue;let n=e.value==="ratio"&&"fraction"in t?t.fraction:t.value;if(!n)continue;let s=Y(n,[e.value]);if(s===null)continue;if(s==="ratio"){let[a,f]=D(n,"/");if(!T(a)||!T(f))continue}else{if(s==="number"&&!xe(n))continue;if(s==="percentage"&&!T(n.slice(0,-1)))continue}return{nodes:q(n),ratio:s==="ratio"}}else if(t.kind==="arbitrary"&&e.kind==="word"&&e.value[0]==="["&&e.value[e.value.length-1]==="]"){let n=e.value.slice(1,-1);if(n==="*")return{nodes:q(t.value)};if("dataType"in t&&t.dataType&&t.dataType!==n)continue;if("dataType"in t&&t.dataType)return{nodes:q(t.value)};if(Y(t.value,[n])!==null)return{nodes:q(t.value)}}}}function pe(t,r,i,e,n=""){let s=!1,a=Ue(r,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Nr(u,i))));function f(u){return n?D(u,",").map(c=>n+c).join(","):u}return s?[l(t,f(Ue(r,e))),G("@supports (color: lab(from red l a b))",[l(t,f(a))])]:[l(t,f(a))]}function lt(t,r,i,e,n=""){let s=!1,a=D(r,",").map(f=>Ue(f,u=>i==null?e(u):u.startsWith("current")?e(Q(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(s=!0),e(Nr(u,i))))).map(f=>`drop-shadow(${f})`).join(" ");return s?[l(t,n+D(r,",").map(f=>`drop-shadow(${Ue(f,e)})`).join(" ")),G("@supports (color: lab(from red l a b))",[l(t,n+a)])]:[l(t,n+a)]}var Dt={"--alpha":bn,"--spacing":yn,"--theme":xn,theme:An};function bn(t,r,i,...e){let[n,s]=D(i,"/").map(a=>a.trim());if(!n||!s)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);if(e.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${s||"50%"})\``);return Q(n,s)}function yn(t,r,i,...e){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(e.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${e.length+1}.`);let n=t.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${n} * ${i})`}function xn(t,r,i,...e){if(!i.startsWith("--"))throw new Error("The --theme(\u2026) function can only be used with CSS variables from your theme.");let n=!1;i.endsWith(" inline")&&(n=!0,i=i.slice(0,-7)),r.kind==="at-rule"&&(n=!0);let s=t.resolveThemeValue(i,n);if(!s){if(e.length>0)return e.join(", ");throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the variable name is correct or provide a fallback value to silence this error.`)}if(e.length===0)return s;let a=e.join(", ");if(a==="initial")return s;if(s==="initial")return a;if(s.startsWith("var(")||s.startsWith("theme(")||s.startsWith("--theme(")){let f=q(s);return Nn(f,a),Z(f)}return s}function An(t,r,i,...e){i=Cn(i);let n=t.resolveThemeValue(i);if(!n&&e.length>0)return e.join(", ");if(!n)throw new Error(`Could not resolve value for theme function: \`theme(${i})\`. Consider checking if the path is correct or provide a fallback value to silence this error.`);return n}var Er=new RegExp(Object.keys(Dt).map(t=>`${t}\\(`).join("|"));function Ve(t,r){let i=0;return I(t,e=>{if(e.kind==="declaration"&&e.value&&Er.test(e.value)){i|=8,e.value=Tr(e.value,e,r);return}e.kind==="at-rule"&&(e.name==="@media"||e.name==="@custom-media"||e.name==="@container"||e.name==="@supports")&&Er.test(e.params)&&(i|=8,e.params=Tr(e.params,e,r))}),i}function Tr(t,r,i){let e=q(t);return ee(e,(n,{replaceWith:s})=>{if(n.kind==="function"&&n.value in Dt){let a=D(Z(n.nodes).trim(),",").map(u=>u.trim()),f=Dt[n.value](i,r,...a);return s(q(f))}}),Z(e)}function Cn(t){if(t[0]!=="'"&&t[0]!=='"')return t;let r="",i=t[0];for(let e=1;e{if(i.kind==="function"&&!(i.value!=="var"&&i.value!=="theme"&&i.value!=="--theme"))if(i.nodes.length===1)i.nodes.push({kind:"word",value:`, ${r}`});else{let e=i.nodes[i.nodes.length-1];e.kind==="word"&&e.value==="initial"&&(e.value=r)}})}function st(t,r){let i=t.length,e=r.length,n=i=48&&a<=57&&f>=48&&f<=57){let u=s,c=s+1,d=s,m=s+1;for(a=t.charCodeAt(c);a>=48&&a<=57;)a=t.charCodeAt(++c);for(f=r.charCodeAt(m);f>=48&&f<=57;)f=r.charCodeAt(++m);let g=t.slice(u,c),w=r.slice(d,m),v=Number(g)-Number(w);if(v)return v;if(gw)return 1;continue}if(a!==f)return a-f}return t.length-r.length}var $n=/^\d+\/\d+$/;function Rr(t){let r=new B(n=>({name:n,utility:n,fraction:!1,modifiers:[]}));for(let n of t.utilities.keys("static")){let s=r.get(n);s.fraction=!1,s.modifiers=[]}for(let n of t.utilities.keys("functional")){let s=t.utilities.getCompletions(n);for(let a of s)for(let f of a.values){let u=f!==null&&$n.test(f),c=f===null?n:`${n}-${f}`,d=r.get(c);if(d.utility=n,d.fraction||=u,d.modifiers.push(...a.modifiers),a.supportsNegative){let m=r.get(`-${c}`);m.utility=`-${n}`,m.fraction||=u,m.modifiers.push(...a.modifiers)}}}if(r.size===0)return[];let i=Array.from(r.values());return i.sort((n,s)=>st(n.name,s.name)),Vn(i)}function Vn(t){let r=[],i=null,e=new Map,n=new B(()=>[]);for(let a of t){let{utility:f,fraction:u}=a;i||(i={utility:f,items:[]},e.set(f,i)),f!==i.utility&&(r.push(i),i={utility:f,items:[]},e.set(f,i)),u?n.get(f).push(a):i.items.push(a)}i&&r[r.length-1]!==i&&r.push(i);for(let[a,f]of n){let u=e.get(a);u&&u.items.push(...f)}let s=[];for(let a of r)for(let f of a.items)s.push([f.name,{modifiers:f.modifiers}]);return s}function Pr(t){let r=[];for(let[e,n]of t.variants.entries()){let f=function({value:u,modifier:c}={}){let d=e;u&&(d+=s?`-${u}`:u),c&&(d+=`/${c}`);let m=t.parseVariant(d);if(!m)return[];let g=M(".__placeholder__",[]);if(Ee(g,m,t.variants)===null)return[];let w=[];return Xe(g.nodes,(v,{path:x})=>{if(v.kind!=="rule"&&v.kind!=="at-rule"||v.nodes.length>0)return;x.sort((b,S)=>{let R=b.kind==="at-rule",L=S.kind==="at-rule";return R&&!L?-1:!R&&L?1:0});let y=x.flatMap(b=>b.kind==="rule"?b.selector==="&"?[]:[b.selector]:b.kind==="at-rule"?[`${b.name} ${b.params}`]:[]),V="";for(let b=y.length-1;b>=0;b--)V=V===""?y[b]:`${y[b]} { ${V} }`;w.push(V)}),w};var i=f;if(n.kind==="arbitrary")continue;let s=e!=="@",a=t.variants.getCompletions(e);switch(n.kind){case"static":{r.push({name:e,values:a,isArbitrary:!1,hasDash:s,selectors:f});break}case"functional":{r.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:f});break}case"compound":{r.push({name:e,values:a,isArbitrary:!0,hasDash:s,selectors:f});break}}}return r}function Or(t,r){let{astNodes:i,nodeSorting:e}=ge(Array.from(r),t),n=new Map(r.map(a=>[a,null])),s=0n;for(let a of i){let f=e.get(a)?.candidate;f&&n.set(f,n.get(f)??s++)}return r.map(a=>[a,n.get(a)??null])}var ut=/^@?[a-zA-Z0-9_-]*$/;var Kt=class{compareFns=new Map;variants=new Map;completions=new Map;groupOrder=null;lastOrder=0;static(r,i,{compounds:e,order:n}={}){this.set(r,{kind:"static",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}fromAst(r,i){let e=[];I(i,n=>{n.kind==="rule"?e.push(n.selector):n.kind==="at-rule"&&n.name!=="@slot"&&e.push(`${n.name} ${n.params}`)}),this.static(r,n=>{let s=structuredClone(i);Ut(s,n.nodes),n.nodes=s},{compounds:Ae(e)})}functional(r,i,{compounds:e,order:n}={}){this.set(r,{kind:"functional",applyFn:i,compoundsWith:0,compounds:e??2,order:n})}compound(r,i,e,{compounds:n,order:s}={}){this.set(r,{kind:"compound",applyFn:e,compoundsWith:i,compounds:n??2,order:s})}group(r,i){this.groupOrder=this.nextOrder(),i&&this.compareFns.set(this.groupOrder,i),r(),this.groupOrder=null}has(r){return this.variants.has(r)}get(r){return this.variants.get(r)}kind(r){return this.variants.get(r)?.kind}compoundsWith(r,i){let e=this.variants.get(r),n=typeof i=="string"?this.variants.get(i):i.kind==="arbitrary"?{compounds:Ae([i.selector])}:this.variants.get(i.root);return!(!e||!n||e.kind!=="compound"||n.compounds===0||e.compoundsWith===0||(e.compoundsWith&n.compounds)===0)}suggest(r,i){this.completions.set(r,i)}getCompletions(r){return this.completions.get(r)?.()??[]}compare(r,i){if(r===i)return 0;if(r===null)return-1;if(i===null)return 1;if(r.kind==="arbitrary"&&i.kind==="arbitrary")return r.selector{g.nodes=d.map(w=>G(w,g.nodes))},{compounds:m})}i("*",[":is(& > *)"],{compounds:0}),i("**",[":is(& *)"],{compounds:0});function e(c,d){return d.map(m=>{m=m.trim();let g=D(m," ");return g[0]==="not"?g.slice(1).join(" "):c==="@container"?g[0][0]==="("?`not ${m}`:g[1]==="not"?`${g[0]} ${g.slice(2).join(" ")}`:`${g[0]} not ${g.slice(1).join(" ")}`:`not ${m}`})}let n=["@media","@supports","@container"];function s(c){for(let d of n){if(d!==c.name)continue;let m=D(c.params,",");return m.length>1?null:(m=e(c.name,m),F(c.name,m.join(", ")))}return null}function a(c){return c.includes("::")?null:`&:not(${D(c,",").map(m=>(m=m.replaceAll("&","*"),m)).join(", ")})`}r.compound("not",3,(c,d)=>{if(d.variant.kind==="arbitrary"&&d.variant.relative||d.modifier)return null;let m=!1;if(I([c],(g,{path:w})=>{if(g.kind!=="rule"&&g.kind!=="at-rule")return 0;if(g.nodes.length>0)return 0;let v=[],x=[];for(let V of w)V.kind==="at-rule"?v.push(V):V.kind==="rule"&&x.push(V);if(v.length>1)return 2;if(x.length>1)return 2;let y=[];for(let V of x){let b=a(V.selector);if(!b)return m=!1,2;y.push(M(b,[]))}for(let V of v){let b=s(V);if(!b)return m=!1,2;y.push(b)}return Object.assign(c,M("&",y)),m=!0,1}),c.kind==="rule"&&c.selector==="&"&&c.nodes.length===1&&Object.assign(c,c.nodes[0]),!m)return null}),r.suggest("not",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("not",c))),r.compound("group",2,(c,d)=>{if(d.variant.kind==="arbitrary"&&d.variant.relative)return null;let m=d.modifier?`:where(.${t.prefix?`${t.prefix}\\:`:""}group\\/${d.modifier.value})`:`:where(.${t.prefix?`${t.prefix}\\:`:""}group)`,g=!1;if(I([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let y of v.slice(0,-1))if(y.kind==="rule")return g=!1,2;let x=w.selector.replaceAll("&",m);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} *)`,g=!0}),!g)return null}),r.suggest("group",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("group",c))),r.compound("peer",2,(c,d)=>{if(d.variant.kind==="arbitrary"&&d.variant.relative)return null;let m=d.modifier?`:where(.${t.prefix?`${t.prefix}\\:`:""}peer\\/${d.modifier.value})`:`:where(.${t.prefix?`${t.prefix}\\:`:""}peer)`,g=!1;if(I([c],(w,{path:v})=>{if(w.kind!=="rule")return 0;for(let y of v.slice(0,-1))if(y.kind==="rule")return g=!1,2;let x=w.selector.replaceAll("&",m);D(x,",").length>1&&(x=`:is(${x})`),w.selector=`&:is(${x} ~ *)`,g=!0}),!g)return null}),r.suggest("peer",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("peer",c))),i("first-letter",["&::first-letter"]),i("first-line",["&::first-line"]),i("marker",["& *::marker","&::marker","& *::-webkit-details-marker","&::-webkit-details-marker"]),i("selection",["& *::selection","&::selection"]),i("file",["&::file-selector-button"]),i("placeholder",["&::placeholder"]),i("backdrop",["&::backdrop"]),i("details-content",["&::details-content"]);{let c=function(){return z([F("@property","--tw-content",[l("syntax",'"*"'),l("initial-value",'""'),l("inherits","false")])])};var f=c;r.static("before",d=>{d.nodes=[M("&::before",[c(),l("content","var(--tw-content)"),...d.nodes])]},{compounds:0}),r.static("after",d=>{d.nodes=[M("&::after",[c(),l("content","var(--tw-content)"),...d.nodes])]},{compounds:0})}i("first",["&:first-child"]),i("last",["&:last-child"]),i("only",["&:only-child"]),i("odd",["&:nth-child(odd)"]),i("even",["&:nth-child(even)"]),i("first-of-type",["&:first-of-type"]),i("last-of-type",["&:last-of-type"]),i("only-of-type",["&:only-of-type"]),i("visited",["&:visited"]),i("target",["&:target"]),i("open",["&:is([open], :popover-open, :open)"]),i("default",["&:default"]),i("checked",["&:checked"]),i("indeterminate",["&:indeterminate"]),i("placeholder-shown",["&:placeholder-shown"]),i("autofill",["&:autofill"]),i("optional",["&:optional"]),i("required",["&:required"]),i("valid",["&:valid"]),i("invalid",["&:invalid"]),i("user-valid",["&:user-valid"]),i("user-invalid",["&:user-invalid"]),i("in-range",["&:in-range"]),i("out-of-range",["&:out-of-range"]),i("read-only",["&:read-only"]),i("empty",["&:empty"]),i("focus-within",["&:focus-within"]),r.static("hover",c=>{c.nodes=[M("&:hover",[F("@media","(hover: hover)",c.nodes)])]}),i("focus",["&:focus"]),i("focus-visible",["&:focus-visible"]),i("active",["&:active"]),i("enabled",["&:enabled"]),i("disabled",["&:disabled"]),i("inert",["&:is([inert], [inert] *)"]),r.compound("in",2,(c,d)=>{if(d.modifier)return null;let m=!1;if(I([c],(g,{path:w})=>{if(g.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return m=!1,2;g.selector=`:where(${g.selector.replaceAll("&","*")}) &`,m=!0}),!m)return null}),r.suggest("in",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("in",c))),r.compound("has",2,(c,d)=>{if(d.modifier)return null;let m=!1;if(I([c],(g,{path:w})=>{if(g.kind!=="rule")return 0;for(let v of w.slice(0,-1))if(v.kind==="rule")return m=!1,2;g.selector=`&:has(${g.selector.replaceAll("&","*")})`,m=!0}),!m)return null}),r.suggest("has",()=>Array.from(r.keys()).filter(c=>r.compoundsWith("has",c))),r.functional("aria",(c,d)=>{if(!d.value||d.modifier)return null;d.value.kind==="arbitrary"?c.nodes=[M(`&[aria-${_r(d.value.value)}]`,c.nodes)]:c.nodes=[M(`&[aria-${d.value.value}="true"]`,c.nodes)]}),r.suggest("aria",()=>["busy","checked","disabled","expanded","hidden","pressed","readonly","required","selected"]),r.functional("data",(c,d)=>{if(!d.value||d.modifier)return null;c.nodes=[M(`&[data-${_r(d.value.value)}]`,c.nodes)]}),r.functional("nth",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-child(${d.value.value})`,c.nodes)]}),r.functional("nth-last",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-last-child(${d.value.value})`,c.nodes)]}),r.functional("nth-of-type",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-of-type(${d.value.value})`,c.nodes)]}),r.functional("nth-last-of-type",(c,d)=>{if(!d.value||d.modifier||d.value.kind==="named"&&!T(d.value.value))return null;c.nodes=[M(`&:nth-last-of-type(${d.value.value})`,c.nodes)]}),r.functional("supports",(c,d)=>{if(!d.value||d.modifier)return null;let m=d.value.value;if(m===null)return null;if(/^[\w-]*\s*\(/.test(m)){let g=m.replace(/\b(and|or|not)\b/g," $1 ");c.nodes=[F("@supports",g,c.nodes)];return}m.includes(":")||(m=`${m}: var(--tw)`),(m[0]!=="("||m[m.length-1]!==")")&&(m=`(${m})`),c.nodes=[F("@supports",m,c.nodes)]},{compounds:1}),i("motion-safe",["@media (prefers-reduced-motion: no-preference)"]),i("motion-reduce",["@media (prefers-reduced-motion: reduce)"]),i("contrast-more",["@media (prefers-contrast: more)"]),i("contrast-less",["@media (prefers-contrast: less)"]);{let c=function(d,m,g,w){if(d===m)return 0;let v=w.get(d);if(v===null)return g==="asc"?-1:1;let x=w.get(m);return x===null?g==="asc"?1:-1:ye(v,x,g)};var u=c;{let d=t.namespace("--breakpoint"),m=new B(g=>{switch(g.kind){case"static":return t.resolveValue(g.root,["--breakpoint"])??null;case"functional":{if(!g.value||g.modifier)return null;let w=null;return g.value.kind==="arbitrary"?w=g.value.value:g.value.kind==="named"&&(w=t.resolveValue(g.value.value,["--breakpoint"])),!w||w.includes("var(")?null:w}case"arbitrary":case"compound":return null}});r.group(()=>{r.functional("max",(g,w)=>{if(w.modifier)return null;let v=m.get(w);if(v===null)return null;g.nodes=[F("@media",`(width < ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"desc",m)),r.suggest("max",()=>Array.from(d.keys()).filter(g=>g!==null)),r.group(()=>{for(let[g,w]of t.namespace("--breakpoint"))g!==null&&r.static(g,v=>{v.nodes=[F("@media",`(width >= ${w})`,v.nodes)]},{compounds:1});r.functional("min",(g,w)=>{if(w.modifier)return null;let v=m.get(w);if(v===null)return null;g.nodes=[F("@media",`(width >= ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"asc",m)),r.suggest("min",()=>Array.from(d.keys()).filter(g=>g!==null))}{let d=t.namespace("--container"),m=new B(g=>{switch(g.kind){case"functional":{if(g.value===null)return null;let w=null;return g.value.kind==="arbitrary"?w=g.value.value:g.value.kind==="named"&&(w=t.resolveValue(g.value.value,["--container"])),!w||w.includes("var(")?null:w}case"static":case"arbitrary":case"compound":return null}});r.group(()=>{r.functional("@max",(g,w)=>{let v=m.get(w);if(v===null)return null;g.nodes=[F("@container",w.modifier?`${w.modifier.value} (width < ${v})`:`(width < ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"desc",m)),r.suggest("@max",()=>Array.from(d.keys()).filter(g=>g!==null)),r.group(()=>{r.functional("@",(g,w)=>{let v=m.get(w);if(v===null)return null;g.nodes=[F("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,g.nodes)]},{compounds:1}),r.functional("@min",(g,w)=>{let v=m.get(w);if(v===null)return null;g.nodes=[F("@container",w.modifier?`${w.modifier.value} (width >= ${v})`:`(width >= ${v})`,g.nodes)]},{compounds:1})},(g,w)=>c(g,w,"asc",m)),r.suggest("@min",()=>Array.from(d.keys()).filter(g=>g!==null)),r.suggest("@",()=>Array.from(d.keys()).filter(g=>g!==null))}}return i("portrait",["@media (orientation: portrait)"]),i("landscape",["@media (orientation: landscape)"]),i("ltr",['&:where(:dir(ltr), [dir="ltr"], [dir="ltr"] *)']),i("rtl",['&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *)']),i("dark",["@media (prefers-color-scheme: dark)"]),i("starting",["@starting-style"]),i("print",["@media print"]),i("forced-colors",["@media (forced-colors: active)"]),i("inverted-colors",["@media (inverted-colors: inverted)"]),i("pointer-none",["@media (pointer: none)"]),i("pointer-coarse",["@media (pointer: coarse)"]),i("pointer-fine",["@media (pointer: fine)"]),i("any-pointer-none",["@media (any-pointer: none)"]),i("any-pointer-coarse",["@media (any-pointer: coarse)"]),i("any-pointer-fine",["@media (any-pointer: fine)"]),i("noscript",["@media (scripting: none)"]),r}function _r(t){if(t.includes("=")){let[r,...i]=D(t,"="),e=i.join("=").trim();if(e[0]==="'"||e[0]==='"')return t;if(e.length>1){let n=e[e.length-1];if(e[e.length-2]===" "&&(n==="i"||n==="I"||n==="s"||n==="S"))return`${r}="${e.slice(0,-2)}" ${n}`}return`${r}="${e}"`}return t}function Ut(t,r){I(t,(i,{replaceWith:e})=>{if(i.kind==="at-rule"&&i.name==="@slot")e(r);else if(i.kind==="at-rule"&&(i.name==="@keyframes"||i.name==="@property"))return Object.assign(i,z([F(i.name,i.params,i.nodes)])),1})}function Kr(t){let r=Vr(t),i=Dr(t),e=new B(u=>gr(u,f)),n=new B(u=>Array.from(mr(u,f))),s=new B(u=>{let c=Ur(u,f);try{Ve(c.map(({node:d})=>d),f)}catch{return[]}return c}),a=new B(u=>{for(let c of Qe(u))t.markUsedVariable(c)}),f={theme:t,utilities:r,variants:i,invalidCandidates:new Set,important:!1,candidatesToCss(u){let c=[];for(let d of u){let m=!1,{astNodes:g}=ge([d],this,{onInvalidCandidate(){m=!0}});g=be(g,f,0),g.length===0||m?c.push(null):c.push(oe(g))}return c},getClassOrder(u){return Or(this,u)},getClassList(){return Rr(this)},getVariants(){return Pr(this)},parseCandidate(u){return n.get(u)},parseVariant(u){return e.get(u)},compileAstNodes(u){return s.get(u)},printCandidate(u){return vr(f,u)},printVariant(u){return it(u)},getVariantOrder(){let u=Array.from(e.values());u.sort((g,w)=>this.variants.compare(g,w));let c=new Map,d,m=0;for(let g of u)g!==null&&(d!==void 0&&this.variants.compare(d,g)!==0&&m++,c.set(g,m),d=g);return c},resolveThemeValue(u,c=!0){let d=u.lastIndexOf("/"),m=null;d!==-1&&(m=u.slice(d+1).trim(),u=u.slice(0,d).trim());let g=t.resolve(null,[u],c?1:0)??void 0;return m&&g?Q(g,m):g},trackUsedVariables(u){a.get(u)}};return f}var Lt=["container-type","pointer-events","visibility","position","inset","inset-inline","inset-block","inset-inline-start","inset-inline-end","top","right","bottom","left","isolation","z-index","order","grid-column","grid-column-start","grid-column-end","grid-row","grid-row-start","grid-row-end","float","clear","--tw-container-component","margin","margin-inline","margin-block","margin-inline-start","margin-inline-end","margin-top","margin-right","margin-bottom","margin-left","box-sizing","display","field-sizing","aspect-ratio","height","max-height","min-height","width","max-width","min-width","flex","flex-shrink","flex-grow","flex-basis","table-layout","caption-side","border-collapse","border-spacing","transform-origin","translate","--tw-translate-x","--tw-translate-y","--tw-translate-z","scale","--tw-scale-x","--tw-scale-y","--tw-scale-z","rotate","--tw-rotate-x","--tw-rotate-y","--tw-rotate-z","--tw-skew-x","--tw-skew-y","transform","animation","cursor","touch-action","--tw-pan-x","--tw-pan-y","--tw-pinch-zoom","resize","scroll-snap-type","--tw-scroll-snap-strictness","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-margin-inline","scroll-margin-block","scroll-margin-inline-start","scroll-margin-inline-end","scroll-margin-top","scroll-margin-right","scroll-margin-bottom","scroll-margin-left","scroll-padding","scroll-padding-inline","scroll-padding-block","scroll-padding-inline-start","scroll-padding-inline-end","scroll-padding-top","scroll-padding-right","scroll-padding-bottom","scroll-padding-left","list-style-position","list-style-type","list-style-image","appearance","columns","break-before","break-inside","break-after","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-template-columns","grid-template-rows","flex-direction","flex-wrap","place-content","place-items","align-content","align-items","justify-content","justify-items","gap","column-gap","row-gap","--tw-space-x-reverse","--tw-space-y-reverse","divide-x-width","divide-y-width","--tw-divide-y-reverse","divide-style","divide-color","place-self","align-self","justify-self","overflow","overflow-x","overflow-y","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-behavior","border-radius","border-start-radius","border-end-radius","border-top-radius","border-right-radius","border-bottom-radius","border-left-radius","border-start-start-radius","border-start-end-radius","border-end-end-radius","border-end-start-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-width","border-inline-width","border-block-width","border-inline-start-width","border-inline-end-width","border-top-width","border-right-width","border-bottom-width","border-left-width","border-style","border-inline-style","border-block-style","border-inline-start-style","border-inline-end-style","border-top-style","border-right-style","border-bottom-style","border-left-style","border-color","border-inline-color","border-block-color","border-inline-start-color","border-inline-end-color","border-top-color","border-right-color","border-bottom-color","border-left-color","background-color","background-image","--tw-gradient-position","--tw-gradient-stops","--tw-gradient-via-stops","--tw-gradient-from","--tw-gradient-from-position","--tw-gradient-via","--tw-gradient-via-position","--tw-gradient-to","--tw-gradient-to-position","mask-image","--tw-mask-top","--tw-mask-top-from-color","--tw-mask-top-from-position","--tw-mask-top-to-color","--tw-mask-top-to-position","--tw-mask-right","--tw-mask-right-from-color","--tw-mask-right-from-position","--tw-mask-right-to-color","--tw-mask-right-to-position","--tw-mask-bottom","--tw-mask-bottom-from-color","--tw-mask-bottom-from-position","--tw-mask-bottom-to-color","--tw-mask-bottom-to-position","--tw-mask-left","--tw-mask-left-from-color","--tw-mask-left-from-position","--tw-mask-left-to-color","--tw-mask-left-to-position","--tw-mask-linear","--tw-mask-linear-position","--tw-mask-linear-from-color","--tw-mask-linear-from-position","--tw-mask-linear-to-color","--tw-mask-linear-to-position","--tw-mask-radial","--tw-mask-radial-shape","--tw-mask-radial-size","--tw-mask-radial-position","--tw-mask-radial-from-color","--tw-mask-radial-from-position","--tw-mask-radial-to-color","--tw-mask-radial-to-position","--tw-mask-conic","--tw-mask-conic-position","--tw-mask-conic-from-color","--tw-mask-conic-from-position","--tw-mask-conic-to-color","--tw-mask-conic-to-position","box-decoration-break","background-size","background-attachment","background-clip","background-position","background-repeat","background-origin","mask-composite","mask-mode","mask-type","mask-size","mask-clip","mask-position","mask-repeat","mask-origin","fill","stroke","stroke-width","object-fit","object-position","padding","padding-inline","padding-block","padding-inline-start","padding-inline-end","padding-top","padding-right","padding-bottom","padding-left","text-align","text-indent","vertical-align","font-family","font-size","line-height","font-weight","letter-spacing","text-wrap","overflow-wrap","word-break","text-overflow","hyphens","white-space","color","text-transform","font-style","font-stretch","font-variant-numeric","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","-webkit-font-smoothing","placeholder-color","caret-color","accent-color","color-scheme","opacity","background-blend-mode","mix-blend-mode","box-shadow","--tw-shadow","--tw-shadow-color","--tw-ring-shadow","--tw-ring-color","--tw-inset-shadow","--tw-inset-shadow-color","--tw-inset-ring-shadow","--tw-inset-ring-color","--tw-ring-offset-width","--tw-ring-offset-color","outline","outline-width","outline-offset","outline-color","--tw-blur","--tw-brightness","--tw-contrast","--tw-drop-shadow","--tw-grayscale","--tw-hue-rotate","--tw-invert","--tw-saturate","--tw-sepia","filter","--tw-backdrop-blur","--tw-backdrop-brightness","--tw-backdrop-contrast","--tw-backdrop-grayscale","--tw-backdrop-hue-rotate","--tw-backdrop-invert","--tw-backdrop-opacity","--tw-backdrop-saturate","--tw-backdrop-sepia","backdrop-filter","transition-property","transition-behavior","transition-delay","transition-duration","transition-timing-function","will-change","contain","content","forced-color-adjust"];function ge(t,r,{onInvalidCandidate:i}={}){let e=new Map,n=[],s=new Map;for(let f of t){if(r.invalidCandidates.has(f)){i?.(f);continue}let u=r.parseCandidate(f);if(u.length===0){i?.(f);continue}s.set(f,u)}let a=r.getVariantOrder();for(let[f,u]of s){let c=!1;for(let d of u){let m=r.compileAstNodes(d);if(m.length!==0){c=!0;for(let{node:g,propertySort:w}of m){let v=0n;for(let x of d.variants)v|=1n<{let c=e.get(f),d=e.get(u);if(c.variants-d.variants!==0n)return Number(c.variants-d.variants);let m=0;for(;m1)return null;for(let u of a.nodes)if(u.kind!=="rule"&&u.kind!=="at-rule"||n(u,r)===null)return null;I(a.nodes,u=>{if((u.kind==="rule"||u.kind==="at-rule")&&u.nodes.length<=0)return u.nodes=t.nodes,1}),t.nodes=a.nodes;return}if(n(t,r)===null)return null}function Lr(t){let r=t.options?.types??[];return r.length>1&&r.includes("any")}function Sn(t,r){if(t.kind==="arbitrary"){let a=t.value;return t.modifier&&(a=X(a,t.modifier,r.theme)),a===null?[]:[[l(t.property,a)]]}let i=r.utilities.get(t.root)??[],e=[],n=i.filter(a=>!Lr(a));for(let a of n){if(a.kind!==t.kind)continue;let f=a.compileFn(t);if(f!==void 0){if(f===null)return e;e.push(f)}}if(e.length>0)return e;let s=i.filter(a=>Lr(a));for(let a of s){if(a.kind!==t.kind)continue;let f=a.compileFn(t);if(f!==void 0){if(f===null)return e;e.push(f)}}return e}function jr(t){for(let r of t)r.kind!=="at-root"&&(r.kind==="declaration"?r.important=!0:(r.kind==="rule"||r.kind==="at-rule")&&jr(r.nodes))}function En(t){let r=new Set,i=0,e=t.slice(),n=!1;for(;e.length>0;){let s=e.shift();if(s.kind==="declaration"){if(s.value===void 0||(i++,n))continue;if(s.property==="--tw-sort"){let f=Lt.indexOf(s.value??"");if(f!==-1){r.add(f),n=!0;continue}}let a=Lt.indexOf(s.property);a!==-1&&r.add(a)}else if(s.kind==="rule"||s.kind==="at-rule")for(let a of s.nodes)e.push(a)}return{order:Array.from(r).sort((s,a)=>s-a),count:i}}function je(t,r){let i=0,e=G("&",t),n=new Set,s=new B(()=>new Set),a=new B(()=>new Set);I([e],(m,{parent:g,path:w})=>{if(m.kind==="at-rule"){if(m.name==="@keyframes")return I(m.nodes,v=>{if(v.kind==="at-rule"&&v.name==="@apply")throw new Error("You cannot use `@apply` inside `@keyframes`.")}),1;if(m.name==="@utility"){let v=m.params.replace(/-\*$/,"");a.get(v).add(m),I(m.nodes,x=>{if(!(x.kind!=="at-rule"||x.name!=="@apply")){n.add(m);for(let y of Ir(x,r))s.get(m).add(y)}});return}if(m.name==="@apply"){if(g===null)return;i|=1,n.add(g);for(let v of Ir(m,r))for(let x of w)x!==m&&n.has(x)&&s.get(x).add(v)}}});let f=new Set,u=[],c=new Set;function d(m,g=[]){if(!f.has(m)){if(c.has(m)){let w=g[(g.indexOf(m)+1)%g.length];throw m.kind==="at-rule"&&m.name==="@utility"&&w.kind==="at-rule"&&w.name==="@utility"&&I(m.nodes,v=>{if(v.kind!=="at-rule"||v.name!=="@apply")return;let x=v.params.split(/\s+/g);for(let y of x)for(let V of r.parseCandidate(y))switch(V.kind){case"arbitrary":break;case"static":case"functional":if(w.params.replace(/-\*$/,"")===V.root)throw new Error(`You cannot \`@apply\` the \`${y}\` utility here because it creates a circular dependency.`);break;default:}}),new Error(`Circular dependency detected: + +${oe([m])} +Relies on: + +${oe([w])}`)}c.add(m);for(let w of s.get(m))for(let v of a.get(w))g.push(m),d(v,g),g.pop();f.add(m),c.delete(m),u.push(m)}}for(let m of n)d(m);for(let m of u)"nodes"in m&&I(m.nodes,(g,{replaceWith:w})=>{if(g.kind!=="at-rule"||g.name!=="@apply")return;let v=g.params.split(/(\s+)/g),x={},y=0;for(let[V,b]of v.entries())V%2===0&&(x[b]=y),y+=b.length;{let V=Object.keys(x),b=ge(V,r,{onInvalidCandidate:P=>{if(r.theme.prefix&&!P.startsWith(r.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${P}\`. Did you mean \`${r.theme.prefix}:${P}\`?`);if(r.invalidCandidates.has(P))throw new Error(`Cannot apply utility class \`${P}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let K=D(P,":");if(K.length>1){let _=K.pop();if(r.candidatesToCss([_])[0]){let H=r.candidatesToCss(K.map(W=>`${W}:[--tw-variant-check:1]`)),j=K.filter((W,J)=>H[J]===null);if(j.length>0){if(j.length===1)throw new Error(`Cannot apply utility class \`${P}\` because the ${j.map(W=>`\`${W}\``)} variant does not exist.`);{let W=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${P}\` because the ${W.format(j.map(J=>`\`${J}\``))} variants do not exist.`)}}}}throw r.theme.size===0?new Error(`Cannot apply unknown utility class \`${P}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${P}\``)}}),S=g.src,R=b.astNodes.map(P=>{let K=b.nodeSorting.get(P)?.candidate,_=K?x[K]:void 0;if(P=structuredClone(P),!S||!K||_===void 0)return I([P],j=>{j.src=S}),P;let H=[S[0],S[1],S[2]];return H[1]+=7+_,H[2]=H[1]+K.length,I([P],j=>{j.src=H}),P}),L=[];for(let P of R)if(P.kind==="rule")for(let K of P.nodes)L.push(K);else L.push(P);w(L)}});return i}function*Ir(t,r){for(let i of t.params.split(/\s+/g))for(let e of r.parseCandidate(i))switch(e.kind){case"arbitrary":break;case"static":case"functional":yield e.root;break;default:}}async function jt(t,r,i,e=0,n=!1){let s=0,a=[];return I(t,(f,{replaceWith:u})=>{if(f.kind==="at-rule"&&(f.name==="@import"||f.name==="@reference")){let c=Tn(q(f.params));if(c===null)return;f.name==="@reference"&&(c.media="reference"),s|=2;let{uri:d,layer:m,media:g,supports:w}=c;if(d.startsWith("data:")||d.startsWith("http://")||d.startsWith("https://"))return;let v=se({},[]);return a.push((async()=>{if(e>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${d}\` in \`${r}\`)`);let x=await i(d,r),y=ve(x.content,{from:n?x.path:void 0});await jt(y,x.base,i,e+1,n),v.nodes=Rn(f,[se({base:x.base},y)],m,g,w)})()),u(v),1}}),a.length>0&&await Promise.all(a),s}function Tn(t){let r,i=null,e=null,n=null;for(let s=0;s/g,"1")),e[0]==="opacity"&&(typeof n=="number"||typeof n=="string")){let a=typeof n=="string"?parseFloat(n):n;a>=0&&a<=1&&(n=a*100+"%")}let s=ct(e);s&&t.theme.add(`--${s}`,""+n,7)}if(Object.hasOwn(r,"fontFamily")){let e=5;{let n=Te(r.fontFamily.sans);n&&t.theme.hasDefault("--font-sans")&&(t.theme.add("--default-font-family",n,e),t.theme.add("--default-font-feature-settings",Te(r.fontFamily.sans,"fontFeatureSettings")??"normal",e),t.theme.add("--default-font-variation-settings",Te(r.fontFamily.sans,"fontVariationSettings")??"normal",e))}{let n=Te(r.fontFamily.mono);n&&t.theme.hasDefault("--font-mono")&&(t.theme.add("--default-mono-font-family",n,e),t.theme.add("--default-mono-font-feature-settings",Te(r.fontFamily.mono,"fontFeatureSettings")??"normal",e),t.theme.add("--default-mono-font-variation-settings",Te(r.fontFamily.mono,"fontVariationSettings")??"normal",e))}}return r}function Pn(t){let r=[];return Fr(t,[],(i,e)=>{if(_n(i))return r.push([e,i]),1;if(Dn(i)){r.push([e,i[0]]);for(let n of Reflect.ownKeys(i[1]))r.push([[...e,`-${n}`],i[1][n]]);return 1}if(Array.isArray(i)&&i.every(n=>typeof n=="string"))return e[0]==="fontSize"?(r.push([e,i[0]]),i.length>=2&&r.push([[...e,"-line-height"],i[1]])):r.push([e,i.join(", ")]),1}),r}var On=/^[a-zA-Z0-9-_%/\.]+$/;function ct(t){if(t[0]==="container")return null;t=structuredClone(t),t[0]==="animation"&&(t[0]="animate"),t[0]==="aspectRatio"&&(t[0]="aspect"),t[0]==="borderRadius"&&(t[0]="radius"),t[0]==="boxShadow"&&(t[0]="shadow"),t[0]==="colors"&&(t[0]="color"),t[0]==="containers"&&(t[0]="container"),t[0]==="fontFamily"&&(t[0]="font"),t[0]==="fontSize"&&(t[0]="text"),t[0]==="letterSpacing"&&(t[0]="tracking"),t[0]==="lineHeight"&&(t[0]="leading"),t[0]==="maxWidth"&&(t[0]="container"),t[0]==="screens"&&(t[0]="breakpoint"),t[0]==="transitionTimingFunction"&&(t[0]="ease");for(let r of t)if(!On.test(r))return null;return t.map((r,i,e)=>r==="1"&&i!==e.length-1?"":r).map(r=>r.replaceAll(".","_").replace(/([a-z])([A-Z])/g,(i,e,n)=>`${e}-${n.toLowerCase()}`)).filter((r,i)=>r!=="DEFAULT"||i!==t.length-1).join("-")}function _n(t){return typeof t=="number"||typeof t=="string"}function Dn(t){if(!Array.isArray(t)||t.length!==2||typeof t[0]!="string"&&typeof t[0]!="number"||t[1]===void 0||t[1]===null||typeof t[1]!="object")return!1;for(let r of Reflect.ownKeys(t[1]))if(typeof r!="string"||typeof t[1][r]!="string"&&typeof t[1][r]!="number")return!1;return!0}function Fr(t,r=[],i){for(let e of Reflect.ownKeys(t)){let n=t[e];if(n==null)continue;let s=[...r,e],a=i(n,s)??0;if(a!==1){if(a===2)return 2;if(!(!Array.isArray(n)&&typeof n!="object")&&Fr(n,s,i)===2)return 2}}}function ft(t){let r=[];for(let i of D(t,".")){if(!i.includes("[")){r.push(i);continue}let e=0;for(;;){let n=i.indexOf("[",e),s=i.indexOf("]",n);if(n===-1||s===-1)break;n>e&&r.push(i.slice(e,n)),r.push(i.slice(n+1,s)),e=s+1}e<=i.length-1&&r.push(i.slice(e))}return r}function Re(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;let r=Object.getPrototypeOf(t);return r===null||Object.getPrototypeOf(r)===null}function Ie(t,r,i,e=[]){for(let n of r)if(n!=null)for(let s of Reflect.ownKeys(n)){e.push(s);let a=i(t[s],n[s],e);a!==void 0?t[s]=a:!Re(t[s])||!Re(n[s])?t[s]=n[s]:t[s]=Ie({},[t[s],n[s]],i,e),e.pop()}return t}function pt(t,r,i){return function(n,s){let a=n.lastIndexOf("/"),f=null;a!==-1&&(f=n.slice(a+1).trim(),n=n.slice(0,a).trim());let u=(()=>{let c=ft(n),[d,m]=Kn(t.theme,c),g=i(Mr(r()??{},c)??null);if(typeof g=="string"&&(g=g.replace("","1")),typeof d!="object")return typeof m!="object"&&m&4?g??d:d;if(g!==null&&typeof g=="object"&&!Array.isArray(g)){let w=Ie({},[g],(v,x)=>x);if(d===null&&Object.hasOwn(g,"__CSS_VALUES__")){let v={};for(let x in g.__CSS_VALUES__)v[x]=g[x],delete w[x];d=v}for(let v in d)v!=="__CSS_VALUES__"&&(g?.__CSS_VALUES__?.[v]&4&&Mr(w,v.split("-"))!==void 0||(w[we(v)]=d[v]));return w}if(Array.isArray(d)&&Array.isArray(m)&&Array.isArray(g)){let w=d[0],v=d[1];m[0]&4&&(w=g[0]??w);for(let x of Object.keys(v))m[1][x]&4&&(v[x]=g[1][x]??v[x]);return[w,v]}return d??g})();return f&&typeof u=="string"&&(u=Q(u,f)),u??s}}function Kn(t,r){if(r.length===1&&r[0].startsWith("--"))return[t.get([r[0]]),t.getOptions(r[0])];let i=ct(r),e=new Map,n=new B(()=>new Map),s=t.namespace(`--${i}`);if(s.size===0)return[null,0];let a=new Map;for(let[d,m]of s){if(!d||!d.includes("--")){e.set(d,m),a.set(d,t.getOptions(d?`--${i}-${d}`:`--${i}`));continue}let g=d.indexOf("--"),w=d.slice(0,g),v=d.slice(g+2);v=v.replace(/-([a-z])/g,(x,y)=>y.toUpperCase()),n.get(w===""?null:w).set(v,[m,t.getOptions(`--${i}${d}`)])}let f=t.getOptions(`--${i}`);for(let[d,m]of n){let g=e.get(d);if(typeof g!="string")continue;let w={},v={};for(let[x,[y,V]]of m)w[x]=y,v[x]=V;e.set(d,[g,w]),a.set(d,[f,v])}let u={},c={};for(let[d,m]of e)Wr(u,[d??"DEFAULT"],m);for(let[d,m]of a)Wr(c,[d??"DEFAULT"],m);return r[r.length-1]==="DEFAULT"?[u?.DEFAULT??null,c.DEFAULT??0]:"DEFAULT"in u&&Object.keys(u).length===1?[u.DEFAULT,c.DEFAULT??0]:(u.__CSS_VALUES__=c,[u,c])}function Mr(t,r){for(let i=0;i0){let g=ze(n);e?e.nodes.push(g):r.push(g),n=""}let u=a,c=a+1;for(;c0){let c=ze(n);u.nodes.push(c),n=""}i.length>0?e=i[i.length-1]:e=null;break}case Wn:case Fn:case Bn:{if(n.length>0){let u=ze(n);e?e.nodes.push(u):r.push(u)}n=String.fromCharCode(f);break}case Zr:{if(n.length>0){let d=ze(n);e?e.nodes.push(d):r.push(d)}n="";let u=a,c=0;for(let d=a+1;d0&&r.push(ze(n)),r}var ri=/^[a-z@][a-zA-Z0-9/%._-]*$/;function It({designSystem:t,ast:r,resolvedConfig:i,featuresRef:e,referenceMode:n}){let s={addBase(a){if(n)return;let f=ue(a);e.current|=Ve(f,t),r.push(F("@layer","base",f))},addVariant(a,f){if(!ut.test(a))throw new Error(`\`addVariant('${a}')\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(typeof f=="string"){if(f.includes(":merge("))return}else if(Array.isArray(f)){if(f.some(c=>c.includes(":merge(")))return}else if(typeof f=="object"){let c=function(d,m){return Object.entries(d).some(([g,w])=>g.includes(m)||typeof w=="object"&&c(w,m))};var u=c;if(c(f,":merge("))return}typeof f=="string"||Array.isArray(f)?t.variants.static(a,c=>{c.nodes=ii(f,c.nodes)},{compounds:Ae(typeof f=="string"?[f]:f)}):typeof f=="object"&&t.variants.fromAst(a,ue(f))},matchVariant(a,f,u){function c(m,g,w){let v=f(m,{modifier:g?.value??null});return ii(v,w)}try{let m=f("a",{modifier:null});if(typeof m=="string"&&m.includes(":merge("))return;if(Array.isArray(m)&&m.some(g=>g.includes(":merge(")))return}catch{}let d=Object.keys(u?.values??{});t.variants.group(()=>{t.variants.functional(a,(m,g)=>{if(!g.value){if(u?.values&&"DEFAULT"in u.values){m.nodes=c(u.values.DEFAULT,g.modifier,m.nodes);return}return null}if(g.value.kind==="arbitrary")m.nodes=c(g.value.value,g.modifier,m.nodes);else if(g.value.kind==="named"&&u?.values){let w=u.values[g.value.value];if(typeof w!="string")return;m.nodes=c(w,g.modifier,m.nodes)}})},(m,g)=>{if(m.kind!=="functional"||g.kind!=="functional")return 0;let w=m.value?m.value.value:"DEFAULT",v=g.value?g.value.value:"DEFAULT",x=u?.values?.[w]??w,y=u?.values?.[v]??v;if(u&&typeof u.sort=="function")return u.sort({value:x,modifier:m.modifier?.value??null},{value:y,modifier:g.modifier?.value??null});let V=d.indexOf(w),b=d.indexOf(v);return V=V===-1?d.length:V,b=b===-1?d.length:b,V!==b?V-b:xObject.entries(c));f=f.flatMap(([c,d])=>D(c,",").map(m=>[m.trim(),d]));let u=new B(()=>[]);for(let[c,d]of f){if(c.startsWith("@keyframes ")){n||r.push(G(c,ue(d)));continue}let m=dt(c),g=!1;if(Fe(m,w=>{if(w.kind==="selector"&&w.value[0]==="."&&ri.test(w.value.slice(1))){let v=w.value;w.value="&";let x=Me(m),y=v.slice(1),V=x==="&"?ue(d):[G(x,ue(d))];u.get(y).push(...V),g=!0,w.value=v;return}if(w.kind==="function"&&w.value===":not")return 1}),!g)throw new Error(`\`addUtilities({ '${c}' : \u2026 })\` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg. \`.scrollbar-none\`.`)}for(let[c,d]of u)t.theme.prefix&&I(d,m=>{if(m.kind==="rule"){let g=dt(m.selector);Fe(g,w=>{w.kind==="selector"&&w.value[0]==="."&&(w.value=`.${t.theme.prefix}\\:${w.value.slice(1)}`)}),m.selector=Me(g)}}),t.utilities.static(c,m=>{let g=structuredClone(d);return ni(g,c,m.raw),e.current|=je(g,t),g})},matchUtilities(a,f){let u=f?.type?Array.isArray(f?.type)?f.type:[f.type]:["any"];for(let[d,m]of Object.entries(a)){let g=function({negative:w}){return v=>{if(v.value?.kind==="arbitrary"&&u.length>0&&!u.includes("any")&&(v.value.dataType&&!u.includes(v.value.dataType)||!v.value.dataType&&!Y(v.value.value,u)))return;let x=u.includes("color"),y=null,V=!1;{let R=f?.values??{};x&&(R=Object.assign({inherit:"inherit",transparent:"transparent",current:"currentcolor"},R)),v.value?v.value.kind==="arbitrary"?y=v.value.value:v.value.fraction&&R[v.value.fraction]?(y=R[v.value.fraction],V=!0):R[v.value.value]?y=R[v.value.value]:R.__BARE_VALUE__&&(y=R.__BARE_VALUE__(v.value)??null,V=(v.value.fraction!==null&&y?.includes("/"))??!1):y=R.DEFAULT??null}if(y===null)return;let b;{let R=f?.modifiers??null;v.modifier?R==="any"||v.modifier.kind==="arbitrary"?b=v.modifier.value:R?.[v.modifier.value]?b=R[v.modifier.value]:x&&!Number.isNaN(Number(v.modifier.value))?b=`${v.modifier.value}%`:b=null:b=null}if(v.modifier&&b===null&&!V)return v.value?.kind==="arbitrary"?null:void 0;x&&b!==null&&(y=Q(y,b)),w&&(y=`calc(${y} * -1)`);let S=ue(m(y,{modifier:b}));return ni(S,d,v.raw),e.current|=je(S,t),S}};var c=g;if(!ri.test(d))throw new Error(`\`matchUtilities({ '${d}' : \u2026 })\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter, eg. \`scrollbar\`.`);f?.supportsNegativeValues&&t.utilities.functional(`-${d}`,g({negative:!0}),{types:u}),t.utilities.functional(d,g({negative:!1}),{types:u}),t.utilities.suggest(d,()=>{let w=f?.values??{},v=new Set(Object.keys(w));v.delete("__BARE_VALUE__"),v.has("DEFAULT")&&(v.delete("DEFAULT"),v.add(null));let x=f?.modifiers??{},y=x==="any"?[]:Object.keys(x);return[{supportsNegative:f?.supportsNegativeValues??!1,values:Array.from(v),modifiers:y}]})}},addComponents(a,f){this.addUtilities(a,f)},matchComponents(a,f){this.matchUtilities(a,f)},theme:pt(t,()=>i.theme??{},a=>a),prefix(a){return a},config(a,f){let u=i;if(!a)return u;let c=ft(a);for(let d=0;dObject.entries(e));for(let[e,n]of i)if(typeof n!="object"){if(!e.startsWith("--")){if(n==="@slot"){r.push(G(e,[F("@slot")]));continue}e=e.replace(/([A-Z])/g,"-$1").toLowerCase()}r.push(l(e,String(n)))}else if(Array.isArray(n))for(let s of n)typeof s=="string"?r.push(l(e,s)):r.push(G(e,ue(s)));else n!==null&&r.push(G(e,ue(n)));return r}function ii(t,r){return(typeof t=="string"?[t]:t).flatMap(e=>{if(e.trim().endsWith("}")){let n=e.replace("}","{@slot}}"),s=ve(n);return Ut(s,r),s}else return G(e,r)})}function ni(t,r,i){I(t,e=>{if(e.kind==="rule"){let n=dt(e.selector);Fe(n,s=>{s.kind==="selector"&&s.value===`.${r}`&&(s.value=`.${de(i)}`)}),e.selector=Me(n)}})}function oi(t,r,i){for(let e of Gn(r))t.theme.addKeyframes(e)}function Gn(t){let r=[];if("keyframes"in t.theme)for(let[i,e]of Object.entries(t.theme.keyframes))r.push(F("@keyframes",i,ue(e)));return r}var mt={inherit:"inherit",current:"currentcolor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"oklch(98.4% 0.003 247.858)",100:"oklch(96.8% 0.007 247.896)",200:"oklch(92.9% 0.013 255.508)",300:"oklch(86.9% 0.022 252.894)",400:"oklch(70.4% 0.04 256.788)",500:"oklch(55.4% 0.046 257.417)",600:"oklch(44.6% 0.043 257.281)",700:"oklch(37.2% 0.044 257.287)",800:"oklch(27.9% 0.041 260.031)",900:"oklch(20.8% 0.042 265.755)",950:"oklch(12.9% 0.042 264.695)"},gray:{50:"oklch(98.5% 0.002 247.839)",100:"oklch(96.7% 0.003 264.542)",200:"oklch(92.8% 0.006 264.531)",300:"oklch(87.2% 0.01 258.338)",400:"oklch(70.7% 0.022 261.325)",500:"oklch(55.1% 0.027 264.364)",600:"oklch(44.6% 0.03 256.802)",700:"oklch(37.3% 0.034 259.733)",800:"oklch(27.8% 0.033 256.848)",900:"oklch(21% 0.034 264.665)",950:"oklch(13% 0.028 261.692)"},zinc:{50:"oklch(98.5% 0 0)",100:"oklch(96.7% 0.001 286.375)",200:"oklch(92% 0.004 286.32)",300:"oklch(87.1% 0.006 286.286)",400:"oklch(70.5% 0.015 286.067)",500:"oklch(55.2% 0.016 285.938)",600:"oklch(44.2% 0.017 285.786)",700:"oklch(37% 0.013 285.805)",800:"oklch(27.4% 0.006 286.033)",900:"oklch(21% 0.006 285.885)",950:"oklch(14.1% 0.005 285.823)"},neutral:{50:"oklch(98.5% 0 0)",100:"oklch(97% 0 0)",200:"oklch(92.2% 0 0)",300:"oklch(87% 0 0)",400:"oklch(70.8% 0 0)",500:"oklch(55.6% 0 0)",600:"oklch(43.9% 0 0)",700:"oklch(37.1% 0 0)",800:"oklch(26.9% 0 0)",900:"oklch(20.5% 0 0)",950:"oklch(14.5% 0 0)"},stone:{50:"oklch(98.5% 0.001 106.423)",100:"oklch(97% 0.001 106.424)",200:"oklch(92.3% 0.003 48.717)",300:"oklch(86.9% 0.005 56.366)",400:"oklch(70.9% 0.01 56.259)",500:"oklch(55.3% 0.013 58.071)",600:"oklch(44.4% 0.011 73.639)",700:"oklch(37.4% 0.01 67.558)",800:"oklch(26.8% 0.007 34.298)",900:"oklch(21.6% 0.006 56.043)",950:"oklch(14.7% 0.004 49.25)"},red:{50:"oklch(97.1% 0.013 17.38)",100:"oklch(93.6% 0.032 17.717)",200:"oklch(88.5% 0.062 18.334)",300:"oklch(80.8% 0.114 19.571)",400:"oklch(70.4% 0.191 22.216)",500:"oklch(63.7% 0.237 25.331)",600:"oklch(57.7% 0.245 27.325)",700:"oklch(50.5% 0.213 27.518)",800:"oklch(44.4% 0.177 26.899)",900:"oklch(39.6% 0.141 25.723)",950:"oklch(25.8% 0.092 26.042)"},orange:{50:"oklch(98% 0.016 73.684)",100:"oklch(95.4% 0.038 75.164)",200:"oklch(90.1% 0.076 70.697)",300:"oklch(83.7% 0.128 66.29)",400:"oklch(75% 0.183 55.934)",500:"oklch(70.5% 0.213 47.604)",600:"oklch(64.6% 0.222 41.116)",700:"oklch(55.3% 0.195 38.402)",800:"oklch(47% 0.157 37.304)",900:"oklch(40.8% 0.123 38.172)",950:"oklch(26.6% 0.079 36.259)"},amber:{50:"oklch(98.7% 0.022 95.277)",100:"oklch(96.2% 0.059 95.617)",200:"oklch(92.4% 0.12 95.746)",300:"oklch(87.9% 0.169 91.605)",400:"oklch(82.8% 0.189 84.429)",500:"oklch(76.9% 0.188 70.08)",600:"oklch(66.6% 0.179 58.318)",700:"oklch(55.5% 0.163 48.998)",800:"oklch(47.3% 0.137 46.201)",900:"oklch(41.4% 0.112 45.904)",950:"oklch(27.9% 0.077 45.635)"},yellow:{50:"oklch(98.7% 0.026 102.212)",100:"oklch(97.3% 0.071 103.193)",200:"oklch(94.5% 0.129 101.54)",300:"oklch(90.5% 0.182 98.111)",400:"oklch(85.2% 0.199 91.936)",500:"oklch(79.5% 0.184 86.047)",600:"oklch(68.1% 0.162 75.834)",700:"oklch(55.4% 0.135 66.442)",800:"oklch(47.6% 0.114 61.907)",900:"oklch(42.1% 0.095 57.708)",950:"oklch(28.6% 0.066 53.813)"},lime:{50:"oklch(98.6% 0.031 120.757)",100:"oklch(96.7% 0.067 122.328)",200:"oklch(93.8% 0.127 124.321)",300:"oklch(89.7% 0.196 126.665)",400:"oklch(84.1% 0.238 128.85)",500:"oklch(76.8% 0.233 130.85)",600:"oklch(64.8% 0.2 131.684)",700:"oklch(53.2% 0.157 131.589)",800:"oklch(45.3% 0.124 130.933)",900:"oklch(40.5% 0.101 131.063)",950:"oklch(27.4% 0.072 132.109)"},green:{50:"oklch(98.2% 0.018 155.826)",100:"oklch(96.2% 0.044 156.743)",200:"oklch(92.5% 0.084 155.995)",300:"oklch(87.1% 0.15 154.449)",400:"oklch(79.2% 0.209 151.711)",500:"oklch(72.3% 0.219 149.579)",600:"oklch(62.7% 0.194 149.214)",700:"oklch(52.7% 0.154 150.069)",800:"oklch(44.8% 0.119 151.328)",900:"oklch(39.3% 0.095 152.535)",950:"oklch(26.6% 0.065 152.934)"},emerald:{50:"oklch(97.9% 0.021 166.113)",100:"oklch(95% 0.052 163.051)",200:"oklch(90.5% 0.093 164.15)",300:"oklch(84.5% 0.143 164.978)",400:"oklch(76.5% 0.177 163.223)",500:"oklch(69.6% 0.17 162.48)",600:"oklch(59.6% 0.145 163.225)",700:"oklch(50.8% 0.118 165.612)",800:"oklch(43.2% 0.095 166.913)",900:"oklch(37.8% 0.077 168.94)",950:"oklch(26.2% 0.051 172.552)"},teal:{50:"oklch(98.4% 0.014 180.72)",100:"oklch(95.3% 0.051 180.801)",200:"oklch(91% 0.096 180.426)",300:"oklch(85.5% 0.138 181.071)",400:"oklch(77.7% 0.152 181.912)",500:"oklch(70.4% 0.14 182.503)",600:"oklch(60% 0.118 184.704)",700:"oklch(51.1% 0.096 186.391)",800:"oklch(43.7% 0.078 188.216)",900:"oklch(38.6% 0.063 188.416)",950:"oklch(27.7% 0.046 192.524)"},cyan:{50:"oklch(98.4% 0.019 200.873)",100:"oklch(95.6% 0.045 203.388)",200:"oklch(91.7% 0.08 205.041)",300:"oklch(86.5% 0.127 207.078)",400:"oklch(78.9% 0.154 211.53)",500:"oklch(71.5% 0.143 215.221)",600:"oklch(60.9% 0.126 221.723)",700:"oklch(52% 0.105 223.128)",800:"oklch(45% 0.085 224.283)",900:"oklch(39.8% 0.07 227.392)",950:"oklch(30.2% 0.056 229.695)"},sky:{50:"oklch(97.7% 0.013 236.62)",100:"oklch(95.1% 0.026 236.824)",200:"oklch(90.1% 0.058 230.902)",300:"oklch(82.8% 0.111 230.318)",400:"oklch(74.6% 0.16 232.661)",500:"oklch(68.5% 0.169 237.323)",600:"oklch(58.8% 0.158 241.966)",700:"oklch(50% 0.134 242.749)",800:"oklch(44.3% 0.11 240.79)",900:"oklch(39.1% 0.09 240.876)",950:"oklch(29.3% 0.066 243.157)"},blue:{50:"oklch(97% 0.014 254.604)",100:"oklch(93.2% 0.032 255.585)",200:"oklch(88.2% 0.059 254.128)",300:"oklch(80.9% 0.105 251.813)",400:"oklch(70.7% 0.165 254.624)",500:"oklch(62.3% 0.214 259.815)",600:"oklch(54.6% 0.245 262.881)",700:"oklch(48.8% 0.243 264.376)",800:"oklch(42.4% 0.199 265.638)",900:"oklch(37.9% 0.146 265.522)",950:"oklch(28.2% 0.091 267.935)"},indigo:{50:"oklch(96.2% 0.018 272.314)",100:"oklch(93% 0.034 272.788)",200:"oklch(87% 0.065 274.039)",300:"oklch(78.5% 0.115 274.713)",400:"oklch(67.3% 0.182 276.935)",500:"oklch(58.5% 0.233 277.117)",600:"oklch(51.1% 0.262 276.966)",700:"oklch(45.7% 0.24 277.023)",800:"oklch(39.8% 0.195 277.366)",900:"oklch(35.9% 0.144 278.697)",950:"oklch(25.7% 0.09 281.288)"},violet:{50:"oklch(96.9% 0.016 293.756)",100:"oklch(94.3% 0.029 294.588)",200:"oklch(89.4% 0.057 293.283)",300:"oklch(81.1% 0.111 293.571)",400:"oklch(70.2% 0.183 293.541)",500:"oklch(60.6% 0.25 292.717)",600:"oklch(54.1% 0.281 293.009)",700:"oklch(49.1% 0.27 292.581)",800:"oklch(43.2% 0.232 292.759)",900:"oklch(38% 0.189 293.745)",950:"oklch(28.3% 0.141 291.089)"},purple:{50:"oklch(97.7% 0.014 308.299)",100:"oklch(94.6% 0.033 307.174)",200:"oklch(90.2% 0.063 306.703)",300:"oklch(82.7% 0.119 306.383)",400:"oklch(71.4% 0.203 305.504)",500:"oklch(62.7% 0.265 303.9)",600:"oklch(55.8% 0.288 302.321)",700:"oklch(49.6% 0.265 301.924)",800:"oklch(43.8% 0.218 303.724)",900:"oklch(38.1% 0.176 304.987)",950:"oklch(29.1% 0.149 302.717)"},fuchsia:{50:"oklch(97.7% 0.017 320.058)",100:"oklch(95.2% 0.037 318.852)",200:"oklch(90.3% 0.076 319.62)",300:"oklch(83.3% 0.145 321.434)",400:"oklch(74% 0.238 322.16)",500:"oklch(66.7% 0.295 322.15)",600:"oklch(59.1% 0.293 322.896)",700:"oklch(51.8% 0.253 323.949)",800:"oklch(45.2% 0.211 324.591)",900:"oklch(40.1% 0.17 325.612)",950:"oklch(29.3% 0.136 325.661)"},pink:{50:"oklch(97.1% 0.014 343.198)",100:"oklch(94.8% 0.028 342.258)",200:"oklch(89.9% 0.061 343.231)",300:"oklch(82.3% 0.12 346.018)",400:"oklch(71.8% 0.202 349.761)",500:"oklch(65.6% 0.241 354.308)",600:"oklch(59.2% 0.249 0.584)",700:"oklch(52.5% 0.223 3.958)",800:"oklch(45.9% 0.187 3.815)",900:"oklch(40.8% 0.153 2.432)",950:"oklch(28.4% 0.109 3.907)"},rose:{50:"oklch(96.9% 0.015 12.422)",100:"oklch(94.1% 0.03 12.58)",200:"oklch(89.2% 0.058 10.001)",300:"oklch(81% 0.117 11.638)",400:"oklch(71.2% 0.194 13.428)",500:"oklch(64.5% 0.246 16.439)",600:"oklch(58.6% 0.253 17.585)",700:"oklch(51.4% 0.222 16.935)",800:"oklch(45.5% 0.188 13.697)",900:"oklch(41% 0.159 10.272)",950:"oklch(27.1% 0.105 12.094)"}};function Ce(t){return{__BARE_VALUE__:t}}var le=Ce(t=>{if(T(t.value))return t.value}),re=Ce(t=>{if(T(t.value))return`${t.value}%`}),he=Ce(t=>{if(T(t.value))return`${t.value}px`}),li=Ce(t=>{if(T(t.value))return`${t.value}ms`}),gt=Ce(t=>{if(T(t.value))return`${t.value}deg`}),Yn=Ce(t=>{if(t.fraction===null)return;let[r,i]=D(t.fraction,"/");if(!(!T(r)||!T(i)))return t.fraction}),ai=Ce(t=>{if(T(Number(t.value)))return`repeat(${t.value}, minmax(0, 1fr))`}),si={accentColor:({theme:t})=>t("colors"),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9",...Yn},backdropBlur:({theme:t})=>t("blur"),backdropBrightness:({theme:t})=>({...t("brightness"),...re}),backdropContrast:({theme:t})=>({...t("contrast"),...re}),backdropGrayscale:({theme:t})=>({...t("grayscale"),...re}),backdropHueRotate:({theme:t})=>({...t("hueRotate"),...gt}),backdropInvert:({theme:t})=>({...t("invert"),...re}),backdropOpacity:({theme:t})=>({...t("opacity"),...re}),backdropSaturate:({theme:t})=>({...t("saturate"),...re}),backdropSepia:({theme:t})=>({...t("sepia"),...re}),backgroundColor:({theme:t})=>t("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:t})=>t("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:t})=>({DEFAULT:"currentcolor",...t("colors")}),borderOpacity:({theme:t})=>t("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:t})=>t("spacing"),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px",...he},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:t})=>t("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2",...re},caretColor:({theme:t})=>t("colors"),colors:()=>({...mt}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",...le},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2",...re},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:t})=>t("borderColor"),divideOpacity:({theme:t})=>t("borderOpacity"),divideWidth:({theme:t})=>({...t("borderWidth"),...he}),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:t})=>t("colors"),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",...t("spacing")}),flexGrow:{0:"0",DEFAULT:"1",...le},flexShrink:{0:"0",DEFAULT:"1",...le},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:t})=>t("spacing"),gradientColorStops:({theme:t})=>t("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%",...re},grayscale:{0:"0",DEFAULT:"100%",...re},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13",...le},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ai},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))",...ai},height:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg",...gt},inset:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...t("spacing")}),invert:{0:"0",DEFAULT:"100%",...re},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",...le},maxHeight:({theme:t})=>({none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),maxWidth:({theme:t})=>({none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t("spacing")}),minHeight:({theme:t})=>({full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),minWidth:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1",...re},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",...le},outlineColor:({theme:t})=>t("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},padding:({theme:t})=>t("spacing"),placeholderColor:({theme:t})=>t("colors"),placeholderOpacity:({theme:t})=>t("opacity"),ringColor:({theme:t})=>({DEFAULT:"currentcolor",...t("colors")}),ringOffsetColor:({theme:t})=>t("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},ringOpacity:({theme:t})=>({DEFAULT:"0.5",...t("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg",...gt},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2",...re},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",...re},screens:{sm:"40rem",md:"48rem",lg:"64rem",xl:"80rem","2xl":"96rem"},scrollMargin:({theme:t})=>t("spacing"),scrollPadding:({theme:t})=>t("spacing"),sepia:{0:"0",DEFAULT:"100%",...re},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",...gt},space:({theme:t})=>t("spacing"),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:t})=>({none:"none",...t("colors")}),strokeWidth:{0:"0",1:"1",2:"2",...le},supports:{},data:{},textColor:({theme:t})=>t("colors"),textDecorationColor:({theme:t})=>t("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},textIndent:({theme:t})=>t("spacing"),textOpacity:({theme:t})=>t("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px",...he},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...li},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms",...li},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, outline-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:t})=>({"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%",...t("spacing")}),size:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),width:({theme:t})=>({auto:"auto","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content",...t("spacing")}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50",...le}};function ui(t){return{theme:{...si,colors:({theme:r})=>r("color",{}),extend:{fontSize:({theme:r})=>({...r("text",{})}),boxShadow:({theme:r})=>({...r("shadow",{})}),animation:({theme:r})=>({...r("animate",{})}),aspectRatio:({theme:r})=>({...r("aspect",{})}),borderRadius:({theme:r})=>({...r("radius",{})}),screens:({theme:r})=>({...r("breakpoint",{})}),letterSpacing:({theme:r})=>({...r("tracking",{})}),lineHeight:({theme:r})=>({...r("leading",{})}),transitionDuration:{DEFAULT:t.get(["--default-transition-duration"])??null},transitionTimingFunction:{DEFAULT:t.get(["--default-transition-timing-function"])??null},maxWidth:({theme:r})=>({...r("container",{})})}}}}var Zn={blocklist:[],future:{},prefix:"",important:!1,darkMode:null,theme:{},plugins:[],content:{files:[]}};function Ft(t,r){let i={design:t,configs:[],plugins:[],content:{files:[]},theme:{},extend:{},result:structuredClone(Zn)};for(let n of r)zt(i,n);for(let n of i.configs)"darkMode"in n&&n.darkMode!==void 0&&(i.result.darkMode=n.darkMode??null),"prefix"in n&&n.prefix!==void 0&&(i.result.prefix=n.prefix??""),"blocklist"in n&&n.blocklist!==void 0&&(i.result.blocklist=n.blocklist??[]),"important"in n&&n.important!==void 0&&(i.result.important=n.important??!1);let e=Qn(i);return{resolvedConfig:{...i.result,content:i.content,theme:i.theme,plugins:i.plugins},replacedThemeKeys:e}}function Jn(t,r){if(Array.isArray(t)&&Re(t[0]))return t.concat(r);if(Array.isArray(r)&&Re(r[0])&&Re(t))return[t,...r];if(Array.isArray(r))return r}function zt(t,{config:r,base:i,path:e,reference:n}){let s=[];for(let u of r.plugins??[])"__isOptionsFunction"in u?s.push({...u(),reference:n}):"handler"in u?s.push({...u,reference:n}):s.push({handler:u,reference:n});if(Array.isArray(r.presets)&&r.presets.length===0)throw new Error("Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.");for(let u of r.presets??[])zt(t,{path:e,base:i,config:u,reference:n});for(let u of s)t.plugins.push(u),u.config&&zt(t,{path:e,base:i,config:u.config,reference:!!u.reference});let a=r.content??[],f=Array.isArray(a)?a:a.files;for(let u of f)t.content.files.push(typeof u=="object"?u:{base:i,pattern:u});t.configs.push(r)}function Qn(t){let r=new Set,i=pt(t.design,()=>t.theme,n),e=Object.assign(i,{theme:i,colors:mt});function n(s){return typeof s=="function"?s(e)??null:s??null}for(let s of t.configs){let a=s.theme??{},f=a.extend??{};for(let u in a)u!=="extend"&&r.add(u);Object.assign(t.theme,a);for(let u in f)t.extend[u]??=[],t.extend[u].push(f[u])}delete t.theme.extend;for(let s in t.extend){let a=[t.theme[s],...t.extend[s]];t.theme[s]=()=>{let f=a.map(n);return Ie({},f,Jn)}}for(let s in t.theme)t.theme[s]=n(t.theme[s]);if(t.theme.screens&&typeof t.theme.screens=="object")for(let s of Object.keys(t.theme.screens)){let a=t.theme.screens[s];a&&typeof a=="object"&&("raw"in a||"max"in a||"min"in a&&(t.theme.screens[s]=a.min))}return r}function ci(t,r){let i=t.theme.container||{};if(typeof i!="object"||i===null)return;let e=Xn(i,r);e.length!==0&&r.utilities.static("container",()=>structuredClone(e))}function Xn({center:t,padding:r,screens:i},e){let n=[],s=null;if(t&&n.push(l("margin-inline","auto")),(typeof r=="string"||typeof r=="object"&&r!==null&&"DEFAULT"in r)&&n.push(l("padding-inline",typeof r=="string"?r:r.DEFAULT)),typeof i=="object"&&i!==null){s=new Map;let a=Array.from(e.theme.namespace("--breakpoint").entries());if(a.sort((f,u)=>ye(f[1],u[1],"asc")),a.length>0){let[f]=a[0];n.push(F("@media",`(width >= --theme(--breakpoint-${f}))`,[l("max-width","none")]))}for(let[f,u]of Object.entries(i)){if(typeof u=="object")if("min"in u)u=u.min;else continue;s.set(f,F("@media",`(width >= ${u})`,[l("max-width",u)]))}}if(typeof r=="object"&&r!==null){let a=Object.entries(r).filter(([f])=>f!=="DEFAULT").map(([f,u])=>[f,e.theme.resolveValue(f,["--breakpoint"]),u]).filter(Boolean);a.sort((f,u)=>ye(f[1],u[1],"asc"));for(let[f,,u]of a)if(s&&s.has(f))s.get(f).nodes.push(l("padding-inline",u));else{if(s)continue;n.push(F("@media",`(width >= theme(--breakpoint-${f}))`,[l("padding-inline",u)]))}}if(s)for(let[,a]of s)n.push(a);return n}function fi({addVariant:t,config:r}){let i=r("darkMode",null),[e,n=".dark"]=Array.isArray(i)?i:[i];if(e==="variant"){let s;if(Array.isArray(n)||typeof n=="function"?s=n:typeof n=="string"&&(s=[n]),Array.isArray(s))for(let a of s)a===".dark"?(e=!1,console.warn('When using `variant` for `darkMode`, you must provide a selector.\nExample: `darkMode: ["variant", ".your-selector &"]`')):a.includes("&")||(e=!1,console.warn('When using `variant` for `darkMode`, your selector must contain `&`.\nExample `darkMode: ["variant", ".your-selector &"]`'));n=s}e===null||(e==="selector"?t("dark",`&:where(${n}, ${n} *)`):e==="media"?t("dark","@media (prefers-color-scheme: dark)"):e==="variant"?t("dark",n):e==="class"&&t("dark",`&:is(${n} *)`))}function pi(t){for(let[r,i]of[["t","top"],["tr","top right"],["r","right"],["br","bottom right"],["b","bottom"],["bl","bottom left"],["l","left"],["tl","top left"]])t.utilities.static(`bg-gradient-to-${r}`,()=>[l("--tw-gradient-position",`to ${i} in oklab`),l("background-image","linear-gradient(var(--tw-gradient-stops))")]);t.utilities.static("bg-left-top",()=>[l("background-position","left top")]),t.utilities.static("bg-right-top",()=>[l("background-position","right top")]),t.utilities.static("bg-left-bottom",()=>[l("background-position","left bottom")]),t.utilities.static("bg-right-bottom",()=>[l("background-position","right bottom")]),t.utilities.static("object-left-top",()=>[l("object-position","left top")]),t.utilities.static("object-right-top",()=>[l("object-position","right top")]),t.utilities.static("object-left-bottom",()=>[l("object-position","left bottom")]),t.utilities.static("object-right-bottom",()=>[l("object-position","right bottom")]),t.utilities.functional("max-w-screen",r=>{if(!r.value||r.value.kind==="arbitrary")return;let i=t.theme.resolve(r.value.value,["--breakpoint"]);if(i)return[l("max-width",i)]}),t.utilities.static("overflow-ellipsis",()=>[l("text-overflow","ellipsis")]),t.utilities.static("decoration-slice",()=>[l("-webkit-box-decoration-break","slice"),l("box-decoration-break","slice")]),t.utilities.static("decoration-clone",()=>[l("-webkit-box-decoration-break","clone"),l("box-decoration-break","clone")]),t.utilities.functional("flex-shrink",r=>{if(!r.modifier){if(!r.value)return[l("flex-shrink","1")];if(r.value.kind==="arbitrary")return[l("flex-shrink",r.value.value)];if(T(r.value.value))return[l("flex-shrink",r.value.value)]}}),t.utilities.functional("flex-grow",r=>{if(!r.modifier){if(!r.value)return[l("flex-grow","1")];if(r.value.kind==="arbitrary")return[l("flex-grow",r.value.value)];if(T(r.value.value))return[l("flex-grow",r.value.value)]}}),t.utilities.static("order-none",()=>[l("order","0")])}function di(t,r){let i=t.theme.screens||{},e=r.variants.get("min")?.order??0,n=[];for(let[a,f]of Object.entries(i)){let g=function(w){r.variants.static(a,v=>{v.nodes=[F("@media",m,v.nodes)]},{order:w})};var s=g;let u=r.variants.get(a),c=r.theme.resolveValue(a,["--breakpoint"]);if(u&&c&&!r.theme.hasDefault(`--breakpoint-${a}`))continue;let d=!0;typeof f=="string"&&(d=!1);let m=eo(f);d?n.push(g):g(e)}if(n.length!==0){for(let[,a]of r.variants.variants)a.order>e&&(a.order+=n.length);r.variants.compareFns=new Map(Array.from(r.variants.compareFns).map(([a,f])=>(a>e&&(a+=n.length),[a,f])));for(let[a,f]of n.entries())f(e+a+1)}}function eo(t){return(Array.isArray(t)?t:[t]).map(i=>typeof i=="string"?{min:i}:i&&typeof i=="object"?i:null).map(i=>{if(i===null)return null;if("raw"in i)return i.raw;let e="";return i.max!==void 0&&(e+=`${i.max} >= `),e+="width",i.min!==void 0&&(e+=` >= ${i.min}`),`(${e})`}).filter(Boolean).join(", ")}function mi(t,r){let i=t.theme.aria||{},e=t.theme.supports||{},n=t.theme.data||{};if(Object.keys(i).length>0){let s=r.variants.get("aria"),a=s?.applyFn,f=s?.compounds;r.variants.functional("aria",(u,c)=>{let d=c.value;return d&&d.kind==="named"&&d.value in i?a?.(u,{...c,value:{kind:"arbitrary",value:i[d.value]}}):a?.(u,c)},{compounds:f})}if(Object.keys(e).length>0){let s=r.variants.get("supports"),a=s?.applyFn,f=s?.compounds;r.variants.functional("supports",(u,c)=>{let d=c.value;return d&&d.kind==="named"&&d.value in e?a?.(u,{...c,value:{kind:"arbitrary",value:e[d.value]}}):a?.(u,c)},{compounds:f})}if(Object.keys(n).length>0){let s=r.variants.get("data"),a=s?.applyFn,f=s?.compounds;r.variants.functional("data",(u,c)=>{let d=c.value;return d&&d.kind==="named"&&d.value in n?a?.(u,{...c,value:{kind:"arbitrary",value:n[d.value]}}):a?.(u,c)},{compounds:f})}}var to=/^[a-z]+$/;async function hi({designSystem:t,base:r,ast:i,loadModule:e,sources:n}){let s=0,a=[],f=[];I(i,(m,{parent:g,replaceWith:w,context:v})=>{if(m.kind==="at-rule"){if(m.name==="@plugin"){if(g!==null)throw new Error("`@plugin` cannot be nested.");let x=m.params.slice(1,-1);if(x.length===0)throw new Error("`@plugin` must have a path.");let y={};for(let V of m.nodes??[]){if(V.kind!=="declaration")throw new Error(`Unexpected \`@plugin\` option: + +${oe([V])} + +\`@plugin\` options must be a flat list of declarations.`);if(V.value===void 0)continue;let b=V.value,S=D(b,",").map(R=>{if(R=R.trim(),R==="null")return null;if(R==="true")return!0;if(R==="false")return!1;if(Number.isNaN(Number(R))){if(R[0]==='"'&&R[R.length-1]==='"'||R[0]==="'"&&R[R.length-1]==="'")return R.slice(1,-1);if(R[0]==="{"&&R[R.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${oe([V]).trim()}\` is not supported. + +Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(R);return R});y[V.property]=S.length===1?S[0]:S}a.push([{id:x,base:v.base,reference:!!v.reference},Object.keys(y).length>0?y:null]),w([]),s|=4;return}if(m.name==="@config"){if(m.nodes.length>0)throw new Error("`@config` cannot have a body.");if(g!==null)throw new Error("`@config` cannot be nested.");f.push({id:m.params.slice(1,-1),base:v.base,reference:!!v.reference}),w([]),s|=4;return}}}),pi(t);let u=t.resolveThemeValue;if(t.resolveThemeValue=function(g,w){return g.startsWith("--")?u(g,w):(s|=gi({designSystem:t,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),t.resolveThemeValue(g,w))},!a.length&&!f.length)return 0;let[c,d]=await Promise.all([Promise.all(f.map(async({id:m,base:g,reference:w})=>{let v=await e(m,g,"config");return{path:m,base:v.base,config:v.module,reference:w}})),Promise.all(a.map(async([{id:m,base:g,reference:w},v])=>{let x=await e(m,g,"plugin");return{path:m,base:x.base,plugin:x.module,options:v,reference:w}}))]);return s|=gi({designSystem:t,base:r,ast:i,sources:n,configs:c,pluginDetails:d}),s}function gi({designSystem:t,base:r,ast:i,sources:e,configs:n,pluginDetails:s}){let a=0,u=[...s.map(y=>{if(!y.options)return{config:{plugins:[y.plugin]},base:y.base,reference:y.reference};if("__isOptionsFunction"in y.plugin)return{config:{plugins:[y.plugin(y.options)]},base:y.base,reference:y.reference};throw new Error(`The plugin "${y.path}" does not accept options`)}),...n],{resolvedConfig:c}=Ft(t,[{config:ui(t.theme),base:r,reference:!0},...u,{config:{plugins:[fi]},base:r,reference:!0}]),{resolvedConfig:d,replacedThemeKeys:m}=Ft(t,u),g=t.resolveThemeValue;t.resolveThemeValue=function(V,b){if(V[0]==="-"&&V[1]==="-")return g(V,b);let S=v.theme(V,void 0);if(Array.isArray(S)&&S.length===2)return S[0];if(Array.isArray(S))return S.join(", ");if(typeof S=="string")return S};let w={designSystem:t,ast:i,resolvedConfig:c,featuresRef:{set current(y){a|=y}}},v=It({...w,referenceMode:!1}),x;for(let{handler:y,reference:V}of c.plugins)V?(x||=It({...w,referenceMode:!0}),y(x)):y(v);if(zr(t,d,m),oi(t,d,m),mi(d,t),di(d,t),ci(d,t),!t.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!to.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);t.theme.prefix=c.prefix}if(!t.important&&c.important===!0&&(t.important=!0),typeof c.important=="string"){let y=c.important;I(i,(V,{replaceWith:b,parent:S})=>{if(V.kind==="at-rule"&&!(V.name!=="@tailwind"||V.params!=="utilities"))return S?.kind==="rule"&&S.selector===y?2:(b(M(y,[V])),2)})}for(let y of c.blocklist)t.invalidCandidates.add(y);for(let y of c.content.files){if("raw"in y)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry: + +${JSON.stringify(y,null,2)} + +This feature is not currently supported.`);let V=!1;y.pattern[0]=="!"&&(V=!0,y.pattern=y.pattern.slice(1)),e.push({...y,negated:V})}return a}function vi(t){let r=[0];for(let n=0;n0;){let u=(a|0)>>1,c=s+u;r[c]<=n?(s=c+1,a=a-u-1):a=u}s-=1;let f=n-r[s];return{line:s+1,column:f}}function e({line:n,column:s}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let a=r[n],f=r[n+1]??a;return Math.min(Math.max(a+s,0),f)}return{find:i,findOffset:e}}function wi({ast:t}){let r=new B(n=>vi(n.code)),i=new B(n=>({url:n.file,content:n.code,ignore:!1})),e={file:null,sources:[],mappings:[]};I(t,n=>{if(!n.src||!n.dst)return;let s=i.get(n.src[0]);if(!s.content)return;let a=r.get(n.src[0]),f=r.get(n.dst[0]),u=s.content.slice(n.src[1],n.src[2]),c=0;for(let g of u.split(` +`)){if(g.trim()!==""){let w=a.find(n.src[1]+c),v=f.find(n.dst[1]);e.mappings.push({name:null,originalPosition:{source:s,...w},generatedPosition:v})}c+=g.length,c+=1}let d=a.find(n.src[2]),m=f.find(n.dst[2]);e.mappings.push({name:null,originalPosition:{source:s,...d},generatedPosition:m})});for(let n of r.keys())e.sources.push(i.get(n));return e.mappings.sort((n,s)=>n.generatedPosition.line-s.generatedPosition.line||n.generatedPosition.column-s.generatedPosition.column||(n.originalPosition?.line??0)-(s.originalPosition?.line??0)||(n.originalPosition?.column??0)-(s.originalPosition?.column??0)),e}var ki=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function ht(t){let r=t.indexOf("{");if(r===-1)return[t];let i=[],e=t.slice(0,r),n=t.slice(r),s=0,a=n.lastIndexOf("}");for(let m=0;mht(m));let d=ht(u);for(let m of d)for(let g of c)i.push(e+g+m);return i}function ro(t){return ki.test(t)}function io(t){let r=t.match(ki);if(!r)return[t];let[,i,e,n]=r,s=n?parseInt(n,10):void 0,a=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(e)){let f=parseInt(i,10),u=parseInt(e,10);if(s===void 0&&(s=f<=u?1:-1),s===0)throw new Error("Step cannot be zero in sequence expansion.");let c=f0&&(s=-s);for(let d=f;c?d<=u:d>=u;d+=s)a.push(d.toString())}return a}var no=/^[a-z]+$/,tt=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(tt||{});function oo(){throw new Error("No `loadModule` function provided to `compile`")}function lo(){throw new Error("No `loadStylesheet` function provided to `compile`")}function ao(t){let r=0,i=null;for(let e of D(t," "))e==="reference"?r|=2:e==="inline"?r|=1:e==="default"?r|=4:e==="static"?r|=8:e.startsWith("prefix(")&&e.endsWith(")")&&(i=e.slice(7,-1));return[r,i]}var Se=(f=>(f[f.None=0]="None",f[f.AtApply=1]="AtApply",f[f.AtImport=2]="AtImport",f[f.JsPluginCompat=4]="JsPluginCompat",f[f.ThemeFunction=8]="ThemeFunction",f[f.Utilities=16]="Utilities",f[f.Variants=32]="Variants",f))(Se||{});async function bi(t,{base:r="",from:i,loadModule:e=oo,loadStylesheet:n=lo}={}){let s=0;t=[se({base:r},t)],s|=await jt(t,r,n,0,i!==void 0);let a=null,f=new Je,u=[],c=[],d=null,m=null,g=[],w=[],v=[],x=[],y=null;I(t,(b,{parent:S,replaceWith:R,context:L})=>{if(b.kind==="at-rule"){if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(m!==null){R([]);return}if(L.reference){R([]);return}let P=D(b.params," ");for(let K of P)if(K.startsWith("source(")){let _=K.slice(7,-1);if(_==="none"){y=_;continue}if(_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");y={base:L.sourceBase??L.base,pattern:_.slice(1,-1)}}m=b,s|=16}if(b.name==="@utility"){if(S!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let P=Sr(b);if(P===null)throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`);c.push(P)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.");if(S!==null)throw new Error("`@source` cannot be nested.");let P=!1,K=!1,_=b.params;if(_[0]==="n"&&_.startsWith("not ")&&(P=!0,_=_.slice(4)),_[0]==="i"&&_.startsWith("inline(")&&(K=!0,_=_.slice(7,-1)),_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`@source` paths must be quoted.");let H=_.slice(1,-1);if(K){let j=P?x:v,W=D(H," ");for(let J of W)for(let ie of ht(J))j.push(ie)}else w.push({base:L.base,pattern:H,negated:P});R([]);return}if(b.name==="@variant"&&(S===null?b.nodes.length===0?b.name="@custom-variant":(I(b.nodes,P=>{if(P.kind==="at-rule"&&P.name==="@slot")return b.name="@custom-variant",2}),b.name==="@variant"&&g.push(b)):g.push(b)),b.name==="@custom-variant"){if(S!==null)throw new Error("`@custom-variant` cannot be nested.");R([]);let[P,K]=D(b.params," ");if(!ut.test(P))throw new Error(`\`@custom-variant ${P}\` defines an invalid variant name. Variants should only contain alphanumeric, dashes or underscore characters.`);if(b.nodes.length>0&&K)throw new Error(`\`@custom-variant ${P}\` cannot have both a selector and a body.`);if(b.nodes.length===0){if(!K)throw new Error(`\`@custom-variant ${P}\` has no selector or body.`);let _=D(K.slice(1,-1),",");if(_.length===0||_.some(W=>W.trim()===""))throw new Error(`\`@custom-variant ${P} (${_.join(",")})\` selector is invalid.`);let H=[],j=[];for(let W of _)W=W.trim(),W[0]==="@"?H.push(W):j.push(W);u.push(W=>{W.variants.static(P,J=>{let ie=[];j.length>0&&ie.push(M(j.join(", "),J.nodes));for(let o of H)ie.push(G(o,J.nodes));J.nodes=ie},{compounds:Ae([...j,...H])})});return}else{u.push(_=>{_.variants.fromAst(P,b.nodes)});return}}if(b.name==="@media"){let P=D(b.params," "),K=[];for(let _ of P)if(_.startsWith("source(")){let H=_.slice(7,-1);I(b.nodes,(j,{replaceWith:W})=>{if(j.kind==="at-rule"&&j.name==="@tailwind"&&j.params==="utilities")return j.params+=` source(${H})`,W([se({sourceBase:L.base},[j])]),2})}else if(_.startsWith("theme(")){let H=_.slice(6,-1),j=H.includes("reference");I(b.nodes,W=>{if(W.kind!=="at-rule"){if(j)throw new Error('Files imported with `@import "\u2026" theme(reference)` must only contain `@theme` blocks.\nUse `@reference "\u2026";` instead.');return 0}if(W.name==="@theme")return W.params+=" "+H,1})}else if(_.startsWith("prefix(")){let H=_.slice(7,-1);I(b.nodes,j=>{if(j.kind==="at-rule"&&j.name==="@theme")return j.params+=` prefix(${H})`,1})}else _==="important"?a=!0:_==="reference"?b.nodes=[se({reference:!0},b.nodes)]:K.push(_);K.length>0?b.params=K.join(" "):P.length>0&&R(b.nodes)}if(b.name==="@theme"){let[P,K]=ao(b.params);if(L.reference&&(P|=2),K){if(!no.test(K))throw new Error(`The prefix "${K}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);f.prefix=K}return I(b.nodes,_=>{if(_.kind==="at-rule"&&_.name==="@keyframes")return f.addKeyframes(_),1;if(_.kind==="comment")return;if(_.kind==="declaration"&&_.property.startsWith("--")){f.add(we(_.property),_.value??"",P,_.src);return}let H=oe([F(b.name,b.params,[_])]).split(` +`).map((j,W,J)=>`${W===0||W>=J.length-2?" ":">"} ${j}`).join(` +`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`. + +${H}`)}),d?R([]):(d=M(":root, :host",[]),d.src=b.src,R([d])),1}}});let V=Kr(f);if(a&&(V.important=a),x.length>0)for(let b of x)V.invalidCandidates.add(b);s|=await hi({designSystem:V,base:r,ast:t,loadModule:e,sources:w});for(let b of u)b(V);for(let b of c)b(V);if(d){let b=[];for(let[R,L]of V.theme.entries()){if(L.options&2)continue;let P=l(de(R),L.value);P.src=L.src,b.push(P)}let S=V.theme.getKeyframes();for(let R of S)t.push(se({theme:!0},[z([R])]));d.nodes=[se({theme:!0},b)]}if(g.length>0){for(let b of g){let S=M("&",b.nodes),R=b.params,L=V.parseVariant(R);if(L===null)throw new Error(`Cannot use \`@variant\` with unknown variant: ${R}`);if(Ee(S,L,V.variants)===null)throw new Error(`Cannot use \`@variant\` with variant: ${R}`);Object.assign(b,S)}s|=32}if(s|=Ve(t,V),s|=je(t,V),m){let b=m;b.kind="context",b.context={}}return I(t,(b,{replaceWith:S})=>{if(b.kind==="at-rule")return b.name==="@utility"&&S([]),1}),{designSystem:V,ast:t,sources:w,root:y,utilitiesNode:m,features:s,inlineCandidates:v}}async function yi(t,r={}){let{designSystem:i,ast:e,sources:n,root:s,utilitiesNode:a,features:f,inlineCandidates:u}=await bi(t,r);e.unshift(Ze(`! tailwindcss v${Mt} | MIT License | https://tailwindcss.com `));function c(v){i.invalidCandidates.add(v)}let d=new Set,m=null,g=0,w=!1;for(let v of u)i.invalidCandidates.has(v)||(d.add(v),w=!0);return{sources:n,root:s,features:f,build(v){if(f===0)return t;if(!a)return m??=be(e,i,r.polyfills),m;let x=w,y=!1;w=!1;let V=d.size;for(let S of v)if(!i.invalidCandidates.has(S))if(S[0]==="-"&&S[1]==="-"){let R=i.theme.markUsedVariable(S);x||=R,y||=R}else d.add(S),x||=d.size!==V;if(!x)return m??=be(e,i,r.polyfills),m;let b=ge(d,i,{onInvalidCandidate:c}).astNodes;return r.from&&I(b,S=>{S.src??=a.src}),!y&&g===b.length?(m??=be(e,i,r.polyfills),m):(g=b.length,a.nodes=b,m=be(e,i,r.polyfills),m)}}}async function so(t,r={}){let i=ve(t,{from:r.from}),e=await yi(i,r),n=i,s=t;return{...e,build(a){let f=e.build(a);return f===n||(s=oe(f,!!r.from),n=f),s},buildSourceMap(){return wi({ast:n})}}}async function uo(t,r={}){return(await bi(ve(t),r)).designSystem}function We(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}for(let t in vt)t!=="default"&&(We[t]=vt[t]);module.exports=We; diff --git a/node_modules/tailwindcss/dist/lib.mjs b/node_modules/tailwindcss/dist/lib.mjs new file mode 100644 index 0000000..3ab36ba --- /dev/null +++ b/node_modules/tailwindcss/dist/lib.mjs @@ -0,0 +1 @@ +import{a,b,c,d,e,f}from"./chunk-4WXWQT6Y.mjs";import"./chunk-G32FJCSR.mjs";import"./chunk-HTB5LLOP.mjs";export{b as Features,a as Polyfills,e as __unstable__loadDesignSystem,d as compile,c as compileAst,f as default}; diff --git a/node_modules/tailwindcss/dist/plugin.d.mts b/node_modules/tailwindcss/dist/plugin.d.mts new file mode 100644 index 0000000..6c11f7d --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.d.mts @@ -0,0 +1,11 @@ +export { P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; +import { a as PluginFn, C as Config, b as PluginWithConfig, c as PluginWithOptions } from './types-B254mqw1.mjs'; +export { d as PluginAPI, P as PluginsConfig, T as ThemeConfig } from './types-B254mqw1.mjs'; +import './colors.mjs'; + +declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; +} + +export { Config, PluginFn as PluginCreator, createPlugin as default }; diff --git a/node_modules/tailwindcss/dist/plugin.d.ts b/node_modules/tailwindcss/dist/plugin.d.ts new file mode 100644 index 0000000..305e84e --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.d.ts @@ -0,0 +1,104 @@ +import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-BIFUA2FY.js'; +import './colors-b_6i0Oi7.js'; + +type Config = UserConfig; +type PluginFn = (api: PluginAPI) => void; +type PluginWithConfig = { + handler: PluginFn; + config?: UserConfig; + /** @internal */ + reference?: boolean; +}; +type PluginWithOptions = { + (options?: T): PluginWithConfig; + __isOptionsFunction: true; +}; +type Plugin = PluginFn | PluginWithConfig | PluginWithOptions; +type PluginAPI = { + addBase(base: CssInJs): void; + addVariant(name: string, variant: string | string[] | CssInJs): void; + matchVariant(name: string, cb: (value: T | string, extra: { + modifier: string | null; + }) => string | string[], options?: { + values?: Record; + sort?(a: { + value: T | string; + modifier: string | null; + }, b: { + value: T | string; + modifier: string | null; + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; + matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + addComponents(utilities: Record | Record[], options?: {}): void; + matchComponents(utilities: Record CssInJs>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; +}; +type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; +}; + +type ResolvableTo = T | ((utils: PluginUtils) => T); +type ThemeValue = ResolvableTo> | null | undefined; +type ThemeConfig = Record & { + extend?: Record; +}; +type ContentFile = string | { + raw: string; + extension?: string; +}; +type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]]; +interface UserConfig { + presets?: UserConfig[]; + theme?: ThemeConfig; + plugins?: Plugin[]; +} +interface UserConfig { + content?: ContentFile[] | { + relative?: boolean; + files: ContentFile[]; + }; +} +interface UserConfig { + darkMode?: DarkModeStrategy; +} +interface UserConfig { + prefix?: string; +} +interface UserConfig { + blocklist?: string[]; +} +interface UserConfig { + important?: boolean | string; +} +interface UserConfig { + future?: 'all' | Record; +} + +declare function createPlugin(handler: PluginFn, config?: Partial): PluginWithConfig; +declare namespace createPlugin { + var withOptions: (pluginFunction: (options?: T) => PluginFn, configFunction?: (options?: T) => Partial) => PluginWithOptions; +} + +export { createPlugin as default }; diff --git a/node_modules/tailwindcss/dist/plugin.js b/node_modules/tailwindcss/dist/plugin.js new file mode 100644 index 0000000..eca100c --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.js @@ -0,0 +1 @@ +"use strict";function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;module.exports=u; diff --git a/node_modules/tailwindcss/dist/plugin.mjs b/node_modules/tailwindcss/dist/plugin.mjs new file mode 100644 index 0000000..430fa25 --- /dev/null +++ b/node_modules/tailwindcss/dist/plugin.mjs @@ -0,0 +1 @@ +function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;export{u as default}; diff --git a/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts b/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts new file mode 100644 index 0000000..5d9dbe2 --- /dev/null +++ b/node_modules/tailwindcss/dist/resolve-config-BIFUA2FY.d.ts @@ -0,0 +1,29 @@ +import { _ as _default } from './colors-b_6i0Oi7.js'; + +type NamedUtilityValue = { + kind: 'named'; + /** + * ``` + * bg-red-500 + * ^^^^^^^ + * + * w-1/2 + * ^ + * ``` + */ + value: string; + /** + * ``` + * w-1/2 + * ^^^ + * ``` + */ + fraction: string | null; +}; + +type PluginUtils = { + theme: (keypath: string, defaultValue?: any) => any; + colors: typeof _default; +}; + +export type { NamedUtilityValue as N, PluginUtils as P }; diff --git a/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts b/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts new file mode 100644 index 0000000..e1cde16 --- /dev/null +++ b/node_modules/tailwindcss/dist/resolve-config-QUZ9b-Gn.d.mts @@ -0,0 +1,190 @@ +import _default from './colors.mjs'; + +type ArbitraryUtilityValue = { + kind: 'arbitrary'; + /** + * ``` + * bg-[color:var(--my-color)] + * ^^^^^ + * + * bg-(color:--my-color) + * ^^^^^ + * ``` + */ + dataType: string | null; + /** + * ``` + * bg-[#0088cc] + * ^^^^^^^ + * + * bg-[var(--my_variable)] + * ^^^^^^^^^^^^^^^^^^ + * + * bg-(--my_variable) + * ^^^^^^^^^^^^^^ + * ``` + */ + value: string; +}; +type NamedUtilityValue = { + kind: 'named'; + /** + * ``` + * bg-red-500 + * ^^^^^^^ + * + * w-1/2 + * ^ + * ``` + */ + value: string; + /** + * ``` + * w-1/2 + * ^^^ + * ``` + */ + fraction: string | null; +}; +type ArbitraryModifier = { + kind: 'arbitrary'; + /** + * ``` + * bg-red-500/[50%] + * ^^^ + * ``` + */ + value: string; +}; +type NamedModifier = { + kind: 'named'; + /** + * ``` + * bg-red-500/50 + * ^^ + * ``` + */ + value: string; +}; +type ArbitraryVariantValue = { + kind: 'arbitrary'; + value: string; +}; +type NamedVariantValue = { + kind: 'named'; + value: string; +}; +type Variant = +/** + * Arbitrary variants are variants that take a selector and generate a variant + * on the fly. + * + * E.g.: `[&_p]` + */ +{ + kind: 'arbitrary'; + selector: string; + relative: boolean; +} +/** + * Static variants are variants that don't take any arguments. + * + * E.g.: `hover` + */ + | { + kind: 'static'; + root: string; +} +/** + * Functional variants are variants that can take an argument. The argument is + * either a named variant value or an arbitrary variant value. + * + * E.g.: + * + * - `aria-disabled` + * - `aria-[disabled]` + * - `@container-size` -> @container, with named value `size` + * - `@container-[inline-size]` -> @container, with arbitrary variant value `inline-size` + * - `@container` -> @container, with no value + */ + | { + kind: 'functional'; + root: string; + value: ArbitraryVariantValue | NamedVariantValue | null; + modifier: ArbitraryModifier | NamedModifier | null; +} +/** + * Compound variants are variants that take another variant as an argument. + * + * E.g.: + * + * - `has-[&_p]` + * - `group-*` + * - `peer-*` + */ + | { + kind: 'compound'; + root: string; + modifier: ArbitraryModifier | NamedModifier | null; + variant: Variant; +}; +type Candidate = +/** + * Arbitrary candidates are candidates that register utilities on the fly with + * a property and a value. + * + * E.g.: + * + * - `[color:red]` + * - `[color:red]/50` + * - `[color:red]/50!` + */ +{ + kind: 'arbitrary'; + property: string; + value: string; + modifier: ArbitraryModifier | NamedModifier | null; + variants: Variant[]; + important: boolean; + raw: string; +} +/** + * Static candidates are candidates that don't take any arguments. + * + * E.g.: + * + * - `underline` + * - `box-border` + */ + | { + kind: 'static'; + root: string; + variants: Variant[]; + important: boolean; + raw: string; +} +/** + * Functional candidates are candidates that can take an argument. + * + * E.g.: + * + * - `bg-red-500` + * - `bg-[#0088cc]` + * - `w-1/2` + */ + | { + kind: 'functional'; + root: string; + value: ArbitraryUtilityValue | NamedUtilityValue | null; + modifier: ArbitraryModifier | NamedModifier | null; + variants: Variant[]; + important: boolean; + raw: string; +}; + +type PluginUtils = { + theme: (keypath: string, defaultValue?: any) => any; + colors: typeof _default; +}; + +export type { Candidate as C, NamedUtilityValue as N, PluginUtils as P, Variant as V }; diff --git a/node_modules/tailwindcss/dist/types-B254mqw1.d.mts b/node_modules/tailwindcss/dist/types-B254mqw1.d.mts new file mode 100644 index 0000000..b3ac7a9 --- /dev/null +++ b/node_modules/tailwindcss/dist/types-B254mqw1.d.mts @@ -0,0 +1,98 @@ +import { N as NamedUtilityValue, P as PluginUtils } from './resolve-config-QUZ9b-Gn.mjs'; + +type Config = UserConfig; +type PluginFn = (api: PluginAPI) => void; +type PluginWithConfig = { + handler: PluginFn; + config?: UserConfig; + /** @internal */ + reference?: boolean; +}; +type PluginWithOptions = { + (options?: T): PluginWithConfig; + __isOptionsFunction: true; +}; +type Plugin = PluginFn | PluginWithConfig | PluginWithOptions; +type PluginAPI = { + addBase(base: CssInJs): void; + addVariant(name: string, variant: string | string[] | CssInJs): void; + matchVariant(name: string, cb: (value: T | string, extra: { + modifier: string | null; + }) => string | string[], options?: { + values?: Record; + sort?(a: { + value: T | string; + modifier: string | null; + }, b: { + value: T | string; + modifier: string | null; + }): number; + }): void; + addUtilities(utilities: Record | Record[], options?: {}): void; + matchUtilities(utilities: Record CssInJs | CssInJs[]>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + addComponents(utilities: Record | Record[], options?: {}): void; + matchComponents(utilities: Record CssInJs>, options?: Partial<{ + type: string | string[]; + supportsNegativeValues: boolean; + values: Record & { + __BARE_VALUE__?: (value: NamedUtilityValue) => string | undefined; + }; + modifiers: 'any' | Record; + }>): void; + theme(path: string, defaultValue?: any): any; + config(path?: string, defaultValue?: any): any; + prefix(className: string): string; +}; +type CssInJs = { + [key: string]: string | string[] | CssInJs | CssInJs[]; +}; + +type ResolvableTo = T | ((utils: PluginUtils) => T); +type ThemeValue = ResolvableTo> | null | undefined; +type ThemeConfig = Record & { + extend?: Record; +}; +type ContentFile = string | { + raw: string; + extension?: string; +}; +type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]]; +interface UserConfig { + presets?: UserConfig[]; + theme?: ThemeConfig; + plugins?: Plugin[]; +} +interface UserConfig { + content?: ContentFile[] | { + relative?: boolean; + files: ContentFile[]; + }; +} +interface UserConfig { + darkMode?: DarkModeStrategy; +} +interface UserConfig { + prefix?: string; +} +interface UserConfig { + blocklist?: string[]; +} +interface UserConfig { + important?: boolean | string; +} +interface UserConfig { + future?: 'all' | Record; +} + +export type { Config as C, Plugin as P, ThemeConfig as T, UserConfig as U, PluginFn as a, PluginWithConfig as b, PluginWithOptions as c, PluginAPI as d }; diff --git a/node_modules/tailwindcss/index.css b/node_modules/tailwindcss/index.css new file mode 100644 index 0000000..0792ea3 --- /dev/null +++ b/node_modules/tailwindcss/index.css @@ -0,0 +1,888 @@ +@layer theme, base, components, utilities; + +@layer theme { + @theme default { + --font-sans: + ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + + --color-red-50: oklch(97.1% 0.013 17.38); + --color-red-100: oklch(93.6% 0.032 17.717); + --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-red-700: oklch(50.5% 0.213 27.518); + --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-red-950: oklch(25.8% 0.092 26.042); + + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-orange-700: oklch(55.3% 0.195 38.402); + --color-orange-800: oklch(47% 0.157 37.304); + --color-orange-900: oklch(40.8% 0.123 38.172); + --color-orange-950: oklch(26.6% 0.079 36.259); + + --color-amber-50: oklch(98.7% 0.022 95.277); + --color-amber-100: oklch(96.2% 0.059 95.617); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-amber-300: oklch(87.9% 0.169 91.605); + --color-amber-400: oklch(82.8% 0.189 84.429); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-amber-700: oklch(55.5% 0.163 48.998); + --color-amber-800: oklch(47.3% 0.137 46.201); + --color-amber-900: oklch(41.4% 0.112 45.904); + --color-amber-950: oklch(27.9% 0.077 45.635); + + --color-yellow-50: oklch(98.7% 0.026 102.212); + --color-yellow-100: oklch(97.3% 0.071 103.193); + --color-yellow-200: oklch(94.5% 0.129 101.54); + --color-yellow-300: oklch(90.5% 0.182 98.111); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-yellow-600: oklch(68.1% 0.162 75.834); + --color-yellow-700: oklch(55.4% 0.135 66.442); + --color-yellow-800: oklch(47.6% 0.114 61.907); + --color-yellow-900: oklch(42.1% 0.095 57.708); + --color-yellow-950: oklch(28.6% 0.066 53.813); + + --color-lime-50: oklch(98.6% 0.031 120.757); + --color-lime-100: oklch(96.7% 0.067 122.328); + --color-lime-200: oklch(93.8% 0.127 124.321); + --color-lime-300: oklch(89.7% 0.196 126.665); + --color-lime-400: oklch(84.1% 0.238 128.85); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-lime-600: oklch(64.8% 0.2 131.684); + --color-lime-700: oklch(53.2% 0.157 131.589); + --color-lime-800: oklch(45.3% 0.124 130.933); + --color-lime-900: oklch(40.5% 0.101 131.063); + --color-lime-950: oklch(27.4% 0.072 132.109); + + --color-green-50: oklch(98.2% 0.018 155.826); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-green-800: oklch(44.8% 0.119 151.328); + --color-green-900: oklch(39.3% 0.095 152.535); + --color-green-950: oklch(26.6% 0.065 152.934); + + --color-emerald-50: oklch(97.9% 0.021 166.113); + --color-emerald-100: oklch(95% 0.052 163.051); + --color-emerald-200: oklch(90.5% 0.093 164.15); + --color-emerald-300: oklch(84.5% 0.143 164.978); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); + --color-emerald-700: oklch(50.8% 0.118 165.612); + --color-emerald-800: oklch(43.2% 0.095 166.913); + --color-emerald-900: oklch(37.8% 0.077 168.94); + --color-emerald-950: oklch(26.2% 0.051 172.552); + + --color-teal-50: oklch(98.4% 0.014 180.72); + --color-teal-100: oklch(95.3% 0.051 180.801); + --color-teal-200: oklch(91% 0.096 180.426); + --color-teal-300: oklch(85.5% 0.138 181.071); + --color-teal-400: oklch(77.7% 0.152 181.912); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-teal-600: oklch(60% 0.118 184.704); + --color-teal-700: oklch(51.1% 0.096 186.391); + --color-teal-800: oklch(43.7% 0.078 188.216); + --color-teal-900: oklch(38.6% 0.063 188.416); + --color-teal-950: oklch(27.7% 0.046 192.524); + + --color-cyan-50: oklch(98.4% 0.019 200.873); + --color-cyan-100: oklch(95.6% 0.045 203.388); + --color-cyan-200: oklch(91.7% 0.08 205.041); + --color-cyan-300: oklch(86.5% 0.127 207.078); + --color-cyan-400: oklch(78.9% 0.154 211.53); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-cyan-600: oklch(60.9% 0.126 221.723); + --color-cyan-700: oklch(52% 0.105 223.128); + --color-cyan-800: oklch(45% 0.085 224.283); + --color-cyan-900: oklch(39.8% 0.07 227.392); + --color-cyan-950: oklch(30.2% 0.056 229.695); + + --color-sky-50: oklch(97.7% 0.013 236.62); + --color-sky-100: oklch(95.1% 0.026 236.824); + --color-sky-200: oklch(90.1% 0.058 230.902); + --color-sky-300: oklch(82.8% 0.111 230.318); + --color-sky-400: oklch(74.6% 0.16 232.661); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-sky-600: oklch(58.8% 0.158 241.966); + --color-sky-700: oklch(50% 0.134 242.749); + --color-sky-800: oklch(44.3% 0.11 240.79); + --color-sky-900: oklch(39.1% 0.09 240.876); + --color-sky-950: oklch(29.3% 0.066 243.157); + + --color-blue-50: oklch(97% 0.014 254.604); + --color-blue-100: oklch(93.2% 0.032 255.585); + --color-blue-200: oklch(88.2% 0.059 254.128); + --color-blue-300: oklch(80.9% 0.105 251.813); + --color-blue-400: oklch(70.7% 0.165 254.624); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-700: oklch(48.8% 0.243 264.376); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-blue-900: oklch(37.9% 0.146 265.522); + --color-blue-950: oklch(28.2% 0.091 267.935); + + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-200: oklch(87% 0.065 274.039); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-indigo-600: oklch(51.1% 0.262 276.966); + --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-800: oklch(39.8% 0.195 277.366); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-indigo-950: oklch(25.7% 0.09 281.288); + + --color-violet-50: oklch(96.9% 0.016 293.756); + --color-violet-100: oklch(94.3% 0.029 294.588); + --color-violet-200: oklch(89.4% 0.057 293.283); + --color-violet-300: oklch(81.1% 0.111 293.571); + --color-violet-400: oklch(70.2% 0.183 293.541); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-violet-600: oklch(54.1% 0.281 293.009); + --color-violet-700: oklch(49.1% 0.27 292.581); + --color-violet-800: oklch(43.2% 0.232 292.759); + --color-violet-900: oklch(38% 0.189 293.745); + --color-violet-950: oklch(28.3% 0.141 291.089); + + --color-purple-50: oklch(97.7% 0.014 308.299); + --color-purple-100: oklch(94.6% 0.033 307.174); + --color-purple-200: oklch(90.2% 0.063 306.703); + --color-purple-300: oklch(82.7% 0.119 306.383); + --color-purple-400: oklch(71.4% 0.203 305.504); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-purple-600: oklch(55.8% 0.288 302.321); + --color-purple-700: oklch(49.6% 0.265 301.924); + --color-purple-800: oklch(43.8% 0.218 303.724); + --color-purple-900: oklch(38.1% 0.176 304.987); + --color-purple-950: oklch(29.1% 0.149 302.717); + + --color-fuchsia-50: oklch(97.7% 0.017 320.058); + --color-fuchsia-100: oklch(95.2% 0.037 318.852); + --color-fuchsia-200: oklch(90.3% 0.076 319.62); + --color-fuchsia-300: oklch(83.3% 0.145 321.434); + --color-fuchsia-400: oklch(74% 0.238 322.16); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-fuchsia-600: oklch(59.1% 0.293 322.896); + --color-fuchsia-700: oklch(51.8% 0.253 323.949); + --color-fuchsia-800: oklch(45.2% 0.211 324.591); + --color-fuchsia-900: oklch(40.1% 0.17 325.612); + --color-fuchsia-950: oklch(29.3% 0.136 325.661); + + --color-pink-50: oklch(97.1% 0.014 343.198); + --color-pink-100: oklch(94.8% 0.028 342.258); + --color-pink-200: oklch(89.9% 0.061 343.231); + --color-pink-300: oklch(82.3% 0.12 346.018); + --color-pink-400: oklch(71.8% 0.202 349.761); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-pink-700: oklch(52.5% 0.223 3.958); + --color-pink-800: oklch(45.9% 0.187 3.815); + --color-pink-900: oklch(40.8% 0.153 2.432); + --color-pink-950: oklch(28.4% 0.109 3.907); + + --color-rose-50: oklch(96.9% 0.015 12.422); + --color-rose-100: oklch(94.1% 0.03 12.58); + --color-rose-200: oklch(89.2% 0.058 10.001); + --color-rose-300: oklch(81% 0.117 11.638); + --color-rose-400: oklch(71.2% 0.194 13.428); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-rose-600: oklch(58.6% 0.253 17.585); + --color-rose-700: oklch(51.4% 0.222 16.935); + --color-rose-800: oklch(45.5% 0.188 13.697); + --color-rose-900: oklch(41% 0.159 10.272); + --color-rose-950: oklch(27.1% 0.105 12.094); + + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-100: oklch(96.8% 0.007 247.896); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); + --color-slate-950: oklch(12.9% 0.042 264.695); + + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-gray-950: oklch(13% 0.028 261.692); + + --color-zinc-50: oklch(98.5% 0 0); + --color-zinc-100: oklch(96.7% 0.001 286.375); + --color-zinc-200: oklch(92% 0.004 286.32); + --color-zinc-300: oklch(87.1% 0.006 286.286); + --color-zinc-400: oklch(70.5% 0.015 286.067); + --color-zinc-500: oklch(55.2% 0.016 285.938); + --color-zinc-600: oklch(44.2% 0.017 285.786); + --color-zinc-700: oklch(37% 0.013 285.805); + --color-zinc-800: oklch(27.4% 0.006 286.033); + --color-zinc-900: oklch(21% 0.006 285.885); + --color-zinc-950: oklch(14.1% 0.005 285.823); + + --color-neutral-50: oklch(98.5% 0 0); + --color-neutral-100: oklch(97% 0 0); + --color-neutral-200: oklch(92.2% 0 0); + --color-neutral-300: oklch(87% 0 0); + --color-neutral-400: oklch(70.8% 0 0); + --color-neutral-500: oklch(55.6% 0 0); + --color-neutral-600: oklch(43.9% 0 0); + --color-neutral-700: oklch(37.1% 0 0); + --color-neutral-800: oklch(26.9% 0 0); + --color-neutral-900: oklch(20.5% 0 0); + --color-neutral-950: oklch(14.5% 0 0); + + --color-stone-50: oklch(98.5% 0.001 106.423); + --color-stone-100: oklch(97% 0.001 106.424); + --color-stone-200: oklch(92.3% 0.003 48.717); + --color-stone-300: oklch(86.9% 0.005 56.366); + --color-stone-400: oklch(70.9% 0.01 56.259); + --color-stone-500: oklch(55.3% 0.013 58.071); + --color-stone-600: oklch(44.4% 0.011 73.639); + --color-stone-700: oklch(37.4% 0.01 67.558); + --color-stone-800: oklch(26.8% 0.007 34.298); + --color-stone-900: oklch(21.6% 0.006 56.043); + --color-stone-950: oklch(14.7% 0.004 49.25); + + --color-black: #000; + --color-white: #fff; + + --spacing: 0.25rem; + + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: + 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: + 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: + 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + + --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15); + --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2); + --text-shadow-sm: + 0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), + 0px 2px 2px rgb(0 0 0 / 0.075); + --text-shadow-md: + 0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), + 0px 2px 4px rgb(0 0 0 / 0.1); + --text-shadow-lg: + 0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), + 0px 4px 8px rgb(0 0 0 / 0.1); + + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + + @keyframes spin { + to { + transform: rotate(360deg); + } + } + + @keyframes ping { + 75%, + 100% { + transform: scale(2); + opacity: 0; + } + } + + @keyframes pulse { + 50% { + opacity: 0.5; + } + } + + @keyframes bounce { + 0%, + 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + } + + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + + --aspect-video: 16 / 9; + + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: --theme(--font-sans, initial); + --default-font-feature-settings: --theme( + --font-sans--font-feature-settings, + initial + ); + --default-font-variation-settings: --theme( + --font-sans--font-variation-settings, + initial + ); + --default-mono-font-family: --theme(--font-mono, initial); + --default-mono-font-feature-settings: --theme( + --font-mono--font-feature-settings, + initial + ); + --default-mono-font-variation-settings: --theme( + --font-mono--font-variation-settings, + initial + ); + } + + /* Deprecated */ + @theme default inline reference { + --blur: 8px; + --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06); + --radius: 0.25rem; + --max-width-prose: 65ch; + } +} + +@layer base { + /* + 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) + 2. Remove default margins and padding + 3. Reset all borders. +*/ + + *, + ::after, + ::before, + ::backdrop, + ::file-selector-button { + box-sizing: border-box; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 2 */ + border: 0 solid; /* 3 */ + } + + /* + 1. Use a consistent sensible line-height in all browsers. + 2. Prevent adjustments of font size after orientation changes in iOS. + 3. Use a more readable tab size. + 4. Use the user's configured `sans` font-family by default. + 5. Use the user's configured `sans` font-feature-settings by default. + 6. Use the user's configured `sans` font-variation-settings by default. + 7. Disable tap highlights on iOS. +*/ + + html, + :host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + tab-size: 4; /* 3 */ + font-family: --theme( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + "Apple Color Emoji", + "Segoe UI Emoji", + "Segoe UI Symbol", + "Noto Color Emoji" + ); /* 4 */ + font-feature-settings: --theme( + --default-font-feature-settings, + normal + ); /* 5 */ + font-variation-settings: --theme( + --default-font-variation-settings, + normal + ); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ + } + + /* + 1. Add the correct height in Firefox. + 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) + 3. Reset the default border style to a 1px solid border. +*/ + + hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ + } + + /* + Add the correct text decoration in Chrome, Edge, and Safari. +*/ + + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + /* + Remove the default font size and weight for headings. +*/ + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + /* + Reset links to optimize for opt-in styling instead of opt-out. +*/ + + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + + /* + Add the correct font weight in Edge and Safari. +*/ + + b, + strong { + font-weight: bolder; + } + + /* + 1. Use the user's configured `mono` font-family by default. + 2. Use the user's configured `mono` font-feature-settings by default. + 3. Use the user's configured `mono` font-variation-settings by default. + 4. Correct the odd `em` font sizing in all browsers. +*/ + + code, + kbd, + samp, + pre { + font-family: --theme( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + "Liberation Mono", + "Courier New", + monospace + ); /* 1 */ + font-feature-settings: --theme( + --default-mono-font-feature-settings, + normal + ); /* 2 */ + font-variation-settings: --theme( + --default-mono-font-variation-settings, + normal + ); /* 3 */ + font-size: 1em; /* 4 */ + } + + /* + Add the correct font size in all browsers. +*/ + + small { + font-size: 80%; + } + + /* + Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + /* + 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) + 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) + 3. Remove gaps between table borders by default. +*/ + + table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ + } + + /* + Use the modern Firefox focus style for all focusable elements. +*/ + + :-moz-focusring { + outline: auto; + } + + /* + Add the correct vertical alignment in Chrome and Firefox. +*/ + + progress { + vertical-align: baseline; + } + + /* + Add the correct display in Chrome and Safari. +*/ + + summary { + display: list-item; + } + + /* + Make lists unstyled by default. +*/ + + ol, + ul, + menu { + list-style: none; + } + + /* + 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) + 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ + } + + /* + Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + + img, + video { + max-width: 100%; + height: auto; + } + + /* + 1. Inherit font styles in all browsers. + 2. Remove border radius in all browsers. + 3. Remove background color in all browsers. + 4. Ensure consistent opacity for disabled states in all browsers. +*/ + + button, + input, + select, + optgroup, + textarea, + ::file-selector-button { + font: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + border-radius: 0; /* 2 */ + background-color: transparent; /* 3 */ + opacity: 1; /* 4 */ + } + + /* + Restore default font weight. +*/ + + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + + /* + Restore indentation. +*/ + + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + + /* + Restore space after button. +*/ + + ::file-selector-button { + margin-inline-end: 4px; + } + + /* + Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +*/ + + ::placeholder { + opacity: 1; + } + + /* + Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not + crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194) +*/ + + @supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or + (contain-intrinsic-size: 1px) /* Safari 17+ */ { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + + /* + Prevent resizing textareas horizontally by default. +*/ + + textarea { + resize: vertical; + } + + /* + Remove the inner padding in Chrome and Safari on macOS. +*/ + + ::-webkit-search-decoration { + -webkit-appearance: none; + } + + /* + 1. Ensure date/time inputs have the same height when empty in iOS Safari. + 2. Ensure text alignment can be changed on date/time inputs in iOS Safari. +*/ + + ::-webkit-date-and-time-value { + min-height: 1lh; /* 1 */ + text-align: inherit; /* 2 */ + } + + /* + Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`. +*/ + + ::-webkit-datetime-edit { + display: inline-flex; + } + + /* + Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers. +*/ + + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + + ::-webkit-datetime-edit, + ::-webkit-datetime-edit-year-field, + ::-webkit-datetime-edit-month-field, + ::-webkit-datetime-edit-day-field, + ::-webkit-datetime-edit-hour-field, + ::-webkit-datetime-edit-minute-field, + ::-webkit-datetime-edit-second-field, + ::-webkit-datetime-edit-millisecond-field, + ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + + /* + Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + + :-moz-ui-invalid { + box-shadow: none; + } + + /* + Correct the inability to style the border radius in iOS Safari. +*/ + + button, + input:where([type="button"], [type="reset"], [type="submit"]), + ::file-selector-button { + appearance: button; + } + + /* + Correct the cursor style of increment and decrement buttons in Safari. +*/ + + ::-webkit-inner-spin-button, + ::-webkit-outer-spin-button { + height: auto; + } + + /* + Make elements with the HTML hidden attribute stay hidden by default. +*/ + + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} + +@layer utilities { + @tailwind utilities; +} diff --git a/node_modules/tailwindcss/package.json b/node_modules/tailwindcss/package.json new file mode 100644 index 0000000..0278a74 --- /dev/null +++ b/node_modules/tailwindcss/package.json @@ -0,0 +1,89 @@ +{ + "name": "tailwindcss", + "version": "4.1.11", + "description": "A utility-first CSS framework for rapidly building custom user interfaces.", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/tailwindlabs/tailwindcss.git", + "directory": "packages/tailwindcss" + }, + "bugs": "https://github.com/tailwindlabs/tailwindcss/issues", + "homepage": "https://tailwindcss.com", + "exports": { + ".": { + "types": "./dist/lib.d.mts", + "style": "./index.css", + "require": "./dist/lib.js", + "import": "./dist/lib.mjs" + }, + "./plugin": { + "require": "./dist/plugin.js", + "import": "./dist/plugin.mjs" + }, + "./plugin.js": { + "require": "./dist/plugin.js", + "import": "./dist/plugin.mjs" + }, + "./defaultTheme": { + "require": "./dist/default-theme.js", + "import": "./dist/default-theme.mjs" + }, + "./defaultTheme.js": { + "require": "./dist/default-theme.js", + "import": "./dist/default-theme.mjs" + }, + "./colors": { + "require": "./dist/colors.js", + "import": "./dist/colors.mjs" + }, + "./colors.js": { + "require": "./dist/colors.js", + "import": "./dist/colors.mjs" + }, + "./lib/util/flattenColorPalette": { + "require": "./dist/flatten-color-palette.js", + "import": "./dist/flatten-color-palette.mjs" + }, + "./lib/util/flattenColorPalette.js": { + "require": "./dist/flatten-color-palette.js", + "import": "./dist/flatten-color-palette.mjs" + }, + "./package.json": "./package.json", + "./index.css": "./index.css", + "./index": "./index.css", + "./preflight.css": "./preflight.css", + "./preflight": "./preflight.css", + "./theme.css": "./theme.css", + "./theme": "./theme.css", + "./utilities.css": "./utilities.css", + "./utilities": "./utilities.css" + }, + "publishConfig": { + "provenance": true, + "access": "public" + }, + "style": "index.css", + "files": [ + "dist", + "index.css", + "preflight.css", + "theme.css", + "utilities.css" + ], + "devDependencies": { + "@ampproject/remapping": "^2.3.0", + "@types/node": "^20.19.0", + "dedent": "1.6.0", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "@tailwindcss/oxide": "^4.1.11" + }, + "scripts": { + "lint": "tsc --noEmit", + "build": "tsup-node --env.NODE_ENV production", + "dev": "tsup-node --env.NODE_ENV development --watch", + "test:ui": "playwright test" + } +} \ No newline at end of file diff --git a/node_modules/tailwindcss/preflight.css b/node_modules/tailwindcss/preflight.css new file mode 100644 index 0000000..0976a40 --- /dev/null +++ b/node_modules/tailwindcss/preflight.css @@ -0,0 +1,385 @@ +/* + 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) + 2. Remove default margins and padding + 3. Reset all borders. +*/ + +*, +::after, +::before, +::backdrop, +::file-selector-button { + box-sizing: border-box; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 2 */ + border: 0 solid; /* 3 */ +} + +/* + 1. Use a consistent sensible line-height in all browsers. + 2. Prevent adjustments of font size after orientation changes in iOS. + 3. Use a more readable tab size. + 4. Use the user's configured `sans` font-family by default. + 5. Use the user's configured `sans` font-feature-settings by default. + 6. Use the user's configured `sans` font-variation-settings by default. + 7. Disable tap highlights on iOS. +*/ + +html, +:host { + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + tab-size: 4; /* 3 */ + font-family: --theme( + --default-font-family, + ui-sans-serif, + system-ui, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji', + 'Segoe UI Symbol', + 'Noto Color Emoji' + ); /* 4 */ + font-feature-settings: --theme(--default-font-feature-settings, normal); /* 5 */ + font-variation-settings: --theme(--default-font-variation-settings, normal); /* 6 */ + -webkit-tap-highlight-color: transparent; /* 7 */ +} + +/* + 1. Add the correct height in Firefox. + 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) + 3. Reset the default border style to a 1px solid border. +*/ + +hr { + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ +} + +/* + Add the correct text decoration in Chrome, Edge, and Safari. +*/ + +abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; +} + +/* + Remove the default font size and weight for headings. +*/ + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: inherit; + font-weight: inherit; +} + +/* + Reset links to optimize for opt-in styling instead of opt-out. +*/ + +a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; +} + +/* + Add the correct font weight in Edge and Safari. +*/ + +b, +strong { + font-weight: bolder; +} + +/* + 1. Use the user's configured `mono` font-family by default. + 2. Use the user's configured `mono` font-feature-settings by default. + 3. Use the user's configured `mono` font-variation-settings by default. + 4. Correct the odd `em` font sizing in all browsers. +*/ + +code, +kbd, +samp, +pre { + font-family: --theme( + --default-mono-font-family, + ui-monospace, + SFMono-Regular, + Menlo, + Monaco, + Consolas, + 'Liberation Mono', + 'Courier New', + monospace + ); /* 1 */ + font-feature-settings: --theme(--default-mono-font-feature-settings, normal); /* 2 */ + font-variation-settings: --theme(--default-mono-font-variation-settings, normal); /* 3 */ + font-size: 1em; /* 4 */ +} + +/* + Add the correct font size in all browsers. +*/ + +small { + font-size: 80%; +} + +/* + Prevent `sub` and `sup` elements from affecting the line height in all browsers. +*/ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* + 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) + 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) + 3. Remove gaps between table borders by default. +*/ + +table { + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ +} + +/* + Use the modern Firefox focus style for all focusable elements. +*/ + +:-moz-focusring { + outline: auto; +} + +/* + Add the correct vertical alignment in Chrome and Firefox. +*/ + +progress { + vertical-align: baseline; +} + +/* + Add the correct display in Chrome and Safari. +*/ + +summary { + display: list-item; +} + +/* + Make lists unstyled by default. +*/ + +ol, +ul, +menu { + list-style: none; +} + +/* + 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) + 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) + This can trigger a poorly considered lint error in some tools but is included by design. +*/ + +img, +svg, +video, +canvas, +audio, +iframe, +embed, +object { + display: block; /* 1 */ + vertical-align: middle; /* 2 */ +} + +/* + Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) +*/ + +img, +video { + max-width: 100%; + height: auto; +} + +/* + 1. Inherit font styles in all browsers. + 2. Remove border radius in all browsers. + 3. Remove background color in all browsers. + 4. Ensure consistent opacity for disabled states in all browsers. +*/ + +button, +input, +select, +optgroup, +textarea, +::file-selector-button { + font: inherit; /* 1 */ + font-feature-settings: inherit; /* 1 */ + font-variation-settings: inherit; /* 1 */ + letter-spacing: inherit; /* 1 */ + color: inherit; /* 1 */ + border-radius: 0; /* 2 */ + background-color: transparent; /* 3 */ + opacity: 1; /* 4 */ +} + +/* + Restore default font weight. +*/ + +:where(select:is([multiple], [size])) optgroup { + font-weight: bolder; +} + +/* + Restore indentation. +*/ + +:where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; +} + +/* + Restore space after button. +*/ + +::file-selector-button { + margin-inline-end: 4px; +} + +/* + Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) +*/ + +::placeholder { + opacity: 1; +} + +/* + Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not + crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194) +*/ + +@supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or + (contain-intrinsic-size: 1px) /* Safari 17+ */ { + ::placeholder { + color: color-mix(in oklab, currentcolor 50%, transparent); + } +} + +/* + Prevent resizing textareas horizontally by default. +*/ + +textarea { + resize: vertical; +} + +/* + Remove the inner padding in Chrome and Safari on macOS. +*/ + +::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + 1. Ensure date/time inputs have the same height when empty in iOS Safari. + 2. Ensure text alignment can be changed on date/time inputs in iOS Safari. +*/ + +::-webkit-date-and-time-value { + min-height: 1lh; /* 1 */ + text-align: inherit; /* 2 */ +} + +/* + Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`. +*/ + +::-webkit-datetime-edit { + display: inline-flex; +} + +/* + Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers. +*/ + +::-webkit-datetime-edit-fields-wrapper { + padding: 0; +} + +::-webkit-datetime-edit, +::-webkit-datetime-edit-year-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-minute-field, +::-webkit-datetime-edit-second-field, +::-webkit-datetime-edit-millisecond-field, +::-webkit-datetime-edit-meridiem-field { + padding-block: 0; +} + +/* + Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) +*/ + +:-moz-ui-invalid { + box-shadow: none; +} + +/* + Correct the inability to style the border radius in iOS Safari. +*/ + +button, +input:where([type='button'], [type='reset'], [type='submit']), +::file-selector-button { + appearance: button; +} + +/* + Correct the cursor style of increment and decrement buttons in Safari. +*/ + +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; +} + +/* + Make elements with the HTML hidden attribute stay hidden by default. +*/ + +[hidden]:where(:not([hidden='until-found'])) { + display: none !important; +} diff --git a/node_modules/tailwindcss/theme.css b/node_modules/tailwindcss/theme.css new file mode 100644 index 0000000..52d447f --- /dev/null +++ b/node_modules/tailwindcss/theme.css @@ -0,0 +1,462 @@ +@theme default { + --font-sans: + ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; + --font-serif: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; + --font-mono: + ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + --color-red-50: oklch(97.1% 0.013 17.38); + --color-red-100: oklch(93.6% 0.032 17.717); + --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); + --color-red-400: oklch(70.4% 0.191 22.216); + --color-red-500: oklch(63.7% 0.237 25.331); + --color-red-600: oklch(57.7% 0.245 27.325); + --color-red-700: oklch(50.5% 0.213 27.518); + --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-red-950: oklch(25.8% 0.092 26.042); + + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-orange-700: oklch(55.3% 0.195 38.402); + --color-orange-800: oklch(47% 0.157 37.304); + --color-orange-900: oklch(40.8% 0.123 38.172); + --color-orange-950: oklch(26.6% 0.079 36.259); + + --color-amber-50: oklch(98.7% 0.022 95.277); + --color-amber-100: oklch(96.2% 0.059 95.617); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-amber-300: oklch(87.9% 0.169 91.605); + --color-amber-400: oklch(82.8% 0.189 84.429); + --color-amber-500: oklch(76.9% 0.188 70.08); + --color-amber-600: oklch(66.6% 0.179 58.318); + --color-amber-700: oklch(55.5% 0.163 48.998); + --color-amber-800: oklch(47.3% 0.137 46.201); + --color-amber-900: oklch(41.4% 0.112 45.904); + --color-amber-950: oklch(27.9% 0.077 45.635); + + --color-yellow-50: oklch(98.7% 0.026 102.212); + --color-yellow-100: oklch(97.3% 0.071 103.193); + --color-yellow-200: oklch(94.5% 0.129 101.54); + --color-yellow-300: oklch(90.5% 0.182 98.111); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-yellow-500: oklch(79.5% 0.184 86.047); + --color-yellow-600: oklch(68.1% 0.162 75.834); + --color-yellow-700: oklch(55.4% 0.135 66.442); + --color-yellow-800: oklch(47.6% 0.114 61.907); + --color-yellow-900: oklch(42.1% 0.095 57.708); + --color-yellow-950: oklch(28.6% 0.066 53.813); + + --color-lime-50: oklch(98.6% 0.031 120.757); + --color-lime-100: oklch(96.7% 0.067 122.328); + --color-lime-200: oklch(93.8% 0.127 124.321); + --color-lime-300: oklch(89.7% 0.196 126.665); + --color-lime-400: oklch(84.1% 0.238 128.85); + --color-lime-500: oklch(76.8% 0.233 130.85); + --color-lime-600: oklch(64.8% 0.2 131.684); + --color-lime-700: oklch(53.2% 0.157 131.589); + --color-lime-800: oklch(45.3% 0.124 130.933); + --color-lime-900: oklch(40.5% 0.101 131.063); + --color-lime-950: oklch(27.4% 0.072 132.109); + + --color-green-50: oklch(98.2% 0.018 155.826); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-green-800: oklch(44.8% 0.119 151.328); + --color-green-900: oklch(39.3% 0.095 152.535); + --color-green-950: oklch(26.6% 0.065 152.934); + + --color-emerald-50: oklch(97.9% 0.021 166.113); + --color-emerald-100: oklch(95% 0.052 163.051); + --color-emerald-200: oklch(90.5% 0.093 164.15); + --color-emerald-300: oklch(84.5% 0.143 164.978); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); + --color-emerald-700: oklch(50.8% 0.118 165.612); + --color-emerald-800: oklch(43.2% 0.095 166.913); + --color-emerald-900: oklch(37.8% 0.077 168.94); + --color-emerald-950: oklch(26.2% 0.051 172.552); + + --color-teal-50: oklch(98.4% 0.014 180.72); + --color-teal-100: oklch(95.3% 0.051 180.801); + --color-teal-200: oklch(91% 0.096 180.426); + --color-teal-300: oklch(85.5% 0.138 181.071); + --color-teal-400: oklch(77.7% 0.152 181.912); + --color-teal-500: oklch(70.4% 0.14 182.503); + --color-teal-600: oklch(60% 0.118 184.704); + --color-teal-700: oklch(51.1% 0.096 186.391); + --color-teal-800: oklch(43.7% 0.078 188.216); + --color-teal-900: oklch(38.6% 0.063 188.416); + --color-teal-950: oklch(27.7% 0.046 192.524); + + --color-cyan-50: oklch(98.4% 0.019 200.873); + --color-cyan-100: oklch(95.6% 0.045 203.388); + --color-cyan-200: oklch(91.7% 0.08 205.041); + --color-cyan-300: oklch(86.5% 0.127 207.078); + --color-cyan-400: oklch(78.9% 0.154 211.53); + --color-cyan-500: oklch(71.5% 0.143 215.221); + --color-cyan-600: oklch(60.9% 0.126 221.723); + --color-cyan-700: oklch(52% 0.105 223.128); + --color-cyan-800: oklch(45% 0.085 224.283); + --color-cyan-900: oklch(39.8% 0.07 227.392); + --color-cyan-950: oklch(30.2% 0.056 229.695); + + --color-sky-50: oklch(97.7% 0.013 236.62); + --color-sky-100: oklch(95.1% 0.026 236.824); + --color-sky-200: oklch(90.1% 0.058 230.902); + --color-sky-300: oklch(82.8% 0.111 230.318); + --color-sky-400: oklch(74.6% 0.16 232.661); + --color-sky-500: oklch(68.5% 0.169 237.323); + --color-sky-600: oklch(58.8% 0.158 241.966); + --color-sky-700: oklch(50% 0.134 242.749); + --color-sky-800: oklch(44.3% 0.11 240.79); + --color-sky-900: oklch(39.1% 0.09 240.876); + --color-sky-950: oklch(29.3% 0.066 243.157); + + --color-blue-50: oklch(97% 0.014 254.604); + --color-blue-100: oklch(93.2% 0.032 255.585); + --color-blue-200: oklch(88.2% 0.059 254.128); + --color-blue-300: oklch(80.9% 0.105 251.813); + --color-blue-400: oklch(70.7% 0.165 254.624); + --color-blue-500: oklch(62.3% 0.214 259.815); + --color-blue-600: oklch(54.6% 0.245 262.881); + --color-blue-700: oklch(48.8% 0.243 264.376); + --color-blue-800: oklch(42.4% 0.199 265.638); + --color-blue-900: oklch(37.9% 0.146 265.522); + --color-blue-950: oklch(28.2% 0.091 267.935); + + --color-indigo-50: oklch(96.2% 0.018 272.314); + --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-200: oklch(87% 0.065 274.039); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); + --color-indigo-500: oklch(58.5% 0.233 277.117); + --color-indigo-600: oklch(51.1% 0.262 276.966); + --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-800: oklch(39.8% 0.195 277.366); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-indigo-950: oklch(25.7% 0.09 281.288); + + --color-violet-50: oklch(96.9% 0.016 293.756); + --color-violet-100: oklch(94.3% 0.029 294.588); + --color-violet-200: oklch(89.4% 0.057 293.283); + --color-violet-300: oklch(81.1% 0.111 293.571); + --color-violet-400: oklch(70.2% 0.183 293.541); + --color-violet-500: oklch(60.6% 0.25 292.717); + --color-violet-600: oklch(54.1% 0.281 293.009); + --color-violet-700: oklch(49.1% 0.27 292.581); + --color-violet-800: oklch(43.2% 0.232 292.759); + --color-violet-900: oklch(38% 0.189 293.745); + --color-violet-950: oklch(28.3% 0.141 291.089); + + --color-purple-50: oklch(97.7% 0.014 308.299); + --color-purple-100: oklch(94.6% 0.033 307.174); + --color-purple-200: oklch(90.2% 0.063 306.703); + --color-purple-300: oklch(82.7% 0.119 306.383); + --color-purple-400: oklch(71.4% 0.203 305.504); + --color-purple-500: oklch(62.7% 0.265 303.9); + --color-purple-600: oklch(55.8% 0.288 302.321); + --color-purple-700: oklch(49.6% 0.265 301.924); + --color-purple-800: oklch(43.8% 0.218 303.724); + --color-purple-900: oklch(38.1% 0.176 304.987); + --color-purple-950: oklch(29.1% 0.149 302.717); + + --color-fuchsia-50: oklch(97.7% 0.017 320.058); + --color-fuchsia-100: oklch(95.2% 0.037 318.852); + --color-fuchsia-200: oklch(90.3% 0.076 319.62); + --color-fuchsia-300: oklch(83.3% 0.145 321.434); + --color-fuchsia-400: oklch(74% 0.238 322.16); + --color-fuchsia-500: oklch(66.7% 0.295 322.15); + --color-fuchsia-600: oklch(59.1% 0.293 322.896); + --color-fuchsia-700: oklch(51.8% 0.253 323.949); + --color-fuchsia-800: oklch(45.2% 0.211 324.591); + --color-fuchsia-900: oklch(40.1% 0.17 325.612); + --color-fuchsia-950: oklch(29.3% 0.136 325.661); + + --color-pink-50: oklch(97.1% 0.014 343.198); + --color-pink-100: oklch(94.8% 0.028 342.258); + --color-pink-200: oklch(89.9% 0.061 343.231); + --color-pink-300: oklch(82.3% 0.12 346.018); + --color-pink-400: oklch(71.8% 0.202 349.761); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-pink-700: oklch(52.5% 0.223 3.958); + --color-pink-800: oklch(45.9% 0.187 3.815); + --color-pink-900: oklch(40.8% 0.153 2.432); + --color-pink-950: oklch(28.4% 0.109 3.907); + + --color-rose-50: oklch(96.9% 0.015 12.422); + --color-rose-100: oklch(94.1% 0.03 12.58); + --color-rose-200: oklch(89.2% 0.058 10.001); + --color-rose-300: oklch(81% 0.117 11.638); + --color-rose-400: oklch(71.2% 0.194 13.428); + --color-rose-500: oklch(64.5% 0.246 16.439); + --color-rose-600: oklch(58.6% 0.253 17.585); + --color-rose-700: oklch(51.4% 0.222 16.935); + --color-rose-800: oklch(45.5% 0.188 13.697); + --color-rose-900: oklch(41% 0.159 10.272); + --color-rose-950: oklch(27.1% 0.105 12.094); + + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-100: oklch(96.8% 0.007 247.896); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); + --color-slate-950: oklch(12.9% 0.042 264.695); + + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-gray-950: oklch(13% 0.028 261.692); + + --color-zinc-50: oklch(98.5% 0 0); + --color-zinc-100: oklch(96.7% 0.001 286.375); + --color-zinc-200: oklch(92% 0.004 286.32); + --color-zinc-300: oklch(87.1% 0.006 286.286); + --color-zinc-400: oklch(70.5% 0.015 286.067); + --color-zinc-500: oklch(55.2% 0.016 285.938); + --color-zinc-600: oklch(44.2% 0.017 285.786); + --color-zinc-700: oklch(37% 0.013 285.805); + --color-zinc-800: oklch(27.4% 0.006 286.033); + --color-zinc-900: oklch(21% 0.006 285.885); + --color-zinc-950: oklch(14.1% 0.005 285.823); + + --color-neutral-50: oklch(98.5% 0 0); + --color-neutral-100: oklch(97% 0 0); + --color-neutral-200: oklch(92.2% 0 0); + --color-neutral-300: oklch(87% 0 0); + --color-neutral-400: oklch(70.8% 0 0); + --color-neutral-500: oklch(55.6% 0 0); + --color-neutral-600: oklch(43.9% 0 0); + --color-neutral-700: oklch(37.1% 0 0); + --color-neutral-800: oklch(26.9% 0 0); + --color-neutral-900: oklch(20.5% 0 0); + --color-neutral-950: oklch(14.5% 0 0); + + --color-stone-50: oklch(98.5% 0.001 106.423); + --color-stone-100: oklch(97% 0.001 106.424); + --color-stone-200: oklch(92.3% 0.003 48.717); + --color-stone-300: oklch(86.9% 0.005 56.366); + --color-stone-400: oklch(70.9% 0.01 56.259); + --color-stone-500: oklch(55.3% 0.013 58.071); + --color-stone-600: oklch(44.4% 0.011 73.639); + --color-stone-700: oklch(37.4% 0.01 67.558); + --color-stone-800: oklch(26.8% 0.007 34.298); + --color-stone-900: oklch(21.6% 0.006 56.043); + --color-stone-950: oklch(14.7% 0.004 49.25); + + --color-black: #000; + --color-white: #fff; + + --spacing: 0.25rem; + + --breakpoint-sm: 40rem; + --breakpoint-md: 48rem; + --breakpoint-lg: 64rem; + --breakpoint-xl: 80rem; + --breakpoint-2xl: 96rem; + + --container-3xs: 16rem; + --container-2xs: 18rem; + --container-xs: 20rem; + --container-sm: 24rem; + --container-md: 28rem; + --container-lg: 32rem; + --container-xl: 36rem; + --container-2xl: 42rem; + --container-3xl: 48rem; + --container-4xl: 56rem; + --container-5xl: 64rem; + --container-6xl: 72rem; + --container-7xl: 80rem; + + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --text-3xl: 1.875rem; + --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --text-6xl: 3.75rem; + --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; + --text-8xl: 6rem; + --text-8xl--line-height: 1; + --text-9xl: 8rem; + --text-9xl--line-height: 1; + + --font-weight-thin: 100; + --font-weight-extralight: 200; + --font-weight-light: 300; + --font-weight-normal: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --font-weight-black: 900; + + --tracking-tighter: -0.05em; + --tracking-tight: -0.025em; + --tracking-normal: 0em; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + + --leading-tight: 1.25; + --leading-snug: 1.375; + --leading-normal: 1.5; + --leading-relaxed: 1.625; + --leading-loose: 2; + + --radius-xs: 0.125rem; + --radius-sm: 0.25rem; + --radius-md: 0.375rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + + --shadow-2xs: 0 1px rgb(0 0 0 / 0.05); + --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05); + --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); + --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); + --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); + --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25); + + --inset-shadow-2xs: inset 0 1px rgb(0 0 0 / 0.05); + --inset-shadow-xs: inset 0 1px 1px rgb(0 0 0 / 0.05); + --inset-shadow-sm: inset 0 2px 4px rgb(0 0 0 / 0.05); + + --drop-shadow-xs: 0 1px 1px rgb(0 0 0 / 0.05); + --drop-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.15); + --drop-shadow-md: 0 3px 3px rgb(0 0 0 / 0.12); + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --drop-shadow-xl: 0 9px 7px rgb(0 0 0 / 0.1); + --drop-shadow-2xl: 0 25px 25px rgb(0 0 0 / 0.15); + + --text-shadow-2xs: 0px 1px 0px rgb(0 0 0 / 0.15); + --text-shadow-xs: 0px 1px 1px rgb(0 0 0 / 0.2); + --text-shadow-sm: + 0px 1px 0px rgb(0 0 0 / 0.075), 0px 1px 1px rgb(0 0 0 / 0.075), 0px 2px 2px rgb(0 0 0 / 0.075); + --text-shadow-md: + 0px 1px 1px rgb(0 0 0 / 0.1), 0px 1px 2px rgb(0 0 0 / 0.1), 0px 2px 4px rgb(0 0 0 / 0.1); + --text-shadow-lg: + 0px 1px 2px rgb(0 0 0 / 0.1), 0px 3px 2px rgb(0 0 0 / 0.1), 0px 4px 8px rgb(0 0 0 / 0.1); + + --ease-in: cubic-bezier(0.4, 0, 1, 1); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + + --animate-spin: spin 1s linear infinite; + --animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite; + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --animate-bounce: bounce 1s infinite; + + @keyframes spin { + to { + transform: rotate(360deg); + } + } + + @keyframes ping { + 75%, + 100% { + transform: scale(2); + opacity: 0; + } + } + + @keyframes pulse { + 50% { + opacity: 0.5; + } + } + + @keyframes bounce { + 0%, + 100% { + transform: translateY(-25%); + animation-timing-function: cubic-bezier(0.8, 0, 1, 1); + } + + 50% { + transform: none; + animation-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + } + + --blur-xs: 4px; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --blur-xl: 24px; + --blur-2xl: 40px; + --blur-3xl: 64px; + + --perspective-dramatic: 100px; + --perspective-near: 300px; + --perspective-normal: 500px; + --perspective-midrange: 800px; + --perspective-distant: 1200px; + + --aspect-video: 16 / 9; + + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: --theme(--font-sans, initial); + --default-font-feature-settings: --theme(--font-sans--font-feature-settings, initial); + --default-font-variation-settings: --theme(--font-sans--font-variation-settings, initial); + --default-mono-font-family: --theme(--font-mono, initial); + --default-mono-font-feature-settings: --theme(--font-mono--font-feature-settings, initial); + --default-mono-font-variation-settings: --theme(--font-mono--font-variation-settings, initial); +} + +/* Deprecated */ +@theme default inline reference { + --blur: 8px; + --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); + --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); + --drop-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 1px 1px rgb(0 0 0 / 0.06); + --radius: 0.25rem; + --max-width-prose: 65ch; +} diff --git a/node_modules/tailwindcss/utilities.css b/node_modules/tailwindcss/utilities.css new file mode 100644 index 0000000..65dd5f6 --- /dev/null +++ b/node_modules/tailwindcss/utilities.css @@ -0,0 +1 @@ +@tailwind utilities; diff --git a/node_modules/tapable/LICENSE b/node_modules/tapable/LICENSE new file mode 100644 index 0000000..03c083c --- /dev/null +++ b/node_modules/tapable/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright JS Foundation and other contributors + +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. diff --git a/node_modules/tapable/README.md b/node_modules/tapable/README.md new file mode 100644 index 0000000..ebb9704 --- /dev/null +++ b/node_modules/tapable/README.md @@ -0,0 +1,326 @@ +# Tapable + +The tapable package exposes many Hook classes, which can be used to create hooks for plugins. + +```javascript +const { + SyncHook, + SyncBailHook, + SyncWaterfallHook, + SyncLoopHook, + AsyncParallelHook, + AsyncParallelBailHook, + AsyncSeriesHook, + AsyncSeriesBailHook, + AsyncSeriesWaterfallHook +} = require("tapable"); +``` + +## Installation + +```shell +npm install --save tapable +``` + +## Usage + +All Hook constructors take one optional argument, which is a list of argument names as strings. + +```js +const hook = new SyncHook(["arg1", "arg2", "arg3"]); +``` + +The best practice is to expose all hooks of a class in a `hooks` property: + +```js +class Car { + constructor() { + this.hooks = { + accelerate: new SyncHook(["newSpeed"]), + brake: new SyncHook(), + calculateRoutes: new AsyncParallelHook(["source", "target", "routesList"]) + }; + } + + /* ... */ +} +``` + +Other people can now use these hooks: + +```js +const myCar = new Car(); + +// Use the tap method to add a consument +myCar.hooks.brake.tap("WarningLampPlugin", () => warningLamp.on()); +``` + +It's required to pass a name to identify the plugin/reason. + +You may receive arguments: + +```js +myCar.hooks.accelerate.tap("LoggerPlugin", (newSpeed) => + console.log(`Accelerating to ${newSpeed}`) +); +``` + +For sync hooks, `tap` is the only valid method to add a plugin. Async hooks also support async plugins: + +```js +myCar.hooks.calculateRoutes.tapPromise( + "GoogleMapsPlugin", + (source, target, routesList) => { + // return a promise + return google.maps.findRoute(source, target).then((route) => { + routesList.add(route); + }); + } +); +myCar.hooks.calculateRoutes.tapAsync( + "BingMapsPlugin", + (source, target, routesList, callback) => { + bing.findRoute(source, target, (err, route) => { + if (err) return callback(err); + routesList.add(route); + // call the callback + callback(); + }); + } +); + +// You can still use sync plugins +myCar.hooks.calculateRoutes.tap( + "CachedRoutesPlugin", + (source, target, routesList) => { + const cachedRoute = cache.get(source, target); + if (cachedRoute) routesList.add(cachedRoute); + } +); +``` + +The class declaring these hooks needs to call them: + +```js +class Car { + /** + * You won't get returned value from SyncHook or AsyncParallelHook, + * to do that, use SyncWaterfallHook and AsyncSeriesWaterfallHook respectively + **/ + + setSpeed(newSpeed) { + // following call returns undefined even when you returned values + this.hooks.accelerate.call(newSpeed); + } + + useNavigationSystemPromise(source, target) { + const routesList = new List(); + return this.hooks.calculateRoutes + .promise(source, target, routesList) + .then((res) => { + // res is undefined for AsyncParallelHook + return routesList.getRoutes(); + }); + } + + useNavigationSystemAsync(source, target, callback) { + const routesList = new List(); + this.hooks.calculateRoutes.callAsync(source, target, routesList, (err) => { + if (err) return callback(err); + callback(null, routesList.getRoutes()); + }); + } +} +``` + +The Hook will compile a method with the most efficient way of running your plugins. It generates code depending on: + +- The number of registered plugins (none, one, many) +- The kind of registered plugins (sync, async, promise) +- The used call method (sync, async, promise) +- The number of arguments +- Whether interception is used + +This ensures fastest possible execution. + +## Hook types + +Each hook can be tapped with one or several functions. How they are executed depends on the hook type: + +- Basic hook (without “Waterfall”, “Bail” or “Loop” in its name). This hook simply calls every function it tapped in a row. + +- **Waterfall**. A waterfall hook also calls each tapped function in a row. Unlike the basic hook, it passes a return value from each function to the next function. + +- **Bail**. A bail hook allows exiting early. When any of the tapped function returns anything, the bail hook will stop executing the remaining ones. + +- **Loop**. When a plugin in a loop hook returns a non-undefined value the hook will restart from the first plugin. It will loop until all plugins return undefined. + +Additionally, hooks can be synchronous or asynchronous. To reflect this, there’re “Sync”, “AsyncSeries”, and “AsyncParallel” hook classes: + +- **Sync**. A sync hook can only be tapped with synchronous functions (using `myHook.tap()`). + +- **AsyncSeries**. An async-series hook can be tapped with synchronous, callback-based and promise-based functions (using `myHook.tap()`, `myHook.tapAsync()` and `myHook.tapPromise()`). They call each async method in a row. + +- **AsyncParallel**. An async-parallel hook can also be tapped with synchronous, callback-based and promise-based functions (using `myHook.tap()`, `myHook.tapAsync()` and `myHook.tapPromise()`). However, they run each async method in parallel. + +The hook type is reflected in its class name. E.g., `AsyncSeriesWaterfallHook` allows asynchronous functions and runs them in series, passing each function’s return value into the next function. + +## Interception + +All Hooks offer an additional interception API: + +```js +myCar.hooks.calculateRoutes.intercept({ + call: (source, target, routesList) => { + console.log("Starting to calculate routes"); + }, + register: (tapInfo) => { + // tapInfo = { type: "promise", name: "GoogleMapsPlugin", fn: ... } + console.log(`${tapInfo.name} is doing its job`); + return tapInfo; // may return a new tapInfo object + } +}); +``` + +**call**: `(...args) => void` Adding `call` to your interceptor will trigger when hooks are triggered. You have access to the hooks arguments. + +**tap**: `(tap: Tap) => void` Adding `tap` to your interceptor will trigger when a plugin taps into a hook. Provided is the `Tap` object. `Tap` object can't be changed. + +**loop**: `(...args) => void` Adding `loop` to your interceptor will trigger for each loop of a looping hook. + +**register**: `(tap: Tap) => Tap | undefined` Adding `register` to your interceptor will trigger for each added `Tap` and allows to modify it. + +## Context + +Plugins and interceptors can opt-in to access an optional `context` object, which can be used to pass arbitrary values to subsequent plugins and interceptors. + +```js +myCar.hooks.accelerate.intercept({ + context: true, + tap: (context, tapInfo) => { + // tapInfo = { type: "sync", name: "NoisePlugin", fn: ... } + console.log(`${tapInfo.name} is doing it's job`); + + // `context` starts as an empty object if at least one plugin uses `context: true`. + // If no plugins use `context: true`, then `context` is undefined. + if (context) { + // Arbitrary properties can be added to `context`, which plugins can then access. + context.hasMuffler = true; + } + } +}); + +myCar.hooks.accelerate.tap( + { + name: "NoisePlugin", + context: true + }, + (context, newSpeed) => { + if (context && context.hasMuffler) { + console.log("Silence..."); + } else { + console.log("Vroom!"); + } + } +); +``` + +## HookMap + +A HookMap is a helper class for a Map with Hooks + +```js +const keyedHook = new HookMap((key) => new SyncHook(["arg"])); +``` + +```js +keyedHook.for("some-key").tap("MyPlugin", (arg) => { + /* ... */ +}); +keyedHook.for("some-key").tapAsync("MyPlugin", (arg, callback) => { + /* ... */ +}); +keyedHook.for("some-key").tapPromise("MyPlugin", (arg) => { + /* ... */ +}); +``` + +```js +const hook = keyedHook.get("some-key"); +if (hook !== undefined) { + hook.callAsync("arg", (err) => { + /* ... */ + }); +} +``` + +## Hook/HookMap interface + +Public: + +```ts +interface Hook { + tap: (name: string | Tap, fn: (context?, ...args) => Result) => void; + tapAsync: ( + name: string | Tap, + fn: (context?, ...args, callback: (err, result: Result) => void) => void + ) => void; + tapPromise: ( + name: string | Tap, + fn: (context?, ...args) => Promise + ) => void; + intercept: (interceptor: HookInterceptor) => void; +} + +interface HookInterceptor { + call: (context?, ...args) => void; + loop: (context?, ...args) => void; + tap: (context?, tap: Tap) => void; + register: (tap: Tap) => Tap; + context: boolean; +} + +interface HookMap { + for: (key: any) => Hook; + intercept: (interceptor: HookMapInterceptor) => void; +} + +interface HookMapInterceptor { + factory: (key: any, hook: Hook) => Hook; +} + +interface Tap { + name: string; + type: string; + fn: Function; + stage: number; + context: boolean; + before?: string | Array; +} +``` + +Protected (only for the class containing the hook): + +```ts +interface Hook { + isUsed: () => boolean; + call: (...args) => Result; + promise: (...args) => Promise; + callAsync: (...args, callback: (err, result: Result) => void) => void; +} + +interface HookMap { + get: (key: any) => Hook | undefined; + for: (key: any) => Hook; +} +``` + +## MultiHook + +A helper Hook-like class to redirect taps to multiple other hooks: + +```js +const { MultiHook } = require("tapable"); + +this.hooks.allHooks = new MultiHook([this.hooks.hookA, this.hooks.hookB]); +``` diff --git a/node_modules/tapable/lib/AsyncParallelBailHook.js b/node_modules/tapable/lib/AsyncParallelBailHook.js new file mode 100644 index 0000000..e6c356c --- /dev/null +++ b/node_modules/tapable/lib/AsyncParallelBailHook.js @@ -0,0 +1,87 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncParallelBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { + let code = ""; + code += `var _results = new Array(${this.options.taps.length});\n`; + code += "var _checkDone = function() {\n"; + code += "for(var i = 0; i < _results.length; i++) {\n"; + code += "var item = _results[i];\n"; + code += "if(item === undefined) return false;\n"; + code += "if(item.result !== undefined) {\n"; + code += onResult("item.result"); + code += "return true;\n"; + code += "}\n"; + code += "if(item.error) {\n"; + code += onError("item.error"); + code += "return true;\n"; + code += "}\n"; + code += "}\n"; + code += "return false;\n"; + code += "}\n"; + code += this.callTapsParallel({ + onError: (i, err, done, doneBreak) => { + let code = ""; + code += `if(${i} < _results.length && ((_results.length = ${ + i + 1 + }), (_results[${i}] = { error: ${err} }), _checkDone())) {\n`; + code += doneBreak(true); + code += "} else {\n"; + code += done(); + code += "}\n"; + return code; + }, + onResult: (i, result, done, doneBreak) => { + let code = ""; + code += `if(${i} < _results.length && (${result} !== undefined && (_results.length = ${ + i + 1 + }), (_results[${i}] = { result: ${result} }), _checkDone())) {\n`; + code += doneBreak(true); + code += "} else {\n"; + code += done(); + code += "}\n"; + return code; + }, + onTap: (i, run, done, doneBreak) => { + let code = ""; + if (i > 0) { + code += `if(${i} >= _results.length) {\n`; + code += done(); + code += "} else {\n"; + } + code += run(); + if (i > 0) code += "}\n"; + return code; + }, + onDone + }); + return code; + } +} + +const factory = new AsyncParallelBailHookCodeFactory(); + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncParallelBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncParallelBailHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncParallelBailHook.prototype = null; + +module.exports = AsyncParallelBailHook; diff --git a/node_modules/tapable/lib/AsyncParallelHook.js b/node_modules/tapable/lib/AsyncParallelHook.js new file mode 100644 index 0000000..833669b --- /dev/null +++ b/node_modules/tapable/lib/AsyncParallelHook.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncParallelHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsParallel({ + onError: (i, err, done, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncParallelHookCodeFactory(); + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncParallelHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncParallelHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncParallelHook.prototype = null; + +module.exports = AsyncParallelHook; diff --git a/node_modules/tapable/lib/AsyncSeriesBailHook.js b/node_modules/tapable/lib/AsyncSeriesBailHook.js new file mode 100644 index 0000000..6f2cfce --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesBailHook.js @@ -0,0 +1,42 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onResult: (i, result, next) => + `if(${result} !== undefined) {\n${onResult( + result + )}\n} else {\n${next()}}\n`, + resultReturns, + onDone + }); + } +} + +const factory = new AsyncSeriesBailHookCodeFactory(); + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesBailHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesBailHook.prototype = null; + +module.exports = AsyncSeriesBailHook; diff --git a/node_modules/tapable/lib/AsyncSeriesHook.js b/node_modules/tapable/lib/AsyncSeriesHook.js new file mode 100644 index 0000000..b0cd845 --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesHook.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncSeriesHookCodeFactory(); + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesHook.prototype = null; + +module.exports = AsyncSeriesHook; diff --git a/node_modules/tapable/lib/AsyncSeriesLoopHook.js b/node_modules/tapable/lib/AsyncSeriesLoopHook.js new file mode 100644 index 0000000..8d18fa5 --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesLoopHook.js @@ -0,0 +1,37 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone }) { + return this.callTapsLooping({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onDone + }); + } +} + +const factory = new AsyncSeriesLoopHookCodeFactory(); + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesLoopHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesLoopHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesLoopHook.prototype = null; + +module.exports = AsyncSeriesLoopHook; diff --git a/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js b/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js new file mode 100644 index 0000000..c67b14f --- /dev/null +++ b/node_modules/tapable/lib/AsyncSeriesWaterfallHook.js @@ -0,0 +1,47 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class AsyncSeriesWaterfallHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, onDone }) { + return this.callTapsSeries({ + onError: (i, err, next, doneBreak) => onError(err) + doneBreak(true), + onResult: (i, result, next) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += `${this._args[0]} = ${result};\n`; + code += `}\n`; + code += next(); + return code; + }, + onDone: () => onResult(this._args[0]) + }); + } +} + +const factory = new AsyncSeriesWaterfallHookCodeFactory(); + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function AsyncSeriesWaterfallHook(args = [], name = undefined) { + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + const hook = new Hook(args, name); + hook.constructor = AsyncSeriesWaterfallHook; + hook.compile = COMPILE; + hook._call = undefined; + hook.call = undefined; + return hook; +} + +AsyncSeriesWaterfallHook.prototype = null; + +module.exports = AsyncSeriesWaterfallHook; diff --git a/node_modules/tapable/lib/Hook.js b/node_modules/tapable/lib/Hook.js new file mode 100644 index 0000000..b3d5d21 --- /dev/null +++ b/node_modules/tapable/lib/Hook.js @@ -0,0 +1,177 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const util = require("util"); + +const deprecateContext = util.deprecate( + () => {}, + "Hook.context is deprecated and will be removed" +); + +const CALL_DELEGATE = function (...args) { + this.call = this._createCall("sync"); + return this.call(...args); +}; +const CALL_ASYNC_DELEGATE = function (...args) { + this.callAsync = this._createCall("async"); + return this.callAsync(...args); +}; +const PROMISE_DELEGATE = function (...args) { + this.promise = this._createCall("promise"); + return this.promise(...args); +}; + +class Hook { + constructor(args = [], name = undefined) { + this._args = args; + this.name = name; + this.taps = []; + this.interceptors = []; + this._call = CALL_DELEGATE; + this.call = CALL_DELEGATE; + this._callAsync = CALL_ASYNC_DELEGATE; + this.callAsync = CALL_ASYNC_DELEGATE; + this._promise = PROMISE_DELEGATE; + this.promise = PROMISE_DELEGATE; + this._x = undefined; + + this.compile = this.compile; + this.tap = this.tap; + this.tapAsync = this.tapAsync; + this.tapPromise = this.tapPromise; + } + + compile(options) { + throw new Error("Abstract: should be overridden"); + } + + _createCall(type) { + return this.compile({ + taps: this.taps, + interceptors: this.interceptors, + args: this._args, + type: type + }); + } + + _tap(type, options, fn) { + if (typeof options === "string") { + options = { + name: options.trim() + }; + } else if (typeof options !== "object" || options === null) { + throw new Error("Invalid tap options"); + } + if (typeof options.name !== "string" || options.name === "") { + throw new Error("Missing name for tap"); + } + if (typeof options.context !== "undefined") { + deprecateContext(); + } + options = Object.assign({ type, fn }, options); + options = this._runRegisterInterceptors(options); + this._insert(options); + } + + tap(options, fn) { + this._tap("sync", options, fn); + } + + tapAsync(options, fn) { + this._tap("async", options, fn); + } + + tapPromise(options, fn) { + this._tap("promise", options, fn); + } + + _runRegisterInterceptors(options) { + for (const interceptor of this.interceptors) { + if (interceptor.register) { + const newOptions = interceptor.register(options); + if (newOptions !== undefined) { + options = newOptions; + } + } + } + return options; + } + + withOptions(options) { + const mergeOptions = (opt) => + Object.assign({}, options, typeof opt === "string" ? { name: opt } : opt); + + return { + name: this.name, + tap: (opt, fn) => this.tap(mergeOptions(opt), fn), + tapAsync: (opt, fn) => this.tapAsync(mergeOptions(opt), fn), + tapPromise: (opt, fn) => this.tapPromise(mergeOptions(opt), fn), + intercept: (interceptor) => this.intercept(interceptor), + isUsed: () => this.isUsed(), + withOptions: (opt) => this.withOptions(mergeOptions(opt)) + }; + } + + isUsed() { + return this.taps.length > 0 || this.interceptors.length > 0; + } + + intercept(interceptor) { + this._resetCompilation(); + this.interceptors.push(Object.assign({}, interceptor)); + if (interceptor.register) { + for (let i = 0; i < this.taps.length; i++) { + this.taps[i] = interceptor.register(this.taps[i]); + } + } + } + + _resetCompilation() { + this.call = this._call; + this.callAsync = this._callAsync; + this.promise = this._promise; + } + + _insert(item) { + this._resetCompilation(); + let before; + if (typeof item.before === "string") { + before = new Set([item.before]); + } else if (Array.isArray(item.before)) { + before = new Set(item.before); + } + let stage = 0; + if (typeof item.stage === "number") { + stage = item.stage; + } + let i = this.taps.length; + while (i > 0) { + i--; + const x = this.taps[i]; + this.taps[i + 1] = x; + const xStage = x.stage || 0; + if (before) { + if (before.has(x.name)) { + before.delete(x.name); + continue; + } + if (before.size > 0) { + continue; + } + } + if (xStage > stage) { + continue; + } + i++; + break; + } + this.taps[i] = item; + } +} + +Object.setPrototypeOf(Hook.prototype, null); + +module.exports = Hook; diff --git a/node_modules/tapable/lib/HookCodeFactory.js b/node_modules/tapable/lib/HookCodeFactory.js new file mode 100644 index 0000000..771395c --- /dev/null +++ b/node_modules/tapable/lib/HookCodeFactory.js @@ -0,0 +1,468 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +class HookCodeFactory { + constructor(config) { + this.config = config; + this.options = undefined; + this._args = undefined; + } + + create(options) { + this.init(options); + let fn; + switch (this.options.type) { + case "sync": + fn = new Function( + this.args(), + '"use strict";\n' + + this.header() + + this.contentWithInterceptors({ + onError: (err) => `throw ${err};\n`, + onResult: (result) => `return ${result};\n`, + resultReturns: true, + onDone: () => "", + rethrowIfPossible: true + }) + ); + break; + case "async": + fn = new Function( + this.args({ + after: "_callback" + }), + '"use strict";\n' + + this.header() + + this.contentWithInterceptors({ + onError: (err) => `_callback(${err});\n`, + onResult: (result) => `_callback(null, ${result});\n`, + onDone: () => "_callback();\n" + }) + ); + break; + case "promise": + let errorHelperUsed = false; + const content = this.contentWithInterceptors({ + onError: (err) => { + errorHelperUsed = true; + return `_error(${err});\n`; + }, + onResult: (result) => `_resolve(${result});\n`, + onDone: () => "_resolve();\n" + }); + let code = ""; + code += '"use strict";\n'; + code += this.header(); + code += "return new Promise((function(_resolve, _reject) {\n"; + if (errorHelperUsed) { + code += "var _sync = true;\n"; + code += "function _error(_err) {\n"; + code += "if(_sync)\n"; + code += + "_resolve(Promise.resolve().then((function() { throw _err; })));\n"; + code += "else\n"; + code += "_reject(_err);\n"; + code += "};\n"; + } + code += content; + if (errorHelperUsed) { + code += "_sync = false;\n"; + } + code += "}));\n"; + fn = new Function(this.args(), code); + break; + } + this.deinit(); + return fn; + } + + setup(instance, options) { + instance._x = options.taps.map((t) => t.fn); + } + + /** + * @param {{ type: "sync" | "promise" | "async", taps: Array, interceptors: Array }} options + */ + init(options) { + this.options = options; + this._args = options.args.slice(); + } + + deinit() { + this.options = undefined; + this._args = undefined; + } + + contentWithInterceptors(options) { + if (this.options.interceptors.length > 0) { + const onError = options.onError; + const onResult = options.onResult; + const onDone = options.onDone; + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.call) { + code += `${this.getInterceptor(i)}.call(${this.args({ + before: interceptor.context ? "_context" : undefined + })});\n`; + } + } + code += this.content( + Object.assign(options, { + onError: + onError && + ((err) => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.error) { + code += `${this.getInterceptor(i)}.error(${err});\n`; + } + } + code += onError(err); + return code; + }), + onResult: + onResult && + ((result) => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.result) { + code += `${this.getInterceptor(i)}.result(${result});\n`; + } + } + code += onResult(result); + return code; + }), + onDone: + onDone && + (() => { + let code = ""; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.done) { + code += `${this.getInterceptor(i)}.done();\n`; + } + } + code += onDone(); + return code; + }) + }) + ); + return code; + } else { + return this.content(options); + } + } + + header() { + let code = ""; + if (this.needContext()) { + code += "var _context = {};\n"; + } else { + code += "var _context;\n"; + } + code += "var _x = this._x;\n"; + if (this.options.interceptors.length > 0) { + code += "var _taps = this.taps;\n"; + code += "var _interceptors = this.interceptors;\n"; + } + return code; + } + + needContext() { + for (const tap of this.options.taps) if (tap.context) return true; + return false; + } + + callTap(tapIndex, { onError, onResult, onDone, rethrowIfPossible }) { + let code = ""; + let hasTapCached = false; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.tap) { + if (!hasTapCached) { + code += `var _tap${tapIndex} = ${this.getTap(tapIndex)};\n`; + hasTapCached = true; + } + code += `${this.getInterceptor(i)}.tap(${ + interceptor.context ? "_context, " : "" + }_tap${tapIndex});\n`; + } + } + code += `var _fn${tapIndex} = ${this.getTapFn(tapIndex)};\n`; + const tap = this.options.taps[tapIndex]; + switch (tap.type) { + case "sync": + if (!rethrowIfPossible) { + code += `var _hasError${tapIndex} = false;\n`; + code += "try {\n"; + } + if (onResult) { + code += `var _result${tapIndex} = _fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + } else { + code += `_fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + } + if (!rethrowIfPossible) { + code += "} catch(_err) {\n"; + code += `_hasError${tapIndex} = true;\n`; + code += onError("_err"); + code += "}\n"; + code += `if(!_hasError${tapIndex}) {\n`; + } + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + if (!rethrowIfPossible) { + code += "}\n"; + } + break; + case "async": + let cbCode = ""; + if (onResult) + cbCode += `(function(_err${tapIndex}, _result${tapIndex}) {\n`; + else cbCode += `(function(_err${tapIndex}) {\n`; + cbCode += `if(_err${tapIndex}) {\n`; + cbCode += onError(`_err${tapIndex}`); + cbCode += "} else {\n"; + if (onResult) { + cbCode += onResult(`_result${tapIndex}`); + } + if (onDone) { + cbCode += onDone(); + } + cbCode += "}\n"; + cbCode += "})"; + code += `_fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined, + after: cbCode + })});\n`; + break; + case "promise": + code += `var _hasResult${tapIndex} = false;\n`; + code += `var _promise${tapIndex} = _fn${tapIndex}(${this.args({ + before: tap.context ? "_context" : undefined + })});\n`; + code += `if (!_promise${tapIndex} || !_promise${tapIndex}.then)\n`; + code += ` throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise${tapIndex} + ')');\n`; + code += `_promise${tapIndex}.then((function(_result${tapIndex}) {\n`; + code += `_hasResult${tapIndex} = true;\n`; + if (onResult) { + code += onResult(`_result${tapIndex}`); + } + if (onDone) { + code += onDone(); + } + code += `}), function(_err${tapIndex}) {\n`; + code += `if(_hasResult${tapIndex}) throw _err${tapIndex};\n`; + code += onError(`_err${tapIndex}`); + code += "});\n"; + break; + } + return code; + } + + callTapsSeries({ + onError, + onResult, + resultReturns, + onDone, + doneReturns, + rethrowIfPossible + }) { + if (this.options.taps.length === 0) return onDone(); + const firstAsync = this.options.taps.findIndex((t) => t.type !== "sync"); + const somethingReturns = resultReturns || doneReturns; + let code = ""; + let current = onDone; + let unrollCounter = 0; + for (let j = this.options.taps.length - 1; j >= 0; j--) { + const i = j; + const unroll = + current !== onDone && + (this.options.taps[i].type !== "sync" || unrollCounter++ > 20); + if (unroll) { + unrollCounter = 0; + code += `function _next${i}() {\n`; + code += current(); + code += `}\n`; + current = () => `${somethingReturns ? "return " : ""}_next${i}();\n`; + } + const done = current; + const doneBreak = (skipDone) => { + if (skipDone) return ""; + return onDone(); + }; + const content = this.callTap(i, { + onError: (error) => onError(i, error, done, doneBreak), + onResult: + onResult && + ((result) => { + return onResult(i, result, done, doneBreak); + }), + onDone: !onResult && done, + rethrowIfPossible: + rethrowIfPossible && (firstAsync < 0 || i < firstAsync) + }); + current = () => content; + } + code += current(); + return code; + } + + callTapsLooping({ onError, onDone, rethrowIfPossible }) { + if (this.options.taps.length === 0) return onDone(); + const syncOnly = this.options.taps.every((t) => t.type === "sync"); + let code = ""; + if (!syncOnly) { + code += "var _looper = (function() {\n"; + code += "var _loopAsync = false;\n"; + } + code += "var _loop;\n"; + code += "do {\n"; + code += "_loop = false;\n"; + for (let i = 0; i < this.options.interceptors.length; i++) { + const interceptor = this.options.interceptors[i]; + if (interceptor.loop) { + code += `${this.getInterceptor(i)}.loop(${this.args({ + before: interceptor.context ? "_context" : undefined + })});\n`; + } + } + code += this.callTapsSeries({ + onError, + onResult: (i, result, next, doneBreak) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += "_loop = true;\n"; + if (!syncOnly) code += "if(_loopAsync) _looper();\n"; + code += doneBreak(true); + code += `} else {\n`; + code += next(); + code += `}\n`; + return code; + }, + onDone: + onDone && + (() => { + let code = ""; + code += "if(!_loop) {\n"; + code += onDone(); + code += "}\n"; + return code; + }), + rethrowIfPossible: rethrowIfPossible && syncOnly + }); + code += "} while(_loop);\n"; + if (!syncOnly) { + code += "_loopAsync = true;\n"; + code += "});\n"; + code += "_looper();\n"; + } + return code; + } + + callTapsParallel({ + onError, + onResult, + onDone, + rethrowIfPossible, + onTap = (i, run) => run() + }) { + if (this.options.taps.length <= 1) { + return this.callTapsSeries({ + onError, + onResult, + onDone, + rethrowIfPossible + }); + } + let code = ""; + code += "do {\n"; + code += `var _counter = ${this.options.taps.length};\n`; + if (onDone) { + code += "var _done = (function() {\n"; + code += onDone(); + code += "});\n"; + } + for (let i = 0; i < this.options.taps.length; i++) { + const done = () => { + if (onDone) return "if(--_counter === 0) _done();\n"; + else return "--_counter;"; + }; + const doneBreak = (skipDone) => { + if (skipDone || !onDone) return "_counter = 0;\n"; + else return "_counter = 0;\n_done();\n"; + }; + code += "if(_counter <= 0) break;\n"; + code += onTap( + i, + () => + this.callTap(i, { + onError: (error) => { + let code = ""; + code += "if(_counter > 0) {\n"; + code += onError(i, error, done, doneBreak); + code += "}\n"; + return code; + }, + onResult: + onResult && + ((result) => { + let code = ""; + code += "if(_counter > 0) {\n"; + code += onResult(i, result, done, doneBreak); + code += "}\n"; + return code; + }), + onDone: + !onResult && + (() => { + return done(); + }), + rethrowIfPossible + }), + done, + doneBreak + ); + } + code += "} while(false);\n"; + return code; + } + + args({ before, after } = {}) { + let allArgs = this._args; + if (before) allArgs = [before].concat(allArgs); + if (after) allArgs = allArgs.concat(after); + if (allArgs.length === 0) { + return ""; + } else { + return allArgs.join(", "); + } + } + + getTapFn(idx) { + return `_x[${idx}]`; + } + + getTap(idx) { + return `_taps[${idx}]`; + } + + getInterceptor(idx) { + return `_interceptors[${idx}]`; + } +} + +module.exports = HookCodeFactory; diff --git a/node_modules/tapable/lib/HookMap.js b/node_modules/tapable/lib/HookMap.js new file mode 100644 index 0000000..d38be45 --- /dev/null +++ b/node_modules/tapable/lib/HookMap.js @@ -0,0 +1,61 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const util = require("util"); + +const defaultFactory = (key, hook) => hook; + +class HookMap { + constructor(factory, name = undefined) { + this._map = new Map(); + this.name = name; + this._factory = factory; + this._interceptors = []; + } + + get(key) { + return this._map.get(key); + } + + for(key) { + const hook = this.get(key); + if (hook !== undefined) { + return hook; + } + let newHook = this._factory(key); + const interceptors = this._interceptors; + for (let i = 0; i < interceptors.length; i++) { + newHook = interceptors[i].factory(key, newHook); + } + this._map.set(key, newHook); + return newHook; + } + + intercept(interceptor) { + this._interceptors.push( + Object.assign( + { + factory: defaultFactory + }, + interceptor + ) + ); + } +} + +HookMap.prototype.tap = util.deprecate(function (key, options, fn) { + return this.for(key).tap(options, fn); +}, "HookMap#tap(key,…) is deprecated. Use HookMap#for(key).tap(…) instead."); + +HookMap.prototype.tapAsync = util.deprecate(function (key, options, fn) { + return this.for(key).tapAsync(options, fn); +}, "HookMap#tapAsync(key,…) is deprecated. Use HookMap#for(key).tapAsync(…) instead."); + +HookMap.prototype.tapPromise = util.deprecate(function (key, options, fn) { + return this.for(key).tapPromise(options, fn); +}, "HookMap#tapPromise(key,…) is deprecated. Use HookMap#for(key).tapPromise(…) instead."); + +module.exports = HookMap; diff --git a/node_modules/tapable/lib/MultiHook.js b/node_modules/tapable/lib/MultiHook.js new file mode 100644 index 0000000..469b0de --- /dev/null +++ b/node_modules/tapable/lib/MultiHook.js @@ -0,0 +1,54 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); + +class MultiHook { + constructor(hooks, name = undefined) { + this.hooks = hooks; + this.name = name; + } + + tap(options, fn) { + for (const hook of this.hooks) { + hook.tap(options, fn); + } + } + + tapAsync(options, fn) { + for (const hook of this.hooks) { + hook.tapAsync(options, fn); + } + } + + tapPromise(options, fn) { + for (const hook of this.hooks) { + hook.tapPromise(options, fn); + } + } + + isUsed() { + for (const hook of this.hooks) { + if (hook.isUsed()) return true; + } + return false; + } + + intercept(interceptor) { + for (const hook of this.hooks) { + hook.intercept(interceptor); + } + } + + withOptions(options) { + return new MultiHook( + this.hooks.map((h) => h.withOptions(options)), + this.name + ); + } +} + +module.exports = MultiHook; diff --git a/node_modules/tapable/lib/SyncBailHook.js b/node_modules/tapable/lib/SyncBailHook.js new file mode 100644 index 0000000..7c0bd40 --- /dev/null +++ b/node_modules/tapable/lib/SyncBailHook.js @@ -0,0 +1,51 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncBailHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onResult: (i, result, next) => + `if(${result} !== undefined) {\n${onResult( + result + )};\n} else {\n${next()}}\n`, + resultReturns, + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncBailHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncBailHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncBailHook"); +}; + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncBailHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncBailHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncBailHook.prototype = null; + +module.exports = SyncBailHook; diff --git a/node_modules/tapable/lib/SyncHook.js b/node_modules/tapable/lib/SyncHook.js new file mode 100644 index 0000000..d7f11ab --- /dev/null +++ b/node_modules/tapable/lib/SyncHook.js @@ -0,0 +1,46 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncHook"); +}; + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncHook.prototype = null; + +module.exports = SyncHook; diff --git a/node_modules/tapable/lib/SyncLoopHook.js b/node_modules/tapable/lib/SyncLoopHook.js new file mode 100644 index 0000000..a451fa8 --- /dev/null +++ b/node_modules/tapable/lib/SyncLoopHook.js @@ -0,0 +1,46 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncLoopHookCodeFactory extends HookCodeFactory { + content({ onError, onDone, rethrowIfPossible }) { + return this.callTapsLooping({ + onError: (i, err) => onError(err), + onDone, + rethrowIfPossible + }); + } +} + +const factory = new SyncLoopHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncLoopHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncLoopHook"); +}; + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncLoopHook(args = [], name = undefined) { + const hook = new Hook(args, name); + hook.constructor = SyncLoopHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncLoopHook.prototype = null; + +module.exports = SyncLoopHook; diff --git a/node_modules/tapable/lib/SyncWaterfallHook.js b/node_modules/tapable/lib/SyncWaterfallHook.js new file mode 100644 index 0000000..3ed6842 --- /dev/null +++ b/node_modules/tapable/lib/SyncWaterfallHook.js @@ -0,0 +1,57 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const Hook = require("./Hook"); +const HookCodeFactory = require("./HookCodeFactory"); + +class SyncWaterfallHookCodeFactory extends HookCodeFactory { + content({ onError, onResult, resultReturns, rethrowIfPossible }) { + return this.callTapsSeries({ + onError: (i, err) => onError(err), + onResult: (i, result, next) => { + let code = ""; + code += `if(${result} !== undefined) {\n`; + code += `${this._args[0]} = ${result};\n`; + code += `}\n`; + code += next(); + return code; + }, + onDone: () => onResult(this._args[0]), + doneReturns: resultReturns, + rethrowIfPossible + }); + } +} + +const factory = new SyncWaterfallHookCodeFactory(); + +const TAP_ASYNC = () => { + throw new Error("tapAsync is not supported on a SyncWaterfallHook"); +}; + +const TAP_PROMISE = () => { + throw new Error("tapPromise is not supported on a SyncWaterfallHook"); +}; + +const COMPILE = function (options) { + factory.setup(this, options); + return factory.create(options); +}; + +function SyncWaterfallHook(args = [], name = undefined) { + if (args.length < 1) + throw new Error("Waterfall hooks must have at least one argument"); + const hook = new Hook(args, name); + hook.constructor = SyncWaterfallHook; + hook.tapAsync = TAP_ASYNC; + hook.tapPromise = TAP_PROMISE; + hook.compile = COMPILE; + return hook; +} + +SyncWaterfallHook.prototype = null; + +module.exports = SyncWaterfallHook; diff --git a/node_modules/tapable/lib/index.js b/node_modules/tapable/lib/index.js new file mode 100644 index 0000000..0a94a53 --- /dev/null +++ b/node_modules/tapable/lib/index.js @@ -0,0 +1,19 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +exports.__esModule = true; +exports.SyncHook = require("./SyncHook"); +exports.SyncBailHook = require("./SyncBailHook"); +exports.SyncWaterfallHook = require("./SyncWaterfallHook"); +exports.SyncLoopHook = require("./SyncLoopHook"); +exports.AsyncParallelHook = require("./AsyncParallelHook"); +exports.AsyncParallelBailHook = require("./AsyncParallelBailHook"); +exports.AsyncSeriesHook = require("./AsyncSeriesHook"); +exports.AsyncSeriesBailHook = require("./AsyncSeriesBailHook"); +exports.AsyncSeriesLoopHook = require("./AsyncSeriesLoopHook"); +exports.AsyncSeriesWaterfallHook = require("./AsyncSeriesWaterfallHook"); +exports.HookMap = require("./HookMap"); +exports.MultiHook = require("./MultiHook"); diff --git a/node_modules/tapable/lib/util-browser.js b/node_modules/tapable/lib/util-browser.js new file mode 100644 index 0000000..7490e7a --- /dev/null +++ b/node_modules/tapable/lib/util-browser.js @@ -0,0 +1,16 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +exports.deprecate = (fn, msg) => { + let once = true; + return function () { + if (once) { + console.warn("DeprecationWarning: " + msg); + once = false; + } + return fn.apply(this, arguments); + }; +}; diff --git a/node_modules/tapable/package.json b/node_modules/tapable/package.json new file mode 100644 index 0000000..83b52e7 --- /dev/null +++ b/node_modules/tapable/package.json @@ -0,0 +1,41 @@ +{ + "name": "tapable", + "version": "2.2.2", + "author": "Tobias Koppers @sokra", + "description": "Just a little module for plugins.", + "license": "MIT", + "homepage": "https://github.com/webpack/tapable", + "repository": { + "type": "git", + "url": "http://github.com/webpack/tapable.git" + }, + "devDependencies": { + "@babel/core": "^7.4.4", + "@babel/preset-env": "^7.4.4", + "babel-jest": "^24.8.0", + "jest": "^24.8.0", + "prettier": "^3.5.3", + "prettier-1": "npm:prettier@^1" + }, + "engines": { + "node": ">=6" + }, + "files": ["lib", "!lib/__tests__", "tapable.d.ts"], + "main": "lib/index.js", + "types": "./tapable.d.ts", + "browser": { + "util": "./lib/util-browser.js" + }, + "scripts": { + "lint": "yarn fmt:check", + "fmt": "yarn fmt:base --log-level warn --write", + "fmt:check": "yarn fmt:base --check", + "fmt:base": "node node_modules/prettier/bin/prettier.cjs --cache --ignore-unknown .", + "test": "jest" + }, + "jest": { + "transform": { + "__tests__[\\\\/].+\\.js$": "babel-jest" + } + } +} diff --git a/node_modules/tapable/tapable.d.ts b/node_modules/tapable/tapable.d.ts new file mode 100644 index 0000000..b16e252 --- /dev/null +++ b/node_modules/tapable/tapable.d.ts @@ -0,0 +1,162 @@ +type FixedSizeArray = T extends 0 + ? void[] + : ReadonlyArray & { + 0: U; + length: T; + }; +type Measure = T extends 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 + ? T + : never; +type Append = { + 0: [U]; + 1: [T[0], U]; + 2: [T[0], T[1], U]; + 3: [T[0], T[1], T[2], U]; + 4: [T[0], T[1], T[2], T[3], U]; + 5: [T[0], T[1], T[2], T[3], T[4], U]; + 6: [T[0], T[1], T[2], T[3], T[4], T[5], U]; + 7: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], U]; + 8: [T[0], T[1], T[2], T[3], T[4], T[5], T[6], T[7], U]; +}[Measure]; +type AsArray = T extends any[] ? T : [T]; + +declare class UnsetAdditionalOptions { + _UnsetAdditionalOptions: true; +} +type IfSet = X extends UnsetAdditionalOptions ? {} : X; + +type Callback = (error: E | null, result?: T) => void; +type InnerCallback = (error?: E | null | false, result?: T) => void; + +type FullTap = Tap & { + type: "sync" | "async" | "promise"; + fn: Function; +}; + +type Tap = TapOptions & { + name: string; +}; + +type TapOptions = { + before?: string; + stage?: number; +}; + +interface HookInterceptor { + name?: string; + tap?: (tap: FullTap & IfSet) => void; + call?: (...args: any[]) => void; + loop?: (...args: any[]) => void; + error?: (err: Error) => void; + result?: (result: R) => void; + done?: () => void; + register?: ( + tap: FullTap & IfSet + ) => FullTap & IfSet; +} + +type ArgumentNames = FixedSizeArray; + +declare class Hook { + constructor(args?: ArgumentNames>, name?: string); + name: string | undefined; + interceptors: HookInterceptor[]; + taps: FullTap[]; + intercept(interceptor: HookInterceptor): void; + isUsed(): boolean; + callAsync(...args: Append, Callback>): void; + promise(...args: AsArray): Promise; + tap( + options: string | (Tap & IfSet), + fn: (...args: AsArray) => R + ): void; + withOptions( + options: TapOptions & IfSet + ): Omit; +} + +export class SyncHook< + T, + R = void, + AdditionalOptions = UnsetAdditionalOptions +> extends Hook { + call(...args: AsArray): R; +} + +export class SyncBailHook< + T, + R, + AdditionalOptions = UnsetAdditionalOptions +> extends SyncHook {} +export class SyncLoopHook< + T, + AdditionalOptions = UnsetAdditionalOptions +> extends SyncHook {} +export class SyncWaterfallHook< + T, + AdditionalOptions = UnsetAdditionalOptions +> extends SyncHook[0], AdditionalOptions> {} + +declare class AsyncHook< + T, + R, + AdditionalOptions = UnsetAdditionalOptions +> extends Hook { + tapAsync( + options: string | (Tap & IfSet), + fn: (...args: Append, InnerCallback>) => void + ): void; + tapPromise( + options: string | (Tap & IfSet), + fn: (...args: AsArray) => Promise + ): void; +} + +export class AsyncParallelHook< + T, + AdditionalOptions = UnsetAdditionalOptions +> extends AsyncHook {} +export class AsyncParallelBailHook< + T, + R, + AdditionalOptions = UnsetAdditionalOptions +> extends AsyncHook {} +export class AsyncSeriesHook< + T, + AdditionalOptions = UnsetAdditionalOptions +> extends AsyncHook {} +export class AsyncSeriesBailHook< + T, + R, + AdditionalOptions = UnsetAdditionalOptions +> extends AsyncHook {} +export class AsyncSeriesLoopHook< + T, + AdditionalOptions = UnsetAdditionalOptions +> extends AsyncHook {} +export class AsyncSeriesWaterfallHook< + T, + AdditionalOptions = UnsetAdditionalOptions +> extends AsyncHook[0], AdditionalOptions> {} + +type HookFactory = (key: any, hook?: H) => H; + +interface HookMapInterceptor { + factory?: HookFactory; +} + +export class HookMap { + constructor(factory: HookFactory, name?: string); + name: string | undefined; + get(key: any): H | undefined; + for(key: any): H; + intercept(interceptor: HookMapInterceptor): void; +} + +export class MultiHook { + constructor(hooks: H[], name?: string); + name: string | undefined; + tap(options: string | Tap, fn?: Function): void; + tapAsync(options: string | Tap, fn?: Function): void; + tapPromise(options: string | Tap, fn?: Function): void; +} diff --git a/node_modules/tar/LICENSE b/node_modules/tar/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/tar/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/tar/README.md b/node_modules/tar/README.md new file mode 100644 index 0000000..feb225c --- /dev/null +++ b/node_modules/tar/README.md @@ -0,0 +1,1105 @@ +# node-tar + +Fast and full-featured Tar for Node.js + +The API is designed to mimic the behavior of `tar(1)` on unix systems. +If you are familiar with how tar works, most of this will hopefully be +straightforward for you. If not, then hopefully this module can teach +you useful unix skills that may come in handy someday :) + +## Background + +A "tar file" or "tarball" is an archive of file system entries +(directories, files, links, etc.) The name comes from "tape archive". +If you run `man tar` on almost any Unix command line, you'll learn +quite a bit about what it can do, and its history. + +Tar has 5 main top-level commands: + +- `c` Create an archive +- `r` Replace entries within an archive +- `u` Update entries within an archive (ie, replace if they're newer) +- `t` List out the contents of an archive +- `x` Extract an archive to disk + +The other flags and options modify how this top level function works. + +## High-Level API + +These 5 functions are the high-level API. All of them have a +single-character name (for unix nerds familiar with `tar(1)`) as well +as a long name (for everyone else). + +All the high-level functions take the following arguments, all three +of which are optional and may be omitted. + +1. `options` - An optional object specifying various options +2. `paths` - An array of paths to add or extract +3. `callback` - Called when the command is completed, if async. (If + sync or no file specified, providing a callback throws a + `TypeError`.) + +If the command is sync (ie, if `options.sync=true`), then the +callback is not allowed, since the action will be completed immediately. + +If a `file` argument is specified, and the command is async, then a +`Promise` is returned. In this case, if async, a callback may be +provided which is called when the command is completed. + +If a `file` option is not specified, then a stream is returned. For +`create`, this is a readable stream of the generated archive. For +`list` and `extract` this is a writable stream that an archive should +be written into. If a file is not specified, then a callback is not +allowed, because you're already getting a stream to work with. + +`replace` and `update` only work on existing archives, and so require +a `file` argument. + +Sync commands without a file argument return a stream that acts on its +input immediately in the same tick. For readable streams, this means +that all of the data is immediately available by calling +`stream.read()`. For writable streams, it will be acted upon as soon +as it is provided, but this can be at any time. + +### Warnings and Errors + +Tar emits warnings and errors for recoverable and unrecoverable situations, +respectively. In many cases, a warning only affects a single entry in an +archive, or is simply informing you that it's modifying an entry to comply +with the settings provided. + +Unrecoverable warnings will always raise an error (ie, emit `'error'` on +streaming actions, throw for non-streaming sync actions, reject the +returned Promise for non-streaming async operations, or call a provided +callback with an `Error` as the first argument). Recoverable errors will +raise an error only if `strict: true` is set in the options. + +Respond to (recoverable) warnings by listening to the `warn` event. +Handlers receive 3 arguments: + +- `code` String. One of the error codes below. This may not match + `data.code`, which preserves the original error code from fs and zlib. +- `message` String. More details about the error. +- `data` Metadata about the error. An `Error` object for errors raised by + fs and zlib. All fields are attached to errors raisd by tar. Typically + contains the following fields, as relevant: + - `tarCode` The tar error code. + - `code` Either the tar error code, or the error code set by the + underlying system. + - `file` The archive file being read or written. + - `cwd` Working directory for creation and extraction operations. + - `entry` The entry object (if it could be created) for `TAR_ENTRY_INFO`, + `TAR_ENTRY_INVALID`, and `TAR_ENTRY_ERROR` warnings. + - `header` The header object (if it could be created, and the entry could + not be created) for `TAR_ENTRY_INFO` and `TAR_ENTRY_INVALID` warnings. + - `recoverable` Boolean. If `false`, then the warning will emit an + `error`, even in non-strict mode. + +#### Error Codes + +- `TAR_ENTRY_INFO` An informative error indicating that an entry is being + modified, but otherwise processed normally. For example, removing `/` or + `C:\` from absolute paths if `preservePaths` is not set. + +- `TAR_ENTRY_INVALID` An indication that a given entry is not a valid tar + archive entry, and will be skipped. This occurs when: + + - a checksum fails, + - a `linkpath` is missing for a link type, or + - a `linkpath` is provided for a non-link type. + + If every entry in a parsed archive raises an `TAR_ENTRY_INVALID` error, + then the archive is presumed to be unrecoverably broken, and + `TAR_BAD_ARCHIVE` will be raised. + +- `TAR_ENTRY_ERROR` The entry appears to be a valid tar archive entry, but + encountered an error which prevented it from being unpacked. This occurs + when: + + - an unrecoverable fs error happens during unpacking, + - an entry is trying to extract into an excessively deep + location (by default, limited to 1024 subfolders), + - an entry has `..` in the path and `preservePaths` is not set, or + - an entry is extracting through a symbolic link, when `preservePaths` is + not set. + +- `TAR_ENTRY_UNSUPPORTED` An indication that a given entry is + a valid archive entry, but of a type that is unsupported, and so will be + skipped in archive creation or extracting. + +- `TAR_ABORT` When parsing gzipped-encoded archives, the parser will + abort the parse process raise a warning for any zlib errors encountered. + Aborts are considered unrecoverable for both parsing and unpacking. + +- `TAR_BAD_ARCHIVE` The archive file is totally hosed. This can happen for + a number of reasons, and always occurs at the end of a parse or extract: + + - An entry body was truncated before seeing the full number of bytes. + - The archive contained only invalid entries, indicating that it is + likely not an archive, or at least, not an archive this library can + parse. + + `TAR_BAD_ARCHIVE` is considered informative for parse operations, but + unrecoverable for extraction. Note that, if encountered at the end of an + extraction, tar WILL still have extracted as much it could from the + archive, so there may be some garbage files to clean up. + +Errors that occur deeper in the system (ie, either the filesystem or zlib) +will have their error codes left intact, and a `tarCode` matching one of +the above will be added to the warning metadata or the raised error object. + +Errors generated by tar will have one of the above codes set as the +`error.code` field as well, but since errors originating in zlib or fs will +have their original codes, it's better to read `error.tarCode` if you wish +to see how tar is handling the issue. + +### Examples + +The API mimics the `tar(1)` command line functionality, with aliases +for more human-readable option and function names. The goal is that +if you know how to use `tar(1)` in Unix, then you know how to use +`import('tar')` in JavaScript. + +To replicate `tar czf my-tarball.tgz files and folders`, you'd do: + +```js +import { create } from 'tar' +create( + { + gzip: , + file: 'my-tarball.tgz' + }, + ['some', 'files', 'and', 'folders'] +).then(_ => { .. tarball has been created .. }) +``` + +To replicate `tar cz files and folders > my-tarball.tgz`, you'd do: + +```js +// if you're familiar with the tar(1) cli flags, this can be nice +import * as tar from 'tar' +tar.c( + { + // 'z' is alias for 'gzip' option + z: + }, + ['some', 'files', 'and', 'folders'] +).pipe(fs.createWriteStream('my-tarball.tgz')) +``` + +To replicate `tar xf my-tarball.tgz` you'd do: + +```js +tar.x( // or `tar.extract` + { + // or `file:` + f: 'my-tarball.tgz' + } +).then(_=> { .. tarball has been dumped in cwd .. }) +``` + +To replicate `cat my-tarball.tgz | tar x -C some-dir --strip=1`: + +```js +fs.createReadStream('my-tarball.tgz').pipe( + tar.x({ + strip: 1, + C: 'some-dir', // alias for cwd:'some-dir', also ok + }), +) +``` + +To replicate `tar tf my-tarball.tgz`, do this: + +```js +tar.t({ + file: 'my-tarball.tgz', + onReadEntry: entry => { .. do whatever with it .. } +}) +``` + +For example, to just get the list of filenames from an archive: + +```js +const getEntryFilenames = async tarballFilename => { + const filenames = [] + await tar.t({ + file: tarballFilename, + onReadEntry: entry => filenames.push(entry.path), + }) + return filenames +} +``` + +To replicate `cat my-tarball.tgz | tar t` do: + +```js +fs.createReadStream('my-tarball.tgz') + .pipe(tar.t()) + .on('entry', entry => { .. do whatever with it .. }) +``` + +To do anything synchronous, add `sync: true` to the options. Note +that sync functions don't take a callback and don't return a promise. +When the function returns, it's already done. Sync methods without a +file argument return a sync stream, which flushes immediately. But, +of course, it still won't be done until you `.end()` it. + +```js +const getEntryFilenamesSync = tarballFilename => { + const filenames = [] + tar.t({ + file: tarballFilename, + onReadEntry: entry => filenames.push(entry.path), + sync: true, + }) + return filenames +} +``` + +To filter entries, add `filter: ` to the options. +Tar-creating methods call the filter with `filter(path, stat)`. +Tar-reading methods (including extraction) call the filter with +`filter(path, entry)`. The filter is called in the `this`-context of +the `Pack` or `Unpack` stream object. + +The arguments list to `tar t` and `tar x` specify a list of filenames +to extract or list, so they're equivalent to a filter that tests if +the file is in the list. + +For those who _aren't_ fans of tar's single-character command names: + +``` +tar.c === tar.create +tar.r === tar.replace (appends to archive, file is required) +tar.u === tar.update (appends if newer, file is required) +tar.x === tar.extract +tar.t === tar.list +``` + +Keep reading for all the command descriptions and options, as well as +the low-level API that they are built on. + +### tar.c(options, fileList, callback) [alias: tar.create] + +Create a tarball archive. + +The `fileList` is an array of paths to add to the tarball. Adding a +directory also adds its children recursively. + +An entry in `fileList` that starts with an `@` symbol is a tar archive +whose entries will be added. To add a file that starts with `@`, +prepend it with `./`. + +The following options are supported: + +- `file` Write the tarball archive to the specified filename. If this + is specified, then the callback will be fired when the file has been + written, and a promise will be returned that resolves when the file + is written. If a filename is not specified, then a Readable Stream + will be returned which will emit the file data. [Alias: `f`] +- `sync` Act synchronously. If this is set, then any provided file + will be fully written after the call to `tar.c`. If this is set, + and a file is not provided, then the resulting stream will already + have the data ready to `read` or `emit('data')` as soon as you + request it. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. [Alias: `C`] +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` [Alias: `z`] +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. [Alias: `P`] +- `mode` The mode to set on the created file archive +- `noDirRecurse` Do not recursively archive the contents of + directories. [Alias: `n`] +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. [Alias: `L`, `h`] +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + [Alias: `m`, `no-mtime`] +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +The following options are mostly internal, but can be modified in some +advanced use cases, such as re-using caches between runs. + +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `readdirCache` A Map object that caches calls to `readdir`. +- `jobs` A number specifying how many concurrent jobs to run. + Defaults to 4. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. + +### tar.x(options, fileList, callback) [alias: tar.extract] + +Extract a tarball archive. + +The `fileList` is an array of paths to extract from the tarball. If +no paths are provided, then all the entries are extracted. + +If the archive is gzipped, then tar will detect this and unzip it. + +Note that all directories that are created will be forced to be +writable, readable, and listable by their owner, to avoid cases where +a directory prevents extraction of child entries by virtue of its +mode. + +Most extraction errors will cause a `warn` event to be emitted. If +the `cwd` is missing, or not a directory, then the extraction will +fail completely. + +The following options are supported: + +- `cwd` Extract files relative to the specified directory. Defaults + to `process.cwd()`. If provided, this must exist and must be a + directory. [Alias: `C`] +- `file` The archive file to extract. If not specified, then a + Writable stream is returned where the archive data should be + written. [Alias: `f`] +- `sync` Create files and directories synchronously. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `filter` A function that gets called with `(path, entry)` for each + entry being unpacked. Return `true` to unpack the entry from the + archive, or `false` to skip it. +- `newer` Set to true to keep the existing file on disk if it's newer + than the file in the archive. [Alias: `keep-newer`, + `keep-newer-files`] +- `keep` Do not overwrite existing files. In particular, if a file + appears more than once in an archive, later copies will not + overwrite earlier copies. [Alias: `k`, `keep-existing`] +- `preservePaths` Allow absolute paths, paths containing `..`, and + extracting through symbolic links. By default, `/` is stripped from + absolute paths, `..` paths are not extracted, and any file whose + location would be modified by a symbolic link is not extracted. + [Alias: `P`] +- `unlink` Unlink files before creating them. Without this option, + tar overwrites existing files, which preserves existing hardlinks. + With this option, existing hardlinks will be broken, as will any + symlink that would affect the location of an extracted file. [Alias: + `U`] +- `strip` Remove the specified number of leading path elements. + Pathnames with fewer elements will be silently skipped. Note that + the pathname is edited after applying the filter, but before + security checks. [Alias: `strip-components`, `stripComponents`] +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `preserveOwner` If true, tar will set the `uid` and `gid` of + extracted entries to the `uid` and `gid` fields in the archive. + This defaults to true when run as root, and false otherwise. If + false, then files and directories will be set with the owner and + group of the user running the process. This is similar to `-p` in + `tar(1)`, but ACLs and other system-specific data is never unpacked + in this implementation, and modes are set by default already. + [Alias: `p`] +- `uid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified user id, regardless of the `uid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `gid` option. +- `gid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified group id, regardless of the `gid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `uid` option. +- `noMtime` Set to true to omit writing `mtime` value for extracted + entries. [Alias: `m`, `no-mtime`] +- `transform` Provide a function that takes an `entry` object, and + returns a stream, or any falsey value. If a stream is provided, + then that stream's data will be written instead of the contents of + the archive entry. If a falsey value is provided, then the entry is + written to disk as normal. (To exclude items from extraction, use + the `filter` option described above.) +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `chmod` Set to true to call `fs.chmod()` to ensure that the + extracted file matches the entry mode. This may necessitate a + call to the deprecated and thread-unsafe `process.umask()` + method to determine the default umask value, unless a + `processUmask` options is also provided. Otherwise tar will + extract with whatever mode is provided, and let the process + `umask` apply normally. +- `processUmask` Set to an explicit numeric value to avoid + calling `process.umask()` when `chmod: true` is set. +- `maxDepth` The maximum depth of subfolders to extract into. This + defaults to 1024. Anything deeper than the limit will raise a + warning and skip the entry. Set to `Infinity` to remove the + limitation. + +The following options are mostly internal, but can be modified in some +advanced use cases, such as re-using caches between runs. + +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `umask` Filter the modes of entries like `process.umask()`. +- `dmode` Default mode for directories +- `fmode` Default mode for files +- `dirCache` A Map object of which directories exist. +- `maxMetaEntrySize` The maximum size of meta entries that is + supported. Defaults to 1 MB. + +Note that using an asynchronous stream type with the `transform` +option will cause undefined behavior in sync extractions. +[MiniPass](http://npm.im/minipass)-based streams are designed for this +use case. + +### tar.t(options, fileList, callback) [alias: tar.list] + +List the contents of a tarball archive. + +The `fileList` is an array of paths to list from the tarball. If +no paths are provided, then all the entries are listed. + +If the archive is gzipped, then tar will detect this and unzip it. + +If the `file` option is _not_ provided, then returns an event emitter that +emits `entry` events with `tar.ReadEntry` objects. However, they don't +emit `'data'` or `'end'` events. (If you want to get actual readable +entries, use the `tar.Parse` class instead.) + +If a `file` option _is_ provided, then the return value will be a promise +that resolves when the file has been fully traversed in async mode, or +`undefined` if `sync: true` is set. Thus, you _must_ specify an `onReadEntry` +method in order to do anything useful with the data it parses. + +The following options are supported: + +- `file` The archive file to list. If not specified, then a + Writable stream is returned where the archive data should be + written. [Alias: `f`] +- `sync` Read the specified file synchronously. (This has no effect + when a file option isn't specified, because entries are emitted as + fast as they are parsed from the stream anyway.) +- `strict` Treat warnings as crash-worthy errors. Default false. +- `filter` A function that gets called with `(path, entry)` for each + entry being listed. Return `true` to emit the entry from the + archive, or `false` to skip it. +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. This is important for when `file` is set, + because there is no other way to do anything useful with this method. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noResume` By default, `entry` streams are resumed immediately after + the call to `onReadEntry`. Set `noResume: true` to suppress this + behavior. Note that by opting into this, the stream will never + complete until the entry data is consumed. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") + +### tar.u(options, fileList, callback) [alias: tar.update] + +Add files to an archive if they are newer than the entry already in +the tarball archive. + +The `fileList` is an array of paths to add to the tarball. Adding a +directory also adds its children recursively. + +An entry in `fileList` that starts with an `@` symbol is a tar archive +whose entries will be added. To add a file that starts with `@`, +prepend it with `./`. + +The following options are supported: + +- `file` Required. Write the tarball archive to the specified + filename. [Alias: `f`] +- `sync` Act synchronously. If this is set, then any provided file + will be fully written after the call to `tar.c`. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for adding entries to the + archive. Defaults to `process.cwd()`. [Alias: `C`] +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` [Alias: `z`] +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. [Alias: `P`] +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noDirRecurse` Do not recursively archive the contents of + directories. [Alias: `n`] +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. [Alias: `L`, `h`] +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + [Alias: `m`, `no-mtime`] +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +### tar.r(options, fileList, callback) [alias: tar.replace] + +Add files to an existing archive. Because later entries override +earlier entries, this effectively replaces any existing entries. + +The `fileList` is an array of paths to add to the tarball. Adding a +directory also adds its children recursively. + +An entry in `fileList` that starts with an `@` symbol is a tar archive +whose entries will be added. To add a file that starts with `@`, +prepend it with `./`. + +The following options are supported: + +- `file` Required. Write the tarball archive to the specified + filename. [Alias: `f`] +- `sync` Act synchronously. If this is set, then any provided file + will be fully written after the call to `tar.c`. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for adding entries to the + archive. Defaults to `process.cwd()`. [Alias: `C`] +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` [Alias: `z`] +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. [Alias: `P`] +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noDirRecurse` Do not recursively archive the contents of + directories. [Alias: `n`] +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. [Alias: `L`, `h`] +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + [Alias: `m`, `no-mtime`] +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +## Low-Level API + +### class Pack + +A readable tar stream. + +Has all the standard readable stream interface stuff. `'data'` and +`'end'` events, `read()` method, `pause()` and `resume()`, etc. + +#### constructor(options) + +The following options are supported: + +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `strict` Treat warnings as crash-worthy errors. Default false. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. +- `prefix` A path portion to prefix onto the entries in the archive. +- `gzip` Set to any truthy value to create a gzipped archive, or an + object with settings for `zlib.Gzip()` +- `filter` A function that gets called with `(path, stat)` for each + entry being added. Return `true` to add the entry to the archive, + or `false` to omit it. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `readdirCache` A Map object that caches calls to `readdir`. +- `jobs` A number specifying how many concurrent jobs to run. + Defaults to 4. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 16 MB. +- `noDirRecurse` Do not recursively archive the contents of + directories. +- `follow` Set to true to pack the targets of symbolic links. Without + this option, symbolic links are archived as such. +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. +- `mtime` Set to a `Date` object to force a specific `mtime` for + everything added to the archive. Overridden by `noMtime`. +- `onWriteEntry` Called with each `WriteEntry` or + `WriteEntrySync` that is created in the course of writing the + archive. + +#### add(path) + +Adds an entry to the archive. Returns the Pack stream. + +#### write(path) + +Adds an entry to the archive. Returns true if flushed. + +#### end() + +Finishes the archive. + +### class PackSync + +Synchronous version of `Pack`. + +### class Unpack + +A writable stream that unpacks a tar archive onto the file system. + +All the normal writable stream stuff is supported. `write()` and +`end()` methods, `'drain'` events, etc. + +Note that all directories that are created will be forced to be +writable, readable, and listable by their owner, to avoid cases where +a directory prevents extraction of child entries by virtue of its +mode. + +`'close'` is emitted when it's done writing stuff to the file system. + +Most unpack errors will cause a `warn` event to be emitted. If the +`cwd` is missing, or not a directory, then an error will be emitted. + +#### constructor(options) + +- `cwd` Extract files relative to the specified directory. Defaults + to `process.cwd()`. If provided, this must exist and must be a + directory. +- `filter` A function that gets called with `(path, entry)` for each + entry being unpacked. Return `true` to unpack the entry from the + archive, or `false` to skip it. +- `newer` Set to true to keep the existing file on disk if it's newer + than the file in the archive. +- `keep` Do not overwrite existing files. In particular, if a file + appears more than once in an archive, later copies will not + overwrite earlier copies. +- `preservePaths` Allow absolute paths, paths containing `..`, and + extracting through symbolic links. By default, `/` is stripped from + absolute paths, `..` paths are not extracted, and any file whose + location would be modified by a symbolic link is not extracted. +- `unlink` Unlink files before creating them. Without this option, + tar overwrites existing files, which preserves existing hardlinks. + With this option, existing hardlinks will be broken, as will any + symlink that would affect the location of an extracted file. +- `strip` Remove the specified number of leading path elements. + Pathnames with fewer elements will be silently skipped. Note that + the pathname is edited after applying the filter, but before + security checks. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `umask` Filter the modes of entries like `process.umask()`. +- `dmode` Default mode for directories +- `fmode` Default mode for files +- `dirCache` A Map object of which directories exist. +- `maxMetaEntrySize` The maximum size of meta entries that is + supported. Defaults to 1 MB. +- `preserveOwner` If true, tar will set the `uid` and `gid` of + extracted entries to the `uid` and `gid` fields in the archive. + This defaults to true when run as root, and false otherwise. If + false, then files and directories will be set with the owner and + group of the user running the process. This is similar to `-p` in + `tar(1)`, but ACLs and other system-specific data is never unpacked + in this implementation, and modes are set by default already. +- `win32` True if on a windows platform. Causes behavior where + filenames containing `<|>?` chars are converted to + windows-compatible values while being unpacked. +- `uid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified user id, regardless of the `uid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `gid` option. +- `gid` Set to a number to force ownership of all extracted files and + folders, and all implicitly created directories, to be owned by the + specified group id, regardless of the `gid` field in the archive. + Cannot be used along with `preserveOwner`. Requires also setting a + `uid` option. +- `noMtime` Set to true to omit writing `mtime` value for extracted + entries. +- `transform` Provide a function that takes an `entry` object, and + returns a stream, or any falsey value. If a stream is provided, + then that stream's data will be written instead of the contents of + the archive entry. If a falsey value is provided, then the entry is + written to disk as normal. (To exclude items from extraction, use + the `filter` option described above.) +- `strict` Treat warnings as crash-worthy errors. Default false. +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `chmod` Set to true to call `fs.chmod()` to ensure that the + extracted file matches the entry mode. This may necessitate a + call to the deprecated and thread-unsafe `process.umask()` + method to determine the default umask value, unless a + `processUmask` options is also provided. Otherwise tar will + extract with whatever mode is provided, and let the process + `umask` apply normally. +- `processUmask` Set to an explicit numeric value to avoid + calling `process.umask()` when `chmod: true` is set. +- `maxDepth` The maximum depth of subfolders to extract into. This + defaults to 1024. Anything deeper than the limit will raise a + warning and skip the entry. Set to `Infinity` to remove the + limitation. + +### class UnpackSync + +Synchronous version of `Unpack`. + +Note that using an asynchronous stream type with the `transform` +option will cause undefined behavior in sync unpack streams. +[MiniPass](http://npm.im/minipass)-based streams are designed for this +use case. + +### class tar.Parse + +A writable stream that parses a tar archive stream. All the standard +writable stream stuff is supported. + +If the archive is gzipped, then tar will detect this and unzip it. + +Emits `'entry'` events with `tar.ReadEntry` objects, which are +themselves readable streams that you can pipe wherever. + +Each `entry` will not emit until the one before it is flushed through, +so make sure to either consume the data (with `on('data', ...)` or +`.pipe(...)`) or throw it away with `.resume()` to keep the stream +flowing. + +#### constructor(options) + +Returns an event emitter that emits `entry` events with +`tar.ReadEntry` objects. + +The following options are supported: + +- `strict` Treat warnings as crash-worthy errors. Default false. +- `filter` A function that gets called with `(path, entry)` for each + entry being listed. Return `true` to emit the entry from the + archive, or `false` to skip it. +- `onReadEntry` A function that gets called with `(entry)` for each entry + that passes the filter. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") + +#### abort(error) + +Stop all parsing activities. This is called when there are zlib +errors. It also emits an unrecoverable warning with the error provided. + +### class tar.ReadEntry extends [MiniPass](http://npm.im/minipass) + +A representation of an entry that is being read out of a tar archive. + +It has the following fields: + +- `extended` The extended metadata object provided to the constructor. +- `globalExtended` The global extended metadata object provided to the + constructor. +- `remain` The number of bytes remaining to be written into the + stream. +- `blockRemain` The number of 512-byte blocks remaining to be written + into the stream. +- `ignore` Whether this entry should be ignored. +- `meta` True if this represents metadata about the next entry, false + if it represents a filesystem object. +- All the fields from the header, extended header, and global extended + header are added to the ReadEntry object. So it has `path`, `type`, + `size`, `mode`, and so on. + +#### constructor(header, extended, globalExtended) + +Create a new ReadEntry object with the specified header, extended +header, and global extended header values. + +### class tar.WriteEntry extends [MiniPass](http://npm.im/minipass) + +A representation of an entry that is being written from the file +system into a tar archive. + +Emits data for the Header, and for the Pax Extended Header if one is +required, as well as any body data. + +Creating a WriteEntry for a directory does not also create +WriteEntry objects for all of the directory contents. + +It has the following fields: + +- `path` The path field that will be written to the archive. By + default, this is also the path from the cwd to the file system + object. +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `myuid` If supported, the uid of the user running the current + process. +- `myuser` The `env.USER` string if set, or `''`. Set as the entry + `uname` field if the file's `uid` matches `this.myuid`. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 1 MB. +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. +- `absolute` The absolute path to the entry on the filesystem. By + default, this is `path.resolve(this.cwd, this.path)`, but it can be + overridden explicitly. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `win32` True if on a windows platform. Causes behavior where paths + replace `\` with `/` and filenames containing the windows-compatible + forms of `<|>?:` characters are converted to actual `<|>?:` characters + in the archive. +- `noPax` Suppress pax extended headers. Note that this means that + long paths and linkpaths will be truncated, and large or negative + numeric values may be interpreted incorrectly. +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + +#### constructor(path, options) + +`path` is the path of the entry as it is written in the archive. + +The following options are supported: + +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `maxReadSize` The maximum buffer size for `fs.read()` operations. + Defaults to 1 MB. +- `linkCache` A Map object containing the device and inode value for + any file whose nlink is > 1, to identify hard links. +- `statCache` A Map object that caches calls `lstat`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `cwd` The current working directory for creating the archive. + Defaults to `process.cwd()`. +- `absolute` The absolute path to the entry on the filesystem. By + default, this is `path.resolve(this.cwd, this.path)`, but it can be + overridden explicitly. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `win32` True if on a windows platform. Causes behavior where paths + replace `\` with `/`. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. +- `umask` Set to restrict the modes on the entries in the archive, + somewhat like how umask works on file creation. Defaults to + `process.umask()` on unix systems, or `0o22` on Windows. + +#### warn(message, data) + +If strict, emit an error with the provided message. + +Othewise, emit a `'warn'` event with the provided message and data. + +### class tar.WriteEntry.Sync + +Synchronous version of tar.WriteEntry + +### class tar.WriteEntry.Tar + +A version of tar.WriteEntry that gets its data from a tar.ReadEntry +instead of from the filesystem. + +#### constructor(readEntry, options) + +`readEntry` is the entry being read out of another archive. + +The following options are supported: + +- `portable` Omit metadata that is system-specific: `ctime`, `atime`, + `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and `nlink`. Note + that `mtime` is still included, because this is necessary for other + time-based operations. Additionally, `mode` is set to a "reasonable + default" for most unix systems, based on a `umask` value of `0o22`. +- `preservePaths` Allow absolute paths. By default, `/` is stripped + from absolute paths. +- `strict` Treat warnings as crash-worthy errors. Default false. +- `onwarn` A function that will get called with `(code, message, data)` for + any warnings encountered. (See "Warnings and Errors") +- `noMtime` Set to true to omit writing `mtime` values for entries. + Note that this prevents using other mtime-based features like + `tar.update` or the `keepNewer` option with the resulting tar archive. + +### class tar.Header + +A class for reading and writing header blocks. + +It has the following fields: + +- `nullBlock` True if decoding a block which is entirely composed of + `0x00` null bytes. (Useful because tar files are terminated by + at least 2 null blocks.) +- `cksumValid` True if the checksum in the header is valid, false + otherwise. +- `needPax` True if the values, as encoded, will require a Pax + extended header. +- `path` The path of the entry. +- `mode` The 4 lowest-order octal digits of the file mode. That is, + read/write/execute permissions for world, group, and owner, and the + setuid, setgid, and sticky bits. +- `uid` Numeric user id of the file owner +- `gid` Numeric group id of the file owner +- `size` Size of the file in bytes +- `mtime` Modified time of the file +- `cksum` The checksum of the header. This is generated by adding all + the bytes of the header block, treating the checksum field itself as + all ascii space characters (that is, `0x20`). +- `type` The human-readable name of the type of entry this represents, + or the alphanumeric key if unknown. +- `typeKey` The alphanumeric key for the type of entry this header + represents. +- `linkpath` The target of Link and SymbolicLink entries. +- `uname` Human-readable user name of the file owner +- `gname` Human-readable group name of the file owner +- `devmaj` The major portion of the device number. Always `0` for + files, directories, and links. +- `devmin` The minor portion of the device number. Always `0` for + files, directories, and links. +- `atime` File access time. +- `ctime` File change time. + +#### constructor(data, [offset=0]) + +`data` is optional. It is either a Buffer that should be interpreted +as a tar Header starting at the specified offset and continuing for +512 bytes, or a data object of keys and values to set on the header +object, and eventually encode as a tar Header. + +#### decode(block, offset) + +Decode the provided buffer starting at the specified offset. + +Buffer length must be greater than 512 bytes. + +#### set(data) + +Set the fields in the data object. + +#### encode(buffer, offset) + +Encode the header fields into the buffer at the specified offset. + +Returns `this.needPax` to indicate whether a Pax Extended Header is +required to properly encode the specified data. + +### class tar.Pax + +An object representing a set of key-value pairs in an Pax extended +header entry. + +It has the following fields. Where the same name is used, they have +the same semantics as the tar.Header field of the same name. + +- `global` True if this represents a global extended header, or false + if it is for a single entry. +- `atime` +- `charset` +- `comment` +- `ctime` +- `gid` +- `gname` +- `linkpath` +- `mtime` +- `path` +- `size` +- `uid` +- `uname` +- `dev` +- `ino` +- `nlink` + +#### constructor(object, global) + +Set the fields set in the object. `global` is a boolean that defaults +to false. + +#### encode() + +Return a Buffer containing the header and body for the Pax extended +header entry, or `null` if there is nothing to encode. + +#### encodeBody() + +Return a string representing the body of the pax extended header +entry. + +#### encodeField(fieldName) + +Return a string representing the key/value encoding for the specified +fieldName, or `''` if the field is unset. + +### tar.Pax.parse(string, extended, global) + +Return a new Pax object created by parsing the contents of the string +provided. + +If the `extended` object is set, then also add the fields from that +object. (This is necessary because multiple metadata entries can +occur in sequence.) + +### tar.types + +A translation table for the `type` field in tar headers. + +#### tar.types.name.get(code) + +Get the human-readable name for a given alphanumeric code. + +#### tar.types.code.get(name) + +Get the alphanumeric code for a given human-readable name. diff --git a/node_modules/tar/dist/commonjs/create.d.ts b/node_modules/tar/dist/commonjs/create.d.ts new file mode 100644 index 0000000..867c5e9 --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.d.ts @@ -0,0 +1,3 @@ +import { Pack, PackSync } from './pack.js'; +export declare const create: import("./make-command.js").TarCommand; +//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/create.d.ts.map b/node_modules/tar/dist/commonjs/create.d.ts.map new file mode 100644 index 0000000..82be947 --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA8E1C,eAAO,MAAM,MAAM,wDAUlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/create.js b/node_modules/tar/dist/commonjs/create.js new file mode 100644 index 0000000..3190afc --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.js @@ -0,0 +1,83 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.create = void 0; +const fs_minipass_1 = require("@isaacs/fs-minipass"); +const node_path_1 = __importDefault(require("node:path")); +const list_js_1 = require("./list.js"); +const make_command_js_1 = require("./make-command.js"); +const pack_js_1 = require("./pack.js"); +const createFileSync = (opt, files) => { + const p = new pack_js_1.PackSync(opt); + const stream = new fs_minipass_1.WriteStreamSync(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const createFile = (opt, files) => { + const p = new pack_js_1.Pack(opt); + const stream = new fs_minipass_1.WriteStream(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + const promise = new Promise((res, rej) => { + stream.on('error', rej); + stream.on('close', res); + p.on('error', rej); + }); + addFilesAsync(p, files); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + (0, list_js_1.list)({ + file: node_path_1.default.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await (0, list_js_1.list)({ + file: node_path_1.default.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => { + p.add(entry); + }, + }); + } + else { + p.add(file); + } + } + p.end(); +}; +const createSync = (opt, files) => { + const p = new pack_js_1.PackSync(opt); + addFilesSync(p, files); + return p; +}; +const createAsync = (opt, files) => { + const p = new pack_js_1.Pack(opt); + addFilesAsync(p, files); + return p; +}; +exports.create = (0, make_command_js_1.makeCommand)(createFileSync, createFile, createSync, createAsync, (_opt, files) => { + if (!files?.length) { + throw new TypeError('no paths specified to add to archive'); + } +}); +//# sourceMappingURL=create.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/create.js.map b/node_modules/tar/dist/commonjs/create.js.map new file mode 100644 index 0000000..6325273 --- /dev/null +++ b/node_modules/tar/dist/commonjs/create.js.map @@ -0,0 +1 @@ +{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAkE;AAElE,0DAA4B;AAC5B,uCAAgC;AAChC,uDAA+C;AAO/C,uCAA0C;AAE1C,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,KAAe,EAAE,EAAE;IAClE,MAAM,CAAC,GAAG,IAAI,kBAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,MAAM,MAAM,GAAG,IAAI,6BAAe,CAAC,GAAG,CAAC,IAAI,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,KAAK;KACxB,CAAC,CAAA;IACF,CAAC,CAAC,IAAI,CAAC,MAAsC,CAAC,CAAA;IAC9C,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAE,KAAe,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,IAAI,cAAI,CAAC,GAAG,CAAC,CAAA;IACvB,MAAM,MAAM,GAAG,IAAI,yBAAW,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,KAAK;KACxB,CAAC,CAAA;IACF,CAAC,CAAC,IAAI,CAAC,MAAsC,CAAC,CAAA;IAE9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC7C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;QACvB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;QACvB,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,CA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gBACd,WAAW,EAAE,KAAK,CAAC,EAAE;oBACnB,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBACd,CAAC;aACF,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACb,CAAC;IACH,CAAC;IACD,CAAC,CAAC,GAAG,EAAE,CAAA;AACT,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAE,KAAe,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,IAAI,kBAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACtB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAAe,EAAE,KAAe,EAAE,EAAE;IACvD,MAAM,CAAC,GAAG,IAAI,cAAI,CAAC,GAAG,CAAC,CAAA;IACvB,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACvB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAEY,QAAA,MAAM,GAAG,IAAA,6BAAW,EAC/B,cAAc,EACd,UAAU,EACV,UAAU,EACV,WAAW,EACX,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACd,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;QACnB,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport path from 'node:path'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSync,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\nconst createFileSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n const stream = new WriteStreamSync(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst createFile = (opt: TarOptionsFile, files: string[]) => {\n const p = new Pack(opt)\n const stream = new WriteStream(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n\n const promise = new Promise((res, rej) => {\n stream.on('error', rej)\n stream.on('close', res)\n p.on('error', rej)\n })\n\n addFilesAsync(p, files)\n\n return promise\n}\n\nconst addFilesSync = (p: PackSync, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => {\n p.add(entry)\n },\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nconst createSync = (opt: TarOptionsSync, files: string[]) => {\n const p = new PackSync(opt)\n addFilesSync(p, files)\n return p\n}\n\nconst createAsync = (opt: TarOptions, files: string[]) => {\n const p = new Pack(opt)\n addFilesAsync(p, files)\n return p\n}\n\nexport const create = makeCommand(\n createFileSync,\n createFile,\n createSync,\n createAsync,\n (_opt, files) => {\n if (!files?.length) {\n throw new TypeError('no paths specified to add to archive')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.d.ts b/node_modules/tar/dist/commonjs/cwd-error.d.ts new file mode 100644 index 0000000..16c6460 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.d.ts @@ -0,0 +1,8 @@ +export declare class CwdError extends Error { + path: string; + code: string; + syscall: 'chdir'; + constructor(path: string, code: string); + get name(): string; +} +//# sourceMappingURL=cwd-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.d.ts.map b/node_modules/tar/dist/commonjs/cwd-error.d.ts.map new file mode 100644 index 0000000..6b9a1a2 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.d.ts","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAU;gBAEd,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.js b/node_modules/tar/dist/commonjs/cwd-error.js new file mode 100644 index 0000000..d703a77 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CwdError = void 0; +class CwdError extends Error { + path; + code; + syscall = 'chdir'; + constructor(path, code) { + super(`${code}: Cannot cd into '${path}'`); + this.path = path; + this.code = code; + } + get name() { + return 'CwdError'; + } +} +exports.CwdError = CwdError; +//# sourceMappingURL=cwd-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/cwd-error.js.map b/node_modules/tar/dist/commonjs/cwd-error.js.map new file mode 100644 index 0000000..d189590 --- /dev/null +++ b/node_modules/tar/dist/commonjs/cwd-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.js","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,CAAQ;IACZ,IAAI,CAAQ;IACZ,OAAO,GAAY,OAAO,CAAA;IAE1B,YAAY,IAAY,EAAE,IAAY;QACpC,KAAK,CAAC,GAAG,IAAI,qBAAqB,IAAI,GAAG,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AAdD,4BAcC","sourcesContent":["export class CwdError extends Error {\n path: string\n code: string\n syscall: 'chdir' = 'chdir'\n\n constructor(path: string, code: string) {\n super(`${code}: Cannot cd into '${path}'`)\n this.path = path\n this.code = code\n }\n\n get name() {\n return 'CwdError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.d.ts b/node_modules/tar/dist/commonjs/extract.d.ts new file mode 100644 index 0000000..9cbb18c --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.d.ts @@ -0,0 +1,3 @@ +import { Unpack, UnpackSync } from './unpack.js'; +export declare const extract: import("./make-command.js").TarCommand; +//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.d.ts.map b/node_modules/tar/dist/commonjs/extract.d.ts.map new file mode 100644 index 0000000..31008e1 --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA2ChD,eAAO,MAAM,OAAO,4DAQnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.js b/node_modules/tar/dist/commonjs/extract.js new file mode 100644 index 0000000..f848cbc --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.js @@ -0,0 +1,78 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extract = void 0; +// tar -x +const fsm = __importStar(require("@isaacs/fs-minipass")); +const node_fs_1 = __importDefault(require("node:fs")); +const list_js_1 = require("./list.js"); +const make_command_js_1 = require("./make-command.js"); +const unpack_js_1 = require("./unpack.js"); +const extractFileSync = (opt) => { + const u = new unpack_js_1.UnpackSync(opt); + const file = opt.file; + const stat = node_fs_1.default.statSync(file); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const stream = new fsm.ReadStreamSync(file, { + readSize: readSize, + size: stat.size, + }); + stream.pipe(u); +}; +const extractFile = (opt, _) => { + const u = new unpack_js_1.Unpack(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + u.on('error', reject); + u.on('close', resolve); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + node_fs_1.default.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(u); + } + }); + }); + return p; +}; +exports.extract = (0, make_command_js_1.makeCommand)(extractFileSync, extractFile, opt => new unpack_js_1.UnpackSync(opt), opt => new unpack_js_1.Unpack(opt), (opt, files) => { + if (files?.length) + (0, list_js_1.filesFilter)(opt, files); +}); +//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/extract.js.map b/node_modules/tar/dist/commonjs/extract.js.map new file mode 100644 index 0000000..c3d7713 --- /dev/null +++ b/node_modules/tar/dist/commonjs/extract.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,yDAA0C;AAC1C,sDAAwB;AACxB,uCAAuC;AACvC,uDAA+C;AAE/C,2CAAgD;AAEhD,MAAM,eAAe,GAAG,CAAC,GAAuB,EAAE,EAAE;IAClD,MAAM,CAAC,GAAG,IAAI,sBAAU,CAAC,GAAG,CAAC,CAAA;IAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;IACrB,MAAM,IAAI,GAAG,iBAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC9B,oDAAoD;IACpD,4DAA4D;IAC5D,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;IACpD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE;QAC1C,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,CAAC,CAAA;IACF,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAAmB,EAAE,CAAY,EAAE,EAAE;IACxD,MAAM,CAAC,GAAG,IAAI,kBAAM,CAAC,GAAG,CAAC,CAAA;IACzB,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;IA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Command } from './make-command.js'\nimport { TarOptionsFile, TarOptionsSyncFile } from './options.js'\nimport { Unpack, UnpackSync } from './unpack.js'\n\nconst extractFileSync = (opt: TarOptionsSyncFile) => {\n const u = new UnpackSync(opt)\n const file = opt.file\n const stat = fs.statSync(file)\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n const stream = new fsm.ReadStreamSync(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.pipe(u)\n}\n\nconst extractFile = (opt: TarOptionsFile, _?: string[]) => {\n const u = new Unpack(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n u.on('error', reject)\n u.on('close', resolve)\n\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(u)\n }\n })\n })\n return p\n}\n\nexport const extract = makeCommand(\n extractFileSync,\n extractFile,\n opt => new UnpackSync(opt),\n opt => new Unpack(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.d.ts b/node_modules/tar/dist/commonjs/get-write-flag.d.ts new file mode 100644 index 0000000..d35ec71 --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.d.ts @@ -0,0 +1,2 @@ +export declare const getWriteFlag: (() => string) | ((size: number) => number | "w"); +//# sourceMappingURL=get-write-flag.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map b/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map new file mode 100644 index 0000000..79af1e1 --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.d.ts","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,2BAGd,MAAM,kBAAwC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.js b/node_modules/tar/dist/commonjs/get-write-flag.js new file mode 100644 index 0000000..94add8f --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.js @@ -0,0 +1,29 @@ +"use strict"; +// Get the appropriate flag to use for creating files +// We use fmap on Windows platforms for files less than +// 512kb. This is a fairly low limit, but avoids making +// things slower in some cases. Since most of what this +// library is used for is extracting tarballs of many +// relatively small files in npm packages and the like, +// it can be a big boost on Windows platforms. +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getWriteFlag = void 0; +const fs_1 = __importDefault(require("fs")); +const platform = process.env.__FAKE_PLATFORM__ || process.platform; +const isWindows = platform === 'win32'; +/* c8 ignore start */ +const { O_CREAT, O_TRUNC, O_WRONLY } = fs_1.default.constants; +const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || + fs_1.default.constants.UV_FS_O_FILEMAP || + 0; +/* c8 ignore stop */ +const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; +const fMapLimit = 512 * 1024; +const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; +exports.getWriteFlag = !fMapEnabled ? + () => 'w' + : (size) => (size < fMapLimit ? fMapFlag : 'w'); +//# sourceMappingURL=get-write-flag.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/get-write-flag.js.map b/node_modules/tar/dist/commonjs/get-write-flag.js.map new file mode 100644 index 0000000..91e47a0 --- /dev/null +++ b/node_modules/tar/dist/commonjs/get-write-flag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.js","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uDAAuD;AACvD,wDAAwD;AACxD,wDAAwD;AACxD,qDAAqD;AACrD,uDAAuD;AACvD,8CAA8C;;;;;;AAE9C,4CAAmB;AAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAClE,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAEtC,qBAAqB;AACrB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,YAAE,CAAC,SAAS,CAAA;AACnD,MAAM,eAAe,GACnB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC1C,YAAE,CAAC,SAAS,CAAC,eAAe;IAC5B,CAAC,CAAA;AACH,oBAAoB;AAEpB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,CAAC,eAAe,CAAA;AAClD,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAA;AAC5B,MAAM,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAClD,QAAA,YAAY,GACvB,CAAC,WAAW,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,GAAG;IACX,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA","sourcesContent":["// Get the appropriate flag to use for creating files\n// We use fmap on Windows platforms for files less than\n// 512kb. This is a fairly low limit, but avoids making\n// things slower in some cases. Since most of what this\n// library is used for is extracting tarballs of many\n// relatively small files in npm packages and the like,\n// it can be a big boost on Windows platforms.\n\nimport fs from 'fs'\n\nconst platform = process.env.__FAKE_PLATFORM__ || process.platform\nconst isWindows = platform === 'win32'\n\n/* c8 ignore start */\nconst { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants\nconst UV_FS_O_FILEMAP =\n Number(process.env.__FAKE_FS_O_FILENAME__) ||\n fs.constants.UV_FS_O_FILEMAP ||\n 0\n/* c8 ignore stop */\n\nconst fMapEnabled = isWindows && !!UV_FS_O_FILEMAP\nconst fMapLimit = 512 * 1024\nconst fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY\nexport const getWriteFlag =\n !fMapEnabled ?\n () => 'w'\n : (size: number) => (size < fMapLimit ? fMapFlag : 'w')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.d.ts b/node_modules/tar/dist/commonjs/header.d.ts new file mode 100644 index 0000000..2af2d8e --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.d.ts @@ -0,0 +1,54 @@ +/// +import type { EntryTypeCode, EntryTypeName } from './types.js'; +export type HeaderData = { + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + uname?: string; + gname?: string; + devmaj?: number; + devmin?: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + dev?: number; + ino?: number; + nlink?: number; +}; +export declare class Header implements HeaderData { + #private; + cksumValid: boolean; + needPax: boolean; + nullBlock: boolean; + block?: Buffer; + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + linkpath?: string; + uname?: string; + gname?: string; + devmaj: number; + devmin: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + constructor(data?: Buffer | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData); + decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData): void; + encode(buf?: Buffer, off?: number): boolean; + get type(): EntryTypeName; + get typeKey(): EntryTypeCode | 'Unsupported'; + set type(type: EntryTypeCode | EntryTypeName | 'Unsupported'); +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.d.ts.map b/node_modules/tar/dist/commonjs/header.d.ts.map new file mode 100644 index 0000000..7e49f29 --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG9D,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,aAAa,GAAG,aAAa,CAAA;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAIZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,qBAAa,MAAO,YAAW,UAAU;;IACvC,UAAU,EAAE,OAAO,CAAQ;IAC3B,OAAO,EAAE,OAAO,CAAQ;IACxB,SAAS,EAAE,OAAO,CAAQ;IAE1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAI;IAClB,MAAM,EAAE,MAAM,CAAI;IAClB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;gBAGd,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,EAC1B,GAAG,GAAE,MAAU,EACf,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IASlB,MAAM,CACJ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IAsGlB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU;IAwEpC,IAAI,IAAI,IAAI,aAAa,CAKxB;IAED,IAAI,OAAO,IAAI,aAAa,GAAG,aAAa,CAE3C;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,aAAa,EAS3D;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.js b/node_modules/tar/dist/commonjs/header.js new file mode 100644 index 0000000..b3a4803 --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.js @@ -0,0 +1,306 @@ +"use strict"; +// parse a 512-byte header block to a data object, or vice-versa +// encode returns `true` if a pax extended header is needed, because +// the data could not be faithfully encoded in a simple header. +// (Also, check header.needPax to see if it needs a pax header.) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Header = void 0; +const node_path_1 = require("node:path"); +const large = __importStar(require("./large-numbers.js")); +const types = __importStar(require("./types.js")); +class Header { + cksumValid = false; + needPax = false; + nullBlock = false; + block; + path; + mode; + uid; + gid; + size; + cksum; + #type = 'Unsupported'; + linkpath; + uname; + gname; + devmaj = 0; + devmin = 0; + atime; + ctime; + mtime; + charset; + comment; + constructor(data, off = 0, ex, gex) { + if (Buffer.isBuffer(data)) { + this.decode(data, off || 0, ex, gex); + } + else if (data) { + this.#slurp(data); + } + } + decode(buf, off, ex, gex) { + if (!off) { + off = 0; + } + if (!buf || !(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + this.path = decString(buf, off, 100); + this.mode = decNumber(buf, off + 100, 8); + this.uid = decNumber(buf, off + 108, 8); + this.gid = decNumber(buf, off + 116, 8); + this.size = decNumber(buf, off + 124, 12); + this.mtime = decDate(buf, off + 136, 12); + this.cksum = decNumber(buf, off + 148, 12); + // if we have extended or global extended headers, apply them now + // See https://github.com/npm/node-tar/pull/187 + // Apply global before local, so it overrides + if (gex) + this.#slurp(gex, true); + if (ex) + this.#slurp(ex); + // old tar versions marked dirs as a file with a trailing / + const t = decString(buf, off + 156, 1); + if (types.isCode(t)) { + this.#type = t || '0'; + } + if (this.#type === '0' && this.path.slice(-1) === '/') { + this.#type = '5'; + } + // tar implementations sometimes incorrectly put the stat(dir).size + // as the size in the tarball, even though Directory entries are + // not able to have any body at all. In the very rare chance that + // it actually DOES have a body, we weren't going to do anything with + // it anyway, and it'll just be a warning about an invalid header. + if (this.#type === '5') { + this.size = 0; + } + this.linkpath = decString(buf, off + 157, 100); + if (buf.subarray(off + 257, off + 265).toString() === + 'ustar\u000000') { + this.uname = decString(buf, off + 265, 32); + this.gname = decString(buf, off + 297, 32); + /* c8 ignore start */ + this.devmaj = decNumber(buf, off + 329, 8) ?? 0; + this.devmin = decNumber(buf, off + 337, 8) ?? 0; + /* c8 ignore stop */ + if (buf[off + 475] !== 0) { + // definitely a prefix, definitely >130 chars. + const prefix = decString(buf, off + 345, 155); + this.path = prefix + '/' + this.path; + } + else { + const prefix = decString(buf, off + 345, 130); + if (prefix) { + this.path = prefix + '/' + this.path; + } + this.atime = decDate(buf, off + 476, 12); + this.ctime = decDate(buf, off + 488, 12); + } + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksumValid = sum === this.cksum; + if (this.cksum === undefined && sum === 8 * 0x20) { + this.nullBlock = true; + } + } + #slurp(ex, gex = false) { + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex) || + (k === 'linkpath' && gex) || + k === 'global'); + }))); + } + encode(buf, off = 0) { + if (!buf) { + buf = this.block = Buffer.alloc(512); + } + if (this.#type === 'Unsupported') { + this.#type = '0'; + } + if (!(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + const prefixSize = this.ctime || this.atime ? 130 : 155; + const split = splitPrefix(this.path || '', prefixSize); + const path = split[0]; + const prefix = split[1]; + this.needPax = !!split[2]; + this.needPax = encString(buf, off, 100, path) || this.needPax; + this.needPax = + encNumber(buf, off + 100, 8, this.mode) || this.needPax; + this.needPax = + encNumber(buf, off + 108, 8, this.uid) || this.needPax; + this.needPax = + encNumber(buf, off + 116, 8, this.gid) || this.needPax; + this.needPax = + encNumber(buf, off + 124, 12, this.size) || this.needPax; + this.needPax = + encDate(buf, off + 136, 12, this.mtime) || this.needPax; + buf[off + 156] = this.#type.charCodeAt(0); + this.needPax = + encString(buf, off + 157, 100, this.linkpath) || this.needPax; + buf.write('ustar\u000000', off + 257, 8); + this.needPax = + encString(buf, off + 265, 32, this.uname) || this.needPax; + this.needPax = + encString(buf, off + 297, 32, this.gname) || this.needPax; + this.needPax = + encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; + this.needPax = + encNumber(buf, off + 337, 8, this.devmin) || this.needPax; + this.needPax = + encString(buf, off + 345, prefixSize, prefix) || this.needPax; + if (buf[off + 475] !== 0) { + this.needPax = + encString(buf, off + 345, 155, prefix) || this.needPax; + } + else { + this.needPax = + encString(buf, off + 345, 130, prefix) || this.needPax; + this.needPax = + encDate(buf, off + 476, 12, this.atime) || this.needPax; + this.needPax = + encDate(buf, off + 488, 12, this.ctime) || this.needPax; + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksum = sum; + encNumber(buf, off + 148, 8, this.cksum); + this.cksumValid = true; + return this.needPax; + } + get type() { + return (this.#type === 'Unsupported' ? + this.#type + : types.name.get(this.#type)); + } + get typeKey() { + return this.#type; + } + set type(type) { + const c = String(types.code.get(type)); + if (types.isCode(c) || c === 'Unsupported') { + this.#type = c; + } + else if (types.isCode(type)) { + this.#type = type; + } + else { + throw new TypeError('invalid entry type: ' + type); + } + } +} +exports.Header = Header; +const splitPrefix = (p, prefixSize) => { + const pathSize = 100; + let pp = p; + let prefix = ''; + let ret = undefined; + const root = node_path_1.posix.parse(p).root || '.'; + if (Buffer.byteLength(pp) < pathSize) { + ret = [pp, prefix, false]; + } + else { + // first set prefix to the dir, and path to the base + prefix = node_path_1.posix.dirname(pp); + pp = node_path_1.posix.basename(pp); + do { + if (Buffer.byteLength(pp) <= pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // both fit! + ret = [pp, prefix, false]; + } + else if (Buffer.byteLength(pp) > pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // prefix fits in prefix, but path doesn't fit in path + ret = [pp.slice(0, pathSize - 1), prefix, true]; + } + else { + // make path take a bit from prefix + pp = node_path_1.posix.join(node_path_1.posix.basename(prefix), pp); + prefix = node_path_1.posix.dirname(prefix); + } + } while (prefix !== root && ret === undefined); + // at this point, found no resolution, just truncate + if (!ret) { + ret = [p.slice(0, pathSize - 1), '', true]; + } + } + return ret; +}; +const decString = (buf, off, size) => buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*/, ''); +const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); +const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000); +const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ? + large.parse(buf.subarray(off, off + size)) + : decSmallNumber(buf, off, size); +const nanUndef = (value) => (isNaN(value) ? undefined : value); +const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*$/, '') + .trim(), 8)); +// the maximum encodable as a null-terminated octal, by field size +const MAXNUM = { + 12: 0o77777777777, + 8: 0o7777777, +}; +const encNumber = (buf, off, size, num) => num === undefined ? false + : num > MAXNUM[size] || num < 0 ? + (large.encode(num, buf.subarray(off, off + size)), true) + : (encSmallNumber(buf, off, size, num), false); +const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii'); +const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); +const padOctal = (str, size) => (str.length === size - 1 ? + str + : new Array(size - str.length - 1).join('0') + str + ' ') + '\0'; +const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000)); +// enough to fill the longest string we've got +const NULLS = new Array(156).join('\0'); +// pad with nulls, return true if it's longer or non-ascii +const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'), + str.length !== Buffer.byteLength(str) || str.length > size)); +//# sourceMappingURL=header.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/header.js.map b/node_modules/tar/dist/commonjs/header.js.map new file mode 100644 index 0000000..708cbc9 --- /dev/null +++ b/node_modules/tar/dist/commonjs/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,oEAAoE;AACpE,+DAA+D;AAC/D,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhE,yCAA+C;AAC/C,0DAA2C;AAE3C,kDAAmC;AA4BnC,MAAa,MAAM;IACjB,UAAU,GAAY,KAAK,CAAA;IAC3B,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAY,KAAK,CAAA;IAE1B,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,IAAI,CAAS;IACb,KAAK,CAAS;IACd,KAAK,GAAkC,aAAa,CAAA;IACpD,QAAQ,CAAS;IACjB,KAAK,CAAS;IACd,KAAK,CAAS;IACd,MAAM,GAAW,CAAC,CAAA;IAClB,MAAM,GAAW,CAAC,CAAA;IAClB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IAEZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,YACE,IAA0B,EAC1B,MAAc,CAAC,EACf,EAAe,EACf,GAAgB;QAEhB,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC,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EH,8CAA8C;AAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,0DAA0D;AAC1D,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,GAAY,EACZ,EAAE,CACF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAC5D,CAAA","sourcesContent":["// parse a 512-byte header block to a data object, or vice-versa\n// encode returns `true` if a pax extended header is needed, because\n// the data could not be faithfully encoded in a simple header.\n// (Also, check header.needPax to see if it needs a pax header.)\n\nimport { posix as pathModule } from 'node:path'\nimport * as large from './large-numbers.js'\nimport type { EntryTypeCode, EntryTypeName } from './types.js'\nimport * as types from './types.js'\n\nexport type HeaderData = {\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj?: number\n devmin?: number\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n // fields that are common in extended PAX headers, but not in the\n // \"standard\" tar header block\n charset?: string\n comment?: string\n dev?: number\n ino?: number\n nlink?: number\n}\n\nexport class Header implements HeaderData {\n cksumValid: boolean = false\n needPax: boolean = false\n nullBlock: boolean = false\n\n block?: Buffer\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n #type: EntryTypeCode | 'Unsupported' = 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj: number = 0\n devmin: number = 0\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n charset?: string\n comment?: string\n\n constructor(\n data?: Buffer | HeaderData,\n off: number = 0,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (Buffer.isBuffer(data)) {\n this.decode(data, off || 0, ex, gex)\n } else if (data) {\n this.#slurp(data)\n }\n }\n\n decode(\n buf: Buffer,\n off: number,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (!off) {\n off = 0\n }\n\n if (!buf || !(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n this.path = decString(buf, off, 100)\n this.mode = decNumber(buf, off + 100, 8)\n this.uid = decNumber(buf, off + 108, 8)\n this.gid = decNumber(buf, off + 116, 8)\n this.size = decNumber(buf, off + 124, 12)\n this.mtime = decDate(buf, off + 136, 12)\n this.cksum = decNumber(buf, off + 148, 12)\n\n // if we have extended or global extended headers, apply them now\n // See https://github.com/npm/node-tar/pull/187\n // Apply global before local, so it overrides\n if (gex) this.#slurp(gex, true)\n if (ex) this.#slurp(ex)\n\n // old tar versions marked dirs as a file with a trailing /\n const t = decString(buf, off + 156, 1)\n if (types.isCode(t)) {\n this.#type = t || '0'\n }\n if (this.#type === '0' && this.path.slice(-1) === '/') {\n this.#type = '5'\n }\n\n // tar implementations sometimes incorrectly put the stat(dir).size\n // as the size in the tarball, even though Directory entries are\n // not able to have any body at all. In the very rare chance that\n // it actually DOES have a body, we weren't going to do anything with\n // it anyway, and it'll just be a warning about an invalid header.\n if (this.#type === '5') {\n this.size = 0\n }\n\n this.linkpath = decString(buf, off + 157, 100)\n if (\n buf.subarray(off + 257, off + 265).toString() ===\n 'ustar\\u000000'\n ) {\n this.uname = decString(buf, off + 265, 32)\n this.gname = decString(buf, off + 297, 32)\n /* c8 ignore start */\n this.devmaj = decNumber(buf, off + 329, 8) ?? 0\n this.devmin = decNumber(buf, off + 337, 8) ?? 0\n /* c8 ignore stop */\n if (buf[off + 475] !== 0) {\n // definitely a prefix, definitely >130 chars.\n const prefix = decString(buf, off + 345, 155)\n this.path = prefix + '/' + this.path\n } else {\n const prefix = decString(buf, off + 345, 130)\n if (prefix) {\n this.path = prefix + '/' + this.path\n }\n this.atime = decDate(buf, off + 476, 12)\n this.ctime = decDate(buf, off + 488, 12)\n }\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksumValid = sum === this.cksum\n if (this.cksum === undefined && sum === 8 * 0x20) {\n this.nullBlock = true\n }\n }\n\n #slurp(ex: HeaderData, gex: boolean = false) {\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex) ||\n (k === 'linkpath' && gex) ||\n k === 'global'\n )\n }),\n ),\n )\n }\n\n encode(buf?: Buffer, off: number = 0) {\n if (!buf) {\n buf = this.block = Buffer.alloc(512)\n }\n\n if (this.#type === 'Unsupported') {\n this.#type = '0'\n }\n\n if (!(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n const prefixSize = this.ctime || this.atime ? 130 : 155\n const split = splitPrefix(this.path || '', prefixSize)\n const path = split[0]\n const prefix = split[1]\n this.needPax = !!split[2]\n\n this.needPax = encString(buf, off, 100, path) || this.needPax\n this.needPax =\n encNumber(buf, off + 100, 8, this.mode) || this.needPax\n this.needPax =\n encNumber(buf, off + 108, 8, this.uid) || this.needPax\n this.needPax =\n encNumber(buf, off + 116, 8, this.gid) || this.needPax\n this.needPax =\n encNumber(buf, off + 124, 12, this.size) || this.needPax\n this.needPax =\n encDate(buf, off + 136, 12, this.mtime) || this.needPax\n buf[off + 156] = this.#type.charCodeAt(0)\n this.needPax =\n encString(buf, off + 157, 100, this.linkpath) || this.needPax\n buf.write('ustar\\u000000', off + 257, 8)\n this.needPax =\n encString(buf, off + 265, 32, this.uname) || this.needPax\n this.needPax =\n encString(buf, off + 297, 32, this.gname) || this.needPax\n this.needPax =\n encNumber(buf, off + 329, 8, this.devmaj) || this.needPax\n this.needPax =\n encNumber(buf, off + 337, 8, this.devmin) || this.needPax\n this.needPax =\n encString(buf, off + 345, prefixSize, prefix) || this.needPax\n if (buf[off + 475] !== 0) {\n this.needPax =\n encString(buf, off + 345, 155, prefix) || this.needPax\n } else {\n this.needPax =\n encString(buf, off + 345, 130, prefix) || this.needPax\n this.needPax =\n encDate(buf, off + 476, 12, this.atime) || this.needPax\n this.needPax =\n encDate(buf, off + 488, 12, this.ctime) || this.needPax\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksum = sum\n encNumber(buf, off + 148, 8, this.cksum)\n this.cksumValid = true\n\n return this.needPax\n }\n\n get type(): EntryTypeName {\n return (\n this.#type === 'Unsupported' ?\n this.#type\n : types.name.get(this.#type)) as EntryTypeName\n }\n\n get typeKey(): EntryTypeCode | 'Unsupported' {\n return this.#type\n }\n\n set type(type: EntryTypeCode | EntryTypeName | 'Unsupported') {\n const c = String(types.code.get(type as EntryTypeName))\n if (types.isCode(c) || c === 'Unsupported') {\n this.#type = c\n } else if (types.isCode(type)) {\n this.#type = type\n } else {\n throw new TypeError('invalid entry type: ' + type)\n }\n }\n}\n\nconst splitPrefix = (\n p: string,\n prefixSize: number,\n): [string, string, boolean] => {\n const pathSize = 100\n let pp = p\n let prefix = ''\n let ret: undefined | [string, string, boolean] = undefined\n const root = pathModule.parse(p).root || '.'\n\n if (Buffer.byteLength(pp) < pathSize) {\n ret = [pp, prefix, false]\n } else {\n // first set prefix to the dir, and path to the base\n prefix = pathModule.dirname(pp)\n pp = pathModule.basename(pp)\n\n do {\n if (\n Buffer.byteLength(pp) <= pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // both fit!\n ret = [pp, prefix, false]\n } else if (\n Buffer.byteLength(pp) > pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // prefix fits in prefix, but path doesn't fit in path\n ret = [pp.slice(0, pathSize - 1), prefix, true]\n } else {\n // make path take a bit from prefix\n pp = pathModule.join(pathModule.basename(prefix), pp)\n prefix = pathModule.dirname(prefix)\n }\n } while (prefix !== root && ret === undefined)\n\n // at this point, found no resolution, just truncate\n if (!ret) {\n ret = [p.slice(0, pathSize - 1), '', true]\n }\n }\n return ret\n}\n\nconst decString = (buf: Buffer, off: number, size: number) =>\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*/, '')\n\nconst decDate = (buf: Buffer, off: number, size: number) =>\n numToDate(decNumber(buf, off, size))\n\nconst numToDate = (num?: number) =>\n num === undefined ? undefined : new Date(num * 1000)\n\nconst decNumber = (buf: Buffer, off: number, size: number) =>\n Number(buf[off]) & 0x80 ?\n large.parse(buf.subarray(off, off + size))\n : decSmallNumber(buf, off, size)\n\nconst nanUndef = (value: number) => (isNaN(value) ? undefined : value)\n\nconst decSmallNumber = (buf: Buffer, off: number, size: number) =>\n nanUndef(\n parseInt(\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*$/, '')\n .trim(),\n 8,\n ),\n )\n\n// the maximum encodable as a null-terminated octal, by field size\nconst MAXNUM = {\n 12: 0o77777777777,\n 8: 0o7777777,\n}\n\nconst encNumber = (\n buf: Buffer,\n off: number,\n size: 12 | 8,\n num?: number,\n) =>\n num === undefined ? false\n : num > MAXNUM[size] || num < 0 ?\n (large.encode(num, buf.subarray(off, off + size)), true)\n : (encSmallNumber(buf, off, size, num), false)\n\nconst encSmallNumber = (\n buf: Buffer,\n off: number,\n size: number,\n num: number,\n) => buf.write(octalString(num, size), off, size, 'ascii')\n\nconst octalString = (num: number, size: number) =>\n padOctal(Math.floor(num).toString(8), size)\n\nconst padOctal = (str: string, size: number) =>\n (str.length === size - 1 ?\n str\n : new Array(size - str.length - 1).join('0') + str + ' ') + '\\0'\n\nconst encDate = (\n buf: Buffer,\n off: number,\n size: 8 | 12,\n date?: Date,\n) =>\n date === undefined ? false : (\n encNumber(buf, off, size, date.getTime() / 1000)\n )\n\n// enough to fill the longest string we've got\nconst NULLS = new Array(156).join('\\0')\n// pad with nulls, return true if it's longer or non-ascii\nconst encString = (\n buf: Buffer,\n off: number,\n size: number,\n str?: string,\n) =>\n str === undefined ? false : (\n (buf.write(str + NULLS, off, size, 'utf8'),\n str.length !== Buffer.byteLength(str) || str.length > size)\n )\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.d.ts b/node_modules/tar/dist/commonjs/index.d.ts new file mode 100644 index 0000000..a582123 --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.d.ts @@ -0,0 +1,20 @@ +export { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js'; +export * from './create.js'; +export { create as c } from './create.js'; +export * from './extract.js'; +export { extract as x } from './extract.js'; +export * from './header.js'; +export * from './list.js'; +export { list as t } from './list.js'; +export * from './pack.js'; +export * from './parse.js'; +export * from './pax.js'; +export * from './read-entry.js'; +export * from './replace.js'; +export { replace as r } from './replace.js'; +export * as types from './types.js'; +export * from './unpack.js'; +export * from './update.js'; +export { update as u } from './update.js'; +export * from './write-entry.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.d.ts.map b/node_modules/tar/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..71d3bed --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAErC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.js b/node_modules/tar/dist/commonjs/index.js new file mode 100644 index 0000000..e93ed5a --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.js @@ -0,0 +1,54 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.u = exports.types = exports.r = exports.t = exports.x = exports.c = void 0; +__exportStar(require("./create.js"), exports); +var create_js_1 = require("./create.js"); +Object.defineProperty(exports, "c", { enumerable: true, get: function () { return create_js_1.create; } }); +__exportStar(require("./extract.js"), exports); +var extract_js_1 = require("./extract.js"); +Object.defineProperty(exports, "x", { enumerable: true, get: function () { return extract_js_1.extract; } }); +__exportStar(require("./header.js"), exports); +__exportStar(require("./list.js"), exports); +var list_js_1 = require("./list.js"); +Object.defineProperty(exports, "t", { enumerable: true, get: function () { return list_js_1.list; } }); +// classes +__exportStar(require("./pack.js"), exports); +__exportStar(require("./parse.js"), exports); +__exportStar(require("./pax.js"), exports); +__exportStar(require("./read-entry.js"), exports); +__exportStar(require("./replace.js"), exports); +var replace_js_1 = require("./replace.js"); +Object.defineProperty(exports, "r", { enumerable: true, get: function () { return replace_js_1.replace; } }); +exports.types = __importStar(require("./types.js")); +__exportStar(require("./unpack.js"), exports); +__exportStar(require("./update.js"), exports); +var update_js_1 = require("./update.js"); +Object.defineProperty(exports, "u", { enumerable: true, get: function () { return update_js_1.update; } }); +__exportStar(require("./write-entry.js"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/index.js.map b/node_modules/tar/dist/commonjs/index.js.map new file mode 100644 index 0000000..6b9c814 --- /dev/null +++ b/node_modules/tar/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,8CAA2B;AAC3B,yCAAyC;AAAhC,8FAAA,MAAM,OAAK;AACpB,+CAA4B;AAC5B,2CAA2C;AAAlC,+FAAA,OAAO,OAAK;AACrB,8CAA2B;AAC3B,4CAAyB;AACzB,qCAAqC;AAA5B,4FAAA,IAAI,OAAK;AAClB,UAAU;AACV,4CAAyB;AACzB,6CAA0B;AAC1B,2CAAwB;AACxB,kDAA+B;AAC/B,+CAA4B;AAC5B,2CAA2C;AAAlC,+FAAA,OAAO,OAAK;AACrB,oDAAmC;AACnC,8CAA2B;AAC3B,8CAA2B;AAC3B,yCAAyC;AAAhC,8FAAA,MAAM,OAAK;AACpB,mDAAgC","sourcesContent":["export {\n type TarOptionsWithAliasesAsync,\n type TarOptionsWithAliasesAsyncFile,\n type TarOptionsWithAliasesAsyncNoFile,\n type TarOptionsWithAliasesSyncNoFile,\n type TarOptionsWithAliases,\n type TarOptionsWithAliasesFile,\n type TarOptionsWithAliasesSync,\n type TarOptionsWithAliasesSyncFile,\n} from './options.js'\n\nexport * from './create.js'\nexport { create as c } from './create.js'\nexport * from './extract.js'\nexport { extract as x } from './extract.js'\nexport * from './header.js'\nexport * from './list.js'\nexport { list as t } from './list.js'\n// classes\nexport * from './pack.js'\nexport * from './parse.js'\nexport * from './pax.js'\nexport * from './read-entry.js'\nexport * from './replace.js'\nexport { replace as r } from './replace.js'\nexport * as types from './types.js'\nexport * from './unpack.js'\nexport * from './update.js'\nexport { update as u } from './update.js'\nexport * from './write-entry.js'\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.d.ts b/node_modules/tar/dist/commonjs/large-numbers.d.ts new file mode 100644 index 0000000..b514d74 --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.d.ts @@ -0,0 +1,4 @@ +/// +export declare const encode: (num: number, buf: Buffer) => Buffer; +export declare const parse: (buf: Buffer) => number; +//# sourceMappingURL=large-numbers.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.d.ts.map b/node_modules/tar/dist/commonjs/large-numbers.d.ts.map new file mode 100644 index 0000000..6a6d97d --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.d.ts","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,MAAM,QAAS,MAAM,OAAO,MAAM,WAa9C,CAAA;AA6BD,eAAO,MAAM,KAAK,QAAS,MAAM,WAmBhC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.js b/node_modules/tar/dist/commonjs/large-numbers.js new file mode 100644 index 0000000..5b07aa7 --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.js @@ -0,0 +1,99 @@ +"use strict"; +// Tar can encode large and negative numbers using a leading byte of +// 0xff for negative, and 0x80 for positive. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parse = exports.encode = void 0; +const encode = (num, buf) => { + if (!Number.isSafeInteger(num)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('cannot encode number outside of javascript safe integer range'); + } + else if (num < 0) { + encodeNegative(num, buf); + } + else { + encodePositive(num, buf); + } + return buf; +}; +exports.encode = encode; +const encodePositive = (num, buf) => { + buf[0] = 0x80; + for (var i = buf.length; i > 1; i--) { + buf[i - 1] = num & 0xff; + num = Math.floor(num / 0x100); + } +}; +const encodeNegative = (num, buf) => { + buf[0] = 0xff; + var flipped = false; + num = num * -1; + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff; + num = Math.floor(num / 0x100); + if (flipped) { + buf[i - 1] = onesComp(byte); + } + else if (byte === 0) { + buf[i - 1] = 0; + } + else { + flipped = true; + buf[i - 1] = twosComp(byte); + } + } +}; +const parse = (buf) => { + const pre = buf[0]; + const value = pre === 0x80 ? pos(buf.subarray(1, buf.length)) + : pre === 0xff ? twos(buf) + : null; + if (value === null) { + throw Error('invalid base256 encoding'); + } + if (!Number.isSafeInteger(value)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('parsed number outside of javascript safe integer range'); + } + return value; +}; +exports.parse = parse; +const twos = (buf) => { + var len = buf.length; + var sum = 0; + var flipped = false; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + var f; + if (flipped) { + f = onesComp(byte); + } + else if (byte === 0) { + f = byte; + } + else { + flipped = true; + f = twosComp(byte); + } + if (f !== 0) { + sum -= f * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const pos = (buf) => { + var len = buf.length; + var sum = 0; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + if (byte !== 0) { + sum += byte * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const onesComp = (byte) => (0xff ^ byte) & 0xff; +const twosComp = (byte) => ((0xff ^ byte) + 1) & 0xff; +//# sourceMappingURL=large-numbers.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/large-numbers.js.map b/node_modules/tar/dist/commonjs/large-numbers.js.map new file mode 100644 index 0000000..31ddcd2 --- /dev/null +++ b/node_modules/tar/dist/commonjs/large-numbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.js","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,4CAA4C;;;AAErC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE;IACjD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/B,0EAA0E;QAC1E,aAAa;QACb,MAAM,KAAK,CACT,+DAA+D,CAChE,CAAA;IACH,CAAC;SAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;QACnB,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;IAC1B,CAAC;SAAM,CAAC;QACN,cA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,EAAE,CAAC;YACtB,CAAC,GAAG,IAAI,CAAA;QACV,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,IAAI,CAAA;YACd,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;QACpB,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACZ,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QACvC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,EAAE;IAC1B,IAAI,GAAG,GAAG,GAAG,CAAC,MAAM,CAAA;IACpB,IAAI,GAAG,GAAG,CAAC,CAAA;IACX,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACzB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACf,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;AAEvD,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA","sourcesContent":["// Tar can encode large and negative numbers using a leading byte of\n// 0xff for negative, and 0x80 for positive.\n\nexport const encode = (num: number, buf: Buffer) => {\n if (!Number.isSafeInteger(num)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'cannot encode number outside of javascript safe integer range',\n )\n } else if (num < 0) {\n encodeNegative(num, buf)\n } else {\n encodePositive(num, buf)\n }\n return buf\n}\n\nconst encodePositive = (num: number, buf: Buffer) => {\n buf[0] = 0x80\n\n for (var i = buf.length; i > 1; i--) {\n buf[i - 1] = num & 0xff\n num = Math.floor(num / 0x100)\n }\n}\n\nconst encodeNegative = (num: number, buf: Buffer) => {\n buf[0] = 0xff\n var flipped = false\n num = num * -1\n for (var i = buf.length; i > 1; i--) {\n var byte = num & 0xff\n num = Math.floor(num / 0x100)\n if (flipped) {\n buf[i - 1] = onesComp(byte)\n } else if (byte === 0) {\n buf[i - 1] = 0\n } else {\n flipped = true\n buf[i - 1] = twosComp(byte)\n }\n }\n}\n\nexport const parse = (buf: Buffer) => {\n const pre = buf[0]\n const value =\n pre === 0x80 ? pos(buf.subarray(1, buf.length))\n : pre === 0xff ? twos(buf)\n : null\n if (value === null) {\n throw Error('invalid base256 encoding')\n }\n\n if (!Number.isSafeInteger(value)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'parsed number outside of javascript safe integer range',\n )\n }\n\n return value\n}\n\nconst twos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n var flipped = false\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n var f\n if (flipped) {\n f = onesComp(byte)\n } else if (byte === 0) {\n f = byte\n } else {\n flipped = true\n f = twosComp(byte)\n }\n if (f !== 0) {\n sum -= f * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst pos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n if (byte !== 0) {\n sum += byte * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst onesComp = (byte: number) => (0xff ^ byte) & 0xff\n\nconst twosComp = (byte: number) => ((0xff ^ byte) + 1) & 0xff\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.d.ts b/node_modules/tar/dist/commonjs/list.d.ts new file mode 100644 index 0000000..890a11b --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.d.ts @@ -0,0 +1,7 @@ +import { TarOptions } from './options.js'; +import { Parser } from './parse.js'; +export declare const filesFilter: (opt: TarOptions, files: string[]) => void; +export declare const list: import("./make-command.js").TarCommand; +//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.d.ts.map b/node_modules/tar/dist/commonjs/list.d.ts.map new file mode 100644 index 0000000..b45ab2c --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAGX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAgBnC,eAAO,MAAM,WAAW,QAAS,UAAU,SAAS,MAAM,EAAE,SA4B3D,CAAA;AA4DD,eAAO,MAAM,IAAI;UAG4B,IAAI;EAMhD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.js b/node_modules/tar/dist/commonjs/list.js new file mode 100644 index 0000000..3cd34bb --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.js @@ -0,0 +1,136 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.list = exports.filesFilter = void 0; +// tar -t +const fsm = __importStar(require("@isaacs/fs-minipass")); +const node_fs_1 = __importDefault(require("node:fs")); +const path_1 = require("path"); +const make_command_js_1 = require("./make-command.js"); +const parse_js_1 = require("./parse.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const onReadEntryFunction = (opt) => { + const onReadEntry = opt.onReadEntry; + opt.onReadEntry = + onReadEntry ? + e => { + onReadEntry(e); + e.resume(); + } + : e => e.resume(); +}; +// construct a filter that limits the file entries listed +// include child entries if a dir is included +const filesFilter = (opt, files) => { + const map = new Map(files.map(f => [(0, strip_trailing_slashes_js_1.stripTrailingSlashes)(f), true])); + const filter = opt.filter; + const mapHas = (file, r = '') => { + const root = r || (0, path_1.parse)(file).root || '.'; + let ret; + if (file === root) + ret = false; + else { + const m = map.get(file); + if (m !== undefined) { + ret = m; + } + else { + ret = mapHas((0, path_1.dirname)(file), root); + } + } + map.set(file, ret); + return ret; + }; + opt.filter = + filter ? + (file, entry) => filter(file, entry) && mapHas((0, strip_trailing_slashes_js_1.stripTrailingSlashes)(file)) + : file => mapHas((0, strip_trailing_slashes_js_1.stripTrailingSlashes)(file)); +}; +exports.filesFilter = filesFilter; +const listFileSync = (opt) => { + const p = new parse_js_1.Parser(opt); + const file = opt.file; + let fd; + try { + const stat = node_fs_1.default.statSync(file); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + if (stat.size < readSize) { + p.end(node_fs_1.default.readFileSync(file)); + } + else { + let pos = 0; + const buf = Buffer.allocUnsafe(readSize); + fd = node_fs_1.default.openSync(file, 'r'); + while (pos < stat.size) { + const bytesRead = node_fs_1.default.readSync(fd, buf, 0, readSize, pos); + pos += bytesRead; + p.write(buf.subarray(0, bytesRead)); + } + p.end(); + } + } + finally { + if (typeof fd === 'number') { + try { + node_fs_1.default.closeSync(fd); + /* c8 ignore next */ + } + catch (er) { } + } + } +}; +const listFile = (opt, _files) => { + const parse = new parse_js_1.Parser(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + parse.on('error', reject); + parse.on('end', resolve); + node_fs_1.default.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(parse); + } + }); + }); + return p; +}; +exports.list = (0, make_command_js_1.makeCommand)(listFileSync, listFile, opt => new parse_js_1.Parser(opt), opt => new parse_js_1.Parser(opt), (opt, files) => { + if (files?.length) + (0, exports.filesFilter)(opt, files); + if (!opt.noResume) + onReadEntryFunction(opt); +}); +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/list.js.map b/node_modules/tar/dist/commonjs/list.js.map new file mode 100644 index 0000000..a056e1e --- /dev/null +++ b/node_modules/tar/dist/commonjs/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS;AACT,yDAA0C;AAC1C,sDAAwB;AACxB,+BAAqC;AACrC,uDAA+C;AAM/C,yCAAmC;AACnC,2EAAkE;AAElE,MAAM,mBAAmB,GAAG,CAAC,GAAe,EAAE,EAAE;IAC9C,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;IACnC,GAAG,CAAC,WAAW;QACb,WAAW,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;gBACF,WAAW,CAAC,CAAC,CAAC,CAAA;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AI,GAAG,IAAA,6BAAW,EAC7B,YAAY,EACZ,QAAQ,EACR,GAAG,CAAC,EAAE,CAAC,IAAI,iBAAM,CAAC,GAAG,CAA4B,EACjD,GAAG,CAAC,EAAE,CAAC,IAAI,iBAAM,CAAC,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,IAAA,mBAAW,EAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC1C,IAAI,CAAC,GAAG,CAAC,QAAQ;QAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;AAC7C,CAAC,CACF,CAAA","sourcesContent":["// tar -t\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { dirname, parse } from 'path'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Parser } from './parse.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst onReadEntryFunction = (opt: TarOptions) => {\n const onReadEntry = opt.onReadEntry\n opt.onReadEntry =\n onReadEntry ?\n e => {\n onReadEntry(e)\n e.resume()\n }\n : e => e.resume()\n}\n\n// construct a filter that limits the file entries listed\n// include child entries if a dir is included\nexport const filesFilter = (opt: TarOptions, files: string[]) => {\n const map = new Map(\n files.map(f => [stripTrailingSlashes(f), true]),\n )\n const filter = opt.filter\n\n const mapHas = (file: string, r: string = ''): boolean => {\n const root = r || parse(file).root || '.'\n let ret: boolean\n if (file === root) ret = false\n else {\n const m = map.get(file)\n if (m !== undefined) {\n ret = m\n } else {\n ret = mapHas(dirname(file), root)\n }\n }\n\n map.set(file, ret)\n return ret\n }\n\n opt.filter =\n filter ?\n (file, entry) =>\n filter(file, entry) && mapHas(stripTrailingSlashes(file))\n : file => mapHas(stripTrailingSlashes(file))\n}\n\nconst listFileSync = (opt: TarOptionsSyncFile) => {\n const p = new Parser(opt)\n const file = opt.file\n let fd\n try {\n const stat = fs.statSync(file)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n if (stat.size < readSize) {\n p.end(fs.readFileSync(file))\n } else {\n let pos = 0\n const buf = Buffer.allocUnsafe(readSize)\n fd = fs.openSync(file, 'r')\n while (pos < stat.size) {\n const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)\n pos += bytesRead\n p.write(buf.subarray(0, bytesRead))\n }\n p.end()\n }\n } finally {\n if (typeof fd === 'number') {\n try {\n fs.closeSync(fd)\n /* c8 ignore next */\n } catch (er) {}\n }\n }\n}\n\nconst listFile = (\n opt: TarOptionsFile,\n _files: string[],\n): Promise => {\n const parse = new Parser(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n parse.on('error', reject)\n parse.on('end', resolve)\n\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(parse)\n }\n })\n })\n return p\n}\n\nexport const list = makeCommand(\n listFileSync,\n listFile,\n opt => new Parser(opt) as Parser & { sync: true },\n opt => new Parser(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n if (!opt.noResume) onReadEntryFunction(opt)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.d.ts b/node_modules/tar/dist/commonjs/make-command.d.ts new file mode 100644 index 0000000..cd88929 --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.d.ts @@ -0,0 +1,49 @@ +import { TarOptions, TarOptionsAsyncFile, TarOptionsAsyncNoFile, TarOptionsSyncFile, TarOptionsSyncNoFile, TarOptionsWithAliases, TarOptionsWithAliasesAsync, TarOptionsWithAliasesAsyncFile, TarOptionsWithAliasesAsyncNoFile, TarOptionsWithAliasesFile, TarOptionsWithAliasesNoFile, TarOptionsWithAliasesSync, TarOptionsWithAliasesSyncFile, TarOptionsWithAliasesSyncNoFile } from './options.js'; +export type CB = (er?: Error) => any; +export type TarCommand = { + (): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass; + (entries: string[]): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile, entries: string[]): AsyncClass; +} & { + (opt: TarOptionsWithAliasesSyncNoFile): SyncClass; + (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass; +} & { + (opt: TarOptionsWithAliasesAsyncFile): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[]): Promise; + (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[], cb: CB): Promise; +} & { + (opt: TarOptionsWithAliasesSyncFile): void; + (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void; +} & { + (opt: TarOptionsWithAliasesSync): typeof opt extends (TarOptionsWithAliasesFile) ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; + (opt: TarOptionsWithAliasesSync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; +} & { + (opt: TarOptionsWithAliasesAsync): typeof opt extends (TarOptionsWithAliasesFile) ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsync, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? never : Promise; +} & { + (opt: TarOptionsWithAliasesFile): Promise | void; + (opt: TarOptionsWithAliasesFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise | void; + (opt: TarOptionsWithAliasesFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesFile, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesSync ? never : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise; +} & { + (opt: TarOptionsWithAliasesNoFile): typeof opt extends (TarOptionsWithAliasesSync) ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; + (opt: TarOptionsWithAliasesNoFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; +} & { + (opt: TarOptionsWithAliases): typeof opt extends (TarOptionsWithAliasesFile) ? typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : void | Promise : typeof opt extends TarOptionsWithAliasesNoFile ? typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass | Promise : SyncClass | void | AsyncClass | Promise; +} & { + syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void; + asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise; + syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass; + asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass; + validate?: (opt: TarOptions, entries?: string[]) => void; +}; +export declare const makeCommand: (syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void, asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise, syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass, asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass, validate?: (opt: TarOptions, entries?: string[]) => void) => TarCommand; +//# sourceMappingURL=make-command.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.d.ts.map b/node_modules/tar/dist/commonjs/make-command.d.ts.map new file mode 100644 index 0000000..7cb3c16 --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command.d.ts","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,CAAA;AAEpC,MAAM,MAAM,UAAU,CACpB,UAAU,EACV,SAAS,SAAS;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,IAC9B;IAEF,IAAI,UAAU,CAAA;IACd,CAAC,GAAG,EAAE,gCAAgC,GAAG,UAAU,CAAA;IACnD,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,UAAU,CAAA;IAC/B,CACE,GAAG,EAAE,gCAAgC,EACrC,OAAO,EAAE,MAAM,EAAE,GAChB,UAAU,CAAA;CACd,GAAG;IAEF,CAAC,GAAG,EAAE,+BAA+B,GAAG,SAAS,CAAA;IACjD,CAAC,GAAG,EAAE,+BAA+B,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACrE,GAAG;IAEF,CAAC,GAAG,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,CACE,GAAG,EAAE,8BAA8B,EACnC,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,IAAI,CAAC,CAAA;IAChB,CAAC,GAAG,EAAE,8BAA8B,EAAE,EAAE,EAAE,EAAE,GA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AO,EAAE,MAAM,EAAE,EACjB,EAAE,CAAC,EAAE,EAAE,KACJ,QAAQ,IAAI,CAAC,cACN,CACV,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,MAAM,EAAE,KACd,SAAS,eACD,CACX,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,MAAM,EAAE,KACd,UAAU,aACJ,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,KACvD,WAAW,UAAU,EAAE,SAAS,CAmElC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.js b/node_modules/tar/dist/commonjs/make-command.js new file mode 100644 index 0000000..1814319 --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.makeCommand = void 0; +const options_js_1 = require("./options.js"); +const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { + return Object.assign((opt_ = [], entries, cb) => { + if (Array.isArray(opt_)) { + entries = opt_; + opt_ = {}; + } + if (typeof entries === 'function') { + cb = entries; + entries = undefined; + } + if (!entries) { + entries = []; + } + else { + entries = Array.from(entries); + } + const opt = (0, options_js_1.dealias)(opt_); + validate?.(opt, entries); + if ((0, options_js_1.isSyncFile)(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncFile(opt, entries); + } + else if ((0, options_js_1.isAsyncFile)(opt)) { + const p = asyncFile(opt, entries); + // weirdness to make TS happy + const c = cb ? cb : undefined; + return c ? p.then(() => c(), c) : p; + } + else if ((0, options_js_1.isSyncNoFile)(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncNoFile(opt, entries); + } + else if ((0, options_js_1.isAsyncNoFile)(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback only supported with file option'); + } + return asyncNoFile(opt, entries); + /* c8 ignore start */ + } + else { + throw new Error('impossible options??'); + } + /* c8 ignore stop */ + }, { + syncFile, + asyncFile, + syncNoFile, + asyncNoFile, + validate, + }); +}; +exports.makeCommand = makeCommand; +//# sourceMappingURL=make-command.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/make-command.js.map b/node_modules/tar/dist/commonjs/make-command.js.map new file mode 100644 index 0000000..1f1cdeb --- /dev/null +++ b/node_modules/tar/dist/commonjs/make-command.js.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command.js","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":";;;AAAA,6CAoBqB;AA2Id,MAAM,WAAW,GAAG,CAIzB,QAA8D,EAC9D,SAIkB,EAClB,UAGc,EACd,WAGe,EACf,QAAwD,EACrB,EAAE;IACrC,OAAO,MAAM,CAAC,MAAM,CAClB,CACE,OAAyC,EAAE,EAC3C,OAAuB,EACvB,EAAO,EACP,EAAE;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,GAAG,IAAI,CAAA;YACd,IAAI,GAAG,EAAE,CAAA;QACX,CAAC;QAED,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;YAClC,EAAE,GAAG,OAAO,CAAA;YACZ,OAAO,GAAG,SAAS,CAAA;QACrB,CAAC;QAED,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAA;QACd,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,oBAAO,EAAC,IAAI,CAAC,CAAA;QAEzB,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAExB,IAAI,IAAA,uBAAU,EAAC,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC7B,MAAM,IAAI,SAAS,CACjB,+CAA+C,CA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oFile,\n TarOptions,\n TarOptionsAsyncFile,\n TarOptionsAsyncNoFile,\n TarOptionsSyncFile,\n TarOptionsSyncNoFile,\n TarOptionsWithAliases,\n TarOptionsWithAliasesAsync,\n TarOptionsWithAliasesAsyncFile,\n TarOptionsWithAliasesAsyncNoFile,\n TarOptionsWithAliasesFile,\n TarOptionsWithAliasesNoFile,\n TarOptionsWithAliasesSync,\n TarOptionsWithAliasesSyncFile,\n TarOptionsWithAliasesSyncNoFile,\n} from './options.js'\n\nexport type CB = (er?: Error) => any\n\nexport type TarCommand<\n AsyncClass,\n SyncClass extends { sync: true },\n> = {\n // async and no file specified\n (): AsyncClass\n (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass\n (entries: string[]): AsyncClass\n (\n opt: TarOptionsWithAliasesAsyncNoFile,\n entries: string[],\n ): AsyncClass\n} & {\n // sync and no file\n (opt: TarOptionsWithAliasesSyncNoFile): SyncClass\n (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass\n} & {\n // async and file\n (opt: TarOptionsWithAliasesAsyncFile): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n ): Promise\n (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n cb: CB,\n ): Promise\n} & {\n // sync and file\n (opt: TarOptionsWithAliasesSyncFile): void\n (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void\n} & {\n // sync, maybe file\n (opt: TarOptionsWithAliasesSync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n (\n opt: TarOptionsWithAliasesSync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n} & {\n // async, maybe file\n (opt: TarOptionsWithAliasesAsync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (opt: TarOptionsWithAliasesAsync, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? never\n : Promise\n} & {\n // maybe sync, file\n (opt: TarOptionsWithAliasesFile): Promise | void\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise | void\n (opt: TarOptionsWithAliasesFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesSync ? never\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise\n} & {\n // maybe sync, no file\n (opt: TarOptionsWithAliasesNoFile): typeof opt extends (\n TarOptionsWithAliasesSync\n ) ?\n SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n (\n opt: TarOptionsWithAliasesNoFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n} & {\n // maybe sync, maybe file\n (opt: TarOptionsWithAliases): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : void | Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ?\n typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void\n : typeof opt extends TarOptionsWithAliasesAsync ?\n AsyncClass | Promise\n : SyncClass | void | AsyncClass | Promise\n} & {\n // extras\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass\n validate?: (opt: TarOptions, entries?: string[]) => void\n}\n\nexport const makeCommand = <\n AsyncClass,\n SyncClass extends { sync: true },\n>(\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void,\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise,\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass,\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass,\n validate?: (opt: TarOptions, entries?: string[]) => void,\n): TarCommand => {\n return Object.assign(\n (\n opt_: TarOptionsWithAliases | string[] = [],\n entries?: string[] | CB,\n cb?: CB,\n ) => {\n if (Array.isArray(opt_)) {\n entries = opt_\n opt_ = {}\n }\n\n if (typeof entries === 'function') {\n cb = entries\n entries = undefined\n }\n\n if (!entries) {\n entries = []\n } else {\n entries = Array.from(entries)\n }\n\n const opt = dealias(opt_)\n\n validate?.(opt, entries)\n\n if (isSyncFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncFile(opt, entries)\n } else if (isAsyncFile(opt)) {\n const p = asyncFile(opt, entries)\n // weirdness to make TS happy\n const c = cb ? cb : undefined\n return c ? p.then(() => c(), c) : p\n } else if (isSyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncNoFile(opt, entries)\n } else if (isAsyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback only supported with file option',\n )\n }\n return asyncNoFile(opt, entries)\n /* c8 ignore start */\n } else {\n throw new Error('impossible options??')\n }\n /* c8 ignore stop */\n },\n {\n syncFile,\n asyncFile,\n syncNoFile,\n asyncNoFile,\n validate,\n },\n ) as TarCommand\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.d.ts b/node_modules/tar/dist/commonjs/mkdir.d.ts new file mode 100644 index 0000000..f28ef9e --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.d.ts @@ -0,0 +1,27 @@ +/// +import { CwdError } from './cwd-error.js'; +import { SymlinkError } from './symlink-error.js'; +export type MkdirOptions = { + uid?: number; + gid?: number; + processUid?: number; + processGid?: number; + umask?: number; + preserve: boolean; + unlink: boolean; + cache: Map; + cwd: string; + mode: number; +}; +export type MkdirError = NodeJS.ErrnoException | CwdError | SymlinkError; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +export declare const mkdir: (dir: string, opt: MkdirOptions, cb: (er?: null | MkdirError, made?: string) => void) => void | Promise; +export declare const mkdirSync: (dir: string, opt: MkdirOptions) => void | SymlinkError; +//# sourceMappingURL=mkdir.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.d.ts.map b/node_modules/tar/dist/commonjs/mkdir.d.ts.map new file mode 100644 index 0000000..8e0dbd3 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.d.ts","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,CAAC,cAAc,GACrB,QAAQ,GACR,YAAY,CAAA;AAyBhB;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,QACX,MAAM,OACN,YAAY,MACb,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,yBA0DpD,CAAA;AA+FD,eAAO,MAAM,SAAS,QAAS,MAAM,OAAO,YAAY,wBA+EvD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.js b/node_modules/tar/dist/commonjs/mkdir.js new file mode 100644 index 0000000..2b13ecb --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.js @@ -0,0 +1,209 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mkdirSync = exports.mkdir = void 0; +const chownr_1 = require("chownr"); +const fs_1 = __importDefault(require("fs")); +const mkdirp_1 = require("mkdirp"); +const node_path_1 = __importDefault(require("node:path")); +const cwd_error_js_1 = require("./cwd-error.js"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +const symlink_error_js_1 = require("./symlink-error.js"); +const cGet = (cache, key) => cache.get((0, normalize_windows_path_js_1.normalizeWindowsPath)(key)); +const cSet = (cache, key, val) => cache.set((0, normalize_windows_path_js_1.normalizeWindowsPath)(key), val); +const checkCwd = (dir, cb) => { + fs_1.default.stat(dir, (er, st) => { + if (er || !st.isDirectory()) { + er = new cwd_error_js_1.CwdError(dir, er?.code || 'ENOTDIR'); + } + cb(er); + }); +}; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +const mkdir = (dir, opt, cb) => { + dir = (0, normalize_windows_path_js_1.normalizeWindowsPath)(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o0700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd); + const done = (er, created) => { + if (er) { + cb(er); + } + else { + cSet(cache, dir, true); + if (created && doChown) { + (0, chownr_1.chownr)(created, uid, gid, er => done(er)); + } + else if (needChmod) { + fs_1.default.chmod(dir, mode, cb); + } + else { + cb(); + } + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + return checkCwd(dir, done); + } + if (preserve) { + return (0, mkdirp_1.mkdirp)(dir, { mode }).then(made => done(null, made ?? undefined), // oh, ts + done); + } + const sub = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(cwd, dir)); + const parts = sub.split('/'); + mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done); +}; +exports.mkdir = mkdir; +const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => { + if (!parts.length) { + return cb(null, created); + } + const p = parts.shift(); + const part = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(base + '/' + p)); + if (cGet(cache, part)) { + return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + fs_1.default.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); +}; +const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => { + if (er) { + fs_1.default.lstat(part, (statEr, st) => { + if (statEr) { + statEr.path = + statEr.path && (0, normalize_windows_path_js_1.normalizeWindowsPath)(statEr.path); + cb(statEr); + } + else if (st.isDirectory()) { + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + else if (unlink) { + fs_1.default.unlink(part, er => { + if (er) { + return cb(er); + } + fs_1.default.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); + }); + } + else if (st.isSymbolicLink()) { + return cb(new symlink_error_js_1.SymlinkError(part, part + '/' + parts.join('/'))); + } + else { + cb(er); + } + }); + } + else { + created = created || part; + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } +}; +const checkCwdSync = (dir) => { + let ok = false; + let code = undefined; + try { + ok = fs_1.default.statSync(dir).isDirectory(); + } + catch (er) { + code = er?.code; + } + finally { + if (!ok) { + throw new cwd_error_js_1.CwdError(dir, code ?? 'ENOTDIR'); + } + } +}; +const mkdirSync = (dir, opt) => { + dir = (0, normalize_windows_path_js_1.normalizeWindowsPath)(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd); + const done = (created) => { + cSet(cache, dir, true); + if (created && doChown) { + (0, chownr_1.chownrSync)(created, uid, gid); + } + if (needChmod) { + fs_1.default.chmodSync(dir, mode); + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + checkCwdSync(cwd); + return done(); + } + if (preserve) { + return done((0, mkdirp_1.mkdirpSync)(dir, mode) ?? undefined); + } + const sub = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.relative(cwd, dir)); + const parts = sub.split('/'); + let created = undefined; + for (let p = parts.shift(), part = cwd; p && (part += '/' + p); p = parts.shift()) { + part = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(part)); + if (cGet(cache, part)) { + continue; + } + try { + fs_1.default.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + } + catch (er) { + const st = fs_1.default.lstatSync(part); + if (st.isDirectory()) { + cSet(cache, part, true); + continue; + } + else if (unlink) { + fs_1.default.unlinkSync(part); + fs_1.default.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + continue; + } + else if (st.isSymbolicLink()) { + return new symlink_error_js_1.SymlinkError(part, part + '/' + parts.join('/')); + } + } + } + return done(created); +}; +exports.mkdirSync = mkdirSync; +//# sourceMappingURL=mkdir.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mkdir.js.map b/node_modules/tar/dist/commonjs/mkdir.js.map new file mode 100644 index 0000000..8f430be --- /dev/null +++ b/node_modules/tar/dist/commonjs/mkdir.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.js","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";;;;;;AAAA,mCAA2C;AAC3C,4CAAmB;AACnB,mCAA2C;AAC3C,0DAA4B;AAC5B,iDAAyC;AACzC,2EAAkE;AAClE,yDAAiD;AAoBjD,MAAM,IAAI,GAAG,CAAC,KAA2B,EAAE,GAAW,EAAE,EAAE,CACxD,KAAK,CAAC,GAAG,CAAC,IAAA,gDAAoB,EAAC,GAAG,CAAC,CAAC,CAAA;AACtC,MAAM,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IACH,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAA;AACtB,CAAC,CAAA;AA/EY,QAAA,SAAS,aA+ErB","sourcesContent":["import { chownr, chownrSync } from 'chownr'\nimport fs from 'fs'\nimport { mkdirp, mkdirpSync } from 'mkdirp'\nimport path from 'node:path'\nimport { CwdError } from './cwd-error.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { SymlinkError } from './symlink-error.js'\n\nexport type MkdirOptions = {\n uid?: number\n gid?: number\n processUid?: number\n processGid?: number\n umask?: number\n preserve: boolean\n unlink: boolean\n cache: Map\n cwd: string\n mode: number\n}\n\nexport type MkdirError =\n | NodeJS.ErrnoException\n | CwdError\n | SymlinkError\n\nconst cGet = (cache: Map, key: string) =>\n cache.get(normalizeWindowsPath(key))\nconst cSet = (\n cache: Map,\n key: string,\n val: boolean,\n) => cache.set(normalizeWindowsPath(key), val)\n\nconst checkCwd = (\n dir: string,\n cb: (er?: null | MkdirError) => any,\n) => {\n fs.stat(dir, (er, st) => {\n if (er || !st.isDirectory()) {\n er = new CwdError(\n dir,\n (er as NodeJS.ErrnoException)?.code || 'ENOTDIR',\n )\n }\n cb(er)\n })\n}\n\n/**\n * Wrapper around mkdirp for tar's needs.\n *\n * The main purpose is to avoid creating directories if we know that\n * they already exist (and track which ones exist for this purpose),\n * and prevent entries from being extracted into symlinked folders,\n * if `preservePaths` is not set.\n */\nexport const mkdir = (\n dir: string,\n opt: MkdirOptions,\n cb: (er?: null | MkdirError, made?: string) => void,\n) => {\n dir = normalizeWindowsPath(dir)\n\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o0700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (er?: null | MkdirError, created?: string) => {\n if (er) {\n cb(er)\n } else {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownr(created, uid, gid, er =>\n done(er as NodeJS.ErrnoException),\n )\n } else if (needChmod) {\n fs.chmod(dir, mode, cb)\n } else {\n cb()\n }\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n return checkCwd(dir, done)\n }\n\n if (preserve) {\n return mkdirp(dir, { mode }).then(\n made => done(null, made ?? undefined), // oh, ts\n done,\n )\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done)\n}\n\nconst mkdir_ = (\n base: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n): void => {\n if (!parts.length) {\n return cb(null, created)\n }\n const p = parts.shift()\n const part = normalizeWindowsPath(path.resolve(base + '/' + p))\n if (cGet(cache, part)) {\n return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(part, parts, mode, cache, unlink, cwd, created, cb),\n )\n}\n\nconst onmkdir =\n (\n part: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) =>\n (er?: null | NodeJS.ErrnoException) => {\n if (er) {\n fs.lstat(part, (statEr, st) => {\n if (statEr) {\n statEr.path =\n statEr.path && normalizeWindowsPath(statEr.path)\n cb(statEr)\n } else if (st.isDirectory()) {\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n } else if (unlink) {\n fs.unlink(part, er => {\n if (er) {\n return cb(er)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(\n part,\n parts,\n mode,\n cache,\n unlink,\n cwd,\n created,\n cb,\n ),\n )\n })\n } else if (st.isSymbolicLink()) {\n return cb(\n new SymlinkError(part, part + '/' + parts.join('/')),\n )\n } else {\n cb(er)\n }\n })\n } else {\n created = created || part\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n }\n\nconst checkCwdSync = (dir: string) => {\n let ok = false\n let code: string | undefined = undefined\n try {\n ok = fs.statSync(dir).isDirectory()\n } catch (er) {\n code = (er as NodeJS.ErrnoException)?.code\n } finally {\n if (!ok) {\n throw new CwdError(dir, code ?? 'ENOTDIR')\n }\n }\n}\n\nexport const mkdirSync = (dir: string, opt: MkdirOptions) => {\n dir = normalizeWindowsPath(dir)\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (created?: string | undefined) => {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownrSync(created, uid, gid)\n }\n if (needChmod) {\n fs.chmodSync(dir, mode)\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n checkCwdSync(cwd)\n return done()\n }\n\n if (preserve) {\n return done(mkdirpSync(dir, mode) ?? undefined)\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n let created: string | undefined = undefined\n for (\n let p = parts.shift(), part = cwd;\n p && (part += '/' + p);\n p = parts.shift()\n ) {\n part = normalizeWindowsPath(path.resolve(part))\n if (cGet(cache, part)) {\n continue\n }\n\n try {\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n } catch (er) {\n const st = fs.lstatSync(part)\n if (st.isDirectory()) {\n cSet(cache, part, true)\n continue\n } else if (unlink) {\n fs.unlinkSync(part)\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n continue\n } else if (st.isSymbolicLink()) {\n return new SymlinkError(part, part + '/' + parts.join('/'))\n }\n }\n }\n\n return done(created)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.d.ts b/node_modules/tar/dist/commonjs/mode-fix.d.ts new file mode 100644 index 0000000..38f3d93 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.d.ts @@ -0,0 +1,2 @@ +export declare const modeFix: (mode: number, isDir: boolean, portable: boolean) => number; +//# sourceMappingURL=mode-fix.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.d.ts.map b/node_modules/tar/dist/commonjs/mode-fix.d.ts.map new file mode 100644 index 0000000..dbef3bc --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.d.ts","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SACZ,MAAM,SACL,OAAO,YACJ,OAAO,WA0BlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.js b/node_modules/tar/dist/commonjs/mode-fix.js new file mode 100644 index 0000000..49dd727 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.modeFix = void 0; +const modeFix = (mode, isDir, portable) => { + mode &= 0o7777; + // in portable mode, use the minimum reasonable umask + // if this system creates files with 0o664 by default + // (as some linux distros do), then we'll write the + // archive with 0o644 instead. Also, don't ever create + // a file that is not readable/writable by the owner. + if (portable) { + mode = (mode | 0o600) & ~0o22; + } + // if dirs are readable, then they should be listable + if (isDir) { + if (mode & 0o400) { + mode |= 0o100; + } + if (mode & 0o40) { + mode |= 0o10; + } + if (mode & 0o4) { + mode |= 0o1; + } + } + return mode; +}; +exports.modeFix = modeFix; +//# sourceMappingURL=mode-fix.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/mode-fix.js.map b/node_modules/tar/dist/commonjs/mode-fix.js.map new file mode 100644 index 0000000..a44f846 --- /dev/null +++ b/node_modules/tar/dist/commonjs/mode-fix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.js","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":";;;AAAO,MAAM,OAAO,GAAG,CACrB,IAAY,EACZ,KAAc,EACd,QAAiB,EACjB,EAAE;IACF,IAAI,IAAI,MAAM,CAAA;IAEd,qDAAqD;IACrD,qDAAqD;IACrD,mDAAmD;IACnD,uDAAuD;IACvD,qDAAqD;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAA;IAC/B,CAAC;IAED,qDAAqD;IACrD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,IAAI,KAAK,CAAA;QACf,CAAC;QACD,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;YAChB,IAAI,IAAI,IAAI,CAAA;QACd,CAAC;QACD,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;YACf,IAAI,IAAI,GAAG,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AA7BY,QAAA,OAAO,WA6BnB","sourcesContent":["export const modeFix = (\n mode: number,\n isDir: boolean,\n portable: boolean,\n) => {\n mode &= 0o7777\n\n // in portable mode, use the minimum reasonable umask\n // if this system creates files with 0o664 by default\n // (as some linux distros do), then we'll write the\n // archive with 0o644 instead. Also, don't ever create\n // a file that is not readable/writable by the owner.\n if (portable) {\n mode = (mode | 0o600) & ~0o22\n }\n\n // if dirs are readable, then they should be listable\n if (isDir) {\n if (mode & 0o400) {\n mode |= 0o100\n }\n if (mode & 0o40) {\n mode |= 0o10\n }\n if (mode & 0o4) {\n mode |= 0o1\n }\n }\n return mode\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.d.ts b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts new file mode 100644 index 0000000..0413bd7 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeUnicode: (s: string) => any; +//# sourceMappingURL=normalize-unicode.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map new file mode 100644 index 0000000..9c26ec8 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.d.ts","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAO,MAAM,QAKzC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.js b/node_modules/tar/dist/commonjs/normalize-unicode.js new file mode 100644 index 0000000..2f08ce4 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.normalizeUnicode = void 0; +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const normalizeCache = Object.create(null); +const { hasOwnProperty } = Object.prototype; +const normalizeUnicode = (s) => { + if (!hasOwnProperty.call(normalizeCache, s)) { + normalizeCache[s] = s.normalize('NFD'); + } + return normalizeCache[s]; +}; +exports.normalizeUnicode = normalizeUnicode; +//# sourceMappingURL=normalize-unicode.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-unicode.js.map b/node_modules/tar/dist/commonjs/normalize-unicode.js.map new file mode 100644 index 0000000..c41f57c --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-unicode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.js","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,SAAS,CAAA;AACpC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5C,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC,CAAA;AALY,QAAA,gBAAgB,oBAK5B","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nconst normalizeCache = Object.create(null)\nconst { hasOwnProperty } = Object.prototype\nexport const normalizeUnicode = (s: string) => {\n if (!hasOwnProperty.call(normalizeCache, s)) {\n normalizeCache[s] = s.normalize('NFD')\n }\n return normalizeCache[s]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts new file mode 100644 index 0000000..8581105 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeWindowsPath: (p: string) => string; +//# sourceMappingURL=normalize-windows-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map new file mode 100644 index 0000000..25de3c0 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.d.ts","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,MAEzB,MAAM,WAC+B,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.js b/node_modules/tar/dist/commonjs/normalize-windows-path.js new file mode 100644 index 0000000..b0c7aaa --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.js @@ -0,0 +1,12 @@ +"use strict"; +// on windows, either \ or / are valid directory separators. +// on unix, \ is a valid character in filenames. +// so, on windows, and only on windows, we replace all \ chars with /, +// so that we can use / as our one and only directory separator char. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.normalizeWindowsPath = void 0; +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +exports.normalizeWindowsPath = platform !== 'win32' ? + (p) => p + : (p) => p && p.replace(/\\/g, '/'); +//# sourceMappingURL=normalize-windows-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/normalize-windows-path.js.map b/node_modules/tar/dist/commonjs/normalize-windows-path.js.map new file mode 100644 index 0000000..8d31dc4 --- /dev/null +++ b/node_modules/tar/dist/commonjs/normalize-windows-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.js","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":";AAAA,4DAA4D;AAC5D,gDAAgD;AAChD,sEAAsE;AACtE,qEAAqE;;;AAErE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAE9C,QAAA,oBAAoB,GAC/B,QAAQ,KAAK,OAAO,CAAC,CAAC;IACpB,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["// on windows, either \\ or / are valid directory separators.\n// on unix, \\ is a valid character in filenames.\n// so, on windows, and only on windows, we replace all \\ chars with /,\n// so that we can use / as our one and only directory separator char.\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\n\nexport const normalizeWindowsPath =\n platform !== 'win32' ?\n (p: string) => p\n : (p: string) => p && p.replace(/\\\\/g, '/')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.d.ts b/node_modules/tar/dist/commonjs/options.d.ts new file mode 100644 index 0000000..e3110de --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.d.ts @@ -0,0 +1,605 @@ +/// +import { type GzipOptions, type ZlibOptions } from 'minizlib'; +import { type Stats } from 'node:fs'; +import { type ReadEntry } from './read-entry.js'; +import { type WarnData } from './warn-method.js'; +import { WriteEntry } from './write-entry.js'; +/** + * The options that can be provided to tar commands. + * + * Note that some of these are only relevant for certain commands, since + * they are specific to reading or writing. + * + * Aliases are provided in the {@link TarOptionsWithAliases} type. + */ +export interface TarOptions { + /** + * Perform all I/O operations synchronously. If the stream is ended + * immediately, then it will be processed entirely synchronously. + */ + sync?: boolean; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + file?: string; + /** + * Treat warnings as crash-worthy errors. Defaults false. + */ + strict?: boolean; + /** + * The effective current working directory for this tar command + */ + cwd?: string; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + gzip?: boolean | GzipOptions; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + preservePaths?: boolean; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + noMtime?: boolean; + /** + * Set to `true` or an object with settings for `zlib.BrotliCompress()` to + * create a brotli-compressed archive + * + * When extracting, this will cause the archive to be treated as a + * brotli-compressed file if set to `true` or a ZlibOptions object. + * + * If set `false`, then brotli options will not be used. + * + * If both this and the `gzip` option are left `undefined`, then tar will + * attempt to infer the brotli compression status, but can only do so based + * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the + * first 512 bytes are not a valid tar header, then brotli decompression + * will be attempted. + */ + brotli?: boolean | ZlibOptions; + /** + * A function that is called with `(path, stat)` when creating an archive, or + * `(path, entry)` when extracting. Return true to process the file/entry, or + * false to exclude it. + */ + filter?: (path: string, entry: Stats | ReadEntry) => boolean; + /** + * A function that gets called for any warning encountered. + * + * Note: if `strict` is set, then the warning will throw, and this method + * will not be called. + */ + onwarn?: (code: string, message: string, data: WarnData) => any; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + unlink?: boolean; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + * + * Any entry whose entire path is stripped will be excluded. + */ + strip?: number; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + newer?: boolean; + /** + * When extracting, do not overwrite existing files at all. + */ + keep?: boolean; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + preserveOwner?: boolean; + /** + * The maximum depth of subfolders to extract into. This defaults to 1024. + * Anything deeper than the limit will raise a warning and skip the entry. + * Set to `Infinity` to remove the limitation. + */ + maxDepth?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified user id, + * regardless of the `uid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `gid` + * option. + */ + uid?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified group id, + * regardless of the `gid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `uid` + * option. + */ + gid?: number; + /** + * When extracting, provide a function that takes an `entry` object, and + * returns a stream, or any falsey value. If a stream is provided, then that + * stream's data will be written instead of the contents of the archive + * entry. If a falsey value is provided, then the entry is written to disk as + * normal. + * + * To exclude items from extraction, use the `filter` option. + * + * Note that using an asynchronous stream type with the `transform` option + * will cause undefined behavior in synchronous extractions. + * [MiniPass](http://npm.im/minipass)-based streams are designed for this use + * case. + */ + transform?: (entry: ReadEntry) => any; + /** + * Call `chmod()` to ensure that extracted files match the entry's mode + * field. Without this field set, all mode fields in archive entries are a + * best effort attempt only. + * + * Setting this necessitates a call to the deprecated `process.umask()` + * method to determine the default umask value, unless a `processUmask` + * config is provided as well. + * + * If not set, tar will attempt to create file system entries with whatever + * mode is provided, and let the implicit process `umask` apply normally, but + * if a file already exists to be written to, then its existing mode will not + * be modified. + * + * When setting `chmod: true`, it is highly recommend to set the + * {@link TarOptions#processUmask} option as well, to avoid the call to the + * deprecated (and thread-unsafe) `process.umask()` method. + */ + chmod?: boolean; + /** + * When setting the {@link TarOptions#chmod} option to `true`, you may + * provide a value here to avoid having to call the deprecated and + * thread-unsafe `process.umask()` method. + * + * This has no effect with `chmod` is not set to true, as mode values are not + * set explicitly anyway. If `chmod` is set to `true`, and a value is not + * provided here, then `process.umask()` must be called, which will result in + * deprecation warnings. + * + * The most common values for this are `0o22` (resulting in directories + * created with mode `0o755` and files with `0o644` by default) and `0o2` + * (resulting in directores created with mode `0o775` and files `0o664`, so + * they are group-writable). + */ + processUmask?: number; + /** + * When parsing/listing archives, `entry` streams are by default resumed + * (set into "flowing" mode) immediately after the call to `onReadEntry()`. + * Set `noResume: true` to suppress this behavior. + * + * Note that when this is set, the stream will never complete until the + * data is consumed somehow. + * + * Set automatically in extract operations, since the entry is piped to + * a file system entry right away. Only relevant when parsing. + */ + noResume?: boolean; + /** + * When creating, updating, or replacing within archives, this method will + * be called with each WriteEntry that is created. + */ + onWriteEntry?: (entry: WriteEntry) => any; + /** + * When extracting or listing archives, this method will be called with + * each entry that is not excluded by a `filter`. + * + * Important when listing archives synchronously from a file, because there + * is otherwise no way to interact with the data! + */ + onReadEntry?: (entry: ReadEntry) => any; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + follow?: boolean; + /** + * When creating archives, omit any metadata that is system-specific: + * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and + * `nlink`. Note that `mtime` is still included, because this is necessary + * for other time-based operations such as `tar.update`. Additionally, `mode` + * is set to a "reasonable default" for mose unix systems, based on an + * effective `umask` of `0o22`. + * + * This also defaults the `portable` option in the gzip configs when creating + * a compressed archive, in order to produce deterministic archives that are + * not operating-system specific. + */ + portable?: boolean; + /** + * When creating archives, do not recursively archive the contents of + * directories. By default, archiving a directory archives all of its + * contents as well. + */ + noDirRecurse?: boolean; + /** + * Suppress Pax extended headers when creating archives. Note that this means + * long paths and linkpaths will be truncated, and large or negative numeric + * values may be interpreted incorrectly. + */ + noPax?: boolean; + /** + * Set to a `Date` object to force a specific `mtime` value for everything + * written to an archive. + * + * This is useful when creating archives that are intended to be + * deterministic based on their contents, irrespective of the file's last + * modification time. + * + * Overridden by `noMtime`. + */ + mtime?: Date; + /** + * A path portion to prefix onto the entries added to an archive. + */ + prefix?: string; + /** + * The mode to set on any created file archive, defaults to 0o666 + * masked by the process umask, often resulting in 0o644. + * + * This does *not* affect the mode fields of individual entries, or the + * mode status of extracted entries on the filesystem. + */ + mode?: number; + /** + * A cache of mtime values, to avoid having to stat the same file repeatedly. + * + * @internal + */ + mtimeCache?: Map; + /** + * maximum buffer size for `fs.read()` operations. + * + * @internal + */ + maxReadSize?: number; + /** + * Filter modes of entries being unpacked, like `process.umask()` + * + * @internal + */ + umask?: number; + /** + * Default mode for directories. Used for all implicitly created directories, + * and any directories in the archive that do not have a mode field. + * + * @internal + */ + dmode?: number; + /** + * default mode for files + * + * @internal + */ + fmode?: number; + /** + * Map that tracks which directories already exist, for extraction + * + * @internal + */ + dirCache?: Map; + /** + * maximum supported size of meta entries. Defaults to 1MB + * + * @internal + */ + maxMetaEntrySize?: number; + /** + * A Map object containing the device and inode value for any file whose + * `nlink` value is greater than 1, to identify hard links when creating + * archives. + * + * @internal + */ + linkCache?: Map; + /** + * A map object containing the results of `fs.readdir()` calls. + * + * @internal + */ + readdirCache?: Map; + /** + * A cache of all `lstat` results, for use in creating archives. + * + * @internal + */ + statCache?: Map; + /** + * Number of concurrent jobs to run when creating archives. + * + * Defaults to 4. + * + * @internal + */ + jobs?: number; + /** + * Automatically set to true on Windows systems. + * + * When extracting, causes behavior where filenames containing `<|>?:` + * characters are converted to windows-compatible escape sequences in the + * created filesystem entries. + * + * When packing, causes behavior where paths replace `\` with `/`, and + * filenames containing the windows-compatible escaped forms of `<|>?:` are + * converted to actual `<|>?:` characters in the archive. + * + * @internal + */ + win32?: boolean; + /** + * For `WriteEntry` objects, the absolute path to the entry on the + * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be + * overridden explicitly. + * + * @internal + */ + absolute?: string; + /** + * Used with Parser stream interface, to attach and take over when the + * stream is completely parsed. If this is set, then the prefinish, + * finish, and end events will not fire, and are the responsibility of + * the ondone method to emit properly. + * + * @internal + */ + ondone?: () => void; + /** + * Mostly for testing, but potentially useful in some cases. + * Forcibly trigger a chown on every entry, no matter what. + */ + forceChown?: boolean; + /** + * ambiguous deprecated name for {@link onReadEntry} + * + * @deprecated + */ + onentry?: (entry: ReadEntry) => any; +} +export type TarOptionsSync = TarOptions & { + sync: true; +}; +export type TarOptionsAsync = TarOptions & { + sync?: false; +}; +export type TarOptionsFile = TarOptions & { + file: string; +}; +export type TarOptionsNoFile = TarOptions & { + file?: undefined; +}; +export type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile; +export type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile; +export type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile; +export type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile; +export type LinkCacheKey = `${number}:${number}`; +export interface TarOptionsWithAliases extends TarOptions { + /** + * The effective current working directory for this tar command + */ + C?: TarOptions['cwd']; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + f?: TarOptions['file']; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + z?: TarOptions['gzip']; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + P?: TarOptions['preservePaths']; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + U?: TarOptions['unlink']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + 'strip-components'?: TarOptions['strip']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + stripComponents?: TarOptions['strip']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewer?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer-files'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewerFiles?: TarOptions['newer']; + /** + * When extracting, do not overwrite existing files at all. + */ + k?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + 'keep-existing'?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + keepExisting?: TarOptions['keep']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + m?: TarOptions['noMtime']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + 'no-mtime'?: TarOptions['noMtime']; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + p?: TarOptions['preserveOwner']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + L?: TarOptions['follow']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + h?: TarOptions['follow']; + /** + * Deprecated option. Set explicitly false to set `chmod: true`. Ignored + * if {@link TarOptions#chmod} is set to any boolean value. + * + * @deprecated + */ + noChmod?: boolean; +} +export type TarOptionsWithAliasesSync = TarOptionsWithAliases & { + sync: true; +}; +export type TarOptionsWithAliasesAsync = TarOptionsWithAliases & { + sync?: false; +}; +export type TarOptionsWithAliasesFile = (TarOptionsWithAliases & { + file: string; +}) | (TarOptionsWithAliases & { + f: string; +}); +export type TarOptionsWithAliasesSyncFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesAsyncFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & { + f?: undefined; + file?: undefined; +}; +export type TarOptionsWithAliasesSyncNoFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile; +export type TarOptionsWithAliasesAsyncNoFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile; +export declare const isSyncFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file: string; +}; +export declare const isAsyncFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file: string; +}; +export declare const isSyncNoFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file?: undefined; +}; +export declare const isAsyncNoFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file?: undefined; +}; +export declare const isSync: (o: O) => o is O & TarOptions & { + sync: true; +}; +export declare const isAsync: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +}; +export declare const isFile: (o: O) => o is O & TarOptions & { + file: string; +}; +export declare const isNoFile: (o: O) => o is O & TarOptions & { + file?: undefined; +}; +export declare const dealias: (opt?: TarOptionsWithAliases) => TarOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.d.ts.map b/node_modules/tar/dist/commonjs/options.d.ts.map new file mode 100644 index 0000000..cd32241 --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAC7D,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AA2B7C;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IAIzB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAE5B;;;;;;;;;;;;;;OAcG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAA;IAE9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,SAAS,KAAK,OAAO,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BAA8B,GACxC,0BAA0B,GAAG,yBAAyB,CAAA;AAExD,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,GAAG;IAChE,CAAC,CAAC,EAAE,SAAS,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,+BAA+B,GACzC,yBAAyB,GAAG,2BAA2B,CAAA;AACzD,MAAM,MAAM,gCAAgC,GAC1C,0BAA0B,GAAG,2BAA2B,CAAA;AAE1D,eAAO,MAAM,UAAU,4BAClB,CAAC;UA/K4C,IAAI;;UAEJ,MAAM;CA8KF,CAAA;AACtD,eAAO,MAAM,WAAW,4BACnB,CAAC;;;UAhL4C,MAAM;CAiLF,CAAA;AACtD,eAAO,MAAM,YAAY,4BACpB,CAAC;UArL4C,IAAI;;WAGD,SAAS;CAmLP,CAAA;AACvD,eAAO,MAAM,aAAa,4BACrB,CAAC;;;WArL+C,SAAS;CAsLP,CAAA;AACvD,eAAO,MAAM,MAAM,4BACd,CAAC;UA3L4C,IAAI;CA4LhB,CAAA;AACtC,eAAO,MAAM,OAAO,4BACf,CAAC;;CACgC,CAAA;AACtC,eAAO,MAAM,MAAM,4BACd,CAAC;UA/L4C,MAAM;CAgMlB,CAAA;AACtC,eAAO,MAAM,QAAQ,4BAChB,CAAC;WAjM+C,SAAS;CAkMvB,CAAA;AAUvC,eAAO,MAAM,OAAO,SACb,qBAAqB,KACzB,UAiBF,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.js b/node_modules/tar/dist/commonjs/options.js new file mode 100644 index 0000000..4cd0650 --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.js @@ -0,0 +1,66 @@ +"use strict"; +// turn tar(1) style args like `C` into the more verbose things like `cwd` +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dealias = exports.isNoFile = exports.isFile = exports.isAsync = exports.isSync = exports.isAsyncNoFile = exports.isSyncNoFile = exports.isAsyncFile = exports.isSyncFile = void 0; +const argmap = new Map([ + ['C', 'cwd'], + ['f', 'file'], + ['z', 'gzip'], + ['P', 'preservePaths'], + ['U', 'unlink'], + ['strip-components', 'strip'], + ['stripComponents', 'strip'], + ['keep-newer', 'newer'], + ['keepNewer', 'newer'], + ['keep-newer-files', 'newer'], + ['keepNewerFiles', 'newer'], + ['k', 'keep'], + ['keep-existing', 'keep'], + ['keepExisting', 'keep'], + ['m', 'noMtime'], + ['no-mtime', 'noMtime'], + ['p', 'preserveOwner'], + ['L', 'follow'], + ['h', 'follow'], + ['onentry', 'onReadEntry'], +]); +const isSyncFile = (o) => !!o.sync && !!o.file; +exports.isSyncFile = isSyncFile; +const isAsyncFile = (o) => !o.sync && !!o.file; +exports.isAsyncFile = isAsyncFile; +const isSyncNoFile = (o) => !!o.sync && !o.file; +exports.isSyncNoFile = isSyncNoFile; +const isAsyncNoFile = (o) => !o.sync && !o.file; +exports.isAsyncNoFile = isAsyncNoFile; +const isSync = (o) => !!o.sync; +exports.isSync = isSync; +const isAsync = (o) => !o.sync; +exports.isAsync = isAsync; +const isFile = (o) => !!o.file; +exports.isFile = isFile; +const isNoFile = (o) => !o.file; +exports.isNoFile = isNoFile; +const dealiasKey = (k) => { + const d = argmap.get(k); + if (d) + return d; + return k; +}; +const dealias = (opt = {}) => { + if (!opt) + return {}; + const result = {}; + for (const [key, v] of Object.entries(opt)) { + // TS doesn't know that aliases are going to always be the same type + const k = dealiasKey(key); + result[k] = v; + } + // affordance for deprecated noChmod -> chmod + if (result.chmod === undefined && result.noChmod === false) { + result.chmod = true; + } + delete result.noChmod; + return result; +}; +exports.dealias = dealias; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/options.js.map b/node_modules/tar/dist/commonjs/options.js.map new file mode 100644 index 0000000..469ff02 --- /dev/null +++ b/node_modules/tar/dist/commonjs/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":";AAAA,0EAA0E;;;AAQ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K,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC3D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAA;IACrB,OAAO,MAAoB,CAAA;AAC7B,CAAC,CAAA;AAnBY,QAAA,OAAO,WAmBnB","sourcesContent":["// turn tar(1) style args like `C` into the more verbose things like `cwd`\n\nimport { type GzipOptions, type ZlibOptions } from 'minizlib'\nimport { type Stats } from 'node:fs'\nimport { type ReadEntry } from './read-entry.js'\nimport { type WarnData } from './warn-method.js'\nimport { WriteEntry } from './write-entry.js'\n\nconst argmap = new Map(\n [\n ['C', 'cwd'],\n ['f', 'file'],\n ['z', 'gzip'],\n ['P', 'preservePaths'],\n ['U', 'unlink'],\n ['strip-components', 'strip'],\n ['stripComponents', 'strip'],\n ['keep-newer', 'newer'],\n ['keepNewer', 'newer'],\n ['keep-newer-files', 'newer'],\n ['keepNewerFiles', 'newer'],\n ['k', 'keep'],\n ['keep-existing', 'keep'],\n ['keepExisting', 'keep'],\n ['m', 'noMtime'],\n ['no-mtime', 'noMtime'],\n ['p', 'preserveOwner'],\n ['L', 'follow'],\n ['h', 'follow'],\n ['onentry', 'onReadEntry'],\n ],\n)\n\n/**\n * The options that can be provided to tar commands.\n *\n * Note that some of these are only relevant for certain commands, since\n * they are specific to reading or writing.\n *\n * Aliases are provided in the {@link TarOptionsWithAliases} type.\n */\nexport interface TarOptions {\n //////////////////////////\n // shared options\n\n /**\n * Perform all I/O operations synchronously. If the stream is ended\n * immediately, then it will be processed entirely synchronously.\n */\n sync?: boolean\n\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n file?: string\n\n /**\n * Treat warnings as crash-worthy errors. Defaults false.\n */\n strict?: boolean\n\n /**\n * The effective current working directory for this tar command\n */\n cwd?: string\n\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n gzip?: boolean | GzipOptions\n\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n preservePaths?: boolean\n\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n noMtime?: boolean\n\n /**\n * Set to `true` or an object with settings for `zlib.BrotliCompress()` to\n * create a brotli-compressed archive\n *\n * When extracting, this will cause the archive to be treated as a\n * brotli-compressed file if set to `true` or a ZlibOptions object.\n *\n * If set `false`, then brotli options will not be used.\n *\n * If both this and the `gzip` option are left `undefined`, then tar will\n * attempt to infer the brotli compression status, but can only do so based\n * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the\n * first 512 bytes are not a valid tar header, then brotli decompression\n * will be attempted.\n */\n brotli?: boolean | ZlibOptions\n\n /**\n * A function that is called with `(path, stat)` when creating an archive, or\n * `(path, entry)` when extracting. Return true to process the file/entry, or\n * false to exclude it.\n */\n filter?: (path: string, entry: Stats | ReadEntry) => boolean\n\n /**\n * A function that gets called for any warning encountered.\n *\n * Note: if `strict` is set, then the warning will throw, and this method\n * will not be called.\n */\n onwarn?: (code: string, message: string, data: WarnData) => any\n\n //////////////////////////\n // extraction options\n\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n unlink?: boolean\n\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n *\n * Any entry whose entire path is stripped will be excluded.\n */\n strip?: number\n\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n newer?: boolean\n\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keep?: boolean\n\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n preserveOwner?: boolean\n\n /**\n * The maximum depth of subfolders to extract into. This defaults to 1024.\n * Anything deeper than the limit will raise a warning and skip the entry.\n * Set to `Infinity` to remove the limitation.\n */\n maxDepth?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified user id,\n * regardless of the `uid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `gid`\n * option.\n */\n uid?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified group id,\n * regardless of the `gid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `uid`\n * option.\n */\n gid?: number\n\n /**\n * When extracting, provide a function that takes an `entry` object, and\n * returns a stream, or any falsey value. If a stream is provided, then that\n * stream's data will be written instead of the contents of the archive\n * entry. If a falsey value is provided, then the entry is written to disk as\n * normal.\n *\n * To exclude items from extraction, use the `filter` option.\n *\n * Note that using an asynchronous stream type with the `transform` option\n * will cause undefined behavior in synchronous extractions.\n * [MiniPass](http://npm.im/minipass)-based streams are designed for this use\n * case.\n */\n transform?: (entry: ReadEntry) => any\n\n /**\n * Call `chmod()` to ensure that extracted files match the entry's mode\n * field. Without this field set, all mode fields in archive entries are a\n * best effort attempt only.\n *\n * Setting this necessitates a call to the deprecated `process.umask()`\n * method to determine the default umask value, unless a `processUmask`\n * config is provided as well.\n *\n * If not set, tar will attempt to create file system entries with whatever\n * mode is provided, and let the implicit process `umask` apply normally, but\n * if a file already exists to be written to, then its existing mode will not\n * be modified.\n *\n * When setting `chmod: true`, it is highly recommend to set the\n * {@link TarOptions#processUmask} option as well, to avoid the call to the\n * deprecated (and thread-unsafe) `process.umask()` method.\n */\n chmod?: boolean\n\n /**\n * When setting the {@link TarOptions#chmod} option to `true`, you may\n * provide a value here to avoid having to call the deprecated and\n * thread-unsafe `process.umask()` method.\n *\n * This has no effect with `chmod` is not set to true, as mode values are not\n * set explicitly anyway. If `chmod` is set to `true`, and a value is not\n * provided here, then `process.umask()` must be called, which will result in\n * deprecation warnings.\n *\n * The most common values for this are `0o22` (resulting in directories\n * created with mode `0o755` and files with `0o644` by default) and `0o2`\n * (resulting in directores created with mode `0o775` and files `0o664`, so\n * they are group-writable).\n */\n processUmask?: number\n\n //////////////////////////\n // archive creation options\n\n /**\n * When parsing/listing archives, `entry` streams are by default resumed\n * (set into \"flowing\" mode) immediately after the call to `onReadEntry()`.\n * Set `noResume: true` to suppress this behavior.\n *\n * Note that when this is set, the stream will never complete until the\n * data is consumed somehow.\n *\n * Set automatically in extract operations, since the entry is piped to\n * a file system entry right away. Only relevant when parsing.\n */\n noResume?: boolean\n\n /**\n * When creating, updating, or replacing within archives, this method will\n * be called with each WriteEntry that is created.\n */\n onWriteEntry?: (entry: WriteEntry) => any\n\n /**\n * When extracting or listing archives, this method will be called with\n * each entry that is not excluded by a `filter`.\n *\n * Important when listing archives synchronously from a file, because there\n * is otherwise no way to interact with the data!\n */\n onReadEntry?: (entry: ReadEntry) => any\n\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n follow?: boolean\n\n /**\n * When creating archives, omit any metadata that is system-specific:\n * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and\n * `nlink`. Note that `mtime` is still included, because this is necessary\n * for other time-based operations such as `tar.update`. Additionally, `mode`\n * is set to a \"reasonable default\" for mose unix systems, based on an\n * effective `umask` of `0o22`.\n *\n * This also defaults the `portable` option in the gzip configs when creating\n * a compressed archive, in order to produce deterministic archives that are\n * not operating-system specific.\n */\n portable?: boolean\n\n /**\n * When creating archives, do not recursively archive the contents of\n * directories. By default, archiving a directory archives all of its\n * contents as well.\n */\n noDirRecurse?: boolean\n\n /**\n * Suppress Pax extended headers when creating archives. Note that this means\n * long paths and linkpaths will be truncated, and large or negative numeric\n * values may be interpreted incorrectly.\n */\n noPax?: boolean\n\n /**\n * Set to a `Date` object to force a specific `mtime` value for everything\n * written to an archive.\n *\n * This is useful when creating archives that are intended to be\n * deterministic based on their contents, irrespective of the file's last\n * modification time.\n *\n * Overridden by `noMtime`.\n */\n mtime?: Date\n\n /**\n * A path portion to prefix onto the entries added to an archive.\n */\n prefix?: string\n\n /**\n * The mode to set on any created file archive, defaults to 0o666\n * masked by the process umask, often resulting in 0o644.\n *\n * This does *not* affect the mode fields of individual entries, or the\n * mode status of extracted entries on the filesystem.\n */\n mode?: number\n\n //////////////////////////\n // internal options\n\n /**\n * A cache of mtime values, to avoid having to stat the same file repeatedly.\n *\n * @internal\n */\n mtimeCache?: Map\n\n /**\n * maximum buffer size for `fs.read()` operations.\n *\n * @internal\n */\n maxReadSize?: number\n\n /**\n * Filter modes of entries being unpacked, like `process.umask()`\n *\n * @internal\n */\n umask?: number\n\n /**\n * Default mode for directories. Used for all implicitly created directories,\n * and any directories in the archive that do not have a mode field.\n *\n * @internal\n */\n dmode?: number\n\n /**\n * default mode for files\n *\n * @internal\n */\n fmode?: number\n\n /**\n * Map that tracks which directories already exist, for extraction\n *\n * @internal\n */\n dirCache?: Map\n /**\n * maximum supported size of meta entries. Defaults to 1MB\n *\n * @internal\n */\n maxMetaEntrySize?: number\n\n /**\n * A Map object containing the device and inode value for any file whose\n * `nlink` value is greater than 1, to identify hard links when creating\n * archives.\n *\n * @internal\n */\n linkCache?: Map\n\n /**\n * A map object containing the results of `fs.readdir()` calls.\n *\n * @internal\n */\n readdirCache?: Map\n\n /**\n * A cache of all `lstat` results, for use in creating archives.\n *\n * @internal\n */\n statCache?: Map\n\n /**\n * Number of concurrent jobs to run when creating archives.\n *\n * Defaults to 4.\n *\n * @internal\n */\n jobs?: number\n\n /**\n * Automatically set to true on Windows systems.\n *\n * When extracting, causes behavior where filenames containing `<|>?:`\n * characters are converted to windows-compatible escape sequences in the\n * created filesystem entries.\n *\n * When packing, causes behavior where paths replace `\\` with `/`, and\n * filenames containing the windows-compatible escaped forms of `<|>?:` are\n * converted to actual `<|>?:` characters in the archive.\n *\n * @internal\n */\n win32?: boolean\n\n /**\n * For `WriteEntry` objects, the absolute path to the entry on the\n * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be\n * overridden explicitly.\n *\n * @internal\n */\n absolute?: string\n\n /**\n * Used with Parser stream interface, to attach and take over when the\n * stream is completely parsed. If this is set, then the prefinish,\n * finish, and end events will not fire, and are the responsibility of\n * the ondone method to emit properly.\n *\n * @internal\n */\n ondone?: () => void\n\n /**\n * Mostly for testing, but potentially useful in some cases.\n * Forcibly trigger a chown on every entry, no matter what.\n */\n forceChown?: boolean\n\n /**\n * ambiguous deprecated name for {@link onReadEntry}\n *\n * @deprecated\n */\n onentry?: (entry: ReadEntry) => any\n}\n\nexport type TarOptionsSync = TarOptions & { sync: true }\nexport type TarOptionsAsync = TarOptions & { sync?: false }\nexport type TarOptionsFile = TarOptions & { file: string }\nexport type TarOptionsNoFile = TarOptions & { file?: undefined }\nexport type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile\nexport type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile\nexport type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile\nexport type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile\n\nexport type LinkCacheKey = `${number}:${number}`\n\nexport interface TarOptionsWithAliases extends TarOptions {\n /**\n * The effective current working directory for this tar command\n */\n C?: TarOptions['cwd']\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n f?: TarOptions['file']\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n z?: TarOptions['gzip']\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n P?: TarOptions['preservePaths']\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n U?: TarOptions['unlink']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n 'strip-components'?: TarOptions['strip']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n stripComponents?: TarOptions['strip']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewer?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer-files'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewerFiles?: TarOptions['newer']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n k?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n 'keep-existing'?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keepExisting?: TarOptions['keep']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n m?: TarOptions['noMtime']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n 'no-mtime'?: TarOptions['noMtime']\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n p?: TarOptions['preserveOwner']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n L?: TarOptions['follow']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n h?: TarOptions['follow']\n\n /**\n * Deprecated option. Set explicitly false to set `chmod: true`. Ignored\n * if {@link TarOptions#chmod} is set to any boolean value.\n *\n * @deprecated\n */\n noChmod?: boolean\n}\n\nexport type TarOptionsWithAliasesSync = TarOptionsWithAliases & {\n sync: true\n}\nexport type TarOptionsWithAliasesAsync = TarOptionsWithAliases & {\n sync?: false\n}\nexport type TarOptionsWithAliasesFile =\n | (TarOptionsWithAliases & {\n file: string\n })\n | (TarOptionsWithAliases & { f: string })\nexport type TarOptionsWithAliasesSyncFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesFile\nexport type TarOptionsWithAliasesAsyncFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile\n\nexport type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & {\n f?: undefined\n file?: undefined\n}\n\nexport type TarOptionsWithAliasesSyncNoFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile\nexport type TarOptionsWithAliasesAsyncNoFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile\n\nexport const isSyncFile = (\n o: O,\n): o is O & TarOptionsSyncFile => !!o.sync && !!o.file\nexport const isAsyncFile = (\n o: O,\n): o is O & TarOptionsAsyncFile => !o.sync && !!o.file\nexport const isSyncNoFile = (\n o: O,\n): o is O & TarOptionsSyncNoFile => !!o.sync && !o.file\nexport const isAsyncNoFile = (\n o: O,\n): o is O & TarOptionsAsyncNoFile => !o.sync && !o.file\nexport const isSync = (\n o: O,\n): o is O & TarOptionsSync => !!o.sync\nexport const isAsync = (\n o: O,\n): o is O & TarOptionsAsync => !o.sync\nexport const isFile = (\n o: O,\n): o is O & TarOptionsFile => !!o.file\nexport const isNoFile = (\n o: O,\n): o is O & TarOptionsNoFile => !o.file\n\nconst dealiasKey = (\n k: keyof TarOptionsWithAliases,\n): keyof TarOptions => {\n const d = argmap.get(k)\n if (d) return d\n return k as keyof TarOptions\n}\n\nexport const dealias = (\n opt: TarOptionsWithAliases = {},\n): TarOptions => {\n if (!opt) return {}\n const result: Record = {}\n for (const [key, v] of Object.entries(opt) as [\n keyof TarOptionsWithAliases,\n any,\n ][]) {\n // TS doesn't know that aliases are going to always be the same type\n const k = dealiasKey(key)\n result[k] = v\n }\n // affordance for deprecated noChmod -> chmod\n if (result.chmod === undefined && result.noChmod === false) {\n result.chmod = true\n }\n delete result.noChmod\n return result as TarOptions\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.d.ts b/node_modules/tar/dist/commonjs/pack.d.ts new file mode 100644 index 0000000..a3e0395 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.d.ts @@ -0,0 +1,102 @@ +/// +/// +import { type Stats } from 'fs'; +import { WriteEntry, WriteEntrySync, WriteEntryTar } from './write-entry.js'; +export declare class PackJob { + path: string; + absolute: string; + entry?: WriteEntry | WriteEntryTar; + stat?: Stats; + readdir?: string[]; + pending: boolean; + ignore: boolean; + piped: boolean; + constructor(path: string, absolute: string); +} +import { Minipass } from 'minipass'; +import * as zlib from 'minizlib'; +import { Yallist } from 'yallist'; +import { ReadEntry } from './read-entry.js'; +import { WarnEvent, type WarnData, type Warner } from './warn-method.js'; +declare const ONSTAT: unique symbol; +declare const ENDED: unique symbol; +declare const QUEUE: unique symbol; +declare const CURRENT: unique symbol; +declare const PROCESS: unique symbol; +declare const PROCESSING: unique symbol; +declare const PROCESSJOB: unique symbol; +declare const JOBS: unique symbol; +declare const JOBDONE: unique symbol; +declare const ADDFSENTRY: unique symbol; +declare const ADDTARENTRY: unique symbol; +declare const STAT: unique symbol; +declare const READDIR: unique symbol; +declare const ONREADDIR: unique symbol; +declare const PIPE: unique symbol; +declare const ENTRY: unique symbol; +declare const ENTRYOPT: unique symbol; +declare const WRITEENTRYCLASS: unique symbol; +declare const WRITE: unique symbol; +declare const ONDRAIN: unique symbol; +import { TarOptions } from './options.js'; +export declare class Pack extends Minipass> implements Warner { + opt: TarOptions; + cwd: string; + maxReadSize?: number; + preservePaths: boolean; + strict: boolean; + noPax: boolean; + prefix: string; + linkCache: Exclude; + statCache: Exclude; + file: string; + portable: boolean; + zip?: zlib.BrotliCompress | zlib.Gzip; + readdirCache: Exclude; + noDirRecurse: boolean; + follow: boolean; + noMtime: boolean; + mtime?: Date; + filter: Exclude; + jobs: number; + [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync; + onWriteEntry?: (entry: WriteEntry) => void; + [QUEUE]: Yallist; + [JOBS]: number; + [PROCESSING]: boolean; + [ENDED]: boolean; + constructor(opt?: TarOptions); + [WRITE](chunk: Buffer): boolean; + add(path: string | ReadEntry): this; + end(cb?: () => void): this; + end(path: string | ReadEntry, cb?: () => void): this; + end(path: string | ReadEntry, encoding?: Minipass.Encoding, cb?: () => void): this; + write(path: string | ReadEntry): boolean; + [ADDTARENTRY](p: ReadEntry): void; + [ADDFSENTRY](p: string): void; + [STAT](job: PackJob): void; + [ONSTAT](job: PackJob, stat: Stats): void; + [READDIR](job: PackJob): void; + [ONREADDIR](job: PackJob, entries: string[]): void; + [PROCESS](): void; + get [CURRENT](): PackJob | undefined; + [JOBDONE](_job: PackJob): void; + [PROCESSJOB](job: PackJob): void; + [ENTRYOPT](job: PackJob): TarOptions; + [ENTRY](job: PackJob): WriteEntry | undefined; + [ONDRAIN](): void; + [PIPE](job: PackJob): void; + pause(): void; + warn(code: string, message: string | Error, data?: WarnData): void; +} +export declare class PackSync extends Pack { + sync: true; + constructor(opt: TarOptions); + pause(): void; + resume(): void; + [STAT](job: PackJob): void; + [READDIR](job: PackJob): void; + [PIPE](job: PackJob): void; +} +export {}; +//# sourceMappingURL=pack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.d.ts.map b/node_modules/tar/dist/commonjs/pack.d.ts.map new file mode 100644 index 0000000..bc8e9f0 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":";;AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,qBAAa,OAAO;IAClB,IAAI,EAAE,MAAM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AG,UAAU;IAmBpC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,OAAO;IAepB,CAAC,OAAO,CAAC;IAOT,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAgCnB,KAAK;IAML,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GAAG,KAAK,EACvB,IAAI,GAAE,QAAa,GAClB,IAAI;CAGR;AAED,qBAAa,QAAS,SAAQ,IAAI;IAChC,IAAI,EAAE,IAAI,CAAO;gBACL,GAAG,EAAE,UAAU;IAM3B,KAAK;IACL,MAAM;IAEN,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAKnB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAKtB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;CA0BpB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.js b/node_modules/tar/dist/commonjs/pack.js new file mode 100644 index 0000000..303e930 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.js @@ -0,0 +1,477 @@ +"use strict"; +// A readable tar stream creator +// Technically, this is a transform stream that you write paths into, +// and tar format comes out of. +// The `add()` method is like `write()` but returns this, +// and end() return `this` as well, so you can +// do `new Pack(opt).add('files').add('dir').end().pipe(output) +// You could also do something like: +// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar')) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PackSync = exports.Pack = exports.PackJob = void 0; +const fs_1 = __importDefault(require("fs")); +const write_entry_js_1 = require("./write-entry.js"); +class PackJob { + path; + absolute; + entry; + stat; + readdir; + pending = false; + ignore = false; + piped = false; + constructor(path, absolute) { + this.path = path || './'; + this.absolute = absolute; + } +} +exports.PackJob = PackJob; +const minipass_1 = require("minipass"); +const zlib = __importStar(require("minizlib")); +const yallist_1 = require("yallist"); +const read_entry_js_1 = require("./read-entry.js"); +const warn_method_js_1 = require("./warn-method.js"); +const EOF = Buffer.alloc(1024); +const ONSTAT = Symbol('onStat'); +const ENDED = Symbol('ended'); +const QUEUE = Symbol('queue'); +const CURRENT = Symbol('current'); +const PROCESS = Symbol('process'); +const PROCESSING = Symbol('processing'); +const PROCESSJOB = Symbol('processJob'); +const JOBS = Symbol('jobs'); +const JOBDONE = Symbol('jobDone'); +const ADDFSENTRY = Symbol('addFSEntry'); +const ADDTARENTRY = Symbol('addTarEntry'); +const STAT = Symbol('stat'); +const READDIR = Symbol('readdir'); +const ONREADDIR = Symbol('onreaddir'); +const PIPE = Symbol('pipe'); +const ENTRY = Symbol('entry'); +const ENTRYOPT = Symbol('entryOpt'); +const WRITEENTRYCLASS = Symbol('writeEntryClass'); +const WRITE = Symbol('write'); +const ONDRAIN = Symbol('ondrain'); +const path_1 = __importDefault(require("path")); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +class Pack extends minipass_1.Minipass { + opt; + cwd; + maxReadSize; + preservePaths; + strict; + noPax; + prefix; + linkCache; + statCache; + file; + portable; + zip; + readdirCache; + noDirRecurse; + follow; + noMtime; + mtime; + filter; + jobs; + [WRITEENTRYCLASS]; + onWriteEntry; + [QUEUE]; + [JOBS] = 0; + [PROCESSING] = false; + [ENDED] = false; + constructor(opt = {}) { + //@ts-ignore + super(); + this.opt = opt; + this.file = opt.file || ''; + this.cwd = opt.cwd || process.cwd(); + this.maxReadSize = opt.maxReadSize; + this.preservePaths = !!opt.preservePaths; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.prefix = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.prefix || ''); + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.readdirCache = opt.readdirCache || new Map(); + this.onWriteEntry = opt.onWriteEntry; + this[WRITEENTRYCLASS] = write_entry_js_1.WriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + this.portable = !!opt.portable; + if (opt.gzip || opt.brotli) { + if (opt.gzip && opt.brotli) { + throw new TypeError('gzip and brotli are mutually exclusive'); + } + if (opt.gzip) { + if (typeof opt.gzip !== 'object') { + opt.gzip = {}; + } + if (this.portable) { + opt.gzip.portable = true; + } + this.zip = new zlib.Gzip(opt.gzip); + } + if (opt.brotli) { + if (typeof opt.brotli !== 'object') { + opt.brotli = {}; + } + this.zip = new zlib.BrotliCompress(opt.brotli); + } + /* c8 ignore next */ + if (!this.zip) + throw new Error('impossible'); + const zip = this.zip; + zip.on('data', chunk => super.write(chunk)); + zip.on('end', () => super.end()); + zip.on('drain', () => this[ONDRAIN]()); + this.on('resume', () => zip.resume()); + } + else { + this.on('drain', this[ONDRAIN]); + } + this.noDirRecurse = !!opt.noDirRecurse; + this.follow = !!opt.follow; + this.noMtime = !!opt.noMtime; + if (opt.mtime) + this.mtime = opt.mtime; + this.filter = + typeof opt.filter === 'function' ? opt.filter : () => true; + this[QUEUE] = new yallist_1.Yallist(); + this[JOBS] = 0; + this.jobs = Number(opt.jobs) || 4; + this[PROCESSING] = false; + this[ENDED] = false; + } + [WRITE](chunk) { + return super.write(chunk); + } + add(path) { + this.write(path); + return this; + } + end(path, encoding, cb) { + /* c8 ignore start */ + if (typeof path === 'function') { + cb = path; + path = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + /* c8 ignore stop */ + if (path) { + this.add(path); + } + this[ENDED] = true; + this[PROCESS](); + /* c8 ignore next */ + if (cb) + cb(); + return this; + } + write(path) { + if (this[ENDED]) { + throw new Error('write after end'); + } + if (path instanceof read_entry_js_1.ReadEntry) { + this[ADDTARENTRY](path); + } + else { + this[ADDFSENTRY](path); + } + return this.flowing; + } + [ADDTARENTRY](p) { + const absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.resolve(this.cwd, p.path)); + // in this case, we don't have to wait for the stat + if (!this.filter(p.path, p)) { + p.resume(); + } + else { + const job = new PackJob(p.path, absolute); + job.entry = new write_entry_js_1.WriteEntryTar(p, this[ENTRYOPT](job)); + job.entry.on('end', () => this[JOBDONE](job)); + this[JOBS] += 1; + this[QUEUE].push(job); + } + this[PROCESS](); + } + [ADDFSENTRY](p) { + const absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.resolve(this.cwd, p)); + this[QUEUE].push(new PackJob(p, absolute)); + this[PROCESS](); + } + [STAT](job) { + job.pending = true; + this[JOBS] += 1; + const stat = this.follow ? 'stat' : 'lstat'; + fs_1.default[stat](job.absolute, (er, stat) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + this.emit('error', er); + } + else { + this[ONSTAT](job, stat); + } + }); + } + [ONSTAT](job, stat) { + this.statCache.set(job.absolute, stat); + job.stat = stat; + // now we have the stat, we can filter it. + if (!this.filter(job.path, stat)) { + job.ignore = true; + } + this[PROCESS](); + } + [READDIR](job) { + job.pending = true; + this[JOBS] += 1; + fs_1.default.readdir(job.absolute, (er, entries) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + return this.emit('error', er); + } + this[ONREADDIR](job, entries); + }); + } + [ONREADDIR](job, entries) { + this.readdirCache.set(job.absolute, entries); + job.readdir = entries; + this[PROCESS](); + } + [PROCESS]() { + if (this[PROCESSING]) { + return; + } + this[PROCESSING] = true; + for (let w = this[QUEUE].head; !!w && this[JOBS] < this.jobs; w = w.next) { + this[PROCESSJOB](w.value); + if (w.value.ignore) { + const p = w.next; + this[QUEUE].removeNode(w); + w.next = p; + } + } + this[PROCESSING] = false; + if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) { + if (this.zip) { + this.zip.end(EOF); + } + else { + super.write(EOF); + super.end(); + } + } + } + get [CURRENT]() { + return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value; + } + [JOBDONE](_job) { + this[QUEUE].shift(); + this[JOBS] -= 1; + this[PROCESS](); + } + [PROCESSJOB](job) { + if (job.pending) { + return; + } + if (job.entry) { + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + return; + } + if (!job.stat) { + const sc = this.statCache.get(job.absolute); + if (sc) { + this[ONSTAT](job, sc); + } + else { + this[STAT](job); + } + } + if (!job.stat) { + return; + } + // filtered out! + if (job.ignore) { + return; + } + if (!this.noDirRecurse && + job.stat.isDirectory() && + !job.readdir) { + const rc = this.readdirCache.get(job.absolute); + if (rc) { + this[ONREADDIR](job, rc); + } + else { + this[READDIR](job); + } + if (!job.readdir) { + return; + } + } + // we know it doesn't have an entry, because that got checked above + job.entry = this[ENTRY](job); + if (!job.entry) { + job.ignore = true; + return; + } + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + } + [ENTRYOPT](job) { + return { + onwarn: (code, msg, data) => this.warn(code, msg, data), + noPax: this.noPax, + cwd: this.cwd, + absolute: job.absolute, + preservePaths: this.preservePaths, + maxReadSize: this.maxReadSize, + strict: this.strict, + portable: this.portable, + linkCache: this.linkCache, + statCache: this.statCache, + noMtime: this.noMtime, + mtime: this.mtime, + prefix: this.prefix, + onWriteEntry: this.onWriteEntry, + }; + } + [ENTRY](job) { + this[JOBS] += 1; + try { + const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); + return e + .on('end', () => this[JOBDONE](job)) + .on('error', er => this.emit('error', er)); + } + catch (er) { + this.emit('error', er); + } + } + [ONDRAIN]() { + if (this[CURRENT] && this[CURRENT].entry) { + this[CURRENT].entry.resume(); + } + } + // like .pipe() but using super, because our write() is special + [PIPE](job) { + job.piped = true; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + const source = job.entry; + const zip = this.zip; + /* c8 ignore start */ + if (!source) + throw new Error('cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + if (!zip.write(chunk)) { + source.pause(); + } + }); + } + else { + source.on('data', chunk => { + if (!super.write(chunk)) { + source.pause(); + } + }); + } + } + pause() { + if (this.zip) { + this.zip.pause(); + } + return super.pause(); + } + warn(code, message, data = {}) { + (0, warn_method_js_1.warnMethod)(this, code, message, data); + } +} +exports.Pack = Pack; +class PackSync extends Pack { + sync = true; + constructor(opt) { + super(opt); + this[WRITEENTRYCLASS] = write_entry_js_1.WriteEntrySync; + } + // pause/resume are no-ops in sync streams. + pause() { } + resume() { } + [STAT](job) { + const stat = this.follow ? 'statSync' : 'lstatSync'; + this[ONSTAT](job, fs_1.default[stat](job.absolute)); + } + [READDIR](job) { + this[ONREADDIR](job, fs_1.default.readdirSync(job.absolute)); + } + // gotta get it all in this tick + [PIPE](job) { + const source = job.entry; + const zip = this.zip; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + /* c8 ignore start */ + if (!source) + throw new Error('Cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + zip.write(chunk); + }); + } + else { + source.on('data', chunk => { + super[WRITE](chunk); + }); + } + } +} +exports.PackSync = PackSync; +//# sourceMappingURL=pack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pack.js.map b/node_modules/tar/dist/commonjs/pack.js.map new file mode 100644 index 0000000..b17f28d --- /dev/null +++ b/node_modules/tar/dist/commonjs/pack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.js","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,qEAAqE;AACrE,+BAA+B;AAC/B,yDAAyD;AACzD,8CAA8C;AAC9C,+DAA+D;AAC/D,oCAAoC;AACpC,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvE,4CAAmC;AACnC,qDAIyB;AAEzB,MAAa,OAAO;IAClB,IAAI,CAAQ;IACZ,QAAQ,CAAQ;IAChB,KAAK,CAA6B;IAClC,IAAI,CAAQ;IACZ,OAAO,CAAW;IAClB,OAAO,GAAY,KAAK,CAAA;IACxB,MAAM,GAAY,KAAK,CAAA;IACvB,KAAK,GAAY,KAAK,CAAA;IACtB,YAAY,IAAY,EAAE,QAAgB;QACxC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;CACF;AAbD,0BAaC;AAED,uCAAmC;AACnC,+CAAgC;AAChC,qCAAiC;AACjC,mDAA2C;AAC3C,qDAKyB;AAEzB,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,UAAU,GAAG,M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CAAC,UAAU,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAA;YAChC,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,qBAAqB;QACrB,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;QAC1D,oBAAoB;QAEpB,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAClB,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAA;YACrB,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AA/CD,4BA+CC","sourcesContent":["// A readable tar stream creator\n// Technically, this is a transform stream that you write paths into,\n// and tar format comes out of.\n// The `add()` method is like `write()` but returns this,\n// and end() return `this` as well, so you can\n// do `new Pack(opt).add('files').add('dir').end().pipe(output)\n// You could also do something like:\n// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))\n\nimport fs, { type Stats } from 'fs'\nimport {\n WriteEntry,\n WriteEntrySync,\n WriteEntryTar,\n} from './write-entry.js'\n\nexport class PackJob {\n path: string\n absolute: string\n entry?: WriteEntry | WriteEntryTar\n stat?: Stats\n readdir?: string[]\n pending: boolean = false\n ignore: boolean = false\n piped: boolean = false\n constructor(path: string, absolute: string) {\n this.path = path || './'\n this.absolute = absolute\n }\n}\n\nimport { Minipass } from 'minipass'\nimport * as zlib from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { ReadEntry } from './read-entry.js'\nimport {\n WarnEvent,\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst EOF = Buffer.alloc(1024)\nconst ONSTAT = Symbol('onStat')\nconst ENDED = Symbol('ended')\nconst QUEUE = Symbol('queue')\nconst CURRENT = Symbol('current')\nconst PROCESS = Symbol('process')\nconst PROCESSING = Symbol('processing')\nconst PROCESSJOB = Symbol('processJob')\nconst JOBS = Symbol('jobs')\nconst JOBDONE = Symbol('jobDone')\nconst ADDFSENTRY = Symbol('addFSEntry')\nconst ADDTARENTRY = Symbol('addTarEntry')\nconst STAT = Symbol('stat')\nconst READDIR = Symbol('readdir')\nconst ONREADDIR = Symbol('onreaddir')\nconst PIPE = Symbol('pipe')\nconst ENTRY = Symbol('entry')\nconst ENTRYOPT = Symbol('entryOpt')\nconst WRITEENTRYCLASS = Symbol('writeEntryClass')\nconst WRITE = Symbol('write')\nconst ONDRAIN = Symbol('ondrain')\n\nimport path from 'path'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { TarOptions } from './options.js'\n\nexport class Pack\n extends Minipass>\n implements Warner\n{\n opt: TarOptions\n cwd: string\n maxReadSize?: number\n preservePaths: boolean\n strict: boolean\n noPax: boolean\n prefix: string\n linkCache: Exclude\n statCache: Exclude\n file: string\n portable: boolean\n zip?: zlib.BrotliCompress | zlib.Gzip\n readdirCache: Exclude\n noDirRecurse: boolean\n follow: boolean\n noMtime: boolean\n mtime?: Date\n filter: Exclude\n jobs: number;\n\n [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync\n onWriteEntry?: (entry: WriteEntry) => void;\n [QUEUE]: Yallist;\n [JOBS]: number = 0;\n [PROCESSING]: boolean = false;\n [ENDED]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n //@ts-ignore\n super()\n this.opt = opt\n this.file = opt.file || ''\n this.cwd = opt.cwd || process.cwd()\n this.maxReadSize = opt.maxReadSize\n this.preservePaths = !!opt.preservePaths\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.prefix = normalizeWindowsPath(opt.prefix || '')\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.readdirCache = opt.readdirCache || new Map()\n this.onWriteEntry = opt.onWriteEntry\n\n this[WRITEENTRYCLASS] = WriteEntry\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n this.portable = !!opt.portable\n\n if (opt.gzip || opt.brotli) {\n if (opt.gzip && opt.brotli) {\n throw new TypeError('gzip and brotli are mutually exclusive')\n }\n if (opt.gzip) {\n if (typeof opt.gzip !== 'object') {\n opt.gzip = {}\n }\n if (this.portable) {\n opt.gzip.portable = true\n }\n this.zip = new zlib.Gzip(opt.gzip)\n }\n if (opt.brotli) {\n if (typeof opt.brotli !== 'object') {\n opt.brotli = {}\n }\n this.zip = new zlib.BrotliCompress(opt.brotli)\n }\n /* c8 ignore next */\n if (!this.zip) throw new Error('impossible')\n const zip = this.zip\n zip.on('data', chunk => super.write(chunk as unknown as string))\n zip.on('end', () => super.end())\n zip.on('drain', () => this[ONDRAIN]())\n this.on('resume', () => zip.resume())\n } else {\n this.on('drain', this[ONDRAIN])\n }\n\n this.noDirRecurse = !!opt.noDirRecurse\n this.follow = !!opt.follow\n this.noMtime = !!opt.noMtime\n if (opt.mtime) this.mtime = opt.mtime\n\n this.filter =\n typeof opt.filter === 'function' ? opt.filter : () => true\n\n this[QUEUE] = new Yallist()\n this[JOBS] = 0\n this.jobs = Number(opt.jobs) || 4\n this[PROCESSING] = false\n this[ENDED] = false\n }\n\n [WRITE](chunk: Buffer) {\n return super.write(chunk as unknown as string)\n }\n\n add(path: string | ReadEntry) {\n this.write(path)\n return this\n }\n\n end(cb?: () => void): this\n end(path: string | ReadEntry, cb?: () => void): this\n end(\n path: string | ReadEntry,\n encoding?: Minipass.Encoding,\n cb?: () => void,\n ): this\n end(\n path?: string | ReadEntry | (() => void),\n encoding?: Minipass.Encoding | (() => void),\n cb?: () => void,\n ) {\n /* c8 ignore start */\n if (typeof path === 'function') {\n cb = path\n path = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n /* c8 ignore stop */\n if (path) {\n this.add(path)\n }\n this[ENDED] = true\n this[PROCESS]()\n /* c8 ignore next */\n if (cb) cb()\n return this\n }\n\n write(path: string | ReadEntry) {\n if (this[ENDED]) {\n throw new Error('write after end')\n }\n\n if (path instanceof ReadEntry) {\n this[ADDTARENTRY](path)\n } else {\n this[ADDFSENTRY](path)\n }\n return this.flowing\n }\n\n [ADDTARENTRY](p: ReadEntry) {\n const absolute = normalizeWindowsPath(\n path.resolve(this.cwd, p.path),\n )\n // in this case, we don't have to wait for the stat\n if (!this.filter(p.path, p)) {\n p.resume()\n } else {\n const job = new PackJob(p.path, absolute)\n job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))\n job.entry.on('end', () => this[JOBDONE](job))\n this[JOBS] += 1\n this[QUEUE].push(job)\n }\n\n this[PROCESS]()\n }\n\n [ADDFSENTRY](p: string) {\n const absolute = normalizeWindowsPath(path.resolve(this.cwd, p))\n this[QUEUE].push(new PackJob(p, absolute))\n this[PROCESS]()\n }\n\n [STAT](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n const stat = this.follow ? 'stat' : 'lstat'\n fs[stat](job.absolute, (er, stat) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n this.emit('error', er)\n } else {\n this[ONSTAT](job, stat)\n }\n })\n }\n\n [ONSTAT](job: PackJob, stat: Stats) {\n this.statCache.set(job.absolute, stat)\n job.stat = stat\n\n // now we have the stat, we can filter it.\n if (!this.filter(job.path, stat)) {\n job.ignore = true\n }\n\n this[PROCESS]()\n }\n\n [READDIR](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n fs.readdir(job.absolute, (er, entries) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADDIR](job, entries)\n })\n }\n\n [ONREADDIR](job: PackJob, entries: string[]) {\n this.readdirCache.set(job.absolute, entries)\n job.readdir = entries\n this[PROCESS]()\n }\n\n [PROCESS]() {\n if (this[PROCESSING]) {\n return\n }\n\n this[PROCESSING] = true\n for (\n let w = this[QUEUE].head;\n !!w && this[JOBS] < this.jobs;\n w = w.next\n ) {\n this[PROCESSJOB](w.value)\n if (w.value.ignore) {\n const p = w.next\n this[QUEUE].removeNode(w)\n w.next = p\n }\n }\n\n this[PROCESSING] = false\n\n if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {\n if (this.zip) {\n this.zip.end(EOF)\n } else {\n super.write(EOF as unknown as string)\n super.end()\n }\n }\n }\n\n get [CURRENT]() {\n return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value\n }\n\n [JOBDONE](_job: PackJob) {\n this[QUEUE].shift()\n this[JOBS] -= 1\n this[PROCESS]()\n }\n\n [PROCESSJOB](job: PackJob) {\n if (job.pending) {\n return\n }\n\n if (job.entry) {\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n return\n }\n\n if (!job.stat) {\n const sc = this.statCache.get(job.absolute)\n if (sc) {\n this[ONSTAT](job, sc)\n } else {\n this[STAT](job)\n }\n }\n if (!job.stat) {\n return\n }\n\n // filtered out!\n if (job.ignore) {\n return\n }\n\n if (\n !this.noDirRecurse &&\n job.stat.isDirectory() &&\n !job.readdir\n ) {\n const rc = this.readdirCache.get(job.absolute)\n if (rc) {\n this[ONREADDIR](job, rc)\n } else {\n this[READDIR](job)\n }\n if (!job.readdir) {\n return\n }\n }\n\n // we know it doesn't have an entry, because that got checked above\n job.entry = this[ENTRY](job)\n if (!job.entry) {\n job.ignore = true\n return\n }\n\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n }\n\n [ENTRYOPT](job: PackJob): TarOptions {\n return {\n onwarn: (code, msg, data) => this.warn(code, msg, data),\n noPax: this.noPax,\n cwd: this.cwd,\n absolute: job.absolute,\n preservePaths: this.preservePaths,\n maxReadSize: this.maxReadSize,\n strict: this.strict,\n portable: this.portable,\n linkCache: this.linkCache,\n statCache: this.statCache,\n noMtime: this.noMtime,\n mtime: this.mtime,\n prefix: this.prefix,\n onWriteEntry: this.onWriteEntry,\n }\n }\n\n [ENTRY](job: PackJob) {\n this[JOBS] += 1\n try {\n const e = new this[WRITEENTRYCLASS](\n job.path,\n this[ENTRYOPT](job),\n )\n return e\n .on('end', () => this[JOBDONE](job))\n .on('error', er => this.emit('error', er))\n } catch (er) {\n this.emit('error', er)\n }\n }\n\n [ONDRAIN]() {\n if (this[CURRENT] && this[CURRENT].entry) {\n this[CURRENT].entry.resume()\n }\n }\n\n // like .pipe() but using super, because our write() is special\n [PIPE](job: PackJob) {\n job.piped = true\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n const source = job.entry\n const zip = this.zip\n /* c8 ignore start */\n if (!source) throw new Error('cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n if (!zip.write(chunk)) {\n source.pause()\n }\n })\n } else {\n source.on('data', chunk => {\n if (!super.write(chunk as unknown as string)) {\n source.pause()\n }\n })\n }\n }\n\n pause() {\n if (this.zip) {\n this.zip.pause()\n }\n return super.pause()\n }\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n}\n\nexport class PackSync extends Pack {\n sync: true = true\n constructor(opt: TarOptions) {\n super(opt)\n this[WRITEENTRYCLASS] = WriteEntrySync\n }\n\n // pause/resume are no-ops in sync streams.\n pause() {}\n resume() {}\n\n [STAT](job: PackJob) {\n const stat = this.follow ? 'statSync' : 'lstatSync'\n this[ONSTAT](job, fs[stat](job.absolute))\n }\n\n [READDIR](job: PackJob) {\n this[ONREADDIR](job, fs.readdirSync(job.absolute))\n }\n\n // gotta get it all in this tick\n [PIPE](job: PackJob) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n /* c8 ignore start */\n if (!source) throw new Error('Cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n zip.write(chunk)\n })\n } else {\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/package.json b/node_modules/tar/dist/commonjs/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/node_modules/tar/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/tar/dist/commonjs/parse.d.ts b/node_modules/tar/dist/commonjs/parse.d.ts new file mode 100644 index 0000000..b747ae8 --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.d.ts @@ -0,0 +1,87 @@ +/// +/// +import { EventEmitter as EE } from 'events'; +import { BrotliDecompress, Unzip } from 'minizlib'; +import { Yallist } from 'yallist'; +import { TarOptions } from './options.js'; +import { Pax } from './pax.js'; +import { ReadEntry } from './read-entry.js'; +import { type WarnData, type Warner } from './warn-method.js'; +declare const STATE: unique symbol; +declare const WRITEENTRY: unique symbol; +declare const READENTRY: unique symbol; +declare const NEXTENTRY: unique symbol; +declare const PROCESSENTRY: unique symbol; +declare const EX: unique symbol; +declare const GEX: unique symbol; +declare const META: unique symbol; +declare const EMITMETA: unique symbol; +declare const BUFFER: unique symbol; +declare const QUEUE: unique symbol; +declare const ENDED: unique symbol; +declare const EMITTEDEND: unique symbol; +declare const EMIT: unique symbol; +declare const UNZIP: unique symbol; +declare const CONSUMECHUNK: unique symbol; +declare const CONSUMECHUNKSUB: unique symbol; +declare const CONSUMEBODY: unique symbol; +declare const CONSUMEMETA: unique symbol; +declare const CONSUMEHEADER: unique symbol; +declare const CONSUMING: unique symbol; +declare const BUFFERCONCAT: unique symbol; +declare const MAYBEEND: unique symbol; +declare const WRITING: unique symbol; +declare const ABORTED: unique symbol; +declare const SAW_VALID_ENTRY: unique symbol; +declare const SAW_NULL_BLOCK: unique symbol; +declare const SAW_EOF: unique symbol; +declare const CLOSESTREAM: unique symbol; +export type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'; +export declare class Parser extends EE implements Warner { + file: string; + strict: boolean; + maxMetaEntrySize: number; + filter: Exclude; + brotli?: TarOptions['brotli']; + writable: true; + readable: false; + [QUEUE]: Yallist; + [BUFFER]?: Buffer; + [READENTRY]?: ReadEntry; + [WRITEENTRY]?: ReadEntry; + [STATE]: State; + [META]: string; + [EX]?: Pax; + [GEX]?: Pax; + [ENDED]: boolean; + [UNZIP]?: false | Unzip | BrotliDecompress; + [ABORTED]: boolean; + [SAW_VALID_ENTRY]?: boolean; + [SAW_NULL_BLOCK]: boolean; + [SAW_EOF]: boolean; + [WRITING]: boolean; + [CONSUMING]: boolean; + [EMITTEDEND]: boolean; + constructor(opt?: TarOptions); + warn(code: string, message: string | Error, data?: WarnData): void; + [CONSUMEHEADER](chunk: Buffer, position: number): void; + [CLOSESTREAM](): void; + [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]): boolean; + [NEXTENTRY](): void; + [CONSUMEBODY](chunk: Buffer, position: number): number; + [CONSUMEMETA](chunk: Buffer, position: number): number; + [EMIT](ev: string | symbol, data?: any, extra?: any): void; + [EMITMETA](entry: ReadEntry): void; + abort(error: Error): void; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + [BUFFERCONCAT](c: Buffer): void; + [MAYBEEND](): void; + [CONSUMECHUNK](chunk?: Buffer): void; + [CONSUMECHUNKSUB](chunk: Buffer): void; + end(cb?: () => void): this; + end(data: string | Buffer, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/parse.d.ts.map b/node_modules/tar/dist/commonjs/parse.d.ts.map new file mode 100644 index 0000000..7d8ff6b --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.d.ts.map @@ -0,0 +1 @@ +{"version":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E,KAAK,GAAG,IAAI,KAAK,IAAI,GAChC,OAAO;IACV,KAAK,CACH,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAChC,OAAO;IA6HV,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM;IAOxB,CAAC,QAAQ,CAAC;IA0BV,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM;IAkC7B,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM;IA6C/B,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IACjD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CAmCnE"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/parse.js b/node_modules/tar/dist/commonjs/parse.js new file mode 100644 index 0000000..9746a25 --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.js @@ -0,0 +1,599 @@ +"use strict"; +// this[BUFFER] is the remainder of a chunk if we're waiting for +// the full 512 bytes of a header to come in. We will Buffer.concat() +// it to the next write(), which is a mem copy, but a small one. +// +// this[QUEUE] is a Yallist of entries that haven't been emitted +// yet this can only get filled up if the user keeps write()ing after +// a write() returns false, or does a write() with more than one entry +// +// We don't buffer chunks, we always parse them and either create an +// entry, or push it into the active entry. The ReadEntry class knows +// to throw data away if .ignore=true +// +// Shift entry off the buffer when it emits 'end', and emit 'entry' for +// the next one in the list. +// +// At any time, we're pushing body chunks into the entry at WRITEENTRY, +// and waiting for 'end' on the entry at READENTRY +// +// ignored entries get .resume() called on them straight away +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Parser = void 0; +const events_1 = require("events"); +const minizlib_1 = require("minizlib"); +const yallist_1 = require("yallist"); +const header_js_1 = require("./header.js"); +const pax_js_1 = require("./pax.js"); +const read_entry_js_1 = require("./read-entry.js"); +const warn_method_js_1 = require("./warn-method.js"); +const maxMetaEntrySize = 1024 * 1024; +const gzipHeader = Buffer.from([0x1f, 0x8b]); +const STATE = Symbol('state'); +const WRITEENTRY = Symbol('writeEntry'); +const READENTRY = Symbol('readEntry'); +const NEXTENTRY = Symbol('nextEntry'); +const PROCESSENTRY = Symbol('processEntry'); +const EX = Symbol('extendedHeader'); +const GEX = Symbol('globalExtendedHeader'); +const META = Symbol('meta'); +const EMITMETA = Symbol('emitMeta'); +const BUFFER = Symbol('buffer'); +const QUEUE = Symbol('queue'); +const ENDED = Symbol('ended'); +const EMITTEDEND = Symbol('emittedEnd'); +const EMIT = Symbol('emit'); +const UNZIP = Symbol('unzip'); +const CONSUMECHUNK = Symbol('consumeChunk'); +const CONSUMECHUNKSUB = Symbol('consumeChunkSub'); +const CONSUMEBODY = Symbol('consumeBody'); +const CONSUMEMETA = Symbol('consumeMeta'); +const CONSUMEHEADER = Symbol('consumeHeader'); +const CONSUMING = Symbol('consuming'); +const BUFFERCONCAT = Symbol('bufferConcat'); +const MAYBEEND = Symbol('maybeEnd'); +const WRITING = Symbol('writing'); +const ABORTED = Symbol('aborted'); +const DONE = Symbol('onDone'); +const SAW_VALID_ENTRY = Symbol('sawValidEntry'); +const SAW_NULL_BLOCK = Symbol('sawNullBlock'); +const SAW_EOF = Symbol('sawEOF'); +const CLOSESTREAM = Symbol('closeStream'); +const noop = () => true; +class Parser extends events_1.EventEmitter { + file; + strict; + maxMetaEntrySize; + filter; + brotli; + writable = true; + readable = false; + [QUEUE] = new yallist_1.Yallist(); + [BUFFER]; + [READENTRY]; + [WRITEENTRY]; + [STATE] = 'begin'; + [META] = ''; + [EX]; + [GEX]; + [ENDED] = false; + [UNZIP]; + [ABORTED] = false; + [SAW_VALID_ENTRY]; + [SAW_NULL_BLOCK] = false; + [SAW_EOF] = false; + [WRITING] = false; + [CONSUMING] = false; + [EMITTEDEND] = false; + constructor(opt = {}) { + super(); + this.file = opt.file || ''; + // these BADARCHIVE errors can't be detected early. listen on DONE. + this.on(DONE, () => { + if (this[STATE] === 'begin' || + this[SAW_VALID_ENTRY] === false) { + // either less than 1 block of data, or all entries were invalid. + // Either way, probably not even a tarball. + this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format'); + } + }); + if (opt.ondone) { + this.on(DONE, opt.ondone); + } + else { + this.on(DONE, () => { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + }); + } + this.strict = !!opt.strict; + this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; + this.filter = typeof opt.filter === 'function' ? opt.filter : noop; + // Unlike gzip, brotli doesn't have any magic bytes to identify it + // Users need to explicitly tell us they're extracting a brotli file + // Or we infer from the file extension + const isTBR = opt.file && + (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')); + // if it's a tbr file it MIGHT be brotli, but we don't know until + // we look at it and verify it's not a valid tar file. + this.brotli = + !opt.gzip && opt.brotli !== undefined ? opt.brotli + : isTBR ? undefined + : false; + // have to set this so that streams are ok piping into it + this.on('end', () => this[CLOSESTREAM]()); + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + if (typeof opt.onReadEntry === 'function') { + this.on('entry', opt.onReadEntry); + } + } + warn(code, message, data = {}) { + (0, warn_method_js_1.warnMethod)(this, code, message, data); + } + [CONSUMEHEADER](chunk, position) { + if (this[SAW_VALID_ENTRY] === undefined) { + this[SAW_VALID_ENTRY] = false; + } + let header; + try { + header = new header_js_1.Header(chunk, position, this[EX], this[GEX]); + } + catch (er) { + return this.warn('TAR_ENTRY_INVALID', er); + } + if (header.nullBlock) { + if (this[SAW_NULL_BLOCK]) { + this[SAW_EOF] = true; + // ending an archive with no entries. pointless, but legal. + if (this[STATE] === 'begin') { + this[STATE] = 'header'; + } + this[EMIT]('eof'); + } + else { + this[SAW_NULL_BLOCK] = true; + this[EMIT]('nullBlock'); + } + } + else { + this[SAW_NULL_BLOCK] = false; + if (!header.cksumValid) { + this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header }); + } + else if (!header.path) { + this.warn('TAR_ENTRY_INVALID', 'path is required', { header }); + } + else { + const type = header.type; + if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath required', { + header, + }); + } + else if (!/^(Symbolic)?Link$/.test(type) && + !/^(Global)?ExtendedHeader$/.test(type) && + header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', { + header, + }); + } + else { + const entry = (this[WRITEENTRY] = new read_entry_js_1.ReadEntry(header, this[EX], this[GEX])); + // we do this for meta & ignored entries as well, because they + // are still valid tar, or else we wouldn't know to ignore them + if (!this[SAW_VALID_ENTRY]) { + if (entry.remain) { + // this might be the one! + const onend = () => { + if (!entry.invalid) { + this[SAW_VALID_ENTRY] = true; + } + }; + entry.on('end', onend); + } + else { + this[SAW_VALID_ENTRY] = true; + } + } + if (entry.meta) { + if (entry.size > this.maxMetaEntrySize) { + entry.ignore = true; + this[EMIT]('ignoredEntry', entry); + this[STATE] = 'ignore'; + entry.resume(); + } + else if (entry.size > 0) { + this[META] = ''; + entry.on('data', c => (this[META] += c)); + this[STATE] = 'meta'; + } + } + else { + this[EX] = undefined; + entry.ignore = + entry.ignore || !this.filter(entry.path, entry); + if (entry.ignore) { + // probably valid, just not something we care about + this[EMIT]('ignoredEntry', entry); + this[STATE] = entry.remain ? 'ignore' : 'header'; + entry.resume(); + } + else { + if (entry.remain) { + this[STATE] = 'body'; + } + else { + this[STATE] = 'header'; + entry.end(); + } + if (!this[READENTRY]) { + this[QUEUE].push(entry); + this[NEXTENTRY](); + } + else { + this[QUEUE].push(entry); + } + } + } + } + } + } + } + [CLOSESTREAM]() { + queueMicrotask(() => this.emit('close')); + } + [PROCESSENTRY](entry) { + let go = true; + if (!entry) { + this[READENTRY] = undefined; + go = false; + } + else if (Array.isArray(entry)) { + const [ev, ...args] = entry; + this.emit(ev, ...args); + } + else { + this[READENTRY] = entry; + this.emit('entry', entry); + if (!entry.emittedEnd) { + entry.on('end', () => this[NEXTENTRY]()); + go = false; + } + } + return go; + } + [NEXTENTRY]() { + do { } while (this[PROCESSENTRY](this[QUEUE].shift())); + if (!this[QUEUE].length) { + // At this point, there's nothing in the queue, but we may have an + // entry which is being consumed (readEntry). + // If we don't, then we definitely can handle more data. + // If we do, and either it's flowing, or it has never had any data + // written to it, then it needs more. + // The only other possibility is that it has returned false from a + // write() call, so we wait for the next drain to continue. + const re = this[READENTRY]; + const drainNow = !re || re.flowing || re.size === re.remain; + if (drainNow) { + if (!this[WRITING]) { + this.emit('drain'); + } + } + else { + re.once('drain', () => this.emit('drain')); + } + } + } + [CONSUMEBODY](chunk, position) { + // write up to but no more than writeEntry.blockRemain + const entry = this[WRITEENTRY]; + /* c8 ignore start */ + if (!entry) { + throw new Error('attempt to consume body without entry??'); + } + const br = entry.blockRemain ?? 0; + /* c8 ignore stop */ + const c = br >= chunk.length && position === 0 ? + chunk + : chunk.subarray(position, position + br); + entry.write(c); + if (!entry.blockRemain) { + this[STATE] = 'header'; + this[WRITEENTRY] = undefined; + entry.end(); + } + return c.length; + } + [CONSUMEMETA](chunk, position) { + const entry = this[WRITEENTRY]; + const ret = this[CONSUMEBODY](chunk, position); + // if we finished, then the entry is reset + if (!this[WRITEENTRY] && entry) { + this[EMITMETA](entry); + } + return ret; + } + [EMIT](ev, data, extra) { + if (!this[QUEUE].length && !this[READENTRY]) { + this.emit(ev, data, extra); + } + else { + this[QUEUE].push([ev, data, extra]); + } + } + [EMITMETA](entry) { + this[EMIT]('meta', this[META]); + switch (entry.type) { + case 'ExtendedHeader': + case 'OldExtendedHeader': + this[EX] = pax_js_1.Pax.parse(this[META], this[EX], false); + break; + case 'GlobalExtendedHeader': + this[GEX] = pax_js_1.Pax.parse(this[META], this[GEX], true); + break; + case 'NextFileHasLongPath': + case 'OldGnuLongPath': { + const ex = this[EX] ?? Object.create(null); + this[EX] = ex; + ex.path = this[META].replace(/\0.*/, ''); + break; + } + case 'NextFileHasLongLinkpath': { + const ex = this[EX] || Object.create(null); + this[EX] = ex; + ex.linkpath = this[META].replace(/\0.*/, ''); + break; + } + /* c8 ignore start */ + default: + throw new Error('unknown meta: ' + entry.type); + /* c8 ignore stop */ + } + } + abort(error) { + this[ABORTED] = true; + this.emit('abort', error); + // always throws, even in non-strict mode + this.warn('TAR_ABORT', error, { recoverable: false }); + } + write(chunk, encoding, cb) { + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, + /* c8 ignore next */ + typeof encoding === 'string' ? encoding : 'utf8'); + } + if (this[ABORTED]) { + /* c8 ignore next */ + cb?.(); + return false; + } + // first write, might be gzipped + const needSniff = this[UNZIP] === undefined || + (this.brotli === undefined && this[UNZIP] === false); + if (needSniff && chunk) { + if (this[BUFFER]) { + chunk = Buffer.concat([this[BUFFER], chunk]); + this[BUFFER] = undefined; + } + if (chunk.length < gzipHeader.length) { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + // look for gzip header + for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) { + if (chunk[i] !== gzipHeader[i]) { + this[UNZIP] = false; + } + } + const maybeBrotli = this.brotli === undefined; + if (this[UNZIP] === false && maybeBrotli) { + // read the first header to see if it's a valid tar file. If so, + // we can safely assume that it's not actually brotli, despite the + // .tbr or .tar.br file extension. + // if we ended before getting a full chunk, yes, def brotli + if (chunk.length < 512) { + if (this[ENDED]) { + this.brotli = true; + } + else { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + } + else { + // if it's tar, it's pretty reliably not brotli, chances of + // that happening are astronomical. + try { + new header_js_1.Header(chunk.subarray(0, 512)); + this.brotli = false; + } + catch (_) { + this.brotli = true; + } + } + } + if (this[UNZIP] === undefined || + (this[UNZIP] === false && this.brotli)) { + const ended = this[ENDED]; + this[ENDED] = false; + this[UNZIP] = + this[UNZIP] === undefined ? + new minizlib_1.Unzip({}) + : new minizlib_1.BrotliDecompress({}); + this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk)); + this[UNZIP].on('error', er => this.abort(er)); + this[UNZIP].on('end', () => { + this[ENDED] = true; + this[CONSUMECHUNK](); + }); + this[WRITING] = true; + const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk); + this[WRITING] = false; + cb?.(); + return ret; + } + } + this[WRITING] = true; + if (this[UNZIP]) { + this[UNZIP].write(chunk); + } + else { + this[CONSUMECHUNK](chunk); + } + this[WRITING] = false; + // return false if there's a queue, or if the current entry isn't flowing + const ret = this[QUEUE].length ? false + : this[READENTRY] ? this[READENTRY].flowing + : true; + // if we have no queue, then that means a clogged READENTRY + if (!ret && !this[QUEUE].length) { + this[READENTRY]?.once('drain', () => this.emit('drain')); + } + /* c8 ignore next */ + cb?.(); + return ret; + } + [BUFFERCONCAT](c) { + if (c && !this[ABORTED]) { + this[BUFFER] = + this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c; + } + } + [MAYBEEND]() { + if (this[ENDED] && + !this[EMITTEDEND] && + !this[ABORTED] && + !this[CONSUMING]) { + this[EMITTEDEND] = true; + const entry = this[WRITEENTRY]; + if (entry && entry.blockRemain) { + // truncated, likely a damaged file + const have = this[BUFFER] ? this[BUFFER].length : 0; + this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); + if (this[BUFFER]) { + entry.write(this[BUFFER]); + } + entry.end(); + } + this[EMIT](DONE); + } + } + [CONSUMECHUNK](chunk) { + if (this[CONSUMING] && chunk) { + this[BUFFERCONCAT](chunk); + } + else if (!chunk && !this[BUFFER]) { + this[MAYBEEND](); + } + else if (chunk) { + this[CONSUMING] = true; + if (this[BUFFER]) { + this[BUFFERCONCAT](chunk); + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + else { + this[CONSUMECHUNKSUB](chunk); + } + while (this[BUFFER] && + this[BUFFER]?.length >= 512 && + !this[ABORTED] && + !this[SAW_EOF]) { + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + this[CONSUMING] = false; + } + if (!this[BUFFER] || this[ENDED]) { + this[MAYBEEND](); + } + } + [CONSUMECHUNKSUB](chunk) { + // we know that we are in CONSUMING mode, so anything written goes into + // the buffer. Advance the position and put any remainder in the buffer. + let position = 0; + const length = chunk.length; + while (position + 512 <= length && + !this[ABORTED] && + !this[SAW_EOF]) { + switch (this[STATE]) { + case 'begin': + case 'header': + this[CONSUMEHEADER](chunk, position); + position += 512; + break; + case 'ignore': + case 'body': + position += this[CONSUMEBODY](chunk, position); + break; + case 'meta': + position += this[CONSUMEMETA](chunk, position); + break; + /* c8 ignore start */ + default: + throw new Error('invalid state: ' + this[STATE]); + /* c8 ignore stop */ + } + } + if (position < length) { + if (this[BUFFER]) { + this[BUFFER] = Buffer.concat([ + chunk.subarray(position), + this[BUFFER], + ]); + } + else { + this[BUFFER] = chunk.subarray(position); + } + } + } + end(chunk, encoding, cb) { + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + if (cb) + this.once('finish', cb); + if (!this[ABORTED]) { + if (this[UNZIP]) { + /* c8 ignore start */ + if (chunk) + this[UNZIP].write(chunk); + /* c8 ignore stop */ + this[UNZIP].end(); + } + else { + this[ENDED] = true; + if (this.brotli === undefined) + chunk = chunk || Buffer.alloc(0); + if (chunk) + this.write(chunk); + this[MAYBEEND](); + } + } + return this; + } +} +exports.Parser = Parser; +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/parse.js.map b/node_modules/tar/dist/commonjs/parse.js.map new file mode 100644 index 0000000..915b353 --- /dev/null +++ b/node_modules/tar/dist/commonjs/parse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,sEAAsE;AACtE,gEAAgE;AAChE,EAAE;AACF,gEAAgE;AAChE,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,qCAAqC;AACrC,EAAE;AACF,uEAAuE;AACvE,4BAA4B;AAC5B,EAAE;AACF,uEAAuE;AACvE,kDAAkD;AAClD,EAAE;AACF,6DAA6D;;;AAE7D,mCAA2C;AAC3C,uCAAkD;AAClD,qCAAiC;AACjC,2CAAoC;AAEpC,qCAA8B;AAC9B,mDAA2C;AAC3C,qDAIyB;AAEzB,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAA;AACpC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAE5C,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;AAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAC3C,MAAM,EAAE,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;AACnC,MAAM,GAAG,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAA;AAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAC3B,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AACnC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,M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AC,QAAQ,CAAC,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAvmBD,wBAumBC","sourcesContent":["// this[BUFFER] is the remainder of a chunk if we're waiting for\n// the full 512 bytes of a header to come in. We will Buffer.concat()\n// it to the next write(), which is a mem copy, but a small one.\n//\n// this[QUEUE] is a Yallist of entries that haven't been emitted\n// yet this can only get filled up if the user keeps write()ing after\n// a write() returns false, or does a write() with more than one entry\n//\n// We don't buffer chunks, we always parse them and either create an\n// entry, or push it into the active entry. The ReadEntry class knows\n// to throw data away if .ignore=true\n//\n// Shift entry off the buffer when it emits 'end', and emit 'entry' for\n// the next one in the list.\n//\n// At any time, we're pushing body chunks into the entry at WRITEENTRY,\n// and waiting for 'end' on the entry at READENTRY\n//\n// ignored entries get .resume() called on them straight away\n\nimport { EventEmitter as EE } from 'events'\nimport { BrotliDecompress, Unzip } from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { Header } from './header.js'\nimport { TarOptions } from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport {\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst maxMetaEntrySize = 1024 * 1024\nconst gzipHeader = Buffer.from([0x1f, 0x8b])\n\nconst STATE = Symbol('state')\nconst WRITEENTRY = Symbol('writeEntry')\nconst READENTRY = Symbol('readEntry')\nconst NEXTENTRY = Symbol('nextEntry')\nconst PROCESSENTRY = Symbol('processEntry')\nconst EX = Symbol('extendedHeader')\nconst GEX = Symbol('globalExtendedHeader')\nconst META = Symbol('meta')\nconst EMITMETA = Symbol('emitMeta')\nconst BUFFER = Symbol('buffer')\nconst QUEUE = Symbol('queue')\nconst ENDED = Symbol('ended')\nconst EMITTEDEND = Symbol('emittedEnd')\nconst EMIT = Symbol('emit')\nconst UNZIP = Symbol('unzip')\nconst CONSUMECHUNK = Symbol('consumeChunk')\nconst CONSUMECHUNKSUB = Symbol('consumeChunkSub')\nconst CONSUMEBODY = Symbol('consumeBody')\nconst CONSUMEMETA = Symbol('consumeMeta')\nconst CONSUMEHEADER = Symbol('consumeHeader')\nconst CONSUMING = Symbol('consuming')\nconst BUFFERCONCAT = Symbol('bufferConcat')\nconst MAYBEEND = Symbol('maybeEnd')\nconst WRITING = Symbol('writing')\nconst ABORTED = Symbol('aborted')\nconst DONE = Symbol('onDone')\nconst SAW_VALID_ENTRY = Symbol('sawValidEntry')\nconst SAW_NULL_BLOCK = Symbol('sawNullBlock')\nconst SAW_EOF = Symbol('sawEOF')\nconst CLOSESTREAM = Symbol('closeStream')\n\nconst noop = () => true\n\nexport type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'\n\nexport class Parser extends EE implements Warner {\n file: string\n strict: boolean\n maxMetaEntrySize: number\n filter: Exclude\n brotli?: TarOptions['brotli']\n\n writable: true = true\n readable: false = false;\n\n [QUEUE]: Yallist =\n new Yallist();\n [BUFFER]?: Buffer;\n [READENTRY]?: ReadEntry;\n [WRITEENTRY]?: ReadEntry;\n [STATE]: State = 'begin';\n [META]: string = '';\n [EX]?: Pax;\n [GEX]?: Pax;\n [ENDED]: boolean = false;\n [UNZIP]?: false | Unzip | BrotliDecompress;\n [ABORTED]: boolean = false;\n [SAW_VALID_ENTRY]?: boolean;\n [SAW_NULL_BLOCK]: boolean = false;\n [SAW_EOF]: boolean = false;\n [WRITING]: boolean = false;\n [CONSUMING]: boolean = false;\n [EMITTEDEND]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n super()\n\n this.file = opt.file || ''\n\n // these BADARCHIVE errors can't be detected early. listen on DONE.\n this.on(DONE, () => {\n if (\n this[STATE] === 'begin' ||\n this[SAW_VALID_ENTRY] === false\n ) {\n // either less than 1 block of data, or all entries were invalid.\n // Either way, probably not even a tarball.\n this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format')\n }\n })\n\n if (opt.ondone) {\n this.on(DONE, opt.ondone)\n } else {\n this.on(DONE, () => {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n })\n }\n\n this.strict = !!opt.strict\n this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize\n this.filter = typeof opt.filter === 'function' ? opt.filter : noop\n // Unlike gzip, brotli doesn't have any magic bytes to identify it\n // Users need to explicitly tell us they're extracting a brotli file\n // Or we infer from the file extension\n const isTBR =\n opt.file &&\n (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'))\n // if it's a tbr file it MIGHT be brotli, but we don't know until\n // we look at it and verify it's not a valid tar file.\n this.brotli =\n !opt.gzip && opt.brotli !== undefined ? opt.brotli\n : isTBR ? undefined\n : false\n\n // have to set this so that streams are ok piping into it\n this.on('end', () => this[CLOSESTREAM]())\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n if (typeof opt.onReadEntry === 'function') {\n this.on('entry', opt.onReadEntry)\n }\n }\n\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n\n [CONSUMEHEADER](chunk: Buffer, position: number) {\n if (this[SAW_VALID_ENTRY] === undefined) {\n this[SAW_VALID_ENTRY] = false\n }\n let header\n try {\n header = new Header(chunk, position, this[EX], this[GEX])\n } catch (er) {\n return this.warn('TAR_ENTRY_INVALID', er as Error)\n }\n\n if (header.nullBlock) {\n if (this[SAW_NULL_BLOCK]) {\n this[SAW_EOF] = true\n // ending an archive with no entries. pointless, but legal.\n if (this[STATE] === 'begin') {\n this[STATE] = 'header'\n }\n this[EMIT]('eof')\n } else {\n this[SAW_NULL_BLOCK] = true\n this[EMIT]('nullBlock')\n }\n } else {\n this[SAW_NULL_BLOCK] = false\n if (!header.cksumValid) {\n this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header })\n } else if (!header.path) {\n this.warn('TAR_ENTRY_INVALID', 'path is required', { header })\n } else {\n const type = header.type\n if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath required', {\n header,\n })\n } else if (\n !/^(Symbolic)?Link$/.test(type) &&\n !/^(Global)?ExtendedHeader$/.test(type) &&\n header.linkpath\n ) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {\n header,\n })\n } else {\n const entry = (this[WRITEENTRY] = new ReadEntry(\n header,\n this[EX],\n this[GEX],\n ))\n\n // we do this for meta & ignored entries as well, because they\n // are still valid tar, or else we wouldn't know to ignore them\n if (!this[SAW_VALID_ENTRY]) {\n if (entry.remain) {\n // this might be the one!\n const onend = () => {\n if (!entry.invalid) {\n this[SAW_VALID_ENTRY] = true\n }\n }\n entry.on('end', onend)\n } else {\n this[SAW_VALID_ENTRY] = true\n }\n }\n\n if (entry.meta) {\n if (entry.size > this.maxMetaEntrySize) {\n entry.ignore = true\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = 'ignore'\n entry.resume()\n } else if (entry.size > 0) {\n this[META] = ''\n entry.on('data', c => (this[META] += c))\n this[STATE] = 'meta'\n }\n } else {\n this[EX] = undefined\n entry.ignore =\n entry.ignore || !this.filter(entry.path, entry)\n\n if (entry.ignore) {\n // probably valid, just not something we care about\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = entry.remain ? 'ignore' : 'header'\n entry.resume()\n } else {\n if (entry.remain) {\n this[STATE] = 'body'\n } else {\n this[STATE] = 'header'\n entry.end()\n }\n\n if (!this[READENTRY]) {\n this[QUEUE].push(entry)\n this[NEXTENTRY]()\n } else {\n this[QUEUE].push(entry)\n }\n }\n }\n }\n }\n }\n }\n\n [CLOSESTREAM]() {\n queueMicrotask(() => this.emit('close'))\n }\n\n [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]) {\n let go = true\n\n if (!entry) {\n this[READENTRY] = undefined\n go = false\n } else if (Array.isArray(entry)) {\n const [ev, ...args]: [string | symbol, any, any] = entry\n this.emit(ev, ...args)\n } else {\n this[READENTRY] = entry\n this.emit('entry', entry)\n if (!entry.emittedEnd) {\n entry.on('end', () => this[NEXTENTRY]())\n go = false\n }\n }\n\n return go\n }\n\n [NEXTENTRY]() {\n do {} while (this[PROCESSENTRY](this[QUEUE].shift()))\n\n if (!this[QUEUE].length) {\n // At this point, there's nothing in the queue, but we may have an\n // entry which is being consumed (readEntry).\n // If we don't, then we definitely can handle more data.\n // If we do, and either it's flowing, or it has never had any data\n // written to it, then it needs more.\n // The only other possibility is that it has returned false from a\n // write() call, so we wait for the next drain to continue.\n const re = this[READENTRY]\n const drainNow = !re || re.flowing || re.size === re.remain\n if (drainNow) {\n if (!this[WRITING]) {\n this.emit('drain')\n }\n } else {\n re.once('drain', () => this.emit('drain'))\n }\n }\n }\n\n [CONSUMEBODY](chunk: Buffer, position: number) {\n // write up to but no more than writeEntry.blockRemain\n const entry = this[WRITEENTRY]\n /* c8 ignore start */\n if (!entry) {\n throw new Error('attempt to consume body without entry??')\n }\n const br = entry.blockRemain ?? 0\n /* c8 ignore stop */\n const c =\n br >= chunk.length && position === 0 ?\n chunk\n : chunk.subarray(position, position + br)\n\n entry.write(c)\n\n if (!entry.blockRemain) {\n this[STATE] = 'header'\n this[WRITEENTRY] = undefined\n entry.end()\n }\n\n return c.length\n }\n\n [CONSUMEMETA](chunk: Buffer, position: number) {\n const entry = this[WRITEENTRY]\n const ret = this[CONSUMEBODY](chunk, position)\n\n // if we finished, then the entry is reset\n if (!this[WRITEENTRY] && entry) {\n this[EMITMETA](entry)\n }\n\n return ret\n }\n\n [EMIT](ev: string | symbol, data?: any, extra?: any) {\n if (!this[QUEUE].length && !this[READENTRY]) {\n this.emit(ev, data, extra)\n } else {\n this[QUEUE].push([ev, data, extra])\n }\n }\n\n [EMITMETA](entry: ReadEntry) {\n this[EMIT]('meta', this[META])\n switch (entry.type) {\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this[EX] = Pax.parse(this[META], this[EX], false)\n break\n\n case 'GlobalExtendedHeader':\n this[GEX] = Pax.parse(this[META], this[GEX], true)\n break\n\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath': {\n const ex = this[EX] ?? Object.create(null)\n this[EX] = ex\n ex.path = this[META].replace(/\\0.*/, '')\n break\n }\n\n case 'NextFileHasLongLinkpath': {\n const ex = this[EX] || Object.create(null)\n this[EX] = ex\n ex.linkpath = this[META].replace(/\\0.*/, '')\n break\n }\n\n /* c8 ignore start */\n default:\n throw new Error('unknown meta: ' + entry.type)\n /* c8 ignore stop */\n }\n }\n\n abort(error: Error) {\n this[ABORTED] = true\n this.emit('abort', error)\n // always throws, even in non-strict mode\n this.warn('TAR_ABORT', error, { recoverable: false })\n }\n\n write(\n buffer: Uint8Array | string,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n str: string,\n encoding?: BufferEncoding,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any),\n cb?: () => any,\n ): boolean {\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n /* c8 ignore next */\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n if (this[ABORTED]) {\n /* c8 ignore next */\n cb?.()\n return false\n }\n\n // first write, might be gzipped\n const needSniff =\n this[UNZIP] === undefined ||\n (this.brotli === undefined && this[UNZIP] === false)\n if (needSniff && chunk) {\n if (this[BUFFER]) {\n chunk = Buffer.concat([this[BUFFER], chunk])\n this[BUFFER] = undefined\n }\n if (chunk.length < gzipHeader.length) {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n\n // look for gzip header\n for (\n let i = 0;\n this[UNZIP] === undefined && i < gzipHeader.length;\n i++\n ) {\n if (chunk[i] !== gzipHeader[i]) {\n this[UNZIP] = false\n }\n }\n\n const maybeBrotli = this.brotli === undefined\n if (this[UNZIP] === false && maybeBrotli) {\n // read the first header to see if it's a valid tar file. If so,\n // we can safely assume that it's not actually brotli, despite the\n // .tbr or .tar.br file extension.\n // if we ended before getting a full chunk, yes, def brotli\n if (chunk.length < 512) {\n if (this[ENDED]) {\n this.brotli = true\n } else {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n } else {\n // if it's tar, it's pretty reliably not brotli, chances of\n // that happening are astronomical.\n try {\n new Header(chunk.subarray(0, 512))\n this.brotli = false\n } catch (_) {\n this.brotli = true\n }\n }\n }\n\n if (\n this[UNZIP] === undefined ||\n (this[UNZIP] === false && this.brotli)\n ) {\n const ended = this[ENDED]\n this[ENDED] = false\n this[UNZIP] =\n this[UNZIP] === undefined ?\n new Unzip({})\n : new BrotliDecompress({})\n this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))\n this[UNZIP].on('error', er => this.abort(er as Error))\n this[UNZIP].on('end', () => {\n this[ENDED] = true\n this[CONSUMECHUNK]()\n })\n this[WRITING] = true\n const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk)\n this[WRITING] = false\n cb?.()\n return ret\n }\n }\n\n this[WRITING] = true\n if (this[UNZIP]) {\n this[UNZIP].write(chunk)\n } else {\n this[CONSUMECHUNK](chunk)\n }\n this[WRITING] = false\n\n // return false if there's a queue, or if the current entry isn't flowing\n const ret =\n this[QUEUE].length ? false\n : this[READENTRY] ? this[READENTRY].flowing\n : true\n\n // if we have no queue, then that means a clogged READENTRY\n if (!ret && !this[QUEUE].length) {\n this[READENTRY]?.once('drain', () => this.emit('drain'))\n }\n\n /* c8 ignore next */\n cb?.()\n return ret\n }\n\n [BUFFERCONCAT](c: Buffer) {\n if (c && !this[ABORTED]) {\n this[BUFFER] =\n this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c\n }\n }\n\n [MAYBEEND]() {\n if (\n this[ENDED] &&\n !this[EMITTEDEND] &&\n !this[ABORTED] &&\n !this[CONSUMING]\n ) {\n this[EMITTEDEND] = true\n const entry = this[WRITEENTRY]\n if (entry && entry.blockRemain) {\n // truncated, likely a damaged file\n const have = this[BUFFER] ? this[BUFFER].length : 0\n this.warn(\n 'TAR_BAD_ARCHIVE',\n `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`,\n { entry },\n )\n if (this[BUFFER]) {\n entry.write(this[BUFFER])\n }\n entry.end()\n }\n this[EMIT](DONE)\n }\n }\n\n [CONSUMECHUNK](chunk?: Buffer) {\n if (this[CONSUMING] && chunk) {\n this[BUFFERCONCAT](chunk)\n } else if (!chunk && !this[BUFFER]) {\n this[MAYBEEND]()\n } else if (chunk) {\n this[CONSUMING] = true\n if (this[BUFFER]) {\n this[BUFFERCONCAT](chunk)\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n } else {\n this[CONSUMECHUNKSUB](chunk)\n }\n\n while (\n this[BUFFER] &&\n (this[BUFFER] as Buffer)?.length >= 512 &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n }\n this[CONSUMING] = false\n }\n\n if (!this[BUFFER] || this[ENDED]) {\n this[MAYBEEND]()\n }\n }\n\n [CONSUMECHUNKSUB](chunk: Buffer) {\n // we know that we are in CONSUMING mode, so anything written goes into\n // the buffer. Advance the position and put any remainder in the buffer.\n let position = 0\n const length = chunk.length\n while (\n position + 512 <= length &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n switch (this[STATE]) {\n case 'begin':\n case 'header':\n this[CONSUMEHEADER](chunk, position)\n position += 512\n break\n\n case 'ignore':\n case 'body':\n position += this[CONSUMEBODY](chunk, position)\n break\n\n case 'meta':\n position += this[CONSUMEMETA](chunk, position)\n break\n\n /* c8 ignore start */\n default:\n throw new Error('invalid state: ' + this[STATE])\n /* c8 ignore stop */\n }\n }\n\n if (position < length) {\n if (this[BUFFER]) {\n this[BUFFER] = Buffer.concat([\n chunk.subarray(position),\n this[BUFFER],\n ])\n } else {\n this[BUFFER] = chunk.subarray(position)\n }\n }\n }\n\n end(cb?: () => void): this\n end(data: string | Buffer, cb?: () => void): this\n end(str: string, encoding?: BufferEncoding, cb?: () => void): this\n end(\n chunk?: string | Buffer | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ) {\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n if (cb) this.once('finish', cb)\n if (!this[ABORTED]) {\n if (this[UNZIP]) {\n /* c8 ignore start */\n if (chunk) this[UNZIP].write(chunk)\n /* c8 ignore stop */\n this[UNZIP].end()\n } else {\n this[ENDED] = true\n if (this.brotli === undefined)\n chunk = chunk || Buffer.alloc(0)\n if (chunk) this.write(chunk)\n this[MAYBEEND]()\n }\n }\n return this\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.d.ts b/node_modules/tar/dist/commonjs/path-reservations.d.ts new file mode 100644 index 0000000..44f0482 --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.d.ts @@ -0,0 +1,11 @@ +export type Reservation = { + paths: string[]; + dirs: Set; +}; +export type Handler = (clear: () => void) => void; +export declare class PathReservations { + #private; + reserve(paths: string[], fn: Handler): boolean; + check(fn: Handler): boolean; +} +//# sourceMappingURL=path-reservations.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.d.ts.map b/node_modules/tar/dist/commonjs/path-reservations.d.ts.map new file mode 100644 index 0000000..2763014 --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.d.ts","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAmBjD,qBAAa,gBAAgB;;IAY3B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO;IAgEpC,KAAK,CAAC,EAAE,EAAE,OAAO;CA8ElB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.js b/node_modules/tar/dist/commonjs/path-reservations.js new file mode 100644 index 0000000..9ff391c --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.js @@ -0,0 +1,170 @@ +"use strict"; +// A path exclusive reservation system +// reserve([list, of, paths], fn) +// When the fn is first in line for all its paths, it +// is called with a cb that clears the reservation. +// +// Used by async unpack to avoid clobbering paths in use, +// while still allowing maximal safe parallelization. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PathReservations = void 0; +const node_path_1 = require("node:path"); +const normalize_unicode_js_1 = require("./normalize-unicode.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +// return a set of parent dirs for a given path +// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d'] +const getDirs = (path) => { + const dirs = path + .split('/') + .slice(0, -1) + .reduce((set, path) => { + const s = set[set.length - 1]; + if (s !== undefined) { + path = (0, node_path_1.join)(s, path); + } + set.push(path || '/'); + return set; + }, []); + return dirs; +}; +class PathReservations { + // path => [function or Set] + // A Set object means a directory reservation + // A fn is a direct reservation on that path + #queues = new Map(); + // fn => {paths:[path,...], dirs:[path, ...]} + #reservations = new Map(); + // functions currently running + #running = new Set(); + reserve(paths, fn) { + paths = + isWindows ? + ['win32 parallelization disabled'] + : paths.map(p => { + // don't need normPath, because we skip this entirely for windows + return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, node_path_1.join)((0, normalize_unicode_js_1.normalizeUnicode)(p))).toLowerCase(); + }); + const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))); + this.#reservations.set(fn, { dirs, paths }); + for (const p of paths) { + const q = this.#queues.get(p); + if (!q) { + this.#queues.set(p, [fn]); + } + else { + q.push(fn); + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + if (!q) { + this.#queues.set(dir, [new Set([fn])]); + } + else { + const l = q[q.length - 1]; + if (l instanceof Set) { + l.add(fn); + } + else { + q.push(new Set([fn])); + } + } + } + return this.#run(fn); + } + // return the queues for each path the function cares about + // fn => {paths, dirs} + #getQueues(fn) { + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('function does not have any path reservations'); + } + /* c8 ignore stop */ + return { + paths: res.paths.map((path) => this.#queues.get(path)), + dirs: [...res.dirs].map(path => this.#queues.get(path)), + }; + } + // check if fn is first in line for all its paths, and is + // included in the first set for all its dir queues + check(fn) { + const { paths, dirs } = this.#getQueues(fn); + return (paths.every(q => q && q[0] === fn) && + dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))); + } + // run the function if it's first in line and not already running + #run(fn) { + if (this.#running.has(fn) || !this.check(fn)) { + return false; + } + this.#running.add(fn); + fn(() => this.#clear(fn)); + return true; + } + #clear(fn) { + if (!this.#running.has(fn)) { + return false; + } + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('invalid reservation'); + } + /* c8 ignore stop */ + const { paths, dirs } = res; + const next = new Set(); + for (const path of paths) { + const q = this.#queues.get(path); + /* c8 ignore start */ + if (!q || q?.[0] !== fn) { + continue; + } + /* c8 ignore stop */ + const q0 = q[1]; + if (!q0) { + this.#queues.delete(path); + continue; + } + q.shift(); + if (typeof q0 === 'function') { + next.add(q0); + } + else { + for (const f of q0) { + next.add(f); + } + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + const q0 = q?.[0]; + /* c8 ignore next - type safety only */ + if (!q || !(q0 instanceof Set)) + continue; + if (q0.size === 1 && q.length === 1) { + this.#queues.delete(dir); + continue; + } + else if (q0.size === 1) { + q.shift(); + // next one must be a function, + // or else the Set would've been reused + const n = q[0]; + if (typeof n === 'function') { + next.add(n); + } + } + else { + q0.delete(fn); + } + } + this.#running.delete(fn); + next.forEach(fn => this.#run(fn)); + return true; + } +} +exports.PathReservations = PathReservations; +//# sourceMappingURL=path-reservations.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/path-reservations.js.map b/node_modules/tar/dist/commonjs/path-reservations.js.map new file mode 100644 index 0000000..db5d567 --- /dev/null +++ b/node_modules/tar/dist/commonjs/path-reservations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.js","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,iCAAiC;AACjC,qDAAqD;AACrD,mDAAmD;AACnD,EAAE;AACF,yDAAyD;AACzD,qDAAqD;;;AAErD,yCAAgC;AAChC,iEAAyD;AACzD,2EAAkE;AAElE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAC3D,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAStC,+CAA+C;AAC/C,0DAA0D;AAC1D,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE;IAC/B,MAAM,IAAI,GAAG,IAAI;SACd,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACZ,MAAM,CAAC,CAAC,GAAa,EAAE,IAAI,EAAE,EAAE;QAC9B,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAC7B,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;YACpB,IAAI,GAAG,IAAA,gBAAI,EAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,CAAA;QACrB,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAA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O,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBACxB,SAAQ;YACV,CAAC;iBAAM,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBACzB,CAAC,CAAC,KAAK,EAAE,CAAA;gBACT,+BAA+B;gBAC/B,uCAAuC;gBACvC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;gBACd,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;oBAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACb,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;YACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA1JD,4CA0JC","sourcesContent":["// A path exclusive reservation system\n// reserve([list, of, paths], fn)\n// When the fn is first in line for all its paths, it\n// is called with a cb that clears the reservation.\n//\n// Used by async unpack to avoid clobbering paths in use,\n// while still allowing maximal safe parallelization.\n\nimport { join } from 'node:path'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\n\nexport type Reservation = {\n paths: string[]\n dirs: Set\n}\n\nexport type Handler = (clear: () => void) => void\n\n// return a set of parent dirs for a given path\n// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']\nconst getDirs = (path: string) => {\n const dirs = path\n .split('/')\n .slice(0, -1)\n .reduce((set: string[], path) => {\n const s = set[set.length - 1]\n if (s !== undefined) {\n path = join(s, path)\n }\n set.push(path || '/')\n return set\n }, [])\n return dirs\n}\n\nexport class PathReservations {\n // path => [function or Set]\n // A Set object means a directory reservation\n // A fn is a direct reservation on that path\n #queues = new Map)[]>()\n\n // fn => {paths:[path,...], dirs:[path, ...]}\n #reservations = new Map()\n\n // functions currently running\n #running = new Set()\n\n reserve(paths: string[], fn: Handler) {\n paths =\n isWindows ?\n ['win32 parallelization disabled']\n : paths.map(p => {\n // don't need normPath, because we skip this entirely for windows\n return stripTrailingSlashes(\n join(normalizeUnicode(p)),\n ).toLowerCase()\n })\n\n const dirs = new Set(\n paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)),\n )\n this.#reservations.set(fn, { dirs, paths })\n for (const p of paths) {\n const q = this.#queues.get(p)\n if (!q) {\n this.#queues.set(p, [fn])\n } else {\n q.push(fn)\n }\n }\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n if (!q) {\n this.#queues.set(dir, [new Set([fn])])\n } else {\n const l = q[q.length - 1]\n if (l instanceof Set) {\n l.add(fn)\n } else {\n q.push(new Set([fn]))\n }\n }\n }\n return this.#run(fn)\n }\n\n // return the queues for each path the function cares about\n // fn => {paths, dirs}\n #getQueues(fn: Handler): {\n paths: Handler[][]\n dirs: (Handler | Set)[][]\n } {\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('function does not have any path reservations')\n }\n /* c8 ignore stop */\n return {\n paths: res.paths.map((path: string) =>\n this.#queues.get(path),\n ) as Handler[][],\n dirs: [...res.dirs].map(path => this.#queues.get(path)) as (\n | Handler\n | Set\n )[][],\n }\n }\n\n // check if fn is first in line for all its paths, and is\n // included in the first set for all its dir queues\n check(fn: Handler) {\n const { paths, dirs } = this.#getQueues(fn)\n return (\n paths.every(q => q && q[0] === fn) &&\n dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))\n )\n }\n\n // run the function if it's first in line and not already running\n #run(fn: Handler) {\n if (this.#running.has(fn) || !this.check(fn)) {\n return false\n }\n this.#running.add(fn)\n fn(() => this.#clear(fn))\n return true\n }\n\n #clear(fn: Handler) {\n if (!this.#running.has(fn)) {\n return false\n }\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('invalid reservation')\n }\n /* c8 ignore stop */\n const { paths, dirs } = res\n\n const next = new Set()\n for (const path of paths) {\n const q = this.#queues.get(path)\n /* c8 ignore start */\n if (!q || q?.[0] !== fn) {\n continue\n }\n /* c8 ignore stop */\n const q0 = q[1]\n if (!q0) {\n this.#queues.delete(path)\n continue\n }\n q.shift()\n if (typeof q0 === 'function') {\n next.add(q0)\n } else {\n for (const f of q0) {\n next.add(f)\n }\n }\n }\n\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n const q0 = q?.[0]\n /* c8 ignore next - type safety only */\n if (!q || !(q0 instanceof Set)) continue\n if (q0.size === 1 && q.length === 1) {\n this.#queues.delete(dir)\n continue\n } else if (q0.size === 1) {\n q.shift()\n // next one must be a function,\n // or else the Set would've been reused\n const n = q[0]\n if (typeof n === 'function') {\n next.add(n)\n }\n } else {\n q0.delete(fn)\n }\n }\n\n this.#running.delete(fn)\n next.forEach(fn => this.#run(fn))\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.d.ts b/node_modules/tar/dist/commonjs/pax.d.ts new file mode 100644 index 0000000..58d1a80 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.d.ts @@ -0,0 +1,27 @@ +/// +import { HeaderData } from './header.js'; +export declare class Pax implements HeaderData { + atime?: Date; + mtime?: Date; + ctime?: Date; + charset?: string; + comment?: string; + gid?: number; + uid?: number; + gname?: string; + uname?: string; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + path?: string; + size?: number; + mode?: number; + global: boolean; + constructor(obj: HeaderData, global?: boolean); + encode(): Buffer; + encodeBody(): string; + encodeField(field: keyof Pax): string; + static parse(str: string, ex?: HeaderData, g?: boolean): Pax; +} +//# sourceMappingURL=pax.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.d.ts.map b/node_modules/tar/dist/commonjs/pax.d.ts.map new file mode 100644 index 0000000..803755c --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.d.ts","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":";AACA,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,qBAAa,GAAI,YAAW,UAAU;IACpC,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,EAAE,OAAO,CAAA;gBAEH,GAAG,EAAE,UAAU,EAAE,MAAM,GAAE,OAAe;IAmBpD,MAAM;IAiDN,UAAU;IAoBV,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,MAAM;IA2BrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAE,OAAe;CAG9D"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.js b/node_modules/tar/dist/commonjs/pax.js new file mode 100644 index 0000000..d30c0f3 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.js @@ -0,0 +1,158 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Pax = void 0; +const node_path_1 = require("node:path"); +const header_js_1 = require("./header.js"); +class Pax { + atime; + mtime; + ctime; + charset; + comment; + gid; + uid; + gname; + uname; + linkpath; + dev; + ino; + nlink; + path; + size; + mode; + global; + constructor(obj, global = false) { + this.atime = obj.atime; + this.charset = obj.charset; + this.comment = obj.comment; + this.ctime = obj.ctime; + this.dev = obj.dev; + this.gid = obj.gid; + this.global = global; + this.gname = obj.gname; + this.ino = obj.ino; + this.linkpath = obj.linkpath; + this.mtime = obj.mtime; + this.nlink = obj.nlink; + this.path = obj.path; + this.size = obj.size; + this.uid = obj.uid; + this.uname = obj.uname; + } + encode() { + const body = this.encodeBody(); + if (body === '') { + return Buffer.allocUnsafe(0); + } + const bodyLen = Buffer.byteLength(body); + // round up to 512 bytes + // add 512 for header + const bufLen = 512 * Math.ceil(1 + bodyLen / 512); + const buf = Buffer.allocUnsafe(bufLen); + // 0-fill the header section, it might not hit every field + for (let i = 0; i < 512; i++) { + buf[i] = 0; + } + new header_js_1.Header({ + // XXX split the path + // then the path should be PaxHeader + basename, but less than 99, + // prepend with the dirname + /* c8 ignore start */ + path: ('PaxHeader/' + (0, node_path_1.basename)(this.path ?? '')).slice(0, 99), + /* c8 ignore stop */ + mode: this.mode || 0o644, + uid: this.uid, + gid: this.gid, + size: bodyLen, + mtime: this.mtime, + type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader', + linkpath: '', + uname: this.uname || '', + gname: this.gname || '', + devmaj: 0, + devmin: 0, + atime: this.atime, + ctime: this.ctime, + }).encode(buf); + buf.write(body, 512, bodyLen, 'utf8'); + // null pad after the body + for (let i = bodyLen + 512; i < buf.length; i++) { + buf[i] = 0; + } + return buf; + } + encodeBody() { + return (this.encodeField('path') + + this.encodeField('ctime') + + this.encodeField('atime') + + this.encodeField('dev') + + this.encodeField('ino') + + this.encodeField('nlink') + + this.encodeField('charset') + + this.encodeField('comment') + + this.encodeField('gid') + + this.encodeField('gname') + + this.encodeField('linkpath') + + this.encodeField('mtime') + + this.encodeField('size') + + this.encodeField('uid') + + this.encodeField('uname')); + } + encodeField(field) { + if (this[field] === undefined) { + return ''; + } + const r = this[field]; + const v = r instanceof Date ? r.getTime() / 1000 : r; + const s = ' ' + + (field === 'dev' || field === 'ino' || field === 'nlink' ? + 'SCHILY.' + : '') + + field + + '=' + + v + + '\n'; + const byteLen = Buffer.byteLength(s); + // the digits includes the length of the digits in ascii base-10 + // so if it's 9 characters, then adding 1 for the 9 makes it 10 + // which makes it 11 chars. + let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; + if (byteLen + digits >= Math.pow(10, digits)) { + digits += 1; + } + const len = digits + byteLen; + return len + s; + } + static parse(str, ex, g = false) { + return new Pax(merge(parseKV(str), ex), g); + } +} +exports.Pax = Pax; +const merge = (a, b) => b ? Object.assign({}, b, a) : a; +const parseKV = (str) => str + .replace(/\n$/, '') + .split('\n') + .reduce(parseKVLine, Object.create(null)); +const parseKVLine = (set, line) => { + const n = parseInt(line, 10); + // XXX Values with \n in them will fail this. + // Refactor to not be a naive line-by-line parse. + if (n !== Buffer.byteLength(line) + 1) { + return set; + } + line = line.slice((n + ' ').length); + const kv = line.split('='); + const r = kv.shift(); + if (!r) { + return set; + } + const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1'); + const v = kv.join('='); + set[k] = + /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? + new Date(Number(v) * 1000) + : /^[0-9]+$/.test(v) ? +v + : v; + return set; +}; +//# sourceMappingURL=pax.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/pax.js.map b/node_modules/tar/dist/commonjs/pax.js.map new file mode 100644 index 0000000..0e216f4 --- /dev/null +++ b/node_modules/tar/dist/commonjs/pax.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.js","sourceRoot":"","sources":["../../src/pax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C,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC,CAAC,CAAC,CAAA;IACL,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import { basename } from 'node:path'\nimport { Header, HeaderData } from './header.js'\n\nexport class Pax implements HeaderData {\n atime?: Date\n mtime?: Date\n ctime?: Date\n\n charset?: string\n comment?: string\n\n gid?: number\n uid?: number\n\n gname?: string\n uname?: string\n linkpath?: string\n dev?: number\n ino?: number\n nlink?: number\n path?: string\n size?: number\n mode?: number\n\n global: boolean\n\n constructor(obj: HeaderData, global: boolean = false) {\n this.atime = obj.atime\n this.charset = obj.charset\n this.comment = obj.comment\n this.ctime = obj.ctime\n this.dev = obj.dev\n this.gid = obj.gid\n this.global = global\n this.gname = obj.gname\n this.ino = obj.ino\n this.linkpath = obj.linkpath\n this.mtime = obj.mtime\n this.nlink = obj.nlink\n this.path = obj.path\n this.size = obj.size\n this.uid = obj.uid\n this.uname = obj.uname\n }\n\n encode() {\n const body = this.encodeBody()\n if (body === '') {\n return Buffer.allocUnsafe(0)\n }\n\n const bodyLen = Buffer.byteLength(body)\n // round up to 512 bytes\n // add 512 for header\n const bufLen = 512 * Math.ceil(1 + bodyLen / 512)\n const buf = Buffer.allocUnsafe(bufLen)\n\n // 0-fill the header section, it might not hit every field\n for (let i = 0; i < 512; i++) {\n buf[i] = 0\n }\n\n new Header({\n // XXX split the path\n // then the path should be PaxHeader + basename, but less than 99,\n // prepend with the dirname\n /* c8 ignore start */\n path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99),\n /* c8 ignore stop */\n mode: this.mode || 0o644,\n uid: this.uid,\n gid: this.gid,\n size: bodyLen,\n mtime: this.mtime,\n type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',\n linkpath: '',\n uname: this.uname || '',\n gname: this.gname || '',\n devmaj: 0,\n devmin: 0,\n atime: this.atime,\n ctime: this.ctime,\n }).encode(buf)\n\n buf.write(body, 512, bodyLen, 'utf8')\n\n // null pad after the body\n for (let i = bodyLen + 512; i < buf.length; i++) {\n buf[i] = 0\n }\n\n return buf\n }\n\n encodeBody() {\n return (\n this.encodeField('path') +\n this.encodeField('ctime') +\n this.encodeField('atime') +\n this.encodeField('dev') +\n this.encodeField('ino') +\n this.encodeField('nlink') +\n this.encodeField('charset') +\n this.encodeField('comment') +\n this.encodeField('gid') +\n this.encodeField('gname') +\n this.encodeField('linkpath') +\n this.encodeField('mtime') +\n this.encodeField('size') +\n this.encodeField('uid') +\n this.encodeField('uname')\n )\n }\n\n encodeField(field: keyof Pax): string {\n if (this[field] === undefined) {\n return ''\n }\n const r = this[field]\n const v = r instanceof Date ? r.getTime() / 1000 : r\n const s =\n ' ' +\n (field === 'dev' || field === 'ino' || field === 'nlink' ?\n 'SCHILY.'\n : '') +\n field +\n '=' +\n v +\n '\\n'\n const byteLen = Buffer.byteLength(s)\n // the digits includes the length of the digits in ascii base-10\n // so if it's 9 characters, then adding 1 for the 9 makes it 10\n // which makes it 11 chars.\n let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1\n if (byteLen + digits >= Math.pow(10, digits)) {\n digits += 1\n }\n const len = digits + byteLen\n return len + s\n }\n\n static parse(str: string, ex?: HeaderData, g: boolean = false) {\n return new Pax(merge(parseKV(str), ex), g)\n }\n}\n\nconst merge = (a: HeaderData, b?: HeaderData) =>\n b ? Object.assign({}, b, a) : a\n\nconst parseKV = (str: string) =>\n str\n .replace(/\\n$/, '')\n .split('\\n')\n .reduce(parseKVLine, Object.create(null))\n\nconst parseKVLine = (set: Record, line: string) => {\n const n = parseInt(line, 10)\n\n // XXX Values with \\n in them will fail this.\n // Refactor to not be a naive line-by-line parse.\n if (n !== Buffer.byteLength(line) + 1) {\n return set\n }\n\n line = line.slice((n + ' ').length)\n const kv = line.split('=')\n const r = kv.shift()\n\n if (!r) {\n return set\n }\n\n const k = r.replace(/^SCHILY\\.(dev|ino|nlink)/, '$1')\n\n const v = kv.join('=')\n set[k] =\n /^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(k) ?\n new Date(Number(v) * 1000)\n : /^[0-9]+$/.test(v) ? +v\n : v\n return set\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.d.ts b/node_modules/tar/dist/commonjs/read-entry.d.ts new file mode 100644 index 0000000..718da5c --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.d.ts @@ -0,0 +1,37 @@ +/// +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { Pax } from './pax.js'; +import { EntryTypeName } from './types.js'; +export declare class ReadEntry extends Minipass { + #private; + extended?: Pax; + globalExtended?: Pax; + header: Header; + startBlockSize: number; + blockRemain: number; + remain: number; + type: EntryTypeName; + meta: boolean; + ignore: boolean; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + size: number; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + invalid: boolean; + absolute?: string; + unsupported: boolean; + constructor(header: Header, ex?: Pax, gex?: Pax); + write(data: Buffer): boolean; +} +//# sourceMappingURL=read-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.d.ts.map b/node_modules/tar/dist/commonjs/read-entry.d.ts.map new file mode 100644 index 0000000..b4ec30f --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.d.ts","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,qBAAa,SAAU,SAAQ,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;;IACrD,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,cAAc,CAAC,EAAE,GAAG,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,MAAM,EAAE,OAAO,CAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAI;IAChB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAQ;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAQ;gBAEhB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG;IA+E/C,KAAK,CAAC,IAAI,EAAE,MAAM;CAyCnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.js b/node_modules/tar/dist/commonjs/read-entry.js new file mode 100644 index 0000000..15e2d55 --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.js @@ -0,0 +1,140 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadEntry = void 0; +const minipass_1 = require("minipass"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +class ReadEntry extends minipass_1.Minipass { + extended; + globalExtended; + header; + startBlockSize; + blockRemain; + remain; + type; + meta = false; + ignore = false; + path; + mode; + uid; + gid; + uname; + gname; + size = 0; + mtime; + atime; + ctime; + linkpath; + dev; + ino; + nlink; + invalid = false; + absolute; + unsupported = false; + constructor(header, ex, gex) { + super({}); + // read entries always start life paused. this is to avoid the + // situation where Minipass's auto-ending empty streams results + // in an entry ending before we're ready for it. + this.pause(); + this.extended = ex; + this.globalExtended = gex; + this.header = header; + /* c8 ignore start */ + this.remain = header.size ?? 0; + /* c8 ignore stop */ + this.startBlockSize = 512 * Math.ceil(this.remain / 512); + this.blockRemain = this.startBlockSize; + this.type = header.type; + switch (this.type) { + case 'File': + case 'OldFile': + case 'Link': + case 'SymbolicLink': + case 'CharacterDevice': + case 'BlockDevice': + case 'Directory': + case 'FIFO': + case 'ContiguousFile': + case 'GNUDumpDir': + break; + case 'NextFileHasLongLinkpath': + case 'NextFileHasLongPath': + case 'OldGnuLongPath': + case 'GlobalExtendedHeader': + case 'ExtendedHeader': + case 'OldExtendedHeader': + this.meta = true; + break; + // NOTE: gnutar and bsdtar treat unrecognized types as 'File' + // it may be worth doing the same, but with a warning. + default: + this.ignore = true; + } + /* c8 ignore start */ + if (!header.path) { + throw new Error('no path provided for tar.ReadEntry'); + } + /* c8 ignore stop */ + this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(header.path); + this.mode = header.mode; + if (this.mode) { + this.mode = this.mode & 0o7777; + } + this.uid = header.uid; + this.gid = header.gid; + this.uname = header.uname; + this.gname = header.gname; + this.size = this.remain; + this.mtime = header.mtime; + this.atime = header.atime; + this.ctime = header.ctime; + /* c8 ignore start */ + this.linkpath = + header.linkpath ? + (0, normalize_windows_path_js_1.normalizeWindowsPath)(header.linkpath) + : undefined; + /* c8 ignore stop */ + this.uname = header.uname; + this.gname = header.gname; + if (ex) { + this.#slurp(ex); + } + if (gex) { + this.#slurp(gex, true); + } + } + write(data) { + const writeLen = data.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + const r = this.remain; + const br = this.blockRemain; + this.remain = Math.max(0, r - writeLen); + this.blockRemain = Math.max(0, br - writeLen); + if (this.ignore) { + return true; + } + if (r >= writeLen) { + return super.write(data); + } + // r < writeLen + return super.write(data.subarray(0, r)); + } + #slurp(ex, gex = false) { + if (ex.path) + ex.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(ex.path); + if (ex.linkpath) + ex.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(ex.linkpath); + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex)); + }))); + } +} +exports.ReadEntry = ReadEntry; +//# sourceMappingURL=read-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/read-entry.js.map b/node_modules/tar/dist/commonjs/read-entry.js.map new file mode 100644 index 0000000..8fc8c1d --- /dev/null +++ b/node_modules/tar/dist/commonjs/read-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.js","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":";;;AAAA,uCAAmC;AAEnC,2EAAkE;AAIlE,MAAa,SAAU,SAAQ,mBAAwB;IACrD,QAAQ,CAAM;IACd,cAAc,CAAM;IACpB,MAAM,CAAQ;IACd,cAAc,CAAQ;IACtB,WAAW,CAAQ;IACnB,MAAM,CAAQ;IACd,IAAI,CAAe;IACnB,IAAI,GAAY,KAAK,CAAA;IACrB,MAAM,GAAY,KAAK,CAAA;IACvB,IAAI,CAAQ;IACZ,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,KAAK,CAAS;IACd,IAAI,GAAW,CAAC,CAAA;IAChB,KAAK,CAAO;I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,IAAA,gDAAoB,EAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;QAChE,MAAM,CAAC,MAAM,CACX,IAAI,EACJ,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;YACnC,0DAA0D;YAC1D,4DAA4D;YAC5D,qCAAqC;YACrC,OAAO,CAAC,CACN,CAAC,KAAK,IAAI;gBACV,CAAC,KAAK,SAAS;gBACf,CAAC,CAAC,KAAK,MAAM,IAAI,GAAG,CAAC,CACtB,CAAA;QACH,CAAC,CAAC,CACH,CACF,CAAA;IACH,CAAC;CACF;AArJD,8BAqJC","sourcesContent":["import { Minipass } from 'minipass'\nimport { Header } from './header.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Pax } from './pax.js'\nimport { EntryTypeName } from './types.js'\n\nexport class ReadEntry extends Minipass {\n extended?: Pax\n globalExtended?: Pax\n header: Header\n startBlockSize: number\n blockRemain: number\n remain: number\n type: EntryTypeName\n meta: boolean = false\n ignore: boolean = false\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n size: number = 0\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n\n dev?: number\n ino?: number\n nlink?: number\n invalid: boolean = false\n absolute?: string\n unsupported: boolean = false\n\n constructor(header: Header, ex?: Pax, gex?: Pax) {\n super({})\n // read entries always start life paused. this is to avoid the\n // situation where Minipass's auto-ending empty streams results\n // in an entry ending before we're ready for it.\n this.pause()\n this.extended = ex\n this.globalExtended = gex\n this.header = header\n /* c8 ignore start */\n this.remain = header.size ?? 0\n /* c8 ignore stop */\n this.startBlockSize = 512 * Math.ceil(this.remain / 512)\n this.blockRemain = this.startBlockSize\n this.type = header.type\n switch (this.type) {\n case 'File':\n case 'OldFile':\n case 'Link':\n case 'SymbolicLink':\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'Directory':\n case 'FIFO':\n case 'ContiguousFile':\n case 'GNUDumpDir':\n break\n\n case 'NextFileHasLongLinkpath':\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath':\n case 'GlobalExtendedHeader':\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this.meta = true\n break\n\n // NOTE: gnutar and bsdtar treat unrecognized types as 'File'\n // it may be worth doing the same, but with a warning.\n default:\n this.ignore = true\n }\n\n /* c8 ignore start */\n if (!header.path) {\n throw new Error('no path provided for tar.ReadEntry')\n }\n /* c8 ignore stop */\n\n this.path = normalizeWindowsPath(header.path) as string\n this.mode = header.mode\n if (this.mode) {\n this.mode = this.mode & 0o7777\n }\n this.uid = header.uid\n this.gid = header.gid\n this.uname = header.uname\n this.gname = header.gname\n this.size = this.remain\n this.mtime = header.mtime\n this.atime = header.atime\n this.ctime = header.ctime\n /* c8 ignore start */\n this.linkpath =\n header.linkpath ?\n normalizeWindowsPath(header.linkpath)\n : undefined\n /* c8 ignore stop */\n this.uname = header.uname\n this.gname = header.gname\n\n if (ex) {\n this.#slurp(ex)\n }\n if (gex) {\n this.#slurp(gex, true)\n }\n }\n\n write(data: Buffer) {\n const writeLen = data.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n\n const r = this.remain\n const br = this.blockRemain\n this.remain = Math.max(0, r - writeLen)\n this.blockRemain = Math.max(0, br - writeLen)\n if (this.ignore) {\n return true\n }\n\n if (r >= writeLen) {\n return super.write(data)\n }\n\n // r < writeLen\n return super.write(data.subarray(0, r))\n }\n\n #slurp(ex: Pax, gex: boolean = false) {\n if (ex.path) ex.path = normalizeWindowsPath(ex.path)\n if (ex.linkpath) ex.linkpath = normalizeWindowsPath(ex.linkpath)\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex)\n )\n }),\n ),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.d.ts b/node_modules/tar/dist/commonjs/replace.d.ts new file mode 100644 index 0000000..8ae4035 --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.d.ts @@ -0,0 +1,2 @@ +export declare const replace: import("./make-command.js").TarCommand; +//# sourceMappingURL=replace.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.d.ts.map b/node_modules/tar/dist/commonjs/replace.d.ts.map new file mode 100644 index 0000000..66838f5 --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AA6QA,eAAO,MAAM,OAAO,sDA6BnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.js b/node_modules/tar/dist/commonjs/replace.js new file mode 100644 index 0000000..262deec --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.js @@ -0,0 +1,231 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.replace = void 0; +// tar -r +const fs_minipass_1 = require("@isaacs/fs-minipass"); +const node_fs_1 = __importDefault(require("node:fs")); +const node_path_1 = __importDefault(require("node:path")); +const header_js_1 = require("./header.js"); +const list_js_1 = require("./list.js"); +const make_command_js_1 = require("./make-command.js"); +const options_js_1 = require("./options.js"); +const pack_js_1 = require("./pack.js"); +// starting at the head of the file, read a Header +// If the checksum is invalid, that's our position to start writing +// If it is, jump forward by the specified size (round up to 512) +// and try again. +// Write the new Pack stream starting there. +const replaceSync = (opt, files) => { + const p = new pack_js_1.PackSync(opt); + let threw = true; + let fd; + let position; + try { + try { + fd = node_fs_1.default.openSync(opt.file, 'r+'); + } + catch (er) { + if (er?.code === 'ENOENT') { + fd = node_fs_1.default.openSync(opt.file, 'w+'); + } + else { + throw er; + } + } + const st = node_fs_1.default.fstatSync(fd); + const headBuf = Buffer.alloc(512); + POSITION: for (position = 0; position < st.size; position += 512) { + for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) { + bytes = node_fs_1.default.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos); + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + throw new Error('cannot append to compressed archives'); + } + if (!bytes) { + break POSITION; + } + } + const h = new header_js_1.Header(headBuf); + if (!h.cksumValid) { + break; + } + const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512); + if (position + entryBlockSize + 512 > st.size) { + break; + } + // the 512 for the header we just parsed will be added as well + // also jump ahead all the blocks for the body + position += entryBlockSize; + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + } + threw = false; + streamSync(opt, p, position, fd, files); + } + finally { + if (threw) { + try { + node_fs_1.default.closeSync(fd); + } + catch (er) { } + } + } +}; +const streamSync = (opt, p, position, fd, files) => { + const stream = new fs_minipass_1.WriteStreamSync(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const replaceAsync = (opt, files) => { + files = Array.from(files); + const p = new pack_js_1.Pack(opt); + const getPos = (fd, size, cb_) => { + const cb = (er, pos) => { + if (er) { + node_fs_1.default.close(fd, _ => cb_(er)); + } + else { + cb_(null, pos); + } + }; + let position = 0; + if (size === 0) { + return cb(null, 0); + } + let bufPos = 0; + const headBuf = Buffer.alloc(512); + const onread = (er, bytes) => { + if (er || typeof bytes === 'undefined') { + return cb(er); + } + bufPos += bytes; + if (bufPos < 512 && bytes) { + return node_fs_1.default.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread); + } + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + return cb(new Error('cannot append to compressed archives')); + } + // truncated header + if (bufPos < 512) { + return cb(null, position); + } + const h = new header_js_1.Header(headBuf); + if (!h.cksumValid) { + return cb(null, position); + } + /* c8 ignore next */ + const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512); + if (position + entryBlockSize + 512 > size) { + return cb(null, position); + } + position += entryBlockSize + 512; + if (position >= size) { + return cb(null, position); + } + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + bufPos = 0; + node_fs_1.default.read(fd, headBuf, 0, 512, position, onread); + }; + node_fs_1.default.read(fd, headBuf, 0, 512, position, onread); + }; + const promise = new Promise((resolve, reject) => { + p.on('error', reject); + let flag = 'r+'; + const onopen = (er, fd) => { + if (er && er.code === 'ENOENT' && flag === 'r+') { + flag = 'w+'; + return node_fs_1.default.open(opt.file, flag, onopen); + } + if (er || !fd) { + return reject(er); + } + node_fs_1.default.fstat(fd, (er, st) => { + if (er) { + return node_fs_1.default.close(fd, () => reject(er)); + } + getPos(fd, st.size, (er, position) => { + if (er) { + return reject(er); + } + const stream = new fs_minipass_1.WriteStream(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + stream.on('error', reject); + stream.on('close', resolve); + addFilesAsync(p, files); + }); + }); + }; + node_fs_1.default.open(opt.file, flag, onopen); + }); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + (0, list_js_1.list)({ + file: node_path_1.default.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await (0, list_js_1.list)({ + file: node_path_1.default.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + } + p.end(); +}; +exports.replace = (0, make_command_js_1.makeCommand)(replaceSync, replaceAsync, +/* c8 ignore start */ +() => { + throw new TypeError('file is required'); +}, () => { + throw new TypeError('file is required'); +}, +/* c8 ignore stop */ +(opt, entries) => { + if (!(0, options_js_1.isFile)(opt)) { + throw new TypeError('file is required'); + } + if (opt.gzip || + opt.brotli || + opt.file.endsWith('.br') || + opt.file.endsWith('.tbr')) { + throw new TypeError('cannot append to compressed archives'); + } + if (!entries?.length) { + throw new TypeError('no paths specified to add/replace'); + } +}); +//# sourceMappingURL=replace.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/replace.js.map b/node_modules/tar/dist/commonjs/replace.js.map new file mode 100644 index 0000000..b102e46 --- /dev/null +++ b/node_modules/tar/dist/commonjs/replace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.js","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":";;;;;;AAAA,SAAS;AACT,qDAAkE;AAElE,sDAAwB;AACxB,0DAA4B;AAC5B,2CAAoC;AACpC,uCAAgC;AAChC,uDAA+C;AAC/C,6CAIqB;AACrB,uCAA0C;AAE1C,kDAAkD;AAClD,mEAAmE;AACnE,iEAAiE;AACjE,iBAAiB;AACjB,4CAA4C;AAE5C,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,KAAe,EAAE,EAAE;IAC/D,MAAM,CAAC,GAAG,IAAI,kBAAQ,CAAC,GAAG,CAAC,CAAA;IAE3B,IAAI,KAAK,GAAG,IAAI,CAAA;IAChB,IAAI,EAAE,CAAA;IACN,IAAI,QAAQ,CAAA;IAEZ,IAAI,CAAC;QACH,IAAI,CAAC;YACH,EAAE,GAAG,iBAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAClC,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,IAAK,EAA4B,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrD,EAAE,GAAG,iBAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;YAClC,CAAC;iBAAM,CAAC;gBACN,MAAM,EAAE,CAAA;YACV,CAAC;Q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AAE,IAAI;gBACd,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;aACnC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QACb,CAAC;IACH,CAAC;IACD,CAAC,CAAC,GAAG,EAAE,CAAA;AACT,CAAC,CAAA;AAEY,QAAA,OAAO,GAAG,IAAA,6BAAW,EAChC,WAAW,EACX,YAAY;AACZ,qBAAqB;AACrB,GAAU,EAAE;IACV,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzC,CAAC,EACD,GAAU,EAAE;IACV,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;AACzC,CAAC;AACD,oBAAoB;AACpB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;IACf,IAAI,CAAC,IAAA,mBAAM,EAAC,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,IAAI,SAAS,CAAC,kBAAkB,CAAC,CAAA;IACzC,CAAC;IAED,IACE,GAAG,CAAC,IAAI;QACR,GAAG,CAAC,MAAM;QACV,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EACzB,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["// tar -r\nimport { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport { Header } from './header.js'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n isFile,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\n// starting at the head of the file, read a Header\n// If the checksum is invalid, that's our position to start writing\n// If it is, jump forward by the specified size (round up to 512)\n// and try again.\n// Write the new Pack stream starting there.\n\nconst replaceSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n\n let threw = true\n let fd\n let position\n\n try {\n try {\n fd = fs.openSync(opt.file, 'r+')\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n fd = fs.openSync(opt.file, 'w+')\n } else {\n throw er\n }\n }\n\n const st = fs.fstatSync(fd)\n const headBuf = Buffer.alloc(512)\n\n POSITION: for (\n position = 0;\n position < st.size;\n position += 512\n ) {\n for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {\n bytes = fs.readSync(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n )\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n throw new Error('cannot append to compressed archives')\n }\n\n if (!bytes) {\n break POSITION\n }\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n break\n }\n const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512)\n if (position + entryBlockSize + 512 > st.size) {\n break\n }\n // the 512 for the header we just parsed will be added as well\n // also jump ahead all the blocks for the body\n position += entryBlockSize\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n }\n threw = false\n\n streamSync(opt, p, position, fd, files)\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd as number)\n } catch (er) {}\n }\n }\n}\n\nconst streamSync = (\n opt: TarOptionsSyncFile,\n p: Pack,\n position: number,\n fd: number,\n files: string[],\n) => {\n const stream = new WriteStreamSync(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst replaceAsync = (\n opt: TarOptionsFile,\n files: string[],\n): Promise => {\n files = Array.from(files)\n const p = new Pack(opt)\n\n const getPos = (\n fd: number,\n size: number,\n cb_: (er?: null | Error, pos?: number) => void,\n ) => {\n const cb = (er?: Error | null, pos?: number) => {\n if (er) {\n fs.close(fd, _ => cb_(er))\n } else {\n cb_(null, pos)\n }\n }\n\n let position = 0\n if (size === 0) {\n return cb(null, 0)\n }\n\n let bufPos = 0\n const headBuf = Buffer.alloc(512)\n const onread = (er?: null | Error, bytes?: number): void => {\n if (er || typeof bytes === 'undefined') {\n return cb(er)\n }\n bufPos += bytes\n if (bufPos < 512 && bytes) {\n return fs.read(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n onread,\n )\n }\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n return cb(new Error('cannot append to compressed archives'))\n }\n\n // truncated header\n if (bufPos < 512) {\n return cb(null, position)\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n return cb(null, position)\n }\n\n /* c8 ignore next */\n const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512)\n if (position + entryBlockSize + 512 > size) {\n return cb(null, position)\n }\n\n position += entryBlockSize + 512\n if (position >= size) {\n return cb(null, position)\n }\n\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n bufPos = 0\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n\n const promise = new Promise((resolve, reject) => {\n p.on('error', reject)\n let flag = 'r+'\n const onopen = (\n er?: NodeJS.ErrnoException | null,\n fd?: number,\n ) => {\n if (er && er.code === 'ENOENT' && flag === 'r+') {\n flag = 'w+'\n return fs.open(opt.file, flag, onopen)\n }\n\n if (er || !fd) {\n return reject(er)\n }\n\n fs.fstat(fd, (er, st) => {\n if (er) {\n return fs.close(fd, () => reject(er))\n }\n\n getPos(fd, st.size, (er, position) => {\n if (er) {\n return reject(er)\n }\n const stream = new WriteStream(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n stream.on('error', reject)\n stream.on('close', resolve)\n addFilesAsync(p, files)\n })\n })\n }\n fs.open(opt.file, flag, onopen)\n })\n\n return promise\n}\n\nconst addFilesSync = (p: Pack, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nexport const replace = makeCommand(\n replaceSync,\n replaceAsync,\n /* c8 ignore start */\n (): never => {\n throw new TypeError('file is required')\n },\n (): never => {\n throw new TypeError('file is required')\n },\n /* c8 ignore stop */\n (opt, entries) => {\n if (!isFile(opt)) {\n throw new TypeError('file is required')\n }\n\n if (\n opt.gzip ||\n opt.brotli ||\n opt.file.endsWith('.br') ||\n opt.file.endsWith('.tbr')\n ) {\n throw new TypeError('cannot append to compressed archives')\n }\n\n if (!entries?.length) {\n throw new TypeError('no paths specified to add/replace')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts new file mode 100644 index 0000000..170ce2c --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts @@ -0,0 +1,2 @@ +export declare const stripAbsolutePath: (path: string) => string[]; +//# sourceMappingURL=strip-absolute-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map new file mode 100644 index 0000000..83ca6ed --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.d.ts","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,SAAU,MAAM,aAgB7C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.js b/node_modules/tar/dist/commonjs/strip-absolute-path.js new file mode 100644 index 0000000..bb7639c --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stripAbsolutePath = void 0; +// unix absolute paths are also absolute on win32, so we use this for both +const node_path_1 = require("node:path"); +const { isAbsolute, parse } = node_path_1.win32; +// returns [root, stripped] +// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in +// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip / +// explicitly if it's the first character. +// drive-specific relative paths on Windows get their root stripped off even +// though they are not absolute, so `c:../foo` becomes ['c:', '../foo'] +const stripAbsolutePath = (path) => { + let r = ''; + let parsed = parse(path); + while (isAbsolute(path) || parsed.root) { + // windows will think that //x/y/z has a "root" of //x/y/ + // but strip the //?/C:/ off of //?/C:/path + const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? + '/' + : parsed.root; + path = path.slice(root.length); + r += root; + parsed = parse(path); + } + return [r, path]; +}; +exports.stripAbsolutePath = stripAbsolutePath; +//# sourceMappingURL=strip-absolute-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-absolute-path.js.map b/node_modules/tar/dist/commonjs/strip-absolute-path.js.map new file mode 100644 index 0000000..75e5620 --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-absolute-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.js","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC1E,yCAAiC;AACjC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,iBAAK,CAAA;AAEnC,2BAA2B;AAC3B,4EAA4E;AAC5E,yEAAyE;AACzE,0CAA0C;AAC1C,4EAA4E;AAC5E,uEAAuE;AAChE,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACvC,yDAAyD;QACzD,2CAA2C;QAC3C,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;YACrD,GAAG;YACL,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;QACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,CAAC,IAAI,IAAI,CAAA;QACT,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA;AAhBY,QAAA,iBAAiB,qBAgB7B","sourcesContent":["// unix absolute paths are also absolute on win32, so we use this for both\nimport { win32 } from 'node:path'\nconst { isAbsolute, parse } = win32\n\n// returns [root, stripped]\n// Note that windows will think that //x/y/z/a has a \"root\" of //x/y, and in\n// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip /\n// explicitly if it's the first character.\n// drive-specific relative paths on Windows get their root stripped off even\n// though they are not absolute, so `c:../foo` becomes ['c:', '../foo']\nexport const stripAbsolutePath = (path: string) => {\n let r = ''\n\n let parsed = parse(path)\n while (isAbsolute(path) || parsed.root) {\n // windows will think that //x/y/z has a \"root\" of //x/y/\n // but strip the //?/C:/ off of //?/C:/path\n const root =\n path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ?\n '/'\n : parsed.root\n path = path.slice(root.length)\n r += root\n parsed = parse(path)\n }\n return [r, path]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts new file mode 100644 index 0000000..dcc4637 --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts @@ -0,0 +1,2 @@ +export declare const stripTrailingSlashes: (str: string) => string; +//# sourceMappingURL=strip-trailing-slashes.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map new file mode 100644 index 0000000..bf43978 --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.d.ts","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,QAAS,MAAM,WAQ/C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.js b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js new file mode 100644 index 0000000..6fa74ad --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.stripTrailingSlashes = void 0; +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const stripTrailingSlashes = (str) => { + let i = str.length - 1; + let slashesStart = -1; + while (i > -1 && str.charAt(i) === '/') { + slashesStart = i; + i--; + } + return slashesStart === -1 ? str : str.slice(0, slashesStart); +}; +exports.stripTrailingSlashes = stripTrailingSlashes; +//# sourceMappingURL=strip-trailing-slashes.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map new file mode 100644 index 0000000..1c6204d --- /dev/null +++ b/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.js","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":";;;AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AACrC,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAClD,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAA;IACtB,IAAI,YAAY,GAAG,CAAC,CAAC,CAAA;IACrB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACvC,YAAY,GAAG,CAAC,CAAA;QAChB,CAAC,EAAE,CAAA;IACL,CAAC;IACD,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;AAC/D,CAAC,CAAA;AARY,QAAA,oBAAoB,wBAQhC","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nexport const stripTrailingSlashes = (str: string) => {\n let i = str.length - 1\n let slashesStart = -1\n while (i > -1 && str.charAt(i) === '/') {\n slashesStart = i\n i--\n }\n return slashesStart === -1 ? str : str.slice(0, slashesStart)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.d.ts b/node_modules/tar/dist/commonjs/symlink-error.d.ts new file mode 100644 index 0000000..61b400f --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.d.ts @@ -0,0 +1,9 @@ +export declare class SymlinkError extends Error { + path: string; + symlink: string; + syscall: 'symlink'; + code: 'TAR_SYMLINK_ERROR'; + constructor(symlink: string, path: string); + get name(): string; +} +//# sourceMappingURL=symlink-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.d.ts.map b/node_modules/tar/dist/commonjs/symlink-error.d.ts.map new file mode 100644 index 0000000..5716e8e --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.d.ts","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,SAAS,CAAY;IAC9B,IAAI,EAAE,mBAAmB,CAAsB;gBACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAKzC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.js b/node_modules/tar/dist/commonjs/symlink-error.js new file mode 100644 index 0000000..cc19ac1 --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SymlinkError = void 0; +class SymlinkError extends Error { + path; + symlink; + syscall = 'symlink'; + code = 'TAR_SYMLINK_ERROR'; + constructor(symlink, path) { + super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link'); + this.symlink = symlink; + this.path = path; + } + get name() { + return 'SymlinkError'; + } +} +exports.SymlinkError = SymlinkError; +//# sourceMappingURL=symlink-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/symlink-error.js.map b/node_modules/tar/dist/commonjs/symlink-error.js.map new file mode 100644 index 0000000..69fb449 --- /dev/null +++ b/node_modules/tar/dist/commonjs/symlink-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.js","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,CAAQ;IACZ,OAAO,CAAQ;IACf,OAAO,GAAc,SAAS,CAAA;IAC9B,IAAI,GAAwB,mBAAmB,CAAA;IAC/C,YAAY,OAAe,EAAE,IAAY;QACvC,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,IAAI,IAAI;QACN,OAAO,cAAc,CAAA;IACvB,CAAC;CACF;AAbD,oCAaC","sourcesContent":["export class SymlinkError extends Error {\n path: string\n symlink: string\n syscall: 'symlink' = 'symlink'\n code: 'TAR_SYMLINK_ERROR' = 'TAR_SYMLINK_ERROR'\n constructor(symlink: string, path: string) {\n super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link')\n this.symlink = symlink\n this.path = path\n }\n get name() {\n return 'SymlinkError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.d.ts b/node_modules/tar/dist/commonjs/types.d.ts new file mode 100644 index 0000000..a39f054 --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.d.ts @@ -0,0 +1,7 @@ +export declare const isCode: (c: string) => c is EntryTypeCode; +export declare const isName: (c: string) => c is EntryTypeName; +export type EntryTypeCode = '0' | '' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | 'g' | 'x' | 'A' | 'D' | 'I' | 'K' | 'L' | 'M' | 'N' | 'S' | 'V' | 'X'; +export type EntryTypeName = 'File' | 'OldFile' | 'Link' | 'SymbolicLink' | 'CharacterDevice' | 'BlockDevice' | 'Directory' | 'FIFO' | 'ContiguousFile' | 'GlobalExtendedHeader' | 'ExtendedHeader' | 'SolarisACL' | 'GNUDumpDir' | 'Inode' | 'NextFileHasLongLinkpath' | 'NextFileHasLongPath' | 'ContinuationFile' | 'OldGnuLongPath' | 'SparseFile' | 'TapeVolumeHeader' | 'OldExtendedHeader' | 'Unsupported'; +export declare const name: Map; +export declare const code: Map; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.d.ts.map b/node_modules/tar/dist/commonjs/types.d.ts.map new file mode 100644 index 0000000..6e21eeb --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,MAAM,MAAM,aAAa,GACrB,GAAG,GACH,EAAE,GACF,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,SAAS,GACT,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,WAAW,GACX,MAAM,GACN,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,GAClB,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,CAAA;AAGjB,eAAO,MAAM,IAAI,mCAsCf,CAAA;AAGF,eAAO,MAAM,IAAI,mCAEhB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.js b/node_modules/tar/dist/commonjs/types.js new file mode 100644 index 0000000..cb9b684 --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.code = exports.name = exports.isName = exports.isCode = void 0; +const isCode = (c) => exports.name.has(c); +exports.isCode = isCode; +const isName = (c) => exports.code.has(c); +exports.isName = isName; +// map types from key to human-friendly name +exports.name = new Map([ + ['0', 'File'], + // same as File + ['', 'OldFile'], + ['1', 'Link'], + ['2', 'SymbolicLink'], + // Devices and FIFOs aren't fully supported + // they are parsed, but skipped when unpacking + ['3', 'CharacterDevice'], + ['4', 'BlockDevice'], + ['5', 'Directory'], + ['6', 'FIFO'], + // same as File + ['7', 'ContiguousFile'], + // pax headers + ['g', 'GlobalExtendedHeader'], + ['x', 'ExtendedHeader'], + // vendor-specific stuff + // skip + ['A', 'SolarisACL'], + // like 5, but with data, which should be skipped + ['D', 'GNUDumpDir'], + // metadata only, skip + ['I', 'Inode'], + // data = link path of next file + ['K', 'NextFileHasLongLinkpath'], + // data = path of next file + ['L', 'NextFileHasLongPath'], + // skip + ['M', 'ContinuationFile'], + // like L + ['N', 'OldGnuLongPath'], + // skip + ['S', 'SparseFile'], + // skip + ['V', 'TapeVolumeHeader'], + // like x + ['X', 'OldExtendedHeader'], +]); +// map the other direction +exports.code = new Map(Array.from(exports.name).map(kv => [kv[1], kv[0]])); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/types.js.map b/node_modules/tar/dist/commonjs/types.js.map new file mode 100644 index 0000000..34e269f --- /dev/null +++ b/node_modules/tar/dist/commonjs/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAO,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,YAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AADjB,QAAA,MAAM,UACW;AAEvB,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,YAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AADjB,QAAA,MAAM,UACW;AAiD9B,4CAA4C;AAC/B,QAAA,IAAI,GAAG,IAAI,GAAG,CAA+B;IACxD,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,eAAe;IACf,CAAC,EAAE,EAAE,SAAS,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,cAAc,CAAC;IACrB,2CAA2C;IAC3C,8CAA8C;IAC9C,CAAC,GAAG,EAAE,iBAAiB,CAAC;IACxB,CAAC,GAAG,EAAE,aAAa,CAAC;IACpB,CAAC,GAAG,EAAE,WAAW,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,eAAe;IACf,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvB,cAAc;IACd,CAAC,GAAG,EAAE,sBAAsB,CAAC;IAC7B,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvB,wBAAwB;IACxB,OAAO;IACP,CAAC,GAAG,EAAE,YAAY,CAAC;IACnB,iDAAiD;IACjD,CAAC,GAAG,EAAE,YAAY,CAAC;IACnB,sBAAsB;IACtB,CAAC,GAAG,EAAE,OAAO,CAAC;IACd,gCAAgC;IAChC,CAAC,GAAG,EAAE,yBAAyB,CAAC;IAChC,2BAA2B;IAC3B,CAAC,GAAG,EAAE,qBAAqB,CAAC;IAC5B,OAAO;IACP,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACzB,SAAS;IACT,CAAC,GAAG,EAAE,gBAAgB,CAAC;IACvB,OAAO;IACP,CAAC,GAAG,EAAE,YAAY,CAAC;IACnB,OAAO;IACP,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACzB,SAAS;IACT,CAAC,GAAG,EAAE,mBAAmB,CAAC;CAC3B,CAAC,CAAA;AAEF,0BAA0B;AACb,QAAA,IAAI,GAAG,IAAI,GAAG,CACzB,KAAK,CAAC,IAAI,CAAC,YAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAA","sourcesContent":["export const isCode = (c: string): c is EntryTypeCode =>\n name.has(c as EntryTypeCode)\n\nexport const isName = (c: string): c is EntryTypeName =>\n code.has(c as EntryTypeName)\n\nexport type EntryTypeCode =\n | '0'\n | ''\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | 'g'\n | 'x'\n | 'A'\n | 'D'\n | 'I'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'S'\n | 'V'\n | 'X'\n\nexport type EntryTypeName =\n | 'File'\n | 'OldFile'\n | 'Link'\n | 'SymbolicLink'\n | 'CharacterDevice'\n | 'BlockDevice'\n | 'Directory'\n | 'FIFO'\n | 'ContiguousFile'\n | 'GlobalExtendedHeader'\n | 'ExtendedHeader'\n | 'SolarisACL'\n | 'GNUDumpDir'\n | 'Inode'\n | 'NextFileHasLongLinkpath'\n | 'NextFileHasLongPath'\n | 'ContinuationFile'\n | 'OldGnuLongPath'\n | 'SparseFile'\n | 'TapeVolumeHeader'\n | 'OldExtendedHeader'\n | 'Unsupported'\n\n// map types from key to human-friendly name\nexport const name = new Map([\n ['0', 'File'],\n // same as File\n ['', 'OldFile'],\n ['1', 'Link'],\n ['2', 'SymbolicLink'],\n // Devices and FIFOs aren't fully supported\n // they are parsed, but skipped when unpacking\n ['3', 'CharacterDevice'],\n ['4', 'BlockDevice'],\n ['5', 'Directory'],\n ['6', 'FIFO'],\n // same as File\n ['7', 'ContiguousFile'],\n // pax headers\n ['g', 'GlobalExtendedHeader'],\n ['x', 'ExtendedHeader'],\n // vendor-specific stuff\n // skip\n ['A', 'SolarisACL'],\n // like 5, but with data, which should be skipped\n ['D', 'GNUDumpDir'],\n // metadata only, skip\n ['I', 'Inode'],\n // data = link path of next file\n ['K', 'NextFileHasLongLinkpath'],\n // data = path of next file\n ['L', 'NextFileHasLongPath'],\n // skip\n ['M', 'ContinuationFile'],\n // like L\n ['N', 'OldGnuLongPath'],\n // skip\n ['S', 'SparseFile'],\n // skip\n ['V', 'TapeVolumeHeader'],\n // like x\n ['X', 'OldExtendedHeader'],\n])\n\n// map the other direction\nexport const code = new Map(\n Array.from(name).map(kv => [kv[1], kv[0]]),\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.d.ts b/node_modules/tar/dist/commonjs/unpack.d.ts new file mode 100644 index 0000000..53313e6 --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.d.ts @@ -0,0 +1,99 @@ +/// +import { type Stats } from 'node:fs'; +import { MkdirError } from './mkdir.js'; +import { Parser } from './parse.js'; +import { TarOptions } from './options.js'; +import { PathReservations } from './path-reservations.js'; +import { ReadEntry } from './read-entry.js'; +import { WarnData } from './warn-method.js'; +declare const ONENTRY: unique symbol; +declare const CHECKFS: unique symbol; +declare const CHECKFS2: unique symbol; +declare const PRUNECACHE: unique symbol; +declare const ISREUSABLE: unique symbol; +declare const MAKEFS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const LINK: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const UNSUPPORTED: unique symbol; +declare const CHECKPATH: unique symbol; +declare const MKDIR: unique symbol; +declare const ONERROR: unique symbol; +declare const PENDING: unique symbol; +declare const PEND: unique symbol; +declare const UNPEND: unique symbol; +declare const ENDED: unique symbol; +declare const MAYBECLOSE: unique symbol; +declare const SKIP: unique symbol; +declare const DOCHOWN: unique symbol; +declare const UID: unique symbol; +declare const GID: unique symbol; +declare const CHECKED_CWD: unique symbol; +export declare class Unpack extends Parser { + [ENDED]: boolean; + [CHECKED_CWD]: boolean; + [PENDING]: number; + reservations: PathReservations; + transform?: TarOptions['transform']; + writable: true; + readable: false; + dirCache: Exclude; + uid?: number; + gid?: number; + setOwner: boolean; + preserveOwner: boolean; + processGid?: number; + processUid?: number; + maxDepth: number; + forceChown: boolean; + win32: boolean; + newer: boolean; + keep: boolean; + noMtime: boolean; + preservePaths: boolean; + unlink: boolean; + cwd: string; + strip: number; + processUmask: number; + umask: number; + dmode: number; + fmode: number; + chmod: boolean; + constructor(opt?: TarOptions); + warn(code: string, msg: string | Error, data?: WarnData): void; + [MAYBECLOSE](): void; + [CHECKPATH](entry: ReadEntry): boolean; + [ONENTRY](entry: ReadEntry): void; + [ONERROR](er: Error, entry: ReadEntry): void; + [MKDIR](dir: string, mode: number, cb: (er?: null | MkdirError, made?: string) => void): void; + [DOCHOWN](entry: ReadEntry): boolean; + [UID](entry: ReadEntry): number | undefined; + [GID](entry: ReadEntry): number | undefined; + [FILE](entry: ReadEntry, fullyDone: () => void): void; + [DIRECTORY](entry: ReadEntry, fullyDone: () => void): void; + [UNSUPPORTED](entry: ReadEntry): void; + [SYMLINK](entry: ReadEntry, done: () => void): void; + [HARDLINK](entry: ReadEntry, done: () => void): void; + [PEND](): void; + [UNPEND](): void; + [SKIP](entry: ReadEntry): void; + [ISREUSABLE](entry: ReadEntry, st: Stats): boolean; + [CHECKFS](entry: ReadEntry): void; + [PRUNECACHE](entry: ReadEntry): void; + [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void): void; + [MAKEFS](er: null | undefined | Error, entry: ReadEntry, done: () => void): void; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export declare class UnpackSync extends Unpack { + sync: true; + [MAKEFS](er: null | Error | undefined, entry: ReadEntry): void; + [CHECKFS](entry: ReadEntry): void; + [FILE](entry: ReadEntry, done: () => void): void; + [DIRECTORY](entry: ReadEntry, done: () => void): void; + [MKDIR](dir: string, mode: number): unknown; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export {}; +//# sourceMappingURL=unpack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.d.ts.map b/node_modules/tar/dist/commonjs/unpack.d.ts.map new file mode 100644 index 0000000..d36f103 --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.d.ts","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":";AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAGxC,OAAO,EAAS,UAAU,EAAa,MAAM,YAAY,CAAA;AAGzD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAKnC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,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AE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAanB;AAUD,qBAAa,UAAW,SAAQ,MAAM;IACpC,IAAI,EAAE,IAAI,CAAQ;IAElB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,EAAE,KAAK,EAAE,SAAS;IAIvD,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,SAAS;IAuE1B,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI;IAoFzC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI;IAkC9C,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAmBjC,CAAC,IAAI,CAAC,CACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAWnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.js b/node_modules/tar/dist/commonjs/unpack.js new file mode 100644 index 0000000..edf8acb --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.js @@ -0,0 +1,919 @@ +"use strict"; +// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet. +// but the path reservations are required to avoid race conditions where +// parallelized unpack ops may mess with one another, due to dependencies +// (like a Link depending on its target) or destructive operations (like +// clobbering an fs object to create one of a different type.) +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UnpackSync = exports.Unpack = void 0; +const fsm = __importStar(require("@isaacs/fs-minipass")); +const node_assert_1 = __importDefault(require("node:assert")); +const node_crypto_1 = require("node:crypto"); +const node_fs_1 = __importDefault(require("node:fs")); +const node_path_1 = __importDefault(require("node:path")); +const get_write_flag_js_1 = require("./get-write-flag.js"); +const mkdir_js_1 = require("./mkdir.js"); +const normalize_unicode_js_1 = require("./normalize-unicode.js"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +const parse_js_1 = require("./parse.js"); +const strip_absolute_path_js_1 = require("./strip-absolute-path.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const wc = __importStar(require("./winchars.js")); +const path_reservations_js_1 = require("./path-reservations.js"); +const ONENTRY = Symbol('onEntry'); +const CHECKFS = Symbol('checkFs'); +const CHECKFS2 = Symbol('checkFs2'); +const PRUNECACHE = Symbol('pruneCache'); +const ISREUSABLE = Symbol('isReusable'); +const MAKEFS = Symbol('makeFs'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const LINK = Symbol('link'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const UNSUPPORTED = Symbol('unsupported'); +const CHECKPATH = Symbol('checkPath'); +const MKDIR = Symbol('mkdir'); +const ONERROR = Symbol('onError'); +const PENDING = Symbol('pending'); +const PEND = Symbol('pend'); +const UNPEND = Symbol('unpend'); +const ENDED = Symbol('ended'); +const MAYBECLOSE = Symbol('maybeClose'); +const SKIP = Symbol('skip'); +const DOCHOWN = Symbol('doChown'); +const UID = Symbol('uid'); +const GID = Symbol('gid'); +const CHECKED_CWD = Symbol('checkedCwd'); +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +const DEFAULT_MAX_DEPTH = 1024; +// Unlinks on Windows are not atomic. +// +// This means that if you have a file entry, followed by another +// file entry with an identical name, and you cannot re-use the file +// (because it's a hardlink, or because unlink:true is set, or it's +// Windows, which does not have useful nlink values), then the unlink +// will be committed to the disk AFTER the new file has been written +// over the old one, deleting the new file. +// +// To work around this, on Windows systems, we rename the file and then +// delete the renamed file. It's a sloppy kludge, but frankly, I do not +// know of a better way to do this, given windows' non-atomic unlink +// semantics. +// +// See: https://github.com/npm/node-tar/issues/183 +/* c8 ignore start */ +const unlinkFile = (path, cb) => { + if (!isWindows) { + return node_fs_1.default.unlink(path, cb); + } + const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex'); + node_fs_1.default.rename(path, name, er => { + if (er) { + return cb(er); + } + node_fs_1.default.unlink(name, cb); + }); +}; +/* c8 ignore stop */ +/* c8 ignore start */ +const unlinkFileSync = (path) => { + if (!isWindows) { + return node_fs_1.default.unlinkSync(path); + } + const name = path + '.DELETE.' + (0, node_crypto_1.randomBytes)(16).toString('hex'); + node_fs_1.default.renameSync(path, name); + node_fs_1.default.unlinkSync(name); +}; +/* c8 ignore stop */ +// this.gid, entry.gid, this.processUid +const uint32 = (a, b, c) => a !== undefined && a === a >>> 0 ? a + : b !== undefined && b === b >>> 0 ? b + : c; +// clear the cache if it's a case-insensitive unicode-squashing match. +// we can't know if the current file system is case-sensitive or supports +// unicode fully, so we check for similarity on the maximally compatible +// representation. Err on the side of pruning, since all it's doing is +// preventing lstats, and it's not the end of the world if we get a false +// positive. +// Note that on windows, we always drop the entire cache whenever a +// symbolic link is encountered, because 8.3 filenames are impossible +// to reason about, and collisions are hazards rather than just failures. +const cacheKeyNormalize = (path) => (0, strip_trailing_slashes_js_1.stripTrailingSlashes)((0, normalize_windows_path_js_1.normalizeWindowsPath)((0, normalize_unicode_js_1.normalizeUnicode)(path))).toLowerCase(); +// remove all cache entries matching ${abs}/** +const pruneCache = (cache, abs) => { + abs = cacheKeyNormalize(abs); + for (const path of cache.keys()) { + const pnorm = cacheKeyNormalize(path); + if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) { + cache.delete(path); + } + } +}; +const dropCache = (cache) => { + for (const key of cache.keys()) { + cache.delete(key); + } +}; +class Unpack extends parse_js_1.Parser { + [ENDED] = false; + [CHECKED_CWD] = false; + [PENDING] = 0; + reservations = new path_reservations_js_1.PathReservations(); + transform; + writable = true; + readable = false; + dirCache; + uid; + gid; + setOwner; + preserveOwner; + processGid; + processUid; + maxDepth; + forceChown; + win32; + newer; + keep; + noMtime; + preservePaths; + unlink; + cwd; + strip; + processUmask; + umask; + dmode; + fmode; + chmod; + constructor(opt = {}) { + opt.ondone = () => { + this[ENDED] = true; + this[MAYBECLOSE](); + }; + super(opt); + this.transform = opt.transform; + this.dirCache = opt.dirCache || new Map(); + this.chmod = !!opt.chmod; + if (typeof opt.uid === 'number' || typeof opt.gid === 'number') { + // need both or neither + if (typeof opt.uid !== 'number' || + typeof opt.gid !== 'number') { + throw new TypeError('cannot set owner without number uid and gid'); + } + if (opt.preserveOwner) { + throw new TypeError('cannot preserve owner in archive and also set owner explicitly'); + } + this.uid = opt.uid; + this.gid = opt.gid; + this.setOwner = true; + } + else { + this.uid = undefined; + this.gid = undefined; + this.setOwner = false; + } + // default true for root + if (opt.preserveOwner === undefined && + typeof opt.uid !== 'number') { + this.preserveOwner = !!(process.getuid && process.getuid() === 0); + } + else { + this.preserveOwner = !!opt.preserveOwner; + } + this.processUid = + (this.preserveOwner || this.setOwner) && process.getuid ? + process.getuid() + : undefined; + this.processGid = + (this.preserveOwner || this.setOwner) && process.getgid ? + process.getgid() + : undefined; + // prevent excessively deep nesting of subfolders + // set to `Infinity` to remove this restriction + this.maxDepth = + typeof opt.maxDepth === 'number' ? + opt.maxDepth + : DEFAULT_MAX_DEPTH; + // mostly just for testing, but useful in some cases. + // Forcibly trigger a chown on every entry, no matter what + this.forceChown = opt.forceChown === true; + // turn > this[ONENTRY](entry)); + } + // a bad or damaged archive is a warning for Parser, but an error + // when extracting. Mark those errors as unrecoverable, because + // the Unpack contract cannot be met. + warn(code, msg, data = {}) { + if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') { + data.recoverable = false; + } + return super.warn(code, msg, data); + } + [MAYBECLOSE]() { + if (this[ENDED] && this[PENDING] === 0) { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + } + } + [CHECKPATH](entry) { + const p = (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path); + const parts = p.split('/'); + if (this.strip) { + if (parts.length < this.strip) { + return false; + } + if (entry.type === 'Link') { + const linkparts = (0, normalize_windows_path_js_1.normalizeWindowsPath)(String(entry.linkpath)).split('/'); + if (linkparts.length >= this.strip) { + entry.linkpath = linkparts.slice(this.strip).join('/'); + } + else { + return false; + } + } + parts.splice(0, this.strip); + entry.path = parts.join('/'); + } + if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { + this.warn('TAR_ENTRY_ERROR', 'path excessively deep', { + entry, + path: p, + depth: parts.length, + maxDepth: this.maxDepth, + }); + return false; + } + if (!this.preservePaths) { + if (parts.includes('..') || + /* c8 ignore next */ + (isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) { + this.warn('TAR_ENTRY_ERROR', `path contains '..'`, { + entry, + path: p, + }); + return false; + } + // strip off the root + const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(p); + if (root) { + entry.path = String(stripped); + this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, { + entry, + path: p, + }); + } + } + if (node_path_1.default.isAbsolute(entry.path)) { + entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(entry.path)); + } + else { + entry.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, entry.path)); + } + // if we somehow ended up with a path that escapes the cwd, and we are + // not in preservePaths mode, then something is fishy! This should have + // been prevented above, so ignore this for coverage. + /* c8 ignore start - defense in depth */ + if (!this.preservePaths && + typeof entry.absolute === 'string' && + entry.absolute.indexOf(this.cwd + '/') !== 0 && + entry.absolute !== this.cwd) { + this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', { + entry, + path: (0, normalize_windows_path_js_1.normalizeWindowsPath)(entry.path), + resolvedPath: entry.absolute, + cwd: this.cwd, + }); + return false; + } + /* c8 ignore stop */ + // an archive can set properties on the extraction directory, but it + // may not replace the cwd with a different kind of thing entirely. + if (entry.absolute === this.cwd && + entry.type !== 'Directory' && + entry.type !== 'GNUDumpDir') { + return false; + } + // only encode : chars that aren't drive letter indicators + if (this.win32) { + const { root: aRoot } = node_path_1.default.win32.parse(String(entry.absolute)); + entry.absolute = + aRoot + wc.encode(String(entry.absolute).slice(aRoot.length)); + const { root: pRoot } = node_path_1.default.win32.parse(entry.path); + entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length)); + } + return true; + } + [ONENTRY](entry) { + if (!this[CHECKPATH](entry)) { + return entry.resume(); + } + node_assert_1.default.equal(typeof entry.absolute, 'string'); + switch (entry.type) { + case 'Directory': + case 'GNUDumpDir': + if (entry.mode) { + entry.mode = entry.mode | 0o700; + } + // eslint-disable-next-line no-fallthrough + case 'File': + case 'OldFile': + case 'ContiguousFile': + case 'Link': + case 'SymbolicLink': + return this[CHECKFS](entry); + case 'CharacterDevice': + case 'BlockDevice': + case 'FIFO': + default: + return this[UNSUPPORTED](entry); + } + } + [ONERROR](er, entry) { + // Cwd has to exist, or else nothing works. That's serious. + // Other errors are warnings, which raise the error in strict + // mode, but otherwise continue on. + if (er.name === 'CwdError') { + this.emit('error', er); + } + else { + this.warn('TAR_ENTRY_ERROR', er, { entry }); + this[UNPEND](); + entry.resume(); + } + } + [MKDIR](dir, mode, cb) { + (0, mkdir_js_1.mkdir)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }, cb); + } + [DOCHOWN](entry) { + // in preserve owner mode, chown if the entry doesn't match process + // in set owner mode, chown if setting doesn't match process + return (this.forceChown || + (this.preserveOwner && + ((typeof entry.uid === 'number' && + entry.uid !== this.processUid) || + (typeof entry.gid === 'number' && + entry.gid !== this.processGid))) || + (typeof this.uid === 'number' && + this.uid !== this.processUid) || + (typeof this.gid === 'number' && this.gid !== this.processGid)); + } + [UID](entry) { + return uint32(this.uid, entry.uid, this.processUid); + } + [GID](entry) { + return uint32(this.gid, entry.gid, this.processGid); + } + [FILE](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const stream = new fsm.WriteStream(String(entry.absolute), { + // slight lie, but it can be numeric flags + flags: (0, get_write_flag_js_1.getWriteFlag)(entry.size), + mode: mode, + autoClose: false, + }); + stream.on('error', (er) => { + if (stream.fd) { + node_fs_1.default.close(stream.fd, () => { }); + } + // flush all the data out so that we aren't left hanging + // if the error wasn't actually fatal. otherwise the parse + // is blocked, and we never proceed. + stream.write = () => true; + this[ONERROR](er, entry); + fullyDone(); + }); + let actions = 1; + const done = (er) => { + if (er) { + /* c8 ignore start - we should always have a fd by now */ + if (stream.fd) { + node_fs_1.default.close(stream.fd, () => { }); + } + /* c8 ignore stop */ + this[ONERROR](er, entry); + fullyDone(); + return; + } + if (--actions === 0) { + if (stream.fd !== undefined) { + node_fs_1.default.close(stream.fd, er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + } + fullyDone(); + }); + } + } + }; + stream.on('finish', () => { + // if futimes fails, try utimes + // if utimes fails, fail with the original error + // same for fchown/chown + const abs = String(entry.absolute); + const fd = stream.fd; + if (typeof fd === 'number' && entry.mtime && !this.noMtime) { + actions++; + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + node_fs_1.default.futimes(fd, atime, mtime, er => er ? + node_fs_1.default.utimes(abs, atime, mtime, er2 => done(er2 && er)) + : done()); + } + if (typeof fd === 'number' && this[DOCHOWN](entry)) { + actions++; + const uid = this[UID](entry); + const gid = this[GID](entry); + if (typeof uid === 'number' && typeof gid === 'number') { + node_fs_1.default.fchown(fd, uid, gid, er => er ? + node_fs_1.default.chown(abs, uid, gid, er2 => done(er2 && er)) + : done()); + } + } + done(); + }); + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => { + this[ONERROR](er, entry); + fullyDone(); + }); + entry.pipe(tx); + } + tx.pipe(stream); + } + [DIRECTORY](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + this[MKDIR](String(entry.absolute), mode, er => { + if (er) { + this[ONERROR](er, entry); + fullyDone(); + return; + } + let actions = 1; + const done = () => { + if (--actions === 0) { + fullyDone(); + this[UNPEND](); + entry.resume(); + } + }; + if (entry.mtime && !this.noMtime) { + actions++; + node_fs_1.default.utimes(String(entry.absolute), entry.atime || new Date(), entry.mtime, done); + } + if (this[DOCHOWN](entry)) { + actions++; + node_fs_1.default.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); + } + done(); + }); + } + [UNSUPPORTED](entry) { + entry.unsupported = true; + this.warn('TAR_ENTRY_UNSUPPORTED', `unsupported entry type: ${entry.type}`, { entry }); + entry.resume(); + } + [SYMLINK](entry, done) { + this[LINK](entry, String(entry.linkpath), 'symlink', done); + } + [HARDLINK](entry, done) { + const linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.resolve(this.cwd, String(entry.linkpath))); + this[LINK](entry, linkpath, 'link', done); + } + [PEND]() { + this[PENDING]++; + } + [UNPEND]() { + this[PENDING]--; + this[MAYBECLOSE](); + } + [SKIP](entry) { + this[UNPEND](); + entry.resume(); + } + // Check if we can reuse an existing filesystem entry safely and + // overwrite it, rather than unlinking and recreating + // Windows doesn't report a useful nlink, so we just never reuse entries + [ISREUSABLE](entry, st) { + return (entry.type === 'File' && + !this.unlink && + st.isFile() && + st.nlink <= 1 && + !isWindows); + } + // check if a thing is there, and if so, try to clobber it + [CHECKFS](entry) { + this[PEND](); + const paths = [entry.path]; + if (entry.linkpath) { + paths.push(entry.linkpath); + } + this.reservations.reserve(paths, done => this[CHECKFS2](entry, done)); + } + [PRUNECACHE](entry) { + // if we are not creating a directory, and the path is in the dirCache, + // then that means we are about to delete the directory we created + // previously, and it is no longer going to be a directory, and neither + // is any of its children. + // If a symbolic link is encountered, all bets are off. There is no + // reasonable way to sanitize the cache in such a way we will be able to + // avoid having filesystem collisions. If this happens with a non-symlink + // entry, it'll just fail to unpack, but a symlink to a directory, using an + // 8.3 shortname or certain unicode attacks, can evade detection and lead + // to arbitrary writes to anywhere on the system. + if (entry.type === 'SymbolicLink') { + dropCache(this.dirCache); + } + else if (entry.type !== 'Directory') { + pruneCache(this.dirCache, String(entry.absolute)); + } + } + [CHECKFS2](entry, fullyDone) { + this[PRUNECACHE](entry); + const done = (er) => { + this[PRUNECACHE](entry); + fullyDone(er); + }; + const checkCwd = () => { + this[MKDIR](this.cwd, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + this[CHECKED_CWD] = true; + start(); + }); + }; + const start = () => { + if (entry.absolute !== this.cwd) { + const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + return this[MKDIR](parent, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + afterMakeParent(); + }); + } + } + afterMakeParent(); + }; + const afterMakeParent = () => { + node_fs_1.default.lstat(String(entry.absolute), (lstatEr, st) => { + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + this[SKIP](entry); + done(); + return; + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry, done); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); + if (!needChmod) { + return afterChmod(); + } + return node_fs_1.default.chmod(String(entry.absolute), Number(entry.mode), afterChmod); + } + // Not a dir entry, have to remove it. + // NB: the only way to end up with an entry that is the cwd + // itself, in such a way that == does not detect, is a + // tricky windows absolute path with UNC or 8.3 parts (and + // preservePaths:true, or else it will have been stripped). + // In that case, the user has opted out of path protections + // explicitly, so if they blow away the cwd, c'est la vie. + if (entry.absolute !== this.cwd) { + return node_fs_1.default.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); + } + } + // not a dir, and not reusable + // don't remove if the cwd, we want that error + if (entry.absolute === this.cwd) { + return this[MAKEFS](null, entry, done); + } + unlinkFile(String(entry.absolute), er => this[MAKEFS](er ?? null, entry, done)); + }); + }; + if (this[CHECKED_CWD]) { + start(); + } + else { + checkCwd(); + } + } + [MAKEFS](er, entry, done) { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + switch (entry.type) { + case 'File': + case 'OldFile': + case 'ContiguousFile': + return this[FILE](entry, done); + case 'Link': + return this[HARDLINK](entry, done); + case 'SymbolicLink': + return this[SYMLINK](entry, done); + case 'Directory': + case 'GNUDumpDir': + return this[DIRECTORY](entry, done); + } + } + [LINK](entry, linkpath, link, done) { + // XXX: get the type ('symlink' or 'junction') for windows + node_fs_1.default[link](linkpath, String(entry.absolute), er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + entry.resume(); + } + done(); + }); + } +} +exports.Unpack = Unpack; +const callSync = (fn) => { + try { + return [null, fn()]; + } + catch (er) { + return [er, null]; + } +}; +class UnpackSync extends Unpack { + sync = true; + [MAKEFS](er, entry) { + return super[MAKEFS](er, entry, () => { }); + } + [CHECKFS](entry) { + this[PRUNECACHE](entry); + if (!this[CHECKED_CWD]) { + const er = this[MKDIR](this.cwd, this.dmode); + if (er) { + return this[ONERROR](er, entry); + } + this[CHECKED_CWD] = true; + } + // don't bother to make the parent if the current entry is the cwd, + // we've already checked it. + if (entry.absolute !== this.cwd) { + const parent = (0, normalize_windows_path_js_1.normalizeWindowsPath)(node_path_1.default.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + const mkParent = this[MKDIR](parent, this.dmode); + if (mkParent) { + return this[ONERROR](mkParent, entry); + } + } + } + const [lstatEr, st] = callSync(() => node_fs_1.default.lstatSync(String(entry.absolute))); + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + return this[SKIP](entry); + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const [er] = needChmod ? + callSync(() => { + node_fs_1.default.chmodSync(String(entry.absolute), Number(entry.mode)); + }) + : []; + return this[MAKEFS](er, entry); + } + // not a dir entry, have to remove it + const [er] = callSync(() => node_fs_1.default.rmdirSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + // not a dir, and not reusable. + // don't remove if it's the cwd, since we want that error. + const [er] = entry.absolute === this.cwd ? + [] + : callSync(() => unlinkFileSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + [FILE](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const oner = (er) => { + let closeError; + try { + node_fs_1.default.closeSync(fd); + } + catch (e) { + closeError = e; + } + if (er || closeError) { + this[ONERROR](er || closeError, entry); + } + done(); + }; + let fd; + try { + fd = node_fs_1.default.openSync(String(entry.absolute), (0, get_write_flag_js_1.getWriteFlag)(entry.size), mode); + } + catch (er) { + return oner(er); + } + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => this[ONERROR](er, entry)); + entry.pipe(tx); + } + tx.on('data', (chunk) => { + try { + node_fs_1.default.writeSync(fd, chunk, 0, chunk.length); + } + catch (er) { + oner(er); + } + }); + tx.on('end', () => { + let er = null; + // try both, falling futimes back to utimes + // if either fails, handle the first error + if (entry.mtime && !this.noMtime) { + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + try { + node_fs_1.default.futimesSync(fd, atime, mtime); + } + catch (futimeser) { + try { + node_fs_1.default.utimesSync(String(entry.absolute), atime, mtime); + } + catch (utimeser) { + er = futimeser; + } + } + } + if (this[DOCHOWN](entry)) { + const uid = this[UID](entry); + const gid = this[GID](entry); + try { + node_fs_1.default.fchownSync(fd, Number(uid), Number(gid)); + } + catch (fchowner) { + try { + node_fs_1.default.chownSync(String(entry.absolute), Number(uid), Number(gid)); + } + catch (chowner) { + er = er || fchowner; + } + } + } + oner(er); + }); + } + [DIRECTORY](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + const er = this[MKDIR](String(entry.absolute), mode); + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + if (entry.mtime && !this.noMtime) { + try { + node_fs_1.default.utimesSync(String(entry.absolute), entry.atime || new Date(), entry.mtime); + /* c8 ignore next */ + } + catch (er) { } + } + if (this[DOCHOWN](entry)) { + try { + node_fs_1.default.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); + } + catch (er) { } + } + done(); + entry.resume(); + } + [MKDIR](dir, mode) { + try { + return (0, mkdir_js_1.mkdirSync)((0, normalize_windows_path_js_1.normalizeWindowsPath)(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }); + } + catch (er) { + return er; + } + } + [LINK](entry, linkpath, link, done) { + const ls = `${link}Sync`; + try { + node_fs_1.default[ls](linkpath, String(entry.absolute)); + done(); + entry.resume(); + } + catch (er) { + return this[ONERROR](er, entry); + } + } +} +exports.UnpackSync = UnpackSync; +//# sourceMappingURL=unpack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/unpack.js.map b/node_modules/tar/dist/commonjs/unpack.js.map new file mode 100644 index 0000000..163d9b9 --- /dev/null +++ b/node_modules/tar/dist/commonjs/unpack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.js","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":";AAAA,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,8DAA8D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE9D,yDAA0C;AAC1C,8DAAgC;AAChC,6CAAyC;AACzC,sDAAwC;AACxC,0DAA4B;AAC5B,2DAAkD;AAClD,yCAAyD;AACzD,iEAAyD;AACzD,2EAAkE;AAClE,yCAAmC;AACnC,qEAA4D;AAC5D,2EAAkE;AAClE,kDAAmC;AAGnC,iEAAyD;AAIzD,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;AACnC,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAA;AACvC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC/B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAC3B,MAAM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M;gBACnB,KAAK,EAAE,IAAI,CAAC,QAAQ;gBACpB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,IAAI,EAAE,IAAI;aACX,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;IACH,CAAC;IAED,CAAC,IAAI,CAAC,CACJ,KAAgB,EAChB,QAAgB,EAChB,IAAwB,EACxB,IAAgB;QAEhB,MAAM,EAAE,GAAyB,GAAG,IAAI,MAAM,CAAA;QAC9C,IAAI,CAAC;YACH,iBAAE,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;YACxC,IAAI,EAAE,CAAA;YACN,KAAK,CAAC,MAAM,EAAE,CAAA;QAChB,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAW,EAAE,KAAK,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;CACF;AAtOD,gCAsOC","sourcesContent":["// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.\n// but the path reservations are required to avoid race conditions where\n// parallelized unpack ops may mess with one another, due to dependencies\n// (like a Link depending on its target) or destructive operations (like\n// clobbering an fs object to create one of a different type.)\n\nimport * as fsm from '@isaacs/fs-minipass'\nimport assert from 'node:assert'\nimport { randomBytes } from 'node:crypto'\nimport fs, { type Stats } from 'node:fs'\nimport path from 'node:path'\nimport { getWriteFlag } from './get-write-flag.js'\nimport { mkdir, MkdirError, mkdirSync } from './mkdir.js'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Parser } from './parse.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport * as wc from './winchars.js'\n\nimport { TarOptions } from './options.js'\nimport { PathReservations } from './path-reservations.js'\nimport { ReadEntry } from './read-entry.js'\nimport { WarnData } from './warn-method.js'\n\nconst ONENTRY = Symbol('onEntry')\nconst CHECKFS = Symbol('checkFs')\nconst CHECKFS2 = Symbol('checkFs2')\nconst PRUNECACHE = Symbol('pruneCache')\nconst ISREUSABLE = Symbol('isReusable')\nconst MAKEFS = Symbol('makeFs')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst LINK = Symbol('link')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst UNSUPPORTED = Symbol('unsupported')\nconst CHECKPATH = Symbol('checkPath')\nconst MKDIR = Symbol('mkdir')\nconst ONERROR = Symbol('onError')\nconst PENDING = Symbol('pending')\nconst PEND = Symbol('pend')\nconst UNPEND = Symbol('unpend')\nconst ENDED = Symbol('ended')\nconst MAYBECLOSE = Symbol('maybeClose')\nconst SKIP = Symbol('skip')\nconst DOCHOWN = Symbol('doChown')\nconst UID = Symbol('uid')\nconst GID = Symbol('gid')\nconst CHECKED_CWD = Symbol('checkedCwd')\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\nconst DEFAULT_MAX_DEPTH = 1024\n\n// Unlinks on Windows are not atomic.\n//\n// This means that if you have a file entry, followed by another\n// file entry with an identical name, and you cannot re-use the file\n// (because it's a hardlink, or because unlink:true is set, or it's\n// Windows, which does not have useful nlink values), then the unlink\n// will be committed to the disk AFTER the new file has been written\n// over the old one, deleting the new file.\n//\n// To work around this, on Windows systems, we rename the file and then\n// delete the renamed file. It's a sloppy kludge, but frankly, I do not\n// know of a better way to do this, given windows' non-atomic unlink\n// semantics.\n//\n// See: https://github.com/npm/node-tar/issues/183\n/* c8 ignore start */\nconst unlinkFile = (\n path: string,\n cb: (er?: Error | null) => void,\n) => {\n if (!isWindows) {\n return fs.unlink(path, cb)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.rename(path, name, er => {\n if (er) {\n return cb(er)\n }\n fs.unlink(name, cb)\n })\n}\n/* c8 ignore stop */\n\n/* c8 ignore start */\nconst unlinkFileSync = (path: string) => {\n if (!isWindows) {\n return fs.unlinkSync(path)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.renameSync(path, name)\n fs.unlinkSync(name)\n}\n/* c8 ignore stop */\n\n// this.gid, entry.gid, this.processUid\nconst uint32 = (\n a: number | undefined,\n b: number | undefined,\n c: number | undefined,\n) =>\n a !== undefined && a === a >>> 0 ? a\n : b !== undefined && b === b >>> 0 ? b\n : c\n\n// clear the cache if it's a case-insensitive unicode-squashing match.\n// we can't know if the current file system is case-sensitive or supports\n// unicode fully, so we check for similarity on the maximally compatible\n// representation. Err on the side of pruning, since all it's doing is\n// preventing lstats, and it's not the end of the world if we get a false\n// positive.\n// Note that on windows, we always drop the entire cache whenever a\n// symbolic link is encountered, because 8.3 filenames are impossible\n// to reason about, and collisions are hazards rather than just failures.\nconst cacheKeyNormalize = (path: string) =>\n stripTrailingSlashes(\n normalizeWindowsPath(normalizeUnicode(path)),\n ).toLowerCase()\n\n// remove all cache entries matching ${abs}/**\nconst pruneCache = (cache: Map, abs: string) => {\n abs = cacheKeyNormalize(abs)\n for (const path of cache.keys()) {\n const pnorm = cacheKeyNormalize(path)\n if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) {\n cache.delete(path)\n }\n }\n}\n\nconst dropCache = (cache: Map) => {\n for (const key of cache.keys()) {\n cache.delete(key)\n }\n}\n\nexport class Unpack extends Parser {\n [ENDED]: boolean = false;\n [CHECKED_CWD]: boolean = false;\n [PENDING]: number = 0\n\n reservations: PathReservations = new PathReservations()\n transform?: TarOptions['transform']\n writable: true = true\n readable: false = false\n dirCache: Exclude\n uid?: number\n gid?: number\n setOwner: boolean\n preserveOwner: boolean\n processGid?: number\n processUid?: number\n maxDepth: number\n forceChown: boolean\n win32: boolean\n newer: boolean\n keep: boolean\n noMtime: boolean\n preservePaths: boolean\n unlink: boolean\n cwd: string\n strip: number\n processUmask: number\n umask: number\n dmode: number\n fmode: number\n chmod: boolean\n\n constructor(opt: TarOptions = {}) {\n opt.ondone = () => {\n this[ENDED] = true\n this[MAYBECLOSE]()\n }\n\n super(opt)\n\n this.transform = opt.transform\n\n this.dirCache = opt.dirCache || new Map()\n this.chmod = !!opt.chmod\n\n if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {\n // need both or neither\n if (\n typeof opt.uid !== 'number' ||\n typeof opt.gid !== 'number'\n ) {\n throw new TypeError(\n 'cannot set owner without number uid and gid',\n )\n }\n if (opt.preserveOwner) {\n throw new TypeError(\n 'cannot preserve owner in archive and also set owner explicitly',\n )\n }\n this.uid = opt.uid\n this.gid = opt.gid\n this.setOwner = true\n } else {\n this.uid = undefined\n this.gid = undefined\n this.setOwner = false\n }\n\n // default true for root\n if (\n opt.preserveOwner === undefined &&\n typeof opt.uid !== 'number'\n ) {\n this.preserveOwner = !!(\n process.getuid && process.getuid() === 0\n )\n } else {\n this.preserveOwner = !!opt.preserveOwner\n }\n\n this.processUid =\n (this.preserveOwner || this.setOwner) && process.getuid ?\n process.getuid()\n : undefined\n this.processGid =\n (this.preserveOwner || this.setOwner) && process.getgid ?\n process.getgid()\n : undefined\n\n // prevent excessively deep nesting of subfolders\n // set to `Infinity` to remove this restriction\n this.maxDepth =\n typeof opt.maxDepth === 'number' ?\n opt.maxDepth\n : DEFAULT_MAX_DEPTH\n\n // mostly just for testing, but useful in some cases.\n // Forcibly trigger a chown on every entry, no matter what\n this.forceChown = opt.forceChown === true\n\n // turn > this[ONENTRY](entry))\n }\n\n // a bad or damaged archive is a warning for Parser, but an error\n // when extracting. Mark those errors as unrecoverable, because\n // the Unpack contract cannot be met.\n warn(code: string, msg: string | Error, data: WarnData = {}) {\n if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') {\n data.recoverable = false\n }\n return super.warn(code, msg, data)\n }\n\n [MAYBECLOSE]() {\n if (this[ENDED] && this[PENDING] === 0) {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n }\n }\n\n [CHECKPATH](entry: ReadEntry) {\n const p = normalizeWindowsPath(entry.path)\n const parts = p.split('/')\n\n if (this.strip) {\n if (parts.length < this.strip) {\n return false\n }\n if (entry.type === 'Link') {\n const linkparts = normalizeWindowsPath(\n String(entry.linkpath),\n ).split('/')\n if (linkparts.length >= this.strip) {\n entry.linkpath = linkparts.slice(this.strip).join('/')\n } else {\n return false\n }\n }\n parts.splice(0, this.strip)\n entry.path = parts.join('/')\n }\n\n if (isFinite(this.maxDepth) && parts.length > this.maxDepth) {\n this.warn('TAR_ENTRY_ERROR', 'path excessively deep', {\n entry,\n path: p,\n depth: parts.length,\n maxDepth: this.maxDepth,\n })\n return false\n }\n\n if (!this.preservePaths) {\n if (\n parts.includes('..') ||\n /* c8 ignore next */\n (isWindows && /^[a-z]:\\.\\.$/i.test(parts[0] ?? ''))\n ) {\n this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {\n entry,\n path: p,\n })\n return false\n }\n\n // strip off the root\n const [root, stripped] = stripAbsolutePath(p)\n if (root) {\n entry.path = String(stripped)\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${root} from absolute path`,\n {\n entry,\n path: p,\n },\n )\n }\n }\n\n if (path.isAbsolute(entry.path)) {\n entry.absolute = normalizeWindowsPath(path.resolve(entry.path))\n } else {\n entry.absolute = normalizeWindowsPath(\n path.resolve(this.cwd, entry.path),\n )\n }\n\n // if we somehow ended up with a path that escapes the cwd, and we are\n // not in preservePaths mode, then something is fishy! This should have\n // been prevented above, so ignore this for coverage.\n /* c8 ignore start - defense in depth */\n if (\n !this.preservePaths &&\n typeof entry.absolute === 'string' &&\n entry.absolute.indexOf(this.cwd + '/') !== 0 &&\n entry.absolute !== this.cwd\n ) {\n this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', {\n entry,\n path: normalizeWindowsPath(entry.path),\n resolvedPath: entry.absolute,\n cwd: this.cwd,\n })\n return false\n }\n /* c8 ignore stop */\n\n // an archive can set properties on the extraction directory, but it\n // may not replace the cwd with a different kind of thing entirely.\n if (\n entry.absolute === this.cwd &&\n entry.type !== 'Directory' &&\n entry.type !== 'GNUDumpDir'\n ) {\n return false\n }\n\n // only encode : chars that aren't drive letter indicators\n if (this.win32) {\n const { root: aRoot } = path.win32.parse(String(entry.absolute))\n entry.absolute =\n aRoot + wc.encode(String(entry.absolute).slice(aRoot.length))\n const { root: pRoot } = path.win32.parse(entry.path)\n entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length))\n }\n\n return true\n }\n\n [ONENTRY](entry: ReadEntry) {\n if (!this[CHECKPATH](entry)) {\n return entry.resume()\n }\n\n assert.equal(typeof entry.absolute, 'string')\n\n switch (entry.type) {\n case 'Directory':\n case 'GNUDumpDir':\n if (entry.mode) {\n entry.mode = entry.mode | 0o700\n }\n\n // eslint-disable-next-line no-fallthrough\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n case 'Link':\n case 'SymbolicLink':\n return this[CHECKFS](entry)\n\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'FIFO':\n default:\n return this[UNSUPPORTED](entry)\n }\n }\n\n [ONERROR](er: Error, entry: ReadEntry) {\n // Cwd has to exist, or else nothing works. That's serious.\n // Other errors are warnings, which raise the error in strict\n // mode, but otherwise continue on.\n if (er.name === 'CwdError') {\n this.emit('error', er)\n } else {\n this.warn('TAR_ENTRY_ERROR', er, { entry })\n this[UNPEND]()\n entry.resume()\n }\n }\n\n [MKDIR](\n dir: string,\n mode: number,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) {\n mkdir(\n normalizeWindowsPath(dir),\n {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n },\n cb,\n )\n }\n\n [DOCHOWN](entry: ReadEntry) {\n // in preserve owner mode, chown if the entry doesn't match process\n // in set owner mode, chown if setting doesn't match process\n return (\n this.forceChown ||\n (this.preserveOwner &&\n ((typeof entry.uid === 'number' &&\n entry.uid !== this.processUid) ||\n (typeof entry.gid === 'number' &&\n entry.gid !== this.processGid))) ||\n (typeof this.uid === 'number' &&\n this.uid !== this.processUid) ||\n (typeof this.gid === 'number' && this.gid !== this.processGid)\n )\n }\n\n [UID](entry: ReadEntry) {\n return uint32(this.uid, entry.uid, this.processUid)\n }\n\n [GID](entry: ReadEntry) {\n return uint32(this.gid, entry.gid, this.processGid)\n }\n\n [FILE](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n const stream = new fsm.WriteStream(String(entry.absolute), {\n // slight lie, but it can be numeric flags\n flags: getWriteFlag(entry.size) as string,\n mode: mode,\n autoClose: false,\n })\n stream.on('error', (er: Error) => {\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n\n // flush all the data out so that we aren't left hanging\n // if the error wasn't actually fatal. otherwise the parse\n // is blocked, and we never proceed.\n stream.write = () => true\n this[ONERROR](er, entry)\n fullyDone()\n })\n\n let actions = 1\n const done = (er?: null | Error) => {\n if (er) {\n /* c8 ignore start - we should always have a fd by now */\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n /* c8 ignore stop */\n\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n if (--actions === 0) {\n if (stream.fd !== undefined) {\n fs.close(stream.fd, er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n }\n fullyDone()\n })\n }\n }\n }\n\n stream.on('finish', () => {\n // if futimes fails, try utimes\n // if utimes fails, fail with the original error\n // same for fchown/chown\n const abs = String(entry.absolute)\n const fd = stream.fd\n\n if (typeof fd === 'number' && entry.mtime && !this.noMtime) {\n actions++\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n fs.futimes(fd, atime, mtime, er =>\n er ?\n fs.utimes(abs, atime, mtime, er2 => done(er2 && er))\n : done(),\n )\n }\n\n if (typeof fd === 'number' && this[DOCHOWN](entry)) {\n actions++\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n if (typeof uid === 'number' && typeof gid === 'number') {\n fs.fchown(fd, uid, gid, er =>\n er ?\n fs.chown(abs, uid, gid, er2 => done(er2 && er))\n : done(),\n )\n }\n }\n\n done()\n })\n\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => {\n this[ONERROR](er, entry)\n fullyDone()\n })\n entry.pipe(tx)\n }\n tx.pipe(stream)\n }\n\n [DIRECTORY](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n this[MKDIR](String(entry.absolute), mode, er => {\n if (er) {\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n let actions = 1\n const done = () => {\n if (--actions === 0) {\n fullyDone()\n this[UNPEND]()\n entry.resume()\n }\n }\n\n if (entry.mtime && !this.noMtime) {\n actions++\n fs.utimes(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n done,\n )\n }\n\n if (this[DOCHOWN](entry)) {\n actions++\n fs.chown(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n done,\n )\n }\n\n done()\n })\n }\n\n [UNSUPPORTED](entry: ReadEntry) {\n entry.unsupported = true\n this.warn(\n 'TAR_ENTRY_UNSUPPORTED',\n `unsupported entry type: ${entry.type}`,\n { entry },\n )\n entry.resume()\n }\n\n [SYMLINK](entry: ReadEntry, done: () => void) {\n this[LINK](entry, String(entry.linkpath), 'symlink', done)\n }\n\n [HARDLINK](entry: ReadEntry, done: () => void) {\n const linkpath = normalizeWindowsPath(\n path.resolve(this.cwd, String(entry.linkpath)),\n )\n this[LINK](entry, linkpath, 'link', done)\n }\n\n [PEND]() {\n this[PENDING]++\n }\n\n [UNPEND]() {\n this[PENDING]--\n this[MAYBECLOSE]()\n }\n\n [SKIP](entry: ReadEntry) {\n this[UNPEND]()\n entry.resume()\n }\n\n // Check if we can reuse an existing filesystem entry safely and\n // overwrite it, rather than unlinking and recreating\n // Windows doesn't report a useful nlink, so we just never reuse entries\n [ISREUSABLE](entry: ReadEntry, st: Stats) {\n return (\n entry.type === 'File' &&\n !this.unlink &&\n st.isFile() &&\n st.nlink <= 1 &&\n !isWindows\n )\n }\n\n // check if a thing is there, and if so, try to clobber it\n [CHECKFS](entry: ReadEntry) {\n this[PEND]()\n const paths = [entry.path]\n if (entry.linkpath) {\n paths.push(entry.linkpath)\n }\n this.reservations.reserve(paths, done =>\n this[CHECKFS2](entry, done),\n )\n }\n\n [PRUNECACHE](entry: ReadEntry) {\n // if we are not creating a directory, and the path is in the dirCache,\n // then that means we are about to delete the directory we created\n // previously, and it is no longer going to be a directory, and neither\n // is any of its children.\n // If a symbolic link is encountered, all bets are off. There is no\n // reasonable way to sanitize the cache in such a way we will be able to\n // avoid having filesystem collisions. If this happens with a non-symlink\n // entry, it'll just fail to unpack, but a symlink to a directory, using an\n // 8.3 shortname or certain unicode attacks, can evade detection and lead\n // to arbitrary writes to anywhere on the system.\n if (entry.type === 'SymbolicLink') {\n dropCache(this.dirCache)\n } else if (entry.type !== 'Directory') {\n pruneCache(this.dirCache, String(entry.absolute))\n }\n }\n\n [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void) {\n this[PRUNECACHE](entry)\n\n const done = (er?: Error) => {\n this[PRUNECACHE](entry)\n fullyDone(er)\n }\n\n const checkCwd = () => {\n this[MKDIR](this.cwd, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n this[CHECKED_CWD] = true\n start()\n })\n }\n\n const start = () => {\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n return this[MKDIR](parent, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n afterMakeParent()\n })\n }\n }\n afterMakeParent()\n }\n\n const afterMakeParent = () => {\n fs.lstat(String(entry.absolute), (lstatEr, st) => {\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n this[SKIP](entry)\n done()\n return\n }\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry, done)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const afterChmod = (er?: Error | null | undefined) =>\n this[MAKEFS](er ?? null, entry, done)\n if (!needChmod) {\n return afterChmod()\n }\n return fs.chmod(\n String(entry.absolute),\n Number(entry.mode),\n afterChmod,\n )\n }\n // Not a dir entry, have to remove it.\n // NB: the only way to end up with an entry that is the cwd\n // itself, in such a way that == does not detect, is a\n // tricky windows absolute path with UNC or 8.3 parts (and\n // preservePaths:true, or else it will have been stripped).\n // In that case, the user has opted out of path protections\n // explicitly, so if they blow away the cwd, c'est la vie.\n if (entry.absolute !== this.cwd) {\n return fs.rmdir(\n String(entry.absolute),\n (er?: null | Error) =>\n this[MAKEFS](er ?? null, entry, done),\n )\n }\n }\n\n // not a dir, and not reusable\n // don't remove if the cwd, we want that error\n if (entry.absolute === this.cwd) {\n return this[MAKEFS](null, entry, done)\n }\n\n unlinkFile(String(entry.absolute), er =>\n this[MAKEFS](er ?? null, entry, done),\n )\n })\n }\n\n if (this[CHECKED_CWD]) {\n start()\n } else {\n checkCwd()\n }\n }\n\n [MAKEFS](\n er: null | undefined | Error,\n entry: ReadEntry,\n done: () => void,\n ) {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n\n switch (entry.type) {\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n return this[FILE](entry, done)\n\n case 'Link':\n return this[HARDLINK](entry, done)\n\n case 'SymbolicLink':\n return this[SYMLINK](entry, done)\n\n case 'Directory':\n case 'GNUDumpDir':\n return this[DIRECTORY](entry, done)\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n // XXX: get the type ('symlink' or 'junction') for windows\n fs[link](linkpath, String(entry.absolute), er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n entry.resume()\n }\n done()\n })\n }\n}\n\nconst callSync = (fn: () => any) => {\n try {\n return [null, fn()]\n } catch (er) {\n return [er, null]\n }\n}\n\nexport class UnpackSync extends Unpack {\n sync: true = true;\n\n [MAKEFS](er: null | Error | undefined, entry: ReadEntry) {\n return super[MAKEFS](er, entry, () => {})\n }\n\n [CHECKFS](entry: ReadEntry) {\n this[PRUNECACHE](entry)\n\n if (!this[CHECKED_CWD]) {\n const er = this[MKDIR](this.cwd, this.dmode)\n if (er) {\n return this[ONERROR](er as Error, entry)\n }\n this[CHECKED_CWD] = true\n }\n\n // don't bother to make the parent if the current entry is the cwd,\n // we've already checked it.\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n const mkParent = this[MKDIR](parent, this.dmode)\n if (mkParent) {\n return this[ONERROR](mkParent as Error, entry)\n }\n }\n }\n\n const [lstatEr, st] = callSync(() =>\n fs.lstatSync(String(entry.absolute)),\n )\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n return this[SKIP](entry)\n }\n\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const [er] =\n needChmod ?\n callSync(() => {\n fs.chmodSync(String(entry.absolute), Number(entry.mode))\n })\n : []\n return this[MAKEFS](er, entry)\n }\n // not a dir entry, have to remove it\n const [er] = callSync(() =>\n fs.rmdirSync(String(entry.absolute)),\n )\n this[MAKEFS](er, entry)\n }\n\n // not a dir, and not reusable.\n // don't remove if it's the cwd, since we want that error.\n const [er] =\n entry.absolute === this.cwd ?\n []\n : callSync(() => unlinkFileSync(String(entry.absolute)))\n this[MAKEFS](er, entry)\n }\n\n [FILE](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n\n const oner = (er?: null | Error | undefined) => {\n let closeError\n try {\n fs.closeSync(fd)\n } catch (e) {\n closeError = e\n }\n if (er || closeError) {\n this[ONERROR]((er as Error) || closeError, entry)\n }\n done()\n }\n\n let fd: number\n try {\n fd = fs.openSync(\n String(entry.absolute),\n getWriteFlag(entry.size),\n mode,\n )\n } catch (er) {\n return oner(er as Error)\n }\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => this[ONERROR](er, entry))\n entry.pipe(tx)\n }\n\n tx.on('data', (chunk: Buffer) => {\n try {\n fs.writeSync(fd, chunk, 0, chunk.length)\n } catch (er) {\n oner(er as Error)\n }\n })\n\n tx.on('end', () => {\n let er = null\n // try both, falling futimes back to utimes\n // if either fails, handle the first error\n if (entry.mtime && !this.noMtime) {\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n try {\n fs.futimesSync(fd, atime, mtime)\n } catch (futimeser) {\n try {\n fs.utimesSync(String(entry.absolute), atime, mtime)\n } catch (utimeser) {\n er = futimeser\n }\n }\n }\n\n if (this[DOCHOWN](entry)) {\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n\n try {\n fs.fchownSync(fd, Number(uid), Number(gid))\n } catch (fchowner) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(uid),\n Number(gid),\n )\n } catch (chowner) {\n er = er || fchowner\n }\n }\n }\n\n oner(er as Error)\n })\n }\n\n [DIRECTORY](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n const er = this[MKDIR](String(entry.absolute), mode)\n if (er) {\n this[ONERROR](er as Error, entry)\n done()\n return\n }\n if (entry.mtime && !this.noMtime) {\n try {\n fs.utimesSync(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n )\n /* c8 ignore next */\n } catch (er) {}\n }\n if (this[DOCHOWN](entry)) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n )\n } catch (er) {}\n }\n done()\n entry.resume()\n }\n\n [MKDIR](dir: string, mode: number) {\n try {\n return mkdirSync(normalizeWindowsPath(dir), {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n })\n } catch (er) {\n return er\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n const ls: `${typeof link}Sync` = `${link}Sync`\n try {\n fs[ls](linkpath, String(entry.absolute))\n done()\n entry.resume()\n } catch (er) {\n return this[ONERROR](er as Error, entry)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.d.ts b/node_modules/tar/dist/commonjs/update.d.ts new file mode 100644 index 0000000..45784eb --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.d.ts @@ -0,0 +1,2 @@ +export declare const update: import("./make-command.js").TarCommand; +//# sourceMappingURL=update.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.d.ts.map b/node_modules/tar/dist/commonjs/update.d.ts.map new file mode 100644 index 0000000..4f2ff18 --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,sDASlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.js b/node_modules/tar/dist/commonjs/update.js new file mode 100644 index 0000000..7687896 --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.js @@ -0,0 +1,33 @@ +"use strict"; +// tar -u +Object.defineProperty(exports, "__esModule", { value: true }); +exports.update = void 0; +const make_command_js_1 = require("./make-command.js"); +const replace_js_1 = require("./replace.js"); +// just call tar.r with the filter and mtimeCache +exports.update = (0, make_command_js_1.makeCommand)(replace_js_1.replace.syncFile, replace_js_1.replace.asyncFile, replace_js_1.replace.syncNoFile, replace_js_1.replace.asyncNoFile, (opt, entries = []) => { + replace_js_1.replace.validate?.(opt, entries); + mtimeFilter(opt); +}); +const mtimeFilter = (opt) => { + const filter = opt.filter; + if (!opt.mtimeCache) { + opt.mtimeCache = new Map(); + } + opt.filter = + filter ? + (path, stat) => filter(path, stat) && + !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ) + : (path, stat) => !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ); +}; +//# sourceMappingURL=update.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/update.js.map b/node_modules/tar/dist/commonjs/update.js.map new file mode 100644 index 0000000..a3053da --- /dev/null +++ b/node_modules/tar/dist/commonjs/update.js.map @@ -0,0 +1 @@ +{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":";AAAA,SAAS;;;AAET,uDAA+C;AAG/C,6CAA2C;AAE3C,iDAAiD;AACpC,QAAA,MAAM,GAAG,IAAA,6BAAW,EAC/B,oBAAC,CAAC,QAAQ,EACV,oBAAC,CAAC,SAAS,EACX,oBAAC,CAAC,UAAU,EACZ,oBAAC,CAAC,WAAW,EACb,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IACpB,oBAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC1B,WAAW,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC,CACF,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAA0B,EAAE,EAAE;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IAEzB,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QACpB,GAAG,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,GAAG,CAAC,MAAM;QACR,MAAM,CAAC,CAAC;YACN,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;gBAClB,CAAC;gBACC,qBAAqB;gBACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;oBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;gBACD,oBAAoB;iBACrB;YACL,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,CAAC;YACC,qBAAqB;YACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;gBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;YACD,oBAAoB;aACrB,CAAA;AACT,CAAC,CAAA","sourcesContent":["// tar -u\n\nimport { makeCommand } from './make-command.js'\nimport { type TarOptionsWithAliases } from './options.js'\n\nimport { replace as r } from './replace.js'\n\n// just call tar.r with the filter and mtimeCache\nexport const update = makeCommand(\n r.syncFile,\n r.asyncFile,\n r.syncNoFile,\n r.asyncNoFile,\n (opt, entries = []) => {\n r.validate?.(opt, entries)\n mtimeFilter(opt)\n },\n)\n\nconst mtimeFilter = (opt: TarOptionsWithAliases) => {\n const filter = opt.filter\n\n if (!opt.mtimeCache) {\n opt.mtimeCache = new Map()\n }\n\n opt.filter =\n filter ?\n (path, stat) =>\n filter(path, stat) &&\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n : (path, stat) =>\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.d.ts b/node_modules/tar/dist/commonjs/warn-method.d.ts new file mode 100644 index 0000000..b63d352 --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.d.ts @@ -0,0 +1,25 @@ +/// +import { type Minipass } from 'minipass'; +/** has a warn method */ +export type Warner = { + warn(code: string, message: string | Error, data: any): void; + file?: string; + cwd?: string; + strict?: boolean; + emit(event: 'warn', code: string, message: string, data?: WarnData): void; + emit(event: 'error', error: TarError): void; +}; +export type WarnEvent = Minipass.Events & { + warn: [code: string, message: string, data: WarnData]; +}; +export type WarnData = { + file?: string; + cwd?: string; + code?: string; + tarCode?: string; + recoverable?: boolean; + [k: string]: any; +}; +export type TarError = Error & WarnData; +export declare const warnMethod: (self: Warner, code: string, message: string | Error, data?: WarnData) => void; +//# sourceMappingURL=warn-method.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.d.ts.map b/node_modules/tar/dist/commonjs/warn-method.d.ts.map new file mode 100644 index 0000000..1338043 --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.d.ts","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,wBAAwB;AACxB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,EAAE,GAAG,GAAG,IAAI,CAAA;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,IAAI,CACF,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,QAAQ,GACd,IAAI,CAAA;IACP,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,GAAG,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG;IACvD,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAA;AAEvC,eAAO,MAAM,UAAU,SACf,MAAM,QACN,MAAM,WACH,MAAM,GAAG,KAAK,SACjB,QAAQ,SA2Bf,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.js b/node_modules/tar/dist/commonjs/warn-method.js new file mode 100644 index 0000000..f255027 --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.warnMethod = void 0; +const warnMethod = (self, code, message, data = {}) => { + if (self.file) { + data.file = self.file; + } + if (self.cwd) { + data.cwd = self.cwd; + } + data.code = + (message instanceof Error && + message.code) || + code; + data.tarCode = code; + if (!self.strict && data.recoverable !== false) { + if (message instanceof Error) { + data = Object.assign(message, data); + message = message.message; + } + self.emit('warn', code, message, data); + } + else if (message instanceof Error) { + self.emit('error', Object.assign(message, data)); + } + else { + self.emit('error', Object.assign(new Error(`${code}: ${message}`), data)); + } +}; +exports.warnMethod = warnMethod; +//# sourceMappingURL=warn-method.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/warn-method.js.map b/node_modules/tar/dist/commonjs/warn-method.js.map new file mode 100644 index 0000000..c9bb26b --- /dev/null +++ b/node_modules/tar/dist/commonjs/warn-method.js.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.js","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":";;;AAiCO,MAAM,UAAU,GAAG,CACxB,IAAY,EACZ,IAAY,EACZ,OAAuB,EACvB,OAAiB,EAAE,EACnB,EAAE;IACF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;IACrB,CAAC;IACD,IAAI,CAAC,IAAI;QACP,CAAC,OAAO,YAAY,KAAK;YACtB,OAAiC,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAA;IACN,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QAC/C,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;YAC7B,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YACnC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC3B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;IACxC,CAAC;SAAM,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CACP,OAAO,EACP,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CACtD,CAAA;IACH,CAAC;AACH,CAAC,CAAA;AA/BY,QAAA,UAAU,cA+BtB","sourcesContent":["import { type Minipass } from 'minipass'\n\n/** has a warn method */\nexport type Warner = {\n warn(code: string, message: string | Error, data: any): void\n file?: string\n cwd?: string\n strict?: boolean\n\n emit(\n event: 'warn',\n code: string,\n message: string,\n data?: WarnData,\n ): void\n emit(event: 'error', error: TarError): void\n}\n\nexport type WarnEvent = Minipass.Events & {\n warn: [code: string, message: string, data: WarnData]\n}\n\nexport type WarnData = {\n file?: string\n cwd?: string\n code?: string\n tarCode?: string\n recoverable?: boolean\n [k: string]: any\n}\n\nexport type TarError = Error & WarnData\n\nexport const warnMethod = (\n self: Warner,\n code: string,\n message: string | Error,\n data: WarnData = {},\n) => {\n if (self.file) {\n data.file = self.file\n }\n if (self.cwd) {\n data.cwd = self.cwd\n }\n data.code =\n (message instanceof Error &&\n (message as NodeJS.ErrnoException).code) ||\n code\n data.tarCode = code\n if (!self.strict && data.recoverable !== false) {\n if (message instanceof Error) {\n data = Object.assign(message, data)\n message = message.message\n }\n self.emit('warn', code, message, data)\n } else if (message instanceof Error) {\n self.emit('error', Object.assign(message, data))\n } else {\n self.emit(\n 'error',\n Object.assign(new Error(`${code}: ${message}`), data),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.d.ts b/node_modules/tar/dist/commonjs/winchars.d.ts new file mode 100644 index 0000000..6c24143 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.d.ts @@ -0,0 +1,3 @@ +export declare const encode: (s: string) => string; +export declare const decode: (s: string) => string; +//# sourceMappingURL=winchars.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.d.ts.map b/node_modules/tar/dist/commonjs/winchars.d.ts.map new file mode 100644 index 0000000..7a6cd50 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.d.ts","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA;AACxD,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.js b/node_modules/tar/dist/commonjs/winchars.js new file mode 100644 index 0000000..c0a4405 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.js @@ -0,0 +1,14 @@ +"use strict"; +// When writing files on Windows, translate the characters to their +// 0xf000 higher-encoded versions. +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decode = exports.encode = void 0; +const raw = ['|', '<', '>', '?', ':']; +const win = raw.map(char => String.fromCharCode(0xf000 + char.charCodeAt(0))); +const toWin = new Map(raw.map((char, i) => [char, win[i]])); +const toRaw = new Map(win.map((char, i) => [char, raw[i]])); +const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s); +exports.encode = encode; +const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s); +exports.decode = decode; +//# sourceMappingURL=winchars.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/winchars.js.map b/node_modules/tar/dist/commonjs/winchars.js.map new file mode 100644 index 0000000..75fafd7 --- /dev/null +++ b/node_modules/tar/dist/commonjs/winchars.js.map @@ -0,0 +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AM,UACqC","sourcesContent":["// When writing files on Windows, translate the characters to their\n// 0xf000 higher-encoded versions.\n\nconst raw = ['|', '<', '>', '?', ':']\n\nconst win = raw.map(char =>\n String.fromCharCode(0xf000 + char.charCodeAt(0)),\n)\n\nconst toWin = new Map(raw.map((char, i) => [char, win[i]]))\nconst toRaw = new Map(win.map((char, i) => [char, raw[i]]))\n\nexport const encode = (s: string) =>\n raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s)\nexport const decode = (s: string) =>\n win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.d.ts b/node_modules/tar/dist/commonjs/write-entry.d.ts new file mode 100644 index 0000000..7b7fd24 --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.d.ts @@ -0,0 +1,132 @@ +/// +/// +/// +import { type Stats } from 'fs'; +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { TarOptions, TarOptionsWithAliases } from './options.js'; +import { ReadEntry } from './read-entry.js'; +import { EntryTypeName } from './types.js'; +import { WarnData, Warner, WarnEvent } from './warn-method.js'; +declare const PROCESS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const HEADER: unique symbol; +declare const READ: unique symbol; +declare const LSTAT: unique symbol; +declare const ONLSTAT: unique symbol; +declare const ONREAD: unique symbol; +declare const ONREADLINK: unique symbol; +declare const OPENFILE: unique symbol; +declare const ONOPENFILE: unique symbol; +declare const CLOSE: unique symbol; +declare const MODE: unique symbol; +declare const AWAITDRAIN: unique symbol; +declare const ONDRAIN: unique symbol; +declare const PREFIX: unique symbol; +export declare class WriteEntry extends Minipass implements Warner { + #private; + path: string; + portable: boolean; + myuid: number; + myuser: string; + maxReadSize: number; + linkCache: Exclude; + statCache: Exclude; + preservePaths: boolean; + cwd: string; + strict: boolean; + mtime?: Date; + noPax: boolean; + noMtime: boolean; + prefix?: string; + fd?: number; + blockLen: number; + blockRemain: number; + buf?: Buffer; + pos: number; + remain: number; + length: number; + offset: number; + win32: boolean; + absolute: string; + header?: Header; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + stat?: Stats; + onWriteEntry?: (entry: WriteEntry) => any; + constructor(p: string, opt_?: TarOptionsWithAliases); + warn(code: string, message: string | Error, data?: WarnData): void; + emit(ev: keyof WarnEvent, ...data: any[]): boolean; + [LSTAT](): void; + [ONLSTAT](stat: Stats): void; + [PROCESS](): void | this; + [MODE](mode: number): number; + [PREFIX](path: string): string; + [HEADER](): void; + [DIRECTORY](): void; + [SYMLINK](): void; + [ONREADLINK](linkpath: string): void; + [HARDLINK](linkpath: string): void; + [FILE](): void | this; + [OPENFILE](): void; + [ONOPENFILE](fd: number): void; + [READ](): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; + [ONREAD](bytesRead: number): void; + [AWAITDRAIN](cb: () => any): void; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + [ONDRAIN](): void; +} +export declare class WriteEntrySync extends WriteEntry implements Warner { + sync: true; + [LSTAT](): void; + [SYMLINK](): void; + [OPENFILE](): void; + [READ](): void; + [AWAITDRAIN](cb: () => any): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; +} +export declare class WriteEntryTar extends Minipass implements Warner { + blockLen: number; + blockRemain: number; + buf: number; + pos: number; + remain: number; + length: number; + preservePaths: boolean; + portable: boolean; + strict: boolean; + noPax: boolean; + noMtime: boolean; + readEntry: ReadEntry; + type: EntryTypeName; + prefix?: string; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + header?: Header; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + size: number; + onWriteEntry?: (entry: WriteEntry) => any; + warn(code: string, message: string | Error, data?: WarnData): void; + constructor(readEntry: ReadEntry, opt_?: TarOptionsWithAliases); + [PREFIX](path: string): string; + [MODE](mode: number): number; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + end(cb?: () => void): this; + end(chunk: Buffer | string, cb?: () => void): this; + end(chunk: Buffer | string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=write-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.d.ts.map b/node_modules/tar/dist/commonjs/write-entry.d.ts.map new file mode 100644 index 0000000..1fa474a --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.d.ts","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":";;;AAAA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAGL,UAAU,EACV,qBAAqB,EACtB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EAEV,MAAM,kBAAkB,CAAA;AAazB,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,MAA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,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAA;IAEzC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,GAAE,QAAa;gBAK7D,SAAS,EAAE,SAAS,EACpB,IAAI,GAAE,qBAA0B;IAyHlC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM;IAIrB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM;IAInB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO;IACxD,KAAK,CACH,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,EAChC,EAAE,CAAC,EAAE,MAAM,IAAI,GACd,OAAO;IA0BV,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAClD,GAAG,CACD,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,MAAM,IAAI,GACd,IAAI;CA2BR"} \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.js b/node_modules/tar/dist/commonjs/write-entry.js new file mode 100644 index 0000000..45b7efe --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.js @@ -0,0 +1,689 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WriteEntryTar = exports.WriteEntrySync = exports.WriteEntry = void 0; +const fs_1 = __importDefault(require("fs")); +const minipass_1 = require("minipass"); +const path_1 = __importDefault(require("path")); +const header_js_1 = require("./header.js"); +const mode_fix_js_1 = require("./mode-fix.js"); +const normalize_windows_path_js_1 = require("./normalize-windows-path.js"); +const options_js_1 = require("./options.js"); +const pax_js_1 = require("./pax.js"); +const strip_absolute_path_js_1 = require("./strip-absolute-path.js"); +const strip_trailing_slashes_js_1 = require("./strip-trailing-slashes.js"); +const warn_method_js_1 = require("./warn-method.js"); +const winchars = __importStar(require("./winchars.js")); +const prefixPath = (path, prefix) => { + if (!prefix) { + return (0, normalize_windows_path_js_1.normalizeWindowsPath)(path); + } + path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path).replace(/^\.(\/|$)/, ''); + return (0, strip_trailing_slashes_js_1.stripTrailingSlashes)(prefix) + '/' + path; +}; +const maxReadSize = 16 * 1024 * 1024; +const PROCESS = Symbol('process'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const HEADER = Symbol('header'); +const READ = Symbol('read'); +const LSTAT = Symbol('lstat'); +const ONLSTAT = Symbol('onlstat'); +const ONREAD = Symbol('onread'); +const ONREADLINK = Symbol('onreadlink'); +const OPENFILE = Symbol('openfile'); +const ONOPENFILE = Symbol('onopenfile'); +const CLOSE = Symbol('close'); +const MODE = Symbol('mode'); +const AWAITDRAIN = Symbol('awaitDrain'); +const ONDRAIN = Symbol('ondrain'); +const PREFIX = Symbol('prefix'); +class WriteEntry extends minipass_1.Minipass { + path; + portable; + myuid = (process.getuid && process.getuid()) || 0; + // until node has builtin pwnam functions, this'll have to do + myuser = process.env.USER || ''; + maxReadSize; + linkCache; + statCache; + preservePaths; + cwd; + strict; + mtime; + noPax; + noMtime; + prefix; + fd; + blockLen = 0; + blockRemain = 0; + buf; + pos = 0; + remain = 0; + length = 0; + offset = 0; + win32; + absolute; + header; + type; + linkpath; + stat; + onWriteEntry; + #hadError = false; + constructor(p, opt_ = {}) { + const opt = (0, options_js_1.dealias)(opt_); + super(); + this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(p); + // suppress atime, ctime, uid, gid, uname, gname + this.portable = !!opt.portable; + this.maxReadSize = opt.maxReadSize || maxReadSize; + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.preservePaths = !!opt.preservePaths; + this.cwd = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.cwd || process.cwd()); + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.mtime = opt.mtime; + this.prefix = + opt.prefix ? (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.prefix) : undefined; + this.onWriteEntry = opt.onWriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.win32 = !!opt.win32 || process.platform === 'win32'; + if (this.win32) { + // force the \ to / normalization, since we might not *actually* + // be on windows, but want \ to be considered a path separator. + this.path = winchars.decode(this.path.replace(/\\/g, '/')); + p = p.replace(/\\/g, '/'); + } + this.absolute = (0, normalize_windows_path_js_1.normalizeWindowsPath)(opt.absolute || path_1.default.resolve(this.cwd, p)); + if (this.path === '') { + this.path = './'; + } + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + const cs = this.statCache.get(this.absolute); + if (cs) { + this[ONLSTAT](cs); + } + else { + this[LSTAT](); + } + } + warn(code, message, data = {}) { + return (0, warn_method_js_1.warnMethod)(this, code, message, data); + } + emit(ev, ...data) { + if (ev === 'error') { + this.#hadError = true; + } + return super.emit(ev, ...data); + } + [LSTAT]() { + fs_1.default.lstat(this.absolute, (er, stat) => { + if (er) { + return this.emit('error', er); + } + this[ONLSTAT](stat); + }); + } + [ONLSTAT](stat) { + this.statCache.set(this.absolute, stat); + this.stat = stat; + if (!stat.isFile()) { + stat.size = 0; + } + this.type = getType(stat); + this.emit('stat', stat); + this[PROCESS](); + } + [PROCESS]() { + switch (this.type) { + case 'File': + return this[FILE](); + case 'Directory': + return this[DIRECTORY](); + case 'SymbolicLink': + return this[SYMLINK](); + // unsupported types are ignored. + default: + return this.end(); + } + } + [MODE](mode) { + return (0, mode_fix_js_1.modeFix)(mode, this.type === 'Directory', this.portable); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [HEADER]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot write header before stat'); + } + /* c8 ignore stop */ + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.onWriteEntry?.(this); + this.header = new header_js_1.Header({ + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this[MODE](this.stat.mode), + uid: this.portable ? undefined : this.stat.uid, + gid: this.portable ? undefined : this.stat.gid, + size: this.stat.size, + mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime, + /* c8 ignore next */ + type: this.type === 'Unsupported' ? undefined : this.type, + uname: this.portable ? undefined + : this.stat.uid === this.myuid ? this.myuser + : '', + atime: this.portable ? undefined : this.stat.atime, + ctime: this.portable ? undefined : this.stat.ctime, + }); + if (this.header.encode() && !this.noPax) { + super.write(new pax_js_1.Pax({ + atime: this.portable ? undefined : this.header.atime, + ctime: this.portable ? undefined : this.header.ctime, + gid: this.portable ? undefined : this.header.gid, + mtime: this.noMtime ? undefined : (this.mtime || this.header.mtime), + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.header.size, + uid: this.portable ? undefined : this.header.uid, + uname: this.portable ? undefined : this.header.uname, + dev: this.portable ? undefined : this.stat.dev, + ino: this.portable ? undefined : this.stat.ino, + nlink: this.portable ? undefined : this.stat.nlink, + }).encode()); + } + const block = this.header?.block; + /* c8 ignore start */ + if (!block) { + throw new Error('failed to encode header'); + } + /* c8 ignore stop */ + super.write(block); + } + [DIRECTORY]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create directory entry without stat'); + } + /* c8 ignore stop */ + if (this.path.slice(-1) !== '/') { + this.path += '/'; + } + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [SYMLINK]() { + fs_1.default.readlink(this.absolute, (er, linkpath) => { + if (er) { + return this.emit('error', er); + } + this[ONREADLINK](linkpath); + }); + } + [ONREADLINK](linkpath) { + this.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(linkpath); + this[HEADER](); + this.end(); + } + [HARDLINK](linkpath) { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create link entry without stat'); + } + /* c8 ignore stop */ + this.type = 'Link'; + this.linkpath = (0, normalize_windows_path_js_1.normalizeWindowsPath)(path_1.default.relative(this.cwd, linkpath)); + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [FILE]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create file entry without stat'); + } + /* c8 ignore stop */ + if (this.stat.nlink > 1) { + const linkKey = `${this.stat.dev}:${this.stat.ino}`; + const linkpath = this.linkCache.get(linkKey); + if (linkpath?.indexOf(this.cwd) === 0) { + return this[HARDLINK](linkpath); + } + this.linkCache.set(linkKey, this.absolute); + } + this[HEADER](); + if (this.stat.size === 0) { + return this.end(); + } + this[OPENFILE](); + } + [OPENFILE]() { + fs_1.default.open(this.absolute, 'r', (er, fd) => { + if (er) { + return this.emit('error', er); + } + this[ONOPENFILE](fd); + }); + } + [ONOPENFILE](fd) { + this.fd = fd; + if (this.#hadError) { + return this[CLOSE](); + } + /* c8 ignore start */ + if (!this.stat) { + throw new Error('should stat before calling onopenfile'); + } + /* c8 ignore start */ + this.blockLen = 512 * Math.ceil(this.stat.size / 512); + this.blockRemain = this.blockLen; + const bufLen = Math.min(this.blockLen, this.maxReadSize); + this.buf = Buffer.allocUnsafe(bufLen); + this.offset = 0; + this.pos = 0; + this.remain = this.stat.size; + this.length = this.buf.length; + this[READ](); + } + [READ]() { + const { fd, buf, offset, length, pos } = this; + if (fd === undefined || buf === undefined) { + throw new Error('cannot read file without first opening'); + } + fs_1.default.read(fd, buf, offset, length, pos, (er, bytesRead) => { + if (er) { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + return this[CLOSE](() => this.emit('error', er)); + } + this[ONREAD](bytesRead); + }); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs_1.default.close(this.fd, cb); + } + [ONREAD](bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { + const er = Object.assign(new Error('encountered unexpected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + if (bytesRead > this.remain) { + const er = Object.assign(new Error('did not encounter expected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('should have created buffer prior to reading'); + } + /* c8 ignore stop */ + // null out the rest of the buffer, if we could fit the block padding + // at the end of this loop, we've incremented bytesRead and this.remain + // to be incremented up to the blockRemain level, as if we had expected + // to get a null-padded file, and read it until the end. then we will + // decrement both remain and blockRemain by bytesRead, and know that we + // reached the expected EOF, without any null buffer to append. + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0; + bytesRead++; + this.remain++; + } + } + const chunk = this.offset === 0 && bytesRead === this.buf.length ? + this.buf + : this.buf.subarray(this.offset, this.offset + bytesRead); + const flushed = this.write(chunk); + if (!flushed) { + this[AWAITDRAIN](() => this[ONDRAIN]()); + } + else { + this[ONDRAIN](); + } + } + [AWAITDRAIN](cb) { + this.once('drain', cb); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + if (this.blockRemain < chunk.length) { + const er = Object.assign(new Error('writing more data than expected'), { + path: this.absolute, + }); + return this.emit('error', er); + } + this.remain -= chunk.length; + this.blockRemain -= chunk.length; + this.pos += chunk.length; + this.offset += chunk.length; + return super.write(chunk, null, cb); + } + [ONDRAIN]() { + if (!this.remain) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + return this[CLOSE](er => er ? this.emit('error', er) : this.end()); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('buffer lost somehow in ONDRAIN'); + } + /* c8 ignore stop */ + if (this.offset >= this.length) { + // if we only have a smaller bit left to read, alloc a smaller buffer + // otherwise, keep it the same length it was before. + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); + this.offset = 0; + } + this.length = this.buf.length - this.offset; + this[READ](); + } +} +exports.WriteEntry = WriteEntry; +class WriteEntrySync extends WriteEntry { + sync = true; + [LSTAT]() { + this[ONLSTAT](fs_1.default.lstatSync(this.absolute)); + } + [SYMLINK]() { + this[ONREADLINK](fs_1.default.readlinkSync(this.absolute)); + } + [OPENFILE]() { + this[ONOPENFILE](fs_1.default.openSync(this.absolute, 'r')); + } + [READ]() { + let threw = true; + try { + const { fd, buf, offset, length, pos } = this; + /* c8 ignore start */ + if (fd === undefined || buf === undefined) { + throw new Error('fd and buf must be set in READ method'); + } + /* c8 ignore stop */ + const bytesRead = fs_1.default.readSync(fd, buf, offset, length, pos); + this[ONREAD](bytesRead); + threw = false; + } + finally { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + if (threw) { + try { + this[CLOSE](() => { }); + } + catch (er) { } + } + } + } + [AWAITDRAIN](cb) { + cb(); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs_1.default.closeSync(this.fd); + cb(); + } +} +exports.WriteEntrySync = WriteEntrySync; +class WriteEntryTar extends minipass_1.Minipass { + blockLen = 0; + blockRemain = 0; + buf = 0; + pos = 0; + remain = 0; + length = 0; + preservePaths; + portable; + strict; + noPax; + noMtime; + readEntry; + type; + prefix; + path; + mode; + uid; + gid; + uname; + gname; + header; + mtime; + atime; + ctime; + linkpath; + size; + onWriteEntry; + warn(code, message, data = {}) { + return (0, warn_method_js_1.warnMethod)(this, code, message, data); + } + constructor(readEntry, opt_ = {}) { + const opt = (0, options_js_1.dealias)(opt_); + super(); + this.preservePaths = !!opt.preservePaths; + this.portable = !!opt.portable; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.onWriteEntry = opt.onWriteEntry; + this.readEntry = readEntry; + const { type } = readEntry; + /* c8 ignore start */ + if (type === 'Unsupported') { + throw new Error('writing entry that should be ignored'); + } + /* c8 ignore stop */ + this.type = type; + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.prefix = opt.prefix; + this.path = (0, normalize_windows_path_js_1.normalizeWindowsPath)(readEntry.path); + this.mode = + readEntry.mode !== undefined ? + this[MODE](readEntry.mode) + : undefined; + this.uid = this.portable ? undefined : readEntry.uid; + this.gid = this.portable ? undefined : readEntry.gid; + this.uname = this.portable ? undefined : readEntry.uname; + this.gname = this.portable ? undefined : readEntry.gname; + this.size = readEntry.size; + this.mtime = + this.noMtime ? undefined : opt.mtime || readEntry.mtime; + this.atime = this.portable ? undefined : readEntry.atime; + this.ctime = this.portable ? undefined : readEntry.ctime; + this.linkpath = + readEntry.linkpath !== undefined ? + (0, normalize_windows_path_js_1.normalizeWindowsPath)(readEntry.linkpath) + : undefined; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = (0, strip_absolute_path_js_1.stripAbsolutePath)(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.remain = readEntry.size; + this.blockRemain = readEntry.startBlockSize; + this.onWriteEntry?.(this); + this.header = new header_js_1.Header({ + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this.mode, + uid: this.portable ? undefined : this.uid, + gid: this.portable ? undefined : this.gid, + size: this.size, + mtime: this.noMtime ? undefined : this.mtime, + type: this.type, + uname: this.portable ? undefined : this.uname, + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + }); + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + if (this.header.encode() && !this.noPax) { + super.write(new pax_js_1.Pax({ + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + gid: this.portable ? undefined : this.gid, + mtime: this.noMtime ? undefined : this.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.size, + uid: this.portable ? undefined : this.uid, + uname: this.portable ? undefined : this.uname, + dev: this.portable ? undefined : this.readEntry.dev, + ino: this.portable ? undefined : this.readEntry.ino, + nlink: this.portable ? undefined : this.readEntry.nlink, + }).encode()); + } + const b = this.header?.block; + /* c8 ignore start */ + if (!b) + throw new Error('failed to encode header'); + /* c8 ignore stop */ + super.write(b); + readEntry.pipe(this); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [MODE](mode) { + return (0, mode_fix_js_1.modeFix)(mode, this.type === 'Directory', this.portable); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + const writeLen = chunk.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + this.blockRemain -= writeLen; + return super.write(chunk, cb); + } + end(chunk, encoding, cb) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding ?? 'utf8'); + } + if (cb) + this.once('finish', cb); + chunk ? super.end(chunk, cb) : super.end(cb); + /* c8 ignore stop */ + return this; + } +} +exports.WriteEntryTar = WriteEntryTar; +const getType = (stat) => stat.isFile() ? 'File' + : stat.isDirectory() ? 'Directory' + : stat.isSymbolicLink() ? 'SymbolicLink' + : 'Unsupported'; +//# sourceMappingURL=write-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/commonjs/write-entry.js.map b/node_modules/tar/dist/commonjs/write-entry.js.map new file mode 100644 index 0000000..4a80682 --- /dev/null +++ b/node_modules/tar/dist/commonjs/write-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.js","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAmC;AACnC,uCAAmC;AACnC,gDAAuB;AACvB,2CAAoC;AACpC,+CAAuC;AACvC,2EAAkE;AAClE,6CAKqB;AACrB,qCAA8B;AAE9B,qEAA4D;AAC5D,2EAAkE;AAElE,qDAKyB;AACzB,wDAAyC;AAEzC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,MAAe,EAAE,EAAE;IACnD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAA,gDAAoB,EAAC,IAAI,CAAC,CAAA;IACnC,CAAC;IACD,IAAI,GAAG,IAAA,gDAAoB,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;IAC1D,OAAO,IAAA,gDAAoB,EAAC,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAA;AAClD,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;AAEpC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAA;AACjC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;AAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAA;AACrC,MAAM,OAAO,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AC7D,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;IACtB,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW;QAClC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,cAAc;YACxC,CAAC,CAAC,aAAa,CAAA","sourcesContent":["import fs, { type Stats } from 'fs'\nimport { Minipass } from 'minipass'\nimport path from 'path'\nimport { Header } from './header.js'\nimport { modeFix } from './mode-fix.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport {\n dealias,\n LinkCacheKey,\n TarOptions,\n TarOptionsWithAliases,\n} from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport { EntryTypeName } from './types.js'\nimport {\n WarnData,\n Warner,\n WarnEvent,\n warnMethod,\n} from './warn-method.js'\nimport * as winchars from './winchars.js'\n\nconst prefixPath = (path: string, prefix?: string) => {\n if (!prefix) {\n return normalizeWindowsPath(path)\n }\n path = normalizeWindowsPath(path).replace(/^\\.(\\/|$)/, '')\n return stripTrailingSlashes(prefix) + '/' + path\n}\n\nconst maxReadSize = 16 * 1024 * 1024\n\nconst PROCESS = Symbol('process')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst HEADER = Symbol('header')\nconst READ = Symbol('read')\nconst LSTAT = Symbol('lstat')\nconst ONLSTAT = Symbol('onlstat')\nconst ONREAD = Symbol('onread')\nconst ONREADLINK = Symbol('onreadlink')\nconst OPENFILE = Symbol('openfile')\nconst ONOPENFILE = Symbol('onopenfile')\nconst CLOSE = Symbol('close')\nconst MODE = Symbol('mode')\nconst AWAITDRAIN = Symbol('awaitDrain')\nconst ONDRAIN = Symbol('ondrain')\nconst PREFIX = Symbol('prefix')\n\nexport class WriteEntry\n extends Minipass\n implements Warner\n{\n path: string\n portable: boolean\n myuid: number = (process.getuid && process.getuid()) || 0\n // until node has builtin pwnam functions, this'll have to do\n myuser: string = process.env.USER || ''\n maxReadSize: number\n linkCache: Exclude\n statCache: Exclude\n preservePaths: boolean\n cwd: string\n strict: boolean\n mtime?: Date\n noPax: boolean\n noMtime: boolean\n prefix?: string\n fd?: number\n\n blockLen: number = 0\n blockRemain: number = 0\n buf?: Buffer\n pos: number = 0\n remain: number = 0\n length: number = 0\n offset: number = 0\n\n win32: boolean\n absolute: string\n\n header?: Header\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n stat?: Stats\n onWriteEntry?: (entry: WriteEntry) => any\n\n #hadError: boolean = false\n\n constructor(p: string, opt_: TarOptionsWithAliases = {}) {\n const opt = dealias(opt_)\n super()\n this.path = normalizeWindowsPath(p)\n // suppress atime, ctime, uid, gid, uname, gname\n this.portable = !!opt.portable\n this.maxReadSize = opt.maxReadSize || maxReadSize\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.preservePaths = !!opt.preservePaths\n this.cwd = normalizeWindowsPath(opt.cwd || process.cwd())\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.mtime = opt.mtime\n this.prefix =\n opt.prefix ? normalizeWindowsPath(opt.prefix) : undefined\n this.onWriteEntry = opt.onWriteEntry\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: string | boolean = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.win32 = !!opt.win32 || process.platform === 'win32'\n if (this.win32) {\n // force the \\ to / normalization, since we might not *actually*\n // be on windows, but want \\ to be considered a path separator.\n this.path = winchars.decode(this.path.replace(/\\\\/g, '/'))\n p = p.replace(/\\\\/g, '/')\n }\n\n this.absolute = normalizeWindowsPath(\n opt.absolute || path.resolve(this.cwd, p),\n )\n\n if (this.path === '') {\n this.path = './'\n }\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n const cs = this.statCache.get(this.absolute)\n if (cs) {\n this[ONLSTAT](cs)\n } else {\n this[LSTAT]()\n }\n }\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n emit(ev: keyof WarnEvent, ...data: any[]) {\n if (ev === 'error') {\n this.#hadError = true\n }\n return super.emit(ev, ...data)\n }\n\n [LSTAT]() {\n fs.lstat(this.absolute, (er, stat) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONLSTAT](stat)\n })\n }\n\n [ONLSTAT](stat: Stats) {\n this.statCache.set(this.absolute, stat)\n this.stat = stat\n if (!stat.isFile()) {\n stat.size = 0\n }\n this.type = getType(stat)\n this.emit('stat', stat)\n this[PROCESS]()\n }\n\n [PROCESS]() {\n switch (this.type) {\n case 'File':\n return this[FILE]()\n case 'Directory':\n return this[DIRECTORY]()\n case 'SymbolicLink':\n return this[SYMLINK]()\n // unsupported types are ignored.\n default:\n return this.end()\n }\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [HEADER]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot write header before stat')\n }\n /* c8 ignore stop */\n\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.onWriteEntry?.(this)\n this.header = new Header({\n path: this[PREFIX](this.path),\n // only apply the prefix to hard links.\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this[MODE](this.stat.mode),\n uid: this.portable ? undefined : this.stat.uid,\n gid: this.portable ? undefined : this.stat.gid,\n size: this.stat.size,\n mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime,\n /* c8 ignore next */\n type: this.type === 'Unsupported' ? undefined : this.type,\n uname:\n this.portable ? undefined\n : this.stat.uid === this.myuid ? this.myuser\n : '',\n atime: this.portable ? undefined : this.stat.atime,\n ctime: this.portable ? undefined : this.stat.ctime,\n })\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.header.atime,\n ctime: this.portable ? undefined : this.header.ctime,\n gid: this.portable ? undefined : this.header.gid,\n mtime:\n this.noMtime ? undefined : (\n this.mtime || this.header.mtime\n ),\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.header.size,\n uid: this.portable ? undefined : this.header.uid,\n uname: this.portable ? undefined : this.header.uname,\n dev: this.portable ? undefined : this.stat.dev,\n ino: this.portable ? undefined : this.stat.ino,\n nlink: this.portable ? undefined : this.stat.nlink,\n }).encode(),\n )\n }\n const block = this.header?.block\n /* c8 ignore start */\n if (!block) {\n throw new Error('failed to encode header')\n }\n /* c8 ignore stop */\n super.write(block)\n }\n\n [DIRECTORY]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create directory entry without stat')\n }\n /* c8 ignore stop */\n if (this.path.slice(-1) !== '/') {\n this.path += '/'\n }\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [SYMLINK]() {\n fs.readlink(this.absolute, (er, linkpath) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADLINK](linkpath)\n })\n }\n\n [ONREADLINK](linkpath: string) {\n this.linkpath = normalizeWindowsPath(linkpath)\n this[HEADER]()\n this.end()\n }\n\n [HARDLINK](linkpath: string) {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create link entry without stat')\n }\n /* c8 ignore stop */\n this.type = 'Link'\n this.linkpath = normalizeWindowsPath(\n path.relative(this.cwd, linkpath),\n )\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [FILE]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create file entry without stat')\n }\n /* c8 ignore stop */\n if (this.stat.nlink > 1) {\n const linkKey =\n `${this.stat.dev}:${this.stat.ino}` as LinkCacheKey\n const linkpath = this.linkCache.get(linkKey)\n if (linkpath?.indexOf(this.cwd) === 0) {\n return this[HARDLINK](linkpath)\n }\n this.linkCache.set(linkKey, this.absolute)\n }\n\n this[HEADER]()\n if (this.stat.size === 0) {\n return this.end()\n }\n\n this[OPENFILE]()\n }\n\n [OPENFILE]() {\n fs.open(this.absolute, 'r', (er, fd) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONOPENFILE](fd)\n })\n }\n\n [ONOPENFILE](fd: number) {\n this.fd = fd\n if (this.#hadError) {\n return this[CLOSE]()\n }\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('should stat before calling onopenfile')\n }\n /* c8 ignore start */\n\n this.blockLen = 512 * Math.ceil(this.stat.size / 512)\n this.blockRemain = this.blockLen\n const bufLen = Math.min(this.blockLen, this.maxReadSize)\n this.buf = Buffer.allocUnsafe(bufLen)\n this.offset = 0\n this.pos = 0\n this.remain = this.stat.size\n this.length = this.buf.length\n this[READ]()\n }\n\n [READ]() {\n const { fd, buf, offset, length, pos } = this\n if (fd === undefined || buf === undefined) {\n throw new Error('cannot read file without first opening')\n }\n fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {\n if (er) {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n return this[CLOSE](() => this.emit('error', er))\n }\n this[ONREAD](bytesRead)\n })\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.close(this.fd, cb)\n }\n\n [ONREAD](bytesRead: number) {\n if (bytesRead <= 0 && this.remain > 0) {\n const er = Object.assign(\n new Error('encountered unexpected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n if (bytesRead > this.remain) {\n const er = Object.assign(\n new Error('did not encounter expected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('should have created buffer prior to reading')\n }\n /* c8 ignore stop */\n\n // null out the rest of the buffer, if we could fit the block padding\n // at the end of this loop, we've incremented bytesRead and this.remain\n // to be incremented up to the blockRemain level, as if we had expected\n // to get a null-padded file, and read it until the end. then we will\n // decrement both remain and blockRemain by bytesRead, and know that we\n // reached the expected EOF, without any null buffer to append.\n if (bytesRead === this.remain) {\n for (\n let i = bytesRead;\n i < this.length && bytesRead < this.blockRemain;\n i++\n ) {\n this.buf[i + this.offset] = 0\n bytesRead++\n this.remain++\n }\n }\n\n const chunk =\n this.offset === 0 && bytesRead === this.buf.length ?\n this.buf\n : this.buf.subarray(this.offset, this.offset + bytesRead)\n\n const flushed = this.write(chunk)\n if (!flushed) {\n this[AWAITDRAIN](() => this[ONDRAIN]())\n } else {\n this[ONDRAIN]()\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n this.once('drain', cb)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n\n if (this.blockRemain < chunk.length) {\n const er = Object.assign(\n new Error('writing more data than expected'),\n {\n path: this.absolute,\n },\n )\n return this.emit('error', er)\n }\n this.remain -= chunk.length\n this.blockRemain -= chunk.length\n this.pos += chunk.length\n this.offset += chunk.length\n return super.write(chunk, null, cb)\n }\n\n [ONDRAIN]() {\n if (!this.remain) {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n return this[CLOSE](er =>\n er ? this.emit('error', er) : this.end(),\n )\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('buffer lost somehow in ONDRAIN')\n }\n /* c8 ignore stop */\n\n if (this.offset >= this.length) {\n // if we only have a smaller bit left to read, alloc a smaller buffer\n // otherwise, keep it the same length it was before.\n this.buf = Buffer.allocUnsafe(\n Math.min(this.blockRemain, this.buf.length),\n )\n this.offset = 0\n }\n this.length = this.buf.length - this.offset\n this[READ]()\n }\n}\n\nexport class WriteEntrySync extends WriteEntry implements Warner {\n sync: true = true;\n\n [LSTAT]() {\n this[ONLSTAT](fs.lstatSync(this.absolute))\n }\n\n [SYMLINK]() {\n this[ONREADLINK](fs.readlinkSync(this.absolute))\n }\n\n [OPENFILE]() {\n this[ONOPENFILE](fs.openSync(this.absolute, 'r'))\n }\n\n [READ]() {\n let threw = true\n try {\n const { fd, buf, offset, length, pos } = this\n /* c8 ignore start */\n if (fd === undefined || buf === undefined) {\n throw new Error('fd and buf must be set in READ method')\n }\n /* c8 ignore stop */\n const bytesRead = fs.readSync(fd, buf, offset, length, pos)\n this[ONREAD](bytesRead)\n threw = false\n } finally {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n if (threw) {\n try {\n this[CLOSE](() => {})\n } catch (er) {}\n }\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n cb()\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.closeSync(this.fd)\n cb()\n }\n}\n\nexport class WriteEntryTar\n extends Minipass\n implements Warner\n{\n blockLen: number = 0\n blockRemain: number = 0\n buf: number = 0\n pos: number = 0\n remain: number = 0\n length: number = 0\n preservePaths: boolean\n portable: boolean\n strict: boolean\n noPax: boolean\n noMtime: boolean\n readEntry: ReadEntry\n type: EntryTypeName\n prefix?: string\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n header?: Header\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n size: number\n onWriteEntry?: (entry: WriteEntry) => any\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n constructor(\n readEntry: ReadEntry,\n opt_: TarOptionsWithAliases = {},\n ) {\n const opt = dealias(opt_)\n super()\n this.preservePaths = !!opt.preservePaths\n this.portable = !!opt.portable\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.onWriteEntry = opt.onWriteEntry\n\n this.readEntry = readEntry\n const { type } = readEntry\n /* c8 ignore start */\n if (type === 'Unsupported') {\n throw new Error('writing entry that should be ignored')\n }\n /* c8 ignore stop */\n this.type = type\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.prefix = opt.prefix\n\n this.path = normalizeWindowsPath(readEntry.path)\n this.mode =\n readEntry.mode !== undefined ?\n this[MODE](readEntry.mode)\n : undefined\n this.uid = this.portable ? undefined : readEntry.uid\n this.gid = this.portable ? undefined : readEntry.gid\n this.uname = this.portable ? undefined : readEntry.uname\n this.gname = this.portable ? undefined : readEntry.gname\n this.size = readEntry.size\n this.mtime =\n this.noMtime ? undefined : opt.mtime || readEntry.mtime\n this.atime = this.portable ? undefined : readEntry.atime\n this.ctime = this.portable ? undefined : readEntry.ctime\n this.linkpath =\n readEntry.linkpath !== undefined ?\n normalizeWindowsPath(readEntry.linkpath)\n : undefined\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: false | string = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.remain = readEntry.size\n this.blockRemain = readEntry.startBlockSize\n\n this.onWriteEntry?.(this as unknown as WriteEntry)\n this.header = new Header({\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this.mode,\n uid: this.portable ? undefined : this.uid,\n gid: this.portable ? undefined : this.gid,\n size: this.size,\n mtime: this.noMtime ? undefined : this.mtime,\n type: this.type,\n uname: this.portable ? undefined : this.uname,\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n })\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n gid: this.portable ? undefined : this.gid,\n mtime: this.noMtime ? undefined : this.mtime,\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.size,\n uid: this.portable ? undefined : this.uid,\n uname: this.portable ? undefined : this.uname,\n dev: this.portable ? undefined : this.readEntry.dev,\n ino: this.portable ? undefined : this.readEntry.ino,\n nlink: this.portable ? undefined : this.readEntry.nlink,\n }).encode(),\n )\n }\n\n const b = this.header?.block\n /* c8 ignore start */\n if (!b) throw new Error('failed to encode header')\n /* c8 ignore stop */\n super.write(b)\n readEntry.pipe(this)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n const writeLen = chunk.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n this.blockRemain -= writeLen\n return super.write(chunk, cb)\n }\n\n end(cb?: () => void): this\n end(chunk: Buffer | string, cb?: () => void): this\n end(\n chunk: Buffer | string,\n encoding?: BufferEncoding,\n cb?: () => void,\n ): this\n end(\n chunk?: Buffer | string | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ): this {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding ?? 'utf8')\n }\n if (cb) this.once('finish', cb)\n chunk ? super.end(chunk, cb) : super.end(cb)\n /* c8 ignore stop */\n return this\n }\n}\n\nconst getType = (stat: Stats): EntryTypeName | 'Unsupported' =>\n stat.isFile() ? 'File'\n : stat.isDirectory() ? 'Directory'\n : stat.isSymbolicLink() ? 'SymbolicLink'\n : 'Unsupported'\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.d.ts b/node_modules/tar/dist/esm/create.d.ts new file mode 100644 index 0000000..867c5e9 --- /dev/null +++ b/node_modules/tar/dist/esm/create.d.ts @@ -0,0 +1,3 @@ +import { Pack, PackSync } from './pack.js'; +export declare const create: import("./make-command.js").TarCommand; +//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.d.ts.map b/node_modules/tar/dist/esm/create.d.ts.map new file mode 100644 index 0000000..82be947 --- /dev/null +++ b/node_modules/tar/dist/esm/create.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AA8E1C,eAAO,MAAM,MAAM,wDAUlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.js b/node_modules/tar/dist/esm/create.js new file mode 100644 index 0000000..512a991 --- /dev/null +++ b/node_modules/tar/dist/esm/create.js @@ -0,0 +1,77 @@ +import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'; +import path from 'node:path'; +import { list } from './list.js'; +import { makeCommand } from './make-command.js'; +import { Pack, PackSync } from './pack.js'; +const createFileSync = (opt, files) => { + const p = new PackSync(opt); + const stream = new WriteStreamSync(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const createFile = (opt, files) => { + const p = new Pack(opt); + const stream = new WriteStream(opt.file, { + mode: opt.mode || 0o666, + }); + p.pipe(stream); + const promise = new Promise((res, rej) => { + stream.on('error', rej); + stream.on('close', res); + p.on('error', rej); + }); + addFilesAsync(p, files); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + list({ + file: path.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await list({ + file: path.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => { + p.add(entry); + }, + }); + } + else { + p.add(file); + } + } + p.end(); +}; +const createSync = (opt, files) => { + const p = new PackSync(opt); + addFilesSync(p, files); + return p; +}; +const createAsync = (opt, files) => { + const p = new Pack(opt); + addFilesAsync(p, files); + return p; +}; +export const create = makeCommand(createFileSync, createFile, createSync, createAsync, (_opt, files) => { + if (!files?.length) { + throw new TypeError('no paths specified to add to archive'); + } +}); +//# sourceMappingURL=create.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/create.js.map b/node_modules/tar/dist/esm/create.js.map new file mode 100644 index 0000000..9260f91 --- /dev/null +++ b/node_modules/tar/dist/esm/create.js.map @@ -0,0 +1 @@ +{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAO/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE1C,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,KAAe,EAAE,EAAE;IAClE,MAAM,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,KAAK;KACxB,CAAC,CAAA;IACF,CAAC,CAAC,IAAI,CAAC,MAAsC,CAAC,CAAA;IAC9C,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAmB,EAAE,KAAe,EAAE,EAAE;IAC1D,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAA;IACvB,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE;QACvC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AAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport path from 'node:path'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSync,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\nconst createFileSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n const stream = new WriteStreamSync(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst createFile = (opt: TarOptionsFile, files: string[]) => {\n const p = new Pack(opt)\n const stream = new WriteStream(opt.file, {\n mode: opt.mode || 0o666,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n\n const promise = new Promise((res, rej) => {\n stream.on('error', rej)\n stream.on('close', res)\n p.on('error', rej)\n })\n\n addFilesAsync(p, files)\n\n return promise\n}\n\nconst addFilesSync = (p: PackSync, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => {\n p.add(entry)\n },\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nconst createSync = (opt: TarOptionsSync, files: string[]) => {\n const p = new PackSync(opt)\n addFilesSync(p, files)\n return p\n}\n\nconst createAsync = (opt: TarOptions, files: string[]) => {\n const p = new Pack(opt)\n addFilesAsync(p, files)\n return p\n}\n\nexport const create = makeCommand(\n createFileSync,\n createFile,\n createSync,\n createAsync,\n (_opt, files) => {\n if (!files?.length) {\n throw new TypeError('no paths specified to add to archive')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.d.ts b/node_modules/tar/dist/esm/cwd-error.d.ts new file mode 100644 index 0000000..16c6460 --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.d.ts @@ -0,0 +1,8 @@ +export declare class CwdError extends Error { + path: string; + code: string; + syscall: 'chdir'; + constructor(path: string, code: string); + get name(): string; +} +//# sourceMappingURL=cwd-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.d.ts.map b/node_modules/tar/dist/esm/cwd-error.d.ts.map new file mode 100644 index 0000000..6b9a1a2 --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.d.ts","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAS,SAAQ,KAAK;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAU;gBAEd,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMtC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.js b/node_modules/tar/dist/esm/cwd-error.js new file mode 100644 index 0000000..289a066 --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.js @@ -0,0 +1,14 @@ +export class CwdError extends Error { + path; + code; + syscall = 'chdir'; + constructor(path, code) { + super(`${code}: Cannot cd into '${path}'`); + this.path = path; + this.code = code; + } + get name() { + return 'CwdError'; + } +} +//# sourceMappingURL=cwd-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/cwd-error.js.map b/node_modules/tar/dist/esm/cwd-error.js.map new file mode 100644 index 0000000..6956f1a --- /dev/null +++ b/node_modules/tar/dist/esm/cwd-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"cwd-error.js","sourceRoot":"","sources":["../../src/cwd-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,IAAI,CAAQ;IACZ,IAAI,CAAQ;IACZ,OAAO,GAAY,OAAO,CAAA;IAE1B,YAAY,IAAY,EAAE,IAAY;QACpC,KAAK,CAAC,GAAG,IAAI,qBAAqB,IAAI,GAAG,CAAC,CAAA;QAC1C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,UAAU,CAAA;IACnB,CAAC;CACF","sourcesContent":["export class CwdError extends Error {\n path: string\n code: string\n syscall: 'chdir' = 'chdir'\n\n constructor(path: string, code: string) {\n super(`${code}: Cannot cd into '${path}'`)\n this.path = path\n this.code = code\n }\n\n get name() {\n return 'CwdError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.d.ts b/node_modules/tar/dist/esm/extract.d.ts new file mode 100644 index 0000000..9cbb18c --- /dev/null +++ b/node_modules/tar/dist/esm/extract.d.ts @@ -0,0 +1,3 @@ +import { Unpack, UnpackSync } from './unpack.js'; +export declare const extract: import("./make-command.js").TarCommand; +//# sourceMappingURL=extract.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.d.ts.map b/node_modules/tar/dist/esm/extract.d.ts.map new file mode 100644 index 0000000..31008e1 --- /dev/null +++ b/node_modules/tar/dist/esm/extract.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA2ChD,eAAO,MAAM,OAAO,4DAQnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.js b/node_modules/tar/dist/esm/extract.js new file mode 100644 index 0000000..2274fee --- /dev/null +++ b/node_modules/tar/dist/esm/extract.js @@ -0,0 +1,49 @@ +// tar -x +import * as fsm from '@isaacs/fs-minipass'; +import fs from 'node:fs'; +import { filesFilter } from './list.js'; +import { makeCommand } from './make-command.js'; +import { Unpack, UnpackSync } from './unpack.js'; +const extractFileSync = (opt) => { + const u = new UnpackSync(opt); + const file = opt.file; + const stat = fs.statSync(file); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const stream = new fsm.ReadStreamSync(file, { + readSize: readSize, + size: stat.size, + }); + stream.pipe(u); +}; +const extractFile = (opt, _) => { + const u = new Unpack(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + u.on('error', reject); + u.on('close', resolve); + // This trades a zero-byte read() syscall for a stat + // However, it will usually result in less memory allocation + fs.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(u); + } + }); + }); + return p; +}; +export const extract = makeCommand(extractFileSync, extractFile, opt => new UnpackSync(opt), opt => new Unpack(opt), (opt, files) => { + if (files?.length) + filesFilter(opt, files); +}); +//# sourceMappingURL=extract.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/extract.js.map b/node_modules/tar/dist/esm/extract.js.map new file mode 100644 index 0000000..796a1cb --- /dev/null +++ b/node_modules/tar/dist/esm/extract.js.map @@ -0,0 +1 @@ +{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/extract.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;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AAE,CAAC,CAAA;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;oBACtC,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,IAAI,CAAC,IAAI;iBAChB,CAAC,CAAA;gBACF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;gBAC1B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAChB,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAChC,eAAe,EACf,WAAW,EACX,GAAG,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,EAC1B,GAAG,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;AAC5C,CAAC,CACF,CAAA","sourcesContent":["// tar -x\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { filesFilter } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport { TarOptionsFile, TarOptionsSyncFile } from './options.js'\nimport { Unpack, UnpackSync } from './unpack.js'\n\nconst extractFileSync = (opt: TarOptionsSyncFile) => {\n const u = new UnpackSync(opt)\n const file = opt.file\n const stat = fs.statSync(file)\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n const stream = new fsm.ReadStreamSync(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.pipe(u)\n}\n\nconst extractFile = (opt: TarOptionsFile, _?: string[]) => {\n const u = new Unpack(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n u.on('error', reject)\n u.on('close', resolve)\n\n // This trades a zero-byte read() syscall for a stat\n // However, it will usually result in less memory allocation\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(u)\n }\n })\n })\n return p\n}\n\nexport const extract = makeCommand(\n extractFileSync,\n extractFile,\n opt => new UnpackSync(opt),\n opt => new Unpack(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.d.ts b/node_modules/tar/dist/esm/get-write-flag.d.ts new file mode 100644 index 0000000..d35ec71 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.d.ts @@ -0,0 +1,2 @@ +export declare const getWriteFlag: (() => string) | ((size: number) => number | "w"); +//# sourceMappingURL=get-write-flag.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.d.ts.map b/node_modules/tar/dist/esm/get-write-flag.d.ts.map new file mode 100644 index 0000000..79af1e1 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.d.ts","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,2BAGd,MAAM,kBAAwC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.js b/node_modules/tar/dist/esm/get-write-flag.js new file mode 100644 index 0000000..2c7f3e8 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.js @@ -0,0 +1,23 @@ +// Get the appropriate flag to use for creating files +// We use fmap on Windows platforms for files less than +// 512kb. This is a fairly low limit, but avoids making +// things slower in some cases. Since most of what this +// library is used for is extracting tarballs of many +// relatively small files in npm packages and the like, +// it can be a big boost on Windows platforms. +import fs from 'fs'; +const platform = process.env.__FAKE_PLATFORM__ || process.platform; +const isWindows = platform === 'win32'; +/* c8 ignore start */ +const { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants; +const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || + fs.constants.UV_FS_O_FILEMAP || + 0; +/* c8 ignore stop */ +const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP; +const fMapLimit = 512 * 1024; +const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY; +export const getWriteFlag = !fMapEnabled ? + () => 'w' + : (size) => (size < fMapLimit ? fMapFlag : 'w'); +//# sourceMappingURL=get-write-flag.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/get-write-flag.js.map b/node_modules/tar/dist/esm/get-write-flag.js.map new file mode 100644 index 0000000..2d620c1 --- /dev/null +++ b/node_modules/tar/dist/esm/get-write-flag.js.map @@ -0,0 +1 @@ +{"version":3,"file":"get-write-flag.js","sourceRoot":"","sources":["../../src/get-write-flag.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uDAAuD;AACvD,wDAAwD;AACxD,wDAAwD;AACxD,qDAAqD;AACrD,uDAAuD;AACvD,8CAA8C;AAE9C,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAClE,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAEtC,qBAAqB;AACrB,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,CAAA;AACnD,MAAM,eAAe,GACnB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC1C,EAAE,CAAC,SAAS,CAAC,eAAe;IAC5B,CAAC,CAAA;AACH,oBAAoB;AAEpB,MAAM,WAAW,GAAG,SAAS,IAAI,CAAC,CAAC,eAAe,CAAA;AAClD,MAAM,SAAS,GAAG,GAAG,GAAG,IAAI,CAAA;AAC5B,MAAM,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAC/D,MAAM,CAAC,MAAM,YAAY,GACvB,CAAC,WAAW,CAAC,CAAC;IACZ,GAAG,EAAE,CAAC,GAAG;IACX,CAAC,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA","sourcesContent":["// Get the appropriate flag to use for creating files\n// We use fmap on Windows platforms for files less than\n// 512kb. This is a fairly low limit, but avoids making\n// things slower in some cases. Since most of what this\n// library is used for is extracting tarballs of many\n// relatively small files in npm packages and the like,\n// it can be a big boost on Windows platforms.\n\nimport fs from 'fs'\n\nconst platform = process.env.__FAKE_PLATFORM__ || process.platform\nconst isWindows = platform === 'win32'\n\n/* c8 ignore start */\nconst { O_CREAT, O_TRUNC, O_WRONLY } = fs.constants\nconst UV_FS_O_FILEMAP =\n Number(process.env.__FAKE_FS_O_FILENAME__) ||\n fs.constants.UV_FS_O_FILEMAP ||\n 0\n/* c8 ignore stop */\n\nconst fMapEnabled = isWindows && !!UV_FS_O_FILEMAP\nconst fMapLimit = 512 * 1024\nconst fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY\nexport const getWriteFlag =\n !fMapEnabled ?\n () => 'w'\n : (size: number) => (size < fMapLimit ? fMapFlag : 'w')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.d.ts b/node_modules/tar/dist/esm/header.d.ts new file mode 100644 index 0000000..7d2f18f --- /dev/null +++ b/node_modules/tar/dist/esm/header.d.ts @@ -0,0 +1,54 @@ +/// +import type { EntryTypeCode, EntryTypeName } from './types.js'; +export type HeaderData = { + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + uname?: string; + gname?: string; + devmaj?: number; + devmin?: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + dev?: number; + ino?: number; + nlink?: number; +}; +export declare class Header implements HeaderData { + #private; + cksumValid: boolean; + needPax: boolean; + nullBlock: boolean; + block?: Buffer; + path?: string; + mode?: number; + uid?: number; + gid?: number; + size?: number; + cksum?: number; + linkpath?: string; + uname?: string; + gname?: string; + devmaj: number; + devmin: number; + atime?: Date; + ctime?: Date; + mtime?: Date; + charset?: string; + comment?: string; + constructor(data?: Buffer | HeaderData, off?: number, ex?: HeaderData, gex?: HeaderData); + decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData): void; + encode(buf?: Buffer, off?: number): boolean; + get type(): EntryTypeName; + get typeKey(): EntryTypeCode | 'Unsupported'; + set type(type: EntryTypeCode | EntryTypeName | 'Unsupported'); +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.d.ts.map b/node_modules/tar/dist/esm/header.d.ts.map new file mode 100644 index 0000000..7e49f29 --- /dev/null +++ b/node_modules/tar/dist/esm/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAG9D,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,aAAa,GAAG,aAAa,CAAA;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;I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AG,CAAC,EAAE,UAAU;IASlB,MAAM,CACJ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,CAAC,EAAE,UAAU;IAsGlB,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,GAAE,MAAU;IAwEpC,IAAI,IAAI,IAAI,aAAa,CAKxB;IAED,IAAI,OAAO,IAAI,aAAa,GAAG,aAAa,CAE3C;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,GAAG,aAAa,EAS3D;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.js b/node_modules/tar/dist/esm/header.js new file mode 100644 index 0000000..e15192b --- /dev/null +++ b/node_modules/tar/dist/esm/header.js @@ -0,0 +1,279 @@ +// parse a 512-byte header block to a data object, or vice-versa +// encode returns `true` if a pax extended header is needed, because +// the data could not be faithfully encoded in a simple header. +// (Also, check header.needPax to see if it needs a pax header.) +import { posix as pathModule } from 'node:path'; +import * as large from './large-numbers.js'; +import * as types from './types.js'; +export class Header { + cksumValid = false; + needPax = false; + nullBlock = false; + block; + path; + mode; + uid; + gid; + size; + cksum; + #type = 'Unsupported'; + linkpath; + uname; + gname; + devmaj = 0; + devmin = 0; + atime; + ctime; + mtime; + charset; + comment; + constructor(data, off = 0, ex, gex) { + if (Buffer.isBuffer(data)) { + this.decode(data, off || 0, ex, gex); + } + else if (data) { + this.#slurp(data); + } + } + decode(buf, off, ex, gex) { + if (!off) { + off = 0; + } + if (!buf || !(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + this.path = decString(buf, off, 100); + this.mode = decNumber(buf, off + 100, 8); + this.uid = decNumber(buf, off + 108, 8); + this.gid = decNumber(buf, off + 116, 8); + this.size = decNumber(buf, off + 124, 12); + this.mtime = decDate(buf, off + 136, 12); + this.cksum = decNumber(buf, off + 148, 12); + // if we have extended or global extended headers, apply them now + // See https://github.com/npm/node-tar/pull/187 + // Apply global before local, so it overrides + if (gex) + this.#slurp(gex, true); + if (ex) + this.#slurp(ex); + // old tar versions marked dirs as a file with a trailing / + const t = decString(buf, off + 156, 1); + if (types.isCode(t)) { + this.#type = t || '0'; + } + if (this.#type === '0' && this.path.slice(-1) === '/') { + this.#type = '5'; + } + // tar implementations sometimes incorrectly put the stat(dir).size + // as the size in the tarball, even though Directory entries are + // not able to have any body at all. In the very rare chance that + // it actually DOES have a body, we weren't going to do anything with + // it anyway, and it'll just be a warning about an invalid header. + if (this.#type === '5') { + this.size = 0; + } + this.linkpath = decString(buf, off + 157, 100); + if (buf.subarray(off + 257, off + 265).toString() === + 'ustar\u000000') { + this.uname = decString(buf, off + 265, 32); + this.gname = decString(buf, off + 297, 32); + /* c8 ignore start */ + this.devmaj = decNumber(buf, off + 329, 8) ?? 0; + this.devmin = decNumber(buf, off + 337, 8) ?? 0; + /* c8 ignore stop */ + if (buf[off + 475] !== 0) { + // definitely a prefix, definitely >130 chars. + const prefix = decString(buf, off + 345, 155); + this.path = prefix + '/' + this.path; + } + else { + const prefix = decString(buf, off + 345, 130); + if (prefix) { + this.path = prefix + '/' + this.path; + } + this.atime = decDate(buf, off + 476, 12); + this.ctime = decDate(buf, off + 488, 12); + } + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksumValid = sum === this.cksum; + if (this.cksum === undefined && sum === 8 * 0x20) { + this.nullBlock = true; + } + } + #slurp(ex, gex = false) { + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex) || + (k === 'linkpath' && gex) || + k === 'global'); + }))); + } + encode(buf, off = 0) { + if (!buf) { + buf = this.block = Buffer.alloc(512); + } + if (this.#type === 'Unsupported') { + this.#type = '0'; + } + if (!(buf.length >= off + 512)) { + throw new Error('need 512 bytes for header'); + } + const prefixSize = this.ctime || this.atime ? 130 : 155; + const split = splitPrefix(this.path || '', prefixSize); + const path = split[0]; + const prefix = split[1]; + this.needPax = !!split[2]; + this.needPax = encString(buf, off, 100, path) || this.needPax; + this.needPax = + encNumber(buf, off + 100, 8, this.mode) || this.needPax; + this.needPax = + encNumber(buf, off + 108, 8, this.uid) || this.needPax; + this.needPax = + encNumber(buf, off + 116, 8, this.gid) || this.needPax; + this.needPax = + encNumber(buf, off + 124, 12, this.size) || this.needPax; + this.needPax = + encDate(buf, off + 136, 12, this.mtime) || this.needPax; + buf[off + 156] = this.#type.charCodeAt(0); + this.needPax = + encString(buf, off + 157, 100, this.linkpath) || this.needPax; + buf.write('ustar\u000000', off + 257, 8); + this.needPax = + encString(buf, off + 265, 32, this.uname) || this.needPax; + this.needPax = + encString(buf, off + 297, 32, this.gname) || this.needPax; + this.needPax = + encNumber(buf, off + 329, 8, this.devmaj) || this.needPax; + this.needPax = + encNumber(buf, off + 337, 8, this.devmin) || this.needPax; + this.needPax = + encString(buf, off + 345, prefixSize, prefix) || this.needPax; + if (buf[off + 475] !== 0) { + this.needPax = + encString(buf, off + 345, 155, prefix) || this.needPax; + } + else { + this.needPax = + encString(buf, off + 345, 130, prefix) || this.needPax; + this.needPax = + encDate(buf, off + 476, 12, this.atime) || this.needPax; + this.needPax = + encDate(buf, off + 488, 12, this.ctime) || this.needPax; + } + let sum = 8 * 0x20; + for (let i = off; i < off + 148; i++) { + sum += buf[i]; + } + for (let i = off + 156; i < off + 512; i++) { + sum += buf[i]; + } + this.cksum = sum; + encNumber(buf, off + 148, 8, this.cksum); + this.cksumValid = true; + return this.needPax; + } + get type() { + return (this.#type === 'Unsupported' ? + this.#type + : types.name.get(this.#type)); + } + get typeKey() { + return this.#type; + } + set type(type) { + const c = String(types.code.get(type)); + if (types.isCode(c) || c === 'Unsupported') { + this.#type = c; + } + else if (types.isCode(type)) { + this.#type = type; + } + else { + throw new TypeError('invalid entry type: ' + type); + } + } +} +const splitPrefix = (p, prefixSize) => { + const pathSize = 100; + let pp = p; + let prefix = ''; + let ret = undefined; + const root = pathModule.parse(p).root || '.'; + if (Buffer.byteLength(pp) < pathSize) { + ret = [pp, prefix, false]; + } + else { + // first set prefix to the dir, and path to the base + prefix = pathModule.dirname(pp); + pp = pathModule.basename(pp); + do { + if (Buffer.byteLength(pp) <= pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // both fit! + ret = [pp, prefix, false]; + } + else if (Buffer.byteLength(pp) > pathSize && + Buffer.byteLength(prefix) <= prefixSize) { + // prefix fits in prefix, but path doesn't fit in path + ret = [pp.slice(0, pathSize - 1), prefix, true]; + } + else { + // make path take a bit from prefix + pp = pathModule.join(pathModule.basename(prefix), pp); + prefix = pathModule.dirname(prefix); + } + } while (prefix !== root && ret === undefined); + // at this point, found no resolution, just truncate + if (!ret) { + ret = [p.slice(0, pathSize - 1), '', true]; + } + } + return ret; +}; +const decString = (buf, off, size) => buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*/, ''); +const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size)); +const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000); +const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ? + large.parse(buf.subarray(off, off + size)) + : decSmallNumber(buf, off, size); +const nanUndef = (value) => (isNaN(value) ? undefined : value); +const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf + .subarray(off, off + size) + .toString('utf8') + .replace(/\0.*$/, '') + .trim(), 8)); +// the maximum encodable as a null-terminated octal, by field size +const MAXNUM = { + 12: 0o77777777777, + 8: 0o7777777, +}; +const encNumber = (buf, off, size, num) => num === undefined ? false + : num > MAXNUM[size] || num < 0 ? + (large.encode(num, buf.subarray(off, off + size)), true) + : (encSmallNumber(buf, off, size, num), false); +const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii'); +const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size); +const padOctal = (str, size) => (str.length === size - 1 ? + str + : new Array(size - str.length - 1).join('0') + str + ' ') + '\0'; +const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000)); +// enough to fill the longest string we've got +const NULLS = new Array(156).join('\0'); +// pad with nulls, return true if it's longer or non-ascii +const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'), + str.length !== Buffer.byteLength(str) || str.length > size)); +//# sourceMappingURL=header.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/header.js.map b/node_modules/tar/dist/esm/header.js.map new file mode 100644 index 0000000..36e065b --- /dev/null +++ b/node_modules/tar/dist/esm/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,oEAAoE;AACpE,+DAA+D;AAC/D,gEAAgE;AAEhE,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAE3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AA4BnC,MAAM,OAAO,MAAM;IACjB,UAAU,GAAY,KAAK,CAAA;IAC3B,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAY,KAAK,CAAA;IAE1B,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,IAAI,CAAS;IACb,KAAK,CAAS;IACd,KAAK,GAAkC,aAAa,CAAA;IACpD,QAAQ,CAAS;IACjB,KAAK,CAAS;IACd,KAAK,CAAS;IACd,MAAM,GAAW,CAAC,CAAA;IAClB,MAAM,GAAW,CAAC,CAAA;IAClB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IAEZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,YACE,IAA0B,EAC1B,MAAc,CAAC,EACf,EAAe,EAC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IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CACjD,CAAA;AAEH,8CAA8C;AAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,0DAA0D;AAC1D,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,GAAY,EACZ,EAAE,CACF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAC5D,CAAA","sourcesContent":["// parse a 512-byte header block to a data object, or vice-versa\n// encode returns `true` if a pax extended header is needed, because\n// the data could not be faithfully encoded in a simple header.\n// (Also, check header.needPax to see if it needs a pax header.)\n\nimport { posix as pathModule } from 'node:path'\nimport * as large from './large-numbers.js'\nimport type { EntryTypeCode, EntryTypeName } from './types.js'\nimport * as types from './types.js'\n\nexport type HeaderData = {\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj?: number\n devmin?: number\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n // fields that are common in extended PAX headers, but not in the\n // \"standard\" tar header block\n charset?: string\n comment?: string\n dev?: number\n ino?: number\n nlink?: number\n}\n\nexport class Header implements HeaderData {\n cksumValid: boolean = false\n needPax: boolean = false\n nullBlock: boolean = false\n\n block?: Buffer\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n #type: EntryTypeCode | 'Unsupported' = 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj: number = 0\n devmin: number = 0\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n charset?: string\n comment?: string\n\n constructor(\n data?: Buffer | HeaderData,\n off: number = 0,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (Buffer.isBuffer(data)) {\n this.decode(data, off || 0, ex, gex)\n } else if (data) {\n this.#slurp(data)\n }\n }\n\n decode(\n buf: Buffer,\n off: number,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (!off) {\n off = 0\n }\n\n if (!buf || !(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n this.path = decString(buf, off, 100)\n this.mode = decNumber(buf, off + 100, 8)\n this.uid = decNumber(buf, off + 108, 8)\n this.gid = decNumber(buf, off + 116, 8)\n this.size = decNumber(buf, off + 124, 12)\n this.mtime = decDate(buf, off + 136, 12)\n this.cksum = decNumber(buf, off + 148, 12)\n\n // if we have extended or global extended headers, apply them now\n // See https://github.com/npm/node-tar/pull/187\n // Apply global before local, so it overrides\n if (gex) this.#slurp(gex, true)\n if (ex) this.#slurp(ex)\n\n // old tar versions marked dirs as a file with a trailing /\n const t = decString(buf, off + 156, 1)\n if (types.isCode(t)) {\n this.#type = t || '0'\n }\n if (this.#type === '0' && this.path.slice(-1) === '/') {\n this.#type = '5'\n }\n\n // tar implementations sometimes incorrectly put the stat(dir).size\n // as the size in the tarball, even though Directory entries are\n // not able to have any body at all. In the very rare chance that\n // it actually DOES have a body, we weren't going to do anything with\n // it anyway, and it'll just be a warning about an invalid header.\n if (this.#type === '5') {\n this.size = 0\n }\n\n this.linkpath = decString(buf, off + 157, 100)\n if (\n buf.subarray(off + 257, off + 265).toString() ===\n 'ustar\\u000000'\n ) {\n this.uname = decString(buf, off + 265, 32)\n this.gname = decString(buf, off + 297, 32)\n /* c8 ignore start */\n this.devmaj = decNumber(buf, off + 329, 8) ?? 0\n this.devmin = decNumber(buf, off + 337, 8) ?? 0\n /* c8 ignore stop */\n if (buf[off + 475] !== 0) {\n // definitely a prefix, definitely >130 chars.\n const prefix = decString(buf, off + 345, 155)\n this.path = prefix + '/' + this.path\n } else {\n const prefix = decString(buf, off + 345, 130)\n if (prefix) {\n this.path = prefix + '/' + this.path\n }\n this.atime = decDate(buf, off + 476, 12)\n this.ctime = decDate(buf, off + 488, 12)\n }\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksumValid = sum === this.cksum\n if (this.cksum === undefined && sum === 8 * 0x20) {\n this.nullBlock = true\n }\n }\n\n #slurp(ex: HeaderData, gex: boolean = false) {\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex) ||\n (k === 'linkpath' && gex) ||\n k === 'global'\n )\n }),\n ),\n )\n }\n\n encode(buf?: Buffer, off: number = 0) {\n if (!buf) {\n buf = this.block = Buffer.alloc(512)\n }\n\n if (this.#type === 'Unsupported') {\n this.#type = '0'\n }\n\n if (!(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n const prefixSize = this.ctime || this.atime ? 130 : 155\n const split = splitPrefix(this.path || '', prefixSize)\n const path = split[0]\n const prefix = split[1]\n this.needPax = !!split[2]\n\n this.needPax = encString(buf, off, 100, path) || this.needPax\n this.needPax =\n encNumber(buf, off + 100, 8, this.mode) || this.needPax\n this.needPax =\n encNumber(buf, off + 108, 8, this.uid) || this.needPax\n this.needPax =\n encNumber(buf, off + 116, 8, this.gid) || this.needPax\n this.needPax =\n encNumber(buf, off + 124, 12, this.size) || this.needPax\n this.needPax =\n encDate(buf, off + 136, 12, this.mtime) || this.needPax\n buf[off + 156] = this.#type.charCodeAt(0)\n this.needPax =\n encString(buf, off + 157, 100, this.linkpath) || this.needPax\n buf.write('ustar\\u000000', off + 257, 8)\n this.needPax =\n encString(buf, off + 265, 32, this.uname) || this.needPax\n this.needPax =\n encString(buf, off + 297, 32, this.gname) || this.needPax\n this.needPax =\n encNumber(buf, off + 329, 8, this.devmaj) || this.needPax\n this.needPax =\n encNumber(buf, off + 337, 8, this.devmin) || this.needPax\n this.needPax =\n encString(buf, off + 345, prefixSize, prefix) || this.needPax\n if (buf[off + 475] !== 0) {\n this.needPax =\n encString(buf, off + 345, 155, prefix) || this.needPax\n } else {\n this.needPax =\n encString(buf, off + 345, 130, prefix) || this.needPax\n this.needPax =\n encDate(buf, off + 476, 12, this.atime) || this.needPax\n this.needPax =\n encDate(buf, off + 488, 12, this.ctime) || this.needPax\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksum = sum\n encNumber(buf, off + 148, 8, this.cksum)\n this.cksumValid = true\n\n return this.needPax\n }\n\n get type(): EntryTypeName {\n return (\n this.#type === 'Unsupported' ?\n this.#type\n : types.name.get(this.#type)) as EntryTypeName\n }\n\n get typeKey(): EntryTypeCode | 'Unsupported' {\n return this.#type\n }\n\n set type(type: EntryTypeCode | EntryTypeName | 'Unsupported') {\n const c = String(types.code.get(type as EntryTypeName))\n if (types.isCode(c) || c === 'Unsupported') {\n this.#type = c\n } else if (types.isCode(type)) {\n this.#type = type\n } else {\n throw new TypeError('invalid entry type: ' + type)\n }\n }\n}\n\nconst splitPrefix = (\n p: string,\n prefixSize: number,\n): [string, string, boolean] => {\n const pathSize = 100\n let pp = p\n let prefix = ''\n let ret: undefined | [string, string, boolean] = undefined\n const root = pathModule.parse(p).root || '.'\n\n if (Buffer.byteLength(pp) < pathSize) {\n ret = [pp, prefix, false]\n } else {\n // first set prefix to the dir, and path to the base\n prefix = pathModule.dirname(pp)\n pp = pathModule.basename(pp)\n\n do {\n if (\n Buffer.byteLength(pp) <= pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // both fit!\n ret = [pp, prefix, false]\n } else if (\n Buffer.byteLength(pp) > pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // prefix fits in prefix, but path doesn't fit in path\n ret = [pp.slice(0, pathSize - 1), prefix, true]\n } else {\n // make path take a bit from prefix\n pp = pathModule.join(pathModule.basename(prefix), pp)\n prefix = pathModule.dirname(prefix)\n }\n } while (prefix !== root && ret === undefined)\n\n // at this point, found no resolution, just truncate\n if (!ret) {\n ret = [p.slice(0, pathSize - 1), '', true]\n }\n }\n return ret\n}\n\nconst decString = (buf: Buffer, off: number, size: number) =>\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*/, '')\n\nconst decDate = (buf: Buffer, off: number, size: number) =>\n numToDate(decNumber(buf, off, size))\n\nconst numToDate = (num?: number) =>\n num === undefined ? undefined : new Date(num * 1000)\n\nconst decNumber = (buf: Buffer, off: number, size: number) =>\n Number(buf[off]) & 0x80 ?\n large.parse(buf.subarray(off, off + size))\n : decSmallNumber(buf, off, size)\n\nconst nanUndef = (value: number) => (isNaN(value) ? undefined : value)\n\nconst decSmallNumber = (buf: Buffer, off: number, size: number) =>\n nanUndef(\n parseInt(\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*$/, '')\n .trim(),\n 8,\n ),\n )\n\n// the maximum encodable as a null-terminated octal, by field size\nconst MAXNUM = {\n 12: 0o77777777777,\n 8: 0o7777777,\n}\n\nconst encNumber = (\n buf: Buffer,\n off: number,\n size: 12 | 8,\n num?: number,\n) =>\n num === undefined ? false\n : num > MAXNUM[size] || num < 0 ?\n (large.encode(num, buf.subarray(off, off + size)), true)\n : (encSmallNumber(buf, off, size, num), false)\n\nconst encSmallNumber = (\n buf: Buffer,\n off: number,\n size: number,\n num: number,\n) => buf.write(octalString(num, size), off, size, 'ascii')\n\nconst octalString = (num: number, size: number) =>\n padOctal(Math.floor(num).toString(8), size)\n\nconst padOctal = (str: string, size: number) =>\n (str.length === size - 1 ?\n str\n : new Array(size - str.length - 1).join('0') + str + ' ') + '\\0'\n\nconst encDate = (\n buf: Buffer,\n off: number,\n size: 8 | 12,\n date?: Date,\n) =>\n date === undefined ? false : (\n encNumber(buf, off, size, date.getTime() / 1000)\n )\n\n// enough to fill the longest string we've got\nconst NULLS = new Array(156).join('\\0')\n// pad with nulls, return true if it's longer or non-ascii\nconst encString = (\n buf: Buffer,\n off: number,\n size: number,\n str?: string,\n) =>\n str === undefined ? false : (\n (buf.write(str + NULLS, off, size, 'utf8'),\n str.length !== Buffer.byteLength(str) || str.length > size)\n )\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.d.ts b/node_modules/tar/dist/esm/index.d.ts new file mode 100644 index 0000000..a582123 --- /dev/null +++ b/node_modules/tar/dist/esm/index.d.ts @@ -0,0 +1,20 @@ +export { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js'; +export * from './create.js'; +export { create as c } from './create.js'; +export * from './extract.js'; +export { extract as x } from './extract.js'; +export * from './header.js'; +export * from './list.js'; +export { list as t } from './list.js'; +export * from './pack.js'; +export * from './parse.js'; +export * from './pax.js'; +export * from './read-entry.js'; +export * from './replace.js'; +export { replace as r } from './replace.js'; +export * as types from './types.js'; +export * from './unpack.js'; +export * from './update.js'; +export { update as u } from './update.js'; +export * from './write-entry.js'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.d.ts.map b/node_modules/tar/dist/esm/index.d.ts.map new file mode 100644 index 0000000..71d3bed --- /dev/null +++ b/node_modules/tar/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAErC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.js b/node_modules/tar/dist/esm/index.js new file mode 100644 index 0000000..1bac641 --- /dev/null +++ b/node_modules/tar/dist/esm/index.js @@ -0,0 +1,20 @@ +export * from './create.js'; +export { create as c } from './create.js'; +export * from './extract.js'; +export { extract as x } from './extract.js'; +export * from './header.js'; +export * from './list.js'; +export { list as t } from './list.js'; +// classes +export * from './pack.js'; +export * from './parse.js'; +export * from './pax.js'; +export * from './read-entry.js'; +export * from './replace.js'; +export { replace as r } from './replace.js'; +export * as types from './types.js'; +export * from './unpack.js'; +export * from './update.js'; +export { update as u } from './update.js'; +export * from './write-entry.js'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/index.js.map b/node_modules/tar/dist/esm/index.js.map new file mode 100644 index 0000000..c9923d7 --- /dev/null +++ b/node_modules/tar/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AACrC,UAAU;AACV,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA","sourcesContent":["export {\n type TarOptionsWithAliasesAsync,\n type TarOptionsWithAliasesAsyncFile,\n type TarOptionsWithAliasesAsyncNoFile,\n type TarOptionsWithAliasesSyncNoFile,\n type TarOptionsWithAliases,\n type TarOptionsWithAliasesFile,\n type TarOptionsWithAliasesSync,\n type TarOptionsWithAliasesSyncFile,\n} from './options.js'\n\nexport * from './create.js'\nexport { create as c } from './create.js'\nexport * from './extract.js'\nexport { extract as x } from './extract.js'\nexport * from './header.js'\nexport * from './list.js'\nexport { list as t } from './list.js'\n// classes\nexport * from './pack.js'\nexport * from './parse.js'\nexport * from './pax.js'\nexport * from './read-entry.js'\nexport * from './replace.js'\nexport { replace as r } from './replace.js'\nexport * as types from './types.js'\nexport * from './unpack.js'\nexport * from './update.js'\nexport { update as u } from './update.js'\nexport * from './write-entry.js'\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.d.ts b/node_modules/tar/dist/esm/large-numbers.d.ts new file mode 100644 index 0000000..5812c6e --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.d.ts @@ -0,0 +1,4 @@ +/// +export declare const encode: (num: number, buf: Buffer) => Buffer; +export declare const parse: (buf: Buffer) => number; +//# sourceMappingURL=large-numbers.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.d.ts.map b/node_modules/tar/dist/esm/large-numbers.d.ts.map new file mode 100644 index 0000000..6a6d97d --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.d.ts","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":";AAGA,eAAO,MAAM,MAAM,QAAS,MAAM,OAAO,MAAM,WAa9C,CAAA;AA6BD,eAAO,MAAM,KAAK,QAAS,MAAM,WAmBhC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.js b/node_modules/tar/dist/esm/large-numbers.js new file mode 100644 index 0000000..4f2f7e5 --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.js @@ -0,0 +1,94 @@ +// Tar can encode large and negative numbers using a leading byte of +// 0xff for negative, and 0x80 for positive. +export const encode = (num, buf) => { + if (!Number.isSafeInteger(num)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('cannot encode number outside of javascript safe integer range'); + } + else if (num < 0) { + encodeNegative(num, buf); + } + else { + encodePositive(num, buf); + } + return buf; +}; +const encodePositive = (num, buf) => { + buf[0] = 0x80; + for (var i = buf.length; i > 1; i--) { + buf[i - 1] = num & 0xff; + num = Math.floor(num / 0x100); + } +}; +const encodeNegative = (num, buf) => { + buf[0] = 0xff; + var flipped = false; + num = num * -1; + for (var i = buf.length; i > 1; i--) { + var byte = num & 0xff; + num = Math.floor(num / 0x100); + if (flipped) { + buf[i - 1] = onesComp(byte); + } + else if (byte === 0) { + buf[i - 1] = 0; + } + else { + flipped = true; + buf[i - 1] = twosComp(byte); + } + } +}; +export const parse = (buf) => { + const pre = buf[0]; + const value = pre === 0x80 ? pos(buf.subarray(1, buf.length)) + : pre === 0xff ? twos(buf) + : null; + if (value === null) { + throw Error('invalid base256 encoding'); + } + if (!Number.isSafeInteger(value)) { + // The number is so large that javascript cannot represent it with integer + // precision. + throw Error('parsed number outside of javascript safe integer range'); + } + return value; +}; +const twos = (buf) => { + var len = buf.length; + var sum = 0; + var flipped = false; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + var f; + if (flipped) { + f = onesComp(byte); + } + else if (byte === 0) { + f = byte; + } + else { + flipped = true; + f = twosComp(byte); + } + if (f !== 0) { + sum -= f * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const pos = (buf) => { + var len = buf.length; + var sum = 0; + for (var i = len - 1; i > -1; i--) { + var byte = Number(buf[i]); + if (byte !== 0) { + sum += byte * Math.pow(256, len - i - 1); + } + } + return sum; +}; +const onesComp = (byte) => (0xff ^ byte) & 0xff; +const twosComp = (byte) => ((0xff ^ byte) + 1) & 0xff; +//# sourceMappingURL=large-numbers.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/large-numbers.js.map b/node_modules/tar/dist/esm/large-numbers.js.map new file mode 100644 index 0000000..86bb941 --- /dev/null +++ b/node_modules/tar/dist/esm/large-numbers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"large-numbers.js","sourceRoot":"","sources":["../../src/large-numbers.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,4CAA4C;AAE5C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EA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EvD,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAA","sourcesContent":["// Tar can encode large and negative numbers using a leading byte of\n// 0xff for negative, and 0x80 for positive.\n\nexport const encode = (num: number, buf: Buffer) => {\n if (!Number.isSafeInteger(num)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'cannot encode number outside of javascript safe integer range',\n )\n } else if (num < 0) {\n encodeNegative(num, buf)\n } else {\n encodePositive(num, buf)\n }\n return buf\n}\n\nconst encodePositive = (num: number, buf: Buffer) => {\n buf[0] = 0x80\n\n for (var i = buf.length; i > 1; i--) {\n buf[i - 1] = num & 0xff\n num = Math.floor(num / 0x100)\n }\n}\n\nconst encodeNegative = (num: number, buf: Buffer) => {\n buf[0] = 0xff\n var flipped = false\n num = num * -1\n for (var i = buf.length; i > 1; i--) {\n var byte = num & 0xff\n num = Math.floor(num / 0x100)\n if (flipped) {\n buf[i - 1] = onesComp(byte)\n } else if (byte === 0) {\n buf[i - 1] = 0\n } else {\n flipped = true\n buf[i - 1] = twosComp(byte)\n }\n }\n}\n\nexport const parse = (buf: Buffer) => {\n const pre = buf[0]\n const value =\n pre === 0x80 ? pos(buf.subarray(1, buf.length))\n : pre === 0xff ? twos(buf)\n : null\n if (value === null) {\n throw Error('invalid base256 encoding')\n }\n\n if (!Number.isSafeInteger(value)) {\n // The number is so large that javascript cannot represent it with integer\n // precision.\n throw Error(\n 'parsed number outside of javascript safe integer range',\n )\n }\n\n return value\n}\n\nconst twos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n var flipped = false\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n var f\n if (flipped) {\n f = onesComp(byte)\n } else if (byte === 0) {\n f = byte\n } else {\n flipped = true\n f = twosComp(byte)\n }\n if (f !== 0) {\n sum -= f * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst pos = (buf: Buffer) => {\n var len = buf.length\n var sum = 0\n for (var i = len - 1; i > -1; i--) {\n var byte = Number(buf[i])\n if (byte !== 0) {\n sum += byte * Math.pow(256, len - i - 1)\n }\n }\n return sum\n}\n\nconst onesComp = (byte: number) => (0xff ^ byte) & 0xff\n\nconst twosComp = (byte: number) => ((0xff ^ byte) + 1) & 0xff\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.d.ts b/node_modules/tar/dist/esm/list.d.ts new file mode 100644 index 0000000..890a11b --- /dev/null +++ b/node_modules/tar/dist/esm/list.d.ts @@ -0,0 +1,7 @@ +import { TarOptions } from './options.js'; +import { Parser } from './parse.js'; +export declare const filesFilter: (opt: TarOptions, files: string[]) => void; +export declare const list: import("./make-command.js").TarCommand; +//# sourceMappingURL=list.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.d.ts.map b/node_modules/tar/dist/esm/list.d.ts.map new file mode 100644 index 0000000..b45ab2c --- /dev/null +++ b/node_modules/tar/dist/esm/list.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EAGX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAgBnC,eAAO,MAAM,WAAW,QAAS,UAAU,SAAS,MAAM,EAAE,SA4B3D,CAAA;AA4DD,eAAO,MAAM,IAAI;UAG4B,IAAI;EAMhD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.js b/node_modules/tar/dist/esm/list.js new file mode 100644 index 0000000..f490684 --- /dev/null +++ b/node_modules/tar/dist/esm/list.js @@ -0,0 +1,106 @@ +// tar -t +import * as fsm from '@isaacs/fs-minipass'; +import fs from 'node:fs'; +import { dirname, parse } from 'path'; +import { makeCommand } from './make-command.js'; +import { Parser } from './parse.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +const onReadEntryFunction = (opt) => { + const onReadEntry = opt.onReadEntry; + opt.onReadEntry = + onReadEntry ? + e => { + onReadEntry(e); + e.resume(); + } + : e => e.resume(); +}; +// construct a filter that limits the file entries listed +// include child entries if a dir is included +export const filesFilter = (opt, files) => { + const map = new Map(files.map(f => [stripTrailingSlashes(f), true])); + const filter = opt.filter; + const mapHas = (file, r = '') => { + const root = r || parse(file).root || '.'; + let ret; + if (file === root) + ret = false; + else { + const m = map.get(file); + if (m !== undefined) { + ret = m; + } + else { + ret = mapHas(dirname(file), root); + } + } + map.set(file, ret); + return ret; + }; + opt.filter = + filter ? + (file, entry) => filter(file, entry) && mapHas(stripTrailingSlashes(file)) + : file => mapHas(stripTrailingSlashes(file)); +}; +const listFileSync = (opt) => { + const p = new Parser(opt); + const file = opt.file; + let fd; + try { + const stat = fs.statSync(file); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + if (stat.size < readSize) { + p.end(fs.readFileSync(file)); + } + else { + let pos = 0; + const buf = Buffer.allocUnsafe(readSize); + fd = fs.openSync(file, 'r'); + while (pos < stat.size) { + const bytesRead = fs.readSync(fd, buf, 0, readSize, pos); + pos += bytesRead; + p.write(buf.subarray(0, bytesRead)); + } + p.end(); + } + } + finally { + if (typeof fd === 'number') { + try { + fs.closeSync(fd); + /* c8 ignore next */ + } + catch (er) { } + } + } +}; +const listFile = (opt, _files) => { + const parse = new Parser(opt); + const readSize = opt.maxReadSize || 16 * 1024 * 1024; + const file = opt.file; + const p = new Promise((resolve, reject) => { + parse.on('error', reject); + parse.on('end', resolve); + fs.stat(file, (er, stat) => { + if (er) { + reject(er); + } + else { + const stream = new fsm.ReadStream(file, { + readSize: readSize, + size: stat.size, + }); + stream.on('error', reject); + stream.pipe(parse); + } + }); + }); + return p; +}; +export const list = makeCommand(listFileSync, listFile, opt => new Parser(opt), opt => new Parser(opt), (opt, files) => { + if (files?.length) + filesFilter(opt, files); + if (!opt.noResume) + onReadEntryFunction(opt); +}); +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/list.js.map b/node_modules/tar/dist/esm/list.js.map new file mode 100644 index 0000000..9012c4a --- /dev/null +++ b/node_modules/tar/dist/esm/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/list.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAM/C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,mBAAmB,GAAG,CAAC,GAAe,EAAE,EAAE;IAC9C,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;IACnC,GAAG,CAAC,WAAW;QACb,WAAW,CAAC,CAAC;YACX,CAAC,CAAC,EAAE;gBACF,WAAW,CAAC,CAAC,CAAC,CAAA;gBACd,CAAC,CAAC,MAAM,EAAE,CAAA;YACZ,CAAC;YACH,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AACrB,CAAC,CAAA;AAED,yDAAyD;AACzD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAe,EAAE,KAAe,EAAE,EAAE;IAC9D,MAAM,GAAG,GAAG,IAAI,GAAG,CACjB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAChD,CAAA;IACD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IAEzB,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,EAAW,EAAE;QACvD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C,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QACzB,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;QAExB,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE;YACzB,IAAI,EAAE,EAAE,CAAC;gBACP,MAAM,CAAC,EAAE,CAAC,CAAA;YACZ,CAAC;iBAAM,CAAC;gBACN,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;oBACtC,QAAQ,EAAE,QAAQ;oBAClB,IAAI,EAAE,IAAI,CAAC,IAAI;iBAChB,CAAC,CAAA;gBACF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;gBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACpB,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IACF,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAC7B,YAAY,EACZ,QAAQ,EACR,GAAG,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAA4B,EACjD,GAAG,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,EACtB,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IACb,IAAI,KAAK,EAAE,MAAM;QAAE,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAA;IAC1C,IAAI,CAAC,GAAG,CAAC,QAAQ;QAAE,mBAAmB,CAAC,GAAG,CAAC,CAAA;AAC7C,CAAC,CACF,CAAA","sourcesContent":["// tar -t\nimport * as fsm from '@isaacs/fs-minipass'\nimport fs from 'node:fs'\nimport { dirname, parse } from 'path'\nimport { makeCommand } from './make-command.js'\nimport {\n TarOptions,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Parser } from './parse.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst onReadEntryFunction = (opt: TarOptions) => {\n const onReadEntry = opt.onReadEntry\n opt.onReadEntry =\n onReadEntry ?\n e => {\n onReadEntry(e)\n e.resume()\n }\n : e => e.resume()\n}\n\n// construct a filter that limits the file entries listed\n// include child entries if a dir is included\nexport const filesFilter = (opt: TarOptions, files: string[]) => {\n const map = new Map(\n files.map(f => [stripTrailingSlashes(f), true]),\n )\n const filter = opt.filter\n\n const mapHas = (file: string, r: string = ''): boolean => {\n const root = r || parse(file).root || '.'\n let ret: boolean\n if (file === root) ret = false\n else {\n const m = map.get(file)\n if (m !== undefined) {\n ret = m\n } else {\n ret = mapHas(dirname(file), root)\n }\n }\n\n map.set(file, ret)\n return ret\n }\n\n opt.filter =\n filter ?\n (file, entry) =>\n filter(file, entry) && mapHas(stripTrailingSlashes(file))\n : file => mapHas(stripTrailingSlashes(file))\n}\n\nconst listFileSync = (opt: TarOptionsSyncFile) => {\n const p = new Parser(opt)\n const file = opt.file\n let fd\n try {\n const stat = fs.statSync(file)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n if (stat.size < readSize) {\n p.end(fs.readFileSync(file))\n } else {\n let pos = 0\n const buf = Buffer.allocUnsafe(readSize)\n fd = fs.openSync(file, 'r')\n while (pos < stat.size) {\n const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)\n pos += bytesRead\n p.write(buf.subarray(0, bytesRead))\n }\n p.end()\n }\n } finally {\n if (typeof fd === 'number') {\n try {\n fs.closeSync(fd)\n /* c8 ignore next */\n } catch (er) {}\n }\n }\n}\n\nconst listFile = (\n opt: TarOptionsFile,\n _files: string[],\n): Promise => {\n const parse = new Parser(opt)\n const readSize = opt.maxReadSize || 16 * 1024 * 1024\n\n const file = opt.file\n const p = new Promise((resolve, reject) => {\n parse.on('error', reject)\n parse.on('end', resolve)\n\n fs.stat(file, (er, stat) => {\n if (er) {\n reject(er)\n } else {\n const stream = new fsm.ReadStream(file, {\n readSize: readSize,\n size: stat.size,\n })\n stream.on('error', reject)\n stream.pipe(parse)\n }\n })\n })\n return p\n}\n\nexport const list = makeCommand(\n listFileSync,\n listFile,\n opt => new Parser(opt) as Parser & { sync: true },\n opt => new Parser(opt),\n (opt, files) => {\n if (files?.length) filesFilter(opt, files)\n if (!opt.noResume) onReadEntryFunction(opt)\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.d.ts b/node_modules/tar/dist/esm/make-command.d.ts new file mode 100644 index 0000000..cd88929 --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.d.ts @@ -0,0 +1,49 @@ +import { TarOptions, TarOptionsAsyncFile, TarOptionsAsyncNoFile, TarOptionsSyncFile, TarOptionsSyncNoFile, TarOptionsWithAliases, TarOptionsWithAliasesAsync, TarOptionsWithAliasesAsyncFile, TarOptionsWithAliasesAsyncNoFile, TarOptionsWithAliasesFile, TarOptionsWithAliasesNoFile, TarOptionsWithAliasesSync, TarOptionsWithAliasesSyncFile, TarOptionsWithAliasesSyncNoFile } from './options.js'; +export type CB = (er?: Error) => any; +export type TarCommand = { + (): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass; + (entries: string[]): AsyncClass; + (opt: TarOptionsWithAliasesAsyncNoFile, entries: string[]): AsyncClass; +} & { + (opt: TarOptionsWithAliasesSyncNoFile): SyncClass; + (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass; +} & { + (opt: TarOptionsWithAliasesAsyncFile): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[]): Promise; + (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsyncFile, entries: string[], cb: CB): Promise; +} & { + (opt: TarOptionsWithAliasesSyncFile): void; + (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void; +} & { + (opt: TarOptionsWithAliasesSync): typeof opt extends (TarOptionsWithAliasesFile) ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; + (opt: TarOptionsWithAliasesSync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? void : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass : void | SyncClass; +} & { + (opt: TarOptionsWithAliasesAsync): typeof opt extends (TarOptionsWithAliasesFile) ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, entries: string[]): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass : Promise | AsyncClass; + (opt: TarOptionsWithAliasesAsync, cb: CB): Promise; + (opt: TarOptionsWithAliasesAsync, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesFile ? Promise : typeof opt extends TarOptionsWithAliasesNoFile ? never : Promise; +} & { + (opt: TarOptionsWithAliasesFile): Promise | void; + (opt: TarOptionsWithAliasesFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise | void; + (opt: TarOptionsWithAliasesFile, cb: CB): Promise; + (opt: TarOptionsWithAliasesFile, entries: string[], cb: CB): typeof opt extends TarOptionsWithAliasesSync ? never : typeof opt extends TarOptionsWithAliasesAsync ? Promise : Promise; +} & { + (opt: TarOptionsWithAliasesNoFile): typeof opt extends (TarOptionsWithAliasesSync) ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; + (opt: TarOptionsWithAliasesNoFile, entries: string[]): typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass; +} & { + (opt: TarOptionsWithAliases): typeof opt extends (TarOptionsWithAliasesFile) ? typeof opt extends TarOptionsWithAliasesSync ? void : typeof opt extends TarOptionsWithAliasesAsync ? Promise : void | Promise : typeof opt extends TarOptionsWithAliasesNoFile ? typeof opt extends TarOptionsWithAliasesSync ? SyncClass : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass : SyncClass | AsyncClass : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass | Promise : SyncClass | void | AsyncClass | Promise; +} & { + syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void; + asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise; + syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass; + asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass; + validate?: (opt: TarOptions, entries?: string[]) => void; +}; +export declare const makeCommand: (syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void, asyncFile: (opt: TarOptionsAsyncFile, entries: string[], cb?: CB) => Promise, syncNoFile: (opt: TarOptionsSyncNoFile, entries: string[]) => SyncClass, asyncNoFile: (opt: TarOptionsAsyncNoFile, entries: string[]) => AsyncClass, validate?: (opt: TarOptions, entries?: string[]) => void) => TarCommand; +//# sourceMappingURL=make-command.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.d.ts.map b/node_modules/tar/dist/esm/make-command.d.ts.map new file mode 100644 index 0000000..7cb3c16 --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command.d.ts","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,UAAU,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,GAAG,CAAA;AAEpC,MAAM,MAAM,UAAU,CACpB,UAAU,EACV,SA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AAkB,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC9D,SAAS,EAAE,CACT,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,MAAM,EAAE,EACjB,EAAE,CAAC,EAAE,EAAE,KACJ,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,UAAU,EAAE,CACV,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,MAAM,EAAE,KACd,SAAS,CAAA;IACd,WAAW,EAAE,CACX,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,MAAM,EAAE,KACd,UAAU,CAAA;IACf,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACzD,CAAA;AAED,eAAO,MAAM,WAAW;UAEI,IAAI;aAEpB,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,aACnD,CACT,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,MAAM,EAAE,EACjB,EAAE,CAAC,EAAE,EAAE,KACJ,QAAQ,IAAI,CAAC,cACN,CACV,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,MAAM,EAAE,KACd,SAAS,eACD,CACX,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,MAAM,EAAE,KACd,UAAU,aACJ,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,KACvD,WAAW,UAAU,EAAE,SAAS,CAmElC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.js b/node_modules/tar/dist/esm/make-command.js new file mode 100644 index 0000000..f2f737b --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.js @@ -0,0 +1,57 @@ +import { dealias, isAsyncFile, isAsyncNoFile, isSyncFile, isSyncNoFile, } from './options.js'; +export const makeCommand = (syncFile, asyncFile, syncNoFile, asyncNoFile, validate) => { + return Object.assign((opt_ = [], entries, cb) => { + if (Array.isArray(opt_)) { + entries = opt_; + opt_ = {}; + } + if (typeof entries === 'function') { + cb = entries; + entries = undefined; + } + if (!entries) { + entries = []; + } + else { + entries = Array.from(entries); + } + const opt = dealias(opt_); + validate?.(opt, entries); + if (isSyncFile(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncFile(opt, entries); + } + else if (isAsyncFile(opt)) { + const p = asyncFile(opt, entries); + // weirdness to make TS happy + const c = cb ? cb : undefined; + return c ? p.then(() => c(), c) : p; + } + else if (isSyncNoFile(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback not supported for sync tar functions'); + } + return syncNoFile(opt, entries); + } + else if (isAsyncNoFile(opt)) { + if (typeof cb === 'function') { + throw new TypeError('callback only supported with file option'); + } + return asyncNoFile(opt, entries); + /* c8 ignore start */ + } + else { + throw new Error('impossible options??'); + } + /* c8 ignore stop */ + }, { + syncFile, + asyncFile, + syncNoFile, + asyncNoFile, + validate, + }); +}; +//# sourceMappingURL=make-command.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/make-command.js.map b/node_modules/tar/dist/esm/make-command.js.map new file mode 100644 index 0000000..de11ae4 --- /dev/null +++ b/node_modules/tar/dist/esm/make-command.js.map @@ -0,0 +1 @@ +{"version":3,"file":"make-command.js","sourceRoot":"","sources":["../../src/make-command.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,WAAW,EACX,aAAa,EACb,UAAU,EACV,YAAY,GAeb,MAAM,cAAc,CAAA;AA2IrB,MAAM,CAAC,MAAM,WAAW,GAAG,CAIzB,QAA8D,EAC9D,SAIkB,EAClB,UAGc,EACd,WAGe,EACf,QAAwD,EACrB,EAAE;IACrC,OAAO,MAAM,CAAC,MAAM,CAClB,CACE,OAAyC,EAAE,EAC3C,OAAuB,EACvB,EAAO,EACP,EAAE;QACF,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,C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U,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QACjC,CAAC;aAAM,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9B,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC7B,MAAM,IAAI,SAAS,CACjB,0CAA0C,CAC3C,CAAA;YACH,CAAC;YACD,OAAO,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;YAChC,qBAAqB;QACvB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAA;QACzC,CAAC;QACD,oBAAoB;IACtB,CAAC,EACD;QACE,QAAQ;QACR,SAAS;QACT,UAAU;QACV,WAAW;QACX,QAAQ;KACT,CACmC,CAAA;AACxC,CAAC,CAAA","sourcesContent":["import {\n dealias,\n isAsyncFile,\n isAsyncNoFile,\n isSyncFile,\n isSyncNoFile,\n TarOptions,\n TarOptionsAsyncFile,\n TarOptionsAsyncNoFile,\n TarOptionsSyncFile,\n TarOptionsSyncNoFile,\n TarOptionsWithAliases,\n TarOptionsWithAliasesAsync,\n TarOptionsWithAliasesAsyncFile,\n TarOptionsWithAliasesAsyncNoFile,\n TarOptionsWithAliasesFile,\n TarOptionsWithAliasesNoFile,\n TarOptionsWithAliasesSync,\n TarOptionsWithAliasesSyncFile,\n TarOptionsWithAliasesSyncNoFile,\n} from './options.js'\n\nexport type CB = (er?: Error) => any\n\nexport type TarCommand<\n AsyncClass,\n SyncClass extends { sync: true },\n> = {\n // async and no file specified\n (): AsyncClass\n (opt: TarOptionsWithAliasesAsyncNoFile): AsyncClass\n (entries: string[]): AsyncClass\n (\n opt: TarOptionsWithAliasesAsyncNoFile,\n entries: string[],\n ): AsyncClass\n} & {\n // sync and no file\n (opt: TarOptionsWithAliasesSyncNoFile): SyncClass\n (opt: TarOptionsWithAliasesSyncNoFile, entries: string[]): SyncClass\n} & {\n // async and file\n (opt: TarOptionsWithAliasesAsyncFile): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n ): Promise\n (opt: TarOptionsWithAliasesAsyncFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsyncFile,\n entries: string[],\n cb: CB,\n ): Promise\n} & {\n // sync and file\n (opt: TarOptionsWithAliasesSyncFile): void\n (opt: TarOptionsWithAliasesSyncFile, entries: string[]): void\n} & {\n // sync, maybe file\n (opt: TarOptionsWithAliasesSync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n (\n opt: TarOptionsWithAliasesSync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? void\n : typeof opt extends TarOptionsWithAliasesNoFile ? SyncClass\n : void | SyncClass\n} & {\n // async, maybe file\n (opt: TarOptionsWithAliasesAsync): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? AsyncClass\n : Promise | AsyncClass\n (opt: TarOptionsWithAliasesAsync, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesAsync,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesFile ? Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ? never\n : Promise\n} & {\n // maybe sync, file\n (opt: TarOptionsWithAliasesFile): Promise | void\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise | void\n (opt: TarOptionsWithAliasesFile, cb: CB): Promise\n (\n opt: TarOptionsWithAliasesFile,\n entries: string[],\n cb: CB,\n ): typeof opt extends TarOptionsWithAliasesSync ? never\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : Promise\n} & {\n // maybe sync, no file\n (opt: TarOptionsWithAliasesNoFile): typeof opt extends (\n TarOptionsWithAliasesSync\n ) ?\n SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n (\n opt: TarOptionsWithAliasesNoFile,\n entries: string[],\n ): typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n} & {\n // maybe sync, maybe file\n (opt: TarOptionsWithAliases): typeof opt extends (\n TarOptionsWithAliasesFile\n ) ?\n typeof opt extends TarOptionsWithAliasesSync ? void\n : typeof opt extends TarOptionsWithAliasesAsync ? Promise\n : void | Promise\n : typeof opt extends TarOptionsWithAliasesNoFile ?\n typeof opt extends TarOptionsWithAliasesSync ? SyncClass\n : typeof opt extends TarOptionsWithAliasesAsync ? AsyncClass\n : SyncClass | AsyncClass\n : typeof opt extends TarOptionsWithAliasesSync ? SyncClass | void\n : typeof opt extends TarOptionsWithAliasesAsync ?\n AsyncClass | Promise\n : SyncClass | void | AsyncClass | Promise\n} & {\n // extras\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass\n validate?: (opt: TarOptions, entries?: string[]) => void\n}\n\nexport const makeCommand = <\n AsyncClass,\n SyncClass extends { sync: true },\n>(\n syncFile: (opt: TarOptionsSyncFile, entries: string[]) => void,\n asyncFile: (\n opt: TarOptionsAsyncFile,\n entries: string[],\n cb?: CB,\n ) => Promise,\n syncNoFile: (\n opt: TarOptionsSyncNoFile,\n entries: string[],\n ) => SyncClass,\n asyncNoFile: (\n opt: TarOptionsAsyncNoFile,\n entries: string[],\n ) => AsyncClass,\n validate?: (opt: TarOptions, entries?: string[]) => void,\n): TarCommand => {\n return Object.assign(\n (\n opt_: TarOptionsWithAliases | string[] = [],\n entries?: string[] | CB,\n cb?: CB,\n ) => {\n if (Array.isArray(opt_)) {\n entries = opt_\n opt_ = {}\n }\n\n if (typeof entries === 'function') {\n cb = entries\n entries = undefined\n }\n\n if (!entries) {\n entries = []\n } else {\n entries = Array.from(entries)\n }\n\n const opt = dealias(opt_)\n\n validate?.(opt, entries)\n\n if (isSyncFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncFile(opt, entries)\n } else if (isAsyncFile(opt)) {\n const p = asyncFile(opt, entries)\n // weirdness to make TS happy\n const c = cb ? cb : undefined\n return c ? p.then(() => c(), c) : p\n } else if (isSyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback not supported for sync tar functions',\n )\n }\n return syncNoFile(opt, entries)\n } else if (isAsyncNoFile(opt)) {\n if (typeof cb === 'function') {\n throw new TypeError(\n 'callback only supported with file option',\n )\n }\n return asyncNoFile(opt, entries)\n /* c8 ignore start */\n } else {\n throw new Error('impossible options??')\n }\n /* c8 ignore stop */\n },\n {\n syncFile,\n asyncFile,\n syncNoFile,\n asyncNoFile,\n validate,\n },\n ) as TarCommand\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.d.ts b/node_modules/tar/dist/esm/mkdir.d.ts new file mode 100644 index 0000000..b60c712 --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.d.ts @@ -0,0 +1,27 @@ +/// +import { CwdError } from './cwd-error.js'; +import { SymlinkError } from './symlink-error.js'; +export type MkdirOptions = { + uid?: number; + gid?: number; + processUid?: number; + processGid?: number; + umask?: number; + preserve: boolean; + unlink: boolean; + cache: Map; + cwd: string; + mode: number; +}; +export type MkdirError = NodeJS.ErrnoException | CwdError | SymlinkError; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +export declare const mkdir: (dir: string, opt: MkdirOptions, cb: (er?: null | MkdirError, made?: string) => void) => void | Promise; +export declare const mkdirSync: (dir: string, opt: MkdirOptions) => void | SymlinkError; +//# sourceMappingURL=mkdir.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.d.ts.map b/node_modules/tar/dist/esm/mkdir.d.ts.map new file mode 100644 index 0000000..8e0dbd3 --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.d.ts","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,UAAU,GAClB,MAAM,CAAC,cAAc,GACrB,QAAQ,GACR,YAAY,CAAA;AAyBhB;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,QACX,MAAM,OACN,YAAY,MACb,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,yBA0DpD,CAAA;AA+FD,eAAO,MAAM,SAAS,QAAS,MAAM,OAAO,YAAY,wBA+EvD,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.js b/node_modules/tar/dist/esm/mkdir.js new file mode 100644 index 0000000..13498ef --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.js @@ -0,0 +1,201 @@ +import { chownr, chownrSync } from 'chownr'; +import fs from 'fs'; +import { mkdirp, mkdirpSync } from 'mkdirp'; +import path from 'node:path'; +import { CwdError } from './cwd-error.js'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +import { SymlinkError } from './symlink-error.js'; +const cGet = (cache, key) => cache.get(normalizeWindowsPath(key)); +const cSet = (cache, key, val) => cache.set(normalizeWindowsPath(key), val); +const checkCwd = (dir, cb) => { + fs.stat(dir, (er, st) => { + if (er || !st.isDirectory()) { + er = new CwdError(dir, er?.code || 'ENOTDIR'); + } + cb(er); + }); +}; +/** + * Wrapper around mkdirp for tar's needs. + * + * The main purpose is to avoid creating directories if we know that + * they already exist (and track which ones exist for this purpose), + * and prevent entries from being extracted into symlinked folders, + * if `preservePaths` is not set. + */ +export const mkdir = (dir, opt, cb) => { + dir = normalizeWindowsPath(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o0700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = normalizeWindowsPath(opt.cwd); + const done = (er, created) => { + if (er) { + cb(er); + } + else { + cSet(cache, dir, true); + if (created && doChown) { + chownr(created, uid, gid, er => done(er)); + } + else if (needChmod) { + fs.chmod(dir, mode, cb); + } + else { + cb(); + } + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + return checkCwd(dir, done); + } + if (preserve) { + return mkdirp(dir, { mode }).then(made => done(null, made ?? undefined), // oh, ts + done); + } + const sub = normalizeWindowsPath(path.relative(cwd, dir)); + const parts = sub.split('/'); + mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done); +}; +const mkdir_ = (base, parts, mode, cache, unlink, cwd, created, cb) => { + if (!parts.length) { + return cb(null, created); + } + const p = parts.shift(); + const part = normalizeWindowsPath(path.resolve(base + '/' + p)); + if (cGet(cache, part)) { + return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); +}; +const onmkdir = (part, parts, mode, cache, unlink, cwd, created, cb) => (er) => { + if (er) { + fs.lstat(part, (statEr, st) => { + if (statEr) { + statEr.path = + statEr.path && normalizeWindowsPath(statEr.path); + cb(statEr); + } + else if (st.isDirectory()) { + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } + else if (unlink) { + fs.unlink(part, er => { + if (er) { + return cb(er); + } + fs.mkdir(part, mode, onmkdir(part, parts, mode, cache, unlink, cwd, created, cb)); + }); + } + else if (st.isSymbolicLink()) { + return cb(new SymlinkError(part, part + '/' + parts.join('/'))); + } + else { + cb(er); + } + }); + } + else { + created = created || part; + mkdir_(part, parts, mode, cache, unlink, cwd, created, cb); + } +}; +const checkCwdSync = (dir) => { + let ok = false; + let code = undefined; + try { + ok = fs.statSync(dir).isDirectory(); + } + catch (er) { + code = er?.code; + } + finally { + if (!ok) { + throw new CwdError(dir, code ?? 'ENOTDIR'); + } + } +}; +export const mkdirSync = (dir, opt) => { + dir = normalizeWindowsPath(dir); + // if there's any overlap between mask and mode, + // then we'll need an explicit chmod + /* c8 ignore next */ + const umask = opt.umask ?? 0o22; + const mode = opt.mode | 0o700; + const needChmod = (mode & umask) !== 0; + const uid = opt.uid; + const gid = opt.gid; + const doChown = typeof uid === 'number' && + typeof gid === 'number' && + (uid !== opt.processUid || gid !== opt.processGid); + const preserve = opt.preserve; + const unlink = opt.unlink; + const cache = opt.cache; + const cwd = normalizeWindowsPath(opt.cwd); + const done = (created) => { + cSet(cache, dir, true); + if (created && doChown) { + chownrSync(created, uid, gid); + } + if (needChmod) { + fs.chmodSync(dir, mode); + } + }; + if (cache && cGet(cache, dir) === true) { + return done(); + } + if (dir === cwd) { + checkCwdSync(cwd); + return done(); + } + if (preserve) { + return done(mkdirpSync(dir, mode) ?? undefined); + } + const sub = normalizeWindowsPath(path.relative(cwd, dir)); + const parts = sub.split('/'); + let created = undefined; + for (let p = parts.shift(), part = cwd; p && (part += '/' + p); p = parts.shift()) { + part = normalizeWindowsPath(path.resolve(part)); + if (cGet(cache, part)) { + continue; + } + try { + fs.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + } + catch (er) { + const st = fs.lstatSync(part); + if (st.isDirectory()) { + cSet(cache, part, true); + continue; + } + else if (unlink) { + fs.unlinkSync(part); + fs.mkdirSync(part, mode); + created = created || part; + cSet(cache, part, true); + continue; + } + else if (st.isSymbolicLink()) { + return new SymlinkError(part, part + '/' + parts.join('/')); + } + } + } + return done(created); +}; +//# sourceMappingURL=mkdir.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mkdir.js.map b/node_modules/tar/dist/esm/mkdir.js.map new file mode 100644 index 0000000..8b441ea --- /dev/null +++ b/node_modules/tar/dist/esm/mkdir.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mkdir.js","sourceRoot":"","sources":["../../src/mkdir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAA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AAC,GAAG,CAAC,CAAC,CAAA;YAC7D,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAA;AACtB,CAAC,CAAA","sourcesContent":["import { chownr, chownrSync } from 'chownr'\nimport fs from 'fs'\nimport { mkdirp, mkdirpSync } from 'mkdirp'\nimport path from 'node:path'\nimport { CwdError } from './cwd-error.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { SymlinkError } from './symlink-error.js'\n\nexport type MkdirOptions = {\n uid?: number\n gid?: number\n processUid?: number\n processGid?: number\n umask?: number\n preserve: boolean\n unlink: boolean\n cache: Map\n cwd: string\n mode: number\n}\n\nexport type MkdirError =\n | NodeJS.ErrnoException\n | CwdError\n | SymlinkError\n\nconst cGet = (cache: Map, key: string) =>\n cache.get(normalizeWindowsPath(key))\nconst cSet = (\n cache: Map,\n key: string,\n val: boolean,\n) => cache.set(normalizeWindowsPath(key), val)\n\nconst checkCwd = (\n dir: string,\n cb: (er?: null | MkdirError) => any,\n) => {\n fs.stat(dir, (er, st) => {\n if (er || !st.isDirectory()) {\n er = new CwdError(\n dir,\n (er as NodeJS.ErrnoException)?.code || 'ENOTDIR',\n )\n }\n cb(er)\n })\n}\n\n/**\n * Wrapper around mkdirp for tar's needs.\n *\n * The main purpose is to avoid creating directories if we know that\n * they already exist (and track which ones exist for this purpose),\n * and prevent entries from being extracted into symlinked folders,\n * if `preservePaths` is not set.\n */\nexport const mkdir = (\n dir: string,\n opt: MkdirOptions,\n cb: (er?: null | MkdirError, made?: string) => void,\n) => {\n dir = normalizeWindowsPath(dir)\n\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o0700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (er?: null | MkdirError, created?: string) => {\n if (er) {\n cb(er)\n } else {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownr(created, uid, gid, er =>\n done(er as NodeJS.ErrnoException),\n )\n } else if (needChmod) {\n fs.chmod(dir, mode, cb)\n } else {\n cb()\n }\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n return checkCwd(dir, done)\n }\n\n if (preserve) {\n return mkdirp(dir, { mode }).then(\n made => done(null, made ?? undefined), // oh, ts\n done,\n )\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n mkdir_(cwd, parts, mode, cache, unlink, cwd, undefined, done)\n}\n\nconst mkdir_ = (\n base: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n): void => {\n if (!parts.length) {\n return cb(null, created)\n }\n const p = parts.shift()\n const part = normalizeWindowsPath(path.resolve(base + '/' + p))\n if (cGet(cache, part)) {\n return mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(part, parts, mode, cache, unlink, cwd, created, cb),\n )\n}\n\nconst onmkdir =\n (\n part: string,\n parts: string[],\n mode: number,\n cache: Map,\n unlink: boolean,\n cwd: string,\n created: string | undefined,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) =>\n (er?: null | NodeJS.ErrnoException) => {\n if (er) {\n fs.lstat(part, (statEr, st) => {\n if (statEr) {\n statEr.path =\n statEr.path && normalizeWindowsPath(statEr.path)\n cb(statEr)\n } else if (st.isDirectory()) {\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n } else if (unlink) {\n fs.unlink(part, er => {\n if (er) {\n return cb(er)\n }\n fs.mkdir(\n part,\n mode,\n onmkdir(\n part,\n parts,\n mode,\n cache,\n unlink,\n cwd,\n created,\n cb,\n ),\n )\n })\n } else if (st.isSymbolicLink()) {\n return cb(\n new SymlinkError(part, part + '/' + parts.join('/')),\n )\n } else {\n cb(er)\n }\n })\n } else {\n created = created || part\n mkdir_(part, parts, mode, cache, unlink, cwd, created, cb)\n }\n }\n\nconst checkCwdSync = (dir: string) => {\n let ok = false\n let code: string | undefined = undefined\n try {\n ok = fs.statSync(dir).isDirectory()\n } catch (er) {\n code = (er as NodeJS.ErrnoException)?.code\n } finally {\n if (!ok) {\n throw new CwdError(dir, code ?? 'ENOTDIR')\n }\n }\n}\n\nexport const mkdirSync = (dir: string, opt: MkdirOptions) => {\n dir = normalizeWindowsPath(dir)\n // if there's any overlap between mask and mode,\n // then we'll need an explicit chmod\n /* c8 ignore next */\n const umask = opt.umask ?? 0o22\n const mode = opt.mode | 0o700\n const needChmod = (mode & umask) !== 0\n\n const uid = opt.uid\n const gid = opt.gid\n const doChown =\n typeof uid === 'number' &&\n typeof gid === 'number' &&\n (uid !== opt.processUid || gid !== opt.processGid)\n\n const preserve = opt.preserve\n const unlink = opt.unlink\n const cache = opt.cache\n const cwd = normalizeWindowsPath(opt.cwd)\n\n const done = (created?: string | undefined) => {\n cSet(cache, dir, true)\n if (created && doChown) {\n chownrSync(created, uid, gid)\n }\n if (needChmod) {\n fs.chmodSync(dir, mode)\n }\n }\n\n if (cache && cGet(cache, dir) === true) {\n return done()\n }\n\n if (dir === cwd) {\n checkCwdSync(cwd)\n return done()\n }\n\n if (preserve) {\n return done(mkdirpSync(dir, mode) ?? undefined)\n }\n\n const sub = normalizeWindowsPath(path.relative(cwd, dir))\n const parts = sub.split('/')\n let created: string | undefined = undefined\n for (\n let p = parts.shift(), part = cwd;\n p && (part += '/' + p);\n p = parts.shift()\n ) {\n part = normalizeWindowsPath(path.resolve(part))\n if (cGet(cache, part)) {\n continue\n }\n\n try {\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n } catch (er) {\n const st = fs.lstatSync(part)\n if (st.isDirectory()) {\n cSet(cache, part, true)\n continue\n } else if (unlink) {\n fs.unlinkSync(part)\n fs.mkdirSync(part, mode)\n created = created || part\n cSet(cache, part, true)\n continue\n } else if (st.isSymbolicLink()) {\n return new SymlinkError(part, part + '/' + parts.join('/'))\n }\n }\n }\n\n return done(created)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.d.ts b/node_modules/tar/dist/esm/mode-fix.d.ts new file mode 100644 index 0000000..38f3d93 --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.d.ts @@ -0,0 +1,2 @@ +export declare const modeFix: (mode: number, isDir: boolean, portable: boolean) => number; +//# sourceMappingURL=mode-fix.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.d.ts.map b/node_modules/tar/dist/esm/mode-fix.d.ts.map new file mode 100644 index 0000000..dbef3bc --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.d.ts","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SACZ,MAAM,SACL,OAAO,YACJ,OAAO,WA0BlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.js b/node_modules/tar/dist/esm/mode-fix.js new file mode 100644 index 0000000..5fd3bb8 --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.js @@ -0,0 +1,25 @@ +export const modeFix = (mode, isDir, portable) => { + mode &= 0o7777; + // in portable mode, use the minimum reasonable umask + // if this system creates files with 0o664 by default + // (as some linux distros do), then we'll write the + // archive with 0o644 instead. Also, don't ever create + // a file that is not readable/writable by the owner. + if (portable) { + mode = (mode | 0o600) & ~0o22; + } + // if dirs are readable, then they should be listable + if (isDir) { + if (mode & 0o400) { + mode |= 0o100; + } + if (mode & 0o40) { + mode |= 0o10; + } + if (mode & 0o4) { + mode |= 0o1; + } + } + return mode; +}; +//# sourceMappingURL=mode-fix.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/mode-fix.js.map b/node_modules/tar/dist/esm/mode-fix.js.map new file mode 100644 index 0000000..84efa64 --- /dev/null +++ b/node_modules/tar/dist/esm/mode-fix.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mode-fix.js","sourceRoot":"","sources":["../../src/mode-fix.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,IAAY,EACZ,KAAc,EACd,QAAiB,EACjB,EAAE;IACF,IAAI,IAAI,MAAM,CAAA;IAEd,qDAAqD;IACrD,qDAAqD;IACrD,mDAAmD;IACnD,uDAAuD;IACvD,qDAAqD;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAA;IAC/B,CAAC;IAED,qDAAqD;IACrD,IAAI,KAAK,EAAE,CAAC;QACV,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,IAAI,IAAI,KAAK,CAAA;QACf,CAAC;QACD,IAAI,IAAI,GAAG,IAAI,EAAE,CAAC;YAChB,IAAI,IAAI,IAAI,CAAA;QACd,CAAC;QACD,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;YACf,IAAI,IAAI,GAAG,CAAA;QACb,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA","sourcesContent":["export const modeFix = (\n mode: number,\n isDir: boolean,\n portable: boolean,\n) => {\n mode &= 0o7777\n\n // in portable mode, use the minimum reasonable umask\n // if this system creates files with 0o664 by default\n // (as some linux distros do), then we'll write the\n // archive with 0o644 instead. Also, don't ever create\n // a file that is not readable/writable by the owner.\n if (portable) {\n mode = (mode | 0o600) & ~0o22\n }\n\n // if dirs are readable, then they should be listable\n if (isDir) {\n if (mode & 0o400) {\n mode |= 0o100\n }\n if (mode & 0o40) {\n mode |= 0o10\n }\n if (mode & 0o4) {\n mode |= 0o1\n }\n }\n return mode\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.d.ts b/node_modules/tar/dist/esm/normalize-unicode.d.ts new file mode 100644 index 0000000..0413bd7 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeUnicode: (s: string) => any; +//# sourceMappingURL=normalize-unicode.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.d.ts.map b/node_modules/tar/dist/esm/normalize-unicode.d.ts.map new file mode 100644 index 0000000..9c26ec8 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.d.ts","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,MAAO,MAAM,QAKzC,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.js b/node_modules/tar/dist/esm/normalize-unicode.js new file mode 100644 index 0000000..94e5095 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.js @@ -0,0 +1,13 @@ +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +const normalizeCache = Object.create(null); +const { hasOwnProperty } = Object.prototype; +export const normalizeUnicode = (s) => { + if (!hasOwnProperty.call(normalizeCache, s)) { + normalizeCache[s] = s.normalize('NFD'); + } + return normalizeCache[s]; +}; +//# sourceMappingURL=normalize-unicode.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-unicode.js.map b/node_modules/tar/dist/esm/normalize-unicode.js.map new file mode 100644 index 0000000..4377c6f --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-unicode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-unicode.js","sourceRoot":"","sources":["../../src/normalize-unicode.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC,SAAS,CAAA;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,EAAE;IAC5C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5C,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,CAAA;AAC1B,CAAC,CAAA","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nconst normalizeCache = Object.create(null)\nconst { hasOwnProperty } = Object.prototype\nexport const normalizeUnicode = (s: string) => {\n if (!hasOwnProperty.call(normalizeCache, s)) {\n normalizeCache[s] = s.normalize('NFD')\n }\n return normalizeCache[s]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.d.ts b/node_modules/tar/dist/esm/normalize-windows-path.d.ts new file mode 100644 index 0000000..8581105 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.d.ts @@ -0,0 +1,2 @@ +export declare const normalizeWindowsPath: (p: string) => string; +//# sourceMappingURL=normalize-windows-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map b/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map new file mode 100644 index 0000000..25de3c0 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.d.ts","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,MAEzB,MAAM,WAC+B,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.js b/node_modules/tar/dist/esm/normalize-windows-path.js new file mode 100644 index 0000000..2d97d2b --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.js @@ -0,0 +1,9 @@ +// on windows, either \ or / are valid directory separators. +// on unix, \ is a valid character in filenames. +// so, on windows, and only on windows, we replace all \ chars with /, +// so that we can use / as our one and only directory separator char. +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +export const normalizeWindowsPath = platform !== 'win32' ? + (p) => p + : (p) => p && p.replace(/\\/g, '/'); +//# sourceMappingURL=normalize-windows-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/normalize-windows-path.js.map b/node_modules/tar/dist/esm/normalize-windows-path.js.map new file mode 100644 index 0000000..03be019 --- /dev/null +++ b/node_modules/tar/dist/esm/normalize-windows-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"normalize-windows-path.js","sourceRoot":"","sources":["../../src/normalize-windows-path.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,gDAAgD;AAChD,sEAAsE;AACtE,qEAAqE;AAErE,MAAM,QAAQ,GACZ,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAC/B,QAAQ,KAAK,OAAO,CAAC,CAAC;IACpB,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA","sourcesContent":["// on windows, either \\ or / are valid directory separators.\n// on unix, \\ is a valid character in filenames.\n// so, on windows, and only on windows, we replace all \\ chars with /,\n// so that we can use / as our one and only directory separator char.\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\n\nexport const normalizeWindowsPath =\n platform !== 'win32' ?\n (p: string) => p\n : (p: string) => p && p.replace(/\\\\/g, '/')\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.d.ts b/node_modules/tar/dist/esm/options.d.ts new file mode 100644 index 0000000..bcf68fe --- /dev/null +++ b/node_modules/tar/dist/esm/options.d.ts @@ -0,0 +1,605 @@ +/// +import { type GzipOptions, type ZlibOptions } from 'minizlib'; +import { type Stats } from 'node:fs'; +import { type ReadEntry } from './read-entry.js'; +import { type WarnData } from './warn-method.js'; +import { WriteEntry } from './write-entry.js'; +/** + * The options that can be provided to tar commands. + * + * Note that some of these are only relevant for certain commands, since + * they are specific to reading or writing. + * + * Aliases are provided in the {@link TarOptionsWithAliases} type. + */ +export interface TarOptions { + /** + * Perform all I/O operations synchronously. If the stream is ended + * immediately, then it will be processed entirely synchronously. + */ + sync?: boolean; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + file?: string; + /** + * Treat warnings as crash-worthy errors. Defaults false. + */ + strict?: boolean; + /** + * The effective current working directory for this tar command + */ + cwd?: string; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + gzip?: boolean | GzipOptions; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + preservePaths?: boolean; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + noMtime?: boolean; + /** + * Set to `true` or an object with settings for `zlib.BrotliCompress()` to + * create a brotli-compressed archive + * + * When extracting, this will cause the archive to be treated as a + * brotli-compressed file if set to `true` or a ZlibOptions object. + * + * If set `false`, then brotli options will not be used. + * + * If both this and the `gzip` option are left `undefined`, then tar will + * attempt to infer the brotli compression status, but can only do so based + * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the + * first 512 bytes are not a valid tar header, then brotli decompression + * will be attempted. + */ + brotli?: boolean | ZlibOptions; + /** + * A function that is called with `(path, stat)` when creating an archive, or + * `(path, entry)` when extracting. Return true to process the file/entry, or + * false to exclude it. + */ + filter?: (path: string, entry: Stats | ReadEntry) => boolean; + /** + * A function that gets called for any warning encountered. + * + * Note: if `strict` is set, then the warning will throw, and this method + * will not be called. + */ + onwarn?: (code: string, message: string, data: WarnData) => any; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + unlink?: boolean; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + * + * Any entry whose entire path is stripped will be excluded. + */ + strip?: number; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + newer?: boolean; + /** + * When extracting, do not overwrite existing files at all. + */ + keep?: boolean; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + preserveOwner?: boolean; + /** + * The maximum depth of subfolders to extract into. This defaults to 1024. + * Anything deeper than the limit will raise a warning and skip the entry. + * Set to `Infinity` to remove the limitation. + */ + maxDepth?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified user id, + * regardless of the `uid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `gid` + * option. + */ + uid?: number; + /** + * When extracting, force all created files and directories, and all + * implicitly created directories, to be owned by the specified group id, + * regardless of the `gid` field in the archive. + * + * Cannot be used along with `preserveOwner`. Requires also setting the `uid` + * option. + */ + gid?: number; + /** + * When extracting, provide a function that takes an `entry` object, and + * returns a stream, or any falsey value. If a stream is provided, then that + * stream's data will be written instead of the contents of the archive + * entry. If a falsey value is provided, then the entry is written to disk as + * normal. + * + * To exclude items from extraction, use the `filter` option. + * + * Note that using an asynchronous stream type with the `transform` option + * will cause undefined behavior in synchronous extractions. + * [MiniPass](http://npm.im/minipass)-based streams are designed for this use + * case. + */ + transform?: (entry: ReadEntry) => any; + /** + * Call `chmod()` to ensure that extracted files match the entry's mode + * field. Without this field set, all mode fields in archive entries are a + * best effort attempt only. + * + * Setting this necessitates a call to the deprecated `process.umask()` + * method to determine the default umask value, unless a `processUmask` + * config is provided as well. + * + * If not set, tar will attempt to create file system entries with whatever + * mode is provided, and let the implicit process `umask` apply normally, but + * if a file already exists to be written to, then its existing mode will not + * be modified. + * + * When setting `chmod: true`, it is highly recommend to set the + * {@link TarOptions#processUmask} option as well, to avoid the call to the + * deprecated (and thread-unsafe) `process.umask()` method. + */ + chmod?: boolean; + /** + * When setting the {@link TarOptions#chmod} option to `true`, you may + * provide a value here to avoid having to call the deprecated and + * thread-unsafe `process.umask()` method. + * + * This has no effect with `chmod` is not set to true, as mode values are not + * set explicitly anyway. If `chmod` is set to `true`, and a value is not + * provided here, then `process.umask()` must be called, which will result in + * deprecation warnings. + * + * The most common values for this are `0o22` (resulting in directories + * created with mode `0o755` and files with `0o644` by default) and `0o2` + * (resulting in directores created with mode `0o775` and files `0o664`, so + * they are group-writable). + */ + processUmask?: number; + /** + * When parsing/listing archives, `entry` streams are by default resumed + * (set into "flowing" mode) immediately after the call to `onReadEntry()`. + * Set `noResume: true` to suppress this behavior. + * + * Note that when this is set, the stream will never complete until the + * data is consumed somehow. + * + * Set automatically in extract operations, since the entry is piped to + * a file system entry right away. Only relevant when parsing. + */ + noResume?: boolean; + /** + * When creating, updating, or replacing within archives, this method will + * be called with each WriteEntry that is created. + */ + onWriteEntry?: (entry: WriteEntry) => any; + /** + * When extracting or listing archives, this method will be called with + * each entry that is not excluded by a `filter`. + * + * Important when listing archives synchronously from a file, because there + * is otherwise no way to interact with the data! + */ + onReadEntry?: (entry: ReadEntry) => any; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + follow?: boolean; + /** + * When creating archives, omit any metadata that is system-specific: + * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and + * `nlink`. Note that `mtime` is still included, because this is necessary + * for other time-based operations such as `tar.update`. Additionally, `mode` + * is set to a "reasonable default" for mose unix systems, based on an + * effective `umask` of `0o22`. + * + * This also defaults the `portable` option in the gzip configs when creating + * a compressed archive, in order to produce deterministic archives that are + * not operating-system specific. + */ + portable?: boolean; + /** + * When creating archives, do not recursively archive the contents of + * directories. By default, archiving a directory archives all of its + * contents as well. + */ + noDirRecurse?: boolean; + /** + * Suppress Pax extended headers when creating archives. Note that this means + * long paths and linkpaths will be truncated, and large or negative numeric + * values may be interpreted incorrectly. + */ + noPax?: boolean; + /** + * Set to a `Date` object to force a specific `mtime` value for everything + * written to an archive. + * + * This is useful when creating archives that are intended to be + * deterministic based on their contents, irrespective of the file's last + * modification time. + * + * Overridden by `noMtime`. + */ + mtime?: Date; + /** + * A path portion to prefix onto the entries added to an archive. + */ + prefix?: string; + /** + * The mode to set on any created file archive, defaults to 0o666 + * masked by the process umask, often resulting in 0o644. + * + * This does *not* affect the mode fields of individual entries, or the + * mode status of extracted entries on the filesystem. + */ + mode?: number; + /** + * A cache of mtime values, to avoid having to stat the same file repeatedly. + * + * @internal + */ + mtimeCache?: Map; + /** + * maximum buffer size for `fs.read()` operations. + * + * @internal + */ + maxReadSize?: number; + /** + * Filter modes of entries being unpacked, like `process.umask()` + * + * @internal + */ + umask?: number; + /** + * Default mode for directories. Used for all implicitly created directories, + * and any directories in the archive that do not have a mode field. + * + * @internal + */ + dmode?: number; + /** + * default mode for files + * + * @internal + */ + fmode?: number; + /** + * Map that tracks which directories already exist, for extraction + * + * @internal + */ + dirCache?: Map; + /** + * maximum supported size of meta entries. Defaults to 1MB + * + * @internal + */ + maxMetaEntrySize?: number; + /** + * A Map object containing the device and inode value for any file whose + * `nlink` value is greater than 1, to identify hard links when creating + * archives. + * + * @internal + */ + linkCache?: Map; + /** + * A map object containing the results of `fs.readdir()` calls. + * + * @internal + */ + readdirCache?: Map; + /** + * A cache of all `lstat` results, for use in creating archives. + * + * @internal + */ + statCache?: Map; + /** + * Number of concurrent jobs to run when creating archives. + * + * Defaults to 4. + * + * @internal + */ + jobs?: number; + /** + * Automatically set to true on Windows systems. + * + * When extracting, causes behavior where filenames containing `<|>?:` + * characters are converted to windows-compatible escape sequences in the + * created filesystem entries. + * + * When packing, causes behavior where paths replace `\` with `/`, and + * filenames containing the windows-compatible escaped forms of `<|>?:` are + * converted to actual `<|>?:` characters in the archive. + * + * @internal + */ + win32?: boolean; + /** + * For `WriteEntry` objects, the absolute path to the entry on the + * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be + * overridden explicitly. + * + * @internal + */ + absolute?: string; + /** + * Used with Parser stream interface, to attach and take over when the + * stream is completely parsed. If this is set, then the prefinish, + * finish, and end events will not fire, and are the responsibility of + * the ondone method to emit properly. + * + * @internal + */ + ondone?: () => void; + /** + * Mostly for testing, but potentially useful in some cases. + * Forcibly trigger a chown on every entry, no matter what. + */ + forceChown?: boolean; + /** + * ambiguous deprecated name for {@link onReadEntry} + * + * @deprecated + */ + onentry?: (entry: ReadEntry) => any; +} +export type TarOptionsSync = TarOptions & { + sync: true; +}; +export type TarOptionsAsync = TarOptions & { + sync?: false; +}; +export type TarOptionsFile = TarOptions & { + file: string; +}; +export type TarOptionsNoFile = TarOptions & { + file?: undefined; +}; +export type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile; +export type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile; +export type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile; +export type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile; +export type LinkCacheKey = `${number}:${number}`; +export interface TarOptionsWithAliases extends TarOptions { + /** + * The effective current working directory for this tar command + */ + C?: TarOptions['cwd']; + /** + * The tar file to be read and/or written. When this is set, a stream + * is not returned. Asynchronous commands will return a promise indicating + * when the operation is completed, and synchronous commands will return + * immediately. + */ + f?: TarOptions['file']; + /** + * When creating a tar archive, this can be used to compress it as well. + * Set to `true` to use the default gzip options, or customize them as + * needed. + * + * When reading, if this is unset, then the compression status will be + * inferred from the archive data. This is generally best, unless you are + * sure of the compression settings in use to create the archive, and want to + * fail if the archive doesn't match expectations. + */ + z?: TarOptions['gzip']; + /** + * When creating archives, preserve absolute and `..` paths in the archive, + * rather than sanitizing them under the cwd. + * + * When extracting, allow absolute paths, paths containing `..`, and + * extracting through symbolic links. By default, the root `/` is stripped + * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing + * `..` are not extracted, and any file whose location would be modified by a + * symbolic link is not extracted. + * + * **WARNING** This is almost always unsafe, and must NEVER be used on + * archives from untrusted sources, such as user input, and every entry must + * be validated to ensure it is safe to write. Even if the input is not + * malicious, mistakes can cause a lot of damage! + */ + P?: TarOptions['preservePaths']; + /** + * When extracting, unlink files before creating them. Without this option, + * tar overwrites existing files, which preserves existing hardlinks. With + * this option, existing hardlinks will be broken, as will any symlink that + * would affect the location of an extracted file. + */ + U?: TarOptions['unlink']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + 'strip-components'?: TarOptions['strip']; + /** + * When extracting, strip the specified number of path portions from the + * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be + * extracted to `{cwd}/c/d`. + */ + stripComponents?: TarOptions['strip']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewer?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + 'keep-newer-files'?: TarOptions['newer']; + /** + * When extracting, keep the existing file on disk if it's newer than the + * file in the archive. + */ + keepNewerFiles?: TarOptions['newer']; + /** + * When extracting, do not overwrite existing files at all. + */ + k?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + 'keep-existing'?: TarOptions['keep']; + /** + * When extracting, do not overwrite existing files at all. + */ + keepExisting?: TarOptions['keep']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + m?: TarOptions['noMtime']; + /** + * When extracting, do not set the `mtime` value for extracted entries to + * match the `mtime` in the archive. + * + * When creating archives, do not store the `mtime` value in the entry. Note + * that this prevents properly using other mtime-based features (such as + * `tar.update` or the `newer` option) with the resulting archive. + */ + 'no-mtime'?: TarOptions['noMtime']; + /** + * When extracting, set the `uid` and `gid` of extracted entries to the `uid` + * and `gid` fields in the archive. Defaults to true when run as root, and + * false otherwise. + * + * If false, then files and directories will be set with the owner and group + * of the user running the process. This is similar to `-p` in `tar(1)`, but + * ACLs and other system-specific data is never unpacked in this + * implementation, and modes are set by default already. + */ + p?: TarOptions['preserveOwner']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + L?: TarOptions['follow']; + /** + * Pack the targets of symbolic links rather than the link itself. + */ + h?: TarOptions['follow']; + /** + * Deprecated option. Set explicitly false to set `chmod: true`. Ignored + * if {@link TarOptions#chmod} is set to any boolean value. + * + * @deprecated + */ + noChmod?: boolean; +} +export type TarOptionsWithAliasesSync = TarOptionsWithAliases & { + sync: true; +}; +export type TarOptionsWithAliasesAsync = TarOptionsWithAliases & { + sync?: false; +}; +export type TarOptionsWithAliasesFile = (TarOptionsWithAliases & { + file: string; +}) | (TarOptionsWithAliases & { + f: string; +}); +export type TarOptionsWithAliasesSyncFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesAsyncFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile; +export type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & { + f?: undefined; + file?: undefined; +}; +export type TarOptionsWithAliasesSyncNoFile = TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile; +export type TarOptionsWithAliasesAsyncNoFile = TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile; +export declare const isSyncFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file: string; +}; +export declare const isAsyncFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file: string; +}; +export declare const isSyncNoFile: (o: O) => o is O & TarOptions & { + sync: true; +} & { + file?: undefined; +}; +export declare const isAsyncNoFile: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +} & { + file?: undefined; +}; +export declare const isSync: (o: O) => o is O & TarOptions & { + sync: true; +}; +export declare const isAsync: (o: O) => o is O & TarOptions & { + sync?: false | undefined; +}; +export declare const isFile: (o: O) => o is O & TarOptions & { + file: string; +}; +export declare const isNoFile: (o: O) => o is O & TarOptions & { + file?: undefined; +}; +export declare const dealias: (opt?: TarOptionsWithAliases) => TarOptions; +//# sourceMappingURL=options.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.d.ts.map b/node_modules/tar/dist/esm/options.d.ts.map new file mode 100644 index 0000000..cd32241 --- /dev/null +++ b/node_modules/tar/dist/esm/options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":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,4BAClB,CAAC;UA/K4C,IAAI;;UAEJ,MAAM;CA8KF,CAAA;AACtD,eAAO,MAAM,WAAW,4BACnB,CAAC;;;UAhL4C,MAAM;CAiLF,CAAA;AACtD,eAAO,MAAM,YAAY,4BACpB,CAAC;UArL4C,IAAI;;WAGD,SAAS;CAmLP,CAAA;AACvD,eAAO,MAAM,aAAa,4BACrB,CAAC;;;WArL+C,SAAS;CAsLP,CAAA;AACvD,eAAO,MAAM,MAAM,4BACd,CAAC;UA3L4C,IAAI;CA4LhB,CAAA;AACtC,eAAO,MAAM,OAAO,4BACf,CAAC;;CACgC,CAAA;AACtC,eAAO,MAAM,MAAM,4BACd,CAAC;UA/L4C,MAAM;CAgMlB,CAAA;AACtC,eAAO,MAAM,QAAQ,4BAChB,CAAC;WAjM+C,SAAS;CAkMvB,CAAA;AAUvC,eAAO,MAAM,OAAO,SACb,qBAAqB,KACzB,UAiBF,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.js b/node_modules/tar/dist/esm/options.js new file mode 100644 index 0000000..a006d36 --- /dev/null +++ b/node_modules/tar/dist/esm/options.js @@ -0,0 +1,54 @@ +// turn tar(1) style args like `C` into the more verbose things like `cwd` +const argmap = new Map([ + ['C', 'cwd'], + ['f', 'file'], + ['z', 'gzip'], + ['P', 'preservePaths'], + ['U', 'unlink'], + ['strip-components', 'strip'], + ['stripComponents', 'strip'], + ['keep-newer', 'newer'], + ['keepNewer', 'newer'], + ['keep-newer-files', 'newer'], + ['keepNewerFiles', 'newer'], + ['k', 'keep'], + ['keep-existing', 'keep'], + ['keepExisting', 'keep'], + ['m', 'noMtime'], + ['no-mtime', 'noMtime'], + ['p', 'preserveOwner'], + ['L', 'follow'], + ['h', 'follow'], + ['onentry', 'onReadEntry'], +]); +export const isSyncFile = (o) => !!o.sync && !!o.file; +export const isAsyncFile = (o) => !o.sync && !!o.file; +export const isSyncNoFile = (o) => !!o.sync && !o.file; +export const isAsyncNoFile = (o) => !o.sync && !o.file; +export const isSync = (o) => !!o.sync; +export const isAsync = (o) => !o.sync; +export const isFile = (o) => !!o.file; +export const isNoFile = (o) => !o.file; +const dealiasKey = (k) => { + const d = argmap.get(k); + if (d) + return d; + return k; +}; +export const dealias = (opt = {}) => { + if (!opt) + return {}; + const result = {}; + for (const [key, v] of Object.entries(opt)) { + // TS doesn't know that aliases are going to always be the same type + const k = dealiasKey(key); + result[k] = v; + } + // affordance for deprecated noChmod -> chmod + if (result.chmod === undefined && result.noChmod === false) { + result.chmod = true; + } + delete result.noChmod; + return result; +}; +//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/options.js.map b/node_modules/tar/dist/esm/options.js.map new file mode 100644 index 0000000..8b599ce --- /dev/null +++ b/node_modules/tar/dist/esm/options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAQ1E,MAAM,MAAM,GAAG,IAAI,GAAG,CACpB;IACE,CAAC,GAAG,EAAE,KAAK,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,eAAe,CAAC;IACtB,CAAC,GAAG,EAAE,QAAQ,CAAC;IACf,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7B,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC5B,CAAC,YAAY,EAAE,OAAO,CAAC;IACvB,CAAC,WAAW,EAAE,OAAO,CAAC;IACtB,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAC7B,CAAC,gBAAgB,EAAE,OAAO,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,CAAC;IACb,CAAC,eAAe,EAAE,MAAM,CAAC;IACzB,CAAC,cAAc,EAAE,MAAM,CAAC;IACxB,CAAC,GAAG,EAAE,SAAS,CAAC;IAChB,CAAC,UAAU,EAAE,SAAS,CAAC;IACvB,CAAC,GAAG,EAAE,e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ACf,OAAO,CAAqB,CAAA;AAC9B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,MAA6B,EAAE,EACnB,EAAE;IACd,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAA;IACnB,MAAM,MAAM,GAAwB,EAAE,CAAA;IACtC,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAGtC,EAAE,CAAC;QACJ,oEAAoE;QACpE,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;QACzB,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;IACf,CAAC;IACD,6CAA6C;IAC7C,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC3D,MAAM,CAAC,KAAK,GAAG,IAAI,CAAA;IACrB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAA;IACrB,OAAO,MAAoB,CAAA;AAC7B,CAAC,CAAA","sourcesContent":["// turn tar(1) style args like `C` into the more verbose things like `cwd`\n\nimport { type GzipOptions, type ZlibOptions } from 'minizlib'\nimport { type Stats } from 'node:fs'\nimport { type ReadEntry } from './read-entry.js'\nimport { type WarnData } from './warn-method.js'\nimport { WriteEntry } from './write-entry.js'\n\nconst argmap = new Map(\n [\n ['C', 'cwd'],\n ['f', 'file'],\n ['z', 'gzip'],\n ['P', 'preservePaths'],\n ['U', 'unlink'],\n ['strip-components', 'strip'],\n ['stripComponents', 'strip'],\n ['keep-newer', 'newer'],\n ['keepNewer', 'newer'],\n ['keep-newer-files', 'newer'],\n ['keepNewerFiles', 'newer'],\n ['k', 'keep'],\n ['keep-existing', 'keep'],\n ['keepExisting', 'keep'],\n ['m', 'noMtime'],\n ['no-mtime', 'noMtime'],\n ['p', 'preserveOwner'],\n ['L', 'follow'],\n ['h', 'follow'],\n ['onentry', 'onReadEntry'],\n ],\n)\n\n/**\n * The options that can be provided to tar commands.\n *\n * Note that some of these are only relevant for certain commands, since\n * they are specific to reading or writing.\n *\n * Aliases are provided in the {@link TarOptionsWithAliases} type.\n */\nexport interface TarOptions {\n //////////////////////////\n // shared options\n\n /**\n * Perform all I/O operations synchronously. If the stream is ended\n * immediately, then it will be processed entirely synchronously.\n */\n sync?: boolean\n\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n file?: string\n\n /**\n * Treat warnings as crash-worthy errors. Defaults false.\n */\n strict?: boolean\n\n /**\n * The effective current working directory for this tar command\n */\n cwd?: string\n\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n gzip?: boolean | GzipOptions\n\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n preservePaths?: boolean\n\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n noMtime?: boolean\n\n /**\n * Set to `true` or an object with settings for `zlib.BrotliCompress()` to\n * create a brotli-compressed archive\n *\n * When extracting, this will cause the archive to be treated as a\n * brotli-compressed file if set to `true` or a ZlibOptions object.\n *\n * If set `false`, then brotli options will not be used.\n *\n * If both this and the `gzip` option are left `undefined`, then tar will\n * attempt to infer the brotli compression status, but can only do so based\n * on the filename. If the filename ends in `.tbr` or `.tar.br`, and the\n * first 512 bytes are not a valid tar header, then brotli decompression\n * will be attempted.\n */\n brotli?: boolean | ZlibOptions\n\n /**\n * A function that is called with `(path, stat)` when creating an archive, or\n * `(path, entry)` when extracting. Return true to process the file/entry, or\n * false to exclude it.\n */\n filter?: (path: string, entry: Stats | ReadEntry) => boolean\n\n /**\n * A function that gets called for any warning encountered.\n *\n * Note: if `strict` is set, then the warning will throw, and this method\n * will not be called.\n */\n onwarn?: (code: string, message: string, data: WarnData) => any\n\n //////////////////////////\n // extraction options\n\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n unlink?: boolean\n\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n *\n * Any entry whose entire path is stripped will be excluded.\n */\n strip?: number\n\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n newer?: boolean\n\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keep?: boolean\n\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n preserveOwner?: boolean\n\n /**\n * The maximum depth of subfolders to extract into. This defaults to 1024.\n * Anything deeper than the limit will raise a warning and skip the entry.\n * Set to `Infinity` to remove the limitation.\n */\n maxDepth?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified user id,\n * regardless of the `uid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `gid`\n * option.\n */\n uid?: number\n\n /**\n * When extracting, force all created files and directories, and all\n * implicitly created directories, to be owned by the specified group id,\n * regardless of the `gid` field in the archive.\n *\n * Cannot be used along with `preserveOwner`. Requires also setting the `uid`\n * option.\n */\n gid?: number\n\n /**\n * When extracting, provide a function that takes an `entry` object, and\n * returns a stream, or any falsey value. If a stream is provided, then that\n * stream's data will be written instead of the contents of the archive\n * entry. If a falsey value is provided, then the entry is written to disk as\n * normal.\n *\n * To exclude items from extraction, use the `filter` option.\n *\n * Note that using an asynchronous stream type with the `transform` option\n * will cause undefined behavior in synchronous extractions.\n * [MiniPass](http://npm.im/minipass)-based streams are designed for this use\n * case.\n */\n transform?: (entry: ReadEntry) => any\n\n /**\n * Call `chmod()` to ensure that extracted files match the entry's mode\n * field. Without this field set, all mode fields in archive entries are a\n * best effort attempt only.\n *\n * Setting this necessitates a call to the deprecated `process.umask()`\n * method to determine the default umask value, unless a `processUmask`\n * config is provided as well.\n *\n * If not set, tar will attempt to create file system entries with whatever\n * mode is provided, and let the implicit process `umask` apply normally, but\n * if a file already exists to be written to, then its existing mode will not\n * be modified.\n *\n * When setting `chmod: true`, it is highly recommend to set the\n * {@link TarOptions#processUmask} option as well, to avoid the call to the\n * deprecated (and thread-unsafe) `process.umask()` method.\n */\n chmod?: boolean\n\n /**\n * When setting the {@link TarOptions#chmod} option to `true`, you may\n * provide a value here to avoid having to call the deprecated and\n * thread-unsafe `process.umask()` method.\n *\n * This has no effect with `chmod` is not set to true, as mode values are not\n * set explicitly anyway. If `chmod` is set to `true`, and a value is not\n * provided here, then `process.umask()` must be called, which will result in\n * deprecation warnings.\n *\n * The most common values for this are `0o22` (resulting in directories\n * created with mode `0o755` and files with `0o644` by default) and `0o2`\n * (resulting in directores created with mode `0o775` and files `0o664`, so\n * they are group-writable).\n */\n processUmask?: number\n\n //////////////////////////\n // archive creation options\n\n /**\n * When parsing/listing archives, `entry` streams are by default resumed\n * (set into \"flowing\" mode) immediately after the call to `onReadEntry()`.\n * Set `noResume: true` to suppress this behavior.\n *\n * Note that when this is set, the stream will never complete until the\n * data is consumed somehow.\n *\n * Set automatically in extract operations, since the entry is piped to\n * a file system entry right away. Only relevant when parsing.\n */\n noResume?: boolean\n\n /**\n * When creating, updating, or replacing within archives, this method will\n * be called with each WriteEntry that is created.\n */\n onWriteEntry?: (entry: WriteEntry) => any\n\n /**\n * When extracting or listing archives, this method will be called with\n * each entry that is not excluded by a `filter`.\n *\n * Important when listing archives synchronously from a file, because there\n * is otherwise no way to interact with the data!\n */\n onReadEntry?: (entry: ReadEntry) => any\n\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n follow?: boolean\n\n /**\n * When creating archives, omit any metadata that is system-specific:\n * `ctime`, `atime`, `uid`, `gid`, `uname`, `gname`, `dev`, `ino`, and\n * `nlink`. Note that `mtime` is still included, because this is necessary\n * for other time-based operations such as `tar.update`. Additionally, `mode`\n * is set to a \"reasonable default\" for mose unix systems, based on an\n * effective `umask` of `0o22`.\n *\n * This also defaults the `portable` option in the gzip configs when creating\n * a compressed archive, in order to produce deterministic archives that are\n * not operating-system specific.\n */\n portable?: boolean\n\n /**\n * When creating archives, do not recursively archive the contents of\n * directories. By default, archiving a directory archives all of its\n * contents as well.\n */\n noDirRecurse?: boolean\n\n /**\n * Suppress Pax extended headers when creating archives. Note that this means\n * long paths and linkpaths will be truncated, and large or negative numeric\n * values may be interpreted incorrectly.\n */\n noPax?: boolean\n\n /**\n * Set to a `Date` object to force a specific `mtime` value for everything\n * written to an archive.\n *\n * This is useful when creating archives that are intended to be\n * deterministic based on their contents, irrespective of the file's last\n * modification time.\n *\n * Overridden by `noMtime`.\n */\n mtime?: Date\n\n /**\n * A path portion to prefix onto the entries added to an archive.\n */\n prefix?: string\n\n /**\n * The mode to set on any created file archive, defaults to 0o666\n * masked by the process umask, often resulting in 0o644.\n *\n * This does *not* affect the mode fields of individual entries, or the\n * mode status of extracted entries on the filesystem.\n */\n mode?: number\n\n //////////////////////////\n // internal options\n\n /**\n * A cache of mtime values, to avoid having to stat the same file repeatedly.\n *\n * @internal\n */\n mtimeCache?: Map\n\n /**\n * maximum buffer size for `fs.read()` operations.\n *\n * @internal\n */\n maxReadSize?: number\n\n /**\n * Filter modes of entries being unpacked, like `process.umask()`\n *\n * @internal\n */\n umask?: number\n\n /**\n * Default mode for directories. Used for all implicitly created directories,\n * and any directories in the archive that do not have a mode field.\n *\n * @internal\n */\n dmode?: number\n\n /**\n * default mode for files\n *\n * @internal\n */\n fmode?: number\n\n /**\n * Map that tracks which directories already exist, for extraction\n *\n * @internal\n */\n dirCache?: Map\n /**\n * maximum supported size of meta entries. Defaults to 1MB\n *\n * @internal\n */\n maxMetaEntrySize?: number\n\n /**\n * A Map object containing the device and inode value for any file whose\n * `nlink` value is greater than 1, to identify hard links when creating\n * archives.\n *\n * @internal\n */\n linkCache?: Map\n\n /**\n * A map object containing the results of `fs.readdir()` calls.\n *\n * @internal\n */\n readdirCache?: Map\n\n /**\n * A cache of all `lstat` results, for use in creating archives.\n *\n * @internal\n */\n statCache?: Map\n\n /**\n * Number of concurrent jobs to run when creating archives.\n *\n * Defaults to 4.\n *\n * @internal\n */\n jobs?: number\n\n /**\n * Automatically set to true on Windows systems.\n *\n * When extracting, causes behavior where filenames containing `<|>?:`\n * characters are converted to windows-compatible escape sequences in the\n * created filesystem entries.\n *\n * When packing, causes behavior where paths replace `\\` with `/`, and\n * filenames containing the windows-compatible escaped forms of `<|>?:` are\n * converted to actual `<|>?:` characters in the archive.\n *\n * @internal\n */\n win32?: boolean\n\n /**\n * For `WriteEntry` objects, the absolute path to the entry on the\n * filesystem. By default, this is `resolve(cwd, entry.path)`, but it can be\n * overridden explicitly.\n *\n * @internal\n */\n absolute?: string\n\n /**\n * Used with Parser stream interface, to attach and take over when the\n * stream is completely parsed. If this is set, then the prefinish,\n * finish, and end events will not fire, and are the responsibility of\n * the ondone method to emit properly.\n *\n * @internal\n */\n ondone?: () => void\n\n /**\n * Mostly for testing, but potentially useful in some cases.\n * Forcibly trigger a chown on every entry, no matter what.\n */\n forceChown?: boolean\n\n /**\n * ambiguous deprecated name for {@link onReadEntry}\n *\n * @deprecated\n */\n onentry?: (entry: ReadEntry) => any\n}\n\nexport type TarOptionsSync = TarOptions & { sync: true }\nexport type TarOptionsAsync = TarOptions & { sync?: false }\nexport type TarOptionsFile = TarOptions & { file: string }\nexport type TarOptionsNoFile = TarOptions & { file?: undefined }\nexport type TarOptionsSyncFile = TarOptionsSync & TarOptionsFile\nexport type TarOptionsAsyncFile = TarOptionsAsync & TarOptionsFile\nexport type TarOptionsSyncNoFile = TarOptionsSync & TarOptionsNoFile\nexport type TarOptionsAsyncNoFile = TarOptionsAsync & TarOptionsNoFile\n\nexport type LinkCacheKey = `${number}:${number}`\n\nexport interface TarOptionsWithAliases extends TarOptions {\n /**\n * The effective current working directory for this tar command\n */\n C?: TarOptions['cwd']\n /**\n * The tar file to be read and/or written. When this is set, a stream\n * is not returned. Asynchronous commands will return a promise indicating\n * when the operation is completed, and synchronous commands will return\n * immediately.\n */\n f?: TarOptions['file']\n /**\n * When creating a tar archive, this can be used to compress it as well.\n * Set to `true` to use the default gzip options, or customize them as\n * needed.\n *\n * When reading, if this is unset, then the compression status will be\n * inferred from the archive data. This is generally best, unless you are\n * sure of the compression settings in use to create the archive, and want to\n * fail if the archive doesn't match expectations.\n */\n z?: TarOptions['gzip']\n /**\n * When creating archives, preserve absolute and `..` paths in the archive,\n * rather than sanitizing them under the cwd.\n *\n * When extracting, allow absolute paths, paths containing `..`, and\n * extracting through symbolic links. By default, the root `/` is stripped\n * from absolute paths (eg, turning `/x/y/z` into `x/y/z`), paths containing\n * `..` are not extracted, and any file whose location would be modified by a\n * symbolic link is not extracted.\n *\n * **WARNING** This is almost always unsafe, and must NEVER be used on\n * archives from untrusted sources, such as user input, and every entry must\n * be validated to ensure it is safe to write. Even if the input is not\n * malicious, mistakes can cause a lot of damage!\n */\n P?: TarOptions['preservePaths']\n /**\n * When extracting, unlink files before creating them. Without this option,\n * tar overwrites existing files, which preserves existing hardlinks. With\n * this option, existing hardlinks will be broken, as will any symlink that\n * would affect the location of an extracted file.\n */\n U?: TarOptions['unlink']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n 'strip-components'?: TarOptions['strip']\n /**\n * When extracting, strip the specified number of path portions from the\n * entry path. For example, with `{strip: 2}`, the entry `a/b/c/d` would be\n * extracted to `{cwd}/c/d`.\n */\n stripComponents?: TarOptions['strip']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewer?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n 'keep-newer-files'?: TarOptions['newer']\n /**\n * When extracting, keep the existing file on disk if it's newer than the\n * file in the archive.\n */\n keepNewerFiles?: TarOptions['newer']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n k?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n 'keep-existing'?: TarOptions['keep']\n /**\n * When extracting, do not overwrite existing files at all.\n */\n keepExisting?: TarOptions['keep']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n m?: TarOptions['noMtime']\n /**\n * When extracting, do not set the `mtime` value for extracted entries to\n * match the `mtime` in the archive.\n *\n * When creating archives, do not store the `mtime` value in the entry. Note\n * that this prevents properly using other mtime-based features (such as\n * `tar.update` or the `newer` option) with the resulting archive.\n */\n 'no-mtime'?: TarOptions['noMtime']\n /**\n * When extracting, set the `uid` and `gid` of extracted entries to the `uid`\n * and `gid` fields in the archive. Defaults to true when run as root, and\n * false otherwise.\n *\n * If false, then files and directories will be set with the owner and group\n * of the user running the process. This is similar to `-p` in `tar(1)`, but\n * ACLs and other system-specific data is never unpacked in this\n * implementation, and modes are set by default already.\n */\n p?: TarOptions['preserveOwner']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n L?: TarOptions['follow']\n /**\n * Pack the targets of symbolic links rather than the link itself.\n */\n h?: TarOptions['follow']\n\n /**\n * Deprecated option. Set explicitly false to set `chmod: true`. Ignored\n * if {@link TarOptions#chmod} is set to any boolean value.\n *\n * @deprecated\n */\n noChmod?: boolean\n}\n\nexport type TarOptionsWithAliasesSync = TarOptionsWithAliases & {\n sync: true\n}\nexport type TarOptionsWithAliasesAsync = TarOptionsWithAliases & {\n sync?: false\n}\nexport type TarOptionsWithAliasesFile =\n | (TarOptionsWithAliases & {\n file: string\n })\n | (TarOptionsWithAliases & { f: string })\nexport type TarOptionsWithAliasesSyncFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesFile\nexport type TarOptionsWithAliasesAsyncFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesFile\n\nexport type TarOptionsWithAliasesNoFile = TarOptionsWithAliases & {\n f?: undefined\n file?: undefined\n}\n\nexport type TarOptionsWithAliasesSyncNoFile =\n TarOptionsWithAliasesSync & TarOptionsWithAliasesNoFile\nexport type TarOptionsWithAliasesAsyncNoFile =\n TarOptionsWithAliasesAsync & TarOptionsWithAliasesNoFile\n\nexport const isSyncFile = (\n o: O,\n): o is O & TarOptionsSyncFile => !!o.sync && !!o.file\nexport const isAsyncFile = (\n o: O,\n): o is O & TarOptionsAsyncFile => !o.sync && !!o.file\nexport const isSyncNoFile = (\n o: O,\n): o is O & TarOptionsSyncNoFile => !!o.sync && !o.file\nexport const isAsyncNoFile = (\n o: O,\n): o is O & TarOptionsAsyncNoFile => !o.sync && !o.file\nexport const isSync = (\n o: O,\n): o is O & TarOptionsSync => !!o.sync\nexport const isAsync = (\n o: O,\n): o is O & TarOptionsAsync => !o.sync\nexport const isFile = (\n o: O,\n): o is O & TarOptionsFile => !!o.file\nexport const isNoFile = (\n o: O,\n): o is O & TarOptionsNoFile => !o.file\n\nconst dealiasKey = (\n k: keyof TarOptionsWithAliases,\n): keyof TarOptions => {\n const d = argmap.get(k)\n if (d) return d\n return k as keyof TarOptions\n}\n\nexport const dealias = (\n opt: TarOptionsWithAliases = {},\n): TarOptions => {\n if (!opt) return {}\n const result: Record = {}\n for (const [key, v] of Object.entries(opt) as [\n keyof TarOptionsWithAliases,\n any,\n ][]) {\n // TS doesn't know that aliases are going to always be the same type\n const k = dealiasKey(key)\n result[k] = v\n }\n // affordance for deprecated noChmod -> chmod\n if (result.chmod === undefined && result.noChmod === false) {\n result.chmod = true\n }\n delete result.noChmod\n return result as TarOptions\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.d.ts b/node_modules/tar/dist/esm/pack.d.ts new file mode 100644 index 0000000..e0e9656 --- /dev/null +++ b/node_modules/tar/dist/esm/pack.d.ts @@ -0,0 +1,102 @@ +/// +/// +import { type Stats } from 'fs'; +import { WriteEntry, WriteEntrySync, WriteEntryTar } from './write-entry.js'; +export declare class PackJob { + path: string; + absolute: string; + entry?: WriteEntry | WriteEntryTar; + stat?: Stats; + readdir?: string[]; + pending: boolean; + ignore: boolean; + piped: boolean; + constructor(path: string, absolute: string); +} +import { Minipass } from 'minipass'; +import * as zlib from 'minizlib'; +import { Yallist } from 'yallist'; +import { ReadEntry } from './read-entry.js'; +import { WarnEvent, type WarnData, type Warner } from './warn-method.js'; +declare const ONSTAT: unique symbol; +declare const ENDED: unique symbol; +declare const QUEUE: unique symbol; +declare const CURRENT: unique symbol; +declare const PROCESS: unique symbol; +declare const PROCESSING: unique symbol; +declare const PROCESSJOB: unique symbol; +declare const JOBS: unique symbol; +declare const JOBDONE: unique symbol; +declare const ADDFSENTRY: unique symbol; +declare const ADDTARENTRY: unique symbol; +declare const STAT: unique symbol; +declare const READDIR: unique symbol; +declare const ONREADDIR: unique symbol; +declare const PIPE: unique symbol; +declare const ENTRY: unique symbol; +declare const ENTRYOPT: unique symbol; +declare const WRITEENTRYCLASS: unique symbol; +declare const WRITE: unique symbol; +declare const ONDRAIN: unique symbol; +import { TarOptions } from './options.js'; +export declare class Pack extends Minipass> implements Warner { + opt: TarOptions; + cwd: string; + maxReadSize?: number; + preservePaths: boolean; + strict: boolean; + noPax: boolean; + prefix: string; + linkCache: Exclude; + statCache: Exclude; + file: string; + portable: boolean; + zip?: zlib.BrotliCompress | zlib.Gzip; + readdirCache: Exclude; + noDirRecurse: boolean; + follow: boolean; + noMtime: boolean; + mtime?: Date; + filter: Exclude; + jobs: number; + [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync; + onWriteEntry?: (entry: WriteEntry) => void; + [QUEUE]: Yallist; + [JOBS]: number; + [PROCESSING]: boolean; + [ENDED]: boolean; + constructor(opt?: TarOptions); + [WRITE](chunk: Buffer): boolean; + add(path: string | ReadEntry): this; + end(cb?: () => void): this; + end(path: string | ReadEntry, cb?: () => void): this; + end(path: string | ReadEntry, encoding?: Minipass.Encoding, cb?: () => void): this; + write(path: string | ReadEntry): boolean; + [ADDTARENTRY](p: ReadEntry): void; + [ADDFSENTRY](p: string): void; + [STAT](job: PackJob): void; + [ONSTAT](job: PackJob, stat: Stats): void; + [READDIR](job: PackJob): void; + [ONREADDIR](job: PackJob, entries: string[]): void; + [PROCESS](): void; + get [CURRENT](): PackJob | undefined; + [JOBDONE](_job: PackJob): void; + [PROCESSJOB](job: PackJob): void; + [ENTRYOPT](job: PackJob): TarOptions; + [ENTRY](job: PackJob): WriteEntry | undefined; + [ONDRAIN](): void; + [PIPE](job: PackJob): void; + pause(): void; + warn(code: string, message: string | Error, data?: WarnData): void; +} +export declare class PackSync extends Pack { + sync: true; + constructor(opt: TarOptions); + pause(): void; + resume(): void; + [STAT](job: PackJob): void; + [READDIR](job: PackJob): void; + [PIPE](job: PackJob): void; +} +export {}; +//# sourceMappingURL=pack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.d.ts.map b/node_modules/tar/dist/esm/pack.d.ts.map new file mode 100644 index 0000000..bc8e9f0 --- /dev/null +++ b/node_modules/tar/dist/esm/pack.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.d.ts","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":";;AASA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,qBAAa,OAAO;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,UAAU,GAAG,aAAa,CAAA;IAClC,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,EAAE,OAAO,CAAQ;IACxB,MAAM,EAAE,OAAO,CAAQ;IACvB,KAAK,EAAE,OAAO,CAAQ;gBACV,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAI3C;AAED,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EACL,SAAS,EAET,KAAK,QAAQ,EACb,KAAK,MAAM,EACZ,MAAM,kBAAkB,CAAA;AAGzB,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,UAAU,eAA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E,OAAO;IAenB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK;IAYlC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAatB,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE;IAM3C,CAAC,OAAO,CAAC;IA+BT,IAAI,CAAC,OAAO,CAAC,wBAEZ;IAED,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,OAAO;IAMvB,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,OAAO;IAyDzB,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,OAAO,GAAG,UAAU;IAmBpC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,OAAO;IAepB,CAAC,OAAO,CAAC;IAOT,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAgCnB,KAAK;IAML,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GAAG,KAAK,EACvB,IAAI,GAAE,QAAa,GAClB,IAAI;CAGR;AAED,qBAAa,QAAS,SAAQ,IAAI;IAChC,IAAI,EAAE,IAAI,CAAO;gBACL,GAAG,EAAE,UAAU;IAM3B,KAAK;IACL,MAAM;IAEN,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;IAKnB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,OAAO;IAKtB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,OAAO;CA0BpB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.js b/node_modules/tar/dist/esm/pack.js new file mode 100644 index 0000000..f59f32f --- /dev/null +++ b/node_modules/tar/dist/esm/pack.js @@ -0,0 +1,445 @@ +// A readable tar stream creator +// Technically, this is a transform stream that you write paths into, +// and tar format comes out of. +// The `add()` method is like `write()` but returns this, +// and end() return `this` as well, so you can +// do `new Pack(opt).add('files').add('dir').end().pipe(output) +// You could also do something like: +// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar')) +import fs from 'fs'; +import { WriteEntry, WriteEntrySync, WriteEntryTar, } from './write-entry.js'; +export class PackJob { + path; + absolute; + entry; + stat; + readdir; + pending = false; + ignore = false; + piped = false; + constructor(path, absolute) { + this.path = path || './'; + this.absolute = absolute; + } +} +import { Minipass } from 'minipass'; +import * as zlib from 'minizlib'; +import { Yallist } from 'yallist'; +import { ReadEntry } from './read-entry.js'; +import { warnMethod, } from './warn-method.js'; +const EOF = Buffer.alloc(1024); +const ONSTAT = Symbol('onStat'); +const ENDED = Symbol('ended'); +const QUEUE = Symbol('queue'); +const CURRENT = Symbol('current'); +const PROCESS = Symbol('process'); +const PROCESSING = Symbol('processing'); +const PROCESSJOB = Symbol('processJob'); +const JOBS = Symbol('jobs'); +const JOBDONE = Symbol('jobDone'); +const ADDFSENTRY = Symbol('addFSEntry'); +const ADDTARENTRY = Symbol('addTarEntry'); +const STAT = Symbol('stat'); +const READDIR = Symbol('readdir'); +const ONREADDIR = Symbol('onreaddir'); +const PIPE = Symbol('pipe'); +const ENTRY = Symbol('entry'); +const ENTRYOPT = Symbol('entryOpt'); +const WRITEENTRYCLASS = Symbol('writeEntryClass'); +const WRITE = Symbol('write'); +const ONDRAIN = Symbol('ondrain'); +import path from 'path'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +export class Pack extends Minipass { + opt; + cwd; + maxReadSize; + preservePaths; + strict; + noPax; + prefix; + linkCache; + statCache; + file; + portable; + zip; + readdirCache; + noDirRecurse; + follow; + noMtime; + mtime; + filter; + jobs; + [WRITEENTRYCLASS]; + onWriteEntry; + [QUEUE]; + [JOBS] = 0; + [PROCESSING] = false; + [ENDED] = false; + constructor(opt = {}) { + //@ts-ignore + super(); + this.opt = opt; + this.file = opt.file || ''; + this.cwd = opt.cwd || process.cwd(); + this.maxReadSize = opt.maxReadSize; + this.preservePaths = !!opt.preservePaths; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.prefix = normalizeWindowsPath(opt.prefix || ''); + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.readdirCache = opt.readdirCache || new Map(); + this.onWriteEntry = opt.onWriteEntry; + this[WRITEENTRYCLASS] = WriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + this.portable = !!opt.portable; + if (opt.gzip || opt.brotli) { + if (opt.gzip && opt.brotli) { + throw new TypeError('gzip and brotli are mutually exclusive'); + } + if (opt.gzip) { + if (typeof opt.gzip !== 'object') { + opt.gzip = {}; + } + if (this.portable) { + opt.gzip.portable = true; + } + this.zip = new zlib.Gzip(opt.gzip); + } + if (opt.brotli) { + if (typeof opt.brotli !== 'object') { + opt.brotli = {}; + } + this.zip = new zlib.BrotliCompress(opt.brotli); + } + /* c8 ignore next */ + if (!this.zip) + throw new Error('impossible'); + const zip = this.zip; + zip.on('data', chunk => super.write(chunk)); + zip.on('end', () => super.end()); + zip.on('drain', () => this[ONDRAIN]()); + this.on('resume', () => zip.resume()); + } + else { + this.on('drain', this[ONDRAIN]); + } + this.noDirRecurse = !!opt.noDirRecurse; + this.follow = !!opt.follow; + this.noMtime = !!opt.noMtime; + if (opt.mtime) + this.mtime = opt.mtime; + this.filter = + typeof opt.filter === 'function' ? opt.filter : () => true; + this[QUEUE] = new Yallist(); + this[JOBS] = 0; + this.jobs = Number(opt.jobs) || 4; + this[PROCESSING] = false; + this[ENDED] = false; + } + [WRITE](chunk) { + return super.write(chunk); + } + add(path) { + this.write(path); + return this; + } + end(path, encoding, cb) { + /* c8 ignore start */ + if (typeof path === 'function') { + cb = path; + path = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + /* c8 ignore stop */ + if (path) { + this.add(path); + } + this[ENDED] = true; + this[PROCESS](); + /* c8 ignore next */ + if (cb) + cb(); + return this; + } + write(path) { + if (this[ENDED]) { + throw new Error('write after end'); + } + if (path instanceof ReadEntry) { + this[ADDTARENTRY](path); + } + else { + this[ADDFSENTRY](path); + } + return this.flowing; + } + [ADDTARENTRY](p) { + const absolute = normalizeWindowsPath(path.resolve(this.cwd, p.path)); + // in this case, we don't have to wait for the stat + if (!this.filter(p.path, p)) { + p.resume(); + } + else { + const job = new PackJob(p.path, absolute); + job.entry = new WriteEntryTar(p, this[ENTRYOPT](job)); + job.entry.on('end', () => this[JOBDONE](job)); + this[JOBS] += 1; + this[QUEUE].push(job); + } + this[PROCESS](); + } + [ADDFSENTRY](p) { + const absolute = normalizeWindowsPath(path.resolve(this.cwd, p)); + this[QUEUE].push(new PackJob(p, absolute)); + this[PROCESS](); + } + [STAT](job) { + job.pending = true; + this[JOBS] += 1; + const stat = this.follow ? 'stat' : 'lstat'; + fs[stat](job.absolute, (er, stat) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + this.emit('error', er); + } + else { + this[ONSTAT](job, stat); + } + }); + } + [ONSTAT](job, stat) { + this.statCache.set(job.absolute, stat); + job.stat = stat; + // now we have the stat, we can filter it. + if (!this.filter(job.path, stat)) { + job.ignore = true; + } + this[PROCESS](); + } + [READDIR](job) { + job.pending = true; + this[JOBS] += 1; + fs.readdir(job.absolute, (er, entries) => { + job.pending = false; + this[JOBS] -= 1; + if (er) { + return this.emit('error', er); + } + this[ONREADDIR](job, entries); + }); + } + [ONREADDIR](job, entries) { + this.readdirCache.set(job.absolute, entries); + job.readdir = entries; + this[PROCESS](); + } + [PROCESS]() { + if (this[PROCESSING]) { + return; + } + this[PROCESSING] = true; + for (let w = this[QUEUE].head; !!w && this[JOBS] < this.jobs; w = w.next) { + this[PROCESSJOB](w.value); + if (w.value.ignore) { + const p = w.next; + this[QUEUE].removeNode(w); + w.next = p; + } + } + this[PROCESSING] = false; + if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) { + if (this.zip) { + this.zip.end(EOF); + } + else { + super.write(EOF); + super.end(); + } + } + } + get [CURRENT]() { + return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value; + } + [JOBDONE](_job) { + this[QUEUE].shift(); + this[JOBS] -= 1; + this[PROCESS](); + } + [PROCESSJOB](job) { + if (job.pending) { + return; + } + if (job.entry) { + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + return; + } + if (!job.stat) { + const sc = this.statCache.get(job.absolute); + if (sc) { + this[ONSTAT](job, sc); + } + else { + this[STAT](job); + } + } + if (!job.stat) { + return; + } + // filtered out! + if (job.ignore) { + return; + } + if (!this.noDirRecurse && + job.stat.isDirectory() && + !job.readdir) { + const rc = this.readdirCache.get(job.absolute); + if (rc) { + this[ONREADDIR](job, rc); + } + else { + this[READDIR](job); + } + if (!job.readdir) { + return; + } + } + // we know it doesn't have an entry, because that got checked above + job.entry = this[ENTRY](job); + if (!job.entry) { + job.ignore = true; + return; + } + if (job === this[CURRENT] && !job.piped) { + this[PIPE](job); + } + } + [ENTRYOPT](job) { + return { + onwarn: (code, msg, data) => this.warn(code, msg, data), + noPax: this.noPax, + cwd: this.cwd, + absolute: job.absolute, + preservePaths: this.preservePaths, + maxReadSize: this.maxReadSize, + strict: this.strict, + portable: this.portable, + linkCache: this.linkCache, + statCache: this.statCache, + noMtime: this.noMtime, + mtime: this.mtime, + prefix: this.prefix, + onWriteEntry: this.onWriteEntry, + }; + } + [ENTRY](job) { + this[JOBS] += 1; + try { + const e = new this[WRITEENTRYCLASS](job.path, this[ENTRYOPT](job)); + return e + .on('end', () => this[JOBDONE](job)) + .on('error', er => this.emit('error', er)); + } + catch (er) { + this.emit('error', er); + } + } + [ONDRAIN]() { + if (this[CURRENT] && this[CURRENT].entry) { + this[CURRENT].entry.resume(); + } + } + // like .pipe() but using super, because our write() is special + [PIPE](job) { + job.piped = true; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + const source = job.entry; + const zip = this.zip; + /* c8 ignore start */ + if (!source) + throw new Error('cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + if (!zip.write(chunk)) { + source.pause(); + } + }); + } + else { + source.on('data', chunk => { + if (!super.write(chunk)) { + source.pause(); + } + }); + } + } + pause() { + if (this.zip) { + this.zip.pause(); + } + return super.pause(); + } + warn(code, message, data = {}) { + warnMethod(this, code, message, data); + } +} +export class PackSync extends Pack { + sync = true; + constructor(opt) { + super(opt); + this[WRITEENTRYCLASS] = WriteEntrySync; + } + // pause/resume are no-ops in sync streams. + pause() { } + resume() { } + [STAT](job) { + const stat = this.follow ? 'statSync' : 'lstatSync'; + this[ONSTAT](job, fs[stat](job.absolute)); + } + [READDIR](job) { + this[ONREADDIR](job, fs.readdirSync(job.absolute)); + } + // gotta get it all in this tick + [PIPE](job) { + const source = job.entry; + const zip = this.zip; + if (job.readdir) { + job.readdir.forEach(entry => { + const p = job.path; + const base = p === './' ? '' : p.replace(/\/*$/, '/'); + this[ADDFSENTRY](base + entry); + }); + } + /* c8 ignore start */ + if (!source) + throw new Error('Cannot pipe without source'); + /* c8 ignore stop */ + if (zip) { + source.on('data', chunk => { + zip.write(chunk); + }); + } + else { + source.on('data', chunk => { + super[WRITE](chunk); + }); + } + } +} +//# sourceMappingURL=pack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pack.js.map b/node_modules/tar/dist/esm/pack.js.map new file mode 100644 index 0000000..17db32c --- /dev/null +++ b/node_modules/tar/dist/esm/pack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pack.js","sourceRoot":"","sources":["../../src/pack.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,qEAAqE;AACrE,+BAA+B;AAC/B,yDAAyD;AACzD,8CAA8C;AAC9C,+DAA+D;AAC/D,oCAAoC;AACpC,uEAAuE;AAEvE,OAAO,EAAkB,MAAM,IAAI,CAAA;AACnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,kBAAkB,CAAA;AAEzB,MAAM,OAAO,OAAO;IAClB,IAAI,CAAQ;IACZ,QAAQ,CAAQ;IAChB,KA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M,EAAE,KAAK,CAAC,EAAE;gBACxB,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAClB,CAAC,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBACxB,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAA;YACrB,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["// A readable tar stream creator\n// Technically, this is a transform stream that you write paths into,\n// and tar format comes out of.\n// The `add()` method is like `write()` but returns this,\n// and end() return `this` as well, so you can\n// do `new Pack(opt).add('files').add('dir').end().pipe(output)\n// You could also do something like:\n// streamOfPaths().pipe(new Pack()).pipe(new fs.WriteStream('out.tar'))\n\nimport fs, { type Stats } from 'fs'\nimport {\n WriteEntry,\n WriteEntrySync,\n WriteEntryTar,\n} from './write-entry.js'\n\nexport class PackJob {\n path: string\n absolute: string\n entry?: WriteEntry | WriteEntryTar\n stat?: Stats\n readdir?: string[]\n pending: boolean = false\n ignore: boolean = false\n piped: boolean = false\n constructor(path: string, absolute: string) {\n this.path = path || './'\n this.absolute = absolute\n }\n}\n\nimport { Minipass } from 'minipass'\nimport * as zlib from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { ReadEntry } from './read-entry.js'\nimport {\n WarnEvent,\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst EOF = Buffer.alloc(1024)\nconst ONSTAT = Symbol('onStat')\nconst ENDED = Symbol('ended')\nconst QUEUE = Symbol('queue')\nconst CURRENT = Symbol('current')\nconst PROCESS = Symbol('process')\nconst PROCESSING = Symbol('processing')\nconst PROCESSJOB = Symbol('processJob')\nconst JOBS = Symbol('jobs')\nconst JOBDONE = Symbol('jobDone')\nconst ADDFSENTRY = Symbol('addFSEntry')\nconst ADDTARENTRY = Symbol('addTarEntry')\nconst STAT = Symbol('stat')\nconst READDIR = Symbol('readdir')\nconst ONREADDIR = Symbol('onreaddir')\nconst PIPE = Symbol('pipe')\nconst ENTRY = Symbol('entry')\nconst ENTRYOPT = Symbol('entryOpt')\nconst WRITEENTRYCLASS = Symbol('writeEntryClass')\nconst WRITE = Symbol('write')\nconst ONDRAIN = Symbol('ondrain')\n\nimport path from 'path'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { TarOptions } from './options.js'\n\nexport class Pack\n extends Minipass>\n implements Warner\n{\n opt: TarOptions\n cwd: string\n maxReadSize?: number\n preservePaths: boolean\n strict: boolean\n noPax: boolean\n prefix: string\n linkCache: Exclude\n statCache: Exclude\n file: string\n portable: boolean\n zip?: zlib.BrotliCompress | zlib.Gzip\n readdirCache: Exclude\n noDirRecurse: boolean\n follow: boolean\n noMtime: boolean\n mtime?: Date\n filter: Exclude\n jobs: number;\n\n [WRITEENTRYCLASS]: typeof WriteEntry | typeof WriteEntrySync\n onWriteEntry?: (entry: WriteEntry) => void;\n [QUEUE]: Yallist;\n [JOBS]: number = 0;\n [PROCESSING]: boolean = false;\n [ENDED]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n //@ts-ignore\n super()\n this.opt = opt\n this.file = opt.file || ''\n this.cwd = opt.cwd || process.cwd()\n this.maxReadSize = opt.maxReadSize\n this.preservePaths = !!opt.preservePaths\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.prefix = normalizeWindowsPath(opt.prefix || '')\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.readdirCache = opt.readdirCache || new Map()\n this.onWriteEntry = opt.onWriteEntry\n\n this[WRITEENTRYCLASS] = WriteEntry\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n this.portable = !!opt.portable\n\n if (opt.gzip || opt.brotli) {\n if (opt.gzip && opt.brotli) {\n throw new TypeError('gzip and brotli are mutually exclusive')\n }\n if (opt.gzip) {\n if (typeof opt.gzip !== 'object') {\n opt.gzip = {}\n }\n if (this.portable) {\n opt.gzip.portable = true\n }\n this.zip = new zlib.Gzip(opt.gzip)\n }\n if (opt.brotli) {\n if (typeof opt.brotli !== 'object') {\n opt.brotli = {}\n }\n this.zip = new zlib.BrotliCompress(opt.brotli)\n }\n /* c8 ignore next */\n if (!this.zip) throw new Error('impossible')\n const zip = this.zip\n zip.on('data', chunk => super.write(chunk as unknown as string))\n zip.on('end', () => super.end())\n zip.on('drain', () => this[ONDRAIN]())\n this.on('resume', () => zip.resume())\n } else {\n this.on('drain', this[ONDRAIN])\n }\n\n this.noDirRecurse = !!opt.noDirRecurse\n this.follow = !!opt.follow\n this.noMtime = !!opt.noMtime\n if (opt.mtime) this.mtime = opt.mtime\n\n this.filter =\n typeof opt.filter === 'function' ? opt.filter : () => true\n\n this[QUEUE] = new Yallist()\n this[JOBS] = 0\n this.jobs = Number(opt.jobs) || 4\n this[PROCESSING] = false\n this[ENDED] = false\n }\n\n [WRITE](chunk: Buffer) {\n return super.write(chunk as unknown as string)\n }\n\n add(path: string | ReadEntry) {\n this.write(path)\n return this\n }\n\n end(cb?: () => void): this\n end(path: string | ReadEntry, cb?: () => void): this\n end(\n path: string | ReadEntry,\n encoding?: Minipass.Encoding,\n cb?: () => void,\n ): this\n end(\n path?: string | ReadEntry | (() => void),\n encoding?: Minipass.Encoding | (() => void),\n cb?: () => void,\n ) {\n /* c8 ignore start */\n if (typeof path === 'function') {\n cb = path\n path = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n /* c8 ignore stop */\n if (path) {\n this.add(path)\n }\n this[ENDED] = true\n this[PROCESS]()\n /* c8 ignore next */\n if (cb) cb()\n return this\n }\n\n write(path: string | ReadEntry) {\n if (this[ENDED]) {\n throw new Error('write after end')\n }\n\n if (path instanceof ReadEntry) {\n this[ADDTARENTRY](path)\n } else {\n this[ADDFSENTRY](path)\n }\n return this.flowing\n }\n\n [ADDTARENTRY](p: ReadEntry) {\n const absolute = normalizeWindowsPath(\n path.resolve(this.cwd, p.path),\n )\n // in this case, we don't have to wait for the stat\n if (!this.filter(p.path, p)) {\n p.resume()\n } else {\n const job = new PackJob(p.path, absolute)\n job.entry = new WriteEntryTar(p, this[ENTRYOPT](job))\n job.entry.on('end', () => this[JOBDONE](job))\n this[JOBS] += 1\n this[QUEUE].push(job)\n }\n\n this[PROCESS]()\n }\n\n [ADDFSENTRY](p: string) {\n const absolute = normalizeWindowsPath(path.resolve(this.cwd, p))\n this[QUEUE].push(new PackJob(p, absolute))\n this[PROCESS]()\n }\n\n [STAT](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n const stat = this.follow ? 'stat' : 'lstat'\n fs[stat](job.absolute, (er, stat) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n this.emit('error', er)\n } else {\n this[ONSTAT](job, stat)\n }\n })\n }\n\n [ONSTAT](job: PackJob, stat: Stats) {\n this.statCache.set(job.absolute, stat)\n job.stat = stat\n\n // now we have the stat, we can filter it.\n if (!this.filter(job.path, stat)) {\n job.ignore = true\n }\n\n this[PROCESS]()\n }\n\n [READDIR](job: PackJob) {\n job.pending = true\n this[JOBS] += 1\n fs.readdir(job.absolute, (er, entries) => {\n job.pending = false\n this[JOBS] -= 1\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADDIR](job, entries)\n })\n }\n\n [ONREADDIR](job: PackJob, entries: string[]) {\n this.readdirCache.set(job.absolute, entries)\n job.readdir = entries\n this[PROCESS]()\n }\n\n [PROCESS]() {\n if (this[PROCESSING]) {\n return\n }\n\n this[PROCESSING] = true\n for (\n let w = this[QUEUE].head;\n !!w && this[JOBS] < this.jobs;\n w = w.next\n ) {\n this[PROCESSJOB](w.value)\n if (w.value.ignore) {\n const p = w.next\n this[QUEUE].removeNode(w)\n w.next = p\n }\n }\n\n this[PROCESSING] = false\n\n if (this[ENDED] && !this[QUEUE].length && this[JOBS] === 0) {\n if (this.zip) {\n this.zip.end(EOF)\n } else {\n super.write(EOF as unknown as string)\n super.end()\n }\n }\n }\n\n get [CURRENT]() {\n return this[QUEUE] && this[QUEUE].head && this[QUEUE].head.value\n }\n\n [JOBDONE](_job: PackJob) {\n this[QUEUE].shift()\n this[JOBS] -= 1\n this[PROCESS]()\n }\n\n [PROCESSJOB](job: PackJob) {\n if (job.pending) {\n return\n }\n\n if (job.entry) {\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n return\n }\n\n if (!job.stat) {\n const sc = this.statCache.get(job.absolute)\n if (sc) {\n this[ONSTAT](job, sc)\n } else {\n this[STAT](job)\n }\n }\n if (!job.stat) {\n return\n }\n\n // filtered out!\n if (job.ignore) {\n return\n }\n\n if (\n !this.noDirRecurse &&\n job.stat.isDirectory() &&\n !job.readdir\n ) {\n const rc = this.readdirCache.get(job.absolute)\n if (rc) {\n this[ONREADDIR](job, rc)\n } else {\n this[READDIR](job)\n }\n if (!job.readdir) {\n return\n }\n }\n\n // we know it doesn't have an entry, because that got checked above\n job.entry = this[ENTRY](job)\n if (!job.entry) {\n job.ignore = true\n return\n }\n\n if (job === this[CURRENT] && !job.piped) {\n this[PIPE](job)\n }\n }\n\n [ENTRYOPT](job: PackJob): TarOptions {\n return {\n onwarn: (code, msg, data) => this.warn(code, msg, data),\n noPax: this.noPax,\n cwd: this.cwd,\n absolute: job.absolute,\n preservePaths: this.preservePaths,\n maxReadSize: this.maxReadSize,\n strict: this.strict,\n portable: this.portable,\n linkCache: this.linkCache,\n statCache: this.statCache,\n noMtime: this.noMtime,\n mtime: this.mtime,\n prefix: this.prefix,\n onWriteEntry: this.onWriteEntry,\n }\n }\n\n [ENTRY](job: PackJob) {\n this[JOBS] += 1\n try {\n const e = new this[WRITEENTRYCLASS](\n job.path,\n this[ENTRYOPT](job),\n )\n return e\n .on('end', () => this[JOBDONE](job))\n .on('error', er => this.emit('error', er))\n } catch (er) {\n this.emit('error', er)\n }\n }\n\n [ONDRAIN]() {\n if (this[CURRENT] && this[CURRENT].entry) {\n this[CURRENT].entry.resume()\n }\n }\n\n // like .pipe() but using super, because our write() is special\n [PIPE](job: PackJob) {\n job.piped = true\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n const source = job.entry\n const zip = this.zip\n /* c8 ignore start */\n if (!source) throw new Error('cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n if (!zip.write(chunk)) {\n source.pause()\n }\n })\n } else {\n source.on('data', chunk => {\n if (!super.write(chunk as unknown as string)) {\n source.pause()\n }\n })\n }\n }\n\n pause() {\n if (this.zip) {\n this.zip.pause()\n }\n return super.pause()\n }\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n}\n\nexport class PackSync extends Pack {\n sync: true = true\n constructor(opt: TarOptions) {\n super(opt)\n this[WRITEENTRYCLASS] = WriteEntrySync\n }\n\n // pause/resume are no-ops in sync streams.\n pause() {}\n resume() {}\n\n [STAT](job: PackJob) {\n const stat = this.follow ? 'statSync' : 'lstatSync'\n this[ONSTAT](job, fs[stat](job.absolute))\n }\n\n [READDIR](job: PackJob) {\n this[ONREADDIR](job, fs.readdirSync(job.absolute))\n }\n\n // gotta get it all in this tick\n [PIPE](job: PackJob) {\n const source = job.entry\n const zip = this.zip\n\n if (job.readdir) {\n job.readdir.forEach(entry => {\n const p = job.path\n const base = p === './' ? '' : p.replace(/\\/*$/, '/')\n this[ADDFSENTRY](base + entry)\n })\n }\n\n /* c8 ignore start */\n if (!source) throw new Error('Cannot pipe without source')\n /* c8 ignore stop */\n\n if (zip) {\n source.on('data', chunk => {\n zip.write(chunk)\n })\n } else {\n source.on('data', chunk => {\n super[WRITE](chunk)\n })\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/package.json b/node_modules/tar/dist/esm/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/tar/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/tar/dist/esm/parse.d.ts b/node_modules/tar/dist/esm/parse.d.ts new file mode 100644 index 0000000..e871ff7 --- /dev/null +++ b/node_modules/tar/dist/esm/parse.d.ts @@ -0,0 +1,87 @@ +/// +/// +import { EventEmitter as EE } from 'events'; +import { BrotliDecompress, Unzip } from 'minizlib'; +import { Yallist } from 'yallist'; +import { TarOptions } from './options.js'; +import { Pax } from './pax.js'; +import { ReadEntry } from './read-entry.js'; +import { type WarnData, type Warner } from './warn-method.js'; +declare const STATE: unique symbol; +declare const WRITEENTRY: unique symbol; +declare const READENTRY: unique symbol; +declare const NEXTENTRY: unique symbol; +declare const PROCESSENTRY: unique symbol; +declare const EX: unique symbol; +declare const GEX: unique symbol; +declare const META: unique symbol; +declare const EMITMETA: unique symbol; +declare const BUFFER: unique symbol; +declare const QUEUE: unique symbol; +declare const ENDED: unique symbol; +declare const EMITTEDEND: unique symbol; +declare const EMIT: unique symbol; +declare const UNZIP: unique symbol; +declare const CONSUMECHUNK: unique symbol; +declare const CONSUMECHUNKSUB: unique symbol; +declare const CONSUMEBODY: unique symbol; +declare const CONSUMEMETA: unique symbol; +declare const CONSUMEHEADER: unique symbol; +declare const CONSUMING: unique symbol; +declare const BUFFERCONCAT: unique symbol; +declare const MAYBEEND: unique symbol; +declare const WRITING: unique symbol; +declare const ABORTED: unique symbol; +declare const SAW_VALID_ENTRY: unique symbol; +declare const SAW_NULL_BLOCK: unique symbol; +declare const SAW_EOF: unique symbol; +declare const CLOSESTREAM: unique symbol; +export type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'; +export declare class Parser extends EE implements Warner { + file: string; + strict: boolean; + maxMetaEntrySize: number; + filter: Exclude; + brotli?: TarOptions['brotli']; + writable: true; + readable: false; + [QUEUE]: Yallist; + [BUFFER]?: Buffer; + [READENTRY]?: ReadEntry; + [WRITEENTRY]?: ReadEntry; + [STATE]: State; + [META]: string; + [EX]?: Pax; + [GEX]?: Pax; + [ENDED]: boolean; + [UNZIP]?: false | Unzip | BrotliDecompress; + [ABORTED]: boolean; + [SAW_VALID_ENTRY]?: boolean; + [SAW_NULL_BLOCK]: boolean; + [SAW_EOF]: boolean; + [WRITING]: boolean; + [CONSUMING]: boolean; + [EMITTEDEND]: boolean; + constructor(opt?: TarOptions); + warn(code: string, message: string | Error, data?: WarnData): void; + [CONSUMEHEADER](chunk: Buffer, position: number): void; + [CLOSESTREAM](): void; + [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]): boolean; + [NEXTENTRY](): void; + [CONSUMEBODY](chunk: Buffer, position: number): number; + [CONSUMEMETA](chunk: Buffer, position: number): number; + [EMIT](ev: string | symbol, data?: any, extra?: any): void; + [EMITMETA](entry: ReadEntry): void; + abort(error: Error): void; + write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; + write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; + [BUFFERCONCAT](c: Buffer): void; + [MAYBEEND](): void; + [CONSUMECHUNK](chunk?: Buffer): void; + [CONSUMECHUNKSUB](chunk: Buffer): void; + end(cb?: () => void): this; + end(data: string | Buffer, cb?: () => void): this; + end(str: string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/parse.d.ts.map b/node_modules/tar/dist/esm/parse.d.ts.map new file mode 100644 index 0000000..7d8ff6b --- /dev/null +++ b/node_modules/tar/dist/esm/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":";;AAoBA,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,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AC,CAAC,KAAK,CAAC,EAAE,MAAM;IAkC7B,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM;IA6C/B,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IACjD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;CAmCnE"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/parse.js b/node_modules/tar/dist/esm/parse.js new file mode 100644 index 0000000..cce4304 --- /dev/null +++ b/node_modules/tar/dist/esm/parse.js @@ -0,0 +1,595 @@ +// this[BUFFER] is the remainder of a chunk if we're waiting for +// the full 512 bytes of a header to come in. We will Buffer.concat() +// it to the next write(), which is a mem copy, but a small one. +// +// this[QUEUE] is a Yallist of entries that haven't been emitted +// yet this can only get filled up if the user keeps write()ing after +// a write() returns false, or does a write() with more than one entry +// +// We don't buffer chunks, we always parse them and either create an +// entry, or push it into the active entry. The ReadEntry class knows +// to throw data away if .ignore=true +// +// Shift entry off the buffer when it emits 'end', and emit 'entry' for +// the next one in the list. +// +// At any time, we're pushing body chunks into the entry at WRITEENTRY, +// and waiting for 'end' on the entry at READENTRY +// +// ignored entries get .resume() called on them straight away +import { EventEmitter as EE } from 'events'; +import { BrotliDecompress, Unzip } from 'minizlib'; +import { Yallist } from 'yallist'; +import { Header } from './header.js'; +import { Pax } from './pax.js'; +import { ReadEntry } from './read-entry.js'; +import { warnMethod, } from './warn-method.js'; +const maxMetaEntrySize = 1024 * 1024; +const gzipHeader = Buffer.from([0x1f, 0x8b]); +const STATE = Symbol('state'); +const WRITEENTRY = Symbol('writeEntry'); +const READENTRY = Symbol('readEntry'); +const NEXTENTRY = Symbol('nextEntry'); +const PROCESSENTRY = Symbol('processEntry'); +const EX = Symbol('extendedHeader'); +const GEX = Symbol('globalExtendedHeader'); +const META = Symbol('meta'); +const EMITMETA = Symbol('emitMeta'); +const BUFFER = Symbol('buffer'); +const QUEUE = Symbol('queue'); +const ENDED = Symbol('ended'); +const EMITTEDEND = Symbol('emittedEnd'); +const EMIT = Symbol('emit'); +const UNZIP = Symbol('unzip'); +const CONSUMECHUNK = Symbol('consumeChunk'); +const CONSUMECHUNKSUB = Symbol('consumeChunkSub'); +const CONSUMEBODY = Symbol('consumeBody'); +const CONSUMEMETA = Symbol('consumeMeta'); +const CONSUMEHEADER = Symbol('consumeHeader'); +const CONSUMING = Symbol('consuming'); +const BUFFERCONCAT = Symbol('bufferConcat'); +const MAYBEEND = Symbol('maybeEnd'); +const WRITING = Symbol('writing'); +const ABORTED = Symbol('aborted'); +const DONE = Symbol('onDone'); +const SAW_VALID_ENTRY = Symbol('sawValidEntry'); +const SAW_NULL_BLOCK = Symbol('sawNullBlock'); +const SAW_EOF = Symbol('sawEOF'); +const CLOSESTREAM = Symbol('closeStream'); +const noop = () => true; +export class Parser extends EE { + file; + strict; + maxMetaEntrySize; + filter; + brotli; + writable = true; + readable = false; + [QUEUE] = new Yallist(); + [BUFFER]; + [READENTRY]; + [WRITEENTRY]; + [STATE] = 'begin'; + [META] = ''; + [EX]; + [GEX]; + [ENDED] = false; + [UNZIP]; + [ABORTED] = false; + [SAW_VALID_ENTRY]; + [SAW_NULL_BLOCK] = false; + [SAW_EOF] = false; + [WRITING] = false; + [CONSUMING] = false; + [EMITTEDEND] = false; + constructor(opt = {}) { + super(); + this.file = opt.file || ''; + // these BADARCHIVE errors can't be detected early. listen on DONE. + this.on(DONE, () => { + if (this[STATE] === 'begin' || + this[SAW_VALID_ENTRY] === false) { + // either less than 1 block of data, or all entries were invalid. + // Either way, probably not even a tarball. + this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format'); + } + }); + if (opt.ondone) { + this.on(DONE, opt.ondone); + } + else { + this.on(DONE, () => { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + }); + } + this.strict = !!opt.strict; + this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize; + this.filter = typeof opt.filter === 'function' ? opt.filter : noop; + // Unlike gzip, brotli doesn't have any magic bytes to identify it + // Users need to explicitly tell us they're extracting a brotli file + // Or we infer from the file extension + const isTBR = opt.file && + (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')); + // if it's a tbr file it MIGHT be brotli, but we don't know until + // we look at it and verify it's not a valid tar file. + this.brotli = + !opt.gzip && opt.brotli !== undefined ? opt.brotli + : isTBR ? undefined + : false; + // have to set this so that streams are ok piping into it + this.on('end', () => this[CLOSESTREAM]()); + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + if (typeof opt.onReadEntry === 'function') { + this.on('entry', opt.onReadEntry); + } + } + warn(code, message, data = {}) { + warnMethod(this, code, message, data); + } + [CONSUMEHEADER](chunk, position) { + if (this[SAW_VALID_ENTRY] === undefined) { + this[SAW_VALID_ENTRY] = false; + } + let header; + try { + header = new Header(chunk, position, this[EX], this[GEX]); + } + catch (er) { + return this.warn('TAR_ENTRY_INVALID', er); + } + if (header.nullBlock) { + if (this[SAW_NULL_BLOCK]) { + this[SAW_EOF] = true; + // ending an archive with no entries. pointless, but legal. + if (this[STATE] === 'begin') { + this[STATE] = 'header'; + } + this[EMIT]('eof'); + } + else { + this[SAW_NULL_BLOCK] = true; + this[EMIT]('nullBlock'); + } + } + else { + this[SAW_NULL_BLOCK] = false; + if (!header.cksumValid) { + this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header }); + } + else if (!header.path) { + this.warn('TAR_ENTRY_INVALID', 'path is required', { header }); + } + else { + const type = header.type; + if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath required', { + header, + }); + } + else if (!/^(Symbolic)?Link$/.test(type) && + !/^(Global)?ExtendedHeader$/.test(type) && + header.linkpath) { + this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', { + header, + }); + } + else { + const entry = (this[WRITEENTRY] = new ReadEntry(header, this[EX], this[GEX])); + // we do this for meta & ignored entries as well, because they + // are still valid tar, or else we wouldn't know to ignore them + if (!this[SAW_VALID_ENTRY]) { + if (entry.remain) { + // this might be the one! + const onend = () => { + if (!entry.invalid) { + this[SAW_VALID_ENTRY] = true; + } + }; + entry.on('end', onend); + } + else { + this[SAW_VALID_ENTRY] = true; + } + } + if (entry.meta) { + if (entry.size > this.maxMetaEntrySize) { + entry.ignore = true; + this[EMIT]('ignoredEntry', entry); + this[STATE] = 'ignore'; + entry.resume(); + } + else if (entry.size > 0) { + this[META] = ''; + entry.on('data', c => (this[META] += c)); + this[STATE] = 'meta'; + } + } + else { + this[EX] = undefined; + entry.ignore = + entry.ignore || !this.filter(entry.path, entry); + if (entry.ignore) { + // probably valid, just not something we care about + this[EMIT]('ignoredEntry', entry); + this[STATE] = entry.remain ? 'ignore' : 'header'; + entry.resume(); + } + else { + if (entry.remain) { + this[STATE] = 'body'; + } + else { + this[STATE] = 'header'; + entry.end(); + } + if (!this[READENTRY]) { + this[QUEUE].push(entry); + this[NEXTENTRY](); + } + else { + this[QUEUE].push(entry); + } + } + } + } + } + } + } + [CLOSESTREAM]() { + queueMicrotask(() => this.emit('close')); + } + [PROCESSENTRY](entry) { + let go = true; + if (!entry) { + this[READENTRY] = undefined; + go = false; + } + else if (Array.isArray(entry)) { + const [ev, ...args] = entry; + this.emit(ev, ...args); + } + else { + this[READENTRY] = entry; + this.emit('entry', entry); + if (!entry.emittedEnd) { + entry.on('end', () => this[NEXTENTRY]()); + go = false; + } + } + return go; + } + [NEXTENTRY]() { + do { } while (this[PROCESSENTRY](this[QUEUE].shift())); + if (!this[QUEUE].length) { + // At this point, there's nothing in the queue, but we may have an + // entry which is being consumed (readEntry). + // If we don't, then we definitely can handle more data. + // If we do, and either it's flowing, or it has never had any data + // written to it, then it needs more. + // The only other possibility is that it has returned false from a + // write() call, so we wait for the next drain to continue. + const re = this[READENTRY]; + const drainNow = !re || re.flowing || re.size === re.remain; + if (drainNow) { + if (!this[WRITING]) { + this.emit('drain'); + } + } + else { + re.once('drain', () => this.emit('drain')); + } + } + } + [CONSUMEBODY](chunk, position) { + // write up to but no more than writeEntry.blockRemain + const entry = this[WRITEENTRY]; + /* c8 ignore start */ + if (!entry) { + throw new Error('attempt to consume body without entry??'); + } + const br = entry.blockRemain ?? 0; + /* c8 ignore stop */ + const c = br >= chunk.length && position === 0 ? + chunk + : chunk.subarray(position, position + br); + entry.write(c); + if (!entry.blockRemain) { + this[STATE] = 'header'; + this[WRITEENTRY] = undefined; + entry.end(); + } + return c.length; + } + [CONSUMEMETA](chunk, position) { + const entry = this[WRITEENTRY]; + const ret = this[CONSUMEBODY](chunk, position); + // if we finished, then the entry is reset + if (!this[WRITEENTRY] && entry) { + this[EMITMETA](entry); + } + return ret; + } + [EMIT](ev, data, extra) { + if (!this[QUEUE].length && !this[READENTRY]) { + this.emit(ev, data, extra); + } + else { + this[QUEUE].push([ev, data, extra]); + } + } + [EMITMETA](entry) { + this[EMIT]('meta', this[META]); + switch (entry.type) { + case 'ExtendedHeader': + case 'OldExtendedHeader': + this[EX] = Pax.parse(this[META], this[EX], false); + break; + case 'GlobalExtendedHeader': + this[GEX] = Pax.parse(this[META], this[GEX], true); + break; + case 'NextFileHasLongPath': + case 'OldGnuLongPath': { + const ex = this[EX] ?? Object.create(null); + this[EX] = ex; + ex.path = this[META].replace(/\0.*/, ''); + break; + } + case 'NextFileHasLongLinkpath': { + const ex = this[EX] || Object.create(null); + this[EX] = ex; + ex.linkpath = this[META].replace(/\0.*/, ''); + break; + } + /* c8 ignore start */ + default: + throw new Error('unknown meta: ' + entry.type); + /* c8 ignore stop */ + } + } + abort(error) { + this[ABORTED] = true; + this.emit('abort', error); + // always throws, even in non-strict mode + this.warn('TAR_ABORT', error, { recoverable: false }); + } + write(chunk, encoding, cb) { + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, + /* c8 ignore next */ + typeof encoding === 'string' ? encoding : 'utf8'); + } + if (this[ABORTED]) { + /* c8 ignore next */ + cb?.(); + return false; + } + // first write, might be gzipped + const needSniff = this[UNZIP] === undefined || + (this.brotli === undefined && this[UNZIP] === false); + if (needSniff && chunk) { + if (this[BUFFER]) { + chunk = Buffer.concat([this[BUFFER], chunk]); + this[BUFFER] = undefined; + } + if (chunk.length < gzipHeader.length) { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + // look for gzip header + for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) { + if (chunk[i] !== gzipHeader[i]) { + this[UNZIP] = false; + } + } + const maybeBrotli = this.brotli === undefined; + if (this[UNZIP] === false && maybeBrotli) { + // read the first header to see if it's a valid tar file. If so, + // we can safely assume that it's not actually brotli, despite the + // .tbr or .tar.br file extension. + // if we ended before getting a full chunk, yes, def brotli + if (chunk.length < 512) { + if (this[ENDED]) { + this.brotli = true; + } + else { + this[BUFFER] = chunk; + /* c8 ignore next */ + cb?.(); + return true; + } + } + else { + // if it's tar, it's pretty reliably not brotli, chances of + // that happening are astronomical. + try { + new Header(chunk.subarray(0, 512)); + this.brotli = false; + } + catch (_) { + this.brotli = true; + } + } + } + if (this[UNZIP] === undefined || + (this[UNZIP] === false && this.brotli)) { + const ended = this[ENDED]; + this[ENDED] = false; + this[UNZIP] = + this[UNZIP] === undefined ? + new Unzip({}) + : new BrotliDecompress({}); + this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk)); + this[UNZIP].on('error', er => this.abort(er)); + this[UNZIP].on('end', () => { + this[ENDED] = true; + this[CONSUMECHUNK](); + }); + this[WRITING] = true; + const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk); + this[WRITING] = false; + cb?.(); + return ret; + } + } + this[WRITING] = true; + if (this[UNZIP]) { + this[UNZIP].write(chunk); + } + else { + this[CONSUMECHUNK](chunk); + } + this[WRITING] = false; + // return false if there's a queue, or if the current entry isn't flowing + const ret = this[QUEUE].length ? false + : this[READENTRY] ? this[READENTRY].flowing + : true; + // if we have no queue, then that means a clogged READENTRY + if (!ret && !this[QUEUE].length) { + this[READENTRY]?.once('drain', () => this.emit('drain')); + } + /* c8 ignore next */ + cb?.(); + return ret; + } + [BUFFERCONCAT](c) { + if (c && !this[ABORTED]) { + this[BUFFER] = + this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c; + } + } + [MAYBEEND]() { + if (this[ENDED] && + !this[EMITTEDEND] && + !this[ABORTED] && + !this[CONSUMING]) { + this[EMITTEDEND] = true; + const entry = this[WRITEENTRY]; + if (entry && entry.blockRemain) { + // truncated, likely a damaged file + const have = this[BUFFER] ? this[BUFFER].length : 0; + this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry }); + if (this[BUFFER]) { + entry.write(this[BUFFER]); + } + entry.end(); + } + this[EMIT](DONE); + } + } + [CONSUMECHUNK](chunk) { + if (this[CONSUMING] && chunk) { + this[BUFFERCONCAT](chunk); + } + else if (!chunk && !this[BUFFER]) { + this[MAYBEEND](); + } + else if (chunk) { + this[CONSUMING] = true; + if (this[BUFFER]) { + this[BUFFERCONCAT](chunk); + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + else { + this[CONSUMECHUNKSUB](chunk); + } + while (this[BUFFER] && + this[BUFFER]?.length >= 512 && + !this[ABORTED] && + !this[SAW_EOF]) { + const c = this[BUFFER]; + this[BUFFER] = undefined; + this[CONSUMECHUNKSUB](c); + } + this[CONSUMING] = false; + } + if (!this[BUFFER] || this[ENDED]) { + this[MAYBEEND](); + } + } + [CONSUMECHUNKSUB](chunk) { + // we know that we are in CONSUMING mode, so anything written goes into + // the buffer. Advance the position and put any remainder in the buffer. + let position = 0; + const length = chunk.length; + while (position + 512 <= length && + !this[ABORTED] && + !this[SAW_EOF]) { + switch (this[STATE]) { + case 'begin': + case 'header': + this[CONSUMEHEADER](chunk, position); + position += 512; + break; + case 'ignore': + case 'body': + position += this[CONSUMEBODY](chunk, position); + break; + case 'meta': + position += this[CONSUMEMETA](chunk, position); + break; + /* c8 ignore start */ + default: + throw new Error('invalid state: ' + this[STATE]); + /* c8 ignore stop */ + } + } + if (position < length) { + if (this[BUFFER]) { + this[BUFFER] = Buffer.concat([ + chunk.subarray(position), + this[BUFFER], + ]); + } + else { + this[BUFFER] = chunk.subarray(position); + } + } + } + end(chunk, encoding, cb) { + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + if (cb) + this.once('finish', cb); + if (!this[ABORTED]) { + if (this[UNZIP]) { + /* c8 ignore start */ + if (chunk) + this[UNZIP].write(chunk); + /* c8 ignore stop */ + this[UNZIP].end(); + } + else { + this[ENDED] = true; + if (this.brotli === undefined) + chunk = chunk || Buffer.alloc(0); + if (chunk) + this.write(chunk); + this[MAYBEEND](); + } + } + return this; + } +} +//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/parse.js.map b/node_modules/tar/dist/esm/parse.js.map new file mode 100644 index 0000000..07d716d --- /dev/null +++ b/node_modules/tar/dist/esm/parse.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/parse.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,sEAAsE;AACtE,gEAAgE;AAChE,EAAE;AACF,gEAAgE;AAChE,qEAAqE;AACrE,sEAAsE;AACtE,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,qCAAqC;AACrC,EAAE;AACF,uEAAuE;AACvE,4BAA4B;AAC5B,EAAE;AACF,uEAAuE;AACvE,kDAAkD;AAClD,EAAE;AACF,6DAA6D;AAE7D,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,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,KAAK,KAAK,UAAU,EAAE,CAAC;YAChC,EAAE,GAAG,KAAK,CAAA;YACV,QAAQ,GAAG,SAAS,CAAA;YACpB,KAAK,GAAG,SAAS,CAAA;QACnB,CAAC;QACD,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACnC,EAAE,GAAG,QAAQ,CAAA;YACb,QAAQ,GAAG,SAAS,CAAA;QACtB,CAAC;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACtC,CAAC;QACD,IAAI,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QAC/B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACnB,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAChB,qBAAqB;gBACrB,IAAI,KAAK;oBAAE,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBACnC,oBAAoB;gBACpB,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAA;YACnB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;gBAClB,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;oBAC3B,KAAK,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAClC,IAAI,KAAK;oBAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBAC5B,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this[BUFFER] is the remainder of a chunk if we're waiting for\n// the full 512 bytes of a header to come in. We will Buffer.concat()\n// it to the next write(), which is a mem copy, but a small one.\n//\n// this[QUEUE] is a Yallist of entries that haven't been emitted\n// yet this can only get filled up if the user keeps write()ing after\n// a write() returns false, or does a write() with more than one entry\n//\n// We don't buffer chunks, we always parse them and either create an\n// entry, or push it into the active entry. The ReadEntry class knows\n// to throw data away if .ignore=true\n//\n// Shift entry off the buffer when it emits 'end', and emit 'entry' for\n// the next one in the list.\n//\n// At any time, we're pushing body chunks into the entry at WRITEENTRY,\n// and waiting for 'end' on the entry at READENTRY\n//\n// ignored entries get .resume() called on them straight away\n\nimport { EventEmitter as EE } from 'events'\nimport { BrotliDecompress, Unzip } from 'minizlib'\nimport { Yallist } from 'yallist'\nimport { Header } from './header.js'\nimport { TarOptions } from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport {\n warnMethod,\n type WarnData,\n type Warner,\n} from './warn-method.js'\n\nconst maxMetaEntrySize = 1024 * 1024\nconst gzipHeader = Buffer.from([0x1f, 0x8b])\n\nconst STATE = Symbol('state')\nconst WRITEENTRY = Symbol('writeEntry')\nconst READENTRY = Symbol('readEntry')\nconst NEXTENTRY = Symbol('nextEntry')\nconst PROCESSENTRY = Symbol('processEntry')\nconst EX = Symbol('extendedHeader')\nconst GEX = Symbol('globalExtendedHeader')\nconst META = Symbol('meta')\nconst EMITMETA = Symbol('emitMeta')\nconst BUFFER = Symbol('buffer')\nconst QUEUE = Symbol('queue')\nconst ENDED = Symbol('ended')\nconst EMITTEDEND = Symbol('emittedEnd')\nconst EMIT = Symbol('emit')\nconst UNZIP = Symbol('unzip')\nconst CONSUMECHUNK = Symbol('consumeChunk')\nconst CONSUMECHUNKSUB = Symbol('consumeChunkSub')\nconst CONSUMEBODY = Symbol('consumeBody')\nconst CONSUMEMETA = Symbol('consumeMeta')\nconst CONSUMEHEADER = Symbol('consumeHeader')\nconst CONSUMING = Symbol('consuming')\nconst BUFFERCONCAT = Symbol('bufferConcat')\nconst MAYBEEND = Symbol('maybeEnd')\nconst WRITING = Symbol('writing')\nconst ABORTED = Symbol('aborted')\nconst DONE = Symbol('onDone')\nconst SAW_VALID_ENTRY = Symbol('sawValidEntry')\nconst SAW_NULL_BLOCK = Symbol('sawNullBlock')\nconst SAW_EOF = Symbol('sawEOF')\nconst CLOSESTREAM = Symbol('closeStream')\n\nconst noop = () => true\n\nexport type State = 'begin' | 'header' | 'ignore' | 'meta' | 'body'\n\nexport class Parser extends EE implements Warner {\n file: string\n strict: boolean\n maxMetaEntrySize: number\n filter: Exclude\n brotli?: TarOptions['brotli']\n\n writable: true = true\n readable: false = false;\n\n [QUEUE]: Yallist =\n new Yallist();\n [BUFFER]?: Buffer;\n [READENTRY]?: ReadEntry;\n [WRITEENTRY]?: ReadEntry;\n [STATE]: State = 'begin';\n [META]: string = '';\n [EX]?: Pax;\n [GEX]?: Pax;\n [ENDED]: boolean = false;\n [UNZIP]?: false | Unzip | BrotliDecompress;\n [ABORTED]: boolean = false;\n [SAW_VALID_ENTRY]?: boolean;\n [SAW_NULL_BLOCK]: boolean = false;\n [SAW_EOF]: boolean = false;\n [WRITING]: boolean = false;\n [CONSUMING]: boolean = false;\n [EMITTEDEND]: boolean = false\n\n constructor(opt: TarOptions = {}) {\n super()\n\n this.file = opt.file || ''\n\n // these BADARCHIVE errors can't be detected early. listen on DONE.\n this.on(DONE, () => {\n if (\n this[STATE] === 'begin' ||\n this[SAW_VALID_ENTRY] === false\n ) {\n // either less than 1 block of data, or all entries were invalid.\n // Either way, probably not even a tarball.\n this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format')\n }\n })\n\n if (opt.ondone) {\n this.on(DONE, opt.ondone)\n } else {\n this.on(DONE, () => {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n })\n }\n\n this.strict = !!opt.strict\n this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize\n this.filter = typeof opt.filter === 'function' ? opt.filter : noop\n // Unlike gzip, brotli doesn't have any magic bytes to identify it\n // Users need to explicitly tell us they're extracting a brotli file\n // Or we infer from the file extension\n const isTBR =\n opt.file &&\n (opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'))\n // if it's a tbr file it MIGHT be brotli, but we don't know until\n // we look at it and verify it's not a valid tar file.\n this.brotli =\n !opt.gzip && opt.brotli !== undefined ? opt.brotli\n : isTBR ? undefined\n : false\n\n // have to set this so that streams are ok piping into it\n this.on('end', () => this[CLOSESTREAM]())\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n if (typeof opt.onReadEntry === 'function') {\n this.on('entry', opt.onReadEntry)\n }\n }\n\n warn(\n code: string,\n message: string | Error,\n data: WarnData = {},\n ): void {\n warnMethod(this, code, message, data)\n }\n\n [CONSUMEHEADER](chunk: Buffer, position: number) {\n if (this[SAW_VALID_ENTRY] === undefined) {\n this[SAW_VALID_ENTRY] = false\n }\n let header\n try {\n header = new Header(chunk, position, this[EX], this[GEX])\n } catch (er) {\n return this.warn('TAR_ENTRY_INVALID', er as Error)\n }\n\n if (header.nullBlock) {\n if (this[SAW_NULL_BLOCK]) {\n this[SAW_EOF] = true\n // ending an archive with no entries. pointless, but legal.\n if (this[STATE] === 'begin') {\n this[STATE] = 'header'\n }\n this[EMIT]('eof')\n } else {\n this[SAW_NULL_BLOCK] = true\n this[EMIT]('nullBlock')\n }\n } else {\n this[SAW_NULL_BLOCK] = false\n if (!header.cksumValid) {\n this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header })\n } else if (!header.path) {\n this.warn('TAR_ENTRY_INVALID', 'path is required', { header })\n } else {\n const type = header.type\n if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath required', {\n header,\n })\n } else if (\n !/^(Symbolic)?Link$/.test(type) &&\n !/^(Global)?ExtendedHeader$/.test(type) &&\n header.linkpath\n ) {\n this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {\n header,\n })\n } else {\n const entry = (this[WRITEENTRY] = new ReadEntry(\n header,\n this[EX],\n this[GEX],\n ))\n\n // we do this for meta & ignored entries as well, because they\n // are still valid tar, or else we wouldn't know to ignore them\n if (!this[SAW_VALID_ENTRY]) {\n if (entry.remain) {\n // this might be the one!\n const onend = () => {\n if (!entry.invalid) {\n this[SAW_VALID_ENTRY] = true\n }\n }\n entry.on('end', onend)\n } else {\n this[SAW_VALID_ENTRY] = true\n }\n }\n\n if (entry.meta) {\n if (entry.size > this.maxMetaEntrySize) {\n entry.ignore = true\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = 'ignore'\n entry.resume()\n } else if (entry.size > 0) {\n this[META] = ''\n entry.on('data', c => (this[META] += c))\n this[STATE] = 'meta'\n }\n } else {\n this[EX] = undefined\n entry.ignore =\n entry.ignore || !this.filter(entry.path, entry)\n\n if (entry.ignore) {\n // probably valid, just not something we care about\n this[EMIT]('ignoredEntry', entry)\n this[STATE] = entry.remain ? 'ignore' : 'header'\n entry.resume()\n } else {\n if (entry.remain) {\n this[STATE] = 'body'\n } else {\n this[STATE] = 'header'\n entry.end()\n }\n\n if (!this[READENTRY]) {\n this[QUEUE].push(entry)\n this[NEXTENTRY]()\n } else {\n this[QUEUE].push(entry)\n }\n }\n }\n }\n }\n }\n }\n\n [CLOSESTREAM]() {\n queueMicrotask(() => this.emit('close'))\n }\n\n [PROCESSENTRY](entry?: ReadEntry | [string | symbol, any, any]) {\n let go = true\n\n if (!entry) {\n this[READENTRY] = undefined\n go = false\n } else if (Array.isArray(entry)) {\n const [ev, ...args]: [string | symbol, any, any] = entry\n this.emit(ev, ...args)\n } else {\n this[READENTRY] = entry\n this.emit('entry', entry)\n if (!entry.emittedEnd) {\n entry.on('end', () => this[NEXTENTRY]())\n go = false\n }\n }\n\n return go\n }\n\n [NEXTENTRY]() {\n do {} while (this[PROCESSENTRY](this[QUEUE].shift()))\n\n if (!this[QUEUE].length) {\n // At this point, there's nothing in the queue, but we may have an\n // entry which is being consumed (readEntry).\n // If we don't, then we definitely can handle more data.\n // If we do, and either it's flowing, or it has never had any data\n // written to it, then it needs more.\n // The only other possibility is that it has returned false from a\n // write() call, so we wait for the next drain to continue.\n const re = this[READENTRY]\n const drainNow = !re || re.flowing || re.size === re.remain\n if (drainNow) {\n if (!this[WRITING]) {\n this.emit('drain')\n }\n } else {\n re.once('drain', () => this.emit('drain'))\n }\n }\n }\n\n [CONSUMEBODY](chunk: Buffer, position: number) {\n // write up to but no more than writeEntry.blockRemain\n const entry = this[WRITEENTRY]\n /* c8 ignore start */\n if (!entry) {\n throw new Error('attempt to consume body without entry??')\n }\n const br = entry.blockRemain ?? 0\n /* c8 ignore stop */\n const c =\n br >= chunk.length && position === 0 ?\n chunk\n : chunk.subarray(position, position + br)\n\n entry.write(c)\n\n if (!entry.blockRemain) {\n this[STATE] = 'header'\n this[WRITEENTRY] = undefined\n entry.end()\n }\n\n return c.length\n }\n\n [CONSUMEMETA](chunk: Buffer, position: number) {\n const entry = this[WRITEENTRY]\n const ret = this[CONSUMEBODY](chunk, position)\n\n // if we finished, then the entry is reset\n if (!this[WRITEENTRY] && entry) {\n this[EMITMETA](entry)\n }\n\n return ret\n }\n\n [EMIT](ev: string | symbol, data?: any, extra?: any) {\n if (!this[QUEUE].length && !this[READENTRY]) {\n this.emit(ev, data, extra)\n } else {\n this[QUEUE].push([ev, data, extra])\n }\n }\n\n [EMITMETA](entry: ReadEntry) {\n this[EMIT]('meta', this[META])\n switch (entry.type) {\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this[EX] = Pax.parse(this[META], this[EX], false)\n break\n\n case 'GlobalExtendedHeader':\n this[GEX] = Pax.parse(this[META], this[GEX], true)\n break\n\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath': {\n const ex = this[EX] ?? Object.create(null)\n this[EX] = ex\n ex.path = this[META].replace(/\\0.*/, '')\n break\n }\n\n case 'NextFileHasLongLinkpath': {\n const ex = this[EX] || Object.create(null)\n this[EX] = ex\n ex.linkpath = this[META].replace(/\\0.*/, '')\n break\n }\n\n /* c8 ignore start */\n default:\n throw new Error('unknown meta: ' + entry.type)\n /* c8 ignore stop */\n }\n }\n\n abort(error: Error) {\n this[ABORTED] = true\n this.emit('abort', error)\n // always throws, even in non-strict mode\n this.warn('TAR_ABORT', error, { recoverable: false })\n }\n\n write(\n buffer: Uint8Array | string,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n str: string,\n encoding?: BufferEncoding,\n cb?: (err?: Error | null) => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any),\n cb?: () => any,\n ): boolean {\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n /* c8 ignore next */\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n if (this[ABORTED]) {\n /* c8 ignore next */\n cb?.()\n return false\n }\n\n // first write, might be gzipped\n const needSniff =\n this[UNZIP] === undefined ||\n (this.brotli === undefined && this[UNZIP] === false)\n if (needSniff && chunk) {\n if (this[BUFFER]) {\n chunk = Buffer.concat([this[BUFFER], chunk])\n this[BUFFER] = undefined\n }\n if (chunk.length < gzipHeader.length) {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n\n // look for gzip header\n for (\n let i = 0;\n this[UNZIP] === undefined && i < gzipHeader.length;\n i++\n ) {\n if (chunk[i] !== gzipHeader[i]) {\n this[UNZIP] = false\n }\n }\n\n const maybeBrotli = this.brotli === undefined\n if (this[UNZIP] === false && maybeBrotli) {\n // read the first header to see if it's a valid tar file. If so,\n // we can safely assume that it's not actually brotli, despite the\n // .tbr or .tar.br file extension.\n // if we ended before getting a full chunk, yes, def brotli\n if (chunk.length < 512) {\n if (this[ENDED]) {\n this.brotli = true\n } else {\n this[BUFFER] = chunk\n /* c8 ignore next */\n cb?.()\n return true\n }\n } else {\n // if it's tar, it's pretty reliably not brotli, chances of\n // that happening are astronomical.\n try {\n new Header(chunk.subarray(0, 512))\n this.brotli = false\n } catch (_) {\n this.brotli = true\n }\n }\n }\n\n if (\n this[UNZIP] === undefined ||\n (this[UNZIP] === false && this.brotli)\n ) {\n const ended = this[ENDED]\n this[ENDED] = false\n this[UNZIP] =\n this[UNZIP] === undefined ?\n new Unzip({})\n : new BrotliDecompress({})\n this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk))\n this[UNZIP].on('error', er => this.abort(er as Error))\n this[UNZIP].on('end', () => {\n this[ENDED] = true\n this[CONSUMECHUNK]()\n })\n this[WRITING] = true\n const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk)\n this[WRITING] = false\n cb?.()\n return ret\n }\n }\n\n this[WRITING] = true\n if (this[UNZIP]) {\n this[UNZIP].write(chunk)\n } else {\n this[CONSUMECHUNK](chunk)\n }\n this[WRITING] = false\n\n // return false if there's a queue, or if the current entry isn't flowing\n const ret =\n this[QUEUE].length ? false\n : this[READENTRY] ? this[READENTRY].flowing\n : true\n\n // if we have no queue, then that means a clogged READENTRY\n if (!ret && !this[QUEUE].length) {\n this[READENTRY]?.once('drain', () => this.emit('drain'))\n }\n\n /* c8 ignore next */\n cb?.()\n return ret\n }\n\n [BUFFERCONCAT](c: Buffer) {\n if (c && !this[ABORTED]) {\n this[BUFFER] =\n this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c\n }\n }\n\n [MAYBEEND]() {\n if (\n this[ENDED] &&\n !this[EMITTEDEND] &&\n !this[ABORTED] &&\n !this[CONSUMING]\n ) {\n this[EMITTEDEND] = true\n const entry = this[WRITEENTRY]\n if (entry && entry.blockRemain) {\n // truncated, likely a damaged file\n const have = this[BUFFER] ? this[BUFFER].length : 0\n this.warn(\n 'TAR_BAD_ARCHIVE',\n `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`,\n { entry },\n )\n if (this[BUFFER]) {\n entry.write(this[BUFFER])\n }\n entry.end()\n }\n this[EMIT](DONE)\n }\n }\n\n [CONSUMECHUNK](chunk?: Buffer) {\n if (this[CONSUMING] && chunk) {\n this[BUFFERCONCAT](chunk)\n } else if (!chunk && !this[BUFFER]) {\n this[MAYBEEND]()\n } else if (chunk) {\n this[CONSUMING] = true\n if (this[BUFFER]) {\n this[BUFFERCONCAT](chunk)\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n } else {\n this[CONSUMECHUNKSUB](chunk)\n }\n\n while (\n this[BUFFER] &&\n (this[BUFFER] as Buffer)?.length >= 512 &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n const c = this[BUFFER]\n this[BUFFER] = undefined\n this[CONSUMECHUNKSUB](c)\n }\n this[CONSUMING] = false\n }\n\n if (!this[BUFFER] || this[ENDED]) {\n this[MAYBEEND]()\n }\n }\n\n [CONSUMECHUNKSUB](chunk: Buffer) {\n // we know that we are in CONSUMING mode, so anything written goes into\n // the buffer. Advance the position and put any remainder in the buffer.\n let position = 0\n const length = chunk.length\n while (\n position + 512 <= length &&\n !this[ABORTED] &&\n !this[SAW_EOF]\n ) {\n switch (this[STATE]) {\n case 'begin':\n case 'header':\n this[CONSUMEHEADER](chunk, position)\n position += 512\n break\n\n case 'ignore':\n case 'body':\n position += this[CONSUMEBODY](chunk, position)\n break\n\n case 'meta':\n position += this[CONSUMEMETA](chunk, position)\n break\n\n /* c8 ignore start */\n default:\n throw new Error('invalid state: ' + this[STATE])\n /* c8 ignore stop */\n }\n }\n\n if (position < length) {\n if (this[BUFFER]) {\n this[BUFFER] = Buffer.concat([\n chunk.subarray(position),\n this[BUFFER],\n ])\n } else {\n this[BUFFER] = chunk.subarray(position)\n }\n }\n }\n\n end(cb?: () => void): this\n end(data: string | Buffer, cb?: () => void): this\n end(str: string, encoding?: BufferEncoding, cb?: () => void): this\n end(\n chunk?: string | Buffer | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ) {\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding)\n }\n if (cb) this.once('finish', cb)\n if (!this[ABORTED]) {\n if (this[UNZIP]) {\n /* c8 ignore start */\n if (chunk) this[UNZIP].write(chunk)\n /* c8 ignore stop */\n this[UNZIP].end()\n } else {\n this[ENDED] = true\n if (this.brotli === undefined)\n chunk = chunk || Buffer.alloc(0)\n if (chunk) this.write(chunk)\n this[MAYBEEND]()\n }\n }\n return this\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.d.ts b/node_modules/tar/dist/esm/path-reservations.d.ts new file mode 100644 index 0000000..44f0482 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.d.ts @@ -0,0 +1,11 @@ +export type Reservation = { + paths: string[]; + dirs: Set; +}; +export type Handler = (clear: () => void) => void; +export declare class PathReservations { + #private; + reserve(paths: string[], fn: Handler): boolean; + check(fn: Handler): boolean; +} +//# sourceMappingURL=path-reservations.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.d.ts.map b/node_modules/tar/dist/esm/path-reservations.d.ts.map new file mode 100644 index 0000000..2763014 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.d.ts","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;AAmBjD,qBAAa,gBAAgB;;IAY3B,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,OAAO;IAgEpC,KAAK,CAAC,EAAE,EAAE,OAAO;CA8ElB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.js b/node_modules/tar/dist/esm/path-reservations.js new file mode 100644 index 0000000..e63b9c9 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.js @@ -0,0 +1,166 @@ +// A path exclusive reservation system +// reserve([list, of, paths], fn) +// When the fn is first in line for all its paths, it +// is called with a cb that clears the reservation. +// +// Used by async unpack to avoid clobbering paths in use, +// while still allowing maximal safe parallelization. +import { join } from 'node:path'; +import { normalizeUnicode } from './normalize-unicode.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +// return a set of parent dirs for a given path +// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d'] +const getDirs = (path) => { + const dirs = path + .split('/') + .slice(0, -1) + .reduce((set, path) => { + const s = set[set.length - 1]; + if (s !== undefined) { + path = join(s, path); + } + set.push(path || '/'); + return set; + }, []); + return dirs; +}; +export class PathReservations { + // path => [function or Set] + // A Set object means a directory reservation + // A fn is a direct reservation on that path + #queues = new Map(); + // fn => {paths:[path,...], dirs:[path, ...]} + #reservations = new Map(); + // functions currently running + #running = new Set(); + reserve(paths, fn) { + paths = + isWindows ? + ['win32 parallelization disabled'] + : paths.map(p => { + // don't need normPath, because we skip this entirely for windows + return stripTrailingSlashes(join(normalizeUnicode(p))).toLowerCase(); + }); + const dirs = new Set(paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b))); + this.#reservations.set(fn, { dirs, paths }); + for (const p of paths) { + const q = this.#queues.get(p); + if (!q) { + this.#queues.set(p, [fn]); + } + else { + q.push(fn); + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + if (!q) { + this.#queues.set(dir, [new Set([fn])]); + } + else { + const l = q[q.length - 1]; + if (l instanceof Set) { + l.add(fn); + } + else { + q.push(new Set([fn])); + } + } + } + return this.#run(fn); + } + // return the queues for each path the function cares about + // fn => {paths, dirs} + #getQueues(fn) { + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('function does not have any path reservations'); + } + /* c8 ignore stop */ + return { + paths: res.paths.map((path) => this.#queues.get(path)), + dirs: [...res.dirs].map(path => this.#queues.get(path)), + }; + } + // check if fn is first in line for all its paths, and is + // included in the first set for all its dir queues + check(fn) { + const { paths, dirs } = this.#getQueues(fn); + return (paths.every(q => q && q[0] === fn) && + dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))); + } + // run the function if it's first in line and not already running + #run(fn) { + if (this.#running.has(fn) || !this.check(fn)) { + return false; + } + this.#running.add(fn); + fn(() => this.#clear(fn)); + return true; + } + #clear(fn) { + if (!this.#running.has(fn)) { + return false; + } + const res = this.#reservations.get(fn); + /* c8 ignore start */ + if (!res) { + throw new Error('invalid reservation'); + } + /* c8 ignore stop */ + const { paths, dirs } = res; + const next = new Set(); + for (const path of paths) { + const q = this.#queues.get(path); + /* c8 ignore start */ + if (!q || q?.[0] !== fn) { + continue; + } + /* c8 ignore stop */ + const q0 = q[1]; + if (!q0) { + this.#queues.delete(path); + continue; + } + q.shift(); + if (typeof q0 === 'function') { + next.add(q0); + } + else { + for (const f of q0) { + next.add(f); + } + } + } + for (const dir of dirs) { + const q = this.#queues.get(dir); + const q0 = q?.[0]; + /* c8 ignore next - type safety only */ + if (!q || !(q0 instanceof Set)) + continue; + if (q0.size === 1 && q.length === 1) { + this.#queues.delete(dir); + continue; + } + else if (q0.size === 1) { + q.shift(); + // next one must be a function, + // or else the Set would've been reused + const n = q[0]; + if (typeof n === 'function') { + next.add(n); + } + } + else { + q0.delete(fn); + } + } + this.#running.delete(fn); + next.forEach(fn => this.#run(fn)); + return true; + } +} +//# sourceMappingURL=path-reservations.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/path-reservations.js.map b/node_modules/tar/dist/esm/path-reservations.js.map new file mode 100644 index 0000000..66f54b2 --- /dev/null +++ b/node_modules/tar/dist/esm/path-reservations.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-reservations.js","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAA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,CAAC,CAAC,CAAC,CAAA;gBACb,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;YACf,CAAC;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// A path exclusive reservation system\n// reserve([list, of, paths], fn)\n// When the fn is first in line for all its paths, it\n// is called with a cb that clears the reservation.\n//\n// Used by async unpack to avoid clobbering paths in use,\n// while still allowing maximal safe parallelization.\n\nimport { join } from 'node:path'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\n\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\n\nexport type Reservation = {\n paths: string[]\n dirs: Set\n}\n\nexport type Handler = (clear: () => void) => void\n\n// return a set of parent dirs for a given path\n// '/a/b/c/d' -> ['/', '/a', '/a/b', '/a/b/c', '/a/b/c/d']\nconst getDirs = (path: string) => {\n const dirs = path\n .split('/')\n .slice(0, -1)\n .reduce((set: string[], path) => {\n const s = set[set.length - 1]\n if (s !== undefined) {\n path = join(s, path)\n }\n set.push(path || '/')\n return set\n }, [])\n return dirs\n}\n\nexport class PathReservations {\n // path => [function or Set]\n // A Set object means a directory reservation\n // A fn is a direct reservation on that path\n #queues = new Map)[]>()\n\n // fn => {paths:[path,...], dirs:[path, ...]}\n #reservations = new Map()\n\n // functions currently running\n #running = new Set()\n\n reserve(paths: string[], fn: Handler) {\n paths =\n isWindows ?\n ['win32 parallelization disabled']\n : paths.map(p => {\n // don't need normPath, because we skip this entirely for windows\n return stripTrailingSlashes(\n join(normalizeUnicode(p)),\n ).toLowerCase()\n })\n\n const dirs = new Set(\n paths.map(path => getDirs(path)).reduce((a, b) => a.concat(b)),\n )\n this.#reservations.set(fn, { dirs, paths })\n for (const p of paths) {\n const q = this.#queues.get(p)\n if (!q) {\n this.#queues.set(p, [fn])\n } else {\n q.push(fn)\n }\n }\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n if (!q) {\n this.#queues.set(dir, [new Set([fn])])\n } else {\n const l = q[q.length - 1]\n if (l instanceof Set) {\n l.add(fn)\n } else {\n q.push(new Set([fn]))\n }\n }\n }\n return this.#run(fn)\n }\n\n // return the queues for each path the function cares about\n // fn => {paths, dirs}\n #getQueues(fn: Handler): {\n paths: Handler[][]\n dirs: (Handler | Set)[][]\n } {\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('function does not have any path reservations')\n }\n /* c8 ignore stop */\n return {\n paths: res.paths.map((path: string) =>\n this.#queues.get(path),\n ) as Handler[][],\n dirs: [...res.dirs].map(path => this.#queues.get(path)) as (\n | Handler\n | Set\n )[][],\n }\n }\n\n // check if fn is first in line for all its paths, and is\n // included in the first set for all its dir queues\n check(fn: Handler) {\n const { paths, dirs } = this.#getQueues(fn)\n return (\n paths.every(q => q && q[0] === fn) &&\n dirs.every(q => q && q[0] instanceof Set && q[0].has(fn))\n )\n }\n\n // run the function if it's first in line and not already running\n #run(fn: Handler) {\n if (this.#running.has(fn) || !this.check(fn)) {\n return false\n }\n this.#running.add(fn)\n fn(() => this.#clear(fn))\n return true\n }\n\n #clear(fn: Handler) {\n if (!this.#running.has(fn)) {\n return false\n }\n const res = this.#reservations.get(fn)\n /* c8 ignore start */\n if (!res) {\n throw new Error('invalid reservation')\n }\n /* c8 ignore stop */\n const { paths, dirs } = res\n\n const next = new Set()\n for (const path of paths) {\n const q = this.#queues.get(path)\n /* c8 ignore start */\n if (!q || q?.[0] !== fn) {\n continue\n }\n /* c8 ignore stop */\n const q0 = q[1]\n if (!q0) {\n this.#queues.delete(path)\n continue\n }\n q.shift()\n if (typeof q0 === 'function') {\n next.add(q0)\n } else {\n for (const f of q0) {\n next.add(f)\n }\n }\n }\n\n for (const dir of dirs) {\n const q = this.#queues.get(dir)\n const q0 = q?.[0]\n /* c8 ignore next - type safety only */\n if (!q || !(q0 instanceof Set)) continue\n if (q0.size === 1 && q.length === 1) {\n this.#queues.delete(dir)\n continue\n } else if (q0.size === 1) {\n q.shift()\n // next one must be a function,\n // or else the Set would've been reused\n const n = q[0]\n if (typeof n === 'function') {\n next.add(n)\n }\n } else {\n q0.delete(fn)\n }\n }\n\n this.#running.delete(fn)\n next.forEach(fn => this.#run(fn))\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.d.ts b/node_modules/tar/dist/esm/pax.d.ts new file mode 100644 index 0000000..6749558 --- /dev/null +++ b/node_modules/tar/dist/esm/pax.d.ts @@ -0,0 +1,27 @@ +/// +import { HeaderData } from './header.js'; +export declare class Pax implements HeaderData { + atime?: Date; + mtime?: Date; + ctime?: Date; + charset?: string; + comment?: string; + gid?: number; + uid?: number; + gname?: string; + uname?: string; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + path?: string; + size?: number; + mode?: number; + global: boolean; + constructor(obj: HeaderData, global?: boolean); + encode(): Buffer; + encodeBody(): string; + encodeField(field: keyof Pax): string; + static parse(str: string, ex?: HeaderData, g?: boolean): Pax; +} +//# sourceMappingURL=pax.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.d.ts.map b/node_modules/tar/dist/esm/pax.d.ts.map new file mode 100644 index 0000000..803755c --- /dev/null +++ b/node_modules/tar/dist/esm/pax.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.d.ts","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":";AACA,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,qBAAa,GAAI,YAAW,UAAU;IACpC,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IAEZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,MAAM,EAAE,OAAO,CAAA;gBAEH,GAAG,EAAE,UAAU,EAAE,MAAM,GAAE,OAAe;IAmBpD,MAAM;IAiDN,UAAU;IAoBV,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,MAAM;IA2BrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,GAAE,OAAe;CAG9D"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.js b/node_modules/tar/dist/esm/pax.js new file mode 100644 index 0000000..832808f --- /dev/null +++ b/node_modules/tar/dist/esm/pax.js @@ -0,0 +1,154 @@ +import { basename } from 'node:path'; +import { Header } from './header.js'; +export class Pax { + atime; + mtime; + ctime; + charset; + comment; + gid; + uid; + gname; + uname; + linkpath; + dev; + ino; + nlink; + path; + size; + mode; + global; + constructor(obj, global = false) { + this.atime = obj.atime; + this.charset = obj.charset; + this.comment = obj.comment; + this.ctime = obj.ctime; + this.dev = obj.dev; + this.gid = obj.gid; + this.global = global; + this.gname = obj.gname; + this.ino = obj.ino; + this.linkpath = obj.linkpath; + this.mtime = obj.mtime; + this.nlink = obj.nlink; + this.path = obj.path; + this.size = obj.size; + this.uid = obj.uid; + this.uname = obj.uname; + } + encode() { + const body = this.encodeBody(); + if (body === '') { + return Buffer.allocUnsafe(0); + } + const bodyLen = Buffer.byteLength(body); + // round up to 512 bytes + // add 512 for header + const bufLen = 512 * Math.ceil(1 + bodyLen / 512); + const buf = Buffer.allocUnsafe(bufLen); + // 0-fill the header section, it might not hit every field + for (let i = 0; i < 512; i++) { + buf[i] = 0; + } + new Header({ + // XXX split the path + // then the path should be PaxHeader + basename, but less than 99, + // prepend with the dirname + /* c8 ignore start */ + path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99), + /* c8 ignore stop */ + mode: this.mode || 0o644, + uid: this.uid, + gid: this.gid, + size: bodyLen, + mtime: this.mtime, + type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader', + linkpath: '', + uname: this.uname || '', + gname: this.gname || '', + devmaj: 0, + devmin: 0, + atime: this.atime, + ctime: this.ctime, + }).encode(buf); + buf.write(body, 512, bodyLen, 'utf8'); + // null pad after the body + for (let i = bodyLen + 512; i < buf.length; i++) { + buf[i] = 0; + } + return buf; + } + encodeBody() { + return (this.encodeField('path') + + this.encodeField('ctime') + + this.encodeField('atime') + + this.encodeField('dev') + + this.encodeField('ino') + + this.encodeField('nlink') + + this.encodeField('charset') + + this.encodeField('comment') + + this.encodeField('gid') + + this.encodeField('gname') + + this.encodeField('linkpath') + + this.encodeField('mtime') + + this.encodeField('size') + + this.encodeField('uid') + + this.encodeField('uname')); + } + encodeField(field) { + if (this[field] === undefined) { + return ''; + } + const r = this[field]; + const v = r instanceof Date ? r.getTime() / 1000 : r; + const s = ' ' + + (field === 'dev' || field === 'ino' || field === 'nlink' ? + 'SCHILY.' + : '') + + field + + '=' + + v + + '\n'; + const byteLen = Buffer.byteLength(s); + // the digits includes the length of the digits in ascii base-10 + // so if it's 9 characters, then adding 1 for the 9 makes it 10 + // which makes it 11 chars. + let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1; + if (byteLen + digits >= Math.pow(10, digits)) { + digits += 1; + } + const len = digits + byteLen; + return len + s; + } + static parse(str, ex, g = false) { + return new Pax(merge(parseKV(str), ex), g); + } +} +const merge = (a, b) => b ? Object.assign({}, b, a) : a; +const parseKV = (str) => str + .replace(/\n$/, '') + .split('\n') + .reduce(parseKVLine, Object.create(null)); +const parseKVLine = (set, line) => { + const n = parseInt(line, 10); + // XXX Values with \n in them will fail this. + // Refactor to not be a naive line-by-line parse. + if (n !== Buffer.byteLength(line) + 1) { + return set; + } + line = line.slice((n + ' ').length); + const kv = line.split('='); + const r = kv.shift(); + if (!r) { + return set; + } + const k = r.replace(/^SCHILY\.(dev|ino|nlink)/, '$1'); + const v = kv.join('='); + set[k] = + /^([A-Z]+\.)?([mac]|birth|creation)time$/.test(k) ? + new Date(Number(v) * 1000) + : /^[0-9]+$/.test(v) ? +v + : v; + return set; +}; +//# sourceMappingURL=pax.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/pax.js.map b/node_modules/tar/dist/esm/pax.js.map new file mode 100644 index 0000000..ae71361 --- /dev/null +++ b/node_modules/tar/dist/esm/pax.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pax.js","sourceRoot":"","sources":["../../src/pax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAEhD,MAAM,OAAO,GAAG;IACd,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IAEZ,OAAO,CAAS;IAChB,OAAO,CAAS;IAEhB,GAAG,CAAS;IACZ,GAAG,CAAS;IAEZ,KAAK,CAAS;IACd,KAAK,CAAS;IACd,QAAQ,CAAS;IACjB,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;IACb,IAAI,CAAS;IAEb,MAAM,CAAS;IAEf,YAAY,GAA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IAC7D,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IAE5B,6CAA6C;IAC7C,iDAAiD;IACjD,IAAI,CAAC,KAAK,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;IACnC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1B,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAA;IAEpB,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,0BAA0B,EAAE,IAAI,CAAC,CAAA;IAErD,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACtB,GAAG,CAAC,CAAC,CAAC;QACJ,yCAAyC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;YAC5B,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC,CAAC,CAAC,CAAA;IACL,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import { basename } from 'node:path'\nimport { Header, HeaderData } from './header.js'\n\nexport class Pax implements HeaderData {\n atime?: Date\n mtime?: Date\n ctime?: Date\n\n charset?: string\n comment?: string\n\n gid?: number\n uid?: number\n\n gname?: string\n uname?: string\n linkpath?: string\n dev?: number\n ino?: number\n nlink?: number\n path?: string\n size?: number\n mode?: number\n\n global: boolean\n\n constructor(obj: HeaderData, global: boolean = false) {\n this.atime = obj.atime\n this.charset = obj.charset\n this.comment = obj.comment\n this.ctime = obj.ctime\n this.dev = obj.dev\n this.gid = obj.gid\n this.global = global\n this.gname = obj.gname\n this.ino = obj.ino\n this.linkpath = obj.linkpath\n this.mtime = obj.mtime\n this.nlink = obj.nlink\n this.path = obj.path\n this.size = obj.size\n this.uid = obj.uid\n this.uname = obj.uname\n }\n\n encode() {\n const body = this.encodeBody()\n if (body === '') {\n return Buffer.allocUnsafe(0)\n }\n\n const bodyLen = Buffer.byteLength(body)\n // round up to 512 bytes\n // add 512 for header\n const bufLen = 512 * Math.ceil(1 + bodyLen / 512)\n const buf = Buffer.allocUnsafe(bufLen)\n\n // 0-fill the header section, it might not hit every field\n for (let i = 0; i < 512; i++) {\n buf[i] = 0\n }\n\n new Header({\n // XXX split the path\n // then the path should be PaxHeader + basename, but less than 99,\n // prepend with the dirname\n /* c8 ignore start */\n path: ('PaxHeader/' + basename(this.path ?? '')).slice(0, 99),\n /* c8 ignore stop */\n mode: this.mode || 0o644,\n uid: this.uid,\n gid: this.gid,\n size: bodyLen,\n mtime: this.mtime,\n type: this.global ? 'GlobalExtendedHeader' : 'ExtendedHeader',\n linkpath: '',\n uname: this.uname || '',\n gname: this.gname || '',\n devmaj: 0,\n devmin: 0,\n atime: this.atime,\n ctime: this.ctime,\n }).encode(buf)\n\n buf.write(body, 512, bodyLen, 'utf8')\n\n // null pad after the body\n for (let i = bodyLen + 512; i < buf.length; i++) {\n buf[i] = 0\n }\n\n return buf\n }\n\n encodeBody() {\n return (\n this.encodeField('path') +\n this.encodeField('ctime') +\n this.encodeField('atime') +\n this.encodeField('dev') +\n this.encodeField('ino') +\n this.encodeField('nlink') +\n this.encodeField('charset') +\n this.encodeField('comment') +\n this.encodeField('gid') +\n this.encodeField('gname') +\n this.encodeField('linkpath') +\n this.encodeField('mtime') +\n this.encodeField('size') +\n this.encodeField('uid') +\n this.encodeField('uname')\n )\n }\n\n encodeField(field: keyof Pax): string {\n if (this[field] === undefined) {\n return ''\n }\n const r = this[field]\n const v = r instanceof Date ? r.getTime() / 1000 : r\n const s =\n ' ' +\n (field === 'dev' || field === 'ino' || field === 'nlink' ?\n 'SCHILY.'\n : '') +\n field +\n '=' +\n v +\n '\\n'\n const byteLen = Buffer.byteLength(s)\n // the digits includes the length of the digits in ascii base-10\n // so if it's 9 characters, then adding 1 for the 9 makes it 10\n // which makes it 11 chars.\n let digits = Math.floor(Math.log(byteLen) / Math.log(10)) + 1\n if (byteLen + digits >= Math.pow(10, digits)) {\n digits += 1\n }\n const len = digits + byteLen\n return len + s\n }\n\n static parse(str: string, ex?: HeaderData, g: boolean = false) {\n return new Pax(merge(parseKV(str), ex), g)\n }\n}\n\nconst merge = (a: HeaderData, b?: HeaderData) =>\n b ? Object.assign({}, b, a) : a\n\nconst parseKV = (str: string) =>\n str\n .replace(/\\n$/, '')\n .split('\\n')\n .reduce(parseKVLine, Object.create(null))\n\nconst parseKVLine = (set: Record, line: string) => {\n const n = parseInt(line, 10)\n\n // XXX Values with \\n in them will fail this.\n // Refactor to not be a naive line-by-line parse.\n if (n !== Buffer.byteLength(line) + 1) {\n return set\n }\n\n line = line.slice((n + ' ').length)\n const kv = line.split('=')\n const r = kv.shift()\n\n if (!r) {\n return set\n }\n\n const k = r.replace(/^SCHILY\\.(dev|ino|nlink)/, '$1')\n\n const v = kv.join('=')\n set[k] =\n /^([A-Z]+\\.)?([mac]|birth|creation)time$/.test(k) ?\n new Date(Number(v) * 1000)\n : /^[0-9]+$/.test(v) ? +v\n : v\n return set\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.d.ts b/node_modules/tar/dist/esm/read-entry.d.ts new file mode 100644 index 0000000..60a91cf --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.d.ts @@ -0,0 +1,37 @@ +/// +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { Pax } from './pax.js'; +import { EntryTypeName } from './types.js'; +export declare class ReadEntry extends Minipass { + #private; + extended?: Pax; + globalExtended?: Pax; + header: Header; + startBlockSize: number; + blockRemain: number; + remain: number; + type: EntryTypeName; + meta: boolean; + ignore: boolean; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + size: number; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + dev?: number; + ino?: number; + nlink?: number; + invalid: boolean; + absolute?: string; + unsupported: boolean; + constructor(header: Header, ex?: Pax, gex?: Pax); + write(data: Buffer): boolean; +} +//# sourceMappingURL=read-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.d.ts.map b/node_modules/tar/dist/esm/read-entry.d.ts.map new file mode 100644 index 0000000..b4ec30f --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.d.ts","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,qBAAa,SAAU,SAAQ,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;;IACrD,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,cAAc,CAAC,EAAE,GAAG,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,aAAa,CAAA;IACnB,IAAI,EAAE,OAAO,CAAQ;IACrB,MAAM,EAAE,OAAO,CAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAI;IAChB,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAQ;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAQ;gBAEhB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG;IA+E/C,KAAK,CAAC,IAAI,EAAE,MAAM;CAyCnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.js b/node_modules/tar/dist/esm/read-entry.js new file mode 100644 index 0000000..23cc673 --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.js @@ -0,0 +1,136 @@ +import { Minipass } from 'minipass'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +export class ReadEntry extends Minipass { + extended; + globalExtended; + header; + startBlockSize; + blockRemain; + remain; + type; + meta = false; + ignore = false; + path; + mode; + uid; + gid; + uname; + gname; + size = 0; + mtime; + atime; + ctime; + linkpath; + dev; + ino; + nlink; + invalid = false; + absolute; + unsupported = false; + constructor(header, ex, gex) { + super({}); + // read entries always start life paused. this is to avoid the + // situation where Minipass's auto-ending empty streams results + // in an entry ending before we're ready for it. + this.pause(); + this.extended = ex; + this.globalExtended = gex; + this.header = header; + /* c8 ignore start */ + this.remain = header.size ?? 0; + /* c8 ignore stop */ + this.startBlockSize = 512 * Math.ceil(this.remain / 512); + this.blockRemain = this.startBlockSize; + this.type = header.type; + switch (this.type) { + case 'File': + case 'OldFile': + case 'Link': + case 'SymbolicLink': + case 'CharacterDevice': + case 'BlockDevice': + case 'Directory': + case 'FIFO': + case 'ContiguousFile': + case 'GNUDumpDir': + break; + case 'NextFileHasLongLinkpath': + case 'NextFileHasLongPath': + case 'OldGnuLongPath': + case 'GlobalExtendedHeader': + case 'ExtendedHeader': + case 'OldExtendedHeader': + this.meta = true; + break; + // NOTE: gnutar and bsdtar treat unrecognized types as 'File' + // it may be worth doing the same, but with a warning. + default: + this.ignore = true; + } + /* c8 ignore start */ + if (!header.path) { + throw new Error('no path provided for tar.ReadEntry'); + } + /* c8 ignore stop */ + this.path = normalizeWindowsPath(header.path); + this.mode = header.mode; + if (this.mode) { + this.mode = this.mode & 0o7777; + } + this.uid = header.uid; + this.gid = header.gid; + this.uname = header.uname; + this.gname = header.gname; + this.size = this.remain; + this.mtime = header.mtime; + this.atime = header.atime; + this.ctime = header.ctime; + /* c8 ignore start */ + this.linkpath = + header.linkpath ? + normalizeWindowsPath(header.linkpath) + : undefined; + /* c8 ignore stop */ + this.uname = header.uname; + this.gname = header.gname; + if (ex) { + this.#slurp(ex); + } + if (gex) { + this.#slurp(gex, true); + } + } + write(data) { + const writeLen = data.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + const r = this.remain; + const br = this.blockRemain; + this.remain = Math.max(0, r - writeLen); + this.blockRemain = Math.max(0, br - writeLen); + if (this.ignore) { + return true; + } + if (r >= writeLen) { + return super.write(data); + } + // r < writeLen + return super.write(data.subarray(0, r)); + } + #slurp(ex, gex = false) { + if (ex.path) + ex.path = normalizeWindowsPath(ex.path); + if (ex.linkpath) + ex.linkpath = normalizeWindowsPath(ex.linkpath); + Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => { + // we slurp in everything except for the path attribute in + // a global extended header, because that's weird. Also, any + // null/undefined values are ignored. + return !(v === null || + v === undefined || + (k === 'path' && gex)); + }))); + } +} +//# sourceMappingURL=read-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/read-entry.js.map b/node_modules/tar/dist/esm/read-entry.js.map new file mode 100644 index 0000000..f704154 --- /dev/null +++ b/node_modules/tar/dist/esm/read-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"read-entry.js","sourceRoot":"","sources":["../../src/read-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAIlE,MAAM,OAAO,SAAU,SAAQ,QAAwB;IACrD,QAAQ,CAAM;IACd,cAAc,CAAM;IACpB,MAAM,CAAQ;IACd,cAAc,CAAQ;IACtB,WAAW,CAAQ;IACnB,MAAM,CAAQ;IACd,IAAI,CAAe;IACnB,IAAI,GAAY,KAAK,CAAA;IACrB,MAAM,GAAY,KAAK,CAAA;IACvB,IAAI,CAAQ;IACZ,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,KAAK,CAAS;IACd,IAAI,GAAW,CAAC,CAAA;IAChB,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,KAAK,CAAO;IACZ,QAAQ,CAAS;IAEjB,GAAG,CAAS;IACZ,GAAG,CAAS;IACZ,KAAK,CAAS;IACd,OAAO,GAAY,KAAK,CAAA;IACxB,QAAQ,CAAS;IACjB,WAAW,GAAY,KAAK,CAAA;IAE5B,YAAY,MAAc,EAAE,EAAQ,EAAE,GAAS;QAC7C,KAAK,CAAC,EAAE,CAAC,CAAA;QACT,+DAA+D;QAC/D,+DAA+D;QAC/D,gDAAgD;QAChD,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,cAAc,GAAG,GAAG,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,qBAAqB;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,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,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAA;QACvC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,QAAQ,CAAC,CAAA;QAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,IAAI,CAAA;QACb,CAAC;QAED,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;YAClB,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAC1B,CAAC;QAED,eAAe;QACf,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;IACzC,CAAC;IAED,MAAM,CAAC,EAAO,EAAE,MAAe,KAAK;QAClC,IAAI,EAAE,CAAC,IAAI;YAAE,EAAE,CAAC,IAAI,GAAG,oBAAoB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;QACpD,IAAI,EAAE,CAAC,QAAQ;YAAE,EAAE,CAAC,QAAQ,GAAG,oBAAoB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;QAChE,MAAM,CAAC,MAAM,CACX,IAAI,EACJ,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;YACnC,0DAA0D;YAC1D,4DAA4D;YAC5D,qCAAqC;YACrC,OAAO,CAAC,CACN,CAAC,KAAK,IAAI;gBACV,CAAC,KAAK,SAAS;gBACf,CAAC,CAAC,KAAK,MAAM,IAAI,GAAG,CAAC,CACtB,CAAA;QACH,CAAC,CAAC,CACH,CACF,CAAA;IACH,CAAC;CACF","sourcesContent":["import { Minipass } from 'minipass'\nimport { Header } from './header.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Pax } from './pax.js'\nimport { EntryTypeName } from './types.js'\n\nexport class ReadEntry extends Minipass {\n extended?: Pax\n globalExtended?: Pax\n header: Header\n startBlockSize: number\n blockRemain: number\n remain: number\n type: EntryTypeName\n meta: boolean = false\n ignore: boolean = false\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n size: number = 0\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n\n dev?: number\n ino?: number\n nlink?: number\n invalid: boolean = false\n absolute?: string\n unsupported: boolean = false\n\n constructor(header: Header, ex?: Pax, gex?: Pax) {\n super({})\n // read entries always start life paused. this is to avoid the\n // situation where Minipass's auto-ending empty streams results\n // in an entry ending before we're ready for it.\n this.pause()\n this.extended = ex\n this.globalExtended = gex\n this.header = header\n /* c8 ignore start */\n this.remain = header.size ?? 0\n /* c8 ignore stop */\n this.startBlockSize = 512 * Math.ceil(this.remain / 512)\n this.blockRemain = this.startBlockSize\n this.type = header.type\n switch (this.type) {\n case 'File':\n case 'OldFile':\n case 'Link':\n case 'SymbolicLink':\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'Directory':\n case 'FIFO':\n case 'ContiguousFile':\n case 'GNUDumpDir':\n break\n\n case 'NextFileHasLongLinkpath':\n case 'NextFileHasLongPath':\n case 'OldGnuLongPath':\n case 'GlobalExtendedHeader':\n case 'ExtendedHeader':\n case 'OldExtendedHeader':\n this.meta = true\n break\n\n // NOTE: gnutar and bsdtar treat unrecognized types as 'File'\n // it may be worth doing the same, but with a warning.\n default:\n this.ignore = true\n }\n\n /* c8 ignore start */\n if (!header.path) {\n throw new Error('no path provided for tar.ReadEntry')\n }\n /* c8 ignore stop */\n\n this.path = normalizeWindowsPath(header.path) as string\n this.mode = header.mode\n if (this.mode) {\n this.mode = this.mode & 0o7777\n }\n this.uid = header.uid\n this.gid = header.gid\n this.uname = header.uname\n this.gname = header.gname\n this.size = this.remain\n this.mtime = header.mtime\n this.atime = header.atime\n this.ctime = header.ctime\n /* c8 ignore start */\n this.linkpath =\n header.linkpath ?\n normalizeWindowsPath(header.linkpath)\n : undefined\n /* c8 ignore stop */\n this.uname = header.uname\n this.gname = header.gname\n\n if (ex) {\n this.#slurp(ex)\n }\n if (gex) {\n this.#slurp(gex, true)\n }\n }\n\n write(data: Buffer) {\n const writeLen = data.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n\n const r = this.remain\n const br = this.blockRemain\n this.remain = Math.max(0, r - writeLen)\n this.blockRemain = Math.max(0, br - writeLen)\n if (this.ignore) {\n return true\n }\n\n if (r >= writeLen) {\n return super.write(data)\n }\n\n // r < writeLen\n return super.write(data.subarray(0, r))\n }\n\n #slurp(ex: Pax, gex: boolean = false) {\n if (ex.path) ex.path = normalizeWindowsPath(ex.path)\n if (ex.linkpath) ex.linkpath = normalizeWindowsPath(ex.linkpath)\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'path' && gex)\n )\n }),\n ),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.d.ts b/node_modules/tar/dist/esm/replace.d.ts new file mode 100644 index 0000000..8ae4035 --- /dev/null +++ b/node_modules/tar/dist/esm/replace.d.ts @@ -0,0 +1,2 @@ +export declare const replace: import("./make-command.js").TarCommand; +//# sourceMappingURL=replace.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.d.ts.map b/node_modules/tar/dist/esm/replace.d.ts.map new file mode 100644 index 0000000..66838f5 --- /dev/null +++ b/node_modules/tar/dist/esm/replace.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AA6QA,eAAO,MAAM,OAAO,sDA6BnB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.js b/node_modules/tar/dist/esm/replace.js new file mode 100644 index 0000000..bab622b --- /dev/null +++ b/node_modules/tar/dist/esm/replace.js @@ -0,0 +1,225 @@ +// tar -r +import { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'; +import fs from 'node:fs'; +import path from 'node:path'; +import { Header } from './header.js'; +import { list } from './list.js'; +import { makeCommand } from './make-command.js'; +import { isFile, } from './options.js'; +import { Pack, PackSync } from './pack.js'; +// starting at the head of the file, read a Header +// If the checksum is invalid, that's our position to start writing +// If it is, jump forward by the specified size (round up to 512) +// and try again. +// Write the new Pack stream starting there. +const replaceSync = (opt, files) => { + const p = new PackSync(opt); + let threw = true; + let fd; + let position; + try { + try { + fd = fs.openSync(opt.file, 'r+'); + } + catch (er) { + if (er?.code === 'ENOENT') { + fd = fs.openSync(opt.file, 'w+'); + } + else { + throw er; + } + } + const st = fs.fstatSync(fd); + const headBuf = Buffer.alloc(512); + POSITION: for (position = 0; position < st.size; position += 512) { + for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) { + bytes = fs.readSync(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos); + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + throw new Error('cannot append to compressed archives'); + } + if (!bytes) { + break POSITION; + } + } + const h = new Header(headBuf); + if (!h.cksumValid) { + break; + } + const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512); + if (position + entryBlockSize + 512 > st.size) { + break; + } + // the 512 for the header we just parsed will be added as well + // also jump ahead all the blocks for the body + position += entryBlockSize; + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + } + threw = false; + streamSync(opt, p, position, fd, files); + } + finally { + if (threw) { + try { + fs.closeSync(fd); + } + catch (er) { } + } + } +}; +const streamSync = (opt, p, position, fd, files) => { + const stream = new WriteStreamSync(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + addFilesSync(p, files); +}; +const replaceAsync = (opt, files) => { + files = Array.from(files); + const p = new Pack(opt); + const getPos = (fd, size, cb_) => { + const cb = (er, pos) => { + if (er) { + fs.close(fd, _ => cb_(er)); + } + else { + cb_(null, pos); + } + }; + let position = 0; + if (size === 0) { + return cb(null, 0); + } + let bufPos = 0; + const headBuf = Buffer.alloc(512); + const onread = (er, bytes) => { + if (er || typeof bytes === 'undefined') { + return cb(er); + } + bufPos += bytes; + if (bufPos < 512 && bytes) { + return fs.read(fd, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread); + } + if (position === 0 && + headBuf[0] === 0x1f && + headBuf[1] === 0x8b) { + return cb(new Error('cannot append to compressed archives')); + } + // truncated header + if (bufPos < 512) { + return cb(null, position); + } + const h = new Header(headBuf); + if (!h.cksumValid) { + return cb(null, position); + } + /* c8 ignore next */ + const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512); + if (position + entryBlockSize + 512 > size) { + return cb(null, position); + } + position += entryBlockSize + 512; + if (position >= size) { + return cb(null, position); + } + if (opt.mtimeCache && h.mtime) { + opt.mtimeCache.set(String(h.path), h.mtime); + } + bufPos = 0; + fs.read(fd, headBuf, 0, 512, position, onread); + }; + fs.read(fd, headBuf, 0, 512, position, onread); + }; + const promise = new Promise((resolve, reject) => { + p.on('error', reject); + let flag = 'r+'; + const onopen = (er, fd) => { + if (er && er.code === 'ENOENT' && flag === 'r+') { + flag = 'w+'; + return fs.open(opt.file, flag, onopen); + } + if (er || !fd) { + return reject(er); + } + fs.fstat(fd, (er, st) => { + if (er) { + return fs.close(fd, () => reject(er)); + } + getPos(fd, st.size, (er, position) => { + if (er) { + return reject(er); + } + const stream = new WriteStream(opt.file, { + fd: fd, + start: position, + }); + p.pipe(stream); + stream.on('error', reject); + stream.on('close', resolve); + addFilesAsync(p, files); + }); + }); + }; + fs.open(opt.file, flag, onopen); + }); + return promise; +}; +const addFilesSync = (p, files) => { + files.forEach(file => { + if (file.charAt(0) === '@') { + list({ + file: path.resolve(p.cwd, file.slice(1)), + sync: true, + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + }); + p.end(); +}; +const addFilesAsync = async (p, files) => { + for (let i = 0; i < files.length; i++) { + const file = String(files[i]); + if (file.charAt(0) === '@') { + await list({ + file: path.resolve(String(p.cwd), file.slice(1)), + noResume: true, + onReadEntry: entry => p.add(entry), + }); + } + else { + p.add(file); + } + } + p.end(); +}; +export const replace = makeCommand(replaceSync, replaceAsync, +/* c8 ignore start */ +() => { + throw new TypeError('file is required'); +}, () => { + throw new TypeError('file is required'); +}, +/* c8 ignore stop */ +(opt, entries) => { + if (!isFile(opt)) { + throw new TypeError('file is required'); + } + if (opt.gzip || + opt.brotli || + opt.file.endsWith('.br') || + opt.file.endsWith('.tbr')) { + throw new TypeError('cannot append to compressed archives'); + } + if (!entries?.length) { + throw new TypeError('no paths specified to add/replace'); + } +}); +//# sourceMappingURL=replace.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/replace.js.map b/node_modules/tar/dist/esm/replace.js.map new file mode 100644 index 0000000..f92d2c8 --- /dev/null +++ b/node_modules/tar/dist/esm/replace.js.map @@ -0,0 +1 @@ +{"version":3,"file":"replace.js","sourceRoot":"","sources":["../../src/replace.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAElE,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EACL,MAAM,GAGP,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE1C,kDAAkD;AAClD,mEAAmE;AACnE,iEAAiE;AACjE,iBAAiB;AACjB,4CAA4C;AAE5C,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,KAAe,E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AAQ,CAAC,KAAK,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EACzB,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAA;IAC7D,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAA;IAC1D,CAAC;AACH,CAAC,CACF,CAAA","sourcesContent":["// tar -r\nimport { WriteStream, WriteStreamSync } from '@isaacs/fs-minipass'\nimport { Minipass } from 'minipass'\nimport fs from 'node:fs'\nimport path from 'node:path'\nimport { Header } from './header.js'\nimport { list } from './list.js'\nimport { makeCommand } from './make-command.js'\nimport {\n isFile,\n TarOptionsFile,\n TarOptionsSyncFile,\n} from './options.js'\nimport { Pack, PackSync } from './pack.js'\n\n// starting at the head of the file, read a Header\n// If the checksum is invalid, that's our position to start writing\n// If it is, jump forward by the specified size (round up to 512)\n// and try again.\n// Write the new Pack stream starting there.\n\nconst replaceSync = (opt: TarOptionsSyncFile, files: string[]) => {\n const p = new PackSync(opt)\n\n let threw = true\n let fd\n let position\n\n try {\n try {\n fd = fs.openSync(opt.file, 'r+')\n } catch (er) {\n if ((er as NodeJS.ErrnoException)?.code === 'ENOENT') {\n fd = fs.openSync(opt.file, 'w+')\n } else {\n throw er\n }\n }\n\n const st = fs.fstatSync(fd)\n const headBuf = Buffer.alloc(512)\n\n POSITION: for (\n position = 0;\n position < st.size;\n position += 512\n ) {\n for (let bufPos = 0, bytes = 0; bufPos < 512; bufPos += bytes) {\n bytes = fs.readSync(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n )\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n throw new Error('cannot append to compressed archives')\n }\n\n if (!bytes) {\n break POSITION\n }\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n break\n }\n const entryBlockSize = 512 * Math.ceil((h.size || 0) / 512)\n if (position + entryBlockSize + 512 > st.size) {\n break\n }\n // the 512 for the header we just parsed will be added as well\n // also jump ahead all the blocks for the body\n position += entryBlockSize\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n }\n threw = false\n\n streamSync(opt, p, position, fd, files)\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd as number)\n } catch (er) {}\n }\n }\n}\n\nconst streamSync = (\n opt: TarOptionsSyncFile,\n p: Pack,\n position: number,\n fd: number,\n files: string[],\n) => {\n const stream = new WriteStreamSync(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n addFilesSync(p, files)\n}\n\nconst replaceAsync = (\n opt: TarOptionsFile,\n files: string[],\n): Promise => {\n files = Array.from(files)\n const p = new Pack(opt)\n\n const getPos = (\n fd: number,\n size: number,\n cb_: (er?: null | Error, pos?: number) => void,\n ) => {\n const cb = (er?: Error | null, pos?: number) => {\n if (er) {\n fs.close(fd, _ => cb_(er))\n } else {\n cb_(null, pos)\n }\n }\n\n let position = 0\n if (size === 0) {\n return cb(null, 0)\n }\n\n let bufPos = 0\n const headBuf = Buffer.alloc(512)\n const onread = (er?: null | Error, bytes?: number): void => {\n if (er || typeof bytes === 'undefined') {\n return cb(er)\n }\n bufPos += bytes\n if (bufPos < 512 && bytes) {\n return fs.read(\n fd,\n headBuf,\n bufPos,\n headBuf.length - bufPos,\n position + bufPos,\n onread,\n )\n }\n\n if (\n position === 0 &&\n headBuf[0] === 0x1f &&\n headBuf[1] === 0x8b\n ) {\n return cb(new Error('cannot append to compressed archives'))\n }\n\n // truncated header\n if (bufPos < 512) {\n return cb(null, position)\n }\n\n const h = new Header(headBuf)\n if (!h.cksumValid) {\n return cb(null, position)\n }\n\n /* c8 ignore next */\n const entryBlockSize = 512 * Math.ceil((h.size ?? 0) / 512)\n if (position + entryBlockSize + 512 > size) {\n return cb(null, position)\n }\n\n position += entryBlockSize + 512\n if (position >= size) {\n return cb(null, position)\n }\n\n if (opt.mtimeCache && h.mtime) {\n opt.mtimeCache.set(String(h.path), h.mtime)\n }\n bufPos = 0\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n fs.read(fd, headBuf, 0, 512, position, onread)\n }\n\n const promise = new Promise((resolve, reject) => {\n p.on('error', reject)\n let flag = 'r+'\n const onopen = (\n er?: NodeJS.ErrnoException | null,\n fd?: number,\n ) => {\n if (er && er.code === 'ENOENT' && flag === 'r+') {\n flag = 'w+'\n return fs.open(opt.file, flag, onopen)\n }\n\n if (er || !fd) {\n return reject(er)\n }\n\n fs.fstat(fd, (er, st) => {\n if (er) {\n return fs.close(fd, () => reject(er))\n }\n\n getPos(fd, st.size, (er, position) => {\n if (er) {\n return reject(er)\n }\n const stream = new WriteStream(opt.file, {\n fd: fd,\n start: position,\n })\n p.pipe(stream as unknown as Minipass.Writable)\n stream.on('error', reject)\n stream.on('close', resolve)\n addFilesAsync(p, files)\n })\n })\n }\n fs.open(opt.file, flag, onopen)\n })\n\n return promise\n}\n\nconst addFilesSync = (p: Pack, files: string[]) => {\n files.forEach(file => {\n if (file.charAt(0) === '@') {\n list({\n file: path.resolve(p.cwd, file.slice(1)),\n sync: true,\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n })\n p.end()\n}\n\nconst addFilesAsync = async (\n p: Pack,\n files: string[],\n): Promise => {\n for (let i = 0; i < files.length; i++) {\n const file = String(files[i])\n if (file.charAt(0) === '@') {\n await list({\n file: path.resolve(String(p.cwd), file.slice(1)),\n noResume: true,\n onReadEntry: entry => p.add(entry),\n })\n } else {\n p.add(file)\n }\n }\n p.end()\n}\n\nexport const replace = makeCommand(\n replaceSync,\n replaceAsync,\n /* c8 ignore start */\n (): never => {\n throw new TypeError('file is required')\n },\n (): never => {\n throw new TypeError('file is required')\n },\n /* c8 ignore stop */\n (opt, entries) => {\n if (!isFile(opt)) {\n throw new TypeError('file is required')\n }\n\n if (\n opt.gzip ||\n opt.brotli ||\n opt.file.endsWith('.br') ||\n opt.file.endsWith('.tbr')\n ) {\n throw new TypeError('cannot append to compressed archives')\n }\n\n if (!entries?.length) {\n throw new TypeError('no paths specified to add/replace')\n }\n },\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.d.ts b/node_modules/tar/dist/esm/strip-absolute-path.d.ts new file mode 100644 index 0000000..170ce2c --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.d.ts @@ -0,0 +1,2 @@ +export declare const stripAbsolutePath: (path: string) => string[]; +//# sourceMappingURL=strip-absolute-path.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map b/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map new file mode 100644 index 0000000..83ca6ed --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.d.ts","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,SAAU,MAAM,aAgB7C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.js b/node_modules/tar/dist/esm/strip-absolute-path.js new file mode 100644 index 0000000..cce5ff8 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.js @@ -0,0 +1,25 @@ +// unix absolute paths are also absolute on win32, so we use this for both +import { win32 } from 'node:path'; +const { isAbsolute, parse } = win32; +// returns [root, stripped] +// Note that windows will think that //x/y/z/a has a "root" of //x/y, and in +// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip / +// explicitly if it's the first character. +// drive-specific relative paths on Windows get their root stripped off even +// though they are not absolute, so `c:../foo` becomes ['c:', '../foo'] +export const stripAbsolutePath = (path) => { + let r = ''; + let parsed = parse(path); + while (isAbsolute(path) || parsed.root) { + // windows will think that //x/y/z has a "root" of //x/y/ + // but strip the //?/C:/ off of //?/C:/path + const root = path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ? + '/' + : parsed.root; + path = path.slice(root.length); + r += root; + parsed = parse(path); + } + return [r, path]; +}; +//# sourceMappingURL=strip-absolute-path.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-absolute-path.js.map b/node_modules/tar/dist/esm/strip-absolute-path.js.map new file mode 100644 index 0000000..4f84fa6 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-absolute-path.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-absolute-path.js","sourceRoot":"","sources":["../../src/strip-absolute-path.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AACjC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;AAEnC,2BAA2B;AAC3B,4EAA4E;AAC5E,yEAAyE;AACzE,0CAA0C;AAC1C,4EAA4E;AAC5E,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IAChD,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACvC,yDAAyD;QACzD,2CAA2C;QAC3C,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;YACrD,GAAG;YACL,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;QACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,CAAC,IAAI,IAAI,CAAA;QACT,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA","sourcesContent":["// unix absolute paths are also absolute on win32, so we use this for both\nimport { win32 } from 'node:path'\nconst { isAbsolute, parse } = win32\n\n// returns [root, stripped]\n// Note that windows will think that //x/y/z/a has a \"root\" of //x/y, and in\n// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip /\n// explicitly if it's the first character.\n// drive-specific relative paths on Windows get their root stripped off even\n// though they are not absolute, so `c:../foo` becomes ['c:', '../foo']\nexport const stripAbsolutePath = (path: string) => {\n let r = ''\n\n let parsed = parse(path)\n while (isAbsolute(path) || parsed.root) {\n // windows will think that //x/y/z has a \"root\" of //x/y/\n // but strip the //?/C:/ off of //?/C:/path\n const root =\n path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ?\n '/'\n : parsed.root\n path = path.slice(root.length)\n r += root\n parsed = parse(path)\n }\n return [r, path]\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts new file mode 100644 index 0000000..dcc4637 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts @@ -0,0 +1,2 @@ +export declare const stripTrailingSlashes: (str: string) => string; +//# sourceMappingURL=strip-trailing-slashes.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map new file mode 100644 index 0000000..bf43978 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.d.ts","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB,QAAS,MAAM,WAQ/C,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.js b/node_modules/tar/dist/esm/strip-trailing-slashes.js new file mode 100644 index 0000000..ace4218 --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.js @@ -0,0 +1,14 @@ +// warning: extremely hot code path. +// This has been meticulously optimized for use +// within npm install on large package trees. +// Do not edit without careful benchmarking. +export const stripTrailingSlashes = (str) => { + let i = str.length - 1; + let slashesStart = -1; + while (i > -1 && str.charAt(i) === '/') { + slashesStart = i; + i--; + } + return slashesStart === -1 ? str : str.slice(0, slashesStart); +}; +//# sourceMappingURL=strip-trailing-slashes.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/strip-trailing-slashes.js.map b/node_modules/tar/dist/esm/strip-trailing-slashes.js.map new file mode 100644 index 0000000..dc4d01b --- /dev/null +++ b/node_modules/tar/dist/esm/strip-trailing-slashes.js.map @@ -0,0 +1 @@ +{"version":3,"file":"strip-trailing-slashes.js","sourceRoot":"","sources":["../../src/strip-trailing-slashes.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,+CAA+C;AAC/C,6CAA6C;AAC7C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAClD,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAA;IACtB,IAAI,YAAY,GAAG,CAAC,CAAC,CAAA;IACrB,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACvC,YAAY,GAAG,CAAC,CAAA;QAChB,CAAC,EAAE,CAAA;IACL,CAAC;IACD,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC,CAAA;AAC/D,CAAC,CAAA","sourcesContent":["// warning: extremely hot code path.\n// This has been meticulously optimized for use\n// within npm install on large package trees.\n// Do not edit without careful benchmarking.\nexport const stripTrailingSlashes = (str: string) => {\n let i = str.length - 1\n let slashesStart = -1\n while (i > -1 && str.charAt(i) === '/') {\n slashesStart = i\n i--\n }\n return slashesStart === -1 ? str : str.slice(0, slashesStart)\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.d.ts b/node_modules/tar/dist/esm/symlink-error.d.ts new file mode 100644 index 0000000..61b400f --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.d.ts @@ -0,0 +1,9 @@ +export declare class SymlinkError extends Error { + path: string; + symlink: string; + syscall: 'symlink'; + code: 'TAR_SYMLINK_ERROR'; + constructor(symlink: string, path: string); + get name(): string; +} +//# sourceMappingURL=symlink-error.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.d.ts.map b/node_modules/tar/dist/esm/symlink-error.d.ts.map new file mode 100644 index 0000000..5716e8e --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.d.ts","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,SAAS,CAAY;IAC9B,IAAI,EAAE,mBAAmB,CAAsB;gBACnC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAKzC,IAAI,IAAI,WAEP;CACF"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.js b/node_modules/tar/dist/esm/symlink-error.js new file mode 100644 index 0000000..d31766e --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.js @@ -0,0 +1,15 @@ +export class SymlinkError extends Error { + path; + symlink; + syscall = 'symlink'; + code = 'TAR_SYMLINK_ERROR'; + constructor(symlink, path) { + super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link'); + this.symlink = symlink; + this.path = path; + } + get name() { + return 'SymlinkError'; + } +} +//# sourceMappingURL=symlink-error.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/symlink-error.js.map b/node_modules/tar/dist/esm/symlink-error.js.map new file mode 100644 index 0000000..98ae1a2 --- /dev/null +++ b/node_modules/tar/dist/esm/symlink-error.js.map @@ -0,0 +1 @@ +{"version":3,"file":"symlink-error.js","sourceRoot":"","sources":["../../src/symlink-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,IAAI,CAAQ;IACZ,OAAO,CAAQ;IACf,OAAO,GAAc,SAAS,CAAA;IAC9B,IAAI,GAAwB,mBAAmB,CAAA;IAC/C,YAAY,OAAe,EAAE,IAAY;QACvC,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IACD,IAAI,IAAI;QACN,OAAO,cAAc,CAAA;IACvB,CAAC;CACF","sourcesContent":["export class SymlinkError extends Error {\n path: string\n symlink: string\n syscall: 'symlink' = 'symlink'\n code: 'TAR_SYMLINK_ERROR' = 'TAR_SYMLINK_ERROR'\n constructor(symlink: string, path: string) {\n super('TAR_SYMLINK_ERROR: Cannot extract through symbolic link')\n this.symlink = symlink\n this.path = path\n }\n get name() {\n return 'SymlinkError'\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.d.ts b/node_modules/tar/dist/esm/types.d.ts new file mode 100644 index 0000000..a39f054 --- /dev/null +++ b/node_modules/tar/dist/esm/types.d.ts @@ -0,0 +1,7 @@ +export declare const isCode: (c: string) => c is EntryTypeCode; +export declare const isName: (c: string) => c is EntryTypeName; +export type EntryTypeCode = '0' | '' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | 'g' | 'x' | 'A' | 'D' | 'I' | 'K' | 'L' | 'M' | 'N' | 'S' | 'V' | 'X'; +export type EntryTypeName = 'File' | 'OldFile' | 'Link' | 'SymbolicLink' | 'CharacterDevice' | 'BlockDevice' | 'Directory' | 'FIFO' | 'ContiguousFile' | 'GlobalExtendedHeader' | 'ExtendedHeader' | 'SolarisACL' | 'GNUDumpDir' | 'Inode' | 'NextFileHasLongLinkpath' | 'NextFileHasLongPath' | 'ContinuationFile' | 'OldGnuLongPath' | 'SparseFile' | 'TapeVolumeHeader' | 'OldExtendedHeader' | 'Unsupported'; +export declare const name: Map; +export declare const code: Map; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.d.ts.map b/node_modules/tar/dist/esm/types.d.ts.map new file mode 100644 index 0000000..6e21eeb --- /dev/null +++ b/node_modules/tar/dist/esm/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,eAAO,MAAM,MAAM,MAAO,MAAM,uBACF,CAAA;AAE9B,MAAM,MAAM,aAAa,GACrB,GAAG,GACH,EAAE,GACF,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAA;AAEP,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,SAAS,GACT,MAAM,GACN,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,WAAW,GACX,MAAM,GACN,gBAAgB,GAChB,sBAAsB,GACtB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,yBAAyB,GACzB,qBAAqB,GACrB,kBAAkB,GAClB,gBAAgB,GAChB,YAAY,GACZ,kBAAkB,GAClB,mBAAmB,GACnB,aAAa,CAAA;AAGjB,eAAO,MAAM,IAAI,mCAsCf,CAAA;AAGF,eAAO,MAAM,IAAI,mCAEhB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.js b/node_modules/tar/dist/esm/types.js new file mode 100644 index 0000000..27b982a --- /dev/null +++ b/node_modules/tar/dist/esm/types.js @@ -0,0 +1,45 @@ +export const isCode = (c) => name.has(c); +export const isName = (c) => code.has(c); +// map types from key to human-friendly name +export const name = new Map([ + ['0', 'File'], + // same as File + ['', 'OldFile'], + ['1', 'Link'], + ['2', 'SymbolicLink'], + // Devices and FIFOs aren't fully supported + // they are parsed, but skipped when unpacking + ['3', 'CharacterDevice'], + ['4', 'BlockDevice'], + ['5', 'Directory'], + ['6', 'FIFO'], + // same as File + ['7', 'ContiguousFile'], + // pax headers + ['g', 'GlobalExtendedHeader'], + ['x', 'ExtendedHeader'], + // vendor-specific stuff + // skip + ['A', 'SolarisACL'], + // like 5, but with data, which should be skipped + ['D', 'GNUDumpDir'], + // metadata only, skip + ['I', 'Inode'], + // data = link path of next file + ['K', 'NextFileHasLongLinkpath'], + // data = path of next file + ['L', 'NextFileHasLongPath'], + // skip + ['M', 'ContinuationFile'], + // like L + ['N', 'OldGnuLongPath'], + // skip + ['S', 'SparseFile'], + // skip + ['V', 'TapeVolumeHeader'], + // like x + ['X', 'OldExtendedHeader'], +]); +// map the other direction +export const code = new Map(Array.from(name).map(kv => [kv[1], kv[0]])); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/types.js.map b/node_modules/tar/dist/esm/types.js.map new file mode 100644 index 0000000..f7e8ec7 --- /dev/null +++ b/node_modules/tar/dist/esm/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,IAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,IAAI,CAAC,GAAG,CAAC,C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,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAA","sourcesContent":["export const isCode = (c: string): c is EntryTypeCode =>\n name.has(c as EntryTypeCode)\n\nexport const isName = (c: string): c is EntryTypeName =>\n code.has(c as EntryTypeName)\n\nexport type EntryTypeCode =\n | '0'\n | ''\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | 'g'\n | 'x'\n | 'A'\n | 'D'\n | 'I'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'S'\n | 'V'\n | 'X'\n\nexport type EntryTypeName =\n | 'File'\n | 'OldFile'\n | 'Link'\n | 'SymbolicLink'\n | 'CharacterDevice'\n | 'BlockDevice'\n | 'Directory'\n | 'FIFO'\n | 'ContiguousFile'\n | 'GlobalExtendedHeader'\n | 'ExtendedHeader'\n | 'SolarisACL'\n | 'GNUDumpDir'\n | 'Inode'\n | 'NextFileHasLongLinkpath'\n | 'NextFileHasLongPath'\n | 'ContinuationFile'\n | 'OldGnuLongPath'\n | 'SparseFile'\n | 'TapeVolumeHeader'\n | 'OldExtendedHeader'\n | 'Unsupported'\n\n// map types from key to human-friendly name\nexport const name = new Map([\n ['0', 'File'],\n // same as File\n ['', 'OldFile'],\n ['1', 'Link'],\n ['2', 'SymbolicLink'],\n // Devices and FIFOs aren't fully supported\n // they are parsed, but skipped when unpacking\n ['3', 'CharacterDevice'],\n ['4', 'BlockDevice'],\n ['5', 'Directory'],\n ['6', 'FIFO'],\n // same as File\n ['7', 'ContiguousFile'],\n // pax headers\n ['g', 'GlobalExtendedHeader'],\n ['x', 'ExtendedHeader'],\n // vendor-specific stuff\n // skip\n ['A', 'SolarisACL'],\n // like 5, but with data, which should be skipped\n ['D', 'GNUDumpDir'],\n // metadata only, skip\n ['I', 'Inode'],\n // data = link path of next file\n ['K', 'NextFileHasLongLinkpath'],\n // data = path of next file\n ['L', 'NextFileHasLongPath'],\n // skip\n ['M', 'ContinuationFile'],\n // like L\n ['N', 'OldGnuLongPath'],\n // skip\n ['S', 'SparseFile'],\n // skip\n ['V', 'TapeVolumeHeader'],\n // like x\n ['X', 'OldExtendedHeader'],\n])\n\n// map the other direction\nexport const code = new Map(\n Array.from(name).map(kv => [kv[1], kv[0]]),\n)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.d.ts b/node_modules/tar/dist/esm/unpack.d.ts new file mode 100644 index 0000000..d4542e0 --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.d.ts @@ -0,0 +1,99 @@ +/// +import { type Stats } from 'node:fs'; +import { MkdirError } from './mkdir.js'; +import { Parser } from './parse.js'; +import { TarOptions } from './options.js'; +import { PathReservations } from './path-reservations.js'; +import { ReadEntry } from './read-entry.js'; +import { WarnData } from './warn-method.js'; +declare const ONENTRY: unique symbol; +declare const CHECKFS: unique symbol; +declare const CHECKFS2: unique symbol; +declare const PRUNECACHE: unique symbol; +declare const ISREUSABLE: unique symbol; +declare const MAKEFS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const LINK: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const UNSUPPORTED: unique symbol; +declare const CHECKPATH: unique symbol; +declare const MKDIR: unique symbol; +declare const ONERROR: unique symbol; +declare const PENDING: unique symbol; +declare const PEND: unique symbol; +declare const UNPEND: unique symbol; +declare const ENDED: unique symbol; +declare const MAYBECLOSE: unique symbol; +declare const SKIP: unique symbol; +declare const DOCHOWN: unique symbol; +declare const UID: unique symbol; +declare const GID: unique symbol; +declare const CHECKED_CWD: unique symbol; +export declare class Unpack extends Parser { + [ENDED]: boolean; + [CHECKED_CWD]: boolean; + [PENDING]: number; + reservations: PathReservations; + transform?: TarOptions['transform']; + writable: true; + readable: false; + dirCache: Exclude; + uid?: number; + gid?: number; + setOwner: boolean; + preserveOwner: boolean; + processGid?: number; + processUid?: number; + maxDepth: number; + forceChown: boolean; + win32: boolean; + newer: boolean; + keep: boolean; + noMtime: boolean; + preservePaths: boolean; + unlink: boolean; + cwd: string; + strip: number; + processUmask: number; + umask: number; + dmode: number; + fmode: number; + chmod: boolean; + constructor(opt?: TarOptions); + warn(code: string, msg: string | Error, data?: WarnData): void; + [MAYBECLOSE](): void; + [CHECKPATH](entry: ReadEntry): boolean; + [ONENTRY](entry: ReadEntry): void; + [ONERROR](er: Error, entry: ReadEntry): void; + [MKDIR](dir: string, mode: number, cb: (er?: null | MkdirError, made?: string) => void): void; + [DOCHOWN](entry: ReadEntry): boolean; + [UID](entry: ReadEntry): number | undefined; + [GID](entry: ReadEntry): number | undefined; + [FILE](entry: ReadEntry, fullyDone: () => void): void; + [DIRECTORY](entry: ReadEntry, fullyDone: () => void): void; + [UNSUPPORTED](entry: ReadEntry): void; + [SYMLINK](entry: ReadEntry, done: () => void): void; + [HARDLINK](entry: ReadEntry, done: () => void): void; + [PEND](): void; + [UNPEND](): void; + [SKIP](entry: ReadEntry): void; + [ISREUSABLE](entry: ReadEntry, st: Stats): boolean; + [CHECKFS](entry: ReadEntry): void; + [PRUNECACHE](entry: ReadEntry): void; + [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void): void; + [MAKEFS](er: null | undefined | Error, entry: ReadEntry, done: () => void): void; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export declare class UnpackSync extends Unpack { + sync: true; + [MAKEFS](er: null | Error | undefined, entry: ReadEntry): void; + [CHECKFS](entry: ReadEntry): void; + [FILE](entry: ReadEntry, done: () => void): void; + [DIRECTORY](entry: ReadEntry, done: () => void): void; + [MKDIR](dir: string, mode: number): unknown; + [LINK](entry: ReadEntry, linkpath: string, link: 'link' | 'symlink', done: () => void): void; +} +export {}; +//# sourceMappingURL=unpack.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.d.ts.map b/node_modules/tar/dist/esm/unpack.d.ts.map new file mode 100644 index 0000000..d36f103 --- /dev/null +++ b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1B,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,SAAS;IAkB7B,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,IAAI;IA2G5D,CAAC,MAAM,CAAC,CACN,EAAE,EAAE,IAAI,GAAG,SAAS,GAAG,KAAK,EAC5B,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,MAAM,IAAI;IA0BlB,CAAC,IAAI,CAAC,CACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAanB;AAUD,qBAAa,UAAW,SAAQ,MAAM;IACpC,IAAI,EAAE,IAAI,CAAQ;IAElB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,EAAE,KAAK,EAAE,SAAS;IAIvD,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,SAAS;IAuE1B,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI;IAoFzC,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,IAAI;IAkC9C,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAmBjC,CAAC,IAAI,CAAC,CACJ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE,MAAM,IAAI;CAWnB"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.js b/node_modules/tar/dist/esm/unpack.js new file mode 100644 index 0000000..6e744cf --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.js @@ -0,0 +1,888 @@ +// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet. +// but the path reservations are required to avoid race conditions where +// parallelized unpack ops may mess with one another, due to dependencies +// (like a Link depending on its target) or destructive operations (like +// clobbering an fs object to create one of a different type.) +import * as fsm from '@isaacs/fs-minipass'; +import assert from 'node:assert'; +import { randomBytes } from 'node:crypto'; +import fs from 'node:fs'; +import path from 'node:path'; +import { getWriteFlag } from './get-write-flag.js'; +import { mkdir, mkdirSync } from './mkdir.js'; +import { normalizeUnicode } from './normalize-unicode.js'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +import { Parser } from './parse.js'; +import { stripAbsolutePath } from './strip-absolute-path.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +import * as wc from './winchars.js'; +import { PathReservations } from './path-reservations.js'; +const ONENTRY = Symbol('onEntry'); +const CHECKFS = Symbol('checkFs'); +const CHECKFS2 = Symbol('checkFs2'); +const PRUNECACHE = Symbol('pruneCache'); +const ISREUSABLE = Symbol('isReusable'); +const MAKEFS = Symbol('makeFs'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const LINK = Symbol('link'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const UNSUPPORTED = Symbol('unsupported'); +const CHECKPATH = Symbol('checkPath'); +const MKDIR = Symbol('mkdir'); +const ONERROR = Symbol('onError'); +const PENDING = Symbol('pending'); +const PEND = Symbol('pend'); +const UNPEND = Symbol('unpend'); +const ENDED = Symbol('ended'); +const MAYBECLOSE = Symbol('maybeClose'); +const SKIP = Symbol('skip'); +const DOCHOWN = Symbol('doChown'); +const UID = Symbol('uid'); +const GID = Symbol('gid'); +const CHECKED_CWD = Symbol('checkedCwd'); +const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform; +const isWindows = platform === 'win32'; +const DEFAULT_MAX_DEPTH = 1024; +// Unlinks on Windows are not atomic. +// +// This means that if you have a file entry, followed by another +// file entry with an identical name, and you cannot re-use the file +// (because it's a hardlink, or because unlink:true is set, or it's +// Windows, which does not have useful nlink values), then the unlink +// will be committed to the disk AFTER the new file has been written +// over the old one, deleting the new file. +// +// To work around this, on Windows systems, we rename the file and then +// delete the renamed file. It's a sloppy kludge, but frankly, I do not +// know of a better way to do this, given windows' non-atomic unlink +// semantics. +// +// See: https://github.com/npm/node-tar/issues/183 +/* c8 ignore start */ +const unlinkFile = (path, cb) => { + if (!isWindows) { + return fs.unlink(path, cb); + } + const name = path + '.DELETE.' + randomBytes(16).toString('hex'); + fs.rename(path, name, er => { + if (er) { + return cb(er); + } + fs.unlink(name, cb); + }); +}; +/* c8 ignore stop */ +/* c8 ignore start */ +const unlinkFileSync = (path) => { + if (!isWindows) { + return fs.unlinkSync(path); + } + const name = path + '.DELETE.' + randomBytes(16).toString('hex'); + fs.renameSync(path, name); + fs.unlinkSync(name); +}; +/* c8 ignore stop */ +// this.gid, entry.gid, this.processUid +const uint32 = (a, b, c) => a !== undefined && a === a >>> 0 ? a + : b !== undefined && b === b >>> 0 ? b + : c; +// clear the cache if it's a case-insensitive unicode-squashing match. +// we can't know if the current file system is case-sensitive or supports +// unicode fully, so we check for similarity on the maximally compatible +// representation. Err on the side of pruning, since all it's doing is +// preventing lstats, and it's not the end of the world if we get a false +// positive. +// Note that on windows, we always drop the entire cache whenever a +// symbolic link is encountered, because 8.3 filenames are impossible +// to reason about, and collisions are hazards rather than just failures. +const cacheKeyNormalize = (path) => stripTrailingSlashes(normalizeWindowsPath(normalizeUnicode(path))).toLowerCase(); +// remove all cache entries matching ${abs}/** +const pruneCache = (cache, abs) => { + abs = cacheKeyNormalize(abs); + for (const path of cache.keys()) { + const pnorm = cacheKeyNormalize(path); + if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) { + cache.delete(path); + } + } +}; +const dropCache = (cache) => { + for (const key of cache.keys()) { + cache.delete(key); + } +}; +export class Unpack extends Parser { + [ENDED] = false; + [CHECKED_CWD] = false; + [PENDING] = 0; + reservations = new PathReservations(); + transform; + writable = true; + readable = false; + dirCache; + uid; + gid; + setOwner; + preserveOwner; + processGid; + processUid; + maxDepth; + forceChown; + win32; + newer; + keep; + noMtime; + preservePaths; + unlink; + cwd; + strip; + processUmask; + umask; + dmode; + fmode; + chmod; + constructor(opt = {}) { + opt.ondone = () => { + this[ENDED] = true; + this[MAYBECLOSE](); + }; + super(opt); + this.transform = opt.transform; + this.dirCache = opt.dirCache || new Map(); + this.chmod = !!opt.chmod; + if (typeof opt.uid === 'number' || typeof opt.gid === 'number') { + // need both or neither + if (typeof opt.uid !== 'number' || + typeof opt.gid !== 'number') { + throw new TypeError('cannot set owner without number uid and gid'); + } + if (opt.preserveOwner) { + throw new TypeError('cannot preserve owner in archive and also set owner explicitly'); + } + this.uid = opt.uid; + this.gid = opt.gid; + this.setOwner = true; + } + else { + this.uid = undefined; + this.gid = undefined; + this.setOwner = false; + } + // default true for root + if (opt.preserveOwner === undefined && + typeof opt.uid !== 'number') { + this.preserveOwner = !!(process.getuid && process.getuid() === 0); + } + else { + this.preserveOwner = !!opt.preserveOwner; + } + this.processUid = + (this.preserveOwner || this.setOwner) && process.getuid ? + process.getuid() + : undefined; + this.processGid = + (this.preserveOwner || this.setOwner) && process.getgid ? + process.getgid() + : undefined; + // prevent excessively deep nesting of subfolders + // set to `Infinity` to remove this restriction + this.maxDepth = + typeof opt.maxDepth === 'number' ? + opt.maxDepth + : DEFAULT_MAX_DEPTH; + // mostly just for testing, but useful in some cases. + // Forcibly trigger a chown on every entry, no matter what + this.forceChown = opt.forceChown === true; + // turn > this[ONENTRY](entry)); + } + // a bad or damaged archive is a warning for Parser, but an error + // when extracting. Mark those errors as unrecoverable, because + // the Unpack contract cannot be met. + warn(code, msg, data = {}) { + if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') { + data.recoverable = false; + } + return super.warn(code, msg, data); + } + [MAYBECLOSE]() { + if (this[ENDED] && this[PENDING] === 0) { + this.emit('prefinish'); + this.emit('finish'); + this.emit('end'); + } + } + [CHECKPATH](entry) { + const p = normalizeWindowsPath(entry.path); + const parts = p.split('/'); + if (this.strip) { + if (parts.length < this.strip) { + return false; + } + if (entry.type === 'Link') { + const linkparts = normalizeWindowsPath(String(entry.linkpath)).split('/'); + if (linkparts.length >= this.strip) { + entry.linkpath = linkparts.slice(this.strip).join('/'); + } + else { + return false; + } + } + parts.splice(0, this.strip); + entry.path = parts.join('/'); + } + if (isFinite(this.maxDepth) && parts.length > this.maxDepth) { + this.warn('TAR_ENTRY_ERROR', 'path excessively deep', { + entry, + path: p, + depth: parts.length, + maxDepth: this.maxDepth, + }); + return false; + } + if (!this.preservePaths) { + if (parts.includes('..') || + /* c8 ignore next */ + (isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? ''))) { + this.warn('TAR_ENTRY_ERROR', `path contains '..'`, { + entry, + path: p, + }); + return false; + } + // strip off the root + const [root, stripped] = stripAbsolutePath(p); + if (root) { + entry.path = String(stripped); + this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, { + entry, + path: p, + }); + } + } + if (path.isAbsolute(entry.path)) { + entry.absolute = normalizeWindowsPath(path.resolve(entry.path)); + } + else { + entry.absolute = normalizeWindowsPath(path.resolve(this.cwd, entry.path)); + } + // if we somehow ended up with a path that escapes the cwd, and we are + // not in preservePaths mode, then something is fishy! This should have + // been prevented above, so ignore this for coverage. + /* c8 ignore start - defense in depth */ + if (!this.preservePaths && + typeof entry.absolute === 'string' && + entry.absolute.indexOf(this.cwd + '/') !== 0 && + entry.absolute !== this.cwd) { + this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', { + entry, + path: normalizeWindowsPath(entry.path), + resolvedPath: entry.absolute, + cwd: this.cwd, + }); + return false; + } + /* c8 ignore stop */ + // an archive can set properties on the extraction directory, but it + // may not replace the cwd with a different kind of thing entirely. + if (entry.absolute === this.cwd && + entry.type !== 'Directory' && + entry.type !== 'GNUDumpDir') { + return false; + } + // only encode : chars that aren't drive letter indicators + if (this.win32) { + const { root: aRoot } = path.win32.parse(String(entry.absolute)); + entry.absolute = + aRoot + wc.encode(String(entry.absolute).slice(aRoot.length)); + const { root: pRoot } = path.win32.parse(entry.path); + entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length)); + } + return true; + } + [ONENTRY](entry) { + if (!this[CHECKPATH](entry)) { + return entry.resume(); + } + assert.equal(typeof entry.absolute, 'string'); + switch (entry.type) { + case 'Directory': + case 'GNUDumpDir': + if (entry.mode) { + entry.mode = entry.mode | 0o700; + } + // eslint-disable-next-line no-fallthrough + case 'File': + case 'OldFile': + case 'ContiguousFile': + case 'Link': + case 'SymbolicLink': + return this[CHECKFS](entry); + case 'CharacterDevice': + case 'BlockDevice': + case 'FIFO': + default: + return this[UNSUPPORTED](entry); + } + } + [ONERROR](er, entry) { + // Cwd has to exist, or else nothing works. That's serious. + // Other errors are warnings, which raise the error in strict + // mode, but otherwise continue on. + if (er.name === 'CwdError') { + this.emit('error', er); + } + else { + this.warn('TAR_ENTRY_ERROR', er, { entry }); + this[UNPEND](); + entry.resume(); + } + } + [MKDIR](dir, mode, cb) { + mkdir(normalizeWindowsPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }, cb); + } + [DOCHOWN](entry) { + // in preserve owner mode, chown if the entry doesn't match process + // in set owner mode, chown if setting doesn't match process + return (this.forceChown || + (this.preserveOwner && + ((typeof entry.uid === 'number' && + entry.uid !== this.processUid) || + (typeof entry.gid === 'number' && + entry.gid !== this.processGid))) || + (typeof this.uid === 'number' && + this.uid !== this.processUid) || + (typeof this.gid === 'number' && this.gid !== this.processGid)); + } + [UID](entry) { + return uint32(this.uid, entry.uid, this.processUid); + } + [GID](entry) { + return uint32(this.gid, entry.gid, this.processGid); + } + [FILE](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const stream = new fsm.WriteStream(String(entry.absolute), { + // slight lie, but it can be numeric flags + flags: getWriteFlag(entry.size), + mode: mode, + autoClose: false, + }); + stream.on('error', (er) => { + if (stream.fd) { + fs.close(stream.fd, () => { }); + } + // flush all the data out so that we aren't left hanging + // if the error wasn't actually fatal. otherwise the parse + // is blocked, and we never proceed. + stream.write = () => true; + this[ONERROR](er, entry); + fullyDone(); + }); + let actions = 1; + const done = (er) => { + if (er) { + /* c8 ignore start - we should always have a fd by now */ + if (stream.fd) { + fs.close(stream.fd, () => { }); + } + /* c8 ignore stop */ + this[ONERROR](er, entry); + fullyDone(); + return; + } + if (--actions === 0) { + if (stream.fd !== undefined) { + fs.close(stream.fd, er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + } + fullyDone(); + }); + } + } + }; + stream.on('finish', () => { + // if futimes fails, try utimes + // if utimes fails, fail with the original error + // same for fchown/chown + const abs = String(entry.absolute); + const fd = stream.fd; + if (typeof fd === 'number' && entry.mtime && !this.noMtime) { + actions++; + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + fs.futimes(fd, atime, mtime, er => er ? + fs.utimes(abs, atime, mtime, er2 => done(er2 && er)) + : done()); + } + if (typeof fd === 'number' && this[DOCHOWN](entry)) { + actions++; + const uid = this[UID](entry); + const gid = this[GID](entry); + if (typeof uid === 'number' && typeof gid === 'number') { + fs.fchown(fd, uid, gid, er => er ? + fs.chown(abs, uid, gid, er2 => done(er2 && er)) + : done()); + } + } + done(); + }); + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => { + this[ONERROR](er, entry); + fullyDone(); + }); + entry.pipe(tx); + } + tx.pipe(stream); + } + [DIRECTORY](entry, fullyDone) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + this[MKDIR](String(entry.absolute), mode, er => { + if (er) { + this[ONERROR](er, entry); + fullyDone(); + return; + } + let actions = 1; + const done = () => { + if (--actions === 0) { + fullyDone(); + this[UNPEND](); + entry.resume(); + } + }; + if (entry.mtime && !this.noMtime) { + actions++; + fs.utimes(String(entry.absolute), entry.atime || new Date(), entry.mtime, done); + } + if (this[DOCHOWN](entry)) { + actions++; + fs.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done); + } + done(); + }); + } + [UNSUPPORTED](entry) { + entry.unsupported = true; + this.warn('TAR_ENTRY_UNSUPPORTED', `unsupported entry type: ${entry.type}`, { entry }); + entry.resume(); + } + [SYMLINK](entry, done) { + this[LINK](entry, String(entry.linkpath), 'symlink', done); + } + [HARDLINK](entry, done) { + const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath))); + this[LINK](entry, linkpath, 'link', done); + } + [PEND]() { + this[PENDING]++; + } + [UNPEND]() { + this[PENDING]--; + this[MAYBECLOSE](); + } + [SKIP](entry) { + this[UNPEND](); + entry.resume(); + } + // Check if we can reuse an existing filesystem entry safely and + // overwrite it, rather than unlinking and recreating + // Windows doesn't report a useful nlink, so we just never reuse entries + [ISREUSABLE](entry, st) { + return (entry.type === 'File' && + !this.unlink && + st.isFile() && + st.nlink <= 1 && + !isWindows); + } + // check if a thing is there, and if so, try to clobber it + [CHECKFS](entry) { + this[PEND](); + const paths = [entry.path]; + if (entry.linkpath) { + paths.push(entry.linkpath); + } + this.reservations.reserve(paths, done => this[CHECKFS2](entry, done)); + } + [PRUNECACHE](entry) { + // if we are not creating a directory, and the path is in the dirCache, + // then that means we are about to delete the directory we created + // previously, and it is no longer going to be a directory, and neither + // is any of its children. + // If a symbolic link is encountered, all bets are off. There is no + // reasonable way to sanitize the cache in such a way we will be able to + // avoid having filesystem collisions. If this happens with a non-symlink + // entry, it'll just fail to unpack, but a symlink to a directory, using an + // 8.3 shortname or certain unicode attacks, can evade detection and lead + // to arbitrary writes to anywhere on the system. + if (entry.type === 'SymbolicLink') { + dropCache(this.dirCache); + } + else if (entry.type !== 'Directory') { + pruneCache(this.dirCache, String(entry.absolute)); + } + } + [CHECKFS2](entry, fullyDone) { + this[PRUNECACHE](entry); + const done = (er) => { + this[PRUNECACHE](entry); + fullyDone(er); + }; + const checkCwd = () => { + this[MKDIR](this.cwd, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + this[CHECKED_CWD] = true; + start(); + }); + }; + const start = () => { + if (entry.absolute !== this.cwd) { + const parent = normalizeWindowsPath(path.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + return this[MKDIR](parent, this.dmode, er => { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + afterMakeParent(); + }); + } + } + afterMakeParent(); + }; + const afterMakeParent = () => { + fs.lstat(String(entry.absolute), (lstatEr, st) => { + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + this[SKIP](entry); + done(); + return; + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry, done); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const afterChmod = (er) => this[MAKEFS](er ?? null, entry, done); + if (!needChmod) { + return afterChmod(); + } + return fs.chmod(String(entry.absolute), Number(entry.mode), afterChmod); + } + // Not a dir entry, have to remove it. + // NB: the only way to end up with an entry that is the cwd + // itself, in such a way that == does not detect, is a + // tricky windows absolute path with UNC or 8.3 parts (and + // preservePaths:true, or else it will have been stripped). + // In that case, the user has opted out of path protections + // explicitly, so if they blow away the cwd, c'est la vie. + if (entry.absolute !== this.cwd) { + return fs.rmdir(String(entry.absolute), (er) => this[MAKEFS](er ?? null, entry, done)); + } + } + // not a dir, and not reusable + // don't remove if the cwd, we want that error + if (entry.absolute === this.cwd) { + return this[MAKEFS](null, entry, done); + } + unlinkFile(String(entry.absolute), er => this[MAKEFS](er ?? null, entry, done)); + }); + }; + if (this[CHECKED_CWD]) { + start(); + } + else { + checkCwd(); + } + } + [MAKEFS](er, entry, done) { + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + switch (entry.type) { + case 'File': + case 'OldFile': + case 'ContiguousFile': + return this[FILE](entry, done); + case 'Link': + return this[HARDLINK](entry, done); + case 'SymbolicLink': + return this[SYMLINK](entry, done); + case 'Directory': + case 'GNUDumpDir': + return this[DIRECTORY](entry, done); + } + } + [LINK](entry, linkpath, link, done) { + // XXX: get the type ('symlink' or 'junction') for windows + fs[link](linkpath, String(entry.absolute), er => { + if (er) { + this[ONERROR](er, entry); + } + else { + this[UNPEND](); + entry.resume(); + } + done(); + }); + } +} +const callSync = (fn) => { + try { + return [null, fn()]; + } + catch (er) { + return [er, null]; + } +}; +export class UnpackSync extends Unpack { + sync = true; + [MAKEFS](er, entry) { + return super[MAKEFS](er, entry, () => { }); + } + [CHECKFS](entry) { + this[PRUNECACHE](entry); + if (!this[CHECKED_CWD]) { + const er = this[MKDIR](this.cwd, this.dmode); + if (er) { + return this[ONERROR](er, entry); + } + this[CHECKED_CWD] = true; + } + // don't bother to make the parent if the current entry is the cwd, + // we've already checked it. + if (entry.absolute !== this.cwd) { + const parent = normalizeWindowsPath(path.dirname(String(entry.absolute))); + if (parent !== this.cwd) { + const mkParent = this[MKDIR](parent, this.dmode); + if (mkParent) { + return this[ONERROR](mkParent, entry); + } + } + } + const [lstatEr, st] = callSync(() => fs.lstatSync(String(entry.absolute))); + if (st && + (this.keep || + /* c8 ignore next */ + (this.newer && st.mtime > (entry.mtime ?? st.mtime)))) { + return this[SKIP](entry); + } + if (lstatEr || this[ISREUSABLE](entry, st)) { + return this[MAKEFS](null, entry); + } + if (st.isDirectory()) { + if (entry.type === 'Directory') { + const needChmod = this.chmod && + entry.mode && + (st.mode & 0o7777) !== entry.mode; + const [er] = needChmod ? + callSync(() => { + fs.chmodSync(String(entry.absolute), Number(entry.mode)); + }) + : []; + return this[MAKEFS](er, entry); + } + // not a dir entry, have to remove it + const [er] = callSync(() => fs.rmdirSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + // not a dir, and not reusable. + // don't remove if it's the cwd, since we want that error. + const [er] = entry.absolute === this.cwd ? + [] + : callSync(() => unlinkFileSync(String(entry.absolute))); + this[MAKEFS](er, entry); + } + [FILE](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.fmode; + const oner = (er) => { + let closeError; + try { + fs.closeSync(fd); + } + catch (e) { + closeError = e; + } + if (er || closeError) { + this[ONERROR](er || closeError, entry); + } + done(); + }; + let fd; + try { + fd = fs.openSync(String(entry.absolute), getWriteFlag(entry.size), mode); + } + catch (er) { + return oner(er); + } + const tx = this.transform ? this.transform(entry) || entry : entry; + if (tx !== entry) { + tx.on('error', (er) => this[ONERROR](er, entry)); + entry.pipe(tx); + } + tx.on('data', (chunk) => { + try { + fs.writeSync(fd, chunk, 0, chunk.length); + } + catch (er) { + oner(er); + } + }); + tx.on('end', () => { + let er = null; + // try both, falling futimes back to utimes + // if either fails, handle the first error + if (entry.mtime && !this.noMtime) { + const atime = entry.atime || new Date(); + const mtime = entry.mtime; + try { + fs.futimesSync(fd, atime, mtime); + } + catch (futimeser) { + try { + fs.utimesSync(String(entry.absolute), atime, mtime); + } + catch (utimeser) { + er = futimeser; + } + } + } + if (this[DOCHOWN](entry)) { + const uid = this[UID](entry); + const gid = this[GID](entry); + try { + fs.fchownSync(fd, Number(uid), Number(gid)); + } + catch (fchowner) { + try { + fs.chownSync(String(entry.absolute), Number(uid), Number(gid)); + } + catch (chowner) { + er = er || fchowner; + } + } + } + oner(er); + }); + } + [DIRECTORY](entry, done) { + const mode = typeof entry.mode === 'number' ? + entry.mode & 0o7777 + : this.dmode; + const er = this[MKDIR](String(entry.absolute), mode); + if (er) { + this[ONERROR](er, entry); + done(); + return; + } + if (entry.mtime && !this.noMtime) { + try { + fs.utimesSync(String(entry.absolute), entry.atime || new Date(), entry.mtime); + /* c8 ignore next */ + } + catch (er) { } + } + if (this[DOCHOWN](entry)) { + try { + fs.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry))); + } + catch (er) { } + } + done(); + entry.resume(); + } + [MKDIR](dir, mode) { + try { + return mkdirSync(normalizeWindowsPath(dir), { + uid: this.uid, + gid: this.gid, + processUid: this.processUid, + processGid: this.processGid, + umask: this.processUmask, + preserve: this.preservePaths, + unlink: this.unlink, + cache: this.dirCache, + cwd: this.cwd, + mode: mode, + }); + } + catch (er) { + return er; + } + } + [LINK](entry, linkpath, link, done) { + const ls = `${link}Sync`; + try { + fs[ls](linkpath, String(entry.absolute)); + done(); + entry.resume(); + } + catch (er) { + return this[ONERROR](er, entry); + } + } +} +//# sourceMappingURL=unpack.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/unpack.js.map b/node_modules/tar/dist/esm/unpack.js.map new file mode 100644 index 0000000..fc0a620 --- /dev/null +++ b/node_modules/tar/dist/esm/unpack.js.map @@ -0,0 +1 @@ +{"version":3,"file":"unpack.js","sourceRoot":"","sources":["../../src/unpack.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AACxE,8DAA8D;AAE9D,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAkB,MAAM,SAAS,CAAA;AACxC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,KAAK,EAAc,SAAS,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,MAAM,eAAe,CAAA;AAGnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAIzD,MA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AAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE;gBAC1C,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,KAAK,EAAE,IAAI,CAAC,YAAY;gBACxB,QAAQ,EAAE,IAAI,CAAC,aAAa;gBAC5B,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,IAAI,CAAC,QAAQ;gBACpB,GAAG,EAAE,IAAI,CAAC,GAAG;gBACb,IAAI,EAAE,IAAI;aACX,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,EAAE,CAAA;QACX,CAAC;IACH,CAAC;IAED,CAAC,IAAI,CAAC,CACJ,KAAgB,EAChB,QAAgB,EAChB,IAAwB,EACxB,IAAgB;QAEhB,MAAM,EAAE,GAAyB,GAAG,IAAI,MAAM,CAAA;QAC9C,IAAI,CAAC;YACH,EAAE,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;YACxC,IAAI,EAAE,CAAA;YACN,KAAK,CAAC,MAAM,EAAE,CAAA;QAChB,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,EAAW,EAAE,KAAK,CAAC,CAAA;QAC1C,CAAC;IACH,CAAC;CACF","sourcesContent":["// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.\n// but the path reservations are required to avoid race conditions where\n// parallelized unpack ops may mess with one another, due to dependencies\n// (like a Link depending on its target) or destructive operations (like\n// clobbering an fs object to create one of a different type.)\n\nimport * as fsm from '@isaacs/fs-minipass'\nimport assert from 'node:assert'\nimport { randomBytes } from 'node:crypto'\nimport fs, { type Stats } from 'node:fs'\nimport path from 'node:path'\nimport { getWriteFlag } from './get-write-flag.js'\nimport { mkdir, MkdirError, mkdirSync } from './mkdir.js'\nimport { normalizeUnicode } from './normalize-unicode.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport { Parser } from './parse.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport * as wc from './winchars.js'\n\nimport { TarOptions } from './options.js'\nimport { PathReservations } from './path-reservations.js'\nimport { ReadEntry } from './read-entry.js'\nimport { WarnData } from './warn-method.js'\n\nconst ONENTRY = Symbol('onEntry')\nconst CHECKFS = Symbol('checkFs')\nconst CHECKFS2 = Symbol('checkFs2')\nconst PRUNECACHE = Symbol('pruneCache')\nconst ISREUSABLE = Symbol('isReusable')\nconst MAKEFS = Symbol('makeFs')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst LINK = Symbol('link')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst UNSUPPORTED = Symbol('unsupported')\nconst CHECKPATH = Symbol('checkPath')\nconst MKDIR = Symbol('mkdir')\nconst ONERROR = Symbol('onError')\nconst PENDING = Symbol('pending')\nconst PEND = Symbol('pend')\nconst UNPEND = Symbol('unpend')\nconst ENDED = Symbol('ended')\nconst MAYBECLOSE = Symbol('maybeClose')\nconst SKIP = Symbol('skip')\nconst DOCHOWN = Symbol('doChown')\nconst UID = Symbol('uid')\nconst GID = Symbol('gid')\nconst CHECKED_CWD = Symbol('checkedCwd')\nconst platform =\n process.env.TESTING_TAR_FAKE_PLATFORM || process.platform\nconst isWindows = platform === 'win32'\nconst DEFAULT_MAX_DEPTH = 1024\n\n// Unlinks on Windows are not atomic.\n//\n// This means that if you have a file entry, followed by another\n// file entry with an identical name, and you cannot re-use the file\n// (because it's a hardlink, or because unlink:true is set, or it's\n// Windows, which does not have useful nlink values), then the unlink\n// will be committed to the disk AFTER the new file has been written\n// over the old one, deleting the new file.\n//\n// To work around this, on Windows systems, we rename the file and then\n// delete the renamed file. It's a sloppy kludge, but frankly, I do not\n// know of a better way to do this, given windows' non-atomic unlink\n// semantics.\n//\n// See: https://github.com/npm/node-tar/issues/183\n/* c8 ignore start */\nconst unlinkFile = (\n path: string,\n cb: (er?: Error | null) => void,\n) => {\n if (!isWindows) {\n return fs.unlink(path, cb)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.rename(path, name, er => {\n if (er) {\n return cb(er)\n }\n fs.unlink(name, cb)\n })\n}\n/* c8 ignore stop */\n\n/* c8 ignore start */\nconst unlinkFileSync = (path: string) => {\n if (!isWindows) {\n return fs.unlinkSync(path)\n }\n\n const name = path + '.DELETE.' + randomBytes(16).toString('hex')\n fs.renameSync(path, name)\n fs.unlinkSync(name)\n}\n/* c8 ignore stop */\n\n// this.gid, entry.gid, this.processUid\nconst uint32 = (\n a: number | undefined,\n b: number | undefined,\n c: number | undefined,\n) =>\n a !== undefined && a === a >>> 0 ? a\n : b !== undefined && b === b >>> 0 ? b\n : c\n\n// clear the cache if it's a case-insensitive unicode-squashing match.\n// we can't know if the current file system is case-sensitive or supports\n// unicode fully, so we check for similarity on the maximally compatible\n// representation. Err on the side of pruning, since all it's doing is\n// preventing lstats, and it's not the end of the world if we get a false\n// positive.\n// Note that on windows, we always drop the entire cache whenever a\n// symbolic link is encountered, because 8.3 filenames are impossible\n// to reason about, and collisions are hazards rather than just failures.\nconst cacheKeyNormalize = (path: string) =>\n stripTrailingSlashes(\n normalizeWindowsPath(normalizeUnicode(path)),\n ).toLowerCase()\n\n// remove all cache entries matching ${abs}/**\nconst pruneCache = (cache: Map, abs: string) => {\n abs = cacheKeyNormalize(abs)\n for (const path of cache.keys()) {\n const pnorm = cacheKeyNormalize(path)\n if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) {\n cache.delete(path)\n }\n }\n}\n\nconst dropCache = (cache: Map) => {\n for (const key of cache.keys()) {\n cache.delete(key)\n }\n}\n\nexport class Unpack extends Parser {\n [ENDED]: boolean = false;\n [CHECKED_CWD]: boolean = false;\n [PENDING]: number = 0\n\n reservations: PathReservations = new PathReservations()\n transform?: TarOptions['transform']\n writable: true = true\n readable: false = false\n dirCache: Exclude\n uid?: number\n gid?: number\n setOwner: boolean\n preserveOwner: boolean\n processGid?: number\n processUid?: number\n maxDepth: number\n forceChown: boolean\n win32: boolean\n newer: boolean\n keep: boolean\n noMtime: boolean\n preservePaths: boolean\n unlink: boolean\n cwd: string\n strip: number\n processUmask: number\n umask: number\n dmode: number\n fmode: number\n chmod: boolean\n\n constructor(opt: TarOptions = {}) {\n opt.ondone = () => {\n this[ENDED] = true\n this[MAYBECLOSE]()\n }\n\n super(opt)\n\n this.transform = opt.transform\n\n this.dirCache = opt.dirCache || new Map()\n this.chmod = !!opt.chmod\n\n if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {\n // need both or neither\n if (\n typeof opt.uid !== 'number' ||\n typeof opt.gid !== 'number'\n ) {\n throw new TypeError(\n 'cannot set owner without number uid and gid',\n )\n }\n if (opt.preserveOwner) {\n throw new TypeError(\n 'cannot preserve owner in archive and also set owner explicitly',\n )\n }\n this.uid = opt.uid\n this.gid = opt.gid\n this.setOwner = true\n } else {\n this.uid = undefined\n this.gid = undefined\n this.setOwner = false\n }\n\n // default true for root\n if (\n opt.preserveOwner === undefined &&\n typeof opt.uid !== 'number'\n ) {\n this.preserveOwner = !!(\n process.getuid && process.getuid() === 0\n )\n } else {\n this.preserveOwner = !!opt.preserveOwner\n }\n\n this.processUid =\n (this.preserveOwner || this.setOwner) && process.getuid ?\n process.getuid()\n : undefined\n this.processGid =\n (this.preserveOwner || this.setOwner) && process.getgid ?\n process.getgid()\n : undefined\n\n // prevent excessively deep nesting of subfolders\n // set to `Infinity` to remove this restriction\n this.maxDepth =\n typeof opt.maxDepth === 'number' ?\n opt.maxDepth\n : DEFAULT_MAX_DEPTH\n\n // mostly just for testing, but useful in some cases.\n // Forcibly trigger a chown on every entry, no matter what\n this.forceChown = opt.forceChown === true\n\n // turn > this[ONENTRY](entry))\n }\n\n // a bad or damaged archive is a warning for Parser, but an error\n // when extracting. Mark those errors as unrecoverable, because\n // the Unpack contract cannot be met.\n warn(code: string, msg: string | Error, data: WarnData = {}) {\n if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') {\n data.recoverable = false\n }\n return super.warn(code, msg, data)\n }\n\n [MAYBECLOSE]() {\n if (this[ENDED] && this[PENDING] === 0) {\n this.emit('prefinish')\n this.emit('finish')\n this.emit('end')\n }\n }\n\n [CHECKPATH](entry: ReadEntry) {\n const p = normalizeWindowsPath(entry.path)\n const parts = p.split('/')\n\n if (this.strip) {\n if (parts.length < this.strip) {\n return false\n }\n if (entry.type === 'Link') {\n const linkparts = normalizeWindowsPath(\n String(entry.linkpath),\n ).split('/')\n if (linkparts.length >= this.strip) {\n entry.linkpath = linkparts.slice(this.strip).join('/')\n } else {\n return false\n }\n }\n parts.splice(0, this.strip)\n entry.path = parts.join('/')\n }\n\n if (isFinite(this.maxDepth) && parts.length > this.maxDepth) {\n this.warn('TAR_ENTRY_ERROR', 'path excessively deep', {\n entry,\n path: p,\n depth: parts.length,\n maxDepth: this.maxDepth,\n })\n return false\n }\n\n if (!this.preservePaths) {\n if (\n parts.includes('..') ||\n /* c8 ignore next */\n (isWindows && /^[a-z]:\\.\\.$/i.test(parts[0] ?? ''))\n ) {\n this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {\n entry,\n path: p,\n })\n return false\n }\n\n // strip off the root\n const [root, stripped] = stripAbsolutePath(p)\n if (root) {\n entry.path = String(stripped)\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${root} from absolute path`,\n {\n entry,\n path: p,\n },\n )\n }\n }\n\n if (path.isAbsolute(entry.path)) {\n entry.absolute = normalizeWindowsPath(path.resolve(entry.path))\n } else {\n entry.absolute = normalizeWindowsPath(\n path.resolve(this.cwd, entry.path),\n )\n }\n\n // if we somehow ended up with a path that escapes the cwd, and we are\n // not in preservePaths mode, then something is fishy! This should have\n // been prevented above, so ignore this for coverage.\n /* c8 ignore start - defense in depth */\n if (\n !this.preservePaths &&\n typeof entry.absolute === 'string' &&\n entry.absolute.indexOf(this.cwd + '/') !== 0 &&\n entry.absolute !== this.cwd\n ) {\n this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', {\n entry,\n path: normalizeWindowsPath(entry.path),\n resolvedPath: entry.absolute,\n cwd: this.cwd,\n })\n return false\n }\n /* c8 ignore stop */\n\n // an archive can set properties on the extraction directory, but it\n // may not replace the cwd with a different kind of thing entirely.\n if (\n entry.absolute === this.cwd &&\n entry.type !== 'Directory' &&\n entry.type !== 'GNUDumpDir'\n ) {\n return false\n }\n\n // only encode : chars that aren't drive letter indicators\n if (this.win32) {\n const { root: aRoot } = path.win32.parse(String(entry.absolute))\n entry.absolute =\n aRoot + wc.encode(String(entry.absolute).slice(aRoot.length))\n const { root: pRoot } = path.win32.parse(entry.path)\n entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length))\n }\n\n return true\n }\n\n [ONENTRY](entry: ReadEntry) {\n if (!this[CHECKPATH](entry)) {\n return entry.resume()\n }\n\n assert.equal(typeof entry.absolute, 'string')\n\n switch (entry.type) {\n case 'Directory':\n case 'GNUDumpDir':\n if (entry.mode) {\n entry.mode = entry.mode | 0o700\n }\n\n // eslint-disable-next-line no-fallthrough\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n case 'Link':\n case 'SymbolicLink':\n return this[CHECKFS](entry)\n\n case 'CharacterDevice':\n case 'BlockDevice':\n case 'FIFO':\n default:\n return this[UNSUPPORTED](entry)\n }\n }\n\n [ONERROR](er: Error, entry: ReadEntry) {\n // Cwd has to exist, or else nothing works. That's serious.\n // Other errors are warnings, which raise the error in strict\n // mode, but otherwise continue on.\n if (er.name === 'CwdError') {\n this.emit('error', er)\n } else {\n this.warn('TAR_ENTRY_ERROR', er, { entry })\n this[UNPEND]()\n entry.resume()\n }\n }\n\n [MKDIR](\n dir: string,\n mode: number,\n cb: (er?: null | MkdirError, made?: string) => void,\n ) {\n mkdir(\n normalizeWindowsPath(dir),\n {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n },\n cb,\n )\n }\n\n [DOCHOWN](entry: ReadEntry) {\n // in preserve owner mode, chown if the entry doesn't match process\n // in set owner mode, chown if setting doesn't match process\n return (\n this.forceChown ||\n (this.preserveOwner &&\n ((typeof entry.uid === 'number' &&\n entry.uid !== this.processUid) ||\n (typeof entry.gid === 'number' &&\n entry.gid !== this.processGid))) ||\n (typeof this.uid === 'number' &&\n this.uid !== this.processUid) ||\n (typeof this.gid === 'number' && this.gid !== this.processGid)\n )\n }\n\n [UID](entry: ReadEntry) {\n return uint32(this.uid, entry.uid, this.processUid)\n }\n\n [GID](entry: ReadEntry) {\n return uint32(this.gid, entry.gid, this.processGid)\n }\n\n [FILE](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n const stream = new fsm.WriteStream(String(entry.absolute), {\n // slight lie, but it can be numeric flags\n flags: getWriteFlag(entry.size) as string,\n mode: mode,\n autoClose: false,\n })\n stream.on('error', (er: Error) => {\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n\n // flush all the data out so that we aren't left hanging\n // if the error wasn't actually fatal. otherwise the parse\n // is blocked, and we never proceed.\n stream.write = () => true\n this[ONERROR](er, entry)\n fullyDone()\n })\n\n let actions = 1\n const done = (er?: null | Error) => {\n if (er) {\n /* c8 ignore start - we should always have a fd by now */\n if (stream.fd) {\n fs.close(stream.fd, () => {})\n }\n /* c8 ignore stop */\n\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n if (--actions === 0) {\n if (stream.fd !== undefined) {\n fs.close(stream.fd, er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n }\n fullyDone()\n })\n }\n }\n }\n\n stream.on('finish', () => {\n // if futimes fails, try utimes\n // if utimes fails, fail with the original error\n // same for fchown/chown\n const abs = String(entry.absolute)\n const fd = stream.fd\n\n if (typeof fd === 'number' && entry.mtime && !this.noMtime) {\n actions++\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n fs.futimes(fd, atime, mtime, er =>\n er ?\n fs.utimes(abs, atime, mtime, er2 => done(er2 && er))\n : done(),\n )\n }\n\n if (typeof fd === 'number' && this[DOCHOWN](entry)) {\n actions++\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n if (typeof uid === 'number' && typeof gid === 'number') {\n fs.fchown(fd, uid, gid, er =>\n er ?\n fs.chown(abs, uid, gid, er2 => done(er2 && er))\n : done(),\n )\n }\n }\n\n done()\n })\n\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => {\n this[ONERROR](er, entry)\n fullyDone()\n })\n entry.pipe(tx)\n }\n tx.pipe(stream)\n }\n\n [DIRECTORY](entry: ReadEntry, fullyDone: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n this[MKDIR](String(entry.absolute), mode, er => {\n if (er) {\n this[ONERROR](er, entry)\n fullyDone()\n return\n }\n\n let actions = 1\n const done = () => {\n if (--actions === 0) {\n fullyDone()\n this[UNPEND]()\n entry.resume()\n }\n }\n\n if (entry.mtime && !this.noMtime) {\n actions++\n fs.utimes(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n done,\n )\n }\n\n if (this[DOCHOWN](entry)) {\n actions++\n fs.chown(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n done,\n )\n }\n\n done()\n })\n }\n\n [UNSUPPORTED](entry: ReadEntry) {\n entry.unsupported = true\n this.warn(\n 'TAR_ENTRY_UNSUPPORTED',\n `unsupported entry type: ${entry.type}`,\n { entry },\n )\n entry.resume()\n }\n\n [SYMLINK](entry: ReadEntry, done: () => void) {\n this[LINK](entry, String(entry.linkpath), 'symlink', done)\n }\n\n [HARDLINK](entry: ReadEntry, done: () => void) {\n const linkpath = normalizeWindowsPath(\n path.resolve(this.cwd, String(entry.linkpath)),\n )\n this[LINK](entry, linkpath, 'link', done)\n }\n\n [PEND]() {\n this[PENDING]++\n }\n\n [UNPEND]() {\n this[PENDING]--\n this[MAYBECLOSE]()\n }\n\n [SKIP](entry: ReadEntry) {\n this[UNPEND]()\n entry.resume()\n }\n\n // Check if we can reuse an existing filesystem entry safely and\n // overwrite it, rather than unlinking and recreating\n // Windows doesn't report a useful nlink, so we just never reuse entries\n [ISREUSABLE](entry: ReadEntry, st: Stats) {\n return (\n entry.type === 'File' &&\n !this.unlink &&\n st.isFile() &&\n st.nlink <= 1 &&\n !isWindows\n )\n }\n\n // check if a thing is there, and if so, try to clobber it\n [CHECKFS](entry: ReadEntry) {\n this[PEND]()\n const paths = [entry.path]\n if (entry.linkpath) {\n paths.push(entry.linkpath)\n }\n this.reservations.reserve(paths, done =>\n this[CHECKFS2](entry, done),\n )\n }\n\n [PRUNECACHE](entry: ReadEntry) {\n // if we are not creating a directory, and the path is in the dirCache,\n // then that means we are about to delete the directory we created\n // previously, and it is no longer going to be a directory, and neither\n // is any of its children.\n // If a symbolic link is encountered, all bets are off. There is no\n // reasonable way to sanitize the cache in such a way we will be able to\n // avoid having filesystem collisions. If this happens with a non-symlink\n // entry, it'll just fail to unpack, but a symlink to a directory, using an\n // 8.3 shortname or certain unicode attacks, can evade detection and lead\n // to arbitrary writes to anywhere on the system.\n if (entry.type === 'SymbolicLink') {\n dropCache(this.dirCache)\n } else if (entry.type !== 'Directory') {\n pruneCache(this.dirCache, String(entry.absolute))\n }\n }\n\n [CHECKFS2](entry: ReadEntry, fullyDone: (er?: Error) => void) {\n this[PRUNECACHE](entry)\n\n const done = (er?: Error) => {\n this[PRUNECACHE](entry)\n fullyDone(er)\n }\n\n const checkCwd = () => {\n this[MKDIR](this.cwd, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n this[CHECKED_CWD] = true\n start()\n })\n }\n\n const start = () => {\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n return this[MKDIR](parent, this.dmode, er => {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n afterMakeParent()\n })\n }\n }\n afterMakeParent()\n }\n\n const afterMakeParent = () => {\n fs.lstat(String(entry.absolute), (lstatEr, st) => {\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n this[SKIP](entry)\n done()\n return\n }\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry, done)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const afterChmod = (er?: Error | null | undefined) =>\n this[MAKEFS](er ?? null, entry, done)\n if (!needChmod) {\n return afterChmod()\n }\n return fs.chmod(\n String(entry.absolute),\n Number(entry.mode),\n afterChmod,\n )\n }\n // Not a dir entry, have to remove it.\n // NB: the only way to end up with an entry that is the cwd\n // itself, in such a way that == does not detect, is a\n // tricky windows absolute path with UNC or 8.3 parts (and\n // preservePaths:true, or else it will have been stripped).\n // In that case, the user has opted out of path protections\n // explicitly, so if they blow away the cwd, c'est la vie.\n if (entry.absolute !== this.cwd) {\n return fs.rmdir(\n String(entry.absolute),\n (er?: null | Error) =>\n this[MAKEFS](er ?? null, entry, done),\n )\n }\n }\n\n // not a dir, and not reusable\n // don't remove if the cwd, we want that error\n if (entry.absolute === this.cwd) {\n return this[MAKEFS](null, entry, done)\n }\n\n unlinkFile(String(entry.absolute), er =>\n this[MAKEFS](er ?? null, entry, done),\n )\n })\n }\n\n if (this[CHECKED_CWD]) {\n start()\n } else {\n checkCwd()\n }\n }\n\n [MAKEFS](\n er: null | undefined | Error,\n entry: ReadEntry,\n done: () => void,\n ) {\n if (er) {\n this[ONERROR](er, entry)\n done()\n return\n }\n\n switch (entry.type) {\n case 'File':\n case 'OldFile':\n case 'ContiguousFile':\n return this[FILE](entry, done)\n\n case 'Link':\n return this[HARDLINK](entry, done)\n\n case 'SymbolicLink':\n return this[SYMLINK](entry, done)\n\n case 'Directory':\n case 'GNUDumpDir':\n return this[DIRECTORY](entry, done)\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n // XXX: get the type ('symlink' or 'junction') for windows\n fs[link](linkpath, String(entry.absolute), er => {\n if (er) {\n this[ONERROR](er, entry)\n } else {\n this[UNPEND]()\n entry.resume()\n }\n done()\n })\n }\n}\n\nconst callSync = (fn: () => any) => {\n try {\n return [null, fn()]\n } catch (er) {\n return [er, null]\n }\n}\n\nexport class UnpackSync extends Unpack {\n sync: true = true;\n\n [MAKEFS](er: null | Error | undefined, entry: ReadEntry) {\n return super[MAKEFS](er, entry, () => {})\n }\n\n [CHECKFS](entry: ReadEntry) {\n this[PRUNECACHE](entry)\n\n if (!this[CHECKED_CWD]) {\n const er = this[MKDIR](this.cwd, this.dmode)\n if (er) {\n return this[ONERROR](er as Error, entry)\n }\n this[CHECKED_CWD] = true\n }\n\n // don't bother to make the parent if the current entry is the cwd,\n // we've already checked it.\n if (entry.absolute !== this.cwd) {\n const parent = normalizeWindowsPath(\n path.dirname(String(entry.absolute)),\n )\n if (parent !== this.cwd) {\n const mkParent = this[MKDIR](parent, this.dmode)\n if (mkParent) {\n return this[ONERROR](mkParent as Error, entry)\n }\n }\n }\n\n const [lstatEr, st] = callSync(() =>\n fs.lstatSync(String(entry.absolute)),\n )\n if (\n st &&\n (this.keep ||\n /* c8 ignore next */\n (this.newer && st.mtime > (entry.mtime ?? st.mtime)))\n ) {\n return this[SKIP](entry)\n }\n\n if (lstatEr || this[ISREUSABLE](entry, st)) {\n return this[MAKEFS](null, entry)\n }\n\n if (st.isDirectory()) {\n if (entry.type === 'Directory') {\n const needChmod =\n this.chmod &&\n entry.mode &&\n (st.mode & 0o7777) !== entry.mode\n const [er] =\n needChmod ?\n callSync(() => {\n fs.chmodSync(String(entry.absolute), Number(entry.mode))\n })\n : []\n return this[MAKEFS](er, entry)\n }\n // not a dir entry, have to remove it\n const [er] = callSync(() =>\n fs.rmdirSync(String(entry.absolute)),\n )\n this[MAKEFS](er, entry)\n }\n\n // not a dir, and not reusable.\n // don't remove if it's the cwd, since we want that error.\n const [er] =\n entry.absolute === this.cwd ?\n []\n : callSync(() => unlinkFileSync(String(entry.absolute)))\n this[MAKEFS](er, entry)\n }\n\n [FILE](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.fmode\n\n const oner = (er?: null | Error | undefined) => {\n let closeError\n try {\n fs.closeSync(fd)\n } catch (e) {\n closeError = e\n }\n if (er || closeError) {\n this[ONERROR]((er as Error) || closeError, entry)\n }\n done()\n }\n\n let fd: number\n try {\n fd = fs.openSync(\n String(entry.absolute),\n getWriteFlag(entry.size),\n mode,\n )\n } catch (er) {\n return oner(er as Error)\n }\n const tx = this.transform ? this.transform(entry) || entry : entry\n if (tx !== entry) {\n tx.on('error', (er: Error) => this[ONERROR](er, entry))\n entry.pipe(tx)\n }\n\n tx.on('data', (chunk: Buffer) => {\n try {\n fs.writeSync(fd, chunk, 0, chunk.length)\n } catch (er) {\n oner(er as Error)\n }\n })\n\n tx.on('end', () => {\n let er = null\n // try both, falling futimes back to utimes\n // if either fails, handle the first error\n if (entry.mtime && !this.noMtime) {\n const atime = entry.atime || new Date()\n const mtime = entry.mtime\n try {\n fs.futimesSync(fd, atime, mtime)\n } catch (futimeser) {\n try {\n fs.utimesSync(String(entry.absolute), atime, mtime)\n } catch (utimeser) {\n er = futimeser\n }\n }\n }\n\n if (this[DOCHOWN](entry)) {\n const uid = this[UID](entry)\n const gid = this[GID](entry)\n\n try {\n fs.fchownSync(fd, Number(uid), Number(gid))\n } catch (fchowner) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(uid),\n Number(gid),\n )\n } catch (chowner) {\n er = er || fchowner\n }\n }\n }\n\n oner(er as Error)\n })\n }\n\n [DIRECTORY](entry: ReadEntry, done: () => void) {\n const mode =\n typeof entry.mode === 'number' ?\n entry.mode & 0o7777\n : this.dmode\n const er = this[MKDIR](String(entry.absolute), mode)\n if (er) {\n this[ONERROR](er as Error, entry)\n done()\n return\n }\n if (entry.mtime && !this.noMtime) {\n try {\n fs.utimesSync(\n String(entry.absolute),\n entry.atime || new Date(),\n entry.mtime,\n )\n /* c8 ignore next */\n } catch (er) {}\n }\n if (this[DOCHOWN](entry)) {\n try {\n fs.chownSync(\n String(entry.absolute),\n Number(this[UID](entry)),\n Number(this[GID](entry)),\n )\n } catch (er) {}\n }\n done()\n entry.resume()\n }\n\n [MKDIR](dir: string, mode: number) {\n try {\n return mkdirSync(normalizeWindowsPath(dir), {\n uid: this.uid,\n gid: this.gid,\n processUid: this.processUid,\n processGid: this.processGid,\n umask: this.processUmask,\n preserve: this.preservePaths,\n unlink: this.unlink,\n cache: this.dirCache,\n cwd: this.cwd,\n mode: mode,\n })\n } catch (er) {\n return er\n }\n }\n\n [LINK](\n entry: ReadEntry,\n linkpath: string,\n link: 'link' | 'symlink',\n done: () => void,\n ) {\n const ls: `${typeof link}Sync` = `${link}Sync`\n try {\n fs[ls](linkpath, String(entry.absolute))\n done()\n entry.resume()\n } catch (er) {\n return this[ONERROR](er as Error, entry)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.d.ts b/node_modules/tar/dist/esm/update.d.ts new file mode 100644 index 0000000..45784eb --- /dev/null +++ b/node_modules/tar/dist/esm/update.d.ts @@ -0,0 +1,2 @@ +export declare const update: import("./make-command.js").TarCommand; +//# sourceMappingURL=update.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.d.ts.map b/node_modules/tar/dist/esm/update.d.ts.map new file mode 100644 index 0000000..4f2ff18 --- /dev/null +++ b/node_modules/tar/dist/esm/update.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,MAAM,sDASlB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.js b/node_modules/tar/dist/esm/update.js new file mode 100644 index 0000000..21398e9 --- /dev/null +++ b/node_modules/tar/dist/esm/update.js @@ -0,0 +1,30 @@ +// tar -u +import { makeCommand } from './make-command.js'; +import { replace as r } from './replace.js'; +// just call tar.r with the filter and mtimeCache +export const update = makeCommand(r.syncFile, r.asyncFile, r.syncNoFile, r.asyncNoFile, (opt, entries = []) => { + r.validate?.(opt, entries); + mtimeFilter(opt); +}); +const mtimeFilter = (opt) => { + const filter = opt.filter; + if (!opt.mtimeCache) { + opt.mtimeCache = new Map(); + } + opt.filter = + filter ? + (path, stat) => filter(path, stat) && + !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ) + : (path, stat) => !( + /* c8 ignore start */ + ((opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) > + (stat.mtime ?? 0)) + /* c8 ignore stop */ + ); +}; +//# sourceMappingURL=update.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/update.js.map b/node_modules/tar/dist/esm/update.js.map new file mode 100644 index 0000000..611fae1 --- /dev/null +++ b/node_modules/tar/dist/esm/update.js.map @@ -0,0 +1 @@ +{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/update.ts"],"names":[],"mappings":"AAAA,SAAS;AAET,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAG/C,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAE3C,iDAAiD;AACjD,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAC/B,CAAC,CAAC,QAAQ,EACV,CAAC,CAAC,SAAS,EACX,CAAC,CAAC,UAAU,EACZ,CAAC,CAAC,WAAW,EACb,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IACpB,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IAC1B,WAAW,CAAC,GAAG,CAAC,CAAA;AAClB,CAAC,CACF,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,GAA0B,EAAE,EAAE;IACjD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;IAEzB,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QACpB,GAAG,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,GAAG,CAAC,MAAM;QACR,MAAM,CAAC,CAAC;YACN,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;gBAClB,CAAC;gBACC,qBAAqB;gBACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;oBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;gBACD,oBAAoB;iBACrB;YACL,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACb,CAAC;YACC,qBAAqB;YACrB,CACE,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;gBAC9C,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAClB;YACD,oBAAoB;aACrB,CAAA;AACT,CAAC,CAAA","sourcesContent":["// tar -u\n\nimport { makeCommand } from './make-command.js'\nimport { type TarOptionsWithAliases } from './options.js'\n\nimport { replace as r } from './replace.js'\n\n// just call tar.r with the filter and mtimeCache\nexport const update = makeCommand(\n r.syncFile,\n r.asyncFile,\n r.syncNoFile,\n r.asyncNoFile,\n (opt, entries = []) => {\n r.validate?.(opt, entries)\n mtimeFilter(opt)\n },\n)\n\nconst mtimeFilter = (opt: TarOptionsWithAliases) => {\n const filter = opt.filter\n\n if (!opt.mtimeCache) {\n opt.mtimeCache = new Map()\n }\n\n opt.filter =\n filter ?\n (path, stat) =>\n filter(path, stat) &&\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n : (path, stat) =>\n !(\n /* c8 ignore start */\n (\n (opt.mtimeCache?.get(path) ?? stat.mtime ?? 0) >\n (stat.mtime ?? 0)\n )\n /* c8 ignore stop */\n )\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.d.ts b/node_modules/tar/dist/esm/warn-method.d.ts new file mode 100644 index 0000000..9d6a67f --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.d.ts @@ -0,0 +1,25 @@ +/// +import { type Minipass } from 'minipass'; +/** has a warn method */ +export type Warner = { + warn(code: string, message: string | Error, data: any): void; + file?: string; + cwd?: string; + strict?: boolean; + emit(event: 'warn', code: string, message: string, data?: WarnData): void; + emit(event: 'error', error: TarError): void; +}; +export type WarnEvent = Minipass.Events & { + warn: [code: string, message: string, data: WarnData]; +}; +export type WarnData = { + file?: string; + cwd?: string; + code?: string; + tarCode?: string; + recoverable?: boolean; + [k: string]: any; +}; +export type TarError = Error & WarnData; +export declare const warnMethod: (self: Warner, code: string, message: string | Error, data?: WarnData) => void; +//# sourceMappingURL=warn-method.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.d.ts.map b/node_modules/tar/dist/esm/warn-method.d.ts.map new file mode 100644 index 0000000..1338043 --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.d.ts","sourceRoot":"","sources":["../../src/war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esm/warn-method.js b/node_modules/tar/dist/esm/warn-method.js new file mode 100644 index 0000000..13e798a --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.js @@ -0,0 +1,27 @@ +export const warnMethod = (self, code, message, data = {}) => { + if (self.file) { + data.file = self.file; + } + if (self.cwd) { + data.cwd = self.cwd; + } + data.code = + (message instanceof Error && + message.code) || + code; + data.tarCode = code; + if (!self.strict && data.recoverable !== false) { + if (message instanceof Error) { + data = Object.assign(message, data); + message = message.message; + } + self.emit('warn', code, message, data); + } + else if (message instanceof Error) { + self.emit('error', Object.assign(message, data)); + } + else { + self.emit('error', Object.assign(new Error(`${code}: ${message}`), data)); + } +}; +//# sourceMappingURL=warn-method.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/warn-method.js.map b/node_modules/tar/dist/esm/warn-method.js.map new file mode 100644 index 0000000..1c1bbd3 --- /dev/null +++ b/node_modules/tar/dist/esm/warn-method.js.map @@ -0,0 +1 @@ +{"version":3,"file":"warn-method.js","sourceRoot":"","sources":["../../src/warn-method.ts"],"names":[],"mappings":"AAiCA,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,IAAY,EACZ,IAAY,EACZ,OAAuB,EACvB,OAAiB,EAAE,EACnB,EAAE;IACF,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;IACrB,CAAC;IACD,IAAI,CAAC,IAAI;QACP,CAAC,OAAO,YAAY,KAAK;YACtB,OAAiC,CAAC,IAAI,CAAC;YAC1C,IAAI,CAAA;IACN,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QAC/C,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;YAC7B,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;YACnC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;QAC3B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;IACxC,CAAC;SAAM,IAAI,OAAO,YAAY,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CACP,OAAO,EACP,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,CACtD,CAAA;IACH,CAAC;AACH,CAAC,CAAA","sourcesContent":["import { type Minipass } from 'minipass'\n\n/** has a warn method */\nexport type Warner = {\n warn(code: string, message: string | Error, data: any): void\n file?: string\n cwd?: string\n strict?: boolean\n\n emit(\n event: 'warn',\n code: string,\n message: string,\n data?: WarnData,\n ): void\n emit(event: 'error', error: TarError): void\n}\n\nexport type WarnEvent = Minipass.Events & {\n warn: [code: string, message: string, data: WarnData]\n}\n\nexport type WarnData = {\n file?: string\n cwd?: string\n code?: string\n tarCode?: string\n recoverable?: boolean\n [k: string]: any\n}\n\nexport type TarError = Error & WarnData\n\nexport const warnMethod = (\n self: Warner,\n code: string,\n message: string | Error,\n data: WarnData = {},\n) => {\n if (self.file) {\n data.file = self.file\n }\n if (self.cwd) {\n data.cwd = self.cwd\n }\n data.code =\n (message instanceof Error &&\n (message as NodeJS.ErrnoException).code) ||\n code\n data.tarCode = code\n if (!self.strict && data.recoverable !== false) {\n if (message instanceof Error) {\n data = Object.assign(message, data)\n message = message.message\n }\n self.emit('warn', code, message, data)\n } else if (message instanceof Error) {\n self.emit('error', Object.assign(message, data))\n } else {\n self.emit(\n 'error',\n Object.assign(new Error(`${code}: ${message}`), data),\n )\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.d.ts b/node_modules/tar/dist/esm/winchars.d.ts new file mode 100644 index 0000000..6c24143 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.d.ts @@ -0,0 +1,3 @@ +export declare const encode: (s: string) => string; +export declare const decode: (s: string) => string; +//# sourceMappingURL=winchars.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.d.ts.map b/node_modules/tar/dist/esm/winchars.d.ts.map new file mode 100644 index 0000000..7a6cd50 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.d.ts","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA;AACxD,eAAO,MAAM,MAAM,MAAO,MAAM,WACwB,CAAA"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.js b/node_modules/tar/dist/esm/winchars.js new file mode 100644 index 0000000..c41eb86 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.js @@ -0,0 +1,9 @@ +// When writing files on Windows, translate the characters to their +// 0xf000 higher-encoded versions. +const raw = ['|', '<', '>', '?', ':']; +const win = raw.map(char => String.fromCharCode(0xf000 + char.charCodeAt(0))); +const toWin = new Map(raw.map((char, i) => [char, win[i]])); +const toRaw = new Map(win.map((char, i) => [char, raw[i]])); +export const encode = (s) => raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s); +export const decode = (s) => win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s); +//# sourceMappingURL=winchars.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/winchars.js.map b/node_modules/tar/dist/esm/winchars.js.map new file mode 100644 index 0000000..4394ba2 --- /dev/null +++ b/node_modules/tar/dist/esm/winchars.js.map @@ -0,0 +1 @@ +{"version":3,"file":"winchars.js","sourceRoot":"","sources":["../../src/winchars.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,kCAAkC;AAElC,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAErC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACzB,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACjD,CAAA;AAED,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACxD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAClC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA","sourcesContent":["// When writing files on Windows, translate the characters to their\n// 0xf000 higher-encoded versions.\n\nconst raw = ['|', '<', '>', '?', ':']\n\nconst win = raw.map(char =>\n String.fromCharCode(0xf000 + char.charCodeAt(0)),\n)\n\nconst toWin = new Map(raw.map((char, i) => [char, win[i]]))\nconst toRaw = new Map(win.map((char, i) => [char, raw[i]]))\n\nexport const encode = (s: string) =>\n raw.reduce((s, c) => s.split(c).join(toWin.get(c)), s)\nexport const decode = (s: string) =>\n win.reduce((s, c) => s.split(c).join(toRaw.get(c)), s)\n"]} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.d.ts b/node_modules/tar/dist/esm/write-entry.d.ts new file mode 100644 index 0000000..2caeaf1 --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.d.ts @@ -0,0 +1,132 @@ +/// +/// +/// +import { type Stats } from 'fs'; +import { Minipass } from 'minipass'; +import { Header } from './header.js'; +import { TarOptions, TarOptionsWithAliases } from './options.js'; +import { ReadEntry } from './read-entry.js'; +import { EntryTypeName } from './types.js'; +import { WarnData, Warner, WarnEvent } from './warn-method.js'; +declare const PROCESS: unique symbol; +declare const FILE: unique symbol; +declare const DIRECTORY: unique symbol; +declare const SYMLINK: unique symbol; +declare const HARDLINK: unique symbol; +declare const HEADER: unique symbol; +declare const READ: unique symbol; +declare const LSTAT: unique symbol; +declare const ONLSTAT: unique symbol; +declare const ONREAD: unique symbol; +declare const ONREADLINK: unique symbol; +declare const OPENFILE: unique symbol; +declare const ONOPENFILE: unique symbol; +declare const CLOSE: unique symbol; +declare const MODE: unique symbol; +declare const AWAITDRAIN: unique symbol; +declare const ONDRAIN: unique symbol; +declare const PREFIX: unique symbol; +export declare class WriteEntry extends Minipass implements Warner { + #private; + path: string; + portable: boolean; + myuid: number; + myuser: string; + maxReadSize: number; + linkCache: Exclude; + statCache: Exclude; + preservePaths: boolean; + cwd: string; + strict: boolean; + mtime?: Date; + noPax: boolean; + noMtime: boolean; + prefix?: string; + fd?: number; + blockLen: number; + blockRemain: number; + buf?: Buffer; + pos: number; + remain: number; + length: number; + offset: number; + win32: boolean; + absolute: string; + header?: Header; + type?: EntryTypeName | 'Unsupported'; + linkpath?: string; + stat?: Stats; + onWriteEntry?: (entry: WriteEntry) => any; + constructor(p: string, opt_?: TarOptionsWithAliases); + warn(code: string, message: string | Error, data?: WarnData): void; + emit(ev: keyof WarnEvent, ...data: any[]): boolean; + [LSTAT](): void; + [ONLSTAT](stat: Stats): void; + [PROCESS](): void | this; + [MODE](mode: number): number; + [PREFIX](path: string): string; + [HEADER](): void; + [DIRECTORY](): void; + [SYMLINK](): void; + [ONREADLINK](linkpath: string): void; + [HARDLINK](linkpath: string): void; + [FILE](): void | this; + [OPENFILE](): void; + [ONOPENFILE](fd: number): void; + [READ](): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; + [ONREAD](bytesRead: number): void; + [AWAITDRAIN](cb: () => any): void; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + [ONDRAIN](): void; +} +export declare class WriteEntrySync extends WriteEntry implements Warner { + sync: true; + [LSTAT](): void; + [SYMLINK](): void; + [OPENFILE](): void; + [READ](): void; + [AWAITDRAIN](cb: () => any): void; + [CLOSE](cb?: (er?: null | Error | NodeJS.ErrnoException) => any): void; +} +export declare class WriteEntryTar extends Minipass implements Warner { + blockLen: number; + blockRemain: number; + buf: number; + pos: number; + remain: number; + length: number; + preservePaths: boolean; + portable: boolean; + strict: boolean; + noPax: boolean; + noMtime: boolean; + readEntry: ReadEntry; + type: EntryTypeName; + prefix?: string; + path: string; + mode?: number; + uid?: number; + gid?: number; + uname?: string; + gname?: string; + header?: Header; + mtime?: Date; + atime?: Date; + ctime?: Date; + linkpath?: string; + size: number; + onWriteEntry?: (entry: WriteEntry) => any; + warn(code: string, message: string | Error, data?: WarnData): void; + constructor(readEntry: ReadEntry, opt_?: TarOptionsWithAliases); + [PREFIX](path: string): string; + [MODE](mode: number): number; + write(buffer: Buffer | string, cb?: () => void): boolean; + write(str: Buffer | string, encoding?: BufferEncoding | null, cb?: () => void): boolean; + end(cb?: () => void): this; + end(chunk: Buffer | string, cb?: () => void): this; + end(chunk: Buffer | string, encoding?: BufferEncoding, cb?: () => void): this; +} +export {}; +//# sourceMappingURL=write-entry.d.ts.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.d.ts.map b/node_modules/tar/dist/esm/write-entry.d.ts.map new file mode 100644 index 0000000..1fa474a --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.d.ts","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":";;;AAAA,OAAW,EAAE,KAAK,KAAK,EAAE,MAAM,IAAI,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAGpC,OAAO,EAGL,UAAU,EACV,qBAAqB,EACtB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EACL,QAAQ,EACR,MAAM,EACN,SAAS,EAEV,MAAM,kBAAkB,CAAA;AAazB,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,SAAS,eAAsB,CAAA;AACrC,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,QAAQ,eAAqB,CAAA;AACnC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,QAAA,MAAM,KAAK,eAAkB,CAAA;AAC7B,QAAA,MAAM,OAAO,eAAoB,CAAA;AACjC,QAAA,MAAM,MAAM,eAAmB,CAAA;AAC/B,QAAA,MAAM,UAAU,eAAuB,CA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AAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,KAAK,CAAC,EAAE,IAAI,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,GAAG,CAAA;IAEzC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,GAAE,QAAa;gBAK7D,SAAS,EAAE,SAAS,EACpB,IAAI,GAAE,qBAA0B;IAyHlC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM;IAIrB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM;IAInB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO;IACxD,KAAK,CACH,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,EAChC,EAAE,CAAC,EAAE,MAAM,IAAI,GACd,OAAO;IA0BV,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAC1B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI;IAClD,GAAG,CACD,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,CAAC,EAAE,cAAc,EACzB,EAAE,CAAC,EAAE,MAAM,IAAI,GACd,IAAI;CA2BR"} \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.js b/node_modules/tar/dist/esm/write-entry.js new file mode 100644 index 0000000..9028cd6 --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.js @@ -0,0 +1,657 @@ +import fs from 'fs'; +import { Minipass } from 'minipass'; +import path from 'path'; +import { Header } from './header.js'; +import { modeFix } from './mode-fix.js'; +import { normalizeWindowsPath } from './normalize-windows-path.js'; +import { dealias, } from './options.js'; +import { Pax } from './pax.js'; +import { stripAbsolutePath } from './strip-absolute-path.js'; +import { stripTrailingSlashes } from './strip-trailing-slashes.js'; +import { warnMethod, } from './warn-method.js'; +import * as winchars from './winchars.js'; +const prefixPath = (path, prefix) => { + if (!prefix) { + return normalizeWindowsPath(path); + } + path = normalizeWindowsPath(path).replace(/^\.(\/|$)/, ''); + return stripTrailingSlashes(prefix) + '/' + path; +}; +const maxReadSize = 16 * 1024 * 1024; +const PROCESS = Symbol('process'); +const FILE = Symbol('file'); +const DIRECTORY = Symbol('directory'); +const SYMLINK = Symbol('symlink'); +const HARDLINK = Symbol('hardlink'); +const HEADER = Symbol('header'); +const READ = Symbol('read'); +const LSTAT = Symbol('lstat'); +const ONLSTAT = Symbol('onlstat'); +const ONREAD = Symbol('onread'); +const ONREADLINK = Symbol('onreadlink'); +const OPENFILE = Symbol('openfile'); +const ONOPENFILE = Symbol('onopenfile'); +const CLOSE = Symbol('close'); +const MODE = Symbol('mode'); +const AWAITDRAIN = Symbol('awaitDrain'); +const ONDRAIN = Symbol('ondrain'); +const PREFIX = Symbol('prefix'); +export class WriteEntry extends Minipass { + path; + portable; + myuid = (process.getuid && process.getuid()) || 0; + // until node has builtin pwnam functions, this'll have to do + myuser = process.env.USER || ''; + maxReadSize; + linkCache; + statCache; + preservePaths; + cwd; + strict; + mtime; + noPax; + noMtime; + prefix; + fd; + blockLen = 0; + blockRemain = 0; + buf; + pos = 0; + remain = 0; + length = 0; + offset = 0; + win32; + absolute; + header; + type; + linkpath; + stat; + onWriteEntry; + #hadError = false; + constructor(p, opt_ = {}) { + const opt = dealias(opt_); + super(); + this.path = normalizeWindowsPath(p); + // suppress atime, ctime, uid, gid, uname, gname + this.portable = !!opt.portable; + this.maxReadSize = opt.maxReadSize || maxReadSize; + this.linkCache = opt.linkCache || new Map(); + this.statCache = opt.statCache || new Map(); + this.preservePaths = !!opt.preservePaths; + this.cwd = normalizeWindowsPath(opt.cwd || process.cwd()); + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.mtime = opt.mtime; + this.prefix = + opt.prefix ? normalizeWindowsPath(opt.prefix) : undefined; + this.onWriteEntry = opt.onWriteEntry; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.win32 = !!opt.win32 || process.platform === 'win32'; + if (this.win32) { + // force the \ to / normalization, since we might not *actually* + // be on windows, but want \ to be considered a path separator. + this.path = winchars.decode(this.path.replace(/\\/g, '/')); + p = p.replace(/\\/g, '/'); + } + this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p)); + if (this.path === '') { + this.path = './'; + } + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + const cs = this.statCache.get(this.absolute); + if (cs) { + this[ONLSTAT](cs); + } + else { + this[LSTAT](); + } + } + warn(code, message, data = {}) { + return warnMethod(this, code, message, data); + } + emit(ev, ...data) { + if (ev === 'error') { + this.#hadError = true; + } + return super.emit(ev, ...data); + } + [LSTAT]() { + fs.lstat(this.absolute, (er, stat) => { + if (er) { + return this.emit('error', er); + } + this[ONLSTAT](stat); + }); + } + [ONLSTAT](stat) { + this.statCache.set(this.absolute, stat); + this.stat = stat; + if (!stat.isFile()) { + stat.size = 0; + } + this.type = getType(stat); + this.emit('stat', stat); + this[PROCESS](); + } + [PROCESS]() { + switch (this.type) { + case 'File': + return this[FILE](); + case 'Directory': + return this[DIRECTORY](); + case 'SymbolicLink': + return this[SYMLINK](); + // unsupported types are ignored. + default: + return this.end(); + } + } + [MODE](mode) { + return modeFix(mode, this.type === 'Directory', this.portable); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [HEADER]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot write header before stat'); + } + /* c8 ignore stop */ + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.onWriteEntry?.(this); + this.header = new Header({ + path: this[PREFIX](this.path), + // only apply the prefix to hard links. + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this[MODE](this.stat.mode), + uid: this.portable ? undefined : this.stat.uid, + gid: this.portable ? undefined : this.stat.gid, + size: this.stat.size, + mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime, + /* c8 ignore next */ + type: this.type === 'Unsupported' ? undefined : this.type, + uname: this.portable ? undefined + : this.stat.uid === this.myuid ? this.myuser + : '', + atime: this.portable ? undefined : this.stat.atime, + ctime: this.portable ? undefined : this.stat.ctime, + }); + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? undefined : this.header.atime, + ctime: this.portable ? undefined : this.header.ctime, + gid: this.portable ? undefined : this.header.gid, + mtime: this.noMtime ? undefined : (this.mtime || this.header.mtime), + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.header.size, + uid: this.portable ? undefined : this.header.uid, + uname: this.portable ? undefined : this.header.uname, + dev: this.portable ? undefined : this.stat.dev, + ino: this.portable ? undefined : this.stat.ino, + nlink: this.portable ? undefined : this.stat.nlink, + }).encode()); + } + const block = this.header?.block; + /* c8 ignore start */ + if (!block) { + throw new Error('failed to encode header'); + } + /* c8 ignore stop */ + super.write(block); + } + [DIRECTORY]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create directory entry without stat'); + } + /* c8 ignore stop */ + if (this.path.slice(-1) !== '/') { + this.path += '/'; + } + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [SYMLINK]() { + fs.readlink(this.absolute, (er, linkpath) => { + if (er) { + return this.emit('error', er); + } + this[ONREADLINK](linkpath); + }); + } + [ONREADLINK](linkpath) { + this.linkpath = normalizeWindowsPath(linkpath); + this[HEADER](); + this.end(); + } + [HARDLINK](linkpath) { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create link entry without stat'); + } + /* c8 ignore stop */ + this.type = 'Link'; + this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath)); + this.stat.size = 0; + this[HEADER](); + this.end(); + } + [FILE]() { + /* c8 ignore start */ + if (!this.stat) { + throw new Error('cannot create file entry without stat'); + } + /* c8 ignore stop */ + if (this.stat.nlink > 1) { + const linkKey = `${this.stat.dev}:${this.stat.ino}`; + const linkpath = this.linkCache.get(linkKey); + if (linkpath?.indexOf(this.cwd) === 0) { + return this[HARDLINK](linkpath); + } + this.linkCache.set(linkKey, this.absolute); + } + this[HEADER](); + if (this.stat.size === 0) { + return this.end(); + } + this[OPENFILE](); + } + [OPENFILE]() { + fs.open(this.absolute, 'r', (er, fd) => { + if (er) { + return this.emit('error', er); + } + this[ONOPENFILE](fd); + }); + } + [ONOPENFILE](fd) { + this.fd = fd; + if (this.#hadError) { + return this[CLOSE](); + } + /* c8 ignore start */ + if (!this.stat) { + throw new Error('should stat before calling onopenfile'); + } + /* c8 ignore start */ + this.blockLen = 512 * Math.ceil(this.stat.size / 512); + this.blockRemain = this.blockLen; + const bufLen = Math.min(this.blockLen, this.maxReadSize); + this.buf = Buffer.allocUnsafe(bufLen); + this.offset = 0; + this.pos = 0; + this.remain = this.stat.size; + this.length = this.buf.length; + this[READ](); + } + [READ]() { + const { fd, buf, offset, length, pos } = this; + if (fd === undefined || buf === undefined) { + throw new Error('cannot read file without first opening'); + } + fs.read(fd, buf, offset, length, pos, (er, bytesRead) => { + if (er) { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + return this[CLOSE](() => this.emit('error', er)); + } + this[ONREAD](bytesRead); + }); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs.close(this.fd, cb); + } + [ONREAD](bytesRead) { + if (bytesRead <= 0 && this.remain > 0) { + const er = Object.assign(new Error('encountered unexpected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + if (bytesRead > this.remain) { + const er = Object.assign(new Error('did not encounter expected EOF'), { + path: this.absolute, + syscall: 'read', + code: 'EOF', + }); + return this[CLOSE](() => this.emit('error', er)); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('should have created buffer prior to reading'); + } + /* c8 ignore stop */ + // null out the rest of the buffer, if we could fit the block padding + // at the end of this loop, we've incremented bytesRead and this.remain + // to be incremented up to the blockRemain level, as if we had expected + // to get a null-padded file, and read it until the end. then we will + // decrement both remain and blockRemain by bytesRead, and know that we + // reached the expected EOF, without any null buffer to append. + if (bytesRead === this.remain) { + for (let i = bytesRead; i < this.length && bytesRead < this.blockRemain; i++) { + this.buf[i + this.offset] = 0; + bytesRead++; + this.remain++; + } + } + const chunk = this.offset === 0 && bytesRead === this.buf.length ? + this.buf + : this.buf.subarray(this.offset, this.offset + bytesRead); + const flushed = this.write(chunk); + if (!flushed) { + this[AWAITDRAIN](() => this[ONDRAIN]()); + } + else { + this[ONDRAIN](); + } + } + [AWAITDRAIN](cb) { + this.once('drain', cb); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + if (this.blockRemain < chunk.length) { + const er = Object.assign(new Error('writing more data than expected'), { + path: this.absolute, + }); + return this.emit('error', er); + } + this.remain -= chunk.length; + this.blockRemain -= chunk.length; + this.pos += chunk.length; + this.offset += chunk.length; + return super.write(chunk, null, cb); + } + [ONDRAIN]() { + if (!this.remain) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + return this[CLOSE](er => er ? this.emit('error', er) : this.end()); + } + /* c8 ignore start */ + if (!this.buf) { + throw new Error('buffer lost somehow in ONDRAIN'); + } + /* c8 ignore stop */ + if (this.offset >= this.length) { + // if we only have a smaller bit left to read, alloc a smaller buffer + // otherwise, keep it the same length it was before. + this.buf = Buffer.allocUnsafe(Math.min(this.blockRemain, this.buf.length)); + this.offset = 0; + } + this.length = this.buf.length - this.offset; + this[READ](); + } +} +export class WriteEntrySync extends WriteEntry { + sync = true; + [LSTAT]() { + this[ONLSTAT](fs.lstatSync(this.absolute)); + } + [SYMLINK]() { + this[ONREADLINK](fs.readlinkSync(this.absolute)); + } + [OPENFILE]() { + this[ONOPENFILE](fs.openSync(this.absolute, 'r')); + } + [READ]() { + let threw = true; + try { + const { fd, buf, offset, length, pos } = this; + /* c8 ignore start */ + if (fd === undefined || buf === undefined) { + throw new Error('fd and buf must be set in READ method'); + } + /* c8 ignore stop */ + const bytesRead = fs.readSync(fd, buf, offset, length, pos); + this[ONREAD](bytesRead); + threw = false; + } + finally { + // ignoring the error from close(2) is a bad practice, but at + // this point we already have an error, don't need another one + if (threw) { + try { + this[CLOSE](() => { }); + } + catch (er) { } + } + } + } + [AWAITDRAIN](cb) { + cb(); + } + /* c8 ignore start */ + [CLOSE](cb = () => { }) { + /* c8 ignore stop */ + if (this.fd !== undefined) + fs.closeSync(this.fd); + cb(); + } +} +export class WriteEntryTar extends Minipass { + blockLen = 0; + blockRemain = 0; + buf = 0; + pos = 0; + remain = 0; + length = 0; + preservePaths; + portable; + strict; + noPax; + noMtime; + readEntry; + type; + prefix; + path; + mode; + uid; + gid; + uname; + gname; + header; + mtime; + atime; + ctime; + linkpath; + size; + onWriteEntry; + warn(code, message, data = {}) { + return warnMethod(this, code, message, data); + } + constructor(readEntry, opt_ = {}) { + const opt = dealias(opt_); + super(); + this.preservePaths = !!opt.preservePaths; + this.portable = !!opt.portable; + this.strict = !!opt.strict; + this.noPax = !!opt.noPax; + this.noMtime = !!opt.noMtime; + this.onWriteEntry = opt.onWriteEntry; + this.readEntry = readEntry; + const { type } = readEntry; + /* c8 ignore start */ + if (type === 'Unsupported') { + throw new Error('writing entry that should be ignored'); + } + /* c8 ignore stop */ + this.type = type; + if (this.type === 'Directory' && this.portable) { + this.noMtime = true; + } + this.prefix = opt.prefix; + this.path = normalizeWindowsPath(readEntry.path); + this.mode = + readEntry.mode !== undefined ? + this[MODE](readEntry.mode) + : undefined; + this.uid = this.portable ? undefined : readEntry.uid; + this.gid = this.portable ? undefined : readEntry.gid; + this.uname = this.portable ? undefined : readEntry.uname; + this.gname = this.portable ? undefined : readEntry.gname; + this.size = readEntry.size; + this.mtime = + this.noMtime ? undefined : opt.mtime || readEntry.mtime; + this.atime = this.portable ? undefined : readEntry.atime; + this.ctime = this.portable ? undefined : readEntry.ctime; + this.linkpath = + readEntry.linkpath !== undefined ? + normalizeWindowsPath(readEntry.linkpath) + : undefined; + if (typeof opt.onwarn === 'function') { + this.on('warn', opt.onwarn); + } + let pathWarn = false; + if (!this.preservePaths) { + const [root, stripped] = stripAbsolutePath(this.path); + if (root && typeof stripped === 'string') { + this.path = stripped; + pathWarn = root; + } + } + this.remain = readEntry.size; + this.blockRemain = readEntry.startBlockSize; + this.onWriteEntry?.(this); + this.header = new Header({ + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + // only the permissions and setuid/setgid/sticky bitflags + // not the higher-order bits that specify file type + mode: this.mode, + uid: this.portable ? undefined : this.uid, + gid: this.portable ? undefined : this.gid, + size: this.size, + mtime: this.noMtime ? undefined : this.mtime, + type: this.type, + uname: this.portable ? undefined : this.uname, + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + }); + if (pathWarn) { + this.warn('TAR_ENTRY_INFO', `stripping ${pathWarn} from absolute path`, { + entry: this, + path: pathWarn + this.path, + }); + } + if (this.header.encode() && !this.noPax) { + super.write(new Pax({ + atime: this.portable ? undefined : this.atime, + ctime: this.portable ? undefined : this.ctime, + gid: this.portable ? undefined : this.gid, + mtime: this.noMtime ? undefined : this.mtime, + path: this[PREFIX](this.path), + linkpath: this.type === 'Link' && this.linkpath !== undefined ? + this[PREFIX](this.linkpath) + : this.linkpath, + size: this.size, + uid: this.portable ? undefined : this.uid, + uname: this.portable ? undefined : this.uname, + dev: this.portable ? undefined : this.readEntry.dev, + ino: this.portable ? undefined : this.readEntry.ino, + nlink: this.portable ? undefined : this.readEntry.nlink, + }).encode()); + } + const b = this.header?.block; + /* c8 ignore start */ + if (!b) + throw new Error('failed to encode header'); + /* c8 ignore stop */ + super.write(b); + readEntry.pipe(this); + } + [PREFIX](path) { + return prefixPath(path, this.prefix); + } + [MODE](mode) { + return modeFix(mode, this.type === 'Directory', this.portable); + } + write(chunk, encoding, cb) { + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8'); + } + /* c8 ignore stop */ + const writeLen = chunk.length; + if (writeLen > this.blockRemain) { + throw new Error('writing more to entry than is appropriate'); + } + this.blockRemain -= writeLen; + return super.write(chunk, cb); + } + end(chunk, encoding, cb) { + if (this.blockRemain) { + super.write(Buffer.alloc(this.blockRemain)); + } + /* c8 ignore start - just junk to comply with NodeJS.WritableStream */ + if (typeof chunk === 'function') { + cb = chunk; + encoding = undefined; + chunk = undefined; + } + if (typeof encoding === 'function') { + cb = encoding; + encoding = undefined; + } + if (typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding ?? 'utf8'); + } + if (cb) + this.once('finish', cb); + chunk ? super.end(chunk, cb) : super.end(cb); + /* c8 ignore stop */ + return this; + } +} +const getType = (stat) => stat.isFile() ? 'File' + : stat.isDirectory() ? 'Directory' + : stat.isSymbolicLink() ? 'SymbolicLink' + : 'Unsupported'; +//# sourceMappingURL=write-entry.js.map \ No newline at end of file diff --git a/node_modules/tar/dist/esm/write-entry.js.map b/node_modules/tar/dist/esm/write-entry.js.map new file mode 100644 index 0000000..0ef345a --- /dev/null +++ b/node_modules/tar/dist/esm/write-entry.js.map @@ -0,0 +1 @@ +{"version":3,"file":"write-entry.js","sourceRoot":"","sources":["../../src/write-entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,IAAI,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EACL,OAAO,GAIR,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,OAAO,EAIL,UAAU,GACX,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,MAAe,EAAE,EAAE;IACnD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAA;IACnC,CAAC;IACD,IAAI,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;IAC1D,OAAO,oBAAoB,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAA;AAClD,CAAC,CAAA;AAED,MAAM,WAA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B;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED,MAAM,OAAO,GAAG,CAAC,IAAW,EAAiC,EAAE,CAC7D,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM;IACtB,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW;QAClC,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,cAAc;YACxC,CAAC,CAAC,aAAa,CAAA","sourcesContent":["import fs, { type Stats } from 'fs'\nimport { Minipass } from 'minipass'\nimport path from 'path'\nimport { Header } from './header.js'\nimport { modeFix } from './mode-fix.js'\nimport { normalizeWindowsPath } from './normalize-windows-path.js'\nimport {\n dealias,\n LinkCacheKey,\n TarOptions,\n TarOptionsWithAliases,\n} from './options.js'\nimport { Pax } from './pax.js'\nimport { ReadEntry } from './read-entry.js'\nimport { stripAbsolutePath } from './strip-absolute-path.js'\nimport { stripTrailingSlashes } from './strip-trailing-slashes.js'\nimport { EntryTypeName } from './types.js'\nimport {\n WarnData,\n Warner,\n WarnEvent,\n warnMethod,\n} from './warn-method.js'\nimport * as winchars from './winchars.js'\n\nconst prefixPath = (path: string, prefix?: string) => {\n if (!prefix) {\n return normalizeWindowsPath(path)\n }\n path = normalizeWindowsPath(path).replace(/^\\.(\\/|$)/, '')\n return stripTrailingSlashes(prefix) + '/' + path\n}\n\nconst maxReadSize = 16 * 1024 * 1024\n\nconst PROCESS = Symbol('process')\nconst FILE = Symbol('file')\nconst DIRECTORY = Symbol('directory')\nconst SYMLINK = Symbol('symlink')\nconst HARDLINK = Symbol('hardlink')\nconst HEADER = Symbol('header')\nconst READ = Symbol('read')\nconst LSTAT = Symbol('lstat')\nconst ONLSTAT = Symbol('onlstat')\nconst ONREAD = Symbol('onread')\nconst ONREADLINK = Symbol('onreadlink')\nconst OPENFILE = Symbol('openfile')\nconst ONOPENFILE = Symbol('onopenfile')\nconst CLOSE = Symbol('close')\nconst MODE = Symbol('mode')\nconst AWAITDRAIN = Symbol('awaitDrain')\nconst ONDRAIN = Symbol('ondrain')\nconst PREFIX = Symbol('prefix')\n\nexport class WriteEntry\n extends Minipass\n implements Warner\n{\n path: string\n portable: boolean\n myuid: number = (process.getuid && process.getuid()) || 0\n // until node has builtin pwnam functions, this'll have to do\n myuser: string = process.env.USER || ''\n maxReadSize: number\n linkCache: Exclude\n statCache: Exclude\n preservePaths: boolean\n cwd: string\n strict: boolean\n mtime?: Date\n noPax: boolean\n noMtime: boolean\n prefix?: string\n fd?: number\n\n blockLen: number = 0\n blockRemain: number = 0\n buf?: Buffer\n pos: number = 0\n remain: number = 0\n length: number = 0\n offset: number = 0\n\n win32: boolean\n absolute: string\n\n header?: Header\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n stat?: Stats\n onWriteEntry?: (entry: WriteEntry) => any\n\n #hadError: boolean = false\n\n constructor(p: string, opt_: TarOptionsWithAliases = {}) {\n const opt = dealias(opt_)\n super()\n this.path = normalizeWindowsPath(p)\n // suppress atime, ctime, uid, gid, uname, gname\n this.portable = !!opt.portable\n this.maxReadSize = opt.maxReadSize || maxReadSize\n this.linkCache = opt.linkCache || new Map()\n this.statCache = opt.statCache || new Map()\n this.preservePaths = !!opt.preservePaths\n this.cwd = normalizeWindowsPath(opt.cwd || process.cwd())\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.mtime = opt.mtime\n this.prefix =\n opt.prefix ? normalizeWindowsPath(opt.prefix) : undefined\n this.onWriteEntry = opt.onWriteEntry\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: string | boolean = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.win32 = !!opt.win32 || process.platform === 'win32'\n if (this.win32) {\n // force the \\ to / normalization, since we might not *actually*\n // be on windows, but want \\ to be considered a path separator.\n this.path = winchars.decode(this.path.replace(/\\\\/g, '/'))\n p = p.replace(/\\\\/g, '/')\n }\n\n this.absolute = normalizeWindowsPath(\n opt.absolute || path.resolve(this.cwd, p),\n )\n\n if (this.path === '') {\n this.path = './'\n }\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n const cs = this.statCache.get(this.absolute)\n if (cs) {\n this[ONLSTAT](cs)\n } else {\n this[LSTAT]()\n }\n }\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n emit(ev: keyof WarnEvent, ...data: any[]) {\n if (ev === 'error') {\n this.#hadError = true\n }\n return super.emit(ev, ...data)\n }\n\n [LSTAT]() {\n fs.lstat(this.absolute, (er, stat) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONLSTAT](stat)\n })\n }\n\n [ONLSTAT](stat: Stats) {\n this.statCache.set(this.absolute, stat)\n this.stat = stat\n if (!stat.isFile()) {\n stat.size = 0\n }\n this.type = getType(stat)\n this.emit('stat', stat)\n this[PROCESS]()\n }\n\n [PROCESS]() {\n switch (this.type) {\n case 'File':\n return this[FILE]()\n case 'Directory':\n return this[DIRECTORY]()\n case 'SymbolicLink':\n return this[SYMLINK]()\n // unsupported types are ignored.\n default:\n return this.end()\n }\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [HEADER]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot write header before stat')\n }\n /* c8 ignore stop */\n\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.onWriteEntry?.(this)\n this.header = new Header({\n path: this[PREFIX](this.path),\n // only apply the prefix to hard links.\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this[MODE](this.stat.mode),\n uid: this.portable ? undefined : this.stat.uid,\n gid: this.portable ? undefined : this.stat.gid,\n size: this.stat.size,\n mtime: this.noMtime ? undefined : this.mtime || this.stat.mtime,\n /* c8 ignore next */\n type: this.type === 'Unsupported' ? undefined : this.type,\n uname:\n this.portable ? undefined\n : this.stat.uid === this.myuid ? this.myuser\n : '',\n atime: this.portable ? undefined : this.stat.atime,\n ctime: this.portable ? undefined : this.stat.ctime,\n })\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.header.atime,\n ctime: this.portable ? undefined : this.header.ctime,\n gid: this.portable ? undefined : this.header.gid,\n mtime:\n this.noMtime ? undefined : (\n this.mtime || this.header.mtime\n ),\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.header.size,\n uid: this.portable ? undefined : this.header.uid,\n uname: this.portable ? undefined : this.header.uname,\n dev: this.portable ? undefined : this.stat.dev,\n ino: this.portable ? undefined : this.stat.ino,\n nlink: this.portable ? undefined : this.stat.nlink,\n }).encode(),\n )\n }\n const block = this.header?.block\n /* c8 ignore start */\n if (!block) {\n throw new Error('failed to encode header')\n }\n /* c8 ignore stop */\n super.write(block)\n }\n\n [DIRECTORY]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create directory entry without stat')\n }\n /* c8 ignore stop */\n if (this.path.slice(-1) !== '/') {\n this.path += '/'\n }\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [SYMLINK]() {\n fs.readlink(this.absolute, (er, linkpath) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONREADLINK](linkpath)\n })\n }\n\n [ONREADLINK](linkpath: string) {\n this.linkpath = normalizeWindowsPath(linkpath)\n this[HEADER]()\n this.end()\n }\n\n [HARDLINK](linkpath: string) {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create link entry without stat')\n }\n /* c8 ignore stop */\n this.type = 'Link'\n this.linkpath = normalizeWindowsPath(\n path.relative(this.cwd, linkpath),\n )\n this.stat.size = 0\n this[HEADER]()\n this.end()\n }\n\n [FILE]() {\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('cannot create file entry without stat')\n }\n /* c8 ignore stop */\n if (this.stat.nlink > 1) {\n const linkKey =\n `${this.stat.dev}:${this.stat.ino}` as LinkCacheKey\n const linkpath = this.linkCache.get(linkKey)\n if (linkpath?.indexOf(this.cwd) === 0) {\n return this[HARDLINK](linkpath)\n }\n this.linkCache.set(linkKey, this.absolute)\n }\n\n this[HEADER]()\n if (this.stat.size === 0) {\n return this.end()\n }\n\n this[OPENFILE]()\n }\n\n [OPENFILE]() {\n fs.open(this.absolute, 'r', (er, fd) => {\n if (er) {\n return this.emit('error', er)\n }\n this[ONOPENFILE](fd)\n })\n }\n\n [ONOPENFILE](fd: number) {\n this.fd = fd\n if (this.#hadError) {\n return this[CLOSE]()\n }\n /* c8 ignore start */\n if (!this.stat) {\n throw new Error('should stat before calling onopenfile')\n }\n /* c8 ignore start */\n\n this.blockLen = 512 * Math.ceil(this.stat.size / 512)\n this.blockRemain = this.blockLen\n const bufLen = Math.min(this.blockLen, this.maxReadSize)\n this.buf = Buffer.allocUnsafe(bufLen)\n this.offset = 0\n this.pos = 0\n this.remain = this.stat.size\n this.length = this.buf.length\n this[READ]()\n }\n\n [READ]() {\n const { fd, buf, offset, length, pos } = this\n if (fd === undefined || buf === undefined) {\n throw new Error('cannot read file without first opening')\n }\n fs.read(fd, buf, offset, length, pos, (er, bytesRead) => {\n if (er) {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n return this[CLOSE](() => this.emit('error', er))\n }\n this[ONREAD](bytesRead)\n })\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.close(this.fd, cb)\n }\n\n [ONREAD](bytesRead: number) {\n if (bytesRead <= 0 && this.remain > 0) {\n const er = Object.assign(\n new Error('encountered unexpected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n if (bytesRead > this.remain) {\n const er = Object.assign(\n new Error('did not encounter expected EOF'),\n {\n path: this.absolute,\n syscall: 'read',\n code: 'EOF',\n },\n )\n return this[CLOSE](() => this.emit('error', er))\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('should have created buffer prior to reading')\n }\n /* c8 ignore stop */\n\n // null out the rest of the buffer, if we could fit the block padding\n // at the end of this loop, we've incremented bytesRead and this.remain\n // to be incremented up to the blockRemain level, as if we had expected\n // to get a null-padded file, and read it until the end. then we will\n // decrement both remain and blockRemain by bytesRead, and know that we\n // reached the expected EOF, without any null buffer to append.\n if (bytesRead === this.remain) {\n for (\n let i = bytesRead;\n i < this.length && bytesRead < this.blockRemain;\n i++\n ) {\n this.buf[i + this.offset] = 0\n bytesRead++\n this.remain++\n }\n }\n\n const chunk =\n this.offset === 0 && bytesRead === this.buf.length ?\n this.buf\n : this.buf.subarray(this.offset, this.offset + bytesRead)\n\n const flushed = this.write(chunk)\n if (!flushed) {\n this[AWAITDRAIN](() => this[ONDRAIN]())\n } else {\n this[ONDRAIN]()\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n this.once('drain', cb)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n\n if (this.blockRemain < chunk.length) {\n const er = Object.assign(\n new Error('writing more data than expected'),\n {\n path: this.absolute,\n },\n )\n return this.emit('error', er)\n }\n this.remain -= chunk.length\n this.blockRemain -= chunk.length\n this.pos += chunk.length\n this.offset += chunk.length\n return super.write(chunk, null, cb)\n }\n\n [ONDRAIN]() {\n if (!this.remain) {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n return this[CLOSE](er =>\n er ? this.emit('error', er) : this.end(),\n )\n }\n\n /* c8 ignore start */\n if (!this.buf) {\n throw new Error('buffer lost somehow in ONDRAIN')\n }\n /* c8 ignore stop */\n\n if (this.offset >= this.length) {\n // if we only have a smaller bit left to read, alloc a smaller buffer\n // otherwise, keep it the same length it was before.\n this.buf = Buffer.allocUnsafe(\n Math.min(this.blockRemain, this.buf.length),\n )\n this.offset = 0\n }\n this.length = this.buf.length - this.offset\n this[READ]()\n }\n}\n\nexport class WriteEntrySync extends WriteEntry implements Warner {\n sync: true = true;\n\n [LSTAT]() {\n this[ONLSTAT](fs.lstatSync(this.absolute))\n }\n\n [SYMLINK]() {\n this[ONREADLINK](fs.readlinkSync(this.absolute))\n }\n\n [OPENFILE]() {\n this[ONOPENFILE](fs.openSync(this.absolute, 'r'))\n }\n\n [READ]() {\n let threw = true\n try {\n const { fd, buf, offset, length, pos } = this\n /* c8 ignore start */\n if (fd === undefined || buf === undefined) {\n throw new Error('fd and buf must be set in READ method')\n }\n /* c8 ignore stop */\n const bytesRead = fs.readSync(fd, buf, offset, length, pos)\n this[ONREAD](bytesRead)\n threw = false\n } finally {\n // ignoring the error from close(2) is a bad practice, but at\n // this point we already have an error, don't need another one\n if (threw) {\n try {\n this[CLOSE](() => {})\n } catch (er) {}\n }\n }\n }\n\n [AWAITDRAIN](cb: () => any) {\n cb()\n }\n\n /* c8 ignore start */\n [CLOSE](\n cb: (er?: null | Error | NodeJS.ErrnoException) => any = () => {},\n ) {\n /* c8 ignore stop */\n if (this.fd !== undefined) fs.closeSync(this.fd)\n cb()\n }\n}\n\nexport class WriteEntryTar\n extends Minipass\n implements Warner\n{\n blockLen: number = 0\n blockRemain: number = 0\n buf: number = 0\n pos: number = 0\n remain: number = 0\n length: number = 0\n preservePaths: boolean\n portable: boolean\n strict: boolean\n noPax: boolean\n noMtime: boolean\n readEntry: ReadEntry\n type: EntryTypeName\n prefix?: string\n path: string\n mode?: number\n uid?: number\n gid?: number\n uname?: string\n gname?: string\n header?: Header\n mtime?: Date\n atime?: Date\n ctime?: Date\n linkpath?: string\n size: number\n onWriteEntry?: (entry: WriteEntry) => any\n\n warn(code: string, message: string | Error, data: WarnData = {}) {\n return warnMethod(this, code, message, data)\n }\n\n constructor(\n readEntry: ReadEntry,\n opt_: TarOptionsWithAliases = {},\n ) {\n const opt = dealias(opt_)\n super()\n this.preservePaths = !!opt.preservePaths\n this.portable = !!opt.portable\n this.strict = !!opt.strict\n this.noPax = !!opt.noPax\n this.noMtime = !!opt.noMtime\n this.onWriteEntry = opt.onWriteEntry\n\n this.readEntry = readEntry\n const { type } = readEntry\n /* c8 ignore start */\n if (type === 'Unsupported') {\n throw new Error('writing entry that should be ignored')\n }\n /* c8 ignore stop */\n this.type = type\n if (this.type === 'Directory' && this.portable) {\n this.noMtime = true\n }\n\n this.prefix = opt.prefix\n\n this.path = normalizeWindowsPath(readEntry.path)\n this.mode =\n readEntry.mode !== undefined ?\n this[MODE](readEntry.mode)\n : undefined\n this.uid = this.portable ? undefined : readEntry.uid\n this.gid = this.portable ? undefined : readEntry.gid\n this.uname = this.portable ? undefined : readEntry.uname\n this.gname = this.portable ? undefined : readEntry.gname\n this.size = readEntry.size\n this.mtime =\n this.noMtime ? undefined : opt.mtime || readEntry.mtime\n this.atime = this.portable ? undefined : readEntry.atime\n this.ctime = this.portable ? undefined : readEntry.ctime\n this.linkpath =\n readEntry.linkpath !== undefined ?\n normalizeWindowsPath(readEntry.linkpath)\n : undefined\n\n if (typeof opt.onwarn === 'function') {\n this.on('warn', opt.onwarn)\n }\n\n let pathWarn: false | string = false\n if (!this.preservePaths) {\n const [root, stripped] = stripAbsolutePath(this.path)\n if (root && typeof stripped === 'string') {\n this.path = stripped\n pathWarn = root\n }\n }\n\n this.remain = readEntry.size\n this.blockRemain = readEntry.startBlockSize\n\n this.onWriteEntry?.(this as unknown as WriteEntry)\n this.header = new Header({\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n // only the permissions and setuid/setgid/sticky bitflags\n // not the higher-order bits that specify file type\n mode: this.mode,\n uid: this.portable ? undefined : this.uid,\n gid: this.portable ? undefined : this.gid,\n size: this.size,\n mtime: this.noMtime ? undefined : this.mtime,\n type: this.type,\n uname: this.portable ? undefined : this.uname,\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n })\n\n if (pathWarn) {\n this.warn(\n 'TAR_ENTRY_INFO',\n `stripping ${pathWarn} from absolute path`,\n {\n entry: this,\n path: pathWarn + this.path,\n },\n )\n }\n\n if (this.header.encode() && !this.noPax) {\n super.write(\n new Pax({\n atime: this.portable ? undefined : this.atime,\n ctime: this.portable ? undefined : this.ctime,\n gid: this.portable ? undefined : this.gid,\n mtime: this.noMtime ? undefined : this.mtime,\n path: this[PREFIX](this.path),\n linkpath:\n this.type === 'Link' && this.linkpath !== undefined ?\n this[PREFIX](this.linkpath)\n : this.linkpath,\n size: this.size,\n uid: this.portable ? undefined : this.uid,\n uname: this.portable ? undefined : this.uname,\n dev: this.portable ? undefined : this.readEntry.dev,\n ino: this.portable ? undefined : this.readEntry.ino,\n nlink: this.portable ? undefined : this.readEntry.nlink,\n }).encode(),\n )\n }\n\n const b = this.header?.block\n /* c8 ignore start */\n if (!b) throw new Error('failed to encode header')\n /* c8 ignore stop */\n super.write(b)\n readEntry.pipe(this)\n }\n\n [PREFIX](path: string) {\n return prefixPath(path, this.prefix)\n }\n\n [MODE](mode: number) {\n return modeFix(mode, this.type === 'Directory', this.portable)\n }\n\n write(buffer: Buffer | string, cb?: () => void): boolean\n write(\n str: Buffer | string,\n encoding?: BufferEncoding | null,\n cb?: () => void,\n ): boolean\n write(\n chunk: Buffer | string,\n encoding?: BufferEncoding | (() => any) | null,\n cb?: () => any,\n ): boolean {\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(\n chunk,\n typeof encoding === 'string' ? encoding : 'utf8',\n )\n }\n /* c8 ignore stop */\n const writeLen = chunk.length\n if (writeLen > this.blockRemain) {\n throw new Error('writing more to entry than is appropriate')\n }\n this.blockRemain -= writeLen\n return super.write(chunk, cb)\n }\n\n end(cb?: () => void): this\n end(chunk: Buffer | string, cb?: () => void): this\n end(\n chunk: Buffer | string,\n encoding?: BufferEncoding,\n cb?: () => void,\n ): this\n end(\n chunk?: Buffer | string | (() => void),\n encoding?: BufferEncoding | (() => void),\n cb?: () => void,\n ): this {\n if (this.blockRemain) {\n super.write(Buffer.alloc(this.blockRemain))\n }\n /* c8 ignore start - just junk to comply with NodeJS.WritableStream */\n if (typeof chunk === 'function') {\n cb = chunk\n encoding = undefined\n chunk = undefined\n }\n if (typeof encoding === 'function') {\n cb = encoding\n encoding = undefined\n }\n if (typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding ?? 'utf8')\n }\n if (cb) this.once('finish', cb)\n chunk ? super.end(chunk, cb) : super.end(cb)\n /* c8 ignore stop */\n return this\n }\n}\n\nconst getType = (stat: Stats): EntryTypeName | 'Unsupported' =>\n stat.isFile() ? 'File'\n : stat.isDirectory() ? 'Directory'\n : stat.isSymbolicLink() ? 'SymbolicLink'\n : 'Unsupported'\n"]} \ No newline at end of file diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json new file mode 100644 index 0000000..0283103 --- /dev/null +++ b/node_modules/tar/package.json @@ -0,0 +1,325 @@ +{ + "author": "Isaac Z. Schlueter", + "name": "tar", + "description": "tar for node", + "version": "7.4.3", + "repository": { + "type": "git", + "url": "https://github.com/isaacs/node-tar.git" + }, + "scripts": { + "genparse": "node scripts/generate-parse-fixtures.js", + "snap": "tap", + "test": "tap", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "prepare": "tshy", + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "format": "prettier --write . --log-level warn", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" + }, + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "devDependencies": { + "chmodr": "^1.2.0", + "end-of-stream": "^1.4.3", + "events-to-array": "^2.0.3", + "mutate-fs": "^2.1.1", + "nock": "^13.5.4", + "prettier": "^3.2.5", + "rimraf": "^5.0.5", + "tap": "^18.7.2", + "tshy": "^1.13.1", + "typedoc": "^0.25.13" + }, + "license": "ISC", + "engines": { + "node": ">=18" + }, + "files": [ + "dist" + ], + "tap": { + "coverage-map": "map.js", + "timeout": 0, + "typecheck": true + }, + "prettier": { + "experimentalTernaries": true, + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts", + "./c": "./src/create.ts", + "./create": "./src/create.ts", + "./replace": "./src/create.ts", + "./r": "./src/create.ts", + "./list": "./src/list.ts", + "./t": "./src/list.ts", + "./update": "./src/update.ts", + "./u": "./src/update.ts", + "./extract": "./src/extract.ts", + "./x": "./src/extract.ts", + "./pack": "./src/pack.ts", + "./unpack": "./src/unpack.ts", + "./parse": "./src/parse.ts", + "./read-entry": "./src/read-entry.ts", + "./write-entry": "./src/write-entry.ts", + "./header": "./src/header.ts", + "./pax": "./src/pax.ts", + "./types": "./src/types.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "source": "./src/index.ts", + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "source": "./src/index.ts", + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./c": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./create": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./replace": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./r": { + "import": { + "source": "./src/create.ts", + "types": "./dist/esm/create.d.ts", + "default": "./dist/esm/create.js" + }, + "require": { + "source": "./src/create.ts", + "types": "./dist/commonjs/create.d.ts", + "default": "./dist/commonjs/create.js" + } + }, + "./list": { + "import": { + "source": "./src/list.ts", + "types": "./dist/esm/list.d.ts", + "default": "./dist/esm/list.js" + }, + "require": { + "source": "./src/list.ts", + "types": "./dist/commonjs/list.d.ts", + "default": "./dist/commonjs/list.js" + } + }, + "./t": { + "import": { + "source": "./src/list.ts", + "types": "./dist/esm/list.d.ts", + "default": "./dist/esm/list.js" + }, + "require": { + "source": "./src/list.ts", + "types": "./dist/commonjs/list.d.ts", + "default": "./dist/commonjs/list.js" + } + }, + "./update": { + "import": { + "source": "./src/update.ts", + "types": "./dist/esm/update.d.ts", + "default": "./dist/esm/update.js" + }, + "require": { + "source": "./src/update.ts", + "types": "./dist/commonjs/update.d.ts", + "default": "./dist/commonjs/update.js" + } + }, + "./u": { + "import": { + "source": "./src/update.ts", + "types": "./dist/esm/update.d.ts", + "default": "./dist/esm/update.js" + }, + "require": { + "source": "./src/update.ts", + "types": "./dist/commonjs/update.d.ts", + "default": "./dist/commonjs/update.js" + } + }, + "./extract": { + "import": { + "source": "./src/extract.ts", + "types": "./dist/esm/extract.d.ts", + "default": "./dist/esm/extract.js" + }, + "require": { + "source": "./src/extract.ts", + "types": "./dist/commonjs/extract.d.ts", + "default": "./dist/commonjs/extract.js" + } + }, + "./x": { + "import": { + "source": "./src/extract.ts", + "types": "./dist/esm/extract.d.ts", + "default": "./dist/esm/extract.js" + }, + "require": { + "source": "./src/extract.ts", + "types": "./dist/commonjs/extract.d.ts", + "default": "./dist/commonjs/extract.js" + } + }, + "./pack": { + "import": { + "source": "./src/pack.ts", + "types": "./dist/esm/pack.d.ts", + "default": "./dist/esm/pack.js" + }, + "require": { + "source": "./src/pack.ts", + "types": "./dist/commonjs/pack.d.ts", + "default": "./dist/commonjs/pack.js" + } + }, + "./unpack": { + "import": { + "source": "./src/unpack.ts", + "types": "./dist/esm/unpack.d.ts", + "default": "./dist/esm/unpack.js" + }, + "require": { + "source": "./src/unpack.ts", + "types": "./dist/commonjs/unpack.d.ts", + "default": "./dist/commonjs/unpack.js" + } + }, + "./parse": { + "import": { + "source": "./src/parse.ts", + "types": "./dist/esm/parse.d.ts", + "default": "./dist/esm/parse.js" + }, + "require": { + "source": "./src/parse.ts", + "types": "./dist/commonjs/parse.d.ts", + "default": "./dist/commonjs/parse.js" + } + }, + "./read-entry": { + "import": { + "source": "./src/read-entry.ts", + "types": "./dist/esm/read-entry.d.ts", + "default": "./dist/esm/read-entry.js" + }, + "require": { + "source": "./src/read-entry.ts", + "types": "./dist/commonjs/read-entry.d.ts", + "default": "./dist/commonjs/read-entry.js" + } + }, + "./write-entry": { + "import": { + "source": "./src/write-entry.ts", + "types": "./dist/esm/write-entry.d.ts", + "default": "./dist/esm/write-entry.js" + }, + "require": { + "source": "./src/write-entry.ts", + "types": "./dist/commonjs/write-entry.d.ts", + "default": "./dist/commonjs/write-entry.js" + } + }, + "./header": { + "import": { + "source": "./src/header.ts", + "types": "./dist/esm/header.d.ts", + "default": "./dist/esm/header.js" + }, + "require": { + "source": "./src/header.ts", + "types": "./dist/commonjs/header.d.ts", + "default": "./dist/commonjs/header.js" + } + }, + "./pax": { + "import": { + "source": "./src/pax.ts", + "types": "./dist/esm/pax.d.ts", + "default": "./dist/esm/pax.js" + }, + "require": { + "source": "./src/pax.ts", + "types": "./dist/commonjs/pax.d.ts", + "default": "./dist/commonjs/pax.js" + } + }, + "./types": { + "import": { + "source": "./src/types.ts", + "types": "./dist/esm/types.d.ts", + "default": "./dist/esm/types.js" + }, + "require": { + "source": "./src/types.ts", + "types": "./dist/commonjs/types.d.ts", + "default": "./dist/commonjs/types.js" + } + } + }, + "type": "module", + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts" +} diff --git a/node_modules/to-regex-range/LICENSE b/node_modules/to-regex-range/LICENSE new file mode 100644 index 0000000..7cccaf9 --- /dev/null +++ b/node_modules/to-regex-range/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-present, Jon Schlinkert. + +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. diff --git a/node_modules/to-regex-range/README.md b/node_modules/to-regex-range/README.md new file mode 100644 index 0000000..38887da --- /dev/null +++ b/node_modules/to-regex-range/README.md @@ -0,0 +1,305 @@ +# to-regex-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/to-regex-range.svg?style=flat)](https://www.npmjs.com/package/to-regex-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![NPM total downloads](https://img.shields.io/npm/dt/to-regex-range.svg?style=flat)](https://npmjs.org/package/to-regex-range) [![Linux Build Status](https://img.shields.io/travis/micromatch/to-regex-range.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/to-regex-range) + +> Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save to-regex-range +``` + +
+What does this do? + +
+ +This libary generates the `source` string to be passed to `new RegExp()` for matching a range of numbers. + +**Example** + +```js +const toRegexRange = require('to-regex-range'); +const regex = new RegExp(toRegexRange('15', '95')); +``` + +A string is returned so that you can do whatever you need with it before passing it to `new RegExp()` (like adding `^` or `$` boundaries, defining flags, or combining it another string). + +
+ +
+ +
+Why use this library? + +
+ +### Convenience + +Creating regular expressions for matching numbers gets deceptively complicated pretty fast. + +For example, let's say you need a validation regex for matching part of a user-id, postal code, social security number, tax id, etc: + +* regex for matching `1` => `/1/` (easy enough) +* regex for matching `1` through `5` => `/[1-5]/` (not bad...) +* regex for matching `1` or `5` => `/(1|5)/` (still easy...) +* regex for matching `1` through `50` => `/([1-9]|[1-4][0-9]|50)/` (uh-oh...) +* regex for matching `1` through `55` => `/([1-9]|[1-4][0-9]|5[0-5])/` (no prob, I can do this...) +* regex for matching `1` through `555` => `/([1-9]|[1-9][0-9]|[1-4][0-9]{2}|5[0-4][0-9]|55[0-5])/` (maybe not...) +* regex for matching `0001` through `5555` => `/(0{3}[1-9]|0{2}[1-9][0-9]|0[1-9][0-9]{2}|[1-4][0-9]{3}|5[0-4][0-9]{2}|55[0-4][0-9]|555[0-5])/` (okay, I get the point!) + +The numbers are contrived, but they're also really basic. In the real world you might need to generate a regex on-the-fly for validation. + +**Learn more** + +If you're interested in learning more about [character classes](http://www.regular-expressions.info/charclass.html) and other regex features, I personally have always found [regular-expressions.info](http://www.regular-expressions.info/charclass.html) to be pretty useful. + +### Heavily tested + +As of April 07, 2019, this library runs [>1m test assertions](./test/test.js) against generated regex-ranges to provide brute-force verification that results are correct. + +Tests run in ~280ms on my MacBook Pro, 2.5 GHz Intel Core i7. + +### Optimized + +Generated regular expressions are optimized: + +* duplicate sequences and character classes are reduced using quantifiers +* smart enough to use `?` conditionals when number(s) or range(s) can be positive or negative +* uses fragment caching to avoid processing the same exact string more than once + +
+ +
+ +## Usage + +Add this library to your javascript application with the following line of code + +```js +const toRegexRange = require('to-regex-range'); +``` + +The main export is a function that takes two integers: the `min` value and `max` value (formatted as strings or numbers). + +```js +const source = toRegexRange('15', '95'); +//=> 1[5-9]|[2-8][0-9]|9[0-5] + +const regex = new RegExp(`^${source}$`); +console.log(regex.test('14')); //=> false +console.log(regex.test('50')); //=> true +console.log(regex.test('94')); //=> true +console.log(regex.test('96')); //=> false +``` + +## Options + +### options.capture + +**Type**: `boolean` + +**Deafault**: `undefined` + +Wrap the returned value in parentheses when there is more than one regex condition. Useful when you're dynamically generating ranges. + +```js +console.log(toRegexRange('-10', '10')); +//=> -[1-9]|-?10|[0-9] + +console.log(toRegexRange('-10', '10', { capture: true })); +//=> (-[1-9]|-?10|[0-9]) +``` + +### options.shorthand + +**Type**: `boolean` + +**Deafault**: `undefined` + +Use the regex shorthand for `[0-9]`: + +```js +console.log(toRegexRange('0', '999999')); +//=> [0-9]|[1-9][0-9]{1,5} + +console.log(toRegexRange('0', '999999', { shorthand: true })); +//=> \d|[1-9]\d{1,5} +``` + +### options.relaxZeros + +**Type**: `boolean` + +**Default**: `true` + +This option relaxes matching for leading zeros when when ranges are zero-padded. + +```js +const source = toRegexRange('-0010', '0010'); +const regex = new RegExp(`^${source}$`); +console.log(regex.test('-10')); //=> true +console.log(regex.test('-010')); //=> true +console.log(regex.test('-0010')); //=> true +console.log(regex.test('10')); //=> true +console.log(regex.test('010')); //=> true +console.log(regex.test('0010')); //=> true +``` + +When `relaxZeros` is false, matching is strict: + +```js +const source = toRegexRange('-0010', '0010', { relaxZeros: false }); +const regex = new RegExp(`^${source}$`); +console.log(regex.test('-10')); //=> false +console.log(regex.test('-010')); //=> false +console.log(regex.test('-0010')); //=> true +console.log(regex.test('10')); //=> false +console.log(regex.test('010')); //=> false +console.log(regex.test('0010')); //=> true +``` + +## Examples + +| **Range** | **Result** | **Compile time** | +| --- | --- | --- | +| `toRegexRange(-10, 10)` | `-[1-9]\|-?10\|[0-9]` | _132μs_ | +| `toRegexRange(-100, -10)` | `-1[0-9]\|-[2-9][0-9]\|-100` | _50μs_ | +| `toRegexRange(-100, 100)` | `-[1-9]\|-?[1-9][0-9]\|-?100\|[0-9]` | _42μs_ | +| `toRegexRange(001, 100)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|100` | _109μs_ | +| `toRegexRange(001, 555)` | `0{0,2}[1-9]\|0?[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _51μs_ | +| `toRegexRange(0010, 1000)` | `0{0,2}1[0-9]\|0{0,2}[2-9][0-9]\|0?[1-9][0-9]{2}\|1000` | _31μs_ | +| `toRegexRange(1, 50)` | `[1-9]\|[1-4][0-9]\|50` | _24μs_ | +| `toRegexRange(1, 55)` | `[1-9]\|[1-4][0-9]\|5[0-5]` | _23μs_ | +| `toRegexRange(1, 555)` | `[1-9]\|[1-9][0-9]\|[1-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _30μs_ | +| `toRegexRange(1, 5555)` | `[1-9]\|[1-9][0-9]{1,2}\|[1-4][0-9]{3}\|5[0-4][0-9]{2}\|55[0-4][0-9]\|555[0-5]` | _43μs_ | +| `toRegexRange(111, 555)` | `11[1-9]\|1[2-9][0-9]\|[2-4][0-9]{2}\|5[0-4][0-9]\|55[0-5]` | _38μs_ | +| `toRegexRange(29, 51)` | `29\|[34][0-9]\|5[01]` | _24μs_ | +| `toRegexRange(31, 877)` | `3[1-9]\|[4-9][0-9]\|[1-7][0-9]{2}\|8[0-6][0-9]\|87[0-7]` | _32μs_ | +| `toRegexRange(5, 5)` | `5` | _8μs_ | +| `toRegexRange(5, 6)` | `5\|6` | _11μs_ | +| `toRegexRange(1, 2)` | `1\|2` | _6μs_ | +| `toRegexRange(1, 5)` | `[1-5]` | _15μs_ | +| `toRegexRange(1, 10)` | `[1-9]\|10` | _22μs_ | +| `toRegexRange(1, 100)` | `[1-9]\|[1-9][0-9]\|100` | _25μs_ | +| `toRegexRange(1, 1000)` | `[1-9]\|[1-9][0-9]{1,2}\|1000` | _31μs_ | +| `toRegexRange(1, 10000)` | `[1-9]\|[1-9][0-9]{1,3}\|10000` | _34μs_ | +| `toRegexRange(1, 100000)` | `[1-9]\|[1-9][0-9]{1,4}\|100000` | _36μs_ | +| `toRegexRange(1, 1000000)` | `[1-9]\|[1-9][0-9]{1,5}\|1000000` | _42μs_ | +| `toRegexRange(1, 10000000)` | `[1-9]\|[1-9][0-9]{1,6}\|10000000` | _42μs_ | + +## Heads up! + +**Order of arguments** + +When the `min` is larger than the `max`, values will be flipped to create a valid range: + +```js +toRegexRange('51', '29'); +``` + +Is effectively flipped to: + +```js +toRegexRange('29', '51'); +//=> 29|[3-4][0-9]|5[0-1] +``` + +**Steps / increments** + +This library does not support steps (increments). A pr to add support would be welcome. + +## History + +### v2.0.0 - 2017-04-21 + +**New features** + +Adds support for zero-padding! + +### v1.0.0 + +**Optimizations** + +Repeating ranges are now grouped using quantifiers. rocessing time is roughly the same, but the generated regex is much smaller, which should result in faster matching. + +## Attribution + +Inspired by the python library [range-regex](https://github.com/dimka665/range-regex). + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [expand-range](https://www.npmjs.com/package/expand-range): Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used… [more](https://github.com/jonschlinkert/expand-range) | [homepage](https://github.com/jonschlinkert/expand-range "Fast, bash-like range expansion. Expand a range of numbers or letters, uppercase or lowercase. Used by micromatch.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [repeat-element](https://www.npmjs.com/package/repeat-element): Create an array by repeating the given value n times. | [homepage](https://github.com/jonschlinkert/repeat-element "Create an array by repeating the given value n times.") +* [repeat-string](https://www.npmjs.com/package/repeat-string): Repeat the given string n times. Fastest implementation for repeating a string. | [homepage](https://github.com/jonschlinkert/repeat-string "Repeat the given string n times. Fastest implementation for repeating a string.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 63 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [doowb](https://github.com/doowb) | +| 2 | [realityking](https://github.com/realityking) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! + + + + + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 07, 2019._ \ No newline at end of file diff --git a/node_modules/to-regex-range/index.js b/node_modules/to-regex-range/index.js new file mode 100644 index 0000000..77fbace --- /dev/null +++ b/node_modules/to-regex-range/index.js @@ -0,0 +1,288 @@ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +const isNumber = require('is-number'); + +const toRegexRange = (min, max, options) => { + if (isNumber(min) === false) { + throw new TypeError('toRegexRange: expected the first argument to be a number'); + } + + if (max === void 0 || min === max) { + return String(min); + } + + if (isNumber(max) === false) { + throw new TypeError('toRegexRange: expected the second argument to be a number.'); + } + + let opts = { relaxZeros: true, ...options }; + if (typeof opts.strictZeros === 'boolean') { + opts.relaxZeros = opts.strictZeros === false; + } + + let relax = String(opts.relaxZeros); + let shorthand = String(opts.shorthand); + let capture = String(opts.capture); + let wrap = String(opts.wrap); + let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap; + + if (toRegexRange.cache.hasOwnProperty(cacheKey)) { + return toRegexRange.cache[cacheKey].result; + } + + let a = Math.min(min, max); + let b = Math.max(min, max); + + if (Math.abs(a - b) === 1) { + let result = min + '|' + max; + if (opts.capture) { + return `(${result})`; + } + if (opts.wrap === false) { + return result; + } + return `(?:${result})`; + } + + let isPadded = hasPadding(min) || hasPadding(max); + let state = { min, max, a, b }; + let positives = []; + let negatives = []; + + if (isPadded) { + state.isPadded = isPadded; + state.maxLen = String(state.max).length; + } + + if (a < 0) { + let newMin = b < 0 ? Math.abs(b) : 1; + negatives = splitToPatterns(newMin, Math.abs(a), state, opts); + a = state.a = 0; + } + + if (b >= 0) { + positives = splitToPatterns(a, b, state, opts); + } + + state.negatives = negatives; + state.positives = positives; + state.result = collatePatterns(negatives, positives, opts); + + if (opts.capture === true) { + state.result = `(${state.result})`; + } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) { + state.result = `(?:${state.result})`; + } + + toRegexRange.cache[cacheKey] = state; + return state.result; +}; + +function collatePatterns(neg, pos, options) { + let onlyNegative = filterPatterns(neg, pos, '-', false, options) || []; + let onlyPositive = filterPatterns(pos, neg, '', false, options) || []; + let intersected = filterPatterns(neg, pos, '-?', true, options) || []; + let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); + return subpatterns.join('|'); +} + +function splitToRanges(min, max) { + let nines = 1; + let zeros = 1; + + let stop = countNines(min, nines); + let stops = new Set([max]); + + while (min <= stop && stop <= max) { + stops.add(stop); + nines += 1; + stop = countNines(min, nines); + } + + stop = countZeros(max + 1, zeros) - 1; + + while (min < stop && stop <= max) { + stops.add(stop); + zeros += 1; + stop = countZeros(max + 1, zeros) - 1; + } + + stops = [...stops]; + stops.sort(compare); + return stops; +} + +/** + * Convert a range to a regex pattern + * @param {Number} `start` + * @param {Number} `stop` + * @return {String} + */ + +function rangeToPattern(start, stop, options) { + if (start === stop) { + return { pattern: start, count: [], digits: 0 }; + } + + let zipped = zip(start, stop); + let digits = zipped.length; + let pattern = ''; + let count = 0; + + for (let i = 0; i < digits; i++) { + let [startDigit, stopDigit] = zipped[i]; + + if (startDigit === stopDigit) { + pattern += startDigit; + + } else if (startDigit !== '0' || stopDigit !== '9') { + pattern += toCharacterClass(startDigit, stopDigit, options); + + } else { + count++; + } + } + + if (count) { + pattern += options.shorthand === true ? '\\d' : '[0-9]'; + } + + return { pattern, count: [count], digits }; +} + +function splitToPatterns(min, max, tok, options) { + let ranges = splitToRanges(min, max); + let tokens = []; + let start = min; + let prev; + + for (let i = 0; i < ranges.length; i++) { + let max = ranges[i]; + let obj = rangeToPattern(String(start), String(max), options); + let zeros = ''; + + if (!tok.isPadded && prev && prev.pattern === obj.pattern) { + if (prev.count.length > 1) { + prev.count.pop(); + } + + prev.count.push(obj.count[0]); + prev.string = prev.pattern + toQuantifier(prev.count); + start = max + 1; + continue; + } + + if (tok.isPadded) { + zeros = padZeros(max, tok, options); + } + + obj.string = zeros + obj.pattern + toQuantifier(obj.count); + tokens.push(obj); + start = max + 1; + prev = obj; + } + + return tokens; +} + +function filterPatterns(arr, comparison, prefix, intersection, options) { + let result = []; + + for (let ele of arr) { + let { string } = ele; + + // only push if _both_ are negative... + if (!intersection && !contains(comparison, 'string', string)) { + result.push(prefix + string); + } + + // or _both_ are positive + if (intersection && contains(comparison, 'string', string)) { + result.push(prefix + string); + } + } + return result; +} + +/** + * Zip strings + */ + +function zip(a, b) { + let arr = []; + for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); + return arr; +} + +function compare(a, b) { + return a > b ? 1 : b > a ? -1 : 0; +} + +function contains(arr, key, val) { + return arr.some(ele => ele[key] === val); +} + +function countNines(min, len) { + return Number(String(min).slice(0, -len) + '9'.repeat(len)); +} + +function countZeros(integer, zeros) { + return integer - (integer % Math.pow(10, zeros)); +} + +function toQuantifier(digits) { + let [start = 0, stop = ''] = digits; + if (stop || start > 1) { + return `{${start + (stop ? ',' + stop : '')}}`; + } + return ''; +} + +function toCharacterClass(a, b, options) { + return `[${a}${(b - a === 1) ? '' : '-'}${b}]`; +} + +function hasPadding(str) { + return /^-?(0+)\d/.test(str); +} + +function padZeros(value, tok, options) { + if (!tok.isPadded) { + return value; + } + + let diff = Math.abs(tok.maxLen - String(value).length); + let relax = options.relaxZeros !== false; + + switch (diff) { + case 0: + return ''; + case 1: + return relax ? '0?' : '0'; + case 2: + return relax ? '0{0,2}' : '00'; + default: { + return relax ? `0{0,${diff}}` : `0{${diff}}`; + } + } +} + +/** + * Cache + */ + +toRegexRange.cache = {}; +toRegexRange.clearCache = () => (toRegexRange.cache = {}); + +/** + * Expose `toRegexRange` + */ + +module.exports = toRegexRange; diff --git a/node_modules/to-regex-range/package.json b/node_modules/to-regex-range/package.json new file mode 100644 index 0000000..4ef194f --- /dev/null +++ b/node_modules/to-regex-range/package.json @@ -0,0 +1,88 @@ +{ + "name": "to-regex-range", + "description": "Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.", + "version": "5.0.1", + "homepage": "https://github.com/micromatch/to-regex-range", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Rouven Weßling (www.rouvenwessling.de)" + ], + "repository": "micromatch/to-regex-range", + "bugs": { + "url": "https://github.com/micromatch/to-regex-range/issues" + }, + "license": "MIT", + "files": [ + "index.js" + ], + "main": "index.js", + "engines": { + "node": ">=8.0" + }, + "scripts": { + "test": "mocha" + }, + "dependencies": { + "is-number": "^7.0.0" + }, + "devDependencies": { + "fill-range": "^6.0.0", + "gulp-format-md": "^2.0.0", + "mocha": "^6.0.2", + "text-table": "^0.2.0", + "time-diff": "^0.3.1" + }, + "keywords": [ + "bash", + "date", + "expand", + "expansion", + "expression", + "glob", + "match", + "match date", + "match number", + "match numbers", + "match year", + "matches", + "matching", + "number", + "numbers", + "numerical", + "range", + "ranges", + "regex", + "regexp", + "regular", + "regular expression", + "sequence" + ], + "verb": { + "layout": "default", + "toc": false, + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "helpers": { + "examples": { + "displayName": "examples" + } + }, + "related": { + "list": [ + "expand-range", + "fill-range", + "micromatch", + "repeat-element", + "repeat-string" + ] + } + } +} diff --git a/node_modules/yallist/LICENSE.md b/node_modules/yallist/LICENSE.md new file mode 100644 index 0000000..881248b --- /dev/null +++ b/node_modules/yallist/LICENSE.md @@ -0,0 +1,63 @@ +All packages under `src/` are licensed according to the terms in +their respective `LICENSE` or `LICENSE.md` files. + +The remainder of this project is licensed under the Blue Oak +Model License, as follows: + +----- + +# Blue Oak Model License + +Version 1.0.0 + +## Purpose + +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. + +## Acceptance + +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. + +## Copyright + +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. + +## Notices + +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. + +## Excuse + +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. + +## Patent + +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. + +## Reliability + +No contributor can revoke this license. + +## No Liability + +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/node_modules/yallist/README.md b/node_modules/yallist/README.md new file mode 100644 index 0000000..68f6162 --- /dev/null +++ b/node_modules/yallist/README.md @@ -0,0 +1,205 @@ +# yallist + +Yet Another Linked List + +There are many doubly-linked list implementations like it, but this +one is mine. + +For when an array would be too big, and a Map can't be iterated in +reverse order. + +## basic usage + +```js +import { Yallist } from 'yallist' +var myList = new Yallist([1, 2, 3]) +myList.push('foo') +myList.unshift('bar') +// of course pop() and shift() are there, too +console.log(myList.toArray()) // ['bar', 1, 2, 3, 'foo'] +myList.forEach(function (k) { + // walk the list head to tail +}) +myList.forEachReverse(function (k, index, list) { + // walk the list tail to head +}) +var myDoubledList = myList.map(function (k) { + return k + k +}) +// now myDoubledList contains ['barbar', 2, 4, 6, 'foofoo'] +// mapReverse is also a thing +var myDoubledListReverse = myList.mapReverse(function (k) { + return k + k +}) // ['foofoo', 6, 4, 2, 'barbar'] + +var reduced = myList.reduce(function (set, entry) { + set += entry + return set +}, 'start') +console.log(reduced) // 'startfoo123bar' +``` + +## api + +The whole API is considered "public". + +Functions with the same name as an Array method work more or less the +same way. + +There's reverse versions of most things because that's the point. + +### Yallist + +Default export, the class that holds and manages a list. + +Call it with either a forEach-able (like an array) or a set of +arguments, to initialize the list. + +The Array-ish methods all act like you'd expect. No magic length, +though, so if you change that it won't automatically prune or add +empty spots. + +### Yallist.create(..) + +Alias for Yallist function. Some people like factories. + +#### yallist.head + +The first node in the list + +#### yallist.tail + +The last node in the list + +#### yallist.length + +The number of nodes in the list. (Change this at your peril. It is +not magic like Array length.) + +#### yallist.toArray() + +Convert the list to an array. + +#### yallist.forEach(fn, [thisp]) + +Call a function on each item in the list. + +#### yallist.forEachReverse(fn, [thisp]) + +Call a function on each item in the list, in reverse order. + +#### yallist.get(n) + +Get the data at position `n` in the list. If you use this a lot, +probably better off just using an Array. + +#### yallist.getReverse(n) + +Get the data at position `n`, counting from the tail. + +#### yallist.map(fn, thisp) + +Create a new Yallist with the result of calling the function on each +item. + +#### yallist.mapReverse(fn, thisp) + +Same as `map`, but in reverse. + +#### yallist.pop() + +Get the data from the list tail, and remove the tail from the list. + +#### yallist.push(item, ...) + +Insert one or more items to the tail of the list. + +#### yallist.reduce(fn, initialValue) + +Like Array.reduce. + +#### yallist.reduceReverse + +Like Array.reduce, but in reverse. + +#### yallist.reverse + +Reverse the list in place. + +#### yallist.shift() + +Get the data from the list head, and remove the head from the list. + +#### yallist.slice([from], [to]) + +Just like Array.slice, but returns a new Yallist. + +#### yallist.sliceReverse([from], [to]) + +Just like yallist.slice, but the result is returned in reverse. + +#### yallist.splice(start, deleteCount, ...) + +Like Array.splice. + +#### yallist.toArray() + +Create an array representation of the list. + +#### yallist.toArrayReverse() + +Create a reversed array representation of the list. + +#### yallist.unshift(item, ...) + +Insert one or more items to the head of the list. + +#### yallist.unshiftNode(node) + +Move a Node object to the front of the list. (That is, pull it out of +wherever it lives, and make it the new head.) + +If the node belongs to a different list, then that list will remove it +first. + +#### yallist.pushNode(node) + +Move a Node object to the end of the list. (That is, pull it out of +wherever it lives, and make it the new tail.) + +If the node belongs to a list already, then that list will remove it +first. + +#### yallist.removeNode(node) + +Remove a node from the list, preserving referential integrity of head +and tail and other nodes. + +Will throw an error if you try to have a list remove a node that +doesn't belong to it. + +### Yallist.Node + +The class that holds the data and is actually the list. + +Call with `const n = new Node(value, previousNode, nextNode)` + +Note that if you do direct operations on Nodes themselves, it's very +easy to get into weird states where the list is broken. Be careful :) + +#### node.next + +The next node in the list. + +#### node.prev + +The previous node in the list. + +#### node.value + +The data the node contains. + +#### node.list + +The list to which this node belongs. (Null if it does not belong to +any list.) diff --git a/node_modules/yallist/dist/commonjs/index.d.ts b/node_modules/yallist/dist/commonjs/index.d.ts new file mode 100644 index 0000000..044a1d7 --- /dev/null +++ b/node_modules/yallist/dist/commonjs/index.d.ts @@ -0,0 +1,39 @@ +export declare class Yallist { + tail?: Node; + head?: Node; + length: number; + static create(list?: Iterable): Yallist; + constructor(list?: Iterable); + [Symbol.iterator](): Generator; + removeNode(node: Node): Node | undefined; + unshiftNode(node: Node): void; + pushNode(node: Node): void; + push(...args: T[]): number; + unshift(...args: T[]): number; + pop(): T | undefined; + shift(): T | undefined; + forEach(fn: (value: T, i: number, list: Yallist) => any, thisp?: any): void; + forEachReverse(fn: (value: T, i: number, list: Yallist) => any, thisp?: any): void; + get(n: number): T | undefined; + getReverse(n: number): T | undefined; + map(fn: (value: T, list: Yallist) => R, thisp?: any): Yallist; + mapReverse(fn: (value: T, list: Yallist) => R, thisp?: any): Yallist; + reduce(fn: (left: T, right: T, i: number) => T): T; + reduce(fn: (acc: R, next: T, i: number) => R, initial: R): R; + reduceReverse(fn: (left: T, right: T, i: number) => T): T; + reduceReverse(fn: (acc: R, next: T, i: number) => R, initial: R): R; + toArray(): any[]; + toArrayReverse(): any[]; + slice(from?: number, to?: number): Yallist; + sliceReverse(from?: number, to?: number): Yallist; + splice(start: number, deleteCount?: number, ...nodes: T[]): T[]; + reverse(): this; +} +export declare class Node { + list?: Yallist; + next?: Node; + prev?: Node; + value: T; + constructor(value: T, prev?: Node | undefined, next?: Node | undefined, list?: Yallist | undefined); +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/yallist/dist/commonjs/index.d.ts.map b/node_modules/yallist/dist/commonjs/index.d.ts.map new file mode 100644 index 0000000..22a0438 --- /dev/null +++ b/node_modules/yallist/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO,CAAC,CAAC,GAAG,OAAO;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,MAAM,EAAE,MAAM,CAAI;IAElB,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,GAAE,QAAQ,CAAC,CAAC,CAAM;gBAIrC,IAAI,GAAE,QAAQ,CAAC,CAAC,CAAM;IAMjC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAMlB,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAiCxB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAuBzB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAuBtB,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE;IAOjB,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE;IAOpB,GAAG;IAkBH,KAAK;IAkBL,O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,EACnB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,EACrC,OAAO,EAAE,CAAC,GACT,CAAC;IA0BJ,OAAO;IASP,cAAc;IASd,KAAK,CAAC,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAoB;IA4BhD,YAAY,CAAC,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAoB;IA4BvD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,GAAE,MAAU,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE;IAgC5D,OAAO;CAYR;AAwCD,qBAAa,IAAI,CAAC,CAAC,GAAG,OAAO;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,KAAK,EAAE,CAAC,CAAA;gBAGN,KAAK,EAAE,CAAC,EACR,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,EAC1B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,EAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS;CAmBhC"} \ No newline at end of file diff --git a/node_modules/yallist/dist/commonjs/index.js b/node_modules/yallist/dist/commonjs/index.js new file mode 100644 index 0000000..c1e1e47 --- /dev/null +++ b/node_modules/yallist/dist/commonjs/index.js @@ -0,0 +1,384 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Node = exports.Yallist = void 0; +class Yallist { + tail; + head; + length = 0; + static create(list = []) { + return new Yallist(list); + } + constructor(list = []) { + for (const item of list) { + this.push(item); + } + } + *[Symbol.iterator]() { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; + } + } + removeNode(node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list'); + } + const next = node.next; + const prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; + } + this.length--; + node.next = undefined; + node.prev = undefined; + node.list = undefined; + return next; + } + unshiftNode(node) { + if (node === this.head) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + const head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + } + pushNode(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + const tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + } + push(...args) { + for (let i = 0, l = args.length; i < l; i++) { + push(this, args[i]); + } + return this.length; + } + unshift(...args) { + for (var i = 0, l = args.length; i < l; i++) { + unshift(this, args[i]); + } + return this.length; + } + pop() { + if (!this.tail) { + return undefined; + } + const res = this.tail.value; + const t = this.tail; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = undefined; + } + else { + this.head = undefined; + } + t.list = undefined; + this.length--; + return res; + } + shift() { + if (!this.head) { + return undefined; + } + const res = this.head.value; + const h = this.head; + this.head = this.head.next; + if (this.head) { + this.head.prev = undefined; + } + else { + this.tail = undefined; + } + h.list = undefined; + this.length--; + return res; + } + forEach(fn, thisp) { + thisp = thisp || this; + for (let walker = this.head, i = 0; !!walker; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } + } + forEachReverse(fn, thisp) { + thisp = thisp || this; + for (let walker = this.tail, i = this.length - 1; !!walker; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } + } + get(n) { + let i = 0; + let walker = this.head; + for (; !!walker && i < n; i++) { + walker = walker.next; + } + if (i === n && !!walker) { + return walker.value; + } + } + getReverse(n) { + let i = 0; + let walker = this.tail; + for (; !!walker && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev; + } + if (i === n && !!walker) { + return walker.value; + } + } + map(fn, thisp) { + thisp = thisp || this; + const res = new Yallist(); + for (let walker = this.head; !!walker;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + } + mapReverse(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (let walker = this.tail; !!walker;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + } + reduce(fn, initial) { + let acc; + let walker = this.head; + if (arguments.length > 1) { + acc = initial; + } + else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } + else { + throw new TypeError('Reduce of empty list with no initial value'); + } + for (var i = 0; !!walker; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + return acc; + } + reduceReverse(fn, initial) { + let acc; + let walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } + else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } + else { + throw new TypeError('Reduce of empty list with no initial value'); + } + for (let i = this.length - 1; !!walker; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; + } + return acc; + } + toArray() { + const arr = new Array(this.length); + for (let i = 0, walker = this.head; !!walker; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + } + toArrayReverse() { + const arr = new Array(this.length); + for (let i = 0, walker = this.tail; !!walker; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + } + slice(from = 0, to = this.length) { + if (to < 0) { + to += this.length; + } + if (from < 0) { + from += this.length; + } + const ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + let walker = this.head; + let i = 0; + for (i = 0; !!walker && i < from; i++) { + walker = walker.next; + } + for (; !!walker && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + return ret; + } + sliceReverse(from = 0, to = this.length) { + if (to < 0) { + to += this.length; + } + if (from < 0) { + from += this.length; + } + const ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + let i = this.length; + let walker = this.tail; + for (; !!walker && i > to; i--) { + walker = walker.prev; + } + for (; !!walker && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + return ret; + } + splice(start, deleteCount = 0, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + let walker = this.head; + for (let i = 0; !!walker && i < start; i++) { + walker = walker.next; + } + const ret = []; + for (let i = 0; !!walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); + } + if (!walker) { + walker = this.tail; + } + else if (walker !== this.tail) { + walker = walker.prev; + } + for (const v of nodes) { + walker = insertAfter(this, walker, v); + } + return ret; + } + reverse() { + const head = this.head; + const tail = this.tail; + for (let walker = head; !!walker; walker = walker.prev) { + const p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + } +} +exports.Yallist = Yallist; +// insertAfter undefined means "make the node the new head of list" +function insertAfter(self, node, value) { + const prev = node; + const next = node ? node.next : self.head; + const inserted = new Node(value, prev, next, self); + if (inserted.next === undefined) { + self.tail = inserted; + } + if (inserted.prev === undefined) { + self.head = inserted; + } + self.length++; + return inserted; +} +function push(self, item) { + self.tail = new Node(item, self.tail, undefined, self); + if (!self.head) { + self.head = self.tail; + } + self.length++; +} +function unshift(self, item) { + self.head = new Node(item, undefined, self.head, self); + if (!self.tail) { + self.tail = self.head; + } + self.length++; +} +class Node { + list; + next; + prev; + value; + constructor(value, prev, next, list) { + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } + else { + this.prev = undefined; + } + if (next) { + next.prev = this; + this.next = next; + } + else { + this.next = undefined; + } + } +} +exports.Node = Node; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/yallist/dist/commonjs/index.js.map b/node_modules/yallist/dist/commonjs/index.js.map new file mode 100644 index 0000000..e90e328 --- /dev/null +++ b/node_modules/yallist/dist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;IAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAI,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAA;AACf,CAAC;AAED,MAAa,IAAI;IACf,IAAI,CAAa;IACjB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,KAAK,CAAG;IAER,YACE,KAAQ,EACR,IAA0B,EAC1B,IAA0B,EAC1B,IAA6B;QAE7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAElB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACvB,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACvB,CAAC;IACH,CAAC;CACF;AA7BD,oBA6BC","sourcesContent":["export class Yallist {\n tail?: Node\n head?: Node\n length: number = 0\n\n static create(list: Iterable = []) {\n return new Yallist(list)\n }\n\n constructor(list: Iterable = []) {\n for (const item of list) {\n this.push(item)\n }\n }\n\n *[Symbol.iterator]() {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n\n removeNode(node: Node) {\n if (node.list !== this) {\n throw new Error(\n 'removing node which does not belong to this list',\n )\n }\n\n const next = node.next\n const prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n this.length--\n node.next = undefined\n node.prev = undefined\n node.list = undefined\n\n return next\n }\n\n unshiftNode(node: Node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n const head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n }\n\n pushNode(node: Node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n const tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n }\n\n push(...args: T[]) {\n for (let i = 0, l = args.length; i < l; i++) {\n push(this, args[i])\n }\n return this.length\n }\n\n unshift(...args: T[]) {\n for (var i = 0, l = args.length; i < l; i++) {\n unshift(this, args[i])\n }\n return this.length\n }\n\n pop() {\n if (!this.tail) {\n return undefined\n }\n\n const res = this.tail.value\n const t = this.tail\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = undefined\n } else {\n this.head = undefined\n }\n t.list = undefined\n this.length--\n return res\n }\n\n shift() {\n if (!this.head) {\n return undefined\n }\n\n const res = this.head.value\n const h = this.head\n this.head = this.head.next\n if (this.head) {\n this.head.prev = undefined\n } else {\n this.tail = undefined\n }\n h.list = undefined\n this.length--\n return res\n }\n\n forEach(\n fn: (value: T, i: number, list: Yallist) => any,\n thisp?: any,\n ) {\n thisp = thisp || this\n for (let walker = this.head, i = 0; !!walker; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n }\n\n forEachReverse(\n fn: (value: T, i: number, list: Yallist) => any,\n thisp?: any,\n ) {\n thisp = thisp || this\n for (let walker = this.tail, i = this.length - 1; !!walker; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n }\n\n get(n: number) {\n let i = 0\n let walker = this.head\n for (; !!walker && i < n; i++) {\n walker = walker.next\n }\n if (i === n && !!walker) {\n return walker.value\n }\n }\n\n getReverse(n: number) {\n let i = 0\n let walker = this.tail\n for (; !!walker && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && !!walker) {\n return walker.value\n }\n }\n\n map(\n fn: (value: T, list: Yallist) => R,\n thisp?: any,\n ): Yallist {\n thisp = thisp || this\n const res = new Yallist()\n for (let walker = this.head; !!walker; ) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n }\n\n mapReverse(\n fn: (value: T, list: Yallist) => R,\n thisp?: any,\n ): Yallist {\n thisp = thisp || this\n var res = new Yallist()\n for (let walker = this.tail; !!walker; ) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n }\n\n reduce(fn: (left: T, right: T, i: number) => T): T\n reduce(\n fn: (acc: R, next: T, i: number) => R,\n initial: R,\n ): R\n reduce(\n fn: (acc: R, next: T, i: number) => R,\n initial?: R,\n ): R {\n let acc: R | T\n let walker = this.head\n if (arguments.length > 1) {\n acc = initial as R\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError(\n 'Reduce of empty list with no initial value',\n )\n }\n\n for (var i = 0; !!walker; i++) {\n acc = fn(acc as R, walker.value, i)\n walker = walker.next\n }\n\n return acc as R\n }\n\n reduceReverse(fn: (left: T, right: T, i: number) => T): T\n reduceReverse(\n fn: (acc: R, next: T, i: number) => R,\n initial: R,\n ): R\n reduceReverse(\n fn: (acc: R, next: T, i: number) => R,\n initial?: R,\n ): R {\n let acc: R | T\n let walker = this.tail\n if (arguments.length > 1) {\n acc = initial as R\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError(\n 'Reduce of empty list with no initial value',\n )\n }\n\n for (let i = this.length - 1; !!walker; i--) {\n acc = fn(acc as R, walker.value, i)\n walker = walker.prev\n }\n\n return acc as R\n }\n\n toArray() {\n const arr = new Array(this.length)\n for (let i = 0, walker = this.head; !!walker; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n }\n\n toArrayReverse() {\n const arr = new Array(this.length)\n for (let i = 0, walker = this.tail; !!walker; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n }\n\n slice(from: number = 0, to: number = this.length) {\n if (to < 0) {\n to += this.length\n }\n if (from < 0) {\n from += this.length\n }\n const ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n let walker = this.head\n let i = 0\n for (i = 0; !!walker && i < from; i++) {\n walker = walker.next\n }\n for (; !!walker && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n }\n\n sliceReverse(from: number = 0, to: number = this.length) {\n if (to < 0) {\n to += this.length\n }\n if (from < 0) {\n from += this.length\n }\n const ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n let i = this.length\n let walker = this.tail\n for (; !!walker && i > to; i--) {\n walker = walker.prev\n }\n for (; !!walker && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n }\n\n splice(start: number, deleteCount: number = 0, ...nodes: T[]) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start\n }\n\n let walker = this.head\n\n for (let i = 0; !!walker && i < start; i++) {\n walker = walker.next\n }\n\n const ret: T[] = []\n for (let i = 0; !!walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (!walker) {\n walker = this.tail\n } else if (walker !== this.tail) {\n walker = walker.prev\n }\n\n for (const v of nodes) {\n walker = insertAfter(this, walker, v)\n }\n\n return ret\n }\n\n reverse() {\n const head = this.head\n const tail = this.tail\n for (let walker = head; !!walker; walker = walker.prev) {\n const p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n }\n}\n\n// insertAfter undefined means \"make the node the new head of list\"\nfunction insertAfter(\n self: Yallist,\n node: Node | undefined,\n value: T,\n) {\n const prev = node\n const next = node ? node.next : self.head\n const inserted = new Node(value, prev, next, self)\n\n if (inserted.next === undefined) {\n self.tail = inserted\n }\n if (inserted.prev === undefined) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push(self: Yallist, item: T) {\n self.tail = new Node(item, self.tail, undefined, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift(self: Yallist, item: T) {\n self.head = new Node(item, undefined, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nexport class Node {\n list?: Yallist\n next?: Node\n prev?: Node\n value: T\n\n constructor(\n value: T,\n prev?: Node | undefined,\n next?: Node | undefined,\n list?: Yallist | undefined,\n ) {\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = undefined\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = undefined\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/yallist/dist/commonjs/package.json b/node_modules/yallist/dist/commonjs/package.json new file mode 100644 index 0000000..5bbefff --- /dev/null +++ b/node_modules/yallist/dist/commonjs/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/node_modules/yallist/dist/esm/index.d.ts b/node_modules/yallist/dist/esm/index.d.ts new file mode 100644 index 0000000..044a1d7 --- /dev/null +++ b/node_modules/yallist/dist/esm/index.d.ts @@ -0,0 +1,39 @@ +export declare class Yallist { + tail?: Node; + head?: Node; + length: number; + static create(list?: Iterable): Yallist; + constructor(list?: Iterable); + [Symbol.iterator](): Generator; + removeNode(node: Node): Node | undefined; + unshiftNode(node: Node): void; + pushNode(node: Node): void; + push(...args: T[]): number; + unshift(...args: T[]): number; + pop(): T | undefined; + shift(): T | undefined; + forEach(fn: (value: T, i: number, list: Yallist) => any, thisp?: any): void; + forEachReverse(fn: (value: T, i: number, list: Yallist) => any, thisp?: any): void; + get(n: number): T | undefined; + getReverse(n: number): T | undefined; + map(fn: (value: T, list: Yallist) => R, thisp?: any): Yallist; + mapReverse(fn: (value: T, list: Yallist) => R, thisp?: any): Yallist; + reduce(fn: (left: T, right: T, i: number) => T): T; + reduce(fn: (acc: R, next: T, i: number) => R, initial: R): R; + reduceReverse(fn: (left: T, right: T, i: number) => T): T; + reduceReverse(fn: (acc: R, next: T, i: number) => R, initial: R): R; + toArray(): any[]; + toArrayReverse(): any[]; + slice(from?: number, to?: number): Yallist; + sliceReverse(from?: number, to?: number): Yallist; + splice(start: number, deleteCount?: number, ...nodes: T[]): T[]; + reverse(): this; +} +export declare class Node { + list?: Yallist; + next?: Node; + prev?: Node; + value: T; + constructor(value: T, prev?: Node | undefined, next?: Node | undefined, list?: Yallist | undefined); +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/yallist/dist/esm/index.d.ts.map b/node_modules/yallist/dist/esm/index.d.ts.map new file mode 100644 index 0000000..22a0438 --- /dev/null +++ b/node_modules/yallist/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO,CAAC,CAAC,GAAG,OAAO;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,MAAM,EAAE,MAAM,CAAI;IAElB,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,GAAE,QAAQ,CAAC,CAAC,CAAM;gBAIrC,IAAI,GAAE,QAAQ,CAAC,CAAC,CAAM;IAMjC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAMlB,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAiCxB,WAAW,C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AAE,CAAC,EAAE,MAAM,KAAK,CAAC,EACrC,OAAO,EAAE,CAAC,GACT,CAAC;IA0BJ,aAAa,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC;IACzD,aAAa,CAAC,CAAC,GAAG,GAAG,EACnB,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC,EACrC,OAAO,EAAE,CAAC,GACT,CAAC;IA0BJ,OAAO;IASP,cAAc;IASd,KAAK,CAAC,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAoB;IA4BhD,YAAY,CAAC,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAoB;IA4BvD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,GAAE,MAAU,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE;IAgC5D,OAAO;CAYR;AAwCD,qBAAa,IAAI,CAAC,CAAC,GAAG,OAAO;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,KAAK,EAAE,CAAC,CAAA;gBAGN,KAAK,EAAE,CAAC,EACR,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,EAC1B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,EAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS;CAmBhC"} \ No newline at end of file diff --git a/node_modules/yallist/dist/esm/index.js b/node_modules/yallist/dist/esm/index.js new file mode 100644 index 0000000..3d81c51 --- /dev/null +++ b/node_modules/yallist/dist/esm/index.js @@ -0,0 +1,379 @@ +export class Yallist { + tail; + head; + length = 0; + static create(list = []) { + return new Yallist(list); + } + constructor(list = []) { + for (const item of list) { + this.push(item); + } + } + *[Symbol.iterator]() { + for (let walker = this.head; walker; walker = walker.next) { + yield walker.value; + } + } + removeNode(node) { + if (node.list !== this) { + throw new Error('removing node which does not belong to this list'); + } + const next = node.next; + const prev = node.prev; + if (next) { + next.prev = prev; + } + if (prev) { + prev.next = next; + } + if (node === this.head) { + this.head = next; + } + if (node === this.tail) { + this.tail = prev; + } + this.length--; + node.next = undefined; + node.prev = undefined; + node.list = undefined; + return next; + } + unshiftNode(node) { + if (node === this.head) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + const head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; + } + this.length++; + } + pushNode(node) { + if (node === this.tail) { + return; + } + if (node.list) { + node.list.removeNode(node); + } + const tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; + } + push(...args) { + for (let i = 0, l = args.length; i < l; i++) { + push(this, args[i]); + } + return this.length; + } + unshift(...args) { + for (var i = 0, l = args.length; i < l; i++) { + unshift(this, args[i]); + } + return this.length; + } + pop() { + if (!this.tail) { + return undefined; + } + const res = this.tail.value; + const t = this.tail; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = undefined; + } + else { + this.head = undefined; + } + t.list = undefined; + this.length--; + return res; + } + shift() { + if (!this.head) { + return undefined; + } + const res = this.head.value; + const h = this.head; + this.head = this.head.next; + if (this.head) { + this.head.prev = undefined; + } + else { + this.tail = undefined; + } + h.list = undefined; + this.length--; + return res; + } + forEach(fn, thisp) { + thisp = thisp || this; + for (let walker = this.head, i = 0; !!walker; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } + } + forEachReverse(fn, thisp) { + thisp = thisp || this; + for (let walker = this.tail, i = this.length - 1; !!walker; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } + } + get(n) { + let i = 0; + let walker = this.head; + for (; !!walker && i < n; i++) { + walker = walker.next; + } + if (i === n && !!walker) { + return walker.value; + } + } + getReverse(n) { + let i = 0; + let walker = this.tail; + for (; !!walker && i < n; i++) { + // abort out of the list early if we hit a cycle + walker = walker.prev; + } + if (i === n && !!walker) { + return walker.value; + } + } + map(fn, thisp) { + thisp = thisp || this; + const res = new Yallist(); + for (let walker = this.head; !!walker;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; + } + mapReverse(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (let walker = this.tail; !!walker;) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; + } + return res; + } + reduce(fn, initial) { + let acc; + let walker = this.head; + if (arguments.length > 1) { + acc = initial; + } + else if (this.head) { + walker = this.head.next; + acc = this.head.value; + } + else { + throw new TypeError('Reduce of empty list with no initial value'); + } + for (var i = 0; !!walker; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; + } + return acc; + } + reduceReverse(fn, initial) { + let acc; + let walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } + else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } + else { + throw new TypeError('Reduce of empty list with no initial value'); + } + for (let i = this.length - 1; !!walker; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; + } + return acc; + } + toArray() { + const arr = new Array(this.length); + for (let i = 0, walker = this.head; !!walker; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; + } + toArrayReverse() { + const arr = new Array(this.length); + for (let i = 0, walker = this.tail; !!walker; i++) { + arr[i] = walker.value; + walker = walker.prev; + } + return arr; + } + slice(from = 0, to = this.length) { + if (to < 0) { + to += this.length; + } + if (from < 0) { + from += this.length; + } + const ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + let walker = this.head; + let i = 0; + for (i = 0; !!walker && i < from; i++) { + walker = walker.next; + } + for (; !!walker && i < to; i++, walker = walker.next) { + ret.push(walker.value); + } + return ret; + } + sliceReverse(from = 0, to = this.length) { + if (to < 0) { + to += this.length; + } + if (from < 0) { + from += this.length; + } + const ret = new Yallist(); + if (to < from || to < 0) { + return ret; + } + if (from < 0) { + from = 0; + } + if (to > this.length) { + to = this.length; + } + let i = this.length; + let walker = this.tail; + for (; !!walker && i > to; i--) { + walker = walker.prev; + } + for (; !!walker && i > from; i--, walker = walker.prev) { + ret.push(walker.value); + } + return ret; + } + splice(start, deleteCount = 0, ...nodes) { + if (start > this.length) { + start = this.length - 1; + } + if (start < 0) { + start = this.length + start; + } + let walker = this.head; + for (let i = 0; !!walker && i < start; i++) { + walker = walker.next; + } + const ret = []; + for (let i = 0; !!walker && i < deleteCount; i++) { + ret.push(walker.value); + walker = this.removeNode(walker); + } + if (!walker) { + walker = this.tail; + } + else if (walker !== this.tail) { + walker = walker.prev; + } + for (const v of nodes) { + walker = insertAfter(this, walker, v); + } + return ret; + } + reverse() { + const head = this.head; + const tail = this.tail; + for (let walker = head; !!walker; walker = walker.prev) { + const p = walker.prev; + walker.prev = walker.next; + walker.next = p; + } + this.head = tail; + this.tail = head; + return this; + } +} +// insertAfter undefined means "make the node the new head of list" +function insertAfter(self, node, value) { + const prev = node; + const next = node ? node.next : self.head; + const inserted = new Node(value, prev, next, self); + if (inserted.next === undefined) { + self.tail = inserted; + } + if (inserted.prev === undefined) { + self.head = inserted; + } + self.length++; + return inserted; +} +function push(self, item) { + self.tail = new Node(item, self.tail, undefined, self); + if (!self.head) { + self.head = self.tail; + } + self.length++; +} +function unshift(self, item) { + self.head = new Node(item, undefined, self.head, self); + if (!self.tail) { + self.tail = self.head; + } + self.length++; +} +export class Node { + list; + next; + prev; + value; + constructor(value, prev, next, list) { + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } + else { + this.prev = undefined; + } + if (next) { + next.prev = this; + this.next = next; + } + else { + this.next = undefined; + } + } +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/yallist/dist/esm/index.js.map b/node_modules/yallist/dist/esm/index.js.map new file mode 100644 index 0000000..21f21e6 --- /dev/null +++ b/node_modules/yallist/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAClB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,MAAM,GAAW,CAAC,CAAA;IAElB,MAAM,CAAC,MAAM,CAAc,OAAoB,EAAE;QAC/C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,CAAC;IAED,YAAY,OAAoB,EAAE;QAChC,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC;IACH,CAAC;IAED,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,KAAK,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1D,MAAM,MAAM,CAAC,KAAK,CAAA;QACpB,CAAC;IACH,CAAC;IAED,UAAU,CAAC,IAAa;QACtB,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,kDAAkD,CACnD,CAAA;QACH,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QAEtB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QAED,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,C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I,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAA;AACf,CAAC;AAED,SAAS,OAAO,CAAI,IAAgB,EAAE,IAAO;IAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAI,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAA;AACf,CAAC;AAED,MAAM,OAAO,IAAI;IACf,IAAI,CAAa;IACjB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,KAAK,CAAG;IAER,YACE,KAAQ,EACR,IAA0B,EAC1B,IAA0B,EAC1B,IAA6B;QAE7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAElB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACvB,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACvB,CAAC;IACH,CAAC;CACF","sourcesContent":["export class Yallist {\n tail?: Node\n head?: Node\n length: number = 0\n\n static create(list: Iterable = []) {\n return new Yallist(list)\n }\n\n constructor(list: Iterable = []) {\n for (const item of list) {\n this.push(item)\n }\n }\n\n *[Symbol.iterator]() {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n\n removeNode(node: Node) {\n if (node.list !== this) {\n throw new Error(\n 'removing node which does not belong to this list',\n )\n }\n\n const next = node.next\n const prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n this.length--\n node.next = undefined\n node.prev = undefined\n node.list = undefined\n\n return next\n }\n\n unshiftNode(node: Node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n const head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n }\n\n pushNode(node: Node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n const tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n }\n\n push(...args: T[]) {\n for (let i = 0, l = args.length; i < l; i++) {\n push(this, args[i])\n }\n return this.length\n }\n\n unshift(...args: T[]) {\n for (var i = 0, l = args.length; i < l; i++) {\n unshift(this, args[i])\n }\n return this.length\n }\n\n pop() {\n if (!this.tail) {\n return undefined\n }\n\n const res = this.tail.value\n const t = this.tail\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = undefined\n } else {\n this.head = undefined\n }\n t.list = undefined\n this.length--\n return res\n }\n\n shift() {\n if (!this.head) {\n return undefined\n }\n\n const res = this.head.value\n const h = this.head\n this.head = this.head.next\n if (this.head) {\n this.head.prev = undefined\n } else {\n this.tail = undefined\n }\n h.list = undefined\n this.length--\n return res\n }\n\n forEach(\n fn: (value: T, i: number, list: Yallist) => any,\n thisp?: any,\n ) {\n thisp = thisp || this\n for (let walker = this.head, i = 0; !!walker; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n }\n\n forEachReverse(\n fn: (value: T, i: number, list: Yallist) => any,\n thisp?: any,\n ) {\n thisp = thisp || this\n for (let walker = this.tail, i = this.length - 1; !!walker; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n }\n\n get(n: number) {\n let i = 0\n let walker = this.head\n for (; !!walker && i < n; i++) {\n walker = walker.next\n }\n if (i === n && !!walker) {\n return walker.value\n }\n }\n\n getReverse(n: number) {\n let i = 0\n let walker = this.tail\n for (; !!walker && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && !!walker) {\n return walker.value\n }\n }\n\n map(\n fn: (value: T, list: Yallist) => R,\n thisp?: any,\n ): Yallist {\n thisp = thisp || this\n const res = new Yallist()\n for (let walker = this.head; !!walker; ) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n }\n\n mapReverse(\n fn: (value: T, list: Yallist) => R,\n thisp?: any,\n ): Yallist {\n thisp = thisp || this\n var res = new Yallist()\n for (let walker = this.tail; !!walker; ) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n }\n\n reduce(fn: (left: T, right: T, i: number) => T): T\n reduce(\n fn: (acc: R, next: T, i: number) => R,\n initial: R,\n ): R\n reduce(\n fn: (acc: R, next: T, i: number) => R,\n initial?: R,\n ): R {\n let acc: R | T\n let walker = this.head\n if (arguments.length > 1) {\n acc = initial as R\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError(\n 'Reduce of empty list with no initial value',\n )\n }\n\n for (var i = 0; !!walker; i++) {\n acc = fn(acc as R, walker.value, i)\n walker = walker.next\n }\n\n return acc as R\n }\n\n reduceReverse(fn: (left: T, right: T, i: number) => T): T\n reduceReverse(\n fn: (acc: R, next: T, i: number) => R,\n initial: R,\n ): R\n reduceReverse(\n fn: (acc: R, next: T, i: number) => R,\n initial?: R,\n ): R {\n let acc: R | T\n let walker = this.tail\n if (arguments.length > 1) {\n acc = initial as R\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError(\n 'Reduce of empty list with no initial value',\n )\n }\n\n for (let i = this.length - 1; !!walker; i--) {\n acc = fn(acc as R, walker.value, i)\n walker = walker.prev\n }\n\n return acc as R\n }\n\n toArray() {\n const arr = new Array(this.length)\n for (let i = 0, walker = this.head; !!walker; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n }\n\n toArrayReverse() {\n const arr = new Array(this.length)\n for (let i = 0, walker = this.tail; !!walker; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n }\n\n slice(from: number = 0, to: number = this.length) {\n if (to < 0) {\n to += this.length\n }\n if (from < 0) {\n from += this.length\n }\n const ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n let walker = this.head\n let i = 0\n for (i = 0; !!walker && i < from; i++) {\n walker = walker.next\n }\n for (; !!walker && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n }\n\n sliceReverse(from: number = 0, to: number = this.length) {\n if (to < 0) {\n to += this.length\n }\n if (from < 0) {\n from += this.length\n }\n const ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n let i = this.length\n let walker = this.tail\n for (; !!walker && i > to; i--) {\n walker = walker.prev\n }\n for (; !!walker && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n }\n\n splice(start: number, deleteCount: number = 0, ...nodes: T[]) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start\n }\n\n let walker = this.head\n\n for (let i = 0; !!walker && i < start; i++) {\n walker = walker.next\n }\n\n const ret: T[] = []\n for (let i = 0; !!walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (!walker) {\n walker = this.tail\n } else if (walker !== this.tail) {\n walker = walker.prev\n }\n\n for (const v of nodes) {\n walker = insertAfter(this, walker, v)\n }\n\n return ret\n }\n\n reverse() {\n const head = this.head\n const tail = this.tail\n for (let walker = head; !!walker; walker = walker.prev) {\n const p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n }\n}\n\n// insertAfter undefined means \"make the node the new head of list\"\nfunction insertAfter(\n self: Yallist,\n node: Node | undefined,\n value: T,\n) {\n const prev = node\n const next = node ? node.next : self.head\n const inserted = new Node(value, prev, next, self)\n\n if (inserted.next === undefined) {\n self.tail = inserted\n }\n if (inserted.prev === undefined) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push(self: Yallist, item: T) {\n self.tail = new Node(item, self.tail, undefined, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift(self: Yallist, item: T) {\n self.head = new Node(item, undefined, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nexport class Node {\n list?: Yallist\n next?: Node\n prev?: Node\n value: T\n\n constructor(\n value: T,\n prev?: Node | undefined,\n next?: Node | undefined,\n list?: Yallist | undefined,\n ) {\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = undefined\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = undefined\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/yallist/dist/esm/package.json b/node_modules/yallist/dist/esm/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/node_modules/yallist/dist/esm/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/node_modules/yallist/package.json b/node_modules/yallist/package.json new file mode 100644 index 0000000..2f52478 --- /dev/null +++ b/node_modules/yallist/package.json @@ -0,0 +1,68 @@ +{ + "name": "yallist", + "version": "5.0.0", + "description": "Yet Another Linked List", + "files": [ + "dist" + ], + "devDependencies": { + "prettier": "^3.2.5", + "tap": "^18.7.2", + "tshy": "^1.13.1", + "typedoc": "^0.25.13" + }, + "scripts": { + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", + "typedoc": "typedoc" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/isaacs/yallist.git" + }, + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "BlueOak-1.0.0", + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "type": "module", + "prettier": { + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "engines": { + "node": ">=18" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..e59bf1c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1136 @@ +{ + "name": "eSPJ", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@tailwindcss/cli": "^4.1.11", + "tailwindcss": "^4.1.11" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@isaacs/fs-minipass": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", + "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", + "license": "ISC", + "dependencies": { + "minipass": "^7.0.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.12", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.12.tgz", + "integrity": "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", + "integrity": "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.29", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.29.tgz", + "integrity": "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@tailwindcss/cli": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.1.11.tgz", + "integrity": "sha512-7RAFOrVaXCFz5ooEG36Kbh+sMJiI2j4+Ozp71smgjnLfBRu7DTfoq8DsTvzse2/6nDeo2M3vS/FGaxfDgr3rtQ==", + "license": "MIT", + "dependencies": { + "@parcel/watcher": "^2.5.1", + "@tailwindcss/node": "4.1.11", + "@tailwindcss/oxide": "4.1.11", + "enhanced-resolve": "^5.18.1", + "mri": "^1.2.0", + "picocolors": "^1.1.1", + "tailwindcss": "4.1.11" + }, + "bin": { + "tailwindcss": "dist/index.mjs" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.11.tgz", + "integrity": "sha512-yzhzuGRmv5QyU9qLNg4GTlYI6STedBWRE7NjxP45CsFYYq9taI0zJXZBMqIC/c8fViNLhmrbpSFS57EoxUmD6Q==", + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.3.0", + "enhanced-resolve": "^5.18.1", + "jiti": "^2.4.2", + "lightningcss": "1.30.1", + "magic-string": "^0.30.17", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.11" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.11.tgz", + "integrity": "sha512-Q69XzrtAhuyfHo+5/HMgr1lAiPP/G40OMFAnws7xcFEYqcypZmdW8eGXaOUIeOl1dzPJBPENXgbjsOyhg2nkrg==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.4", + "tar": "^7.4.3" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.11", + "@tailwindcss/oxide-darwin-arm64": "4.1.11", + "@tailwindcss/oxide-darwin-x64": "4.1.11", + "@tailwindcss/oxide-freebsd-x64": "4.1.11", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.11", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.11", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.11", + "@tailwindcss/oxide-linux-x64-musl": "4.1.11", + "@tailwindcss/oxide-wasm32-wasi": "4.1.11", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.11", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.11" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.11.tgz", + "integrity": "sha512-3IfFuATVRUMZZprEIx9OGDjG3Ou3jG4xQzNTvjDoKmU9JdmoCohQJ83MYd0GPnQIu89YoJqvMM0G3uqLRFtetg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.11.tgz", + "integrity": "sha512-ESgStEOEsyg8J5YcMb1xl8WFOXfeBmrhAwGsFxxB2CxY9evy63+AtpbDLAyRkJnxLy2WsD1qF13E97uQyP1lfQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.11.tgz", + "integrity": "sha512-EgnK8kRchgmgzG6jE10UQNaH9Mwi2n+yw1jWmof9Vyg2lpKNX2ioe7CJdf9M5f8V9uaQxInenZkOxnTVL3fhAw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.11.tgz", + "integrity": "sha512-xdqKtbpHs7pQhIKmqVpxStnY1skuNh4CtbcyOHeX1YBE0hArj2romsFGb6yUmzkq/6M24nkxDqU8GYrKrz+UcA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.11.tgz", + "integrity": "sha512-ryHQK2eyDYYMwB5wZL46uoxz2zzDZsFBwfjssgB7pzytAeCCa6glsiJGjhTEddq/4OsIjsLNMAiMlHNYnkEEeg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.11.tgz", + "integrity": "sha512-mYwqheq4BXF83j/w75ewkPJmPZIqqP1nhoghS9D57CLjsh3Nfq0m4ftTotRYtGnZd3eCztgbSPJ9QhfC91gDZQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.11.tgz", + "integrity": "sha512-m/NVRFNGlEHJrNVk3O6I9ggVuNjXHIPoD6bqay/pubtYC9QIdAMpS+cswZQPBLvVvEF6GtSNONbDkZrjWZXYNQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.11.tgz", + "integrity": "sha512-YW6sblI7xukSD2TdbbaeQVDysIm/UPJtObHJHKxDEcW2exAtY47j52f8jZXkqE1krdnkhCMGqP3dbniu1Te2Fg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.11.tgz", + "integrity": "sha512-e3C/RRhGunWYNC3aSF7exsQkdXzQ/M+aYuZHKnw4U7KQwTJotnWsGOIVih0s2qQzmEzOFIJ3+xt7iq67K/p56Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.11.tgz", + "integrity": "sha512-Xo1+/GU0JEN/C/dvcammKHzeM6NqKovG+6921MR6oadee5XPBaKOumrJCXvopJ/Qb5TH7LX/UAywbqrP4lax0g==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@emnapi/wasi-threads": "^1.0.2", + "@napi-rs/wasm-runtime": "^0.2.11", + "@tybys/wasm-util": "^0.9.0", + "tslib": "^2.8.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.11.tgz", + "integrity": "sha512-UgKYx5PwEKrac3GPNPf6HVMNhUIGuUh4wlDFR2jYYdkX6pL/rn73zTq/4pzUm8fOjAn5L8zDeHp9iXmUGOXZ+w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.11.tgz", + "integrity": "sha512-YfHoggn1j0LK7wR82TOucWc5LDCguHnoS879idHekmmiR7g9HUtMw9MI0NHatS28u/Xlkfi9w5RJWgz2Dl+5Qg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide/node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chownr": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", + "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", + "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jiti": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.5.1.tgz", + "integrity": "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/lightningcss": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.1.tgz", + "integrity": "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-darwin-arm64": "1.30.1", + "lightningcss-darwin-x64": "1.30.1", + "lightningcss-freebsd-x64": "1.30.1", + "lightningcss-linux-arm-gnueabihf": "1.30.1", + "lightningcss-linux-arm64-gnu": "1.30.1", + "lightningcss-linux-arm64-musl": "1.30.1", + "lightningcss-linux-x64-gnu": "1.30.1", + "lightningcss-linux-x64-musl": "1.30.1", + "lightningcss-win32-arm64-msvc": "1.30.1", + "lightningcss-win32-x64-msvc": "1.30.1" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.1.tgz", + "integrity": "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.1.tgz", + "integrity": "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.1.tgz", + "integrity": "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.1.tgz", + "integrity": "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.1.tgz", + "integrity": "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.1.tgz", + "integrity": "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.1.tgz", + "integrity": "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.1.tgz", + "integrity": "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.1.tgz", + "integrity": "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.30.1", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.1.tgz", + "integrity": "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss/node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.2.tgz", + "integrity": "sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.11.tgz", + "integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==", + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", + "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", + "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", + "license": "ISC", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", + "minipass": "^7.1.2", + "minizlib": "^3.0.1", + "mkdirp": "^3.0.1", + "yallist": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/yallist": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", + "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=18" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..0099da0 --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "dependencies": { + "@tailwindcss/cli": "^4.1.11", + "tailwindcss": "^4.1.11" + }, + "scripts": { + "watch": "npx @tailwindcss/cli -i ./wwwroot/css/site.css -o ./wwwroot/css/watch.css --watch" + } +} diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..edb5664 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,7 @@ +module.exports = { + content: [ + "./Views/**/*.cshtml", + "./Pages/**/*.cshtml", + "./wwwroot/js/**/*.js", + ], +}; diff --git a/wwwroot/css/site.css b/wwwroot/css/site.css new file mode 100644 index 0000000..f1d8c73 --- /dev/null +++ b/wwwroot/css/site.css @@ -0,0 +1 @@ +@import "tailwindcss"; diff --git a/wwwroot/css/watch.css b/wwwroot/css/watch.css new file mode 100644 index 0000000..4f7d6cb --- /dev/null +++ b/wwwroot/css/watch.css @@ -0,0 +1,2087 @@ +/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */ +@layer properties; +@layer theme, base, components, utilities; +@layer theme { + :root, :host { + --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + --color-red-500: oklch(63.7% 0.237 25.331); + --color-orange-50: oklch(98% 0.016 73.684); + --color-orange-100: oklch(95.4% 0.038 75.164); + --color-orange-200: oklch(90.1% 0.076 70.697); + --color-orange-300: oklch(83.7% 0.128 66.29); + --color-orange-400: oklch(75% 0.183 55.934); + --color-orange-500: oklch(70.5% 0.213 47.604); + --color-orange-600: oklch(64.6% 0.222 41.116); + --color-amber-200: oklch(92.4% 0.12 95.746); + --color-yellow-400: oklch(85.2% 0.199 91.936); + --color-green-100: oklch(96.2% 0.044 156.743); + --color-green-200: oklch(92.5% 0.084 155.995); + --color-green-300: oklch(87.1% 0.15 154.449); + --color-green-400: oklch(79.2% 0.209 151.711); + --color-green-500: oklch(72.3% 0.219 149.579); + --color-green-600: oklch(62.7% 0.194 149.214); + --color-green-700: oklch(52.7% 0.154 150.069); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-gray-50: oklch(98.5% 0.002 247.839); + --color-gray-100: oklch(96.7% 0.003 264.542); + --color-gray-200: oklch(92.8% 0.006 264.531); + --color-gray-300: oklch(87.2% 0.01 258.338); + --color-gray-400: oklch(70.7% 0.022 261.325); + --color-gray-500: oklch(55.1% 0.027 264.364); + --color-gray-600: oklch(44.6% 0.03 256.802); + --color-gray-700: oklch(37.3% 0.034 259.733); + --color-gray-800: oklch(27.8% 0.033 256.848); + --color-gray-900: oklch(21% 0.034 264.665); + --color-black: #000; + --color-white: #fff; + --spacing: 0.25rem; + --container-xs: 20rem; + --container-sm: 24rem; + --text-xs: 0.75rem; + --text-xs--line-height: calc(1 / 0.75); + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); + --text-lg: 1.125rem; + --text-lg--line-height: calc(1.75 / 1.125); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-2xl: 1.5rem; + --text-2xl--line-height: calc(2 / 1.5); + --font-weight-medium: 500; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --tracking-wide: 0.025em; + --tracking-wider: 0.05em; + --tracking-widest: 0.1em; + --leading-tight: 1.25; + --leading-relaxed: 1.625; + --radius-sm: 0.25rem; + --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; + --radius-3xl: 1.5rem; + --radius-4xl: 2rem; + --drop-shadow-lg: 0 4px 4px rgb(0 0 0 / 0.15); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; + --blur-sm: 8px; + --blur-md: 12px; + --blur-lg: 16px; + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: var(--font-sans); + --default-mono-font-family: var(--font-mono); + } +} +@layer base { + *, ::after, ::before, ::backdrop, ::file-selector-button { + box-sizing: border-box; + margin: 0; + padding: 0; + border: 0 solid; + } + html, :host { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + tab-size: 4; + font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); + font-feature-settings: var(--default-font-feature-settings, normal); + font-variation-settings: var(--default-font-variation-settings, normal); + -webkit-tap-highlight-color: transparent; + } + hr { + height: 0; + color: inherit; + border-top-width: 1px; + } + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + b, strong { + font-weight: bolder; + } + code, kbd, samp, pre { + font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); + font-feature-settings: var(--default-mono-font-feature-settings, normal); + font-variation-settings: var(--default-mono-font-variation-settings, normal); + font-size: 1em; + } + small { + font-size: 80%; + } + sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + table { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; + } + :-moz-focusring { + outline: auto; + } + progress { + vertical-align: baseline; + } + summary { + display: list-item; + } + ol, ul, menu { + list-style: none; + } + img, svg, video, canvas, audio, iframe, embed, object { + display: block; + vertical-align: middle; + } + img, video { + max-width: 100%; + height: auto; + } + button, input, select, optgroup, textarea, ::file-selector-button { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + border-radius: 0; + background-color: transparent; + opacity: 1; + } + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + ::file-selector-button { + margin-inline-end: 4px; + } + ::placeholder { + opacity: 1; + } + @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { + ::placeholder { + color: currentcolor; + @supports (color: color-mix(in lab, red, red)) { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + } + textarea { + resize: vertical; + } + ::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-date-and-time-value { + min-height: 1lh; + text-align: inherit; + } + ::-webkit-datetime-edit { + display: inline-flex; + } + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + :-moz-ui-invalid { + box-shadow: none; + } + button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button { + appearance: button; + } + ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { + height: auto; + } + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} +@layer utilities { + .pointer-events-none { + pointer-events: none; + } + .collapse { + visibility: collapse; + } + .invisible { + visibility: hidden; + } + .visible { + visibility: visible; + } + .absolute { + position: absolute; + } + .fixed { + position: fixed; + } + .relative { + position: relative; + } + .static { + position: static; + } + .sticky { + position: sticky; + } + .inset-0 { + inset: calc(var(--spacing) * 0); + } + .start-0 { + inset-inline-start: calc(var(--spacing) * 0); + } + .start-50 { + inset-inline-start: calc(var(--spacing) * 50); + } + .start-100 { + inset-inline-start: calc(var(--spacing) * 100); + } + .end-0 { + inset-inline-end: calc(var(--spacing) * 0); + } + .end-50 { + inset-inline-end: calc(var(--spacing) * 50); + } + .end-100 { + inset-inline-end: calc(var(--spacing) * 100); + } + .-top-0 { + top: calc(var(--spacing) * -0); + } + .-top-4 { + top: calc(var(--spacing) * -4); + } + .top-0 { + top: calc(var(--spacing) * 0); + } + .top-4 { + top: calc(var(--spacing) * 4); + } + .top-50 { + top: calc(var(--spacing) * 50); + } + .top-100 { + top: calc(var(--spacing) * 100); + } + .right-0 { + right: calc(var(--spacing) * 0); + } + .right-1 { + right: calc(var(--spacing) * 1); + } + .right-4 { + right: calc(var(--spacing) * 4); + } + .-bottom-0 { + bottom: calc(var(--spacing) * -0); + } + .-bottom-0\.5 { + bottom: calc(var(--spacing) * -0.5); + } + .bottom-0 { + bottom: calc(var(--spacing) * 0); + } + .bottom-1 { + bottom: calc(var(--spacing) * 1); + } + .bottom-2 { + bottom: calc(var(--spacing) * 2); + } + .bottom-8 { + bottom: calc(var(--spacing) * 8); + } + .bottom-50 { + bottom: calc(var(--spacing) * 50); + } + .bottom-100 { + bottom: calc(var(--spacing) * 100); + } + .left-0 { + left: calc(var(--spacing) * 0); + } + .left-1 { + left: calc(var(--spacing) * 1); + } + .left-1\/2 { + left: calc(1/2 * 100%); + } + .z-0 { + z-index: 0; + } + .z-1 { + z-index: 1; + } + .z-2 { + z-index: 2; + } + .z-3 { + z-index: 3; + } + .z-10 { + z-index: 10; + } + .z-20 { + z-index: 20; + } + .z-21 { + z-index: 21; + } + .z-50 { + z-index: 50; + } + .z-99 { + z-index: 99; + } + .order-0 { + order: 0; + } + .order-1 { + order: 1; + } + .order-2 { + order: 2; + } + .order-3 { + order: 3; + } + .order-4 { + order: 4; + } + .order-5 { + order: 5; + } + .order-first { + order: -9999; + } + .order-last { + order: 9999; + } + .col-1 { + grid-column: 1; + } + .col-2 { + grid-column: 2; + } + .col-3 { + grid-column: 3; + } + .col-4 { + grid-column: 4; + } + .col-5 { + grid-column: 5; + } + .col-6 { + grid-column: 6; + } + .col-7 { + grid-column: 7; + } + .col-8 { + grid-column: 8; + } + .col-9 { + grid-column: 9; + } + .col-10 { + grid-column: 10; + } + .col-11 { + grid-column: 11; + } + .col-12 { + grid-column: 12; + } + .col-auto { + grid-column: auto; + } + .float-end { + float: inline-end; + } + .float-none { + float: none; + } + .float-start { + float: inline-start; + } + .container { + width: 100%; + @media (width >= 40rem) { + max-width: 40rem; + } + @media (width >= 48rem) { + max-width: 48rem; + } + @media (width >= 64rem) { + max-width: 64rem; + } + @media (width >= 80rem) { + max-width: 80rem; + } + @media (width >= 96rem) { + max-width: 96rem; + } + } + .m-0 { + margin: calc(var(--spacing) * 0); + } + .m-1 { + margin: calc(var(--spacing) * 1); + } + .m-2 { + margin: calc(var(--spacing) * 2); + } + .m-3 { + margin: calc(var(--spacing) * 3); + } + .m-4 { + margin: calc(var(--spacing) * 4); + } + .m-5 { + margin: calc(var(--spacing) * 5); + } + .m-auto { + margin: auto; + } + .mx-0 { + margin-inline: calc(var(--spacing) * 0); + } + .mx-1 { + margin-inline: calc(var(--spacing) * 1); + } + .mx-2 { + margin-inline: calc(var(--spacing) * 2); + } + .mx-3 { + margin-inline: calc(var(--spacing) * 3); + } + .mx-4 { + margin-inline: calc(var(--spacing) * 4); + } + .mx-5 { + margin-inline: calc(var(--spacing) * 5); + } + .mx-auto { + margin-inline: auto; + } + .my-0 { + margin-block: calc(var(--spacing) * 0); + } + .my-1 { + margin-block: calc(var(--spacing) * 1); + } + .my-2 { + margin-block: calc(var(--spacing) * 2); + } + .my-3 { + margin-block: calc(var(--spacing) * 3); + } + .my-4 { + margin-block: calc(var(--spacing) * 4); + } + .my-5 { + margin-block: calc(var(--spacing) * 5); + } + .my-auto { + margin-block: auto; + } + .ms-0 { + margin-inline-start: calc(var(--spacing) * 0); + } + .ms-1 { + margin-inline-start: calc(var(--spacing) * 1); + } + .ms-2 { + margin-inline-start: calc(var(--spacing) * 2); + } + .ms-3 { + margin-inline-start: calc(var(--spacing) * 3); + } + .ms-4 { + margin-inline-start: calc(var(--spacing) * 4); + } + .ms-5 { + margin-inline-start: calc(var(--spacing) * 5); + } + .ms-auto { + margin-inline-start: auto; + } + .me-0 { + margin-inline-end: calc(var(--spacing) * 0); + } + .me-1 { + margin-inline-end: calc(var(--spacing) * 1); + } + .me-2 { + margin-inline-end: calc(var(--spacing) * 2); + } + .me-3 { + margin-inline-end: calc(var(--spacing) * 3); + } + .me-4 { + margin-inline-end: calc(var(--spacing) * 4); + } + .me-5 { + margin-inline-end: calc(var(--spacing) * 5); + } + .me-auto { + margin-inline-end: auto; + } + .-mt-10 { + margin-top: calc(var(--spacing) * -10); + } + .-mt-12 { + margin-top: calc(var(--spacing) * -12); + } + .mt-0 { + margin-top: calc(var(--spacing) * 0); + } + .mt-1 { + margin-top: calc(var(--spacing) * 1); + } + .mt-2 { + margin-top: calc(var(--spacing) * 2); + } + .mt-3 { + margin-top: calc(var(--spacing) * 3); + } + .mt-4 { + margin-top: calc(var(--spacing) * 4); + } + .mt-5 { + margin-top: calc(var(--spacing) * 5); + } + .mt-8 { + margin-top: calc(var(--spacing) * 8); + } + .mt-32 { + margin-top: calc(var(--spacing) * 32); + } + .mt-auto { + margin-top: auto; + } + .mb-0 { + margin-bottom: calc(var(--spacing) * 0); + } + .mb-0\.5 { + margin-bottom: calc(var(--spacing) * 0.5); + } + .mb-1 { + margin-bottom: calc(var(--spacing) * 1); + } + .mb-2 { + margin-bottom: calc(var(--spacing) * 2); + } + .mb-3 { + margin-bottom: calc(var(--spacing) * 3); + } + .mb-4 { + margin-bottom: calc(var(--spacing) * 4); + } + .mb-5 { + margin-bottom: calc(var(--spacing) * 5); + } + .mb-6 { + margin-bottom: calc(var(--spacing) * 6); + } + .mb-auto { + margin-bottom: auto; + } + .ml-4 { + margin-left: calc(var(--spacing) * 4); + } + .\!hidden { + display: none !important; + } + .block { + display: block; + } + .contents { + display: contents; + } + .flex { + display: flex; + } + .grid { + display: grid; + } + .hidden { + display: none; + } + .inline { + display: inline; + } + .inline-block { + display: inline-block; + } + .inline-flex { + display: inline-flex; + } + .inline-grid { + display: inline-grid; + } + .table { + display: table; + } + .table-caption { + display: table-caption; + } + .table-cell { + display: table-cell; + } + .table-row { + display: table-row; + } + .h-0 { + height: calc(var(--spacing) * 0); + } + .h-0\.5 { + height: calc(var(--spacing) * 0.5); + } + .h-2 { + height: calc(var(--spacing) * 2); + } + .h-3 { + height: calc(var(--spacing) * 3); + } + .h-4 { + height: calc(var(--spacing) * 4); + } + .h-5 { + height: calc(var(--spacing) * 5); + } + .h-6 { + height: calc(var(--spacing) * 6); + } + .h-7 { + height: calc(var(--spacing) * 7); + } + .h-8 { + height: calc(var(--spacing) * 8); + } + .h-10 { + height: calc(var(--spacing) * 10); + } + .h-14 { + height: calc(var(--spacing) * 14); + } + .h-20 { + height: calc(var(--spacing) * 20); + } + .h-25 { + height: calc(var(--spacing) * 25); + } + .h-40 { + height: calc(var(--spacing) * 40); + } + .h-50 { + height: calc(var(--spacing) * 50); + } + .h-75 { + height: calc(var(--spacing) * 75); + } + .h-100 { + height: calc(var(--spacing) * 100); + } + .h-\[250px\] { + height: 250px; + } + .h-auto { + height: auto; + } + .h-full { + height: 100%; + } + .min-h-screen { + min-height: 100vh; + } + .w-0 { + width: calc(var(--spacing) * 0); + } + .w-1 { + width: calc(var(--spacing) * 1); + } + .w-4 { + width: calc(var(--spacing) * 4); + } + .w-5 { + width: calc(var(--spacing) * 5); + } + .w-6 { + width: calc(var(--spacing) * 6); + } + .w-7 { + width: calc(var(--spacing) * 7); + } + .w-8 { + width: calc(var(--spacing) * 8); + } + .w-10 { + width: calc(var(--spacing) * 10); + } + .w-12 { + width: calc(var(--spacing) * 12); + } + .w-14 { + width: calc(var(--spacing) * 14); + } + .w-20 { + width: calc(var(--spacing) * 20); + } + .w-25 { + width: calc(var(--spacing) * 25); + } + .w-36 { + width: calc(var(--spacing) * 36); + } + .w-50 { + width: calc(var(--spacing) * 50); + } + .w-75 { + width: calc(var(--spacing) * 75); + } + .w-100 { + width: calc(var(--spacing) * 100); + } + .w-auto { + width: auto; + } + .w-full { + width: 100%; + } + .max-w-sm { + max-width: var(--container-sm); + } + .flex-1 { + flex: 1; + } + .flex-shrink { + flex-shrink: 1; + } + .flex-shrink-0 { + flex-shrink: 0; + } + .flex-shrink-1 { + flex-shrink: 1; + } + .shrink { + flex-shrink: 1; + } + .flex-grow { + flex-grow: 1; + } + .flex-grow-0 { + flex-grow: 0; + } + .flex-grow-1 { + flex-grow: 1; + } + .grow { + flex-grow: 1; + } + .caption-top { + caption-side: top; + } + .border-collapse { + border-collapse: collapse; + } + .-translate-x-1 { + --tw-translate-x: calc(var(--spacing) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .-translate-x-1\/2 { + --tw-translate-x: calc(calc(1/2 * 100%) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + .scale-95 { + --tw-scale-x: 95%; + --tw-scale-y: 95%; + --tw-scale-z: 95%; + scale: var(--tw-scale-x) var(--tw-scale-y); + } + .scale-100 { + --tw-scale-x: 100%; + --tw-scale-y: 100%; + --tw-scale-z: 100%; + scale: var(--tw-scale-x) var(--tw-scale-y); + } + .scale-110 { + --tw-scale-x: 110%; + --tw-scale-y: 110%; + --tw-scale-z: 110%; + scale: var(--tw-scale-x) var(--tw-scale-y); + } + .transform { + transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); + } + .cursor-pointer { + cursor: pointer; + } + .resize { + resize: both; + } + .flex-col { + flex-direction: column; + } + .flex-row { + flex-direction: row; + } + .flex-row-reverse { + flex-direction: row-reverse; + } + .flex-nowrap { + flex-wrap: nowrap; + } + .flex-wrap { + flex-wrap: wrap; + } + .flex-wrap-reverse { + flex-wrap: wrap-reverse; + } + .items-center { + align-items: center; + } + .items-end { + align-items: flex-end; + } + .items-start { + align-items: flex-start; + } + .justify-between { + justify-content: space-between; + } + .justify-center { + justify-content: center; + } + .gap-0 { + gap: calc(var(--spacing) * 0); + } + .gap-1 { + gap: calc(var(--spacing) * 1); + } + .gap-2 { + gap: calc(var(--spacing) * 2); + } + .gap-3 { + gap: calc(var(--spacing) * 3); + } + .gap-4 { + gap: calc(var(--spacing) * 4); + } + .gap-5 { + gap: calc(var(--spacing) * 5); + } + .space-y-1 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse))); + } + } + .space-y-2 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse))); + } + } + .space-y-3 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse))); + } + } + .space-y-4 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse))); + } + } + .space-y-6 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse))); + } + } + .space-x-1 { + :where(& > :not(:last-child)) { + --tw-space-x-reverse: 0; + margin-inline-start: calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse)); + margin-inline-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse))); + } + } + .space-x-2 { + :where(& > :not(:last-child)) { + --tw-space-x-reverse: 0; + margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse)); + margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse))); + } + } + .truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + .overflow-auto { + overflow: auto; + } + .overflow-hidden { + overflow: hidden; + } + .overflow-scroll { + overflow: scroll; + } + .overflow-visible { + overflow: visible; + } + .overflow-x-auto { + overflow-x: auto; + } + .overflow-x-hidden { + overflow-x: hidden; + } + .overflow-x-scroll { + overflow-x: scroll; + } + .overflow-x-visible { + overflow-x: visible; + } + .overflow-y-auto { + overflow-y: auto; + } + .overflow-y-hidden { + overflow-y: hidden; + } + .overflow-y-scroll { + overflow-y: scroll; + } + .overflow-y-visible { + overflow-y: visible; + } + .rounded { + border-radius: 0.25rem; + } + .rounded-2xl { + border-radius: var(--radius-2xl); + } + .rounded-full { + border-radius: calc(infinity * 1px); + } + .rounded-lg { + border-radius: var(--radius-lg); + } + .rounded-sm { + border-radius: var(--radius-sm); + } + .rounded-xl { + border-radius: var(--radius-xl); + } + .rounded-t-3xl { + border-top-left-radius: var(--radius-3xl); + border-top-right-radius: var(--radius-3xl); + } + .rounded-b-2xl { + border-bottom-right-radius: var(--radius-2xl); + border-bottom-left-radius: var(--radius-2xl); + } + .rounded-b-3xl { + border-bottom-right-radius: var(--radius-3xl); + border-bottom-left-radius: var(--radius-3xl); + } + .rounded-br-\[125px\] { + border-bottom-right-radius: 125px; + } + .rounded-br-full { + border-bottom-right-radius: calc(infinity * 1px); + } + .rounded-bl-full { + border-bottom-left-radius: calc(infinity * 1px); + } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } + .border-0 { + border-style: var(--tw-border-style); + border-width: 0px; + } + .border-1 { + border-style: var(--tw-border-style); + border-width: 1px; + } + .border-2 { + border-style: var(--tw-border-style); + border-width: 2px; + } + .border-3 { + border-style: var(--tw-border-style); + border-width: 3px; + } + .border-4 { + border-style: var(--tw-border-style); + border-width: 4px; + } + .border-5 { + border-style: var(--tw-border-style); + border-width: 5px; + } + .border-black { + border-color: var(--color-black); + } + .border-gray-100 { + border-color: var(--color-gray-100); + } + .border-gray-200 { + border-color: var(--color-gray-200); + } + .border-gray-200\/50 { + border-color: color-mix(in srgb, oklch(92.8% 0.006 264.531) 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + border-color: color-mix(in oklab, var(--color-gray-200) 50%, transparent); + } + } + .border-gray-300 { + border-color: var(--color-gray-300); + } + .border-green-200 { + border-color: var(--color-green-200); + } + .border-green-400 { + border-color: var(--color-green-400); + } + .border-orange-400 { + border-color: var(--color-orange-400); + } + .border-white { + border-color: var(--color-white); + } + .bg-black { + background-color: var(--color-black); + } + .bg-black\/50 { + background-color: color-mix(in srgb, #000 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-black) 50%, transparent); + } + } + .bg-gray-100 { + background-color: var(--color-gray-100); + } + .bg-gray-200 { + background-color: var(--color-gray-200); + } + .bg-gray-400 { + background-color: var(--color-gray-400); + } + .bg-gray-900 { + background-color: var(--color-gray-900); + } + .bg-green-100 { + background-color: var(--color-green-100); + } + .bg-green-400 { + background-color: var(--color-green-400); + } + .bg-green-400\/20 { + background-color: color-mix(in srgb, oklch(79.2% 0.209 151.711) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-green-400) 20%, transparent); + } + } + .bg-green-500 { + background-color: var(--color-green-500); + } + .bg-orange-100 { + background-color: var(--color-orange-100); + } + .bg-orange-500 { + background-color: var(--color-orange-500); + } + .bg-slate-800 { + background-color: var(--color-slate-800); + } + .bg-slate-800\/50 { + background-color: color-mix(in srgb, oklch(27.9% 0.041 260.031) 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-800) 50%, transparent); + } + } + .bg-transparent { + background-color: transparent; + } + .bg-white { + background-color: var(--color-white); + } + .bg-white\/20 { + background-color: color-mix(in srgb, #fff 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-white) 20%, transparent); + } + } + .bg-white\/50 { + background-color: color-mix(in srgb, #fff 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-white) 50%, transparent); + } + } + .bg-yellow-400 { + background-color: var(--color-yellow-400); + } + .bg-gradient-to-br { + --tw-gradient-position: to bottom right in oklab; + background-image: linear-gradient(var(--tw-gradient-stops)); + } + .bg-gradient-to-r { + --tw-gradient-position: to right in oklab; + background-image: linear-gradient(var(--tw-gradient-stops)); + } + .from-green-500 { + --tw-gradient-from: var(--color-green-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .from-orange-500 { + --tw-gradient-from: var(--color-orange-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .via-orange-400 { + --tw-gradient-via: var(--color-orange-400); + --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position); + --tw-gradient-stops: var(--tw-gradient-via-stops); + } + .to-green-400 { + --tw-gradient-to: var(--color-green-400); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-orange-400 { + --tw-gradient-to: var(--color-orange-400); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-orange-600 { + --tw-gradient-to: var(--color-orange-600); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .object-contain { + object-fit: contain; + } + .object-cover { + object-fit: cover; + } + .p-0 { + padding: calc(var(--spacing) * 0); + } + .p-1 { + padding: calc(var(--spacing) * 1); + } + .p-2 { + padding: calc(var(--spacing) * 2); + } + .p-3 { + padding: calc(var(--spacing) * 3); + } + .p-4 { + padding: calc(var(--spacing) * 4); + } + .p-5 { + padding: calc(var(--spacing) * 5); + } + .px-0 { + padding-inline: calc(var(--spacing) * 0); + } + .px-1 { + padding-inline: calc(var(--spacing) * 1); + } + .px-2 { + padding-inline: calc(var(--spacing) * 2); + } + .px-3 { + padding-inline: calc(var(--spacing) * 3); + } + .px-4 { + padding-inline: calc(var(--spacing) * 4); + } + .px-5 { + padding-inline: calc(var(--spacing) * 5); + } + .px-6 { + padding-inline: calc(var(--spacing) * 6); + } + .px-8 { + padding-inline: calc(var(--spacing) * 8); + } + .py-0 { + padding-block: calc(var(--spacing) * 0); + } + .py-1 { + padding-block: calc(var(--spacing) * 1); + } + .py-2 { + padding-block: calc(var(--spacing) * 2); + } + .py-3 { + padding-block: calc(var(--spacing) * 3); + } + .py-4 { + padding-block: calc(var(--spacing) * 4); + } + .py-5 { + padding-block: calc(var(--spacing) * 5); + } + .py-6 { + padding-block: calc(var(--spacing) * 6); + } + .ps-0 { + padding-inline-start: calc(var(--spacing) * 0); + } + .ps-1 { + padding-inline-start: calc(var(--spacing) * 1); + } + .ps-2 { + padding-inline-start: calc(var(--spacing) * 2); + } + .ps-3 { + padding-inline-start: calc(var(--spacing) * 3); + } + .ps-4 { + padding-inline-start: calc(var(--spacing) * 4); + } + .ps-5 { + padding-inline-start: calc(var(--spacing) * 5); + } + .pe-0 { + padding-inline-end: calc(var(--spacing) * 0); + } + .pe-1 { + padding-inline-end: calc(var(--spacing) * 1); + } + .pe-2 { + padding-inline-end: calc(var(--spacing) * 2); + } + .pe-3 { + padding-inline-end: calc(var(--spacing) * 3); + } + .pe-4 { + padding-inline-end: calc(var(--spacing) * 4); + } + .pe-5 { + padding-inline-end: calc(var(--spacing) * 5); + } + .pt-0 { + padding-top: calc(var(--spacing) * 0); + } + .pt-1 { + padding-top: calc(var(--spacing) * 1); + } + .pt-2 { + padding-top: calc(var(--spacing) * 2); + } + .pt-3 { + padding-top: calc(var(--spacing) * 3); + } + .pt-4 { + padding-top: calc(var(--spacing) * 4); + } + .pt-5 { + padding-top: calc(var(--spacing) * 5); + } + .pt-6 { + padding-top: calc(var(--spacing) * 6); + } + .pb-0 { + padding-bottom: calc(var(--spacing) * 0); + } + .pb-1 { + padding-bottom: calc(var(--spacing) * 1); + } + .pb-2 { + padding-bottom: calc(var(--spacing) * 2); + } + .pb-3 { + padding-bottom: calc(var(--spacing) * 3); + } + .pb-4 { + padding-bottom: calc(var(--spacing) * 4); + } + .pb-5 { + padding-bottom: calc(var(--spacing) * 5); + } + .pb-12 { + padding-bottom: calc(var(--spacing) * 12); + } + .text-center { + text-align: center; + } + .text-end { + text-align: end; + } + .text-start { + text-align: start; + } + .align-baseline { + vertical-align: baseline; + } + .align-bottom { + vertical-align: bottom; + } + .align-middle { + vertical-align: middle; + } + .align-text-bottom { + vertical-align: text-bottom; + } + .align-text-top { + vertical-align: text-top; + } + .align-top { + vertical-align: top; + } + .font-mono { + font-family: var(--font-mono); + } + .text-base { + font-size: var(--text-base); + line-height: var(--tw-leading, var(--text-base--line-height)); + } + .text-lg { + font-size: var(--text-lg); + line-height: var(--tw-leading, var(--text-lg--line-height)); + } + .text-sm { + font-size: var(--text-sm); + line-height: var(--tw-leading, var(--text-sm--line-height)); + } + .text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .text-xs { + font-size: var(--text-xs); + line-height: var(--tw-leading, var(--text-xs--line-height)); + } + .leading-relaxed { + --tw-leading: var(--leading-relaxed); + line-height: var(--leading-relaxed); + } + .leading-tight { + --tw-leading: var(--leading-tight); + line-height: var(--leading-tight); + } + .font-bold { + --tw-font-weight: var(--font-weight-bold); + font-weight: var(--font-weight-bold); + } + .font-extrabold { + --tw-font-weight: var(--font-weight-extrabold); + font-weight: var(--font-weight-extrabold); + } + .font-medium { + --tw-font-weight: var(--font-weight-medium); + font-weight: var(--font-weight-medium); + } + .font-semibold { + --tw-font-weight: var(--font-weight-semibold); + font-weight: var(--font-weight-semibold); + } + .tracking-wide { + --tw-tracking: var(--tracking-wide); + letter-spacing: var(--tracking-wide); + } + .tracking-wider { + --tw-tracking: var(--tracking-wider); + letter-spacing: var(--tracking-wider); + } + .tracking-widest { + --tw-tracking: var(--tracking-widest); + letter-spacing: var(--tracking-widest); + } + .text-nowrap { + text-wrap: nowrap; + } + .text-wrap { + text-wrap: wrap; + } + .text-black { + color: var(--color-black); + } + .text-gray-400 { + color: var(--color-gray-400); + } + .text-gray-500 { + color: var(--color-gray-500); + } + .text-gray-600 { + color: var(--color-gray-600); + } + .text-gray-700 { + color: var(--color-gray-700); + } + .text-gray-800 { + color: var(--color-gray-800); + } + .text-green-400 { + color: var(--color-green-400); + } + .text-green-600 { + color: var(--color-green-600); + } + .text-green-700 { + color: var(--color-green-700); + } + .text-orange-500 { + color: var(--color-orange-500); + } + .text-white { + color: var(--color-white); + } + .capitalize { + text-transform: capitalize; + } + .lowercase { + text-transform: lowercase; + } + .uppercase { + text-transform: uppercase; + } + .italic { + font-style: italic; + } + .line-through { + text-decoration-line: line-through; + } + .underline { + text-decoration-line: underline; + } + .opacity-0 { + opacity: 0%; + } + .opacity-25 { + opacity: 25%; + } + .opacity-30 { + opacity: 30%; + } + .opacity-50 { + opacity: 50%; + } + .opacity-75 { + opacity: 75%; + } + .opacity-80 { + opacity: 80%; + } + .opacity-90 { + opacity: 90%; + } + .opacity-100 { + opacity: 100%; + } + .shadow { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-2xl { + --tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-lg { + --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-md { + --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-none { + --tw-shadow: 0 0 #0000; + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-sm { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-xl { + --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .ring-2 { + --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .ring-orange-200 { + --tw-ring-color: var(--color-orange-200); + } + .outline { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } + .blur { + --tw-blur: blur(8px); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .drop-shadow { + --tw-drop-shadow-size: drop-shadow(0 1px 2px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.1))) drop-shadow(0 1px 1px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.06))); + --tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / 0.1)) drop-shadow( 0 1px 1px rgb(0 0 0 / 0.06)); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .drop-shadow-lg { + --tw-drop-shadow-size: drop-shadow(0 4px 4px var(--tw-drop-shadow-color, rgb(0 0 0 / 0.15))); + --tw-drop-shadow: drop-shadow(var(--drop-shadow-lg)); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .invert { + --tw-invert: invert(100%); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .\!filter { + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,) !important; + } + .filter { + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .backdrop-blur-lg { + --tw-backdrop-blur: blur(var(--blur-lg)); + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .backdrop-blur-sm { + --tw-backdrop-blur: blur(var(--blur-sm)); + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .backdrop-filter { + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .transition { + transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .transition-all { + transition-property: all; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .transition-colors { + transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .duration-200 { + --tw-duration: 200ms; + transition-duration: 200ms; + } + .duration-300 { + --tw-duration: 300ms; + transition-duration: 300ms; + } + .ease-in-out { + --tw-ease: var(--ease-in-out); + transition-timing-function: var(--ease-in-out); + } + .ease-out { + --tw-ease: var(--ease-out); + transition-timing-function: var(--ease-out); + } + .outline-none { + --tw-outline-style: none; + outline-style: none; + } + .select-none { + -webkit-user-select: none; + user-select: none; + } + .group-hover\:w-full { + &:is(:where(.group):hover *) { + @media (hover: hover) { + width: 100%; + } + } + } + .group-hover\:text-orange-500 { + &:is(:where(.group):hover *) { + @media (hover: hover) { + color: var(--color-orange-500); + } + } + } + .hover\:scale-105 { + &:hover { + @media (hover: hover) { + --tw-scale-x: 105%; + --tw-scale-y: 105%; + --tw-scale-z: 105%; + scale: var(--tw-scale-x) var(--tw-scale-y); + } + } + } + .hover\:scale-110 { + &:hover { + @media (hover: hover) { + --tw-scale-x: 110%; + --tw-scale-y: 110%; + --tw-scale-z: 110%; + scale: var(--tw-scale-x) var(--tw-scale-y); + } + } + } + .hover\:rotate-6 { + &:hover { + @media (hover: hover) { + rotate: 6deg; + } + } + } + .hover\:cursor-pointer { + &:hover { + @media (hover: hover) { + cursor: pointer; + } + } + } + .hover\:bg-gray-50 { + &:hover { + @media (hover: hover) { + background-color: var(--color-gray-50); + } + } + } + .hover\:bg-orange-600 { + &:hover { + @media (hover: hover) { + background-color: var(--color-orange-600); + } + } + } + .hover\:bg-white\/10 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, #fff 10%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-white) 10%, transparent); + } + } + } + } + .hover\:bg-white\/30 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, #fff 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-white) 30%, transparent); + } + } + } + } + .hover\:text-orange-600 { + &:hover { + @media (hover: hover) { + color: var(--color-orange-600); + } + } + } + .focus\:ring-2 { + &:focus { + --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + } + .focus\:ring-orange-400 { + &:focus { + --tw-ring-color: var(--color-orange-400); + } + } +} +@property --tw-translate-x { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-translate-y { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-translate-z { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-scale-x { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-scale-y { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-scale-z { + syntax: "*"; + inherits: false; + initial-value: 1; +} +@property --tw-rotate-x { + syntax: "*"; + inherits: false; +} +@property --tw-rotate-y { + syntax: "*"; + inherits: false; +} +@property --tw-rotate-z { + syntax: "*"; + inherits: false; +} +@property --tw-skew-x { + syntax: "*"; + inherits: false; +} +@property --tw-skew-y { + syntax: "*"; + inherits: false; +} +@property --tw-space-y-reverse { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-space-x-reverse { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-border-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-gradient-position { + syntax: "*"; + inherits: false; +} +@property --tw-gradient-from { + syntax: ""; + inherits: false; + initial-value: #0000; +} +@property --tw-gradient-via { + syntax: ""; + inherits: false; + initial-value: #0000; +} +@property --tw-gradient-to { + syntax: ""; + inherits: false; + initial-value: #0000; +} +@property --tw-gradient-stops { + syntax: "*"; + inherits: false; +} +@property --tw-gradient-via-stops { + syntax: "*"; + inherits: false; +} +@property --tw-gradient-from-position { + syntax: ""; + inherits: false; + initial-value: 0%; +} +@property --tw-gradient-via-position { + syntax: ""; + inherits: false; + initial-value: 50%; +} +@property --tw-gradient-to-position { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-leading { + syntax: "*"; + inherits: false; +} +@property --tw-font-weight { + syntax: "*"; + inherits: false; +} +@property --tw-tracking { + syntax: "*"; + inherits: false; +} +@property --tw-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-inset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-ring-inset { + syntax: "*"; + inherits: false; +} +@property --tw-ring-offset-width { + syntax: ""; + inherits: false; + initial-value: 0px; +} +@property --tw-ring-offset-color { + syntax: "*"; + inherits: false; + initial-value: #fff; +} +@property --tw-ring-offset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-outline-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-blur { + syntax: "*"; + inherits: false; +} +@property --tw-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-invert { + syntax: "*"; + inherits: false; +} +@property --tw-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-drop-shadow-size { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-blur { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-invert { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-duration { + syntax: "*"; + inherits: false; +} +@property --tw-ease { + syntax: "*"; + inherits: false; +} +@keyframes pulse { + 50% { + opacity: 0.5; + } +} +@layer properties { + @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { + *, ::before, ::after, ::backdrop { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-translate-z: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-scale-z: 1; + --tw-rotate-x: initial; + --tw-rotate-y: initial; + --tw-rotate-z: initial; + --tw-skew-x: initial; + --tw-skew-y: initial; + --tw-space-y-reverse: 0; + --tw-space-x-reverse: 0; + --tw-border-style: solid; + --tw-gradient-position: initial; + --tw-gradient-from: #0000; + --tw-gradient-via: #0000; + --tw-gradient-to: #0000; + --tw-gradient-stops: initial; + --tw-gradient-via-stops: initial; + --tw-gradient-from-position: 0%; + --tw-gradient-via-position: 50%; + --tw-gradient-to-position: 100%; + --tw-leading: initial; + --tw-font-weight: initial; + --tw-tracking: initial; + --tw-shadow: 0 0 #0000; + --tw-shadow-color: initial; + --tw-shadow-alpha: 100%; + --tw-inset-shadow: 0 0 #0000; + --tw-inset-shadow-color: initial; + --tw-inset-shadow-alpha: 100%; + --tw-ring-color: initial; + --tw-ring-shadow: 0 0 #0000; + --tw-inset-ring-color: initial; + --tw-inset-ring-shadow: 0 0 #0000; + --tw-ring-inset: initial; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-offset-shadow: 0 0 #0000; + --tw-outline-style: solid; + --tw-blur: initial; + --tw-brightness: initial; + --tw-contrast: initial; + --tw-grayscale: initial; + --tw-hue-rotate: initial; + --tw-invert: initial; + --tw-opacity: initial; + --tw-saturate: initial; + --tw-sepia: initial; + --tw-drop-shadow: initial; + --tw-drop-shadow-color: initial; + --tw-drop-shadow-alpha: 100%; + --tw-drop-shadow-size: initial; + --tw-backdrop-blur: initial; + --tw-backdrop-brightness: initial; + --tw-backdrop-contrast: initial; + --tw-backdrop-grayscale: initial; + --tw-backdrop-hue-rotate: initial; + --tw-backdrop-invert: initial; + --tw-backdrop-opacity: initial; + --tw-backdrop-saturate: initial; + --tw-backdrop-sepia: initial; + --tw-duration: initial; + --tw-ease: initial; + } + } +} diff --git a/wwwroot/css/website.css b/wwwroot/css/website.css new file mode 100644 index 0000000..1fb150f --- /dev/null +++ b/wwwroot/css/website.css @@ -0,0 +1,3 @@ +body { + font-family: "Inter Tight", sans-serif; +} diff --git a/wwwroot/dlh_type.svg b/wwwroot/dlh_type.svg new file mode 100644 index 0000000..b301870 --- /dev/null +++ b/wwwroot/dlh_type.svg @@ -0,0 +1,3 @@ + + + diff --git a/wwwroot/favicon.ico b/wwwroot/favicon.ico new file mode 100644 index 0000000..63e859b Binary files /dev/null and b/wwwroot/favicon.ico differ diff --git a/wwwroot/js/site.js b/wwwroot/js/site.js new file mode 100644 index 0000000..0937657 --- /dev/null +++ b/wwwroot/js/site.js @@ -0,0 +1,4 @@ +// Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification +// for details on configuring this project to bundle and minify static web assets. + +// Write your JavaScript code. diff --git a/wwwroot/manifest.json b/wwwroot/manifest.json new file mode 100644 index 0000000..2645465 --- /dev/null +++ b/wwwroot/manifest.json @@ -0,0 +1,48 @@ +{ + "name": "eSPJ - DLH", + "short_name": "eSPJ - DLH", + "description": "Aplikasi pemantauan SPJ dan lokasi driver UPST", + "start_url": "/", + "scope": "/", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#f97316", + "orientation": "portrait", + "icons": [ + { + "src": "/icons/icon-72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "/icons/icon-96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "/icons/icon-128.png", + "sizes": "128x128", + "type": "image/png" + }, + { + "src": "/icons/icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icons/icon-256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/icons/icon-384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "/icons/icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/wwwroot/odo.svg b/wwwroot/odo.svg new file mode 100644 index 0000000..64a94b5 --- /dev/null +++ b/wwwroot/odo.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wwwroot/odo_simple.svg b/wwwroot/odo_simple.svg new file mode 100644 index 0000000..406ab92 --- /dev/null +++ b/wwwroot/odo_simple.svg @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wwwroot/service-worker.js b/wwwroot/service-worker.js new file mode 100644 index 0000000..fbe6ee0 --- /dev/null +++ b/wwwroot/service-worker.js @@ -0,0 +1,39 @@ +const CACHE_NAME = "spj-dlh-v1"; +const urlsToCache = [ + "/", + "/css/site.css", + "/js/site.js", + "/icons/icon-192.png", + "/icons/icon-512.png", +]; + +// Install +self.addEventListener("install", (event) => { + event.waitUntil( + caches.open(CACHE_NAME).then((cache) => cache.addAll(urlsToCache)) + ); +}); + +// Fetch +self.addEventListener("fetch", (event) => { + event.respondWith( + caches + .match(event.request) + .then((response) => response || fetch(event.request)) + ); +}); + +// Activate +self.addEventListener("activate", (event) => { + event.waitUntil( + caches + .keys() + .then((cacheNames) => + Promise.all( + cacheNames + .filter((name) => name !== CACHE_NAME) + .map((name) => caches.delete(name)) + ) + ) + ); +}); diff --git a/wwwroot/tree.svg b/wwwroot/tree.svg new file mode 100644 index 0000000..9c1ab79 --- /dev/null +++ b/wwwroot/tree.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +