diff --git a/.env b/.env
index 7b1c55aa..9f849a3c 100755
--- a/.env
+++ b/.env
@@ -18,7 +18,7 @@ DB_PORT=3306
# Alteracoes para funcionar com o servidor, porem não funciona na firma
DB_HOST=ispt-innovation.com
-DB_DATABASE=ispt40_version01
+DB_DATABASE=ispt40_version01_BK
DB_USERNAME=ispt40
DB_PASSWORD=qu3ro3ntr@r
diff --git a/app/Http/Controllers/CreateProjectController.php b/app/Http/Controllers/CreateProjectController.php
index b7a3963d..23344515 100755
--- a/app/Http/Controllers/CreateProjectController.php
+++ b/app/Http/Controllers/CreateProjectController.php
@@ -435,6 +435,9 @@ public function finishCreatingProject($numberProject)
$missingFurtherTasksDetails = [];
$missingWorkstations = [];
+ $receiveDetailsProject = CompanyProject::where('company_projects_id', $numberProject)->first();
+ // dd($receiveDetailsProject);
+
// Recebe todos os dados dos postos de Trabalho
$receiveWorkstaions = ConstructionWorkstation::where('company_projects_id', $numberProject)->get();
@@ -506,6 +509,13 @@ public function finishCreatingProject($numberProject)
if (!$isEmpty) {
return redirect()->back()->with('errors', $allMissingTasks);
+
+ } else if ($receiveDetailsProject->order_project == 5) {
+ // Se for igual a 5 significa que forem adicionados apenas equipamentos extras e sendo assim precisa voltar para a Obra em execussao
+ $receiveDetailsProject->order_project = 3;
+ $receiveDetailsProject->save();
+ return redirect()->route('home');
+
} else {
$project = CompanyProject::find($numberProject);
$project->order_project = 2;
@@ -938,13 +948,10 @@ public function processStep1(Request $request)
public function showStep2($company_projects_id)
{
- $groupedArrayForPendingEquipments = session('groupedArrayForPendingEquipments');
+ //A partida, nao precisa se uma session para guardar esses dados da pending, pois agora e guardado na DB
+ // $groupedArrayForPendingEquipments = session('groupedArrayForPendingEquipments');
// Verifique se a etapa 1 foi concluída
- // if (!session('form_data.step1')) {
- // return redirect('/createProject');
- // }
-
//recebe o Id de Plant vai devolver todos os equipamentos relacionados a esta Instalação(plant)
// Carregue o projeto com o id fornecido
$project = CompanyProject::find($company_projects_id);
@@ -1008,7 +1015,7 @@ public function showStep2($company_projects_id)
->with('checkEquipments', $checkEquipments)
->with('checkUnits', $checkUnits)
->with('receiveNumberProject', $project)
- ->with('groupedArrayForPendingEquipments', $groupedArrayForPendingEquipments)
+ // ->with('groupedArrayForPendingEquipments', $groupedArrayForPendingEquipments)
->with('receiveAllLogsProject', $receiveAllLogsProject);
}
return view('projectsClients/articulated_2', ['step' => 2, 'numberProject' => $numberProject])
@@ -1016,13 +1023,15 @@ public function showStep2($company_projects_id)
->with('typeEquipments', $typeEquipments)
->with('checkEquipments', $checkEquipments)
->with('checkUnits', $checkUnits)
- ->with('groupedArrayForPendingEquipments', $groupedArrayForPendingEquipments)
+ // ->with('groupedArrayForPendingEquipments', $groupedArrayForPendingEquipments)
->with('receiveNumberProject', $project)
->with('receiveAllLogsProject', $receiveAllLogsProject);
}
public function createEquipmentManual(Request $request)
{
+ $detailsCompanyProject = CompanyProject::where('company_projects_id', $request->numberProject)->first();
+
// EquipmentAmbit
// *** Recebe a Instalação(Plant), com base no número da Obra Criada
$receivePlant = DB::table('plants')
@@ -1102,8 +1111,15 @@ public function createEquipmentManual(Request $request)
$newEquipmentWorkHistorys->ispt_number = $isptNumber;
$newEquipmentWorkHistorys->company_projects_id = $request->numberProject;
+
+ if ($detailsCompanyProject->order_project == 5) {
+ $newEquipmentWorkHistorys->extra_equipment = 1;
+ } else {
+ $newEquipmentWorkHistorys->extra_equipment = 0;
+ }
$newEquipmentWorkHistorys->save();
+
$equipmentWorkHistorysID = $newEquipmentWorkHistorys->equipmentWorkHistorys_id;
// Verifica os campos do Card_do tipo de valvula selecionado (Ex: psv_card) e de acordo com os campos preenchidos se for de atributos especificos, ele compara o 'name' dos inputs com os 'general_attributes_equipment_description' da tabela : GeneralAttributesEquipment e associa
@@ -1357,7 +1373,6 @@ function normalize($value)
continue; // Pula a próxima verificação para duplicatas identificadas no Excel
}
-
//--------- Linhas associada a equipamentos da base de dados.
// Verifica duplicatas na base de dados
if (isset($equipments[$key])) {
@@ -1400,6 +1415,13 @@ function normalize($value)
$newEquipmentWorkHistory->equipment_status_project = 0;
$newEquipmentWorkHistory->ispt_number = $isptNumber++;
$newEquipmentWorkHistory->company_projects_id = $company_projects_id;
+
+ //Se o projecto atual for uma adicao de equipamentos extras, vai ter o order_project como 5, sendo assim todos os equipamentos adicionados vai ser equipamentos extras
+ if ($detailsCompanyProject->order_project == 5) {
+ $newEquipmentWorkHistory->extra_equipment = 1;
+ } else {
+ $newEquipmentWorkHistory->extra_equipment = 0;
+ }
$newEquipmentWorkHistory->save();
@@ -1453,13 +1475,20 @@ function normalize($value)
//Deve adicionar tambem os outros atributos espesificos para o equipameto.
-
//Criar o equipment Work History
$newEquipmentWorkHistory = new EquipmentWorkHistory;
$newEquipmentWorkHistory->equipment_id = $newEquipament->equipment_id;
$newEquipmentWorkHistory->ispt_number = $isptNumber++;
$newEquipmentWorkHistory->company_projects_id = $company_projects_id;
$newEquipmentWorkHistory->equipment_status_project = 0;
+
+ //Se o projecto atual for uma adicao de equipamentos extras, vai ter o order_project como 5, sendo assim todos os equipamentos adicionados vai ser equipamentos extras
+ if ($detailsCompanyProject->order_project == 5) {
+ $newEquipmentWorkHistory->extra_equipment = 1;
+ } else {
+ $newEquipmentWorkHistory->extra_equipment = 0;
+ }
+
$newEquipmentWorkHistory->save();
$ambit = AmbitsEquipment::where('ambits_description', $datas['ambit'])->first();
@@ -1520,31 +1549,25 @@ function normalize($value)
$createProjectLogs->save();
+ // Distiguir entre Articulado 'Normal' e 'Extra'
+ if ($detailsCompanyProject->order_project == 5) {
+ return redirect()->route('changeFromExecutionToPlanning', ['projectID' => $request->numberProject])
+ ->with('success', 'Equipamentos Extras adicionados!');
+ }
return redirect()->route('articulated_2', ['projectID' => $request->numberProject])
->with('success', 'Equipamentos criados com sucesso !');
-
-
- // if ($countPendingEquipments != 0 && !empty($equipmentPendingLogs)) {
- // // Se houver equipamentos pendentes, redirecione com essa informação e inclua os $linhasIgnoradas se não estiverem vazios
- // return redirect()->route('articulated_2', ['projectID' => $request->numberProject])
- // ->with('danger', 'Equipamentos Pendentes criados: ' . $countPendingEquipments)
- // ->with('dangerLogs', $ignoredLines)
- // ->with('equipmentPendingLogs', $equipmentPendingLogs);
- // // ->with('pendingEquipments', $pendingEquipments);
- // } else {
- // // Se não houver equipamentos pendentes, redirecione com uma mensagem de sucesso e inclua os $linhasIgnoradas se não estiverem vazios
- // return redirect()->route('articulated_2', ['projectID' => $request->numberProject])
- // ->with('success', 'Equipamentos Criados: ' . $countEquipment)
- // ->with('dangerLogs', $ignoredLines);
- // }
- // return redirect()->route('articulated_2', ['projectID' => $request->numberProject])
- // ->with('success', 'Equipamentos Adicionados a Obra com sucesso: ' . $countEquipment);
+ //Se nao existir arquivo ou nao for compativel
+ } elseif ($detailsCompanyProject->order_project == 5) {
+ return redirect()->route('changeFromExecutionToPlanning', ['projectID' => $request->numberProject])
+ ->with('danger', 'Arquivo ignorado , por nao ser compativel com a template 4.0');
+ // Nenhum arquivo enviado para verificacao do excel.
} else {
return redirect()->route('articulated_2', ['projectID' => $request->numberProject])
->with('danger', 'Arquivo ignorado , por nao ser compativel com a template 4.0');
// Nenhum arquivo enviado para verificacao do excel.
}
+
// //Nao chega aqui ainda pois volta para a pagina com dados ja carregados.
// session(['form_data.step2' => $request->all()]);
@@ -1862,7 +1885,7 @@ public function removingElementalTasksFromProject(Request $request)
$task->save(); // Salvar as mudanças
}
}
- return back()->with('success','Tarefas removidas de todos os equipamentos com sucesso !!');
+ return back()->with('success', 'Tarefas removidas de todos os equipamentos com sucesso !!');
}
diff --git a/app/Http/Controllers/ExecutionProjectController.php b/app/Http/Controllers/ExecutionProjectController.php
index b1ce347e..d50b5e42 100755
--- a/app/Http/Controllers/ExecutionProjectController.php
+++ b/app/Http/Controllers/ExecutionProjectController.php
@@ -4,7 +4,9 @@
use App\Models\Company;
use App\Models\EquipmentWorkHistory;
+use App\Models\PendingEquipment;
use App\Models\Plant;
+use App\Models\ProjectExcelLog;
use App\Models\Unit;
use App\Models\User;
use Illuminate\Http\Request;
@@ -15,6 +17,9 @@
use App\Models\EquipmentComments;
use App\Models\EquipmentType;
+use Illuminate\Support\Facades\DB;
+
+
use App\Models\ElementalTasks;
@@ -88,10 +93,34 @@ public function getDataEquipment(Request $request)
// Se receber o numero do projecto. /Se existir
if ($numberProject) {
- // Query para DataTables do Planeamento
- $query = Equipment::with('equipmentType', 'unit', 'equipmentWorkHistory')
- ->where('company_projects_id', $numberProject)
- ->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id', 'equipment_description']);
+ //Se vier da Pagina extra = 2
+ if ($request->get('typePage') == 2) {
+ // Query para DataTables do Planeamento 'Extra'
+
+ $query = Equipment::with([
+ 'equipmentType',
+ 'unit',
+ 'equipmentWorkHistory' => function ($query) {
+ $query->where('extra_equipment', 1);
+ }
+ ])
+ ->where('company_projects_id', $numberProject)
+ ->whereHas('equipmentWorkHistory', function ($query) {
+ $query->where('extra_equipment', 1);
+ })
+ ->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id', 'equipment_description']);
+
+
+ } else {
+ //Query para a Pagina 'Normal'
+ // Query para DataTables do Planeamento 'Normal'
+ $query = Equipment::with('equipmentType', 'unit', 'equipmentWorkHistory')
+ ->where('company_projects_id', $numberProject)
+ ->select(['equipment_id', 'equipment_tag', 'unit_id', 'equipment_type_id', 'equipment_description']);
+ }
+
+
+
if ($receiveRespostUnitsSelect && $receiveRespostUnitsSelect !== '#') {
$query->where('unit_id', $receiveRespostUnitsSelect);
@@ -166,8 +195,8 @@ public function getDataEquipment(Request $request)
//Tratamento para o portifólio do Cliente.
if ($request->get('clientId')) {
$company = $request->get('clientId');
- $query->whereHas('unit.plant',function ($query) use ($company){
- $query->where('company_id',$company);
+ $query->whereHas('unit.plant', function ($query) use ($company) {
+ $query->where('company_id', $company);
});
}
@@ -584,19 +613,73 @@ public function receiveExecutionProject($ProjectId)
public function changeFromExecutionToPlanning($projectID)
{
- $receiveCompanyProject = CompanyProject::where('company_projects_id', $projectID)->first();
- if ($receiveCompanyProject) {
- $receiveCompanyProject->order_project = 1; // Supondo que 1 seja 'Planeamento'
- $receiveCompanyProject->save();
- return redirect()->route('articulated_2', ['projectID' => $receiveCompanyProject->company_projects_id])
- ->with('success', 'O projeto foi alterado para Planeamento.');
+ $receiveDetailsProject = CompanyProject::where('company_projects_id', $projectID)->first();
+
+ if ($receiveDetailsProject) {
+ $receiveDetailsProject->order_project = 5; // Alterar 5 seja 'Planeamento Extra'
+ $receiveDetailsProject->save();
+
+ $typeEquipments = EquipmentType::all();
+
+ $listEquipmentsProjects = Equipment::with([
+ 'unit',
+ 'equipmentType',
+ // 'equipmentAssociationAmbit.ambitsEquipment',
+ 'specificAttributes' => function ($query) {
+ $query->orderBy('specific_attributes_value', 'asc');
+ }
+ ])
+ ->where('company_projects_id', $receiveDetailsProject->company_projects_id)
+ ->get();
+
+
+
+ //Retorna todas as Fabricas Unit, com base na Instalação
+ $checkUnits = DB::table('units')
+ ->join('plants', 'units.plant_id', '=', 'plants.plant_id')
+ ->join('company_projects', 'plants.plant_id', '=', 'company_projects.plant_id')
+ ->select('units.*')
+ ->where('company_projects.company_projects_id', '=', $receiveDetailsProject->company_projects_id)
+ ->get();
+
+
+ //Retorna todos os Equipamentos, com base na instalcao do projecto
+ $checkEquipments = DB::table('equipments')
+ ->join('units', 'equipments.unit_id', '=', 'units.unit_id')
+ ->join('plants', 'units.plant_id', '=', 'plants.plant_id')
+ ->select('equipments.*') // Seleciona todas as colunas da tabela 'equipments'
+ ->where('plants.plant_id', '=', $receiveDetailsProject['plant_id']) // Filtra baseado no 'plant_id'
+ ->get();
+
+ //Retorna todos os Equipamentos, com base na instalcao do projecto
+ //Deve alterar para mostrar apenas os equipamentos criados como extras.
+
+
+ $pendingEquipments = PendingEquipment::where('pending_company_projects_id', $receiveDetailsProject->company_projects_id)->get();
+
+ $receiveAllLogsProject = ProjectExcelLog::where('company_projects_id', $receiveDetailsProject->company_projects_id)
+ ->get()
+ ->groupBy('excel_name')
+ ->map(function ($group) {
+ return $group->sortByDesc('project_excel_logs_id')->first();
+ });
+
+ return view('projectsClients.articulated_2Extra')
+ ->with('pendingEquipments', $pendingEquipments)
+ ->with('receiveAllLogsProject', $receiveAllLogsProject)
+ ->with('typeEquipments', $typeEquipments)
+ ->with('checkEquipments', $checkEquipments)
+ ->with('listEquipmentsProjects', $listEquipmentsProjects)
+ ->with('checkUnits', $checkUnits)
+ ->with('receiveDetailsProject', $receiveDetailsProject)
+
+ ->with('success', 'O projeto foi alterado para Planeamento(Extra).');
} else {
return back()->with('error', 'Projeto não encontrado.');
}
}
-
public function receiveWorkstationExecutionProject($receiveNumberProject)
{
$model = ConstructionWorkstation::where('company_projects_id', $receiveNumberProject)->with('workstationsAssociationTasks');
@@ -727,11 +810,14 @@ public function receiveDetailsEquipmentsProject(Request $request)
return $firstEquipmentWorkHistory ? $firstEquipmentWorkHistory->equipmentAssociationAmbit->ambitsEquipment->ambits_description : 'N/A';
})
- //Vai ser 2 tipos de action, para as tabelas.
- // ->addColumn('action', function ($dataEquipment) use ($numberProject, $tableType) {
- // $equipmentStatus = $tableType === 'pending' ? 1 : 0;
- // $actionBtn = '';
- // return $actionBtn;
+ ->addColumn('extra_equipment', function ($equipment) {
+ $firstEquipmentWorkHistory = $equipment->equipmentWorkHistory->first();
+ if ($firstEquipmentWorkHistory) {
+ return $firstEquipmentWorkHistory->extra_equipment ? 'Sim' : 'Não';
+ }
+ return 'N/A'; // Retorna 'N/A' se não houver registros na relação equipmentWorkHistory
+ })
+
->addColumn('action', function ($dataEquipment) use ($numberProject, $tableType) {
$equipmentStatus = ($tableType === 'pending' ? 1 : ($tableType === 'completed' ? 2 : 0));
$actionBtn = '';
diff --git a/app/Http/Controllers/ProjectoDatacontroller.php b/app/Http/Controllers/ProjectoDatacontroller.php
index f87bcfa6..0334117d 100755
--- a/app/Http/Controllers/ProjectoDatacontroller.php
+++ b/app/Http/Controllers/ProjectoDatacontroller.php
@@ -555,7 +555,7 @@ public function getEquipmentDetails($receiveListEquipmentId)
public function receiveAllInstallationEquipment(Request $request)
{
- $projectId = $request->get('receiveNumberProject');
+ $projectId = $request->get('receiveDetailsProject');
$receveProject = CompanyProject::find($projectId);
$receveEquipments = Equipment::whereHas('unit.plant', function ($query) use ($receveProject) {
diff --git a/app/Livewire/Execução/EquipmentsDashboard.php b/app/Livewire/Execução/EquipmentsDashboard.php
index 5890fbaa..a9fe6d1b 100755
--- a/app/Livewire/Execução/EquipmentsDashboard.php
+++ b/app/Livewire/Execução/EquipmentsDashboard.php
@@ -17,6 +17,7 @@ class EquipmentsDashboard extends Component
public $totalEquipmentsCount;
public $unstarted;
public $inProgress;
+ public $toApprove;
public $completed;
public $completed1;
public $totalEquivalentEquipment;
@@ -52,6 +53,7 @@ public function updateTimeGrafics()
'totalEquipmentsCount' => $this->totalEquipmentsCount,
'unstarted' => $this->unstarted,
'inProgress' => $this->inProgress,
+ 'toApprove' => $this->toApprove,
'completed' => $this->completed,
'totalEquivalentEquipment' => $this->totalEquivalentEquipment,
'equivalentUnstarted' => $this->equivalentUnstarted,
@@ -69,9 +71,10 @@ public function showPercentageEquipments()
{
// Disparar um evento com os dados atualizados
$this->dispatch('refreshPercentageEquipments', [
- 'totalEquipmentsCount' => $this->totalEquipmentsCount,
- 'unstarted' => $this->unstarted,
+ 'totalEquipmentsCount' => $this->totalEquipmentsCount,
+ 'unstarted' => $this->unstarted,
'inProgress' => $this->inProgress,
+ 'toApprove' => $this->toApprove,
'completed' => $this->completed,
'totalEquivalentEquipment' => $this->totalEquivalentEquipment,
'equivalentUnstarted' => $this->equivalentUnstarted,
@@ -83,21 +86,18 @@ public function showPercentageEquipments()
public function refreshDataEquipments($datasProject)
{
-
// Inicializa a zero o contador para toda a vez que atualizar.
$this->completed = 0;
$this->inProgress = 0;
+ $this->toApprove = 0;
$this->unstarted = 0;
$this->equivalentCompleted = 0;
$this->equivalentInProgress = 0;
$this->equivalentUnstarted = 0;
-
+ //recebe o total de equipamentos da Obra.
$totalEquipments = EquipmentWorkHistory::where('company_projects_id', $datasProject->company_projects_id)->get();
- // $detailsEquipmentWorkProject = EquipmentWorkHistory::where('equipment_id', $equipmentID)
- // ->where('company_projects_id', $projectID)->first();
-
// Busca o valor total de todos os equipamentos encontrados
$this->totalEquipmentsCount = $totalEquipments->count();
@@ -105,33 +105,24 @@ public function refreshDataEquipments($datasProject)
foreach ($totalEquipments as $equipment) {
- // Conta quantas vezes o equipamento aparece em OrderEquipmentTasks
+ // Conta quantas vezes o equipamento aparece em OrderEquipmentTasks - para saber o numero de tarefas que cada equipamento tem. (verificar se nao seria melhor colocar em um array)
$tasksCount = OrderEquipmentTasks::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistorys_id)->count();
// ira receber varios dados para o array sendo array[key:equipment_id,valor:quantidade de vezes que o equipment_id se repete na tabela 'OrderEquipmentTasks']
$equipmentCounts[$equipment->equipment_id] = $tasksCount;
- // Verifica quantos dados tem para o mesmo equipamento, resumindo quantas tarefas ja vez e seu circuito ao longo de seu Ambito
- $controlCount = ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistorys_id)->count();
-
- // Verifica inicialmente se a quantido de vezes que tal equipamento apacere na ControlEquipmentWorkstation e o mesmo numero de vezes que aparece na tabela : OrderEquipmentTasks
- // Isto para ver se o ciclo foi correto sem retornos se os 2 valores forem iguais significa que o equipamento foi concluido.
- // if (
- // $controlCount >= $tasksCount && ControlEquipmentWorkstation::where('equipment_id', $equipment->equipment_id)
- // // apos receber ambos os numeros se as colunas 'entry_date' e 'departure_date' forem diferente de Null significa que o equipamento foi concluido
- // ->whereNotNull('entry_date')
- // ->whereNotNull('departure_date')
- // ->count() >= $tasksCount
- // ) {
-
- if (ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistorys_id)
+ // Verifica primiero se tem pelos menos o mesmo numeros de tarefas feitas em relacao a tarefas por fazer(apenas este metodo nao garante , pois nao distingue historico de tarefa distinta)
+ // Apenas apos a 2 verificacao quando equipment_status_project = 3 significa que foi apravado e concluido.
+ if (ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistorys_id)
// apos receber ambos os numeros se as colunas 'entry_date' e 'departure_date' forem diferente de Null significa que o equipamento foi concluido
->whereNotNull('id_workstations')
->whereNotNull('entry_date')
->whereNotNull('departure_date')
->count() >= $tasksCount
+ && EquipmentWorkHistory::where('equipmentWorkHistorys_id',$equipment->equipmentWorkHistorys_id)
+ ->where('equipment_status_project',3)
) {
// se o equipamento foi considerado concluido, conta +1 para o completed e o equivalentCompleted busca no array equipmentCounts, quando a key for igual ao equipment_id atual e conta com + os valores da key encontrada
@@ -140,7 +131,15 @@ public function refreshDataEquipments($datasProject)
$this->completed1[] = $equipment->equipment_id; // Adiciona o equipment_id ao array
$this->equivalentCompleted += $equipmentCounts[$equipment->equipment_id];
- } elseif (ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistorys_id)->exists()) {
+
+ }
+ //Verica e devolve a quantidade de equipamentos para aprovar.
+ //Ao tentar descomentar os graficos de queijo somem.
+ // elseif (EquipmentWorkHistory::where('equipmentWorkHistorys_id',$equipment->equipmentWorkHistorys_id)->where('equipment_status_project',2)){
+ // $this->toApprove++;
+ // }
+
+ elseif (ControlEquipmentWorkstation::where('equipmentWorkHistorys_id', $equipment->equipmentWorkHistorys_id)->exists()) {
$this->inProgress++;
$this->equivalentInProgress += $equipmentCounts[$equipment->equipment_id];
} else {
@@ -148,6 +147,7 @@ public function refreshDataEquipments($datasProject)
$this->equivalentUnstarted += $equipmentCounts[$equipment->equipment_id];
}
}
+
// Busca o valor total de todas as ocorrências criadas na variavel equipmentCounts
$this->totalEquivalentEquipment = array_sum($equipmentCounts);
diff --git a/app/Models/Equipment.php b/app/Models/Equipment.php
index 0f47e399..ec855334 100755
--- a/app/Models/Equipment.php
+++ b/app/Models/Equipment.php
@@ -6,6 +6,7 @@
use App\Models\factorie;
use App\Models\specific_Attributes_Equipament_Type;
use App\Models\installation;
+use App\Models\EquipmentComment;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
@@ -56,7 +57,7 @@ public function orderEquipmentTasks()
public function equipmentComments()
{
- return $this->hasMany(EquipmentComments::class, 'equipment_id', 'equipment_id');
+ return $this->hasMany(EquipmentComment::class, 'equipment_id', 'equipment_id');
}
public function controlEquipmentWorkstation()
diff --git a/app/Services/PdfWrapper.php b/app/Services/PdfWrapper.php
new file mode 100644
index 00000000..81076b0a
--- /dev/null
+++ b/app/Services/PdfWrapper.php
@@ -0,0 +1,90 @@
+pdfGenerator = new Browsershot();
+
+ $this->headerHtml = view('projectsClients.pdf._header')->render();
+
+ $this->footerHtml = view('projectsClients.pdf._footer')->render();
+
+ }
+
+ //Load views
+ public function loadView(string $bladeFile, array $data = []): self {
+
+ $this -> html = view($bladeFile, $data)->render();
+
+ return $this;
+ }
+
+ //Load HTML
+ public function loadHtml(string $html): self {
+
+ $this -> html = $html;
+
+ return $this;
+ }
+
+ public function loadUrl(string $url): self {
+
+ $this -> html = url($url);
+
+ return $this;
+ }
+
+ //Function to generate PDFs
+ public function generate(): Browsershot {
+ return $this->pdfGenerator
+ ->html($this->html)
+ ->format('A4')
+ ->margins(10, 20, 10, 20)
+ ->showBrowserHeaderAndFooter()
+ ->headerHtml($this->headerHtml)
+ ->footerHtml($this->footerHtml)
+ ->waitUntilNetworkIdle();
+ }
+
+ //Function to save to server in public folder
+ public function save(string $path): void {
+ $this->generate()->savePdf($path);
+ }
+
+ //Function to save the PDF to client with specific filename
+ public function download(string $filename) {
+
+
+ $pdf = $this->generate()->pdf();
+
+ return new Response($pdf, 200, [
+ 'Content-Type' => 'application/pdf',
+ 'Content-Disposition' => 'attachment; filename="'.$filename.'"',
+ 'Content-Length' => strlen($pdf)
+ ]);
+ }
+
+ //Function to view PDF in browser
+ public function stream(string $filename) {
+
+ $pdf = $this->generate()->pdf();
+
+ return new Response($pdf, 200, [
+ 'Content-Type' => 'application/pdf',
+ 'Content-Disposition' => 'inline; filename="'.$filename.'"'
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index bcefad72..51df3100 100755
--- a/composer.json
+++ b/composer.json
@@ -17,6 +17,7 @@
"mpdf/mpdf": "^8.2",
"phpoffice/phpspreadsheet": "^1.28",
"pusher/pusher-php-server": "^7.2",
+ "spatie/browsershot": "^3.61",
"symfony/http-client": "^6.2",
"symfony/mailgun-mailer": "^6.2",
"yajra/laravel-datatables-buttons": "^10.0",
diff --git a/composer.lock b/composer.lock
index fcc1fa19..c1e2d064 100755
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "bec9ae8c06db2580f37676b2de97f247",
+ "content-hash": "557733bf0784d12de8493b146ae51544",
"packages": [
{
"name": "bacon/bacon-qr-code",
@@ -1356,6 +1356,90 @@
],
"time": "2021-10-07T12:57:01+00:00"
},
+ {
+ "name": "intervention/image",
+ "version": "2.7.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Intervention/image.git",
+ "reference": "04be355f8d6734c826045d02a1079ad658322dad"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad",
+ "reference": "04be355f8d6734c826045d02a1079ad658322dad",
+ "shasum": ""
+ },
+ "require": {
+ "ext-fileinfo": "*",
+ "guzzlehttp/psr7": "~1.1 || ^2.0",
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "~0.9.2",
+ "phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15"
+ },
+ "suggest": {
+ "ext-gd": "to use GD library based image processing.",
+ "ext-imagick": "to use Imagick based image processing.",
+ "intervention/imagecache": "Caching extension for the Intervention Image library"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.4-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Intervention\\Image\\ImageServiceProvider"
+ ],
+ "aliases": {
+ "Image": "Intervention\\Image\\Facades\\Image"
+ }
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Intervention\\Image\\": "src/Intervention/Image"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Oliver Vogel",
+ "email": "oliver@intervention.io",
+ "homepage": "https://intervention.io/"
+ }
+ ],
+ "description": "Image handling and manipulation library with support for Laravel integration",
+ "homepage": "http://image.intervention.io/",
+ "keywords": [
+ "gd",
+ "image",
+ "imagick",
+ "laravel",
+ "thumbnail",
+ "watermark"
+ ],
+ "support": {
+ "issues": "https://github.com/Intervention/image/issues",
+ "source": "https://github.com/Intervention/image/tree/2.7.2"
+ },
+ "funding": [
+ {
+ "url": "https://paypal.me/interventionio",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/Intervention",
+ "type": "github"
+ }
+ ],
+ "time": "2022-05-21T17:30:32+00:00"
+ },
{
"name": "laravel/fortify",
"version": "v1.17.0",
@@ -2088,6 +2172,71 @@
],
"time": "2023-04-11T18:11:47+00:00"
},
+ {
+ "name": "league/glide",
+ "version": "2.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/thephpleague/glide.git",
+ "reference": "2ff92c8f1edc80b74e2d3c5efccfc7223f74d407"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/thephpleague/glide/zipball/2ff92c8f1edc80b74e2d3c5efccfc7223f74d407",
+ "reference": "2ff92c8f1edc80b74e2d3c5efccfc7223f74d407",
+ "shasum": ""
+ },
+ "require": {
+ "intervention/image": "^2.7",
+ "league/flysystem": "^2.0|^3.0",
+ "php": "^7.2|^8.0",
+ "psr/http-message": "^1.0|^2.0"
+ },
+ "require-dev": {
+ "mockery/mockery": "^1.3.3",
+ "phpunit/php-token-stream": "^3.1|^4.0",
+ "phpunit/phpunit": "^8.5|^9.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "League\\Glide\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Reinink",
+ "email": "jonathan@reinink.ca",
+ "homepage": "http://reinink.ca"
+ },
+ {
+ "name": "Titouan Galopin",
+ "email": "galopintitouan@gmail.com",
+ "homepage": "https://titouangalopin.com"
+ }
+ ],
+ "description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.",
+ "homepage": "http://glide.thephpleague.com",
+ "keywords": [
+ "ImageMagick",
+ "editing",
+ "gd",
+ "image",
+ "imagick",
+ "league",
+ "manipulation",
+ "processing"
+ ],
+ "support": {
+ "issues": "https://github.com/thephpleague/glide/issues",
+ "source": "https://github.com/thephpleague/glide/tree/2.3.0"
+ },
+ "time": "2023-07-08T06:26:07+00:00"
+ },
{
"name": "league/mime-type-detection",
"version": "1.11.0",
@@ -4634,6 +4783,257 @@
],
"time": "2023-12-11T16:03:32+00:00"
},
+ {
+ "name": "spatie/browsershot",
+ "version": "3.61.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/browsershot.git",
+ "reference": "14d75679390b8b84a71b3a17dc5905928deeb887"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/browsershot/zipball/14d75679390b8b84a71b3a17dc5905928deeb887",
+ "reference": "14d75679390b8b84a71b3a17dc5905928deeb887",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": "^8.0",
+ "spatie/image": "^1.5.3|^2.0",
+ "spatie/temporary-directory": "^1.1|^2.0",
+ "symfony/process": "^4.2|^5.0|^6.0|^7.0"
+ },
+ "require-dev": {
+ "pestphp/pest": "^1.20",
+ "spatie/phpunit-snapshot-assertions": "^4.2.3"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\Browsershot\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://github.com/freekmurze",
+ "role": "Developer"
+ }
+ ],
+ "description": "Convert a webpage to an image or pdf using headless Chrome",
+ "homepage": "https://github.com/spatie/browsershot",
+ "keywords": [
+ "chrome",
+ "convert",
+ "headless",
+ "image",
+ "pdf",
+ "puppeteer",
+ "screenshot",
+ "webpage"
+ ],
+ "support": {
+ "source": "https://github.com/spatie/browsershot/tree/3.61.0"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-21T10:00:28+00:00"
+ },
+ {
+ "name": "spatie/image",
+ "version": "2.2.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/image.git",
+ "reference": "2f802853aab017aa615224daae1588054b5ab20e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/image/zipball/2f802853aab017aa615224daae1588054b5ab20e",
+ "reference": "2f802853aab017aa615224daae1588054b5ab20e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-exif": "*",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "league/glide": "^2.2.2",
+ "php": "^8.0",
+ "spatie/image-optimizer": "^1.7",
+ "spatie/temporary-directory": "^1.0|^2.0",
+ "symfony/process": "^3.0|^4.0|^5.0|^6.0"
+ },
+ "require-dev": {
+ "pestphp/pest": "^1.22",
+ "phpunit/phpunit": "^9.5",
+ "symfony/var-dumper": "^4.0|^5.0|^6.0",
+ "vimeo/psalm": "^4.6"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\Image\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Manipulate images with an expressive API",
+ "homepage": "https://github.com/spatie/image",
+ "keywords": [
+ "image",
+ "spatie"
+ ],
+ "support": {
+ "source": "https://github.com/spatie/image/tree/2.2.7"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2023-07-24T13:54:13+00:00"
+ },
+ {
+ "name": "spatie/image-optimizer",
+ "version": "1.7.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/image-optimizer.git",
+ "reference": "ed39c7bfce7a2ecf676174a2d4286ab3a1c4f4f7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/ed39c7bfce7a2ecf676174a2d4286ab3a1c4f4f7",
+ "reference": "ed39c7bfce7a2ecf676174a2d4286ab3a1c4f4f7",
+ "shasum": ""
+ },
+ "require": {
+ "ext-fileinfo": "*",
+ "php": "^7.3|^8.0",
+ "psr/log": "^1.0 | ^2.0 | ^3.0",
+ "symfony/process": "^4.2|^5.0|^6.0|^7.0"
+ },
+ "require-dev": {
+ "pestphp/pest": "^1.21",
+ "phpunit/phpunit": "^8.5.21|^9.4.4",
+ "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\ImageOptimizer\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Easily optimize images using PHP",
+ "homepage": "https://github.com/spatie/image-optimizer",
+ "keywords": [
+ "image-optimizer",
+ "spatie"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/image-optimizer/issues",
+ "source": "https://github.com/spatie/image-optimizer/tree/1.7.4"
+ },
+ "time": "2024-05-06T09:12:30+00:00"
+ },
+ {
+ "name": "spatie/temporary-directory",
+ "version": "2.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/temporary-directory.git",
+ "reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/temporary-directory/zipball/76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a",
+ "reference": "76949fa18f8e1a7f663fd2eaa1d00e0bcea0752a",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Spatie\\TemporaryDirectory\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Alex Vanderbist",
+ "email": "alex@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Easily create, use and destroy temporary directories",
+ "homepage": "https://github.com/spatie/temporary-directory",
+ "keywords": [
+ "php",
+ "spatie",
+ "temporary-directory"
+ ],
+ "support": {
+ "issues": "https://github.com/spatie/temporary-directory/issues",
+ "source": "https://github.com/spatie/temporary-directory/tree/2.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://spatie.be/open-source/support-us",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/spatie",
+ "type": "github"
+ }
+ ],
+ "time": "2023-12-25T11:46:58+00:00"
+ },
{
"name": "symfony/console",
"version": "v6.2.10",
diff --git a/node_modules/.bin/browsers b/node_modules/.bin/browsers
new file mode 120000
index 00000000..645bb71a
--- /dev/null
+++ b/node_modules/.bin/browsers
@@ -0,0 +1 @@
+../@puppeteer/browsers/lib/cjs/main-cli.js
\ No newline at end of file
diff --git a/node_modules/.bin/escodegen b/node_modules/.bin/escodegen
new file mode 120000
index 00000000..01a7c325
--- /dev/null
+++ b/node_modules/.bin/escodegen
@@ -0,0 +1 @@
+../escodegen/bin/escodegen.js
\ No newline at end of file
diff --git a/node_modules/.bin/esgenerate b/node_modules/.bin/esgenerate
new file mode 120000
index 00000000..7d0293e6
--- /dev/null
+++ b/node_modules/.bin/esgenerate
@@ -0,0 +1 @@
+../escodegen/bin/esgenerate.js
\ No newline at end of file
diff --git a/node_modules/.bin/esparse b/node_modules/.bin/esparse
new file mode 120000
index 00000000..7423b18b
--- /dev/null
+++ b/node_modules/.bin/esparse
@@ -0,0 +1 @@
+../esprima/bin/esparse.js
\ No newline at end of file
diff --git a/node_modules/.bin/esvalidate b/node_modules/.bin/esvalidate
new file mode 120000
index 00000000..16069eff
--- /dev/null
+++ b/node_modules/.bin/esvalidate
@@ -0,0 +1 @@
+../esprima/bin/esvalidate.js
\ No newline at end of file
diff --git a/node_modules/.bin/extract-zip b/node_modules/.bin/extract-zip
new file mode 120000
index 00000000..af9b5611
--- /dev/null
+++ b/node_modules/.bin/extract-zip
@@ -0,0 +1 @@
+../extract-zip/cli.js
\ No newline at end of file
diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml
new file mode 120000
index 00000000..9dbd010d
--- /dev/null
+++ b/node_modules/.bin/js-yaml
@@ -0,0 +1 @@
+../js-yaml/bin/js-yaml.js
\ No newline at end of file
diff --git a/node_modules/.bin/puppeteer b/node_modules/.bin/puppeteer
new file mode 120000
index 00000000..a5269bcd
--- /dev/null
+++ b/node_modules/.bin/puppeteer
@@ -0,0 +1 @@
+../puppeteer/lib/esm/puppeteer/node/cli.js
\ No newline at end of file
diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver
new file mode 120000
index 00000000..5aaadf42
--- /dev/null
+++ b/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver.js
\ No newline at end of file
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
index 896877e8..b693b25d 100644
--- a/node_modules/.package-lock.json
+++ b/node_modules/.package-lock.json
@@ -3,6 +3,40 @@
"lockfileVersion": 2,
"requires": true,
"packages": {
+ "node_modules/@babel/code-frame": {
+ "version": "7.24.2",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz",
+ "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==",
+ "dependencies": {
+ "@babel/highlight": "^7.24.2",
+ "picocolors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz",
+ "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.24.5",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz",
+ "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.24.5",
+ "chalk": "^2.4.2",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
"node_modules/@esbuild/linux-x64": {
"version": "0.18.20",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
@@ -19,6 +53,96 @@
"node": ">=12"
}
},
+ "node_modules/@puppeteer/browsers": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.2.3.tgz",
+ "integrity": "sha512-bJ0UBsk0ESOs6RFcLXOt99a3yTDcOKlzfjad+rhFwdaG1Lu/Wzq58GHYCDTlZ9z6mldf4g+NTb+TXEfe0PpnsQ==",
+ "dependencies": {
+ "debug": "4.3.4",
+ "extract-zip": "2.0.1",
+ "progress": "2.0.3",
+ "proxy-agent": "6.4.0",
+ "semver": "7.6.0",
+ "tar-fs": "3.0.5",
+ "unbzip2-stream": "1.4.3",
+ "yargs": "17.7.2"
+ },
+ "bin": {
+ "browsers": "lib/cjs/main-cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@tootallnate/quickjs-emscripten": {
+ "version": "0.23.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz",
+ "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="
+ },
+ "node_modules/@types/node": {
+ "version": "20.12.12",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
+ "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
+ "optional": true,
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@types/yauzl": {
+ "version": "2.10.3",
+ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz",
+ "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==",
+ "optional": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/agent-base": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
+ "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
+ "dependencies": {
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
+ },
+ "node_modules/ast-types": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
+ "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
+ "dependencies": {
+ "tslib": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
@@ -36,6 +160,170 @@
"proxy-from-env": "^1.1.0"
}
},
+ "node_modules/b4a": {
+ "version": "1.6.6",
+ "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz",
+ "integrity": "sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg=="
+ },
+ "node_modules/bare-events": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.2.2.tgz",
+ "integrity": "sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==",
+ "optional": true
+ },
+ "node_modules/bare-fs": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.0.tgz",
+ "integrity": "sha512-TNFqa1B4N99pds2a5NYHR15o0ZpdNKbAeKTE/+G6ED/UeOavv8RY3dr/Fu99HW3zU3pXpo2kDNO8Sjsm2esfOw==",
+ "optional": true,
+ "dependencies": {
+ "bare-events": "^2.0.0",
+ "bare-path": "^2.0.0",
+ "bare-stream": "^1.0.0"
+ }
+ },
+ "node_modules/bare-os": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.3.0.tgz",
+ "integrity": "sha512-oPb8oMM1xZbhRQBngTgpcQ5gXw6kjOaRsSWsIeNyRxGed2w/ARyP7ScBYpWR1qfX2E5rS3gBw6OWcSQo+s+kUg==",
+ "optional": true
+ },
+ "node_modules/bare-path": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.2.tgz",
+ "integrity": "sha512-o7KSt4prEphWUHa3QUwCxUI00R86VdjiuxmJK0iNVDHYPGo+HsDaVCnqCmPbf/MiW1ok8F4p3m8RTHlWk8K2ig==",
+ "optional": true,
+ "dependencies": {
+ "bare-os": "^2.1.0"
+ }
+ },
+ "node_modules/bare-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-1.0.0.tgz",
+ "integrity": "sha512-KhNUoDL40iP4gFaLSsoGE479t0jHijfYdIcxRn/XtezA2BaUD0NRf/JGRpsMq6dMNM+SrCrB0YSSo/5wBY4rOQ==",
+ "optional": true,
+ "dependencies": {
+ "streamx": "^2.16.1"
+ }
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/basic-ftp": {
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz",
+ "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==",
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/buffer-crc32": {
+ "version": "0.2.13",
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/chromium-bidi": {
+ "version": "0.5.19",
+ "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.5.19.tgz",
+ "integrity": "sha512-UA6zL77b7RYCjJkZBsZ0wlvCTD+jTjllZ8f6wdO4buevXgTZYjV+XLB9CiEa2OuuTGGTLnI7eN9I60YxuALGQg==",
+ "dependencies": {
+ "mitt": "3.0.1",
+ "urlpattern-polyfill": "10.0.0",
+ "zod": "3.22.4"
+ },
+ "peerDependencies": {
+ "devtools-protocol": "*"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
+ },
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -48,6 +336,68 @@
"node": ">= 0.8"
}
},
+ "node_modules/cosmiconfig": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz",
+ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==",
+ "dependencies": {
+ "env-paths": "^2.2.1",
+ "import-fresh": "^3.3.0",
+ "js-yaml": "^4.1.0",
+ "parse-json": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/d-fischer"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.9.5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/data-uri-to-buffer": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz",
+ "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==",
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/degenerator": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz",
+ "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==",
+ "dependencies": {
+ "ast-types": "^0.13.4",
+ "escodegen": "^2.1.0",
+ "esprima": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -57,6 +407,40 @@
"node": ">=0.4.0"
}
},
+ "node_modules/devtools-protocol": {
+ "version": "0.0.1273771",
+ "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1273771.tgz",
+ "integrity": "sha512-QDbb27xcTVReQQW/GHJsdQqGKwYBE7re7gxehj467kKP2DKuYBUj6i2k5LRiAC66J1yZG/9gsxooz/s9pcm0Og=="
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ },
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
"node_modules/esbuild": {
"version": "0.18.20",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
@@ -94,6 +478,102 @@
"@esbuild/win32-x64": "0.18.20"
}
},
+ "node_modules/escalade": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
+ "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/escodegen": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
+ "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
+ "dependencies": {
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2"
+ },
+ "bin": {
+ "escodegen": "bin/escodegen.js",
+ "esgenerate": "bin/esgenerate.js"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "optionalDependencies": {
+ "source-map": "~0.6.1"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/extract-zip": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+ "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+ "dependencies": {
+ "debug": "^4.1.1",
+ "get-stream": "^5.1.0",
+ "yauzl": "^2.10.0"
+ },
+ "bin": {
+ "extract-zip": "cli.js"
+ },
+ "engines": {
+ "node": ">= 10.17.0"
+ },
+ "optionalDependencies": {
+ "@types/yauzl": "^2.9.1"
+ }
+ },
+ "node_modules/fast-fifo": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
+ "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="
+ },
+ "node_modules/fd-slicer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+ "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
+ "dependencies": {
+ "pend": "~1.2.0"
+ }
+ },
"node_modules/follow-redirects": {
"version": "1.15.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
@@ -128,6 +608,188 @@
"node": ">= 6"
}
},
+ "node_modules/fs-extra": {
+ "version": "11.2.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
+ "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.14"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+ "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "dependencies": {
+ "pump": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/get-uri": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz",
+ "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==",
+ "dependencies": {
+ "basic-ftp": "^5.0.2",
+ "data-uri-to-buffer": "^6.0.2",
+ "debug": "^4.3.4",
+ "fs-extra": "^11.2.0"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "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=="
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/http-proxy-agent": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
+ "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",
+ "dependencies": {
+ "agent-base": "^7.1.0",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/https-proxy-agent": {
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz",
+ "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==",
+ "dependencies": {
+ "agent-base": "^7.0.2",
+ "debug": "4"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ip-address": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz",
+ "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==",
+ "dependencies": {
+ "jsbn": "1.1.0",
+ "sprintf-js": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 12"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg=="
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+ },
+ "node_modules/js-yaml": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/jsbn": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz",
+ "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
+ },
+ "node_modules/json-parse-even-better-errors": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
+ },
+ "node_modules/jsonfile": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
"node_modules/laravel-echo": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/laravel-echo/-/laravel-echo-1.16.1.tgz",
@@ -152,6 +814,19 @@
"vite": "^3.0.0 || ^4.0.0"
}
},
+ "node_modules/lines-and-columns": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
+ },
+ "node_modules/lru-cache": {
+ "version": "7.18.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz",
+ "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -173,6 +848,16 @@
"node": ">= 0.6"
}
},
+ "node_modules/mitt": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
+ "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="
+ },
+ "node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+ },
"node_modules/nanoid": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
@@ -191,11 +876,89 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
+ "node_modules/netmask": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
+ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/pac-proxy-agent": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz",
+ "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==",
+ "dependencies": {
+ "@tootallnate/quickjs-emscripten": "^0.23.0",
+ "agent-base": "^7.0.2",
+ "debug": "^4.3.4",
+ "get-uri": "^6.0.1",
+ "http-proxy-agent": "^7.0.0",
+ "https-proxy-agent": "^7.0.2",
+ "pac-resolver": "^7.0.0",
+ "socks-proxy-agent": "^8.0.2"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/pac-resolver": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz",
+ "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==",
+ "dependencies": {
+ "degenerator": "^5.0.0",
+ "netmask": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-json": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+ "dependencies": {
+ "@babel/code-frame": "^7.0.0",
+ "error-ex": "^1.3.1",
+ "json-parse-even-better-errors": "^2.3.0",
+ "lines-and-columns": "^1.1.6"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/pend": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="
+ },
"node_modules/picocolors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
- "dev": true
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
"node_modules/picomatch": {
"version": "2.3.1",
@@ -237,11 +1000,78 @@
"node": "^10 || ^12 || >=14"
}
},
+ "node_modules/progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/proxy-agent": {
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz",
+ "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==",
+ "dependencies": {
+ "agent-base": "^7.0.2",
+ "debug": "^4.3.4",
+ "http-proxy-agent": "^7.0.1",
+ "https-proxy-agent": "^7.0.3",
+ "lru-cache": "^7.14.1",
+ "pac-proxy-agent": "^7.0.1",
+ "proxy-from-env": "^1.1.0",
+ "socks-proxy-agent": "^8.0.2"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
- "dev": true
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
+ },
+ "node_modules/pump": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/puppeteer": {
+ "version": "22.8.2",
+ "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-22.8.2.tgz",
+ "integrity": "sha512-yNZmKZHhCtBAjwuzonMyzgXLYxnvR+tbpatuyMffK+zmag84xyqE2EvPEWV1FvDXwW3m+/PT4Zp4KLerWWydQQ==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "@puppeteer/browsers": "2.2.3",
+ "cosmiconfig": "9.0.0",
+ "devtools-protocol": "0.0.1273771",
+ "puppeteer-core": "22.8.2"
+ },
+ "bin": {
+ "puppeteer": "lib/esm/puppeteer/node/cli.js"
+ },
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/puppeteer-core": {
+ "version": "22.8.2",
+ "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.8.2.tgz",
+ "integrity": "sha512-Gg9jUdJeF+UDbYPhwD602ky1LeS+AXDksl6sludrti1b7Sv/U4ZGY1LFyejarkIBCSHiPWL9SngXKCNcdZWBgQ==",
+ "dependencies": {
+ "@puppeteer/browsers": "2.2.3",
+ "chromium-bidi": "0.5.19",
+ "debug": "4.3.4",
+ "devtools-protocol": "0.0.1273771",
+ "ws": "8.17.0"
+ },
+ "engines": {
+ "node": ">=18"
+ }
},
"node_modules/pusher-js": {
"version": "8.4.0-rc2",
@@ -251,6 +1081,27 @@
"tweetnacl": "^1.0.3"
}
},
+ "node_modules/queue-tick": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
+ "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag=="
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "engines": {
+ "node": ">=4"
+ }
+ },
"node_modules/rollup": {
"version": "3.29.4",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
@@ -267,6 +1118,75 @@
"fsevents": "~2.3.2"
}
},
+ "node_modules/semver": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
+ "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/semver/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/smart-buffer": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
+ "engines": {
+ "node": ">= 6.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks": {
+ "version": "2.8.3",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz",
+ "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==",
+ "dependencies": {
+ "ip-address": "^9.0.5",
+ "smart-buffer": "^4.2.0"
+ },
+ "engines": {
+ "node": ">= 10.0.0",
+ "npm": ">= 3.0.0"
+ }
+ },
+ "node_modules/socks-proxy-agent": {
+ "version": "8.0.3",
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz",
+ "integrity": "sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==",
+ "dependencies": {
+ "agent-base": "^7.1.1",
+ "debug": "^4.3.4",
+ "socks": "^2.7.1"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "optional": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/source-map-js": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
@@ -276,11 +1196,124 @@
"node": ">=0.10.0"
}
},
+ "node_modules/sprintf-js": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz",
+ "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA=="
+ },
+ "node_modules/streamx": {
+ "version": "2.16.1",
+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.16.1.tgz",
+ "integrity": "sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==",
+ "dependencies": {
+ "fast-fifo": "^1.1.0",
+ "queue-tick": "^1.0.1"
+ },
+ "optionalDependencies": {
+ "bare-events": "^2.2.0"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/tar-fs": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.5.tgz",
+ "integrity": "sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==",
+ "dependencies": {
+ "pump": "^3.0.0",
+ "tar-stream": "^3.1.5"
+ },
+ "optionalDependencies": {
+ "bare-fs": "^2.1.1",
+ "bare-path": "^2.1.0"
+ }
+ },
+ "node_modules/tar-stream": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz",
+ "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==",
+ "dependencies": {
+ "b4a": "^1.6.4",
+ "fast-fifo": "^1.2.0",
+ "streamx": "^2.15.0"
+ }
+ },
+ "node_modules/through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ },
"node_modules/tweetnacl": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
},
+ "node_modules/unbzip2-stream": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
+ "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
+ "dependencies": {
+ "buffer": "^5.2.1",
+ "through": "^2.3.8"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "optional": true
+ },
+ "node_modules/universalify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
+ "node_modules/urlpattern-polyfill": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz",
+ "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg=="
+ },
"node_modules/vite": {
"version": "4.5.3",
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.3.tgz",
@@ -345,6 +1378,132 @@
"picocolors": "^1.0.0",
"picomatch": "^2.3.1"
}
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
+ },
+ "node_modules/ws": {
+ "version": "8.17.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz",
+ "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yauzl": {
+ "version": "2.10.0",
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+ "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
+ "dependencies": {
+ "buffer-crc32": "~0.2.3",
+ "fd-slicer": "~1.1.0"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.22.4",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz",
+ "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
}
}
}
diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE
new file mode 100644
index 00000000..f31575ec
--- /dev/null
+++ b/node_modules/@babel/code-frame/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie 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/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md
new file mode 100644
index 00000000..71607551
--- /dev/null
+++ b/node_modules/@babel/code-frame/README.md
@@ -0,0 +1,19 @@
+# @babel/code-frame
+
+> Generate errors that contain a code frame that point to source locations.
+
+See our website [@babel/code-frame](https://babeljs.io/docs/babel-code-frame) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/code-frame
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/code-frame --dev
+```
diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js
new file mode 100644
index 00000000..85ef5d6c
--- /dev/null
+++ b/node_modules/@babel/code-frame/lib/index.js
@@ -0,0 +1,156 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.codeFrameColumns = codeFrameColumns;
+exports.default = _default;
+var _highlight = require("@babel/highlight");
+var _picocolors = _interopRequireWildcard(require("picocolors"), true);
+function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
+function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
+const colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
+const compose = (f, g) => v => f(g(v));
+let pcWithForcedColor = undefined;
+function getColors(forceColor) {
+ if (forceColor) {
+ var _pcWithForcedColor;
+ (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
+ return pcWithForcedColor;
+ }
+ return colors;
+}
+let deprecationWarningShown = false;
+function getDefs(colors) {
+ return {
+ gutter: colors.gray,
+ marker: compose(colors.red, colors.bold),
+ message: compose(colors.red, colors.bold)
+ };
+}
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+function getMarkerLines(loc, source, opts) {
+ const startLoc = Object.assign({
+ column: 0,
+ line: -1
+ }, loc.start);
+ const endLoc = Object.assign({}, startLoc, loc.end);
+ const {
+ linesAbove = 2,
+ linesBelow = 3
+ } = opts || {};
+ const startLine = startLoc.line;
+ const startColumn = startLoc.column;
+ const endLine = endLoc.line;
+ const endColumn = endLoc.column;
+ let start = Math.max(startLine - (linesAbove + 1), 0);
+ let end = Math.min(source.length, endLine + linesBelow);
+ if (startLine === -1) {
+ start = 0;
+ }
+ if (endLine === -1) {
+ end = source.length;
+ }
+ const lineDiff = endLine - startLine;
+ const markerLines = {};
+ if (lineDiff) {
+ for (let i = 0; i <= lineDiff; i++) {
+ const lineNumber = i + startLine;
+ if (!startColumn) {
+ markerLines[lineNumber] = true;
+ } else if (i === 0) {
+ const sourceLength = source[lineNumber - 1].length;
+ markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
+ } else if (i === lineDiff) {
+ markerLines[lineNumber] = [0, endColumn];
+ } else {
+ const sourceLength = source[lineNumber - i].length;
+ markerLines[lineNumber] = [0, sourceLength];
+ }
+ }
+ } else {
+ if (startColumn === endColumn) {
+ if (startColumn) {
+ markerLines[startLine] = [startColumn, 0];
+ } else {
+ markerLines[startLine] = true;
+ }
+ } else {
+ markerLines[startLine] = [startColumn, endColumn - startColumn];
+ }
+ }
+ return {
+ start,
+ end,
+ markerLines
+ };
+}
+function codeFrameColumns(rawLines, loc, opts = {}) {
+ const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
+ const colors = getColors(opts.forceColor);
+ const defs = getDefs(colors);
+ const maybeHighlight = (fmt, string) => {
+ return highlighted ? fmt(string) : string;
+ };
+ const lines = rawLines.split(NEWLINE);
+ const {
+ start,
+ end,
+ markerLines
+ } = getMarkerLines(loc, lines, opts);
+ const hasColumns = loc.start && typeof loc.start.column === "number";
+ const numberMaxWidth = String(end).length;
+ const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
+ let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
+ const number = start + 1 + index;
+ const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
+ const gutter = ` ${paddedNumber} |`;
+ const hasMarker = markerLines[number];
+ const lastMarkerLine = !markerLines[number + 1];
+ if (hasMarker) {
+ let markerLine = "";
+ if (Array.isArray(hasMarker)) {
+ const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
+ const numberOfMarkers = hasMarker[1] || 1;
+ markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
+ if (lastMarkerLine && opts.message) {
+ markerLine += " " + maybeHighlight(defs.message, opts.message);
+ }
+ }
+ return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
+ } else {
+ return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
+ }
+ }).join("\n");
+ if (opts.message && !hasColumns) {
+ frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
+ }
+ if (highlighted) {
+ return colors.reset(frame);
+ } else {
+ return frame;
+ }
+}
+function _default(rawLines, lineNumber, colNumber, opts = {}) {
+ if (!deprecationWarningShown) {
+ deprecationWarningShown = true;
+ const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
+ if (process.emitWarning) {
+ process.emitWarning(message, "DeprecationWarning");
+ } else {
+ const deprecationError = new Error(message);
+ deprecationError.name = "DeprecationWarning";
+ console.warn(new Error(message));
+ }
+ }
+ colNumber = Math.max(colNumber, 0);
+ const location = {
+ start: {
+ column: colNumber,
+ line: lineNumber
+ }
+ };
+ return codeFrameColumns(rawLines, location, opts);
+}
+
+//# sourceMappingURL=index.js.map
diff --git a/node_modules/@babel/code-frame/lib/index.js.map b/node_modules/@babel/code-frame/lib/index.js.map
new file mode 100644
index 00000000..eea8cca9
--- /dev/null
+++ b/node_modules/@babel/code-frame/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"names":["_highlight","require","_picocolors","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","colors","process","env","FORCE_COLOR","createColors","_colors","compose","f","g","v","pcWithForcedColor","undefined","getColors","forceColor","_pcWithForcedColor","deprecationWarningShown","getDefs","gutter","gray","marker","red","bold","message","NEWLINE","getMarkerLines","loc","source","opts","startLoc","assign","column","line","start","endLoc","end","linesAbove","linesBelow","startLine","startColumn","endLine","endColumn","Math","max","min","length","lineDiff","markerLines","lineNumber","sourceLength","codeFrameColumns","rawLines","highlighted","highlightCode","shouldHighlight","defs","maybeHighlight","fmt","string","lines","split","hasColumns","numberMaxWidth","String","highlightedLines","highlight","frame","slice","map","index","number","paddedNumber","hasMarker","lastMarkerLine","markerLine","Array","isArray","markerSpacing","replace","numberOfMarkers","repeat","join","reset","_default","colNumber","emitWarning","deprecationError","Error","name","console","warn","location"],"sources":["../src/index.ts"],"sourcesContent":["import highlight, { shouldHighlight } from \"@babel/highlight\";\n\nimport _colors, { createColors } from \"picocolors\";\nimport type { Colors, Formatter } from \"picocolors/types\";\n// See https://github.com/alexeyraspopov/picocolors/issues/62\nconst colors =\n typeof process === \"object\" &&\n (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\")\n ? createColors(false)\n : _colors;\n\nconst compose: (f: (gv: U) => V, g: (v: T) => U) => (v: T) => V =\n (f, g) => v =>\n f(g(v));\n\nlet pcWithForcedColor: Colors = undefined;\nfunction getColors(forceColor: boolean) {\n if (forceColor) {\n pcWithForcedColor ??= createColors(true);\n return pcWithForcedColor;\n }\n return colors;\n}\n\nlet deprecationWarningShown = false;\n\ntype Location = {\n column: number;\n line: number;\n};\n\ntype NodeLocation = {\n end?: Location;\n start: Location;\n};\n\nexport interface Options {\n /** Syntax highlight the code as JavaScript for terminals. default: false */\n highlightCode?: boolean;\n /** The number of lines to show above the error. default: 2 */\n linesAbove?: number;\n /** The number of lines to show below the error. default: 3 */\n linesBelow?: number;\n /**\n * Forcibly syntax highlight the code as JavaScript (for non-terminals);\n * overrides highlightCode.\n * default: false\n */\n forceColor?: boolean;\n /**\n * Pass in a string to be displayed inline (if possible) next to the\n * highlighted location in the code. If it can't be positioned inline,\n * it will be placed above the code frame.\n * default: nothing\n */\n message?: string;\n}\n\n/**\n * Styles for code frame token types.\n */\nfunction getDefs(colors: Colors) {\n return {\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold),\n };\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\n\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * Extract what lines should be marked and highlighted.\n */\n\ntype MarkerLines = Record;\n\nfunction getMarkerLines(\n loc: NodeLocation,\n source: Array,\n opts: Options,\n): {\n start: number;\n end: number;\n markerLines: MarkerLines;\n} {\n const startLoc: Location = {\n column: 0,\n line: -1,\n ...loc.start,\n };\n const endLoc: Location = {\n ...startLoc,\n ...loc.end,\n };\n const { linesAbove = 2, linesBelow = 3 } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n\n if (startLine === -1) {\n start = 0;\n }\n\n if (endLine === -1) {\n end = source.length;\n }\n\n const lineDiff = endLine - startLine;\n const markerLines: MarkerLines = {};\n\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n\n return { start, end, markerLines };\n}\n\nexport function codeFrameColumns(\n rawLines: string,\n loc: NodeLocation,\n opts: Options = {},\n): string {\n const highlighted =\n (opts.highlightCode || opts.forceColor) && shouldHighlight(opts);\n const colors = getColors(opts.forceColor);\n const defs = getDefs(colors);\n const maybeHighlight = (fmt: Formatter, string: string) => {\n return highlighted ? fmt(string) : string;\n };\n const lines = rawLines.split(NEWLINE);\n const { start, end, markerLines } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n\n const numberMaxWidth = String(end).length;\n\n const highlightedLines = highlighted ? highlight(rawLines, opts) : rawLines;\n\n let frame = highlightedLines\n .split(NEWLINE, end)\n .slice(start, end)\n .map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line\n .slice(0, Math.max(hasMarker[0] - 1, 0))\n .replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n\n markerLine = [\n \"\\n \",\n maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")),\n \" \",\n markerSpacing,\n maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers),\n ].join(\"\");\n\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n return [\n maybeHighlight(defs.marker, \">\"),\n maybeHighlight(defs.gutter, gutter),\n line.length > 0 ? ` ${line}` : \"\",\n markerLine,\n ].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${\n line.length > 0 ? ` ${line}` : \"\"\n }`;\n }\n })\n .join(\"\\n\");\n\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n\n if (highlighted) {\n return colors.reset(frame);\n } else {\n return frame;\n }\n}\n\n/**\n * Create a code frame, adding line numbers, code highlighting, and pointing to a given position.\n */\n\nexport default function (\n rawLines: string,\n lineNumber: number,\n colNumber?: number | null,\n opts: Options = {},\n): string {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n\n const message =\n \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n\n if (process.emitWarning) {\n // A string is directly supplied to emitWarning, because when supplying an\n // Error object node throws in the tests because of different contexts\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n\n colNumber = Math.max(colNumber, 0);\n\n const location: NodeLocation = {\n start: { column: colNumber, line: lineNumber },\n };\n\n return codeFrameColumns(rawLines, location, opts);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAmD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CA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EAAC;IACJ;EACF,CAAC,CAAC,CACDiD,IAAI,CAAC,IAAI,CAAC;EAEb,IAAIrD,IAAI,CAACL,OAAO,IAAI,CAACsC,UAAU,EAAE;IAC/BK,KAAK,GAAI,GAAE,GAAG,CAACc,MAAM,CAAClB,cAAc,GAAG,CAAC,CAAE,GAAElC,IAAI,CAACL,OAAQ,KAAI2C,KAAM,EAAC;EACtE;EAEA,IAAId,WAAW,EAAE;IACf,OAAOnD,MAAM,CAACiF,KAAK,CAAChB,KAAK,CAAC;EAC5B,CAAC,MAAM;IACL,OAAOA,KAAK;EACd;AACF;AAMe,SAAAiB,SACbhC,QAAgB,EAChBH,UAAkB,EAClBoC,SAAyB,EACzBxD,IAAa,GAAG,CAAC,CAAC,EACV;EACR,IAAI,CAACZ,uBAAuB,EAAE;IAC5BA,uBAAuB,GAAG,IAAI;IAE9B,MAAMO,OAAO,GACX,qGAAqG;IAEvG,IAAIrB,OAAO,CAACmF,WAAW,EAAE;MAGvBnF,OAAO,CAACmF,WAAW,CAAC9D,OAAO,EAAE,oBAAoB,CAAC;IACpD,CAAC,MAAM;MACL,MAAM+D,gBAAgB,GAAG,IAAIC,KAAK,CAAChE,OAAO,CAAC;MAC3C+D,gBAAgB,CAACE,IAAI,GAAG,oBAAoB;MAC5CC,OAAO,CAACC,IAAI,CAAC,IAAIH,KAAK,CAAChE,OAAO,CAAC,CAAC;IAClC;EACF;EAEA6D,SAAS,GAAG1C,IAAI,CAACC,GAAG,CAACyC,SAAS,EAAE,CAAC,CAAC;EAElC,MAAMO,QAAsB,GAAG;IAC7B1D,KAAK,EAAE;MAAEF,MAAM,EAAEqD,SAAS;MAAEpD,IAAI,EAAEgB;IAAW;EAC/C,CAAC;EAED,OAAOE,gBAAgB,CAACC,QAAQ,EAAEwC,QAAQ,EAAE/D,IAAI,CAAC;AACnD","ignoreList":[]}
\ No newline at end of file
diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json
new file mode 100644
index 00000000..a644fc00
--- /dev/null
+++ b/node_modules/@babel/code-frame/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@babel/code-frame",
+ "version": "7.24.2",
+ "description": "Generate errors that contain a code frame that point to source locations.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-code-frame",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-code-frame"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/highlight": "^7.24.2",
+ "picocolors": "^1.0.0"
+ },
+ "devDependencies": {
+ "import-meta-resolve": "^4.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "type": "commonjs"
+}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE
new file mode 100644
index 00000000..f31575ec
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie 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/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md
new file mode 100644
index 00000000..05c19e64
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-validator-identifier
+
+> Validate identifier/keywords name
+
+See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/babel-helper-validator-identifier) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-validator-identifier
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-validator-identifier
+```
diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js
new file mode 100644
index 00000000..8ef83036
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js
@@ -0,0 +1,70 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isIdentifierChar = isIdentifierChar;
+exports.isIdentifierName = isIdentifierName;
+exports.isIdentifierStart = isIdentifierStart;
+let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const 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, 68, 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, 349, 41, 7, 1, 79, 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, 159, 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, 264, 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, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 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, 757, 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];
+const 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, 370, 1, 81, 2, 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, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 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, 406, 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, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 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, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+function isInAstralSet(code, set) {
+ let pos = 0x10000;
+ for (let i = 0, length = set.length; i < length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+ return false;
+}
+function isIdentifierStart(code) {
+ if (code < 65) return code === 36;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ }
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+function isIdentifierChar(code) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ }
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+function isIdentifierName(name) {
+ let isFirst = true;
+ for (let i = 0; i < name.length; i++) {
+ let cp = name.charCodeAt(i);
+ if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
+ const trail = name.charCodeAt(++i);
+ if ((trail & 0xfc00) === 0xdc00) {
+ cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
+ }
+ }
+ if (isFirst) {
+ isFirst = false;
+ if (!isIdentifierStart(cp)) {
+ return false;
+ }
+ } else if (!isIdentifierChar(cp)) {
+ return false;
+ }
+ }
+ return !isFirst;
+}
+
+//# sourceMappingURL=identifier.js.map
diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
new file mode 100644
index 00000000..dc8aeced
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map
@@ -0,0 +1 @@
+{"version":3,"names":["nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","RegExp","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","code","set","pos","i","length","isIdentifierStart","test","String","fromCharCode","isIdentifierChar","isIdentifierName","name","isFirst","cp","charCodeAt","trail"],"sources":["../src/identifier.ts"],"sourcesContent":["import * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u09fc\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0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6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f8\\u1700-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2118-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309b-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab69\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0cf3\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ece\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\u30fb\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\\uff65\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\nconst 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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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];\n/* prettier-ignore */\nconst 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,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n"],"mappings":";;;;;;;;AAWA,IAAIA,4BAA4B,GAAG,8qIAA8qI;AAEjtI,IAAIC,uBAAuB,GAAG,2lFAA2lF;AAEznF,MAAMC,uBAAuB,GAAG,IAAIC,MAAM,CACxC,GAAG,GAAGH,4BAA4B,GAAG,GACvC,CAAC;AACD,MAAMI,kBAAkB,GAAG,IAAID,MAAM,CACnC,GAAG,GAAGH,4BAA4B,GAAGC,uBAAuB,GAAG,GACjE,CAAC;AAEDD,4BAA4B,GAAGC,uBAAuB,GAAG,IAAI;AAQ7D,MAAMI,0BAA0B,GAAG,CAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,CAAC,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,EAAC,CAAC,EAAC,EAAE,E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AACC,YAAY,CAACR,IAAI,CAAC,CAAC;EAC3E;EACA,OACED,aAAa,CAACC,IAAI,EAAEH,0BAA0B,CAAC,IAC/CE,aAAa,CAACC,IAAI,EAAEF,qBAAqB,CAAC;AAE9C;AAIO,SAASY,gBAAgBA,CAACC,IAAY,EAAW;EACtD,IAAIC,OAAO,GAAG,IAAI;EAClB,KAAK,IAAIT,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAED,CAAC,EAAE,EAAE;IAKpC,IAAIU,EAAE,GAAGF,IAAI,CAACG,UAAU,CAACX,CAAC,CAAC;IAC3B,IAAI,CAACU,EAAE,GAAG,MAAM,MAAM,MAAM,IAAIV,CAAC,GAAG,CAAC,GAAGQ,IAAI,CAACP,MAAM,EAAE;MACnD,MAAMW,KAAK,GAAGJ,IAAI,CAACG,UAAU,CAAC,EAAEX,CAAC,CAAC;MAClC,IAAI,CAACY,KAAK,GAAG,MAAM,MAAM,MAAM,EAAE;QAC/BF,EAAE,GAAG,OAAO,IAAI,CAACA,EAAE,GAAG,KAAK,KAAK,EAAE,CAAC,IAAIE,KAAK,GAAG,KAAK,CAAC;MACvD;IACF;IACA,IAAIH,OAAO,EAAE;MACXA,OAAO,GAAG,KAAK;MACf,IAAI,CAACP,iBAAiB,CAACQ,EAAE,CAAC,EAAE;QAC1B,OAAO,KAAK;MACd;IACF,CAAC,MAAM,IAAI,CAACJ,gBAAgB,CAACI,EAAE,CAAC,EAAE;MAChC,OAAO,KAAK;IACd;EACF;EACA,OAAO,CAACD,OAAO;AACjB","ignoreList":[]}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js
new file mode 100644
index 00000000..76b22822
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/index.js
@@ -0,0 +1,57 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "isIdentifierChar", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierChar;
+ }
+});
+Object.defineProperty(exports, "isIdentifierName", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierName;
+ }
+});
+Object.defineProperty(exports, "isIdentifierStart", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierStart;
+ }
+});
+Object.defineProperty(exports, "isKeyword", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isKeyword;
+ }
+});
+Object.defineProperty(exports, "isReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindOnlyReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictReservedWord;
+ }
+});
+var _identifier = require("./identifier.js");
+var _keyword = require("./keyword.js");
+
+//# sourceMappingURL=index.js.map
diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js.map b/node_modules/@babel/helper-validator-identifier/lib/index.js.map
new file mode 100644
index 00000000..d985f3b9
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"names":["_identifier","require","_keyword"],"sources":["../src/index.ts"],"sourcesContent":["export {\n isIdentifierName,\n isIdentifierChar,\n isIdentifierStart,\n} from \"./identifier.ts\";\nexport {\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"./keyword.ts\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA","ignoreList":[]}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js
new file mode 100644
index 00000000..054cf847
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js
@@ -0,0 +1,35 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isKeyword = isKeyword;
+exports.isReservedWord = isReservedWord;
+exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
+exports.isStrictBindReservedWord = isStrictBindReservedWord;
+exports.isStrictReservedWord = isStrictReservedWord;
+const reservedWords = {
+ keyword: ["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"],
+ strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
+ strictBind: ["eval", "arguments"]
+};
+const keywords = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
+function isReservedWord(word, inModule) {
+ return inModule && word === "await" || word === "enum";
+}
+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);
+}
+function isKeyword(word) {
+ return keywords.has(word);
+}
+
+//# sourceMappingURL=keyword.js.map
diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
new file mode 100644
index 00000000..3471f78c
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map
@@ -0,0 +1 @@
+{"version":3,"names":["reservedWords","keyword","strict","strictBind","keywords","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","has","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword"],"sources":["../src/keyword.ts"],"sourcesContent":["const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n"],"mappings":";;;;;;;;;;AAAA,MAAMA,aAAa,GAAG;EACpBC,OAAO,EAAE,CACP,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,IAAI,EACJ,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,CACT;EACDC,MAAM,EAAE,CACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR;EACDC,UAAU,EAAE,CAAC,MAAM,EAAE,WAAW;AAClC,CAAC;AACD,MAAMC,QAAQ,GAAG,IAAIC,GAAG,CAACL,aAAa,CAACC,OAAO,CAAC;AAC/C,MAAMK,sBAAsB,GAAG,IAAID,GAAG,CAACL,aAAa,CAACE,MAAM,CAAC;AAC5D,MAAMK,0BAA0B,GAAG,IAAIF,GAAG,CAACL,aAAa,CAACG,UAAU,CAAC;AAK7D,SAASK,cAAcA,CAACC,IAAY,EAAEC,QAAiB,EAAW;EACvE,OAAQA,QAAQ,IAAID,IAAI,KAAK,OAAO,IAAKA,IAAI,KAAK,MAAM;AAC1D;AAOO,SAASE,oBAAoBA,CAACF,IAAY,EAAEC,QAAiB,EAAW;EAC7E,OAAOF,cAAc,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIJ,sBAAsB,CAACM,GAAG,CAACH,IAAI,CAAC;AAC3E;AAMO,SAASI,4BAA4BA,CAACJ,IAAY,EAAW;EAClE,OAAOF,0BAA0B,CAACK,GAAG,CAACH,IAAI,CAAC;AAC7C;AAOO,SAASK,wBAAwBA,CACtCL,IAAY,EACZC,QAAiB,EACR;EACT,OACEC,oBAAoB,CAACF,IAAI,EAAEC,QAAQ,CAAC,IAAIG,4BAA4B,CAACJ,IAAI,CAAC;AAE9E;AAEO,SAASM,SAASA,CAACN,IAAY,EAAW;EAC/C,OAAOL,QAAQ,CAACQ,GAAG,CAACH,IAAI,CAAC;AAC3B","ignoreList":[]}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json
new file mode 100644
index 00000000..9f509b6e
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@babel/helper-validator-identifier",
+ "version": "7.24.5",
+ "description": "Validate identifier/keywords name",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-validator-identifier"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "exports": {
+ ".": "./lib/index.js",
+ "./package.json": "./package.json"
+ },
+ "devDependencies": {
+ "@unicode/unicode-15.1.0": "^1.5.2",
+ "charcodes": "^0.2.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)",
+ "type": "commonjs"
+}
\ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
new file mode 100644
index 00000000..f3fd9e9a
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
@@ -0,0 +1,73 @@
+"use strict";
+
+// Always use the latest available version of Unicode!
+// https://tc39.github.io/ecma262/#sec-conformance
+const version = "15.1.0";
+
+const start = require(
+ "@unicode/unicode-" + version + "/Binary_Property/ID_Start/code-points.js"
+).filter(function (ch) {
+ return ch > 0x7f;
+});
+let last = -1;
+const cont = require(
+ "@unicode/unicode-" + version + "/Binary_Property/ID_Continue/code-points.js"
+).filter(function (ch) {
+ return ch > 0x7f && search(start, ch, last + 1) === -1;
+});
+
+function search(arr, ch, starting) {
+ for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
+ if (arr[i] === ch) return i;
+ }
+ return -1;
+}
+
+function pad(str, width) {
+ while (str.length < width) str = "0" + str;
+ return str;
+}
+
+function esc(code) {
+ const hex = code.toString(16);
+ if (hex.length <= 2) return "\\x" + pad(hex, 2);
+ else return "\\u" + pad(hex, 4);
+}
+
+function generate(chars) {
+ const astral = [];
+ let re = "";
+ for (let i = 0, at = 0x10000; i < chars.length; i++) {
+ const from = chars[i];
+ let to = from;
+ while (i < chars.length - 1 && chars[i + 1] === to + 1) {
+ i++;
+ to++;
+ }
+ if (to <= 0xffff) {
+ if (from === to) re += esc(from);
+ else if (from + 1 === to) re += esc(from) + esc(to);
+ else re += esc(from) + "-" + esc(to);
+ } else {
+ astral.push(from - at, to - from);
+ at = to;
+ }
+ }
+ return { nonASCII: re, astral: astral };
+}
+
+const startData = generate(start);
+const contData = generate(cont);
+
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"
+);
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"
+);
diff --git a/node_modules/@babel/highlight/LICENSE b/node_modules/@babel/highlight/LICENSE
new file mode 100644
index 00000000..f31575ec
--- /dev/null
+++ b/node_modules/@babel/highlight/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie 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/@babel/highlight/README.md b/node_modules/@babel/highlight/README.md
new file mode 100644
index 00000000..4c2ec874
--- /dev/null
+++ b/node_modules/@babel/highlight/README.md
@@ -0,0 +1,19 @@
+# @babel/highlight
+
+> Syntax highlight JavaScript strings for output in terminals.
+
+See our website [@babel/highlight](https://babeljs.io/docs/babel-highlight) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/highlight
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/highlight --dev
+```
diff --git a/node_modules/@babel/highlight/lib/index.js b/node_modules/@babel/highlight/lib/index.js
new file mode 100644
index 00000000..944a0433
--- /dev/null
+++ b/node_modules/@babel/highlight/lib/index.js
@@ -0,0 +1,119 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = highlight;
+exports.shouldHighlight = shouldHighlight;
+var _jsTokens = require("js-tokens");
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+var _picocolors = _interopRequireWildcard(require("picocolors"), true);
+function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
+function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
+const colors = typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? (0, _picocolors.createColors)(false) : _picocolors.default;
+const compose = (f, g) => v => f(g(v));
+const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
+function getDefs(colors) {
+ return {
+ keyword: colors.cyan,
+ capitalized: colors.yellow,
+ jsxIdentifier: colors.yellow,
+ punctuator: colors.yellow,
+ number: colors.magenta,
+ string: colors.green,
+ regex: colors.magenta,
+ comment: colors.gray,
+ invalid: compose(compose(colors.white, colors.bgRed), colors.bold)
+ };
+}
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+const BRACKET = /^[()[\]{}]$/;
+let tokenize;
+{
+ const JSX_TAG = /^[a-z][\w-]*$/i;
+ const getTokenType = function (token, offset, text) {
+ if (token.type === "name") {
+ if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
+ return "keyword";
+ }
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "")) {
+ return "jsxIdentifier";
+ }
+ if (token.value[0] !== token.value[0].toLowerCase()) {
+ return "capitalized";
+ }
+ }
+ if (token.type === "punctuator" && BRACKET.test(token.value)) {
+ return "bracket";
+ }
+ if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
+ return "punctuator";
+ }
+ return token.type;
+ };
+ tokenize = function* (text) {
+ let match;
+ while (match = _jsTokens.default.exec(text)) {
+ const token = _jsTokens.matchToToken(match);
+ yield {
+ type: getTokenType(token, match.index, text),
+ value: token.value
+ };
+ }
+ };
+}
+function highlightTokens(defs, text) {
+ let highlighted = "";
+ for (const {
+ type,
+ value
+ } of tokenize(text)) {
+ const colorize = defs[type];
+ if (colorize) {
+ highlighted += value.split(NEWLINE).map(str => colorize(str)).join("\n");
+ } else {
+ highlighted += value;
+ }
+ }
+ return highlighted;
+}
+function shouldHighlight(options) {
+ return colors.isColorSupported || options.forceColor;
+}
+let pcWithForcedColor = undefined;
+function getColors(forceColor) {
+ if (forceColor) {
+ var _pcWithForcedColor;
+ (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);
+ return pcWithForcedColor;
+ }
+ return colors;
+}
+function highlight(code, options = {}) {
+ if (code !== "" && shouldHighlight(options)) {
+ const defs = getDefs(getColors(options.forceColor));
+ return highlightTokens(defs, code);
+ } else {
+ return code;
+ }
+}
+{
+ let chalk, chalkWithForcedColor;
+ exports.getChalk = ({
+ forceColor
+ }) => {
+ var _chalk;
+ (_chalk = chalk) != null ? _chalk : chalk = require("chalk");
+ if (forceColor) {
+ var _chalkWithForcedColor;
+ (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk.constructor({
+ enabled: true,
+ level: 1
+ });
+ return chalkWithForcedColor;
+ }
+ return chalk;
+ };
+}
+
+//# sourceMappingURL=index.js.map
diff --git a/node_modules/@babel/highlight/lib/index.js.map b/node_modules/@babel/highlight/lib/index.js.map
new file mode 100644
index 00000000..1672cd50
--- /dev/null
+++ b/node_modules/@babel/highlight/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"names":["_jsTokens","require","_helperValidatorIdentifier","_picocolors","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","colors","process","env","FORCE_COLOR","createColors","_colors","compose","f","g","v","sometimesKeywords","Set","getDefs","keyword","cyan","capitalized","yellow","jsxIdentifier","punctuator","number","magenta","string","green","regex","comment","gray","invalid","white","bgRed","bold","NEWLINE","BRACKET","tokenize","JSX_TAG","getTokenType","token","offset","text","type","isKeyword","value","isStrictReservedWord","test","slice","toLowerCase","match","jsTokens","exec","matchToToken","index","highlightTokens","defs","highlighted","colorize","split","map","str","join","shouldHighlight","options","isColorSupported","forceColor","pcWithForcedColor","undefined","getColors","_pcWithForcedColor","highlight","code","chalk","chalkWithForcedColor","exports","getChalk","_chalk","_chalkWithForcedColor","constructor","enabled","level"],"sources":["../src/index.ts"],"sourcesContent":["import type { Token as JSToken, JSXToken } from \"js-tokens\";\nimport jsTokens from \"js-tokens\";\n\nimport {\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nimport _colors, { createColors } from \"picocolors\";\nimport type { Colors, Formatter } from \"picocolors/types\";\n// See https://github.com/alexeyraspopov/picocolors/issues/62\nconst colors =\n typeof process === \"object\" &&\n (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\")\n ? createColors(false)\n : _colors;\n\nconst compose: (f: (gv: U) => V, g: (v: T) => U) => (v: T) => V =\n (f, g) => v =>\n f(g(v));\n\n/**\n * Names that are always allowed as identifiers, but also appear as keywords\n * within certain syntactic productions.\n *\n * https://tc39.es/ecma262/#sec-keywords-and-reserved-words\n *\n * `target` has been omitted since it is very likely going to be a false\n * positive.\n */\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\n\ntype InternalTokenType =\n | \"keyword\"\n | \"capitalized\"\n | \"jsxIdentifier\"\n | \"punctuator\"\n | \"number\"\n | \"string\"\n | \"regex\"\n | \"comment\"\n | \"invalid\";\n\ntype Token = {\n type: InternalTokenType | \"uncolored\";\n value: string;\n};\n/**\n * Styles for token types.\n */\nfunction getDefs(colors: Colors): Record {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold),\n };\n}\n\n/**\n * RegExp to test for newlines in terminal.\n */\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\n\n/**\n * RegExp to test for the three types of brackets.\n */\nconst BRACKET = /^[()[\\]{}]$/;\n\nlet tokenize: (\n text: string,\n) => Generator<{ type: InternalTokenType | \"uncolored\"; value: string }>;\n\nif (process.env.BABEL_8_BREAKING) {\n /**\n * Get the type of token, specifying punctuator type.\n */\n const getTokenType = function (\n token: JSToken | JSXToken,\n ): InternalTokenType | \"uncolored\" {\n if (token.type === \"IdentifierName\") {\n if (\n isKeyword(token.value) ||\n isStrictReservedWord(token.value, true) ||\n sometimesKeywords.has(token.value)\n ) {\n return \"keyword\";\n }\n\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n\n if (token.type === \"Punctuator\" && BRACKET.test(token.value)) {\n return \"uncolored\";\n }\n\n if (token.type === \"Invalid\" && token.value === \"@\") {\n return \"punctuator\";\n }\n\n switch (token.type) {\n case \"NumericLiteral\":\n return \"number\";\n\n case \"StringLiteral\":\n case \"JSXString\":\n case \"NoSubstitutionTemplate\":\n return \"string\";\n\n case \"RegularExpressionLiteral\":\n return \"regex\";\n\n case \"Punctuator\":\n case \"JSXPunctuator\":\n return \"punctuator\";\n\n case \"MultiLineComment\":\n case \"SingleLineComment\":\n return \"comment\";\n\n case \"Invalid\":\n case \"JSXInvalid\":\n return \"invalid\";\n\n case \"JSXIdentifier\":\n return \"jsxIdentifier\";\n\n default:\n return \"uncolored\";\n }\n };\n\n /**\n * Turn a string of JS into an array of objects.\n */\n tokenize = function* (text: string): Generator {\n for (const token of jsTokens(text, { jsx: true })) {\n switch (token.type) {\n case \"TemplateHead\":\n yield { type: \"string\", value: token.value.slice(0, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateMiddle\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1, -2) };\n yield { type: \"punctuator\", value: \"${\" };\n break;\n\n case \"TemplateTail\":\n yield { type: \"punctuator\", value: \"}\" };\n yield { type: \"string\", value: token.value.slice(1) };\n break;\n\n default:\n yield {\n type: getTokenType(token),\n value: token.value,\n };\n }\n }\n };\n} else {\n /**\n * RegExp to test for what seems to be a JSX tag name.\n */\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n\n // The token here is defined in js-tokens@4. However we don't bother\n // typing it since the whole block will be removed in Babel 8\n const getTokenType = function (token: any, offset: number, text: string) {\n if (token.type === \"name\") {\n if (\n isKeyword(token.value) ||\n isStrictReservedWord(token.value, true) ||\n sometimesKeywords.has(token.value)\n ) {\n return \"keyword\";\n }\n\n if (\n JSX_TAG.test(token.value) &&\n (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \"\")\n ) {\n return \"jsxIdentifier\";\n }\n\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n\n if (\n token.type === \"invalid\" &&\n (token.value === \"@\" || token.value === \"#\")\n ) {\n return \"punctuator\";\n }\n\n return token.type;\n };\n\n tokenize = function* (text: string) {\n let match;\n while ((match = (jsTokens as any).default.exec(text))) {\n const token = (jsTokens as any).matchToToken(match);\n\n yield {\n type: getTokenType(token, match.index, text),\n value: token.value,\n };\n }\n };\n}\n\n/**\n * Highlight `text` using the token definitions in `defs`.\n */\nfunction highlightTokens(defs: Record, text: string) {\n let highlighted = \"\";\n\n for (const { type, value } of tokenize(text)) {\n const colorize = defs[type];\n if (colorize) {\n highlighted += value\n .split(NEWLINE)\n .map(str => colorize(str))\n .join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n\n return highlighted;\n}\n\n/**\n * Highlight `text` using the token definitions in `defs`.\n */\n\ntype Options = {\n forceColor?: boolean;\n};\n\n/**\n * Whether the code should be highlighted given the passed options.\n */\nexport function shouldHighlight(options: Options): boolean {\n return colors.isColorSupported || options.forceColor;\n}\n\nlet pcWithForcedColor: Colors = undefined;\nfunction getColors(forceColor: boolean) {\n if (forceColor) {\n pcWithForcedColor ??= createColors(true);\n return pcWithForcedColor;\n }\n return colors;\n}\n\n/**\n * Highlight `code`.\n */\nexport default function highlight(code: string, options: Options = {}): string {\n if (code !== \"\" && shouldHighlight(options)) {\n const defs = getDefs(getColors(options.forceColor));\n return highlightTokens(defs, code);\n } else {\n return code;\n }\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM && !IS_STANDALONE) {\n let chalk: any, chalkWithForcedColor: any;\n // eslint-disable-next-line no-restricted-globals\n exports.getChalk = ({ forceColor }: Options) => {\n // eslint-disable-next-line no-restricted-globals\n chalk ??= require(\"chalk\");\n if (forceColor) {\n chalkWithForcedColor ??= new chalk.constructor({\n enabled: true,\n level: 1,\n });\n return chalkWithForcedColor;\n }\n return chalk;\n };\n}\n"],"mappings":";;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,0BAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAmD,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAA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CAAC,CAAC;MACF,OAAOP,oBAAoB;IAC7B;IACA,OAAOD,KAAK;EACd,CAAC;AACH","ignoreList":[]}
\ No newline at end of file
diff --git a/node_modules/@babel/highlight/package.json b/node_modules/@babel/highlight/package.json
new file mode 100644
index 00000000..63e61850
--- /dev/null
+++ b/node_modules/@babel/highlight/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@babel/highlight",
+ "version": "7.24.5",
+ "description": "Syntax highlight JavaScript strings for output in terminals.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-highlight",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-highlight"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.24.5",
+ "chalk": "^2.4.2",
+ "js-tokens": "^4.0.0",
+ "picocolors": "^1.0.0"
+ },
+ "devDependencies": {
+ "strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "type": "commonjs"
+}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/README.md b/node_modules/@puppeteer/browsers/README.md
new file mode 100644
index 00000000..a05a4d38
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/README.md
@@ -0,0 +1,46 @@
+# @puppeteer/browsers
+
+Manage and launch browsers/drivers from a CLI or programmatically.
+
+## CLI
+
+Use `npx` to run the CLI:
+
+```bash
+npx @puppeteer/browsers --help
+```
+
+Built-in per-command `help` will provide all documentation you need to use the CLI.
+
+```bash
+npx @puppeteer/browsers --help # help for all commands
+npx @puppeteer/browsers install --help # help for the install command
+npx @puppeteer/browsers launch --help # help for the launch command
+```
+
+Some example to give an idea of what the CLI looks like (use the `--help` command for more examples):
+
+```sh
+# Download the latest available Chrome for Testing binary corresponding to the Stable channel.
+npx @puppeteer/browsers install chrome@stable
+
+# Download a specific Chrome for Testing version.
+npx @puppeteer/browsers install chrome@116.0.5793.0
+
+# Download the latest Chrome for Testing version for the given milestone.
+npx @puppeteer/browsers install chrome@117
+
+# Download the latest available ChromeDriver version corresponding to the Canary channel.
+npx @puppeteer/browsers install chromedriver@canary
+
+# Download a specific ChromeDriver version.
+npx @puppeteer/browsers install chromedriver@116.0.5793.0
+```
+
+## Known limitations
+
+1. Launching the system browsers is only possible for Chrome/Chromium.
+
+## API
+
+The programmatic API allows installing and launching browsers from your code. See the `test` folder for examples on how to use the `install`, `canInstall`, `launch`, `computeExecutablePath`, `computeSystemExecutablePath` and other methods.
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts
new file mode 100644
index 00000000..4c2d25b3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts
@@ -0,0 +1,32 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+///
+import * as readline from 'readline';
+import { type Browser } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export declare class CLI {
+ #private;
+ constructor(opts?: string | {
+ cachePath?: string;
+ scriptName?: string;
+ prefixCommand?: {
+ cmd: string;
+ description: string;
+ };
+ allowCachePathOverride?: boolean;
+ pinnedBrowsers?: Partial<{
+ [key in Browser]: string;
+ }>;
+ }, rl?: readline.Interface);
+ run(argv: string[]): Promise;
+}
+/**
+ * @public
+ */
+export declare function makeProgressCallback(browser: Browser, buildId: string): (downloadedBytes: number, totalBytes: number) => void;
+//# sourceMappingURL=CLI.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map
new file mode 100644
index 00000000..361048aa
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAOrC,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,gCAAgC,CAAC;AAmCxC;;GAEG;AACH,qBAAa,GAAG;;gBASZ,IAAI,CAAC,EACD,MAAM,GACN;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAC;QACnD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,OAAO,CAAC;aAAE,GAAG,IAAI,OAAO,GAAG,MAAM;SAAC,CAAC,CAAC;KACtD,EACL,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAwDnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAoRzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAqBvD"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js
new file mode 100644
index 00000000..21cc6d42
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js
@@ -0,0 +1,289 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+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.makeProgressCallback = exports.CLI = void 0;
+const process_1 = require("process");
+const readline = __importStar(require("readline"));
+const progress_1 = __importDefault(require("progress"));
+const helpers_1 = require("yargs/helpers");
+const yargs_1 = __importDefault(require("yargs/yargs"));
+const browser_data_js_1 = require("./browser-data/browser-data.js");
+const Cache_js_1 = require("./Cache.js");
+const detectPlatform_js_1 = require("./detectPlatform.js");
+const install_js_1 = require("./install.js");
+const launch_js_1 = require("./launch.js");
+/**
+ * @public
+ */
+class CLI {
+ #cachePath;
+ #rl;
+ #scriptName = '';
+ #allowCachePathOverride = true;
+ #pinnedBrowsers;
+ #prefixCommand;
+ constructor(opts, rl) {
+ if (!opts) {
+ opts = {};
+ }
+ if (typeof opts === 'string') {
+ opts = {
+ cachePath: opts,
+ };
+ }
+ this.#cachePath = opts.cachePath ?? process.cwd();
+ this.#rl = rl;
+ this.#scriptName = opts.scriptName ?? '@puppeteer/browsers';
+ this.#allowCachePathOverride = opts.allowCachePathOverride ?? true;
+ this.#pinnedBrowsers = opts.pinnedBrowsers;
+ this.#prefixCommand = opts.prefixCommand;
+ }
+ #defineBrowserParameter(yargs) {
+ yargs.positional('browser', {
+ description: 'Which browser to install [@]. `latest` will try to find the latest available build. `buildId` is a browser-specific identifier such as a version or a revision.',
+ type: 'string',
+ coerce: (opt) => {
+ return {
+ name: this.#parseBrowser(opt),
+ buildId: this.#parseBuildId(opt),
+ };
+ },
+ });
+ }
+ #definePlatformParameter(yargs) {
+ yargs.option('platform', {
+ type: 'string',
+ desc: 'Platform that the binary needs to be compatible with.',
+ choices: Object.values(browser_data_js_1.BrowserPlatform),
+ defaultDescription: 'Auto-detected',
+ });
+ }
+ #definePathParameter(yargs, required = false) {
+ if (!this.#allowCachePathOverride) {
+ return;
+ }
+ yargs.option('path', {
+ type: 'string',
+ desc: 'Path to the root folder for the browser downloads and installation. The installation folder structure is compatible with the cache structure used by Puppeteer.',
+ defaultDescription: 'Current working directory',
+ ...(required ? {} : { default: process.cwd() }),
+ });
+ if (required) {
+ yargs.demandOption('path');
+ }
+ }
+ async run(argv) {
+ const yargsInstance = (0, yargs_1.default)((0, helpers_1.hideBin)(argv));
+ let target = yargsInstance.scriptName(this.#scriptName);
+ if (this.#prefixCommand) {
+ target = target.command(this.#prefixCommand.cmd, this.#prefixCommand.description, yargs => {
+ return this.#build(yargs);
+ });
+ }
+ else {
+ target = this.#build(target);
+ }
+ await target
+ .demandCommand(1)
+ .help()
+ .wrap(Math.min(120, yargsInstance.terminalWidth()))
+ .parse();
+ }
+ #build(yargs) {
+ const latestOrPinned = this.#pinnedBrowsers ? 'pinned' : 'latest';
+ return yargs
+ .command('install ', 'Download and install the specified browser. If successful, the command outputs the actual browser buildId that was installed and the absolute path to the browser executable (format: @ ).', yargs => {
+ this.#defineBrowserParameter(yargs);
+ this.#definePlatformParameter(yargs);
+ this.#definePathParameter(yargs);
+ yargs.option('base-url', {
+ type: 'string',
+ desc: 'Base URL to download from',
+ });
+ yargs.example('$0 install chrome', `Install the ${latestOrPinned} available build of the Chrome browser.`);
+ yargs.example('$0 install chrome@latest', 'Install the latest available build for the Chrome browser.');
+ yargs.example('$0 install chrome@stable', 'Install the latest available build for the Chrome browser from the stable channel.');
+ yargs.example('$0 install chrome@beta', 'Install the latest available build for the Chrome browser from the beta channel.');
+ yargs.example('$0 install chrome@dev', 'Install the latest available build for the Chrome browser from the dev channel.');
+ yargs.example('$0 install chrome@canary', 'Install the latest available build for the Chrome Canary browser.');
+ yargs.example('$0 install chrome@115', 'Install the latest available build for Chrome 115.');
+ yargs.example('$0 install chromedriver@canary', 'Install the latest available build for ChromeDriver Canary.');
+ yargs.example('$0 install chromedriver@115', 'Install the latest available build for ChromeDriver 115.');
+ yargs.example('$0 install chromedriver@115.0.5790', 'Install the latest available patch (115.0.5790.X) build for ChromeDriver.');
+ yargs.example('$0 install chrome-headless-shell', 'Install the latest available chrome-headless-shell build.');
+ yargs.example('$0 install chrome-headless-shell@beta', 'Install the latest available chrome-headless-shell build corresponding to the Beta channel.');
+ yargs.example('$0 install chrome-headless-shell@118', 'Install the latest available chrome-headless-shell 118 build.');
+ yargs.example('$0 install chromium@1083080', 'Install the revision 1083080 of the Chromium browser.');
+ yargs.example('$0 install firefox', 'Install the latest nightly available build of the Firefox browser.');
+ yargs.example('$0 install firefox@stable', 'Install the latest stable build of the Firefox browser.');
+ yargs.example('$0 install firefox@beta', 'Install the latest beta build of the Firefox browser.');
+ yargs.example('$0 install firefox@devedition', 'Install the latest devedition build of the Firefox browser.');
+ yargs.example('$0 install firefox@esr', 'Install the latest ESR build of the Firefox browser.');
+ yargs.example('$0 install firefox@nightly', 'Install the latest nightly build of the Firefox browser.');
+ yargs.example('$0 install firefox@stable_111.0.1', 'Install a specific version of the Firefox browser.');
+ yargs.example('$0 install firefox --platform mac', 'Install the latest Mac (Intel) build of the Firefox browser.');
+ if (this.#allowCachePathOverride) {
+ yargs.example('$0 install firefox --path /tmp/my-browser-cache', 'Install to the specified cache directory.');
+ }
+ }, async (argv) => {
+ const args = argv;
+ args.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!args.platform) {
+ throw new Error(`Could not resolve the current platform`);
+ }
+ if (args.browser.buildId === 'pinned') {
+ const pinnedVersion = this.#pinnedBrowsers?.[args.browser.name];
+ if (!pinnedVersion) {
+ throw new Error(`No pinned version found for ${args.browser.name}`);
+ }
+ args.browser.buildId = pinnedVersion;
+ }
+ const originalBuildId = args.browser.buildId;
+ args.browser.buildId = await (0, browser_data_js_1.resolveBuildId)(args.browser.name, args.platform, args.browser.buildId);
+ await (0, install_js_1.install)({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ platform: args.platform,
+ cacheDir: args.path ?? this.#cachePath,
+ downloadProgressCallback: makeProgressCallback(args.browser.name, args.browser.buildId),
+ baseUrl: args.baseUrl,
+ buildIdAlias: originalBuildId !== args.browser.buildId
+ ? originalBuildId
+ : undefined,
+ });
+ console.log(`${args.browser.name}@${args.browser.buildId} ${(0, launch_js_1.computeExecutablePath)({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ cacheDir: args.path ?? this.#cachePath,
+ platform: args.platform,
+ })}`);
+ })
+ .command('launch ', 'Launch the specified browser', yargs => {
+ this.#defineBrowserParameter(yargs);
+ this.#definePlatformParameter(yargs);
+ this.#definePathParameter(yargs);
+ yargs.option('detached', {
+ type: 'boolean',
+ desc: 'Detach the child process.',
+ default: false,
+ });
+ yargs.option('system', {
+ type: 'boolean',
+ desc: 'Search for a browser installed on the system instead of the cache folder.',
+ default: false,
+ });
+ yargs.example('$0 launch chrome@115.0.5790.170', 'Launch Chrome 115.0.5790.170');
+ yargs.example('$0 launch firefox@112.0a1', 'Launch the Firefox browser identified by the milestone 112.0a1.');
+ yargs.example('$0 launch chrome@115.0.5790.170 --detached', 'Launch the browser but detach the sub-processes.');
+ yargs.example('$0 launch chrome@canary --system', 'Try to locate the Canary build of Chrome installed on the system and launch it.');
+ }, async (argv) => {
+ const args = argv;
+ const executablePath = args.system
+ ? (0, launch_js_1.computeSystemExecutablePath)({
+ browser: args.browser.name,
+ // TODO: throw an error if not a ChromeReleaseChannel is provided.
+ channel: args.browser.buildId,
+ platform: args.platform,
+ })
+ : (0, launch_js_1.computeExecutablePath)({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ cacheDir: args.path ?? this.#cachePath,
+ platform: args.platform,
+ });
+ (0, launch_js_1.launch)({
+ executablePath,
+ detached: args.detached,
+ });
+ })
+ .command('clear', this.#allowCachePathOverride
+ ? 'Removes all installed browsers from the specified cache directory'
+ : `Removes all installed browsers from ${this.#cachePath}`, yargs => {
+ this.#definePathParameter(yargs, true);
+ }, async (argv) => {
+ const args = argv;
+ const cacheDir = args.path ?? this.#cachePath;
+ const rl = this.#rl ?? readline.createInterface({ input: process_1.stdin, output: process_1.stdout });
+ rl.question(`Do you want to permanently and recursively delete the content of ${cacheDir} (yes/No)? `, answer => {
+ rl.close();
+ if (!['y', 'yes'].includes(answer.toLowerCase().trim())) {
+ console.log('Cancelled.');
+ return;
+ }
+ const cache = new Cache_js_1.Cache(cacheDir);
+ cache.clear();
+ console.log(`${cacheDir} cleared.`);
+ });
+ })
+ .demandCommand(1)
+ .help();
+ }
+ #parseBrowser(version) {
+ return version.split('@').shift();
+ }
+ #parseBuildId(version) {
+ const parts = version.split('@');
+ return parts.length === 2
+ ? parts[1]
+ : this.#pinnedBrowsers
+ ? 'pinned'
+ : 'latest';
+ }
+}
+exports.CLI = CLI;
+/**
+ * @public
+ */
+function makeProgressCallback(browser, buildId) {
+ let progressBar;
+ let lastDownloadedBytes = 0;
+ return (downloadedBytes, totalBytes) => {
+ if (!progressBar) {
+ progressBar = new progress_1.default(`Downloading ${browser} ${buildId} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {
+ complete: '=',
+ incomplete: ' ',
+ width: 20,
+ total: totalBytes,
+ });
+ }
+ const delta = downloadedBytes - lastDownloadedBytes;
+ lastDownloadedBytes = downloadedBytes;
+ progressBar.tick(delta);
+ };
+}
+exports.makeProgressCallback = makeProgressCallback;
+function toMegabytes(bytes) {
+ const mb = bytes / 1000 / 1000;
+ return `${Math.round(mb * 10) / 10} MB`;
+}
+//# sourceMappingURL=CLI.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map
new file mode 100644
index 00000000..b133bf9a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/CLI.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CLI.js","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAyD;AACzD,mDAAqC;AAErC,wDAAmC;AAEnC,2CAAsC;AACtC,wDAAgC;AAEhC,oEAKwC;AACxC,yCAAiC;AACjC,2DAA0D;AAC1D,6CAAqC;AACrC,2CAIqB;AA2BrB;;GAEG;AACH,MAAa,GAAG;IACd,UAAU,CAAC;IACX,GAAG,CAAsB;IACzB,WAAW,GAAG,EAAE,CAAC;IACjB,uBAAuB,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAuC;IACtD,cAAc,CAAsC;IAEpD,YACE,IAQK,EACL,EAAuB;QAEvB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG;gBACL,SAAS,EAAE,IAAI;aAChB,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAClD,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,IAAI,qBAAqB,CAAC;QAC5D,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,sBAAsB,IAAI,IAAI,CAAC;QACnE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC;IAC3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O,CAAC,eAAuB,EAAE,UAAkB,EAAE,EAAE;QACrD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,kBAAW,CAC3B,eAAe,OAAO,IAAI,OAAO,MAAM,WAAW,CAChD,UAAU,CACX,yBAAyB,EAC1B;gBACE,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,UAAU;aAClB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,eAAe,GAAG,mBAAmB,CAAC;QACpD,mBAAmB,GAAG,eAAe,CAAC;QACtC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAxBD,oDAwBC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts
new file mode 100644
index 00000000..af18af56
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts
@@ -0,0 +1,83 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { Browser, type BrowserPlatform } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export declare class InstalledBrowser {
+ #private;
+ browser: Browser;
+ buildId: string;
+ platform: BrowserPlatform;
+ readonly executablePath: string;
+ /**
+ * @internal
+ */
+ constructor(cache: Cache, browser: Browser, buildId: string, platform: BrowserPlatform);
+ /**
+ * Path to the root of the installation folder. Use
+ * {@link computeExecutablePath} to get the path to the executable binary.
+ */
+ get path(): string;
+ readMetadata(): Metadata;
+ writeMetadata(metadata: Metadata): void;
+}
+/**
+ * @internal
+ */
+export interface ComputeExecutablePathOptions {
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+}
+export interface Metadata {
+ aliases: Record;
+}
+/**
+ * The cache used by Puppeteer relies on the following structure:
+ *
+ * - rootDir
+ * -- | browserRoot(browser1)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * -- | browserRoot(browser2)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * @internal
+ */
+export declare class Cache {
+ #private;
+ constructor(rootDir: string);
+ /**
+ * @internal
+ */
+ get rootDir(): string;
+ browserRoot(browser: Browser): string;
+ metadataFile(browser: Browser): string;
+ readMetadata(browser: Browser): Metadata;
+ writeMetadata(browser: Browser, metadata: Metadata): void;
+ resolveAlias(browser: Browser, alias: string): string | undefined;
+ installationDir(browser: Browser, platform: BrowserPlatform, buildId: string): string;
+ clear(): void;
+ uninstall(browser: Browser, platform: BrowserPlatform, buildId: string): void;
+ getInstalledBrowsers(): InstalledBrowser[];
+ computeExecutablePath(options: ComputeExecutablePathOptions): string;
+}
+//# sourceMappingURL=Cache.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map
new file mode 100644
index 00000000..71d5ba4b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,OAAO,EACP,KAAK,eAAe,EAG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ACd,MAAM;IAIT,KAAK,IAAI,IAAI;IASb,SAAS,CACP,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,IAAI;IAeP,oBAAoB,IAAI,gBAAgB,EAAE;IA+B1C,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,MAAM;CA0BrE"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.js b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js
new file mode 100644
index 00000000..a5eee16e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js
@@ -0,0 +1,191 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.Cache = exports.InstalledBrowser = void 0;
+const fs_1 = __importDefault(require("fs"));
+const os_1 = __importDefault(require("os"));
+const path_1 = __importDefault(require("path"));
+const debug_1 = __importDefault(require("debug"));
+const browser_data_js_1 = require("./browser-data/browser-data.js");
+const detectPlatform_js_1 = require("./detectPlatform.js");
+const debugCache = (0, debug_1.default)('puppeteer:browsers:cache');
+/**
+ * @public
+ */
+class InstalledBrowser {
+ browser;
+ buildId;
+ platform;
+ executablePath;
+ #cache;
+ /**
+ * @internal
+ */
+ constructor(cache, browser, buildId, platform) {
+ this.#cache = cache;
+ this.browser = browser;
+ this.buildId = buildId;
+ this.platform = platform;
+ this.executablePath = cache.computeExecutablePath({
+ browser,
+ buildId,
+ platform,
+ });
+ }
+ /**
+ * Path to the root of the installation folder. Use
+ * {@link computeExecutablePath} to get the path to the executable binary.
+ */
+ get path() {
+ return this.#cache.installationDir(this.browser, this.platform, this.buildId);
+ }
+ readMetadata() {
+ return this.#cache.readMetadata(this.browser);
+ }
+ writeMetadata(metadata) {
+ this.#cache.writeMetadata(this.browser, metadata);
+ }
+}
+exports.InstalledBrowser = InstalledBrowser;
+/**
+ * The cache used by Puppeteer relies on the following structure:
+ *
+ * - rootDir
+ * -- | browserRoot(browser1)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * -- | browserRoot(browser2)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * @internal
+ */
+class Cache {
+ #rootDir;
+ constructor(rootDir) {
+ this.#rootDir = rootDir;
+ }
+ /**
+ * @internal
+ */
+ get rootDir() {
+ return this.#rootDir;
+ }
+ browserRoot(browser) {
+ return path_1.default.join(this.#rootDir, browser);
+ }
+ metadataFile(browser) {
+ return path_1.default.join(this.browserRoot(browser), '.metadata');
+ }
+ readMetadata(browser) {
+ const metatadaPath = this.metadataFile(browser);
+ if (!fs_1.default.existsSync(metatadaPath)) {
+ return { aliases: {} };
+ }
+ // TODO: add type-safe parsing.
+ const data = JSON.parse(fs_1.default.readFileSync(metatadaPath, 'utf8'));
+ if (typeof data !== 'object') {
+ throw new Error('.metadata is not an object');
+ }
+ return data;
+ }
+ writeMetadata(browser, metadata) {
+ const metatadaPath = this.metadataFile(browser);
+ fs_1.default.mkdirSync(path_1.default.dirname(metatadaPath), { recursive: true });
+ fs_1.default.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2));
+ }
+ resolveAlias(browser, alias) {
+ const metadata = this.readMetadata(browser);
+ if (alias === 'latest') {
+ return Object.values(metadata.aliases || {})
+ .sort((0, browser_data_js_1.getVersionComparator)(browser))
+ .at(-1);
+ }
+ return metadata.aliases[alias];
+ }
+ installationDir(browser, platform, buildId) {
+ return path_1.default.join(this.browserRoot(browser), `${platform}-${buildId}`);
+ }
+ clear() {
+ fs_1.default.rmSync(this.#rootDir, {
+ force: true,
+ recursive: true,
+ maxRetries: 10,
+ retryDelay: 500,
+ });
+ }
+ uninstall(browser, platform, buildId) {
+ const metadata = this.readMetadata(browser);
+ for (const alias of Object.keys(metadata.aliases)) {
+ if (metadata.aliases[alias] === buildId) {
+ delete metadata.aliases[alias];
+ }
+ }
+ fs_1.default.rmSync(this.installationDir(browser, platform, buildId), {
+ force: true,
+ recursive: true,
+ maxRetries: 10,
+ retryDelay: 500,
+ });
+ }
+ getInstalledBrowsers() {
+ if (!fs_1.default.existsSync(this.#rootDir)) {
+ return [];
+ }
+ const types = fs_1.default.readdirSync(this.#rootDir);
+ const browsers = types.filter((t) => {
+ return Object.values(browser_data_js_1.Browser).includes(t);
+ });
+ return browsers.flatMap(browser => {
+ const files = fs_1.default.readdirSync(this.browserRoot(browser));
+ return files
+ .map(file => {
+ const result = parseFolderPath(path_1.default.join(this.browserRoot(browser), file));
+ if (!result) {
+ return null;
+ }
+ return new InstalledBrowser(this, browser, result.buildId, result.platform);
+ })
+ .filter((item) => {
+ return item !== null;
+ });
+ });
+ }
+ computeExecutablePath(options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
+ try {
+ options.buildId =
+ this.resolveAlias(options.browser, options.buildId) ?? options.buildId;
+ }
+ catch {
+ debugCache('could not read .metadata file for the browser');
+ }
+ const installationDir = this.installationDir(options.browser, options.platform, options.buildId);
+ return path_1.default.join(installationDir, browser_data_js_1.executablePathByBrowser[options.browser](options.platform, options.buildId));
+ }
+}
+exports.Cache = Cache;
+function parseFolderPath(folderPath) {
+ const name = path_1.default.basename(folderPath);
+ const splits = name.split('-');
+ if (splits.length !== 2) {
+ return;
+ }
+ const [platform, buildId] = splits;
+ if (!buildId || !platform) {
+ return;
+ }
+ return { platform, buildId };
+}
+//# sourceMappingURL=Cache.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/Cache.js.map b/node_modules/@puppeteer/browsers/lib/cjs/Cache.js.map
new file mode 100644
index 00000000..579a06a4
--- /dev/null
+++ b/node_modules/@pupp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node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts
new file mode 100644
index 00000000..bd6b75da
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts
@@ -0,0 +1,61 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import * as chromeHeadlessShell from './chrome-headless-shell.js';
+import * as chrome from './chrome.js';
+import * as chromedriver from './chromedriver.js';
+import * as chromium from './chromium.js';
+import * as firefox from './firefox.js';
+import { Browser, BrowserPlatform, ChromeReleaseChannel, type ProfileOptions } from './types.js';
+export type { ProfileOptions };
+export declare const downloadUrls: {
+ chromedriver: typeof chromedriver.resolveDownloadUrl;
+ "chrome-headless-shell": typeof chromeHeadlessShell.resolveDownloadUrl;
+ chrome: typeof chrome.resolveDownloadUrl;
+ chromium: typeof chromium.resolveDownloadUrl;
+ firefox: typeof firefox.resolveDownloadUrl;
+};
+export declare const downloadPaths: {
+ chromedriver: typeof chromedriver.resolveDownloadPath;
+ "chrome-headless-shell": typeof chromeHeadlessShell.resolveDownloadPath;
+ chrome: typeof chrome.resolveDownloadPath;
+ chromium: typeof chromium.resolveDownloadPath;
+ firefox: typeof firefox.resolveDownloadPath;
+};
+export declare const executablePathByBrowser: {
+ chromedriver: typeof chromedriver.relativeExecutablePath;
+ "chrome-headless-shell": typeof chromeHeadlessShell.relativeExecutablePath;
+ chrome: typeof chrome.relativeExecutablePath;
+ chromium: typeof chromium.relativeExecutablePath;
+ firefox: typeof firefox.relativeExecutablePath;
+};
+export declare const versionComparators: {
+ chromedriver: typeof chromeHeadlessShell.compareVersions;
+ "chrome-headless-shell": typeof chromeHeadlessShell.compareVersions;
+ chrome: typeof chromeHeadlessShell.compareVersions;
+ chromium: typeof chromium.compareVersions;
+ firefox: typeof firefox.compareVersions;
+};
+export { Browser, BrowserPlatform, ChromeReleaseChannel };
+/**
+ * @public
+ */
+export declare function resolveBuildId(browser: Browser, platform: BrowserPlatform, tag: string): Promise;
+/**
+ * @public
+ */
+export declare function createProfile(browser: Browser, opts: ProfileOptions): Promise;
+/**
+ * @public
+ */
+export declare function resolveSystemExecutablePath(browser: Browser, platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export declare function getVersionComparator(browser: Browser): (a: string, b: string) => number;
+//# sourceMappingURL=browser-data.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map
new file mode 100644
index 00000000..ed610a70
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser-data.d.ts","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EAEf,oBAAoB,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAC,cAAc,EAAC,CAAC;AAE7B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;CAM9B,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAC,CAAC;AA+GxD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAYR;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAElC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js
new file mode 100644
index 00000000..c25b2e32
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js
@@ -0,0 +1,231 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+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.getVersionComparator = exports.resolveSystemExecutablePath = exports.createProfile = exports.resolveBuildId = exports.ChromeReleaseChannel = exports.BrowserPlatform = exports.Browser = exports.versionComparators = exports.executablePathByBrowser = exports.downloadPaths = exports.downloadUrls = void 0;
+const chromeHeadlessShell = __importStar(require("./chrome-headless-shell.js"));
+const chrome = __importStar(require("./chrome.js"));
+const chromedriver = __importStar(require("./chromedriver.js"));
+const chromium = __importStar(require("./chromium.js"));
+const firefox = __importStar(require("./firefox.js"));
+const types_js_1 = require("./types.js");
+Object.defineProperty(exports, "Browser", { enumerable: true, get: function () { return types_js_1.Browser; } });
+Object.defineProperty(exports, "BrowserPlatform", { enumerable: true, get: function () { return types_js_1.BrowserPlatform; } });
+Object.defineProperty(exports, "ChromeReleaseChannel", { enumerable: true, get: function () { return types_js_1.ChromeReleaseChannel; } });
+exports.downloadUrls = {
+ [types_js_1.Browser.CHROMEDRIVER]: chromedriver.resolveDownloadUrl,
+ [types_js_1.Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.resolveDownloadUrl,
+ [types_js_1.Browser.CHROME]: chrome.resolveDownloadUrl,
+ [types_js_1.Browser.CHROMIUM]: chromium.resolveDownloadUrl,
+ [types_js_1.Browser.FIREFOX]: firefox.resolveDownloadUrl,
+};
+exports.downloadPaths = {
+ [types_js_1.Browser.CHROMEDRIVER]: chromedriver.resolveDownloadPath,
+ [types_js_1.Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.resolveDownloadPath,
+ [types_js_1.Browser.CHROME]: chrome.resolveDownloadPath,
+ [types_js_1.Browser.CHROMIUM]: chromium.resolveDownloadPath,
+ [types_js_1.Browser.FIREFOX]: firefox.resolveDownloadPath,
+};
+exports.executablePathByBrowser = {
+ [types_js_1.Browser.CHROMEDRIVER]: chromedriver.relativeExecutablePath,
+ [types_js_1.Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.relativeExecutablePath,
+ [types_js_1.Browser.CHROME]: chrome.relativeExecutablePath,
+ [types_js_1.Browser.CHROMIUM]: chromium.relativeExecutablePath,
+ [types_js_1.Browser.FIREFOX]: firefox.relativeExecutablePath,
+};
+exports.versionComparators = {
+ [types_js_1.Browser.CHROMEDRIVER]: chromedriver.compareVersions,
+ [types_js_1.Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.compareVersions,
+ [types_js_1.Browser.CHROME]: chrome.compareVersions,
+ [types_js_1.Browser.CHROMIUM]: chromium.compareVersions,
+ [types_js_1.Browser.FIREFOX]: firefox.compareVersions,
+};
+/**
+ * @internal
+ */
+async function resolveBuildIdForBrowserTag(browser, platform, tag) {
+ switch (browser) {
+ case types_js_1.Browser.FIREFOX:
+ switch (tag) {
+ case types_js_1.BrowserTag.LATEST:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.NIGHTLY);
+ case types_js_1.BrowserTag.BETA:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.BETA);
+ case types_js_1.BrowserTag.NIGHTLY:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.NIGHTLY);
+ case types_js_1.BrowserTag.DEVEDITION:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.DEVEDITION);
+ case types_js_1.BrowserTag.STABLE:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.STABLE);
+ case types_js_1.BrowserTag.ESR:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.ESR);
+ case types_js_1.BrowserTag.CANARY:
+ case types_js_1.BrowserTag.DEV:
+ throw new Error(`${tag.toUpperCase()} is not available for Firefox`);
+ }
+ case types_js_1.Browser.CHROME: {
+ switch (tag) {
+ case types_js_1.BrowserTag.LATEST:
+ return await chrome.resolveBuildId(types_js_1.ChromeReleaseChannel.CANARY);
+ case types_js_1.BrowserTag.BETA:
+ return await chrome.resolveBuildId(types_js_1.ChromeReleaseChannel.BETA);
+ case types_js_1.BrowserTag.CANARY:
+ return await chrome.resolveBuildId(types_js_1.ChromeReleaseChannel.CANARY);
+ case types_js_1.BrowserTag.DEV:
+ return await chrome.resolveBuildId(types_js_1.ChromeReleaseChannel.DEV);
+ case types_js_1.BrowserTag.STABLE:
+ return await chrome.resolveBuildId(types_js_1.ChromeReleaseChannel.STABLE);
+ case types_js_1.BrowserTag.NIGHTLY:
+ case types_js_1.BrowserTag.DEVEDITION:
+ case types_js_1.BrowserTag.ESR:
+ throw new Error(`${tag.toUpperCase()} is not available for Chrome`);
+ }
+ }
+ case types_js_1.Browser.CHROMEDRIVER: {
+ switch (tag) {
+ case types_js_1.BrowserTag.LATEST:
+ case types_js_1.BrowserTag.CANARY:
+ return await chromedriver.resolveBuildId(types_js_1.ChromeReleaseChannel.CANARY);
+ case types_js_1.BrowserTag.BETA:
+ return await chromedriver.resolveBuildId(types_js_1.ChromeReleaseChannel.BETA);
+ case types_js_1.BrowserTag.DEV:
+ return await chromedriver.resolveBuildId(types_js_1.ChromeReleaseChannel.DEV);
+ case types_js_1.BrowserTag.STABLE:
+ return await chromedriver.resolveBuildId(types_js_1.ChromeReleaseChannel.STABLE);
+ case types_js_1.BrowserTag.NIGHTLY:
+ case types_js_1.BrowserTag.DEVEDITION:
+ case types_js_1.BrowserTag.ESR:
+ throw new Error(`${tag.toUpperCase()} is not available for ChromeDriver`);
+ }
+ }
+ case types_js_1.Browser.CHROMEHEADLESSSHELL: {
+ switch (tag) {
+ case types_js_1.BrowserTag.LATEST:
+ case types_js_1.BrowserTag.CANARY:
+ return await chromeHeadlessShell.resolveBuildId(types_js_1.ChromeReleaseChannel.CANARY);
+ case types_js_1.BrowserTag.BETA:
+ return await chromeHeadlessShell.resolveBuildId(types_js_1.ChromeReleaseChannel.BETA);
+ case types_js_1.BrowserTag.DEV:
+ return await chromeHeadlessShell.resolveBuildId(types_js_1.ChromeReleaseChannel.DEV);
+ case types_js_1.BrowserTag.STABLE:
+ return await chromeHeadlessShell.resolveBuildId(types_js_1.ChromeReleaseChannel.STABLE);
+ case types_js_1.BrowserTag.NIGHTLY:
+ case types_js_1.BrowserTag.DEVEDITION:
+ case types_js_1.BrowserTag.ESR:
+ throw new Error(`${tag} is not available for chrome-headless-shell`);
+ }
+ }
+ case types_js_1.Browser.CHROMIUM:
+ switch (tag) {
+ case types_js_1.BrowserTag.LATEST:
+ return await chromium.resolveBuildId(platform);
+ case types_js_1.BrowserTag.NIGHTLY:
+ case types_js_1.BrowserTag.CANARY:
+ case types_js_1.BrowserTag.DEV:
+ case types_js_1.BrowserTag.DEVEDITION:
+ case types_js_1.BrowserTag.BETA:
+ case types_js_1.BrowserTag.STABLE:
+ case types_js_1.BrowserTag.ESR:
+ throw new Error(`${tag} is not supported for Chromium. Use 'latest' instead.`);
+ }
+ }
+}
+/**
+ * @public
+ */
+async function resolveBuildId(browser, platform, tag) {
+ const browserTag = tag;
+ if (Object.values(types_js_1.BrowserTag).includes(browserTag)) {
+ return await resolveBuildIdForBrowserTag(browser, platform, browserTag);
+ }
+ switch (browser) {
+ case types_js_1.Browser.FIREFOX:
+ return tag;
+ case types_js_1.Browser.CHROME:
+ const chromeResult = await chrome.resolveBuildId(tag);
+ if (chromeResult) {
+ return chromeResult;
+ }
+ return tag;
+ case types_js_1.Browser.CHROMEDRIVER:
+ const chromeDriverResult = await chromedriver.resolveBuildId(tag);
+ if (chromeDriverResult) {
+ return chromeDriverResult;
+ }
+ return tag;
+ case types_js_1.Browser.CHROMEHEADLESSSHELL:
+ const chromeHeadlessShellResult = await chromeHeadlessShell.resolveBuildId(tag);
+ if (chromeHeadlessShellResult) {
+ return chromeHeadlessShellResult;
+ }
+ return tag;
+ case types_js_1.Browser.CHROMIUM:
+ return tag;
+ }
+}
+exports.resolveBuildId = resolveBuildId;
+/**
+ * @public
+ */
+async function createProfile(browser, opts) {
+ switch (browser) {
+ case types_js_1.Browser.FIREFOX:
+ return await firefox.createProfile(opts);
+ case types_js_1.Browser.CHROME:
+ case types_js_1.Browser.CHROMIUM:
+ throw new Error(`Profile creation is not support for ${browser} yet`);
+ }
+}
+exports.createProfile = createProfile;
+/**
+ * @public
+ */
+function resolveSystemExecutablePath(browser, platform, channel) {
+ switch (browser) {
+ case types_js_1.Browser.CHROMEDRIVER:
+ case types_js_1.Browser.CHROMEHEADLESSSHELL:
+ case types_js_1.Browser.FIREFOX:
+ case types_js_1.Browser.CHROMIUM:
+ throw new Error(`System browser detection is not supported for ${browser} yet.`);
+ case types_js_1.Browser.CHROME:
+ return chrome.resolveSystemExecutablePath(platform, channel);
+ }
+}
+exports.resolveSystemExecutablePath = resolveSystemExecutablePath;
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+function getVersionComparator(browser) {
+ return exports.versionComparators[browser];
+}
+exports.getVersionComparator = getVersionComparator;
+//# sourceMappingURL=browser-data.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map
new file mode 100644
index 00000000..af592f16
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser-data.js","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gFAAkE;AAClE,oDAAsC;AACtC,gEAAkD;AAClD,wDAA0C;AAC1C,sDAAwC;AACxC,yCAMoB;AAoCZ,wFAzCN,kBAAO,OAyCM;AAAE,gGAxCf,0BAAe,OAwCe;AAAE,qGAtChC,+BAAoB,OAsCgC;AAhCzC,QAAA,YAAY,GAAG;IAC1B,CAAC,kBAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IACvD,CAAC,kBAA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CAAC;YAChD,IAAI,yBAAyB,EAAE,CAAC;gBAC9B,OAAO,yBAAyB,CAAC;YACnC,CAAC;YACD,OAAO,GAAG,CAAC;QACb,KAAK,kBAAO,CAAC,QAAQ;YACnB,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAnCD,wCAmCC;AAED;;GAEG;AACI,KAAK,UAAU,aAAa,CACjC,OAAgB,EAChB,IAAoB;IAEpB,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,kBAAO,CAAC,OAAO;YAClB,OAAO,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC3C,KAAK,kBAAO,CAAC,MAAM,CAAC;QACpB,KAAK,kBAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CAAC,uCAAuC,OAAO,MAAM,CAAC,CAAC;IAC1E,CAAC;AACH,CAAC;AAXD,sCAWC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CACzC,OAAgB,EAChB,QAAyB,EACzB,OAA6B;IAE7B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,kBAAO,CAAC,YAAY,CAAC;QAC1B,KAAK,kBAAO,CAAC,mBAAmB,CAAC;QACjC,KAAK,kBAAO,CAAC,OAAO,CAAC;QACrB,KAAK,kBAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,OAAO,CAChE,CAAC;QACJ,KAAK,kBAAO,CAAC,MAAM;YACjB,OAAO,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAhBD,kEAgBC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,OAAgB;IAEhB,OAAO,0BAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAJD,oDAIC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts
new file mode 100644
index 00000000..d21d11b1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts
@@ -0,0 +1,6 @@
+import { BrowserPlatform } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export { resolveBuildId, compareVersions } from './chrome.js';
+//# sourceMappingURL=chrome-headless-shell.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map
new file mode 100644
index 00000000..111c5111
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome-headless-shell.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAoBR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js
new file mode 100644
index 00000000..2add8432
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js
@@ -0,0 +1,56 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.compareVersions = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const path_1 = __importDefault(require("path"));
+const types_js_1 = require("./types.js");
+function folder(platform) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return 'linux64';
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case types_js_1.BrowserPlatform.MAC:
+ return 'mac-x64';
+ case types_js_1.BrowserPlatform.WIN32:
+ return 'win32';
+ case types_js_1.BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+exports.resolveDownloadUrl = resolveDownloadUrl;
+function resolveDownloadPath(platform, buildId) {
+ return [
+ buildId,
+ folder(platform),
+ `chrome-headless-shell-${folder(platform)}.zip`,
+ ];
+}
+exports.resolveDownloadPath = resolveDownloadPath;
+function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.MAC:
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return path_1.default.join('chrome-headless-shell-' + folder(platform), 'chrome-headless-shell');
+ case types_js_1.BrowserPlatform.LINUX:
+ return path_1.default.join('chrome-headless-shell-linux64', 'chrome-headless-shell');
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return path_1.default.join('chrome-headless-shell-' + folder(platform), 'chrome-headless-shell.exe');
+ }
+}
+exports.relativeExecutablePath = relativeExecutablePath;
+var chrome_js_1 = require("./chrome.js");
+Object.defineProperty(exports, "resolveBuildId", { enumerable: true, get: function () { return chrome_js_1.resolveBuildId; } });
+Object.defineProperty(exports, "compareVersions", { enumerable: true, get: function () { return chrome_js_1.compareVersions; } });
+//# sourceMappingURL=chrome-headless-shell.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map
new file mode 100644
index 00000000..b2385824
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome-headless-shell.js","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,gDAAwB;AAExB,yCAA2C;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO;QACL,OAAO;QACP,MAAM,CAAC,QAAQ,CAAC;QAChB,yBAAyB,MAAM,CAAC,QAAQ,CAAC,MAAM;KAChD,CAAC;AACJ,CAAC;AATD,kDASC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,uBAAuB,CACxB,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CACd,+BAA+B,EAC/B,uBAAuB,CACxB,CAAC;QACJ,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,2BAA2B,CAC5B,CAAC;IACN,CAAC;AACH,CAAC;AAvBD,wDAuBC;AAED,yCAA4D;AAApD,2GAAA,cAAc,OAAA;AAAE,4GAAA,eAAe,OAAA"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts
new file mode 100644
index 00000000..da0c1e77
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts
@@ -0,0 +1,30 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform, ChromeReleaseChannel } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export declare function getLastKnownGoodReleaseForChannel(channel: ChromeReleaseChannel): Promise<{
+ version: string;
+ revision: string;
+}>;
+export declare function getLastKnownGoodReleaseForMilestone(milestone: string): Promise<{
+ version: string;
+ revision: string;
+} | undefined>;
+export declare function getLastKnownGoodReleaseForBuild(
+/**
+ * @example `112.0.23`,
+ */
+buildPrefix: string): Promise<{
+ version: string;
+ revision: string;
+} | undefined>;
+export declare function resolveBuildId(channel: ChromeReleaseChannel): Promise;
+export declare function resolveBuildId(channel: string): Promise;
+export declare function resolveSystemExecutablePath(platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+export declare function compareVersions(a: string, b: string): number;
+//# sourceMappingURL=chrome.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map
new file mode 100644
index 00000000..018fee92
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAiBjE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AAED,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,CAqB9C;AAED,wBAAsB,mCAAmC,CACvD,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,+BAA+B;AACnD;;GAEG;AACH,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AACnB,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAwB/B,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAwCR;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAc5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js
new file mode 100644
index 00000000..30b67ddb
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js
@@ -0,0 +1,146 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.compareVersions = exports.resolveSystemExecutablePath = exports.resolveBuildId = exports.getLastKnownGoodReleaseForBuild = exports.getLastKnownGoodReleaseForMilestone = exports.getLastKnownGoodReleaseForChannel = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+const path_1 = __importDefault(require("path"));
+const semver_1 = __importDefault(require("semver"));
+const httpUtil_js_1 = require("../httpUtil.js");
+const types_js_1 = require("./types.js");
+function folder(platform) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return 'linux64';
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case types_js_1.BrowserPlatform.MAC:
+ return 'mac-x64';
+ case types_js_1.BrowserPlatform.WIN32:
+ return 'win32';
+ case types_js_1.BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+exports.resolveDownloadUrl = resolveDownloadUrl;
+function resolveDownloadPath(platform, buildId) {
+ return [buildId, folder(platform), `chrome-${folder(platform)}.zip`];
+}
+exports.resolveDownloadPath = resolveDownloadPath;
+function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.MAC:
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return path_1.default.join('chrome-' + folder(platform), 'Google Chrome for Testing.app', 'Contents', 'MacOS', 'Google Chrome for Testing');
+ case types_js_1.BrowserPlatform.LINUX:
+ return path_1.default.join('chrome-linux64', 'chrome');
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return path_1.default.join('chrome-' + folder(platform), 'chrome.exe');
+ }
+}
+exports.relativeExecutablePath = relativeExecutablePath;
+async function getLastKnownGoodReleaseForChannel(channel) {
+ const data = (await (0, httpUtil_js_1.getJSON)(new URL('https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json')));
+ for (const channel of Object.keys(data.channels)) {
+ data.channels[channel.toLowerCase()] = data.channels[channel];
+ delete data.channels[channel];
+ }
+ return data.channels[channel];
+}
+exports.getLastKnownGoodReleaseForChannel = getLastKnownGoodReleaseForChannel;
+async function getLastKnownGoodReleaseForMilestone(milestone) {
+ const data = (await (0, httpUtil_js_1.getJSON)(new URL('https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone.json')));
+ return data.milestones[milestone];
+}
+exports.getLastKnownGoodReleaseForMilestone = getLastKnownGoodReleaseForMilestone;
+async function getLastKnownGoodReleaseForBuild(
+/**
+ * @example `112.0.23`,
+ */
+buildPrefix) {
+ const data = (await (0, httpUtil_js_1.getJSON)(new URL('https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json')));
+ return data.builds[buildPrefix];
+}
+exports.getLastKnownGoodReleaseForBuild = getLastKnownGoodReleaseForBuild;
+async function resolveBuildId(channel) {
+ if (Object.values(types_js_1.ChromeReleaseChannel).includes(channel)) {
+ return (await getLastKnownGoodReleaseForChannel(channel)).version;
+ }
+ if (channel.match(/^\d+$/)) {
+ // Potentially a milestone.
+ return (await getLastKnownGoodReleaseForMilestone(channel))?.version;
+ }
+ if (channel.match(/^\d+\.\d+\.\d+$/)) {
+ // Potentially a build prefix without the patch version.
+ return (await getLastKnownGoodReleaseForBuild(channel))?.version;
+ }
+ return;
+}
+exports.resolveBuildId = resolveBuildId;
+function resolveSystemExecutablePath(platform, channel) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.WIN64:
+ case types_js_1.BrowserPlatform.WIN32:
+ switch (channel) {
+ case types_js_1.ChromeReleaseChannel.STABLE:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome\\Application\\chrome.exe`;
+ case types_js_1.ChromeReleaseChannel.BETA:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome Beta\\Application\\chrome.exe`;
+ case types_js_1.ChromeReleaseChannel.CANARY:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome SxS\\Application\\chrome.exe`;
+ case types_js_1.ChromeReleaseChannel.DEV:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome Dev\\Application\\chrome.exe`;
+ }
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ switch (channel) {
+ case types_js_1.ChromeReleaseChannel.STABLE:
+ return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
+ case types_js_1.ChromeReleaseChannel.BETA:
+ return '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta';
+ case types_js_1.ChromeReleaseChannel.CANARY:
+ return '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary';
+ case types_js_1.ChromeReleaseChannel.DEV:
+ return '/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev';
+ }
+ case types_js_1.BrowserPlatform.LINUX:
+ switch (channel) {
+ case types_js_1.ChromeReleaseChannel.STABLE:
+ return '/opt/google/chrome/chrome';
+ case types_js_1.ChromeReleaseChannel.BETA:
+ return '/opt/google/chrome-beta/chrome';
+ case types_js_1.ChromeReleaseChannel.DEV:
+ return '/opt/google/chrome-unstable/chrome';
+ }
+ }
+ throw new Error(`Unable to detect browser executable path for '${channel}' on ${platform}.`);
+}
+exports.resolveSystemExecutablePath = resolveSystemExecutablePath;
+function compareVersions(a, b) {
+ if (!semver_1.default.valid(a)) {
+ throw new Error(`Version ${a} is not a valid semver version`);
+ }
+ if (!semver_1.default.valid(b)) {
+ throw new Error(`Version ${b} is not a valid semver version`);
+ }
+ if (semver_1.default.gt(a, b)) {
+ return 1;
+ }
+ else if (semver_1.default.lt(a, b)) {
+ return -1;
+ }
+ else {
+ return 0;
+ }
+}
+exports.compareVersions = compareVersions;
+//# sourceMappingURL=chrome.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map
new file mode 100644
index 00000000..f3b91561
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,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diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts
new file mode 100644
index 00000000..5a26c3f9
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts
@@ -0,0 +1,6 @@
+import { BrowserPlatform } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export { resolveBuildId, compareVersions } from './chrome.js';
+//# sourceMappingURL=chromedriver.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map
new file mode 100644
index 00000000..6f59ef1b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js
new file mode 100644
index 00000000..aa6fe18c
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js
@@ -0,0 +1,52 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.compareVersions = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+const path_1 = __importDefault(require("path"));
+const types_js_1 = require("./types.js");
+function folder(platform) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return 'linux64';
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case types_js_1.BrowserPlatform.MAC:
+ return 'mac-x64';
+ case types_js_1.BrowserPlatform.WIN32:
+ return 'win32';
+ case types_js_1.BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+exports.resolveDownloadUrl = resolveDownloadUrl;
+function resolveDownloadPath(platform, buildId) {
+ return [buildId, folder(platform), `chromedriver-${folder(platform)}.zip`];
+}
+exports.resolveDownloadPath = resolveDownloadPath;
+function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.MAC:
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return path_1.default.join('chromedriver-' + folder(platform), 'chromedriver');
+ case types_js_1.BrowserPlatform.LINUX:
+ return path_1.default.join('chromedriver-linux64', 'chromedriver');
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return path_1.default.join('chromedriver-' + folder(platform), 'chromedriver.exe');
+ }
+}
+exports.relativeExecutablePath = relativeExecutablePath;
+var chrome_js_1 = require("./chrome.js");
+Object.defineProperty(exports, "resolveBuildId", { enumerable: true, get: function () { return chrome_js_1.resolveBuildId; } });
+Object.defineProperty(exports, "compareVersions", { enumerable: true, get: function () { return chrome_js_1.compareVersions; } });
+//# sourceMappingURL=chromedriver.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map
new file mode 100644
index 00000000..9a70f5c4
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":";;;;;;AAAA;;;;GAIG;AACH,gDAAwB;AAExB,yCAA2C;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAgB,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAND,gDAMC;AAED,SAAgB,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,gBAAgB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7E,CAAC;AALD,kDAKC;AAED,SAAgB,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,GAAG,CAAC;QACzB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,cAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;QACvE,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;QAC3D,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAdD,wDAcC;AAED,yCAA4D;AAApD,2GAAA,cAAc,OAAA;AAAE,4GAAA,eAAe,OAAA"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts
new file mode 100644
index 00000000..6bcb9366
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts
@@ -0,0 +1,12 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export declare function resolveBuildId(platform: BrowserPlatform): Promise;
+export declare function compareVersions(a: string, b: string): number;
+//# sourceMappingURL=chromium.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map
new file mode 100644
index 00000000..72e3a10b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromium.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AA+B3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA8D,GACpE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AACD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js
new file mode 100644
index 00000000..e9faeafa
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js
@@ -0,0 +1,71 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.compareVersions = exports.resolveBuildId = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+const path_1 = __importDefault(require("path"));
+const httpUtil_js_1 = require("../httpUtil.js");
+const types_js_1 = require("./types.js");
+function archive(platform, buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return 'chrome-linux';
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ return 'chrome-mac';
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ // Windows archive name changed at r591479.
+ return parseInt(buildId, 10) > 591479 ? 'chrome-win' : 'chrome-win32';
+ }
+}
+function folder(platform) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return 'Linux_x64';
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return 'Mac_Arm';
+ case types_js_1.BrowserPlatform.MAC:
+ return 'Mac';
+ case types_js_1.BrowserPlatform.WIN32:
+ return 'Win';
+ case types_js_1.BrowserPlatform.WIN64:
+ return 'Win_x64';
+ }
+}
+function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chromium-browser-snapshots') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+exports.resolveDownloadUrl = resolveDownloadUrl;
+function resolveDownloadPath(platform, buildId) {
+ return [folder(platform), buildId, `${archive(platform, buildId)}.zip`];
+}
+exports.resolveDownloadPath = resolveDownloadPath;
+function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.MAC:
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ return path_1.default.join('chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium');
+ case types_js_1.BrowserPlatform.LINUX:
+ return path_1.default.join('chrome-linux', 'chrome');
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return path_1.default.join('chrome-win', 'chrome.exe');
+ }
+}
+exports.relativeExecutablePath = relativeExecutablePath;
+async function resolveBuildId(platform) {
+ return await (0, httpUtil_js_1.getText)(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
+}
+exports.resolveBuildId = resolveBuildId;
+function compareVersions(a, b) {
+ return Number(a) - Number(b);
+}
+exports.compareVersions = compareVersions;
+//# sourceMappingURL=chromium.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map
new file mode 100644
index 00000000..31d55f6c
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,gDAAwB;AAExB,gDAAuC;AAEvC,yCAA2C;AAE3C,SAAS,OAAO,CAAC,QAAyB,EAAE,OAAe;IACzD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,cAAc,CAAC;QACxB,KAAK,0BAAe,CAAC,OAAO,CAAC;QAC7B,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,YAAY,CAAC;QACtB,KAAK,0BAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,0BAAe,CAAC,KAAK;YACxB,2CAA2C;YAC3C,OAAO,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC;IAC1E,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,WAAW,CAAC;QACrB,KAAK,0BAAe,CAAC,OAAO;YAC1B,OAAO,SAAS,CAAC;QACnB,KAAK,0BAAe,CAAC,GAA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CAAC;AAVD,wCAUC;AAED,SAAgB,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC;AAFD,0CAEC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts
new file mode 100644
index 00000000..447f91d7
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts
@@ -0,0 +1,20 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform, type ProfileOptions } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, buildId: string): string;
+export declare enum FirefoxChannel {
+ STABLE = "stable",
+ ESR = "esr",
+ DEVEDITION = "devedition",
+ BETA = "beta",
+ NIGHTLY = "nightly"
+}
+export declare function resolveBuildId(channel?: FirefoxChannel): Promise;
+export declare function createProfile(options: ProfileOptions): Promise;
+export declare function compareVersions(a: string, b: string): number;
+//# sourceMappingURL=firefox.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map
new file mode 100644
index 00000000..1169d14f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,eAAe,EAAE,KAAK,cAAc,EAAC,MAAM,YAAY,CAAC;AAoDhE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAyBR;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,CAkCR;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,cAAuC,GAC/C,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E;AA8PD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js
new file mode 100644
index 00000000..63b3738f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js
@@ -0,0 +1,358 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.compareVersions = exports.createProfile = exports.resolveBuildId = exports.FirefoxChannel = exports.relativeExecutablePath = exports.resolveDownloadPath = exports.resolveDownloadUrl = void 0;
+const fs_1 = __importDefault(require("fs"));
+const path_1 = __importDefault(require("path"));
+const httpUtil_js_1 = require("../httpUtil.js");
+const types_js_1 = require("./types.js");
+function archiveNightly(platform, buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return `firefox-${buildId}.en-US.${platform}-x86_64.tar.bz2`;
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ return `firefox-${buildId}.en-US.mac.dmg`;
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return `firefox-${buildId}.en-US.${platform}.zip`;
+ }
+}
+function archive(platform, buildId) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return `firefox-${buildId}.tar.bz2`;
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ return `Firefox ${buildId}.dmg`;
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return `Firefox Setup ${buildId}.exe`;
+ }
+}
+function platformName(platform) {
+ switch (platform) {
+ case types_js_1.BrowserPlatform.LINUX:
+ return `linux-x86_64`;
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ return `mac`;
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return platform;
+ }
+}
+function parseBuildId(buildId) {
+ for (const value of Object.values(FirefoxChannel)) {
+ if (buildId.startsWith(value + '_')) {
+ buildId = buildId.substring(value.length + 1);
+ return [value, buildId];
+ }
+ }
+ // Older versions do not have channel as the prefix.«
+ return [FirefoxChannel.NIGHTLY, buildId];
+}
+function resolveDownloadUrl(platform, buildId, baseUrl) {
+ const [channel, resolvedBuildId] = parseBuildId(buildId);
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ baseUrl ??=
+ 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central';
+ break;
+ case FirefoxChannel.DEVEDITION:
+ baseUrl ??= 'https://archive.mozilla.org/pub/devedition/releases';
+ break;
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.STABLE:
+ case FirefoxChannel.ESR:
+ baseUrl ??= 'https://archive.mozilla.org/pub/firefox/releases';
+ break;
+ }
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ return `${baseUrl}/${resolveDownloadPath(platform, resolvedBuildId).join('/')}`;
+ case FirefoxChannel.DEVEDITION:
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.STABLE:
+ case FirefoxChannel.ESR:
+ return `${baseUrl}/${resolvedBuildId}/${platformName(platform)}/en-US/${archive(platform, resolvedBuildId)}`;
+ }
+}
+exports.resolveDownloadUrl = resolveDownloadUrl;
+function resolveDownloadPath(platform, buildId) {
+ return [archiveNightly(platform, buildId)];
+}
+exports.resolveDownloadPath = resolveDownloadPath;
+function relativeExecutablePath(platform, buildId) {
+ const [channel] = parseBuildId(buildId);
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ switch (platform) {
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ return path_1.default.join('Firefox Nightly.app', 'Contents', 'MacOS', 'firefox');
+ case types_js_1.BrowserPlatform.LINUX:
+ return path_1.default.join('firefox', 'firefox');
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return path_1.default.join('firefox', 'firefox.exe');
+ }
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.DEVEDITION:
+ case FirefoxChannel.ESR:
+ case FirefoxChannel.STABLE:
+ switch (platform) {
+ case types_js_1.BrowserPlatform.MAC_ARM:
+ case types_js_1.BrowserPlatform.MAC:
+ return path_1.default.join('Firefox.app', 'Contents', 'MacOS', 'firefox');
+ case types_js_1.BrowserPlatform.LINUX:
+ return path_1.default.join('firefox', 'firefox');
+ case types_js_1.BrowserPlatform.WIN32:
+ case types_js_1.BrowserPlatform.WIN64:
+ return path_1.default.join('core', 'firefox.exe');
+ }
+ }
+}
+exports.relativeExecutablePath = relativeExecutablePath;
+var FirefoxChannel;
+(function (FirefoxChannel) {
+ FirefoxChannel["STABLE"] = "stable";
+ FirefoxChannel["ESR"] = "esr";
+ FirefoxChannel["DEVEDITION"] = "devedition";
+ FirefoxChannel["BETA"] = "beta";
+ FirefoxChannel["NIGHTLY"] = "nightly";
+})(FirefoxChannel || (exports.FirefoxChannel = FirefoxChannel = {}));
+async function resolveBuildId(channel = FirefoxChannel.NIGHTLY) {
+ const channelToVersionKey = {
+ [FirefoxChannel.ESR]: 'FIREFOX_ESR',
+ [FirefoxChannel.STABLE]: 'LATEST_FIREFOX_VERSION',
+ [FirefoxChannel.DEVEDITION]: 'FIREFOX_DEVEDITION',
+ [FirefoxChannel.BETA]: 'FIREFOX_DEVEDITION',
+ [FirefoxChannel.NIGHTLY]: 'FIREFOX_NIGHTLY',
+ };
+ const versions = (await (0, httpUtil_js_1.getJSON)(new URL('https://product-details.mozilla.org/1.0/firefox_versions.json')));
+ const version = versions[channelToVersionKey[channel]];
+ if (!version) {
+ throw new Error(`Channel ${channel} is not found.`);
+ }
+ return channel + '_' + version;
+}
+exports.resolveBuildId = resolveBuildId;
+async function createProfile(options) {
+ if (!fs_1.default.existsSync(options.path)) {
+ await fs_1.default.promises.mkdir(options.path, {
+ recursive: true,
+ });
+ }
+ await writePreferences({
+ preferences: {
+ ...defaultProfilePreferences(options.preferences),
+ ...options.preferences,
+ },
+ path: options.path,
+ });
+}
+exports.createProfile = createProfile;
+function defaultProfilePreferences(extraPrefs) {
+ const server = 'dummy.test';
+ const defaultPrefs = {
+ // Make sure Shield doesn't hit the network.
+ 'app.normandy.api_url': '',
+ // Disable Firefox old build background check
+ 'app.update.checkInstallTime': false,
+ // Disable automatically upgrading Firefox
+ 'app.update.disabledForTesting': true,
+ // Increase the APZ content response timeout to 1 minute
+ 'apz.content_response_timeout': 60000,
+ // Prevent various error message on the console
+ // jest-puppeteer asserts that no error message is emitted by the console
+ 'browser.contentblocking.features.standard': '-tp,tpPrivate,cookieBehavior0,-cm,-fp',
+ // Enable the dump function: which sends messages to the system
+ // console
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1543115
+ 'browser.dom.window.dump.enabled': true,
+ // Disable topstories
+ 'browser.newtabpage.activity-stream.feeds.system.topstories': false,
+ // Always display a blank page
+ 'browser.newtabpage.enabled': false,
+ // Background thumbnails in particular cause grief: and disabling
+ // thumbnails in general cannot hurt
+ 'browser.pagethumbnails.capturing_disabled': true,
+ // Disable safebrowsing components.
+ 'browser.safebrowsing.blockedURIs.enabled': false,
+ 'browser.safebrowsing.downloads.enabled': false,
+ 'browser.safebrowsing.malware.enabled': false,
+ 'browser.safebrowsing.phishing.enabled': false,
+ // Disable updates to search engines.
+ 'browser.search.update': false,
+ // Do not restore the last open set of tabs if the browser has crashed
+ 'browser.sessionstore.resume_from_crash': false,
+ // Skip check for default browser on startup
+ 'browser.shell.checkDefaultBrowser': false,
+ // Disable newtabpage
+ 'browser.startup.homepage': 'about:blank',
+ // Do not redirect user when a milstone upgrade of Firefox is detected
+ 'browser.startup.homepage_override.mstone': 'ignore',
+ // Start with a blank page about:blank
+ 'browser.startup.page': 0,
+ // Do not allow background tabs to be zombified on Android: otherwise for
+ // tests that open additional tabs: the test harness tab itself might get
+ // unloaded
+ 'browser.tabs.disableBackgroundZombification': false,
+ // Do not warn when closing all other open tabs
+ 'browser.tabs.warnOnCloseOtherTabs': false,
+ // Do not warn when multiple tabs will be opened
+ 'browser.tabs.warnOnOpen': false,
+ // Do not automatically offer translations, as tests do not expect this.
+ 'browser.translations.automaticallyPopup': false,
+ // Disable the UI tour.
+ 'browser.uitour.enabled': false,
+ // Turn off search suggestions in the location bar so as not to trigger
+ // network connections.
+ 'browser.urlbar.suggest.searches': false,
+ // Disable first run splash page on Windows 10
+ 'browser.usedOnWindows10.introURL': '',
+ // Do not warn on quitting Firefox
+ 'browser.warnOnQuit': false,
+ // Defensively disable data reporting systems
+ 'datareporting.healthreport.documentServerURI': `http://${server}/dummy/healthreport/`,
+ 'datareporting.healthreport.logging.consoleEnabled': false,
+ 'datareporting.healthreport.service.enabled': false,
+ 'datareporting.healthreport.service.firstRun': false,
+ 'datareporting.healthreport.uploadEnabled': false,
+ // Do not show datareporting policy notifications which can interfere with tests
+ 'datareporting.policy.dataSubmissionEnabled': false,
+ 'datareporting.policy.dataSubmissionPolicyBypassNotification': true,
+ // DevTools JSONViewer sometimes fails to load dependencies with its require.js.
+ // This doesn't affect Puppeteer but spams console (Bug 1424372)
+ 'devtools.jsonview.enabled': false,
+ // Disable popup-blocker
+ 'dom.disable_open_during_load': false,
+ // Enable the support for File object creation in the content process
+ // Required for |Page.setFileInputFiles| protocol method.
+ 'dom.file.createInChild': true,
+ // Disable the ProcessHangMonitor
+ 'dom.ipc.reportProcessHangs': false,
+ // Disable slow script dialogues
+ 'dom.max_chrome_script_run_time': 0,
+ 'dom.max_script_run_time': 0,
+ // Only load extensions from the application and user profile
+ // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION
+ 'extensions.autoDisableScopes': 0,
+ 'extensions.enabledScopes': 5,
+ // Disable metadata caching for installed add-ons by default
+ 'extensions.getAddons.cache.enabled': false,
+ // Disable installing any distribution extensions or add-ons.
+ 'extensions.installDistroAddons': false,
+ // Disabled screenshots extension
+ 'extensions.screenshots.disabled': true,
+ // Turn off extension updates so they do not bother tests
+ 'extensions.update.enabled': false,
+ // Turn off extension updates so they do not bother tests
+ 'extensions.update.notifyUser': false,
+ // Make sure opening about:addons will not hit the network
+ 'extensions.webservice.discoverURL': `http://${server}/dummy/discoveryURL`,
+ // Allow the application to have focus even it runs in the background
+ 'focusmanager.testmode': true,
+ // Disable useragent updates
+ 'general.useragent.updates.enabled': false,
+ // Always use network provider for geolocation tests so we bypass the
+ // macOS dialog raised by the corelocation provider
+ 'geo.provider.testing': true,
+ // Do not scan Wifi
+ 'geo.wifi.scan': false,
+ // No hang monitor
+ 'hangmonitor.timeout': 0,
+ // Show chrome errors and warnings in the error console
+ 'javascript.options.showInConsole': true,
+ // Disable download and usage of OpenH264: and Widevine plugins
+ 'media.gmp-manager.updateEnabled': false,
+ // Disable the GFX sanity window
+ 'media.sanity-test.disabled': true,
+ // Disable experimental feature that is only available in Nightly
+ 'network.cookie.sameSite.laxByDefault': false,
+ // Do not prompt for temporary redirects
+ 'network.http.prompt-temp-redirect': false,
+ // Disable speculative connections so they are not reported as leaking
+ // when they are hanging around
+ 'network.http.speculative-parallel-limit': 0,
+ // Do not automatically switch between offline and online
+ 'network.manage-offline-status': false,
+ // Make sure SNTP requests do not hit the network
+ 'network.sntp.pools': server,
+ // Disable Flash.
+ 'plugin.state.flash': 0,
+ 'privacy.trackingprotection.enabled': false,
+ // Can be removed once Firefox 89 is no longer supported
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1710839
+ 'remote.enabled': true,
+ // Don't do network connections for mitm priming
+ 'security.certerrors.mitm.priming.enabled': false,
+ // Local documents have access to all other local documents,
+ // including directory listings
+ 'security.fileuri.strict_origin_policy': false,
+ // Do not wait for the notification button security delay
+ 'security.notification_enable_delay': 0,
+ // Ensure blocklist updates do not hit the network
+ 'services.settings.server': `http://${server}/dummy/blocklist/`,
+ // Do not automatically fill sign-in forms with known usernames and
+ // passwords
+ 'signon.autofillForms': false,
+ // Disable password capture, so that tests that include forms are not
+ // influenced by the presence of the persistent doorhanger notification
+ 'signon.rememberSignons': false,
+ // Disable first-run welcome page
+ 'startup.homepage_welcome_url': 'about:blank',
+ // Disable first-run welcome page
+ 'startup.homepage_welcome_url.additional': '',
+ // Disable browser animations (tabs, fullscreen, sliding alerts)
+ 'toolkit.cosmeticAnimations.enabled': false,
+ // Prevent starting into safe mode after application crashes
+ 'toolkit.startup.max_resumed_crashes': -1,
+ };
+ return Object.assign(defaultPrefs, extraPrefs);
+}
+/**
+ * Populates the user.js file with custom preferences as needed to allow
+ * Firefox's CDP support to properly function. These preferences will be
+ * automatically copied over to prefs.js during startup of Firefox. To be
+ * able to restore the original values of preferences a backup of prefs.js
+ * will be created.
+ *
+ * @param prefs - List of preferences to add.
+ * @param profilePath - Firefox profile to write the preferences to.
+ */
+async function writePreferences(options) {
+ const prefsPath = path_1.default.join(options.path, 'prefs.js');
+ const lines = Object.entries(options.preferences).map(([key, value]) => {
+ return `user_pref(${JSON.stringify(key)}, ${JSON.stringify(value)});`;
+ });
+ // Use allSettled to prevent corruption
+ const result = await Promise.allSettled([
+ fs_1.default.promises.writeFile(path_1.default.join(options.path, 'user.js'), lines.join('\n')),
+ // Create a backup of the preferences file if it already exitsts.
+ fs_1.default.promises.access(prefsPath, fs_1.default.constants.F_OK).then(async () => {
+ await fs_1.default.promises.copyFile(prefsPath, path_1.default.join(options.path, 'prefs.js.puppeteer'));
+ },
+ // Swallow only if file does not exist
+ () => { }),
+ ]);
+ for (const command of result) {
+ if (command.status === 'rejected') {
+ throw command.reason;
+ }
+ }
+}
+function compareVersions(a, b) {
+ // TODO: this is a not very reliable check.
+ return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16);
+}
+exports.compareVersions = compareVersions;
+//# sourceMappingURL=firefox.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js.map
new file mode 100644
index 00000000..595668c6
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"firefox.js","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,4CAAoB;AACpB,gDAAwB;AAExB,gDAAuC;AAEvC,yCAAgE;AAEhE,SAAS,cAAc,CAAC,QAAyB,EAAE,OAAe;IAChE,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,0BAAe,CAAC,KAAK;YACxB,OAAO,WAAW,OAAO,UAAU,QAAQ,iBAAiB,CAAC;QAC/D,KAAK,0BAAe,CAAC,OAAO,CAAC;QAC7B,KAAK,0BAAe,CAAC,GAAG;YACtB,OAAO,WAA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lib/cjs/browser-data/types.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.d.ts
new file mode 100644
index 00000000..652535ba
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.d.ts
@@ -0,0 +1,60 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * Supported browsers.
+ *
+ * @public
+ */
+export declare enum Browser {
+ CHROME = "chrome",
+ CHROMEHEADLESSSHELL = "chrome-headless-shell",
+ CHROMIUM = "chromium",
+ FIREFOX = "firefox",
+ CHROMEDRIVER = "chromedriver"
+}
+/**
+ * Platform names used to identify a OS platform x architecture combination in the way
+ * that is relevant for the browser download.
+ *
+ * @public
+ */
+export declare enum BrowserPlatform {
+ LINUX = "linux",
+ MAC = "mac",
+ MAC_ARM = "mac_arm",
+ WIN32 = "win32",
+ WIN64 = "win64"
+}
+/**
+ * @public
+ */
+export declare enum BrowserTag {
+ CANARY = "canary",
+ NIGHTLY = "nightly",
+ BETA = "beta",
+ DEV = "dev",
+ DEVEDITION = "devedition",
+ STABLE = "stable",
+ ESR = "esr",
+ LATEST = "latest"
+}
+/**
+ * @public
+ */
+export interface ProfileOptions {
+ preferences: Record;
+ path: string;
+}
+/**
+ * @public
+ */
+export declare enum ChromeReleaseChannel {
+ STABLE = "stable",
+ DEV = "dev",
+ CANARY = "canary",
+ BETA = "beta"
+}
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.d.ts.map
new file mode 100644
index 00000000..14cc749f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/browser-data/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,oBAAY,OAAO;IACjB,MAAM,WAAW;IACjB,mBAAmB,0BAA0B;IAC7C,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,YAAY,iBAAiB;CAC9B;AAED;;;;;GAKG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.js b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.js
new file mode 100644
index 00000000..f99752d6
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.js
@@ -0,0 +1,60 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ChromeReleaseChannel = exports.BrowserTag = exports.BrowserPlatform = exports.Browser = void 0;
+/**
+ * Supported browsers.
+ *
+ * @public
+ */
+var Browser;
+(function (Browser) {
+ Browser["CHROME"] = "chrome";
+ Browser["CHROMEHEADLESSSHELL"] = "chrome-headless-shell";
+ Browser["CHROMIUM"] = "chromium";
+ Browser["FIREFOX"] = "firefox";
+ Browser["CHROMEDRIVER"] = "chromedriver";
+})(Browser || (exports.Browser = Browser = {}));
+/**
+ * Platform names used to identify a OS platform x architecture combination in the way
+ * that is relevant for the browser download.
+ *
+ * @public
+ */
+var BrowserPlatform;
+(function (BrowserPlatform) {
+ BrowserPlatform["LINUX"] = "linux";
+ BrowserPlatform["MAC"] = "mac";
+ BrowserPlatform["MAC_ARM"] = "mac_arm";
+ BrowserPlatform["WIN32"] = "win32";
+ BrowserPlatform["WIN64"] = "win64";
+})(BrowserPlatform || (exports.BrowserPlatform = BrowserPlatform = {}));
+/**
+ * @public
+ */
+var BrowserTag;
+(function (BrowserTag) {
+ BrowserTag["CANARY"] = "canary";
+ BrowserTag["NIGHTLY"] = "nightly";
+ BrowserTag["BETA"] = "beta";
+ BrowserTag["DEV"] = "dev";
+ BrowserTag["DEVEDITION"] = "devedition";
+ BrowserTag["STABLE"] = "stable";
+ BrowserTag["ESR"] = "esr";
+ BrowserTag["LATEST"] = "latest";
+})(BrowserTag || (exports.BrowserTag = BrowserTag = {}));
+/**
+ * @public
+ */
+var ChromeReleaseChannel;
+(function (ChromeReleaseChannel) {
+ ChromeReleaseChannel["STABLE"] = "stable";
+ ChromeReleaseChannel["DEV"] = "dev";
+ ChromeReleaseChannel["CANARY"] = "canary";
+ ChromeReleaseChannel["BETA"] = "beta";
+})(ChromeReleaseChannel || (exports.ChromeReleaseChannel = ChromeReleaseChannel = {}));
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.js.map b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.js.map
new file mode 100644
index 00000000..f586cbe5
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/browser-data/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/browser-data/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;GAIG;AACH,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,4BAAiB,CAAA;IACjB,wDAA6C,CAAA;IAC7C,gCAAqB,CAAA;IACrB,8BAAmB,CAAA;IACnB,wCAA6B,CAAA;AAC/B,CAAC,EANW,OAAO,uBAAP,OAAO,QAMlB;AAED;;;;;GAKG;AACH,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,8BAAW,CAAA;IACX,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAED;;GAEG;AACH,IAAY,UASX;AATD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,uCAAyB,CAAA;IACzB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACnB,CAAC,EATW,UAAU,0BAAV,UAAU,QASrB;AAUD;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,mCAAW,CAAA;IACX,yCAAiB,CAAA;IACjB,qCAAa,CAAA;AACf,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/debug.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/debug.d.ts
new file mode 100644
index 00000000..aa062da3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/debug.d.ts
@@ -0,0 +1,8 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import debug from 'debug';
+export { debug };
+//# sourceMappingURL=debug.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/debug.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/debug.d.ts.map
new file mode 100644
index 00000000..2f5f252d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/debug.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/debug.js b/node_modules/@puppeteer/browsers/lib/cjs/debug.js
new file mode 100644
index 00000000..754d7e2b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/debug.js
@@ -0,0 +1,14 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.debug = void 0;
+const debug_1 = __importDefault(require("debug"));
+exports.debug = debug_1.default;
+//# sourceMappingURL=debug.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/debug.js.map b/node_modules/@puppeteer/browsers/lib/cjs/debug.js.map
new file mode 100644
index 00000000..e300130a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/debug.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,kDAA0B;AAElB,gBAFD,eAAK,CAEC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.d.ts
new file mode 100644
index 00000000..3ed4758a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.d.ts
@@ -0,0 +1,11 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export declare function detectBrowserPlatform(): BrowserPlatform | undefined;
+//# sourceMappingURL=detectPlatform.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.d.ts.map
new file mode 100644
index 00000000..d6643762
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"detectPlatform.d.ts","sourceRoot":"","sources":["../../src/detectPlatform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,GAAG,SAAS,CAkBnE"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.js b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.js
new file mode 100644
index 00000000..4dc76698
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.js
@@ -0,0 +1,53 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.detectBrowserPlatform = void 0;
+const os_1 = __importDefault(require("os"));
+const browser_data_js_1 = require("./browser-data/browser-data.js");
+/**
+ * @public
+ */
+function detectBrowserPlatform() {
+ const platform = os_1.default.platform();
+ switch (platform) {
+ case 'darwin':
+ return os_1.default.arch() === 'arm64'
+ ? browser_data_js_1.BrowserPlatform.MAC_ARM
+ : browser_data_js_1.BrowserPlatform.MAC;
+ case 'linux':
+ return browser_data_js_1.BrowserPlatform.LINUX;
+ case 'win32':
+ return os_1.default.arch() === 'x64' ||
+ // Windows 11 for ARM supports x64 emulation
+ (os_1.default.arch() === 'arm64' && isWindows11(os_1.default.release()))
+ ? browser_data_js_1.BrowserPlatform.WIN64
+ : browser_data_js_1.BrowserPlatform.WIN32;
+ default:
+ return undefined;
+ }
+}
+exports.detectBrowserPlatform = detectBrowserPlatform;
+/**
+ * Windows 11 is identified by the version 10.0.22000 or greater
+ * @internal
+ */
+function isWindows11(version) {
+ const parts = version.split('.');
+ if (parts.length > 2) {
+ const major = parseInt(parts[0], 10);
+ const minor = parseInt(parts[1], 10);
+ const patch = parseInt(parts[2], 10);
+ return (major > 10 ||
+ (major === 10 && minor > 0) ||
+ (major === 10 && minor === 0 && patch >= 22000));
+ }
+ return false;
+}
+//# sourceMappingURL=detectPlatform.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.js.map b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.js.map
new file mode 100644
index 00000000..f12c9a76
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/detectPlatform.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"detectPlatform.js","sourceRoot":"","sources":["../../src/detectPlatform.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,4CAAoB;AAEpB,oEAA+D;AAE/D;;GAEG;AACH,SAAgB,qBAAqB;IACnC,MAAM,QAAQ,GAAG,YAAE,CAAC,QAAQ,EAAE,CAAC;IAC/B,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,YAAE,CAAC,IAAI,EAAE,KAAK,OAAO;gBAC1B,CAAC,CAAC,iCAAe,CAAC,OAAO;gBACzB,CAAC,CAAC,iCAAe,CAAC,GAAG,CAAC;QAC1B,KAAK,OAAO;YACV,OAAO,iCAAe,CAAC,KAAK,CAAC;QAC/B,KAAK,OAAO;YACV,OAAO,YAAE,CAAC,IAAI,EAAE,KAAK,KAAK;gBACxB,4CAA4C;gBAC5C,CAAC,YAAE,CAAC,IAAI,EAAE,KAAK,OAAO,IAAI,WAAW,CAAC,YAAE,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpD,CAAC,CAAC,iCAAe,CAAC,KAAK;gBACvB,CAAC,CAAC,iCAAe,CAAC,KAAK,CAAC;QAC5B;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAlBD,sDAkBC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,OAAe;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;QAC/C,OAAO,CACL,KAAK,GAAG,EAAE;YACV,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC;YAC3B,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,CAChD,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.d.ts
new file mode 100644
index 00000000..af56994c
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.d.ts
@@ -0,0 +1,10 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * @internal
+ */
+export declare function unpackArchive(archivePath: string, folderPath: string): Promise;
+//# sourceMappingURL=fileUtil.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.d.ts.map
new file mode 100644
index 00000000..1f20e1be
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"fileUtil.d.ts","sourceRoot":"","sources":["../../src/fileUtil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;GAEG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js
new file mode 100644
index 00000000..82ca7f0b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js
@@ -0,0 +1,111 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+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.unpackArchive = void 0;
+const child_process_1 = require("child_process");
+const fs_1 = require("fs");
+const promises_1 = require("fs/promises");
+const path = __importStar(require("path"));
+const util_1 = require("util");
+const extract_zip_1 = __importDefault(require("extract-zip"));
+const tar_fs_1 = __importDefault(require("tar-fs"));
+const unbzip2_stream_1 = __importDefault(require("unbzip2-stream"));
+const exec = (0, util_1.promisify)(child_process_1.exec);
+/**
+ * @internal
+ */
+async function unpackArchive(archivePath, folderPath) {
+ if (archivePath.endsWith('.zip')) {
+ await (0, extract_zip_1.default)(archivePath, { dir: folderPath });
+ }
+ else if (archivePath.endsWith('.tar.bz2')) {
+ await extractTar(archivePath, folderPath);
+ }
+ else if (archivePath.endsWith('.dmg')) {
+ await (0, promises_1.mkdir)(folderPath);
+ await installDMG(archivePath, folderPath);
+ }
+ else if (archivePath.endsWith('.exe')) {
+ // Firefox on Windows.
+ const result = (0, child_process_1.spawnSync)(archivePath, [`/ExtractDir=${folderPath}`], {
+ env: {
+ __compat_layer: 'RunAsInvoker',
+ },
+ });
+ if (result.status !== 0) {
+ throw new Error(`Failed to extract ${archivePath} to ${folderPath}: ${result.output}`);
+ }
+ }
+ else {
+ throw new Error(`Unsupported archive format: ${archivePath}`);
+ }
+}
+exports.unpackArchive = unpackArchive;
+/**
+ * @internal
+ */
+function extractTar(tarPath, folderPath) {
+ return new Promise((fulfill, reject) => {
+ const tarStream = tar_fs_1.default.extract(folderPath);
+ tarStream.on('error', reject);
+ tarStream.on('finish', fulfill);
+ const readStream = (0, fs_1.createReadStream)(tarPath);
+ readStream.pipe((0, unbzip2_stream_1.default)()).pipe(tarStream);
+ });
+}
+/**
+ * @internal
+ */
+async function installDMG(dmgPath, folderPath) {
+ const { stdout } = await exec(`hdiutil attach -nobrowse -noautoopen "${dmgPath}"`);
+ const volumes = stdout.match(/\/Volumes\/(.*)/m);
+ if (!volumes) {
+ throw new Error(`Could not find volume path in ${stdout}`);
+ }
+ const mountPath = volumes[0];
+ try {
+ const fileNames = await (0, promises_1.readdir)(mountPath);
+ const appName = fileNames.find(item => {
+ return typeof item === 'string' && item.endsWith('.app');
+ });
+ if (!appName) {
+ throw new Error(`Cannot find app in ${mountPath}`);
+ }
+ const mountedPath = path.join(mountPath, appName);
+ await exec(`cp -R "${mountedPath}" "${folderPath}"`);
+ }
+ finally {
+ await exec(`hdiutil detach "${mountPath}" -quiet`);
+ }
+}
+//# sourceMappingURL=fileUtil.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js.map b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js.map
new file mode 100644
index 00000000..56ec22c1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/fileUtil.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"fileUtil.js","sourceRoot":"","sources":["../../src/fileUtil.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iDAAkE;AAClE,2BAAoC;AACpC,0CAA2C;AAC3C,2CAA6B;AAC7B,+BAA+B;AAE/B,8DAAqC;AACrC,oDAAyB;AACzB,oEAAkC;AAElC,MAAM,IAAI,GAAG,IAAA,gBAAS,EAAC,oBAAgB,CAAC,CAAC;AAEzC;;GAEG;AACI,KAAK,UAAU,aAAa,CACjC,WAAmB,EACnB,UAAkB;IAElB,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACjC,MAAM,IAAA,qBAAU,EAAC,WAAW,EAAE,EAAC,GAAG,EAAE,UAAU,EAAC,CAAC,CAAC;IACnD,CAAC;SAAM,IAAI,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAC5C,MAAM,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC5C,CAAC;SAAM,IAAI,WAAW,CAAC,QAAQ,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3D,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CACzB,yCAAyC,OAAO,GAAG,CACpD,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC;IAE9B,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,IAAA,kBAAO,EAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACpC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAU,EAAE,OAAO,CAAC,CAAC;QAEnD,MAAM,IAAI,CAAC,UAAU,WAAW,MAAM,UAAU,GAAG,CAAC,CAAC;IACvD,CAAC;YAAS,CAAC;QACT,MAAM,IAAI,CAAC,mBAAmB,SAAS,UAAU,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.d.ts
new file mode 100644
index 00000000..48bfd376
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.d.ts
@@ -0,0 +1,18 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+///
+///
+import * as http from 'http';
+import { URL } from 'url';
+export declare function headHttpRequest(url: URL): Promise;
+export declare function httpRequest(url: URL, method: string, response: (x: http.IncomingMessage) => void, keepAlive?: boolean): http.ClientRequest;
+/**
+ * @internal
+ */
+export declare function downloadFile(url: URL, destinationPath: string, progressCallback?: (downloadedBytes: number, totalBytes: number) => void): Promise;
+export declare function getJSON(url: URL): Promise;
+export declare function getText(url: URL): Promise;
+//# sourceMappingURL=httpUtil.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.d.ts.map
new file mode 100644
index 00000000..4182f826
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"httpUtil.d.ts","sourceRoot":"","sources":["../../src/httpUtil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAGH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAC,GAAG,EAAmB,MAAM,KAAK,CAAC;AAI1C,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAgB1D;AAED,wBAAgB,WAAW,CACzB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,KAAK,IAAI,EAC3C,SAAS,UAAO,GACf,IAAI,CAAC,aAAa,CAiCpB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,eAAe,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,GACvE,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAOxD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BjD"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.js b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.js
new file mode 100644
index 00000000..94717a12
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.js
@@ -0,0 +1,155 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+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.getText = exports.getJSON = exports.downloadFile = exports.httpRequest = exports.headHttpRequest = void 0;
+const fs_1 = require("fs");
+const http = __importStar(require("http"));
+const https = __importStar(require("https"));
+const url_1 = require("url");
+const proxy_agent_1 = require("proxy-agent");
+function headHttpRequest(url) {
+ return new Promise(resolve => {
+ const request = httpRequest(url, 'HEAD', response => {
+ // consume response data free node process
+ response.resume();
+ resolve(response.statusCode === 200);
+ }, false);
+ request.on('error', () => {
+ resolve(false);
+ });
+ });
+}
+exports.headHttpRequest = headHttpRequest;
+function httpRequest(url, method, response, keepAlive = true) {
+ const options = {
+ protocol: url.protocol,
+ hostname: url.hostname,
+ port: url.port,
+ path: url.pathname + url.search,
+ method,
+ headers: keepAlive ? { Connection: 'keep-alive' } : undefined,
+ auth: (0, url_1.urlToHttpOptions)(url).auth,
+ agent: new proxy_agent_1.ProxyAgent(),
+ };
+ const requestCallback = (res) => {
+ if (res.statusCode &&
+ res.statusCode >= 300 &&
+ res.statusCode < 400 &&
+ res.headers.location) {
+ httpRequest(new url_1.URL(res.headers.location), method, response);
+ // consume response data to free up memory
+ // And prevents the connection from being kept alive
+ res.resume();
+ }
+ else {
+ response(res);
+ }
+ };
+ const request = options.protocol === 'https:'
+ ? https.request(options, requestCallback)
+ : http.request(options, requestCallback);
+ request.end();
+ return request;
+}
+exports.httpRequest = httpRequest;
+/**
+ * @internal
+ */
+function downloadFile(url, destinationPath, progressCallback) {
+ return new Promise((resolve, reject) => {
+ let downloadedBytes = 0;
+ let totalBytes = 0;
+ function onData(chunk) {
+ downloadedBytes += chunk.length;
+ progressCallback(downloadedBytes, totalBytes);
+ }
+ const request = httpRequest(url, 'GET', response => {
+ if (response.statusCode !== 200) {
+ const error = new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
+ // consume response data to free up memory
+ response.resume();
+ reject(error);
+ return;
+ }
+ const file = (0, fs_1.createWriteStream)(destinationPath);
+ file.on('finish', () => {
+ return resolve();
+ });
+ file.on('error', error => {
+ return reject(error);
+ });
+ response.pipe(file);
+ totalBytes = parseInt(response.headers['content-length'], 10);
+ if (progressCallback) {
+ response.on('data', onData);
+ }
+ });
+ request.on('error', error => {
+ return reject(error);
+ });
+ });
+}
+exports.downloadFile = downloadFile;
+async function getJSON(url) {
+ const text = await getText(url);
+ try {
+ return JSON.parse(text);
+ }
+ catch {
+ throw new Error('Could not parse JSON from ' + url.toString());
+ }
+}
+exports.getJSON = getJSON;
+function getText(url) {
+ return new Promise((resolve, reject) => {
+ const request = httpRequest(url, 'GET', response => {
+ let data = '';
+ if (response.statusCode && response.statusCode >= 400) {
+ return reject(new Error(`Got status code ${response.statusCode}`));
+ }
+ response.on('data', chunk => {
+ data += chunk;
+ });
+ response.on('end', () => {
+ try {
+ return resolve(String(data));
+ }
+ catch {
+ return reject(new Error('Chrome version not found'));
+ }
+ });
+ }, false);
+ request.on('error', err => {
+ reject(err);
+ });
+ });
+}
+exports.getText = getText;
+//# sourceMappingURL=httpUtil.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.js.map b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.js.map
new file mode 100644
index 00000000..104dbe3b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/httpUtil.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"httpUtil.js","sourceRoot":"","sources":["../../src/httpUtil.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2BAAqC;AACrC,2CAA6B;AAC7B,6CAA+B;AAC/B,6BAA0C;AAE1C,6CAAuC;AAEvC,SAAgB,eAAe,CAAC,GAAQ;IACtC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,MAAM,OAAO,GAAG,WAAW,CACzB,GAAG,EACH,MAAM,EACN,QAAQ,CAAC,EAAE;YACT,0CAA0C;YAC1C,QAAQ,CAAC,MAAM,EAAE,CAAC;YAClB,OAAO,CAAC,QAAQ,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC;QACvC,CAAC,EACD,KAAK,CACN,CAAC;QACF,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YACvB,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,0CAgBC;AAED,SAAgB,WAAW,CACzB,GAAQ,EACR,MAAc,EACd,QAA2C,EAC3C,SAAS,GAAG,IA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C;YACH,CAAC,CAAC,CAAC;QACL,CAAC,EACD,KAAK,CACN,CAAC;QACF,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;YACxB,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA3BD,0BA2BC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts
new file mode 100644
index 00000000..0f8068ae
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts
@@ -0,0 +1,123 @@
+/**
+ * @license
+ * Copyright 2017 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { Browser, BrowserPlatform } from './browser-data/browser-data.js';
+import { InstalledBrowser } from './Cache.js';
+/**
+ * @public
+ */
+export interface InstallOptions {
+ /**
+ * Determines the path to download browsers to.
+ */
+ cacheDir: string;
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to install.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+ /**
+ * An alias for the provided `buildId`. It will be used to maintain local
+ * metadata to support aliases in the `launch` command.
+ *
+ * @example 'canary'
+ */
+ buildIdAlias?: string;
+ /**
+ * Provides information about the progress of the download.
+ */
+ downloadProgressCallback?: (downloadedBytes: number, totalBytes: number) => void;
+ /**
+ * Determines the host that will be used for downloading.
+ *
+ * @defaultValue Either
+ *
+ * - https://storage.googleapis.com/chrome-for-testing-public or
+ * - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
+ *
+ */
+ baseUrl?: string;
+ /**
+ * Whether to unpack and install browser archives.
+ *
+ * @defaultValue `true`
+ */
+ unpack?: boolean;
+ /**
+ * @internal
+ * @defaultValue `false`
+ */
+ forceFallbackForTesting?: boolean;
+}
+/**
+ * @public
+ */
+export declare function install(options: InstallOptions & {
+ unpack?: true;
+}): Promise;
+/**
+ * @public
+ */
+export declare function install(options: InstallOptions & {
+ unpack: false;
+}): Promise;
+/**
+ * @public
+ */
+export interface UninstallOptions {
+ /**
+ * Determines the platform for the browser binary.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * The path to the root of the cache directory.
+ */
+ cacheDir: string;
+ /**
+ * Determines which browser to uninstall.
+ */
+ browser: Browser;
+ /**
+ * The browser build to uninstall
+ */
+ buildId: string;
+}
+/**
+ *
+ * @public
+ */
+export declare function uninstall(options: UninstallOptions): Promise;
+/**
+ * @public
+ */
+export interface GetInstalledBrowsersOptions {
+ /**
+ * The path to the root of the cache directory.
+ */
+ cacheDir: string;
+}
+/**
+ * Returns metadata about browsers installed in the cache directory.
+ *
+ * @public
+ */
+export declare function getInstalledBrowsers(options: GetInstalledBrowsersOptions): Promise;
+/**
+ * @public
+ */
+export declare function canDownload(options: InstallOptions): Promise;
+//# sourceMappingURL=install.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map
new file mode 100644
index 00000000..4340d76d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,OAAO,EACP,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAQ,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAwBnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH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E,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAe3E"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.js b/node_modules/@puppeteer/browsers/lib/cjs/install.js
new file mode 100644
index 00000000..2c344900
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.js
@@ -0,0 +1,189 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2017 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.canDownload = exports.getInstalledBrowsers = exports.uninstall = exports.install = void 0;
+const assert_1 = __importDefault(require("assert"));
+const fs_1 = require("fs");
+const promises_1 = require("fs/promises");
+const os_1 = __importDefault(require("os"));
+const path_1 = __importDefault(require("path"));
+const browser_data_js_1 = require("./browser-data/browser-data.js");
+const Cache_js_1 = require("./Cache.js");
+const debug_js_1 = require("./debug.js");
+const detectPlatform_js_1 = require("./detectPlatform.js");
+const fileUtil_js_1 = require("./fileUtil.js");
+const httpUtil_js_1 = require("./httpUtil.js");
+const debugInstall = (0, debug_js_1.debug)('puppeteer:browsers:install');
+const times = new Map();
+function debugTime(label) {
+ times.set(label, process.hrtime());
+}
+function debugTimeEnd(label) {
+ const end = process.hrtime();
+ const start = times.get(label);
+ if (!start) {
+ return;
+ }
+ const duration = end[0] * 1000 + end[1] / 1e6 - (start[0] * 1000 + start[1] / 1e6); // calculate duration in milliseconds
+ debugInstall(`Duration for ${label}: ${duration}ms`);
+}
+async function install(options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ options.unpack ??= true;
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
+ const url = getDownloadUrl(options.browser, options.platform, options.buildId, options.baseUrl);
+ try {
+ return await installUrl(url, options);
+ }
+ catch (err) {
+ // If custom baseUrl is provided, do not fall back to CfT dashboard.
+ if (options.baseUrl && !options.forceFallbackForTesting) {
+ throw err;
+ }
+ debugInstall(`Error downloading from ${url}.`);
+ switch (options.browser) {
+ case browser_data_js_1.Browser.CHROME:
+ case browser_data_js_1.Browser.CHROMEDRIVER:
+ case browser_data_js_1.Browser.CHROMEHEADLESSSHELL: {
+ debugInstall(`Trying to find download URL via https://googlechromelabs.github.io/chrome-for-testing.`);
+ const version = (await (0, httpUtil_js_1.getJSON)(new URL(`https://googlechromelabs.github.io/chrome-for-testing/${options.buildId}.json`)));
+ let platform = '';
+ switch (options.platform) {
+ case browser_data_js_1.BrowserPlatform.LINUX:
+ platform = 'linux64';
+ break;
+ case browser_data_js_1.BrowserPlatform.MAC_ARM:
+ platform = 'mac-arm64';
+ break;
+ case browser_data_js_1.BrowserPlatform.MAC:
+ platform = 'mac-x64';
+ break;
+ case browser_data_js_1.BrowserPlatform.WIN32:
+ platform = 'win32';
+ break;
+ case browser_data_js_1.BrowserPlatform.WIN64:
+ platform = 'win64';
+ break;
+ }
+ const url = version.downloads[options.browser]?.find(link => {
+ return link['platform'] === platform;
+ })?.url;
+ if (url) {
+ debugInstall(`Falling back to downloading from ${url}.`);
+ return await installUrl(new URL(url), options);
+ }
+ throw err;
+ }
+ default:
+ throw err;
+ }
+ }
+}
+exports.install = install;
+async function installUrl(url, options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
+ const fileName = url.toString().split('/').pop();
+ (0, assert_1.default)(fileName, `A malformed download URL was found: ${url}.`);
+ const cache = new Cache_js_1.Cache(options.cacheDir);
+ const browserRoot = cache.browserRoot(options.browser);
+ const archivePath = path_1.default.join(browserRoot, `${options.buildId}-${fileName}`);
+ if (!(0, fs_1.existsSync)(browserRoot)) {
+ await (0, promises_1.mkdir)(browserRoot, { recursive: true });
+ }
+ if (!options.unpack) {
+ if ((0, fs_1.existsSync)(archivePath)) {
+ return archivePath;
+ }
+ debugInstall(`Downloading binary from ${url}`);
+ debugTime('download');
+ await (0, httpUtil_js_1.downloadFile)(url, archivePath, options.downloadProgressCallback);
+ debugTimeEnd('download');
+ return archivePath;
+ }
+ const outputPath = cache.installationDir(options.browser, options.platform, options.buildId);
+ try {
+ if ((0, fs_1.existsSync)(outputPath)) {
+ const installedBrowser = new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (!(0, fs_1.existsSync)(installedBrowser.executablePath)) {
+ throw new Error(`The browser folder (${outputPath}) exists but the executable (${installedBrowser.executablePath}) is missing`);
+ }
+ return installedBrowser;
+ }
+ debugInstall(`Downloading binary from ${url}`);
+ try {
+ debugTime('download');
+ await (0, httpUtil_js_1.downloadFile)(url, archivePath, options.downloadProgressCallback);
+ }
+ finally {
+ debugTimeEnd('download');
+ }
+ debugInstall(`Installing ${archivePath} to ${outputPath}`);
+ try {
+ debugTime('extract');
+ await (0, fileUtil_js_1.unpackArchive)(archivePath, outputPath);
+ }
+ finally {
+ debugTimeEnd('extract');
+ }
+ const installedBrowser = new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (options.buildIdAlias) {
+ const metadata = installedBrowser.readMetadata();
+ metadata.aliases[options.buildIdAlias] = options.buildId;
+ installedBrowser.writeMetadata(metadata);
+ }
+ return installedBrowser;
+ }
+ finally {
+ if ((0, fs_1.existsSync)(archivePath)) {
+ await (0, promises_1.unlink)(archivePath);
+ }
+ }
+}
+/**
+ *
+ * @public
+ */
+async function uninstall(options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!options.platform) {
+ throw new Error(`Cannot detect the browser platform for: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
+ new Cache_js_1.Cache(options.cacheDir).uninstall(options.browser, options.platform, options.buildId);
+}
+exports.uninstall = uninstall;
+/**
+ * Returns metadata about browsers installed in the cache directory.
+ *
+ * @public
+ */
+async function getInstalledBrowsers(options) {
+ return new Cache_js_1.Cache(options.cacheDir).getInstalledBrowsers();
+}
+exports.getInstalledBrowsers = getInstalledBrowsers;
+/**
+ * @public
+ */
+async function canDownload(options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
+ return await (0, httpUtil_js_1.headHttpRequest)(getDownloadUrl(options.browser, options.platform, options.buildId, options.baseUrl));
+}
+exports.canDownload = canDownload;
+function getDownloadUrl(browser, platform, buildId, baseUrl) {
+ return new URL(browser_data_js_1.downloadUrls[browser](platform, buildId, baseUrl));
+}
+//# sourceMappingURL=install.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/install.js.map b/node_modules/@puppeteer/browsers/lib/cjs/install.js.map
new file mode 100644
index 00000000..4828c8dc
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/install.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,oDAA4B;AAC5B,2BAA8B;AAC9B,0CAA0C;AAC1C,4CAAoB;AACpB,gDAAwB;AAExB,oEAIwC;AACxC,yCAAmD;AACnD,yCAAiC;AACjC,2DAA0D;AAC1D,+CAA4C;AAC5C,+CAAqE;AAErE,MAAM,YAAY,GAAG,IAAA,gBAAK,EAAC,4BAA4B,CAAC,CAAC;AAEzD,MAAM,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;AAClD,SAAS,SAAS,CAAC,KAAa;IAC9B,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAC7B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tB,MAAM,IAAI,KAAK,CACb,uDAAuD,YAAE,CAAC,QAAQ,EAAE,KAAK,YAAE,CAAC,IAAI,EAAE,GAAG,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,IAAA,6BAAe,EAC1B,cAAc,CACZ,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,OAAO,CAChB,CACF,CAAC;AACJ,CAAC;AAfD,kCAeC;AAED,SAAS,cAAc,CACrB,OAAgB,EAChB,QAAyB,EACzB,OAAe,EACf,OAAgB;IAEhB,OAAO,IAAI,GAAG,CAAC,8BAAY,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/launch.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/launch.d.ts
new file mode 100644
index 00000000..54335f7d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/launch.d.ts
@@ -0,0 +1,124 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+///
+///
+import childProcess from 'child_process';
+import { type Browser, type BrowserPlatform, type ChromeReleaseChannel } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export interface ComputeExecutablePathOptions {
+ /**
+ * Root path to the storage directory.
+ */
+ cacheDir: string;
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+}
+/**
+ * @public
+ */
+export declare function computeExecutablePath(options: ComputeExecutablePathOptions): string;
+/**
+ * @public
+ */
+export interface SystemOptions {
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Release channel to look for on the system.
+ */
+ channel: ChromeReleaseChannel;
+}
+/**
+ * @public
+ */
+export declare function computeSystemExecutablePath(options: SystemOptions): string;
+/**
+ * @public
+ */
+export interface LaunchOptions {
+ executablePath: string;
+ pipe?: boolean;
+ dumpio?: boolean;
+ args?: string[];
+ env?: Record;
+ handleSIGINT?: boolean;
+ handleSIGTERM?: boolean;
+ handleSIGHUP?: boolean;
+ detached?: boolean;
+ onExit?: () => Promise;
+}
+/**
+ * @public
+ */
+export declare function launch(opts: LaunchOptions): Process;
+/**
+ * @public
+ */
+export declare const CDP_WEBSOCKET_ENDPOINT_REGEX: RegExp;
+/**
+ * @public
+ */
+export declare const WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX: RegExp;
+/**
+ * @public
+ */
+export declare class Process {
+ #private;
+ constructor(opts: LaunchOptions);
+ get nodeProcess(): childProcess.ChildProcess;
+ close(): Promise;
+ hasClosed(): Promise;
+ kill(): void;
+ waitForLineOutput(regex: RegExp, timeout?: number): Promise;
+}
+/**
+ * @internal
+ */
+export interface ErrorLike extends Error {
+ name: string;
+ message: string;
+}
+/**
+ * @internal
+ */
+export declare function isErrorLike(obj: unknown): obj is ErrorLike;
+/**
+ * @internal
+ */
+export declare function isErrnoException(obj: unknown): obj is NodeJS.ErrnoException;
+/**
+ * @public
+ */
+export declare class TimeoutError extends Error {
+ /**
+ * @internal
+ */
+ constructor(message?: string);
+}
+//# sourceMappingURL=launch.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/launch.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/launch.d.ts.map
new file mode 100644
index 00000000..4615e251
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/launch.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../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BAAgB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAEnD;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,QACF,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,uCAAuC,QACP,CAAC;AAuD9C;;GAEG;AACH,qBAAa,OAAO;;gBAYN,IAAI,EAAE,aAAa;IAwF/B,IAAI,WAAW,IAAI,YAAY,CAAC,YAAY,CAE3C;IA4CK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,IAAI,IAAI,IAAI;IAwDZ,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,OAAO,CAAC,MAAM,CAAC;CA+D/D;AAuBD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAI1D;AACD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,cAAc,CAK3E;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC;;OAEG;gBACS,OAAO,CAAC,EAAE,MAAM;CAK7B"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/launch.js b/node_modules/@puppeteer/browsers/lib/cjs/launch.js
new file mode 100644
index 00000000..3bb92985
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/launch.js
@@ -0,0 +1,385 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TimeoutError = exports.isErrnoException = exports.isErrorLike = exports.Process = exports.WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = exports.CDP_WEBSOCKET_ENDPOINT_REGEX = exports.launch = exports.computeSystemExecutablePath = exports.computeExecutablePath = void 0;
+const child_process_1 = __importDefault(require("child_process"));
+const fs_1 = require("fs");
+const os_1 = __importDefault(require("os"));
+const readline_1 = __importDefault(require("readline"));
+const browser_data_js_1 = require("./browser-data/browser-data.js");
+const Cache_js_1 = require("./Cache.js");
+const debug_js_1 = require("./debug.js");
+const detectPlatform_js_1 = require("./detectPlatform.js");
+const debugLaunch = (0, debug_js_1.debug)('puppeteer:browsers:launcher');
+/**
+ * @public
+ */
+function computeExecutablePath(options) {
+ return new Cache_js_1.Cache(options.cacheDir).computeExecutablePath(options);
+}
+exports.computeExecutablePath = computeExecutablePath;
+/**
+ * @public
+ */
+function computeSystemExecutablePath(options) {
+ options.platform ??= (0, detectPlatform_js_1.detectBrowserPlatform)();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os_1.default.platform()} (${os_1.default.arch()})`);
+ }
+ const path = (0, browser_data_js_1.resolveSystemExecutablePath)(options.browser, options.platform, options.channel);
+ try {
+ (0, fs_1.accessSync)(path);
+ }
+ catch (error) {
+ throw new Error(`Could not find Google Chrome executable for channel '${options.channel}' at '${path}'.`);
+ }
+ return path;
+}
+exports.computeSystemExecutablePath = computeSystemExecutablePath;
+/**
+ * @public
+ */
+function launch(opts) {
+ return new Process(opts);
+}
+exports.launch = launch;
+/**
+ * @public
+ */
+exports.CDP_WEBSOCKET_ENDPOINT_REGEX = /^DevTools listening on (ws:\/\/.*)$/;
+/**
+ * @public
+ */
+exports.WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = /^WebDriver BiDi listening on (ws:\/\/.*)$/;
+const processListeners = new Map();
+const dispatchers = {
+ exit: (...args) => {
+ processListeners.get('exit')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGINT: (...args) => {
+ processListeners.get('SIGINT')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGHUP: (...args) => {
+ processListeners.get('SIGHUP')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGTERM: (...args) => {
+ processListeners.get('SIGTERM')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+};
+function subscribeToProcessEvent(event, handler) {
+ const listeners = processListeners.get(event) || [];
+ if (listeners.length === 0) {
+ process.on(event, dispatchers[event]);
+ }
+ listeners.push(handler);
+ processListeners.set(event, listeners);
+}
+function unsubscribeFromProcessEvent(event, handler) {
+ const listeners = processListeners.get(event) || [];
+ const existingListenerIdx = listeners.indexOf(handler);
+ if (existingListenerIdx === -1) {
+ return;
+ }
+ listeners.splice(existingListenerIdx, 1);
+ processListeners.set(event, listeners);
+ if (listeners.length === 0) {
+ process.off(event, dispatchers[event]);
+ }
+}
+/**
+ * @public
+ */
+class Process {
+ #executablePath;
+ #args;
+ #browserProcess;
+ #exited = false;
+ // The browser process can be closed externally or from the driver process. We
+ // need to invoke the hooks only once though but we don't know how many times
+ // we will be invoked.
+ #hooksRan = false;
+ #onExitHook = async () => { };
+ #browserProcessExiting;
+ constructor(opts) {
+ this.#executablePath = opts.executablePath;
+ this.#args = opts.args ?? [];
+ opts.pipe ??= false;
+ opts.dumpio ??= false;
+ opts.handleSIGINT ??= true;
+ opts.handleSIGTERM ??= true;
+ opts.handleSIGHUP ??= true;
+ // On non-windows platforms, `detached: true` makes child process a
+ // leader of a new process group, making it possible to kill child
+ // process tree with `.kill(-pid)` command. @see
+ // https://nodejs.org/api/child_process.html#child_process_options_detached
+ opts.detached ??= process.platform !== 'win32';
+ const stdio = this.#configureStdio({
+ pipe: opts.pipe,
+ dumpio: opts.dumpio,
+ });
+ const env = opts.env || {};
+ debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(' ')}`, {
+ detached: opts.detached,
+ env: Object.keys(env).reduce((res, key) => {
+ if (key.toLowerCase().startsWith('puppeteer_')) {
+ res[key] = env[key];
+ }
+ return res;
+ }, {}),
+ stdio,
+ });
+ this.#browserProcess = child_process_1.default.spawn(this.#executablePath, this.#args, {
+ detached: opts.detached,
+ env,
+ stdio,
+ });
+ debugLaunch(`Launched ${this.#browserProcess.pid}`);
+ if (opts.dumpio) {
+ this.#browserProcess.stderr?.pipe(process.stderr);
+ this.#browserProcess.stdout?.pipe(process.stdout);
+ }
+ subscribeToProcessEvent('exit', this.#onDriverProcessExit);
+ if (opts.handleSIGINT) {
+ subscribeToProcessEvent('SIGINT', this.#onDriverProcessSignal);
+ }
+ if (opts.handleSIGTERM) {
+ subscribeToProcessEvent('SIGTERM', this.#onDriverProcessSignal);
+ }
+ if (opts.handleSIGHUP) {
+ subscribeToProcessEvent('SIGHUP', this.#onDriverProcessSignal);
+ }
+ if (opts.onExit) {
+ this.#onExitHook = opts.onExit;
+ }
+ this.#browserProcessExiting = new Promise((resolve, reject) => {
+ this.#browserProcess.once('exit', async () => {
+ debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`);
+ this.#clearListeners();
+ this.#exited = true;
+ try {
+ await this.#runHooks();
+ }
+ catch (err) {
+ reject(err);
+ return;
+ }
+ resolve();
+ });
+ });
+ }
+ async #runHooks() {
+ if (this.#hooksRan) {
+ return;
+ }
+ this.#hooksRan = true;
+ await this.#onExitHook();
+ }
+ get nodeProcess() {
+ return this.#browserProcess;
+ }
+ #configureStdio(opts) {
+ if (opts.pipe) {
+ if (opts.dumpio) {
+ return ['ignore', 'pipe', 'pipe', 'pipe', 'pipe'];
+ }
+ else {
+ return ['ignore', 'ignore', 'ignore', 'pipe', 'pipe'];
+ }
+ }
+ else {
+ if (opts.dumpio) {
+ return ['pipe', 'pipe', 'pipe'];
+ }
+ else {
+ return ['pipe', 'ignore', 'pipe'];
+ }
+ }
+ }
+ #clearListeners() {
+ unsubscribeFromProcessEvent('exit', this.#onDriverProcessExit);
+ unsubscribeFromProcessEvent('SIGINT', this.#onDriverProcessSignal);
+ unsubscribeFromProcessEvent('SIGTERM', this.#onDriverProcessSignal);
+ unsubscribeFromProcessEvent('SIGHUP', this.#onDriverProcessSignal);
+ }
+ #onDriverProcessExit = (_code) => {
+ this.kill();
+ };
+ #onDriverProcessSignal = (signal) => {
+ switch (signal) {
+ case 'SIGINT':
+ this.kill();
+ process.exit(130);
+ case 'SIGTERM':
+ case 'SIGHUP':
+ void this.close();
+ break;
+ }
+ };
+ async close() {
+ await this.#runHooks();
+ if (!this.#exited) {
+ this.kill();
+ }
+ return await this.#browserProcessExiting;
+ }
+ hasClosed() {
+ return this.#browserProcessExiting;
+ }
+ kill() {
+ debugLaunch(`Trying to kill ${this.#browserProcess.pid}`);
+ // If the process failed to launch (for example if the browser executable path
+ // is invalid), then the process does not get a pid assigned. A call to
+ // `proc.kill` would error, as the `pid` to-be-killed can not be found.
+ if (this.#browserProcess &&
+ this.#browserProcess.pid &&
+ pidExists(this.#browserProcess.pid)) {
+ try {
+ debugLaunch(`Browser process ${this.#browserProcess.pid} exists`);
+ if (process.platform === 'win32') {
+ try {
+ child_process_1.default.execSync(`taskkill /pid ${this.#browserProcess.pid} /T /F`);
+ }
+ catch (error) {
+ debugLaunch(`Killing ${this.#browserProcess.pid} using taskkill failed`, error);
+ // taskkill can fail to kill the process e.g. due to missing permissions.
+ // Let's kill the process via Node API. This delays killing of all child
+ // processes of `this.proc` until the main Node.js process dies.
+ this.#browserProcess.kill();
+ }
+ }
+ else {
+ // on linux the process group can be killed with the group id prefixed with
+ // a minus sign. The process group id is the group leader's pid.
+ const processGroupId = -this.#browserProcess.pid;
+ try {
+ process.kill(processGroupId, 'SIGKILL');
+ }
+ catch (error) {
+ debugLaunch(`Killing ${this.#browserProcess.pid} using process.kill failed`, error);
+ // Killing the process group can fail due e.g. to missing permissions.
+ // Let's kill the process via Node API. This delays killing of all child
+ // processes of `this.proc` until the main Node.js process dies.
+ this.#browserProcess.kill('SIGKILL');
+ }
+ }
+ }
+ catch (error) {
+ throw new Error(`${PROCESS_ERROR_EXPLANATION}\nError cause: ${isErrorLike(error) ? error.stack : error}`);
+ }
+ }
+ this.#clearListeners();
+ }
+ waitForLineOutput(regex, timeout = 0) {
+ if (!this.#browserProcess.stderr) {
+ throw new Error('`browserProcess` does not have stderr.');
+ }
+ const rl = readline_1.default.createInterface(this.#browserProcess.stderr);
+ let stderr = '';
+ return new Promise((resolve, reject) => {
+ rl.on('line', onLine);
+ rl.on('close', onClose);
+ this.#browserProcess.on('exit', onClose);
+ this.#browserProcess.on('error', onClose);
+ const timeoutId = timeout > 0 ? setTimeout(onTimeout, timeout) : undefined;
+ const cleanup = () => {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ rl.off('line', onLine);
+ rl.off('close', onClose);
+ this.#browserProcess.off('exit', onClose);
+ this.#browserProcess.off('error', onClose);
+ };
+ function onClose(error) {
+ cleanup();
+ reject(new Error([
+ `Failed to launch the browser process!${error ? ' ' + error.message : ''}`,
+ stderr,
+ '',
+ 'TROUBLESHOOTING: https://pptr.dev/troubleshooting',
+ '',
+ ].join('\n')));
+ }
+ function onTimeout() {
+ cleanup();
+ reject(new TimeoutError(`Timed out after ${timeout} ms while waiting for the WS endpoint URL to appear in stdout!`));
+ }
+ function onLine(line) {
+ stderr += line + '\n';
+ const match = line.match(regex);
+ if (!match) {
+ return;
+ }
+ cleanup();
+ // The RegExp matches, so this will obviously exist.
+ resolve(match[1]);
+ }
+ });
+ }
+}
+exports.Process = Process;
+const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary.
+This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
+Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
+If you think this is a bug, please report it on the Puppeteer issue tracker.`;
+/**
+ * @internal
+ */
+function pidExists(pid) {
+ try {
+ return process.kill(pid, 0);
+ }
+ catch (error) {
+ if (isErrnoException(error)) {
+ if (error.code && error.code === 'ESRCH') {
+ return false;
+ }
+ }
+ throw error;
+ }
+}
+/**
+ * @internal
+ */
+function isErrorLike(obj) {
+ return (typeof obj === 'object' && obj !== null && 'name' in obj && 'message' in obj);
+}
+exports.isErrorLike = isErrorLike;
+/**
+ * @internal
+ */
+function isErrnoException(obj) {
+ return (isErrorLike(obj) &&
+ ('errno' in obj || 'code' in obj || 'path' in obj || 'syscall' in obj));
+}
+exports.isErrnoException = isErrnoException;
+/**
+ * @public
+ */
+class TimeoutError extends Error {
+ /**
+ * @internal
+ */
+ constructor(message) {
+ super(message);
+ this.name = this.constructor.name;
+ Error.captureStackTrace(this, this.constructor);
+ }
+}
+exports.TimeoutError = TimeoutError;
+//# sourceMappingURL=launch.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/launch.js.map b/node_modules/@puppeteer/browsers/lib/cjs/launch.js.map
new file mode 100644
index 00000000..17f5ab46
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/launch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../src/launch.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,kEAAyC;AACzC,2BAA8B;AAC9B,4CAAoB;AACpB,wDAAgC;AAEhC,oEAKwC;AACxC,yCAAiC;AACjC,yCAAiC;AACjC,2DAA0D;AAE1D,MAAM,WAAW,GAAG,IAAA,gBAAK,EAAC,6BAA6B,CAAC,CAAC;AA2BzD;;GAEG;AACH,SAAgB,qBAAqB,CACnC,OAAqC;IAErC,OAAO,IAAI,gBAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACpE,CAAC;AAJD,sDAIC;AAsBD;;GAEG;AACH,SAAgB,2BAA2B,CAAC,OAAsB;IAChE,OAAO,CAAC,QAAQ,KAAK,IAAA,yCAAqB,GAAE,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,uDAAuD,YAAE,CAAC,QAAQ,E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AAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;gBACzC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAUD;;GAEG;AACH,SAAgB,WAAW,CAAC,GAAY;IACtC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAC7E,CAAC;AACJ,CAAC;AAJD,kCAIC;AACD;;GAEG;AACH,SAAgB,gBAAgB,CAAC,GAAY;IAC3C,OAAO,CACL,WAAW,CAAC,GAAG,CAAC;QAChB,CAAC,OAAO,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAAC,CACvE,CAAC;AACJ,CAAC;AALD,4CAKC;AAED;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IACrC;;OAEG;IACH,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;CACF;AATD,oCASC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main-cli.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.d.ts
new file mode 100644
index 00000000..24f6aa59
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.d.ts
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+export {};
+//# sourceMappingURL=main-cli.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main-cli.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.d.ts.map
new file mode 100644
index 00000000..97cfca76
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"main-cli.d.ts","sourceRoot":"","sources":["../../src/main-cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main-cli.js b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.js
new file mode 100755
index 00000000..0671147f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.js
@@ -0,0 +1,11 @@
+#!/usr/bin/env node
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const CLI_js_1 = require("./CLI.js");
+void new CLI_js_1.CLI().run(process.argv);
+//# sourceMappingURL=main-cli.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main-cli.js.map b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.js.map
new file mode 100644
index 00000000..e8ef40fc
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main-cli.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"main-cli.js","sourceRoot":"","sources":["../../src/main-cli.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;;AAEH,qCAA6B;AAE7B,KAAK,IAAI,YAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts
new file mode 100644
index 00000000..9ca6ab15
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts
@@ -0,0 +1,15 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+export type { LaunchOptions, ComputeExecutablePathOptions as Options, SystemOptions, } from './launch.js';
+export { launch, computeExecutablePath, computeSystemExecutablePath, TimeoutError, CDP_WEBSOCKET_ENDPOINT_REGEX, WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, Process, } from './launch.js';
+export type { InstallOptions, GetInstalledBrowsersOptions, UninstallOptions, } from './install.js';
+export { install, getInstalledBrowsers, canDownload, uninstall, } from './install.js';
+export { detectBrowserPlatform } from './detectPlatform.js';
+export type { ProfileOptions } from './browser-data/browser-data.js';
+export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, getVersionComparator, } from './browser-data/browser-data.js';
+export { CLI, makeProgressCallback } from './CLI.js';
+export { Cache, InstalledBrowser } from './Cache.js';
+//# sourceMappingURL=main.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map
new file mode 100644
index 00000000..a6c0b8e2
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,4BAA4B,IAAI,OAAO,EACvC,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.js b/node_modules/@puppeteer/browsers/lib/cjs/main.js
new file mode 100644
index 00000000..b4cdbb1f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.js
@@ -0,0 +1,37 @@
+"use strict";
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.InstalledBrowser = exports.Cache = exports.makeProgressCallback = exports.CLI = exports.getVersionComparator = exports.createProfile = exports.ChromeReleaseChannel = exports.BrowserPlatform = exports.Browser = exports.resolveBuildId = exports.detectBrowserPlatform = exports.uninstall = exports.canDownload = exports.getInstalledBrowsers = exports.install = exports.Process = exports.WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = exports.CDP_WEBSOCKET_ENDPOINT_REGEX = exports.TimeoutError = exports.computeSystemExecutablePath = exports.computeExecutablePath = exports.launch = void 0;
+var launch_js_1 = require("./launch.js");
+Object.defineProperty(exports, "launch", { enumerable: true, get: function () { return launch_js_1.launch; } });
+Object.defineProperty(exports, "computeExecutablePath", { enumerable: true, get: function () { return launch_js_1.computeExecutablePath; } });
+Object.defineProperty(exports, "computeSystemExecutablePath", { enumerable: true, get: function () { return launch_js_1.computeSystemExecutablePath; } });
+Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function () { return launch_js_1.TimeoutError; } });
+Object.defineProperty(exports, "CDP_WEBSOCKET_ENDPOINT_REGEX", { enumerable: true, get: function () { return launch_js_1.CDP_WEBSOCKET_ENDPOINT_REGEX; } });
+Object.defineProperty(exports, "WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX", { enumerable: true, get: function () { return launch_js_1.WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX; } });
+Object.defineProperty(exports, "Process", { enumerable: true, get: function () { return launch_js_1.Process; } });
+var install_js_1 = require("./install.js");
+Object.defineProperty(exports, "install", { enumerable: true, get: function () { return install_js_1.install; } });
+Object.defineProperty(exports, "getInstalledBrowsers", { enumerable: true, get: function () { return install_js_1.getInstalledBrowsers; } });
+Object.defineProperty(exports, "canDownload", { enumerable: true, get: function () { return install_js_1.canDownload; } });
+Object.defineProperty(exports, "uninstall", { enumerable: true, get: function () { return install_js_1.uninstall; } });
+var detectPlatform_js_1 = require("./detectPlatform.js");
+Object.defineProperty(exports, "detectBrowserPlatform", { enumerable: true, get: function () { return detectPlatform_js_1.detectBrowserPlatform; } });
+var browser_data_js_1 = require("./browser-data/browser-data.js");
+Object.defineProperty(exports, "resolveBuildId", { enumerable: true, get: function () { return browser_data_js_1.resolveBuildId; } });
+Object.defineProperty(exports, "Browser", { enumerable: true, get: function () { return browser_data_js_1.Browser; } });
+Object.defineProperty(exports, "BrowserPlatform", { enumerable: true, get: function () { return browser_data_js_1.BrowserPlatform; } });
+Object.defineProperty(exports, "ChromeReleaseChannel", { enumerable: true, get: function () { return browser_data_js_1.ChromeReleaseChannel; } });
+Object.defineProperty(exports, "createProfile", { enumerable: true, get: function () { return browser_data_js_1.createProfile; } });
+Object.defineProperty(exports, "getVersionComparator", { enumerable: true, get: function () { return browser_data_js_1.getVersionComparator; } });
+var CLI_js_1 = require("./CLI.js");
+Object.defineProperty(exports, "CLI", { enumerable: true, get: function () { return CLI_js_1.CLI; } });
+Object.defineProperty(exports, "makeProgressCallback", { enumerable: true, get: function () { return CLI_js_1.makeProgressCallback; } });
+var Cache_js_1 = require("./Cache.js");
+Object.defineProperty(exports, "Cache", { enumerable: true, get: function () { return Cache_js_1.Cache; } });
+Object.defineProperty(exports, "InstalledBrowser", { enumerable: true, get: function () { return Cache_js_1.InstalledBrowser; } });
+//# sourceMappingURL=main.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/cjs/main.js.map b/node_modules/@puppeteer/browsers/lib/cjs/main.js.map
new file mode 100644
index 00000000..71c1ad49
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/cjs/main.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAOH,yCAQqB;AAPnB,mGAAA,MAAM,OAAA;AACN,kHAAA,qBAAqB,OAAA;AACrB,wHAAA,2BAA2B,OAAA;AAC3B,yGAAA,YAAY,OAAA;AACZ,yHAAA,4BAA4B,OAAA;AAC5B,oIAAA,uCAAuC,OAAA;AACvC,oGAAA,OAAO,OAAA;AAOT,2CAKsB;AAJpB,qGAAA,OAAO,OAAA;AACP,kHAAA,oBAAoB,OAAA;AACpB,yGAAA,WAAW,OAAA;AACX,uGAAA,SAAS,OAAA;AAEX,yDAA0D;AAAlD,0HAAA,qBAAqB,OAAA;AAE7B,kEAOwC;AANtC,iHAAA,cAAc,OAAA;AACd,0GAAA,OAAO,OAAA;AACP,kHAAA,eAAe,OAAA;AACf,uHAAA,oBAAoB,OAAA;AACpB,gHAAA,aAAa,OAAA;AACb,uHAAA,oBAAoB,OAAA;AAEtB,mCAAmD;AAA3C,6FAAA,GAAG,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AACjC,uCAAmD;AAA3C,iGAAA,KAAK,OAAA;AAAE,4GAAA,gBAAgB,OAAA"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts b/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts
new file mode 100644
index 00000000..4c2d25b3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts
@@ -0,0 +1,32 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+///
+import * as readline from 'readline';
+import { type Browser } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export declare class CLI {
+ #private;
+ constructor(opts?: string | {
+ cachePath?: string;
+ scriptName?: string;
+ prefixCommand?: {
+ cmd: string;
+ description: string;
+ };
+ allowCachePathOverride?: boolean;
+ pinnedBrowsers?: Partial<{
+ [key in Browser]: string;
+ }>;
+ }, rl?: readline.Interface);
+ run(argv: string[]): Promise;
+}
+/**
+ * @public
+ */
+export declare function makeProgressCallback(browser: Browser, buildId: string): (downloadedBytes: number, totalBytes: number) => void;
+//# sourceMappingURL=CLI.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map
new file mode 100644
index 00000000..361048aa
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"CLI.d.ts","sourceRoot":"","sources":["../../src/CLI.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAOrC,OAAO,EAEL,KAAK,OAAO,EAGb,MAAM,gCAAgC,CAAC;AAmCxC;;GAEG;AACH,qBAAa,GAAG;;gBASZ,IAAI,CAAC,EACD,MAAM,GACN;QACE,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAC,CAAC;QACnD,sBAAsB,CAAC,EAAE,OAAO,CAAC;QACjC,cAAc,CAAC,EAAE,OAAO,CAAC;aAAE,GAAG,IAAI,OAAO,GAAG,MAAM;SAAC,CAAC,CAAC;KACtD,EACL,EAAE,CAAC,EAAE,QAAQ,CAAC,SAAS;IAwDnB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAoRzC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,GACd,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAqBvD"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.js b/node_modules/@puppeteer/browsers/lib/esm/CLI.js
new file mode 100644
index 00000000..86aa3128
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.js
@@ -0,0 +1,258 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { stdin as input, stdout as output } from 'process';
+import * as readline from 'readline';
+import ProgressBar from 'progress';
+import { hideBin } from 'yargs/helpers';
+import yargs from 'yargs/yargs';
+import { resolveBuildId, BrowserPlatform, } from './browser-data/browser-data.js';
+import { Cache } from './Cache.js';
+import { detectBrowserPlatform } from './detectPlatform.js';
+import { install } from './install.js';
+import { computeExecutablePath, computeSystemExecutablePath, launch, } from './launch.js';
+/**
+ * @public
+ */
+export class CLI {
+ #cachePath;
+ #rl;
+ #scriptName = '';
+ #allowCachePathOverride = true;
+ #pinnedBrowsers;
+ #prefixCommand;
+ constructor(opts, rl) {
+ if (!opts) {
+ opts = {};
+ }
+ if (typeof opts === 'string') {
+ opts = {
+ cachePath: opts,
+ };
+ }
+ this.#cachePath = opts.cachePath ?? process.cwd();
+ this.#rl = rl;
+ this.#scriptName = opts.scriptName ?? '@puppeteer/browsers';
+ this.#allowCachePathOverride = opts.allowCachePathOverride ?? true;
+ this.#pinnedBrowsers = opts.pinnedBrowsers;
+ this.#prefixCommand = opts.prefixCommand;
+ }
+ #defineBrowserParameter(yargs) {
+ yargs.positional('browser', {
+ description: 'Which browser to install [@]. `latest` will try to find the latest available build. `buildId` is a browser-specific identifier such as a version or a revision.',
+ type: 'string',
+ coerce: (opt) => {
+ return {
+ name: this.#parseBrowser(opt),
+ buildId: this.#parseBuildId(opt),
+ };
+ },
+ });
+ }
+ #definePlatformParameter(yargs) {
+ yargs.option('platform', {
+ type: 'string',
+ desc: 'Platform that the binary needs to be compatible with.',
+ choices: Object.values(BrowserPlatform),
+ defaultDescription: 'Auto-detected',
+ });
+ }
+ #definePathParameter(yargs, required = false) {
+ if (!this.#allowCachePathOverride) {
+ return;
+ }
+ yargs.option('path', {
+ type: 'string',
+ desc: 'Path to the root folder for the browser downloads and installation. The installation folder structure is compatible with the cache structure used by Puppeteer.',
+ defaultDescription: 'Current working directory',
+ ...(required ? {} : { default: process.cwd() }),
+ });
+ if (required) {
+ yargs.demandOption('path');
+ }
+ }
+ async run(argv) {
+ const yargsInstance = yargs(hideBin(argv));
+ let target = yargsInstance.scriptName(this.#scriptName);
+ if (this.#prefixCommand) {
+ target = target.command(this.#prefixCommand.cmd, this.#prefixCommand.description, yargs => {
+ return this.#build(yargs);
+ });
+ }
+ else {
+ target = this.#build(target);
+ }
+ await target
+ .demandCommand(1)
+ .help()
+ .wrap(Math.min(120, yargsInstance.terminalWidth()))
+ .parse();
+ }
+ #build(yargs) {
+ const latestOrPinned = this.#pinnedBrowsers ? 'pinned' : 'latest';
+ return yargs
+ .command('install ', 'Download and install the specified browser. If successful, the command outputs the actual browser buildId that was installed and the absolute path to the browser executable (format: @ ).', yargs => {
+ this.#defineBrowserParameter(yargs);
+ this.#definePlatformParameter(yargs);
+ this.#definePathParameter(yargs);
+ yargs.option('base-url', {
+ type: 'string',
+ desc: 'Base URL to download from',
+ });
+ yargs.example('$0 install chrome', `Install the ${latestOrPinned} available build of the Chrome browser.`);
+ yargs.example('$0 install chrome@latest', 'Install the latest available build for the Chrome browser.');
+ yargs.example('$0 install chrome@stable', 'Install the latest available build for the Chrome browser from the stable channel.');
+ yargs.example('$0 install chrome@beta', 'Install the latest available build for the Chrome browser from the beta channel.');
+ yargs.example('$0 install chrome@dev', 'Install the latest available build for the Chrome browser from the dev channel.');
+ yargs.example('$0 install chrome@canary', 'Install the latest available build for the Chrome Canary browser.');
+ yargs.example('$0 install chrome@115', 'Install the latest available build for Chrome 115.');
+ yargs.example('$0 install chromedriver@canary', 'Install the latest available build for ChromeDriver Canary.');
+ yargs.example('$0 install chromedriver@115', 'Install the latest available build for ChromeDriver 115.');
+ yargs.example('$0 install chromedriver@115.0.5790', 'Install the latest available patch (115.0.5790.X) build for ChromeDriver.');
+ yargs.example('$0 install chrome-headless-shell', 'Install the latest available chrome-headless-shell build.');
+ yargs.example('$0 install chrome-headless-shell@beta', 'Install the latest available chrome-headless-shell build corresponding to the Beta channel.');
+ yargs.example('$0 install chrome-headless-shell@118', 'Install the latest available chrome-headless-shell 118 build.');
+ yargs.example('$0 install chromium@1083080', 'Install the revision 1083080 of the Chromium browser.');
+ yargs.example('$0 install firefox', 'Install the latest nightly available build of the Firefox browser.');
+ yargs.example('$0 install firefox@stable', 'Install the latest stable build of the Firefox browser.');
+ yargs.example('$0 install firefox@beta', 'Install the latest beta build of the Firefox browser.');
+ yargs.example('$0 install firefox@devedition', 'Install the latest devedition build of the Firefox browser.');
+ yargs.example('$0 install firefox@esr', 'Install the latest ESR build of the Firefox browser.');
+ yargs.example('$0 install firefox@nightly', 'Install the latest nightly build of the Firefox browser.');
+ yargs.example('$0 install firefox@stable_111.0.1', 'Install a specific version of the Firefox browser.');
+ yargs.example('$0 install firefox --platform mac', 'Install the latest Mac (Intel) build of the Firefox browser.');
+ if (this.#allowCachePathOverride) {
+ yargs.example('$0 install firefox --path /tmp/my-browser-cache', 'Install to the specified cache directory.');
+ }
+ }, async (argv) => {
+ const args = argv;
+ args.platform ??= detectBrowserPlatform();
+ if (!args.platform) {
+ throw new Error(`Could not resolve the current platform`);
+ }
+ if (args.browser.buildId === 'pinned') {
+ const pinnedVersion = this.#pinnedBrowsers?.[args.browser.name];
+ if (!pinnedVersion) {
+ throw new Error(`No pinned version found for ${args.browser.name}`);
+ }
+ args.browser.buildId = pinnedVersion;
+ }
+ const originalBuildId = args.browser.buildId;
+ args.browser.buildId = await resolveBuildId(args.browser.name, args.platform, args.browser.buildId);
+ await install({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ platform: args.platform,
+ cacheDir: args.path ?? this.#cachePath,
+ downloadProgressCallback: makeProgressCallback(args.browser.name, args.browser.buildId),
+ baseUrl: args.baseUrl,
+ buildIdAlias: originalBuildId !== args.browser.buildId
+ ? originalBuildId
+ : undefined,
+ });
+ console.log(`${args.browser.name}@${args.browser.buildId} ${computeExecutablePath({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ cacheDir: args.path ?? this.#cachePath,
+ platform: args.platform,
+ })}`);
+ })
+ .command('launch ', 'Launch the specified browser', yargs => {
+ this.#defineBrowserParameter(yargs);
+ this.#definePlatformParameter(yargs);
+ this.#definePathParameter(yargs);
+ yargs.option('detached', {
+ type: 'boolean',
+ desc: 'Detach the child process.',
+ default: false,
+ });
+ yargs.option('system', {
+ type: 'boolean',
+ desc: 'Search for a browser installed on the system instead of the cache folder.',
+ default: false,
+ });
+ yargs.example('$0 launch chrome@115.0.5790.170', 'Launch Chrome 115.0.5790.170');
+ yargs.example('$0 launch firefox@112.0a1', 'Launch the Firefox browser identified by the milestone 112.0a1.');
+ yargs.example('$0 launch chrome@115.0.5790.170 --detached', 'Launch the browser but detach the sub-processes.');
+ yargs.example('$0 launch chrome@canary --system', 'Try to locate the Canary build of Chrome installed on the system and launch it.');
+ }, async (argv) => {
+ const args = argv;
+ const executablePath = args.system
+ ? computeSystemExecutablePath({
+ browser: args.browser.name,
+ // TODO: throw an error if not a ChromeReleaseChannel is provided.
+ channel: args.browser.buildId,
+ platform: args.platform,
+ })
+ : computeExecutablePath({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ cacheDir: args.path ?? this.#cachePath,
+ platform: args.platform,
+ });
+ launch({
+ executablePath,
+ detached: args.detached,
+ });
+ })
+ .command('clear', this.#allowCachePathOverride
+ ? 'Removes all installed browsers from the specified cache directory'
+ : `Removes all installed browsers from ${this.#cachePath}`, yargs => {
+ this.#definePathParameter(yargs, true);
+ }, async (argv) => {
+ const args = argv;
+ const cacheDir = args.path ?? this.#cachePath;
+ const rl = this.#rl ?? readline.createInterface({ input, output });
+ rl.question(`Do you want to permanently and recursively delete the content of ${cacheDir} (yes/No)? `, answer => {
+ rl.close();
+ if (!['y', 'yes'].includes(answer.toLowerCase().trim())) {
+ console.log('Cancelled.');
+ return;
+ }
+ const cache = new Cache(cacheDir);
+ cache.clear();
+ console.log(`${cacheDir} cleared.`);
+ });
+ })
+ .demandCommand(1)
+ .help();
+ }
+ #parseBrowser(version) {
+ return version.split('@').shift();
+ }
+ #parseBuildId(version) {
+ const parts = version.split('@');
+ return parts.length === 2
+ ? parts[1]
+ : this.#pinnedBrowsers
+ ? 'pinned'
+ : 'latest';
+ }
+}
+/**
+ * @public
+ */
+export function makeProgressCallback(browser, buildId) {
+ let progressBar;
+ let lastDownloadedBytes = 0;
+ return (downloadedBytes, totalBytes) => {
+ if (!progressBar) {
+ progressBar = new ProgressBar(`Downloading ${browser} ${buildId} - ${toMegabytes(totalBytes)} [:bar] :percent :etas `, {
+ complete: '=',
+ incomplete: ' ',
+ width: 20,
+ total: totalBytes,
+ });
+ }
+ const delta = downloadedBytes - lastDownloadedBytes;
+ lastDownloadedBytes = downloadedBytes;
+ progressBar.tick(delta);
+ };
+}
+function toMegabytes(bytes) {
+ const mb = bytes / 1000 / 1000;
+ return `${Math.round(mb * 10) / 10} MB`;
+}
+//# sourceMappingURL=CLI.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map b/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map
new file mode 100644
index 00000000..f819f3f5
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/CLI.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"CLI.js","sourceRoot":"","sources":["../../src/CLI.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AAC,CAAC;IAC5B,OAAO,CAAC,eAAuB,EAAE,UAAkB,EAAE,EAAE;QACrD,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,WAAW,GAAG,IAAI,WAAW,CAC3B,eAAe,OAAO,IAAI,OAAO,MAAM,WAAW,CAChD,UAAU,CACX,yBAAyB,EAC1B;gBACE,QAAQ,EAAE,GAAG;gBACb,UAAU,EAAE,GAAG;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,UAAU;aAClB,CACF,CAAC;QACJ,CAAC;QACD,MAAM,KAAK,GAAG,eAAe,GAAG,mBAAmB,CAAC;QACpD,mBAAmB,GAAG,eAAe,CAAC;QACtC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts
new file mode 100644
index 00000000..af18af56
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts
@@ -0,0 +1,83 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { Browser, type BrowserPlatform } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export declare class InstalledBrowser {
+ #private;
+ browser: Browser;
+ buildId: string;
+ platform: BrowserPlatform;
+ readonly executablePath: string;
+ /**
+ * @internal
+ */
+ constructor(cache: Cache, browser: Browser, buildId: string, platform: BrowserPlatform);
+ /**
+ * Path to the root of the installation folder. Use
+ * {@link computeExecutablePath} to get the path to the executable binary.
+ */
+ get path(): string;
+ readMetadata(): Metadata;
+ writeMetadata(metadata: Metadata): void;
+}
+/**
+ * @internal
+ */
+export interface ComputeExecutablePathOptions {
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+}
+export interface Metadata {
+ aliases: Record;
+}
+/**
+ * The cache used by Puppeteer relies on the following structure:
+ *
+ * - rootDir
+ * -- | browserRoot(browser1)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * -- | browserRoot(browser2)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * @internal
+ */
+export declare class Cache {
+ #private;
+ constructor(rootDir: string);
+ /**
+ * @internal
+ */
+ get rootDir(): string;
+ browserRoot(browser: Browser): string;
+ metadataFile(browser: Browser): string;
+ readMetadata(browser: Browser): Metadata;
+ writeMetadata(browser: Browser, metadata: Metadata): void;
+ resolveAlias(browser: Browser, alias: string): string | undefined;
+ installationDir(browser: Browser, platform: BrowserPlatform, buildId: string): string;
+ clear(): void;
+ uninstall(browser: Browser, platform: BrowserPlatform, buildId: string): void;
+ getInstalledBrowsers(): InstalledBrowser[];
+ computeExecutablePath(options: ComputeExecutablePathOptions): string;
+}
+//# sourceMappingURL=Cache.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map
new file mode 100644
index 00000000..71d5ba4b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"Cache.d.ts","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,OAAO,EACP,KAAK,eAAe,EAGrB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,MAAM;IAIT,KAAK,IAAI,IAAI;IASb,SAAS,CACP,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,IAAI;IAeP,oBAAoB,IAAI,gBAAgB,EAAE;IA+B1C,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,MAAM;CA0BrE"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.js b/node_modules/@puppeteer/browsers/lib/esm/Cache.js
new file mode 100644
index 00000000..bacf3308
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.js
@@ -0,0 +1,183 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import fs from 'fs';
+import os from 'os';
+import path from 'path';
+import debug from 'debug';
+import { Browser, executablePathByBrowser, getVersionComparator, } from './browser-data/browser-data.js';
+import { detectBrowserPlatform } from './detectPlatform.js';
+const debugCache = debug('puppeteer:browsers:cache');
+/**
+ * @public
+ */
+export class InstalledBrowser {
+ browser;
+ buildId;
+ platform;
+ executablePath;
+ #cache;
+ /**
+ * @internal
+ */
+ constructor(cache, browser, buildId, platform) {
+ this.#cache = cache;
+ this.browser = browser;
+ this.buildId = buildId;
+ this.platform = platform;
+ this.executablePath = cache.computeExecutablePath({
+ browser,
+ buildId,
+ platform,
+ });
+ }
+ /**
+ * Path to the root of the installation folder. Use
+ * {@link computeExecutablePath} to get the path to the executable binary.
+ */
+ get path() {
+ return this.#cache.installationDir(this.browser, this.platform, this.buildId);
+ }
+ readMetadata() {
+ return this.#cache.readMetadata(this.browser);
+ }
+ writeMetadata(metadata) {
+ this.#cache.writeMetadata(this.browser, metadata);
+ }
+}
+/**
+ * The cache used by Puppeteer relies on the following structure:
+ *
+ * - rootDir
+ * -- | browserRoot(browser1)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * -- | browserRoot(browser2)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * @internal
+ */
+export class Cache {
+ #rootDir;
+ constructor(rootDir) {
+ this.#rootDir = rootDir;
+ }
+ /**
+ * @internal
+ */
+ get rootDir() {
+ return this.#rootDir;
+ }
+ browserRoot(browser) {
+ return path.join(this.#rootDir, browser);
+ }
+ metadataFile(browser) {
+ return path.join(this.browserRoot(browser), '.metadata');
+ }
+ readMetadata(browser) {
+ const metatadaPath = this.metadataFile(browser);
+ if (!fs.existsSync(metatadaPath)) {
+ return { aliases: {} };
+ }
+ // TODO: add type-safe parsing.
+ const data = JSON.parse(fs.readFileSync(metatadaPath, 'utf8'));
+ if (typeof data !== 'object') {
+ throw new Error('.metadata is not an object');
+ }
+ return data;
+ }
+ writeMetadata(browser, metadata) {
+ const metatadaPath = this.metadataFile(browser);
+ fs.mkdirSync(path.dirname(metatadaPath), { recursive: true });
+ fs.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2));
+ }
+ resolveAlias(browser, alias) {
+ const metadata = this.readMetadata(browser);
+ if (alias === 'latest') {
+ return Object.values(metadata.aliases || {})
+ .sort(getVersionComparator(browser))
+ .at(-1);
+ }
+ return metadata.aliases[alias];
+ }
+ installationDir(browser, platform, buildId) {
+ return path.join(this.browserRoot(browser), `${platform}-${buildId}`);
+ }
+ clear() {
+ fs.rmSync(this.#rootDir, {
+ force: true,
+ recursive: true,
+ maxRetries: 10,
+ retryDelay: 500,
+ });
+ }
+ uninstall(browser, platform, buildId) {
+ const metadata = this.readMetadata(browser);
+ for (const alias of Object.keys(metadata.aliases)) {
+ if (metadata.aliases[alias] === buildId) {
+ delete metadata.aliases[alias];
+ }
+ }
+ fs.rmSync(this.installationDir(browser, platform, buildId), {
+ force: true,
+ recursive: true,
+ maxRetries: 10,
+ retryDelay: 500,
+ });
+ }
+ getInstalledBrowsers() {
+ if (!fs.existsSync(this.#rootDir)) {
+ return [];
+ }
+ const types = fs.readdirSync(this.#rootDir);
+ const browsers = types.filter((t) => {
+ return Object.values(Browser).includes(t);
+ });
+ return browsers.flatMap(browser => {
+ const files = fs.readdirSync(this.browserRoot(browser));
+ return files
+ .map(file => {
+ const result = parseFolderPath(path.join(this.browserRoot(browser), file));
+ if (!result) {
+ return null;
+ }
+ return new InstalledBrowser(this, browser, result.buildId, result.platform);
+ })
+ .filter((item) => {
+ return item !== null;
+ });
+ });
+ }
+ computeExecutablePath(options) {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
+ }
+ try {
+ options.buildId =
+ this.resolveAlias(options.browser, options.buildId) ?? options.buildId;
+ }
+ catch {
+ debugCache('could not read .metadata file for the browser');
+ }
+ const installationDir = this.installationDir(options.browser, options.platform, options.buildId);
+ return path.join(installationDir, executablePathByBrowser[options.browser](options.platform, options.buildId));
+ }
+}
+function parseFolderPath(folderPath) {
+ const name = path.basename(folderPath);
+ const splits = name.split('-');
+ if (splits.length !== 2) {
+ return;
+ }
+ const [platform, buildId] = splits;
+ if (!buildId || !platform) {
+ return;
+ }
+ return { platform, buildId };
+}
+//# sourceMappingURL=Cache.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map b/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map
new file mode 100644
index 00000000..1aed3484
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/Cache.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,OAAO,EAEP,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,qBAAqB,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AC;QACJ,CAAC;QACD,IAAI,CAAC;YACH,OAAO,CAAC,OAAO;gBACb,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC;QAC3E,CAAC;QAAC,MAAM,CAAC;YACP,UAAU,CAAC,+CAA+C,CAAC,CAAC;QAC9D,CAAC;QACD,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAC1C,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,CAChB,CAAC;QACF,OAAO,IAAI,CAAC,IAAI,CACd,eAAe,EACf,uBAAuB,CAAC,OAAO,CAAC,OAAO,CAAC,CACtC,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,CAChB,CACF,CAAC;IACJ,CAAC;CACF;AAED,SAAS,eAAe,CACtB,UAAkB;IAElB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO;IACT,CAAC;IACD,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACnC,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IACD,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC;AAC7B,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts
new file mode 100644
index 00000000..bd6b75da
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts
@@ -0,0 +1,61 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import * as chromeHeadlessShell from './chrome-headless-shell.js';
+import * as chrome from './chrome.js';
+import * as chromedriver from './chromedriver.js';
+import * as chromium from './chromium.js';
+import * as firefox from './firefox.js';
+import { Browser, BrowserPlatform, ChromeReleaseChannel, type ProfileOptions } from './types.js';
+export type { ProfileOptions };
+export declare const downloadUrls: {
+ chromedriver: typeof chromedriver.resolveDownloadUrl;
+ "chrome-headless-shell": typeof chromeHeadlessShell.resolveDownloadUrl;
+ chrome: typeof chrome.resolveDownloadUrl;
+ chromium: typeof chromium.resolveDownloadUrl;
+ firefox: typeof firefox.resolveDownloadUrl;
+};
+export declare const downloadPaths: {
+ chromedriver: typeof chromedriver.resolveDownloadPath;
+ "chrome-headless-shell": typeof chromeHeadlessShell.resolveDownloadPath;
+ chrome: typeof chrome.resolveDownloadPath;
+ chromium: typeof chromium.resolveDownloadPath;
+ firefox: typeof firefox.resolveDownloadPath;
+};
+export declare const executablePathByBrowser: {
+ chromedriver: typeof chromedriver.relativeExecutablePath;
+ "chrome-headless-shell": typeof chromeHeadlessShell.relativeExecutablePath;
+ chrome: typeof chrome.relativeExecutablePath;
+ chromium: typeof chromium.relativeExecutablePath;
+ firefox: typeof firefox.relativeExecutablePath;
+};
+export declare const versionComparators: {
+ chromedriver: typeof chromeHeadlessShell.compareVersions;
+ "chrome-headless-shell": typeof chromeHeadlessShell.compareVersions;
+ chrome: typeof chromeHeadlessShell.compareVersions;
+ chromium: typeof chromium.compareVersions;
+ firefox: typeof firefox.compareVersions;
+};
+export { Browser, BrowserPlatform, ChromeReleaseChannel };
+/**
+ * @public
+ */
+export declare function resolveBuildId(browser: Browser, platform: BrowserPlatform, tag: string): Promise;
+/**
+ * @public
+ */
+export declare function createProfile(browser: Browser, opts: ProfileOptions): Promise;
+/**
+ * @public
+ */
+export declare function resolveSystemExecutablePath(browser: Browser, platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export declare function getVersionComparator(browser: Browser): (a: string, b: string) => number;
+//# sourceMappingURL=browser-data.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map
new file mode 100644
index 00000000..ed610a70
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser-data.d.ts","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EAEf,oBAAoB,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAC,cAAc,EAAC,CAAC;AAE7B,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;CAMnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;CAM9B,CAAC;AAEF,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAC,CAAC;AA+GxD;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CA+BjB;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAYR;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,MAAM,CAElC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js
new file mode 100644
index 00000000..eb9ed163
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js
@@ -0,0 +1,199 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import * as chromeHeadlessShell from './chrome-headless-shell.js';
+import * as chrome from './chrome.js';
+import * as chromedriver from './chromedriver.js';
+import * as chromium from './chromium.js';
+import * as firefox from './firefox.js';
+import { Browser, BrowserPlatform, BrowserTag, ChromeReleaseChannel, } from './types.js';
+export const downloadUrls = {
+ [Browser.CHROMEDRIVER]: chromedriver.resolveDownloadUrl,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.resolveDownloadUrl,
+ [Browser.CHROME]: chrome.resolveDownloadUrl,
+ [Browser.CHROMIUM]: chromium.resolveDownloadUrl,
+ [Browser.FIREFOX]: firefox.resolveDownloadUrl,
+};
+export const downloadPaths = {
+ [Browser.CHROMEDRIVER]: chromedriver.resolveDownloadPath,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.resolveDownloadPath,
+ [Browser.CHROME]: chrome.resolveDownloadPath,
+ [Browser.CHROMIUM]: chromium.resolveDownloadPath,
+ [Browser.FIREFOX]: firefox.resolveDownloadPath,
+};
+export const executablePathByBrowser = {
+ [Browser.CHROMEDRIVER]: chromedriver.relativeExecutablePath,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.relativeExecutablePath,
+ [Browser.CHROME]: chrome.relativeExecutablePath,
+ [Browser.CHROMIUM]: chromium.relativeExecutablePath,
+ [Browser.FIREFOX]: firefox.relativeExecutablePath,
+};
+export const versionComparators = {
+ [Browser.CHROMEDRIVER]: chromedriver.compareVersions,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.compareVersions,
+ [Browser.CHROME]: chrome.compareVersions,
+ [Browser.CHROMIUM]: chromium.compareVersions,
+ [Browser.FIREFOX]: firefox.compareVersions,
+};
+export { Browser, BrowserPlatform, ChromeReleaseChannel };
+/**
+ * @internal
+ */
+async function resolveBuildIdForBrowserTag(browser, platform, tag) {
+ switch (browser) {
+ case Browser.FIREFOX:
+ switch (tag) {
+ case BrowserTag.LATEST:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.NIGHTLY);
+ case BrowserTag.BETA:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.BETA);
+ case BrowserTag.NIGHTLY:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.NIGHTLY);
+ case BrowserTag.DEVEDITION:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.DEVEDITION);
+ case BrowserTag.STABLE:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.STABLE);
+ case BrowserTag.ESR:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.ESR);
+ case BrowserTag.CANARY:
+ case BrowserTag.DEV:
+ throw new Error(`${tag.toUpperCase()} is not available for Firefox`);
+ }
+ case Browser.CHROME: {
+ switch (tag) {
+ case BrowserTag.LATEST:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.BETA:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.BETA);
+ case BrowserTag.CANARY:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.DEV:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.DEV);
+ case BrowserTag.STABLE:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.STABLE);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.ESR:
+ throw new Error(`${tag.toUpperCase()} is not available for Chrome`);
+ }
+ }
+ case Browser.CHROMEDRIVER: {
+ switch (tag) {
+ case BrowserTag.LATEST:
+ case BrowserTag.CANARY:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.BETA:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.BETA);
+ case BrowserTag.DEV:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.DEV);
+ case BrowserTag.STABLE:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.STABLE);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.ESR:
+ throw new Error(`${tag.toUpperCase()} is not available for ChromeDriver`);
+ }
+ }
+ case Browser.CHROMEHEADLESSSHELL: {
+ switch (tag) {
+ case BrowserTag.LATEST:
+ case BrowserTag.CANARY:
+ return await chromeHeadlessShell.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.BETA:
+ return await chromeHeadlessShell.resolveBuildId(ChromeReleaseChannel.BETA);
+ case BrowserTag.DEV:
+ return await chromeHeadlessShell.resolveBuildId(ChromeReleaseChannel.DEV);
+ case BrowserTag.STABLE:
+ return await chromeHeadlessShell.resolveBuildId(ChromeReleaseChannel.STABLE);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.ESR:
+ throw new Error(`${tag} is not available for chrome-headless-shell`);
+ }
+ }
+ case Browser.CHROMIUM:
+ switch (tag) {
+ case BrowserTag.LATEST:
+ return await chromium.resolveBuildId(platform);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.CANARY:
+ case BrowserTag.DEV:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.BETA:
+ case BrowserTag.STABLE:
+ case BrowserTag.ESR:
+ throw new Error(`${tag} is not supported for Chromium. Use 'latest' instead.`);
+ }
+ }
+}
+/**
+ * @public
+ */
+export async function resolveBuildId(browser, platform, tag) {
+ const browserTag = tag;
+ if (Object.values(BrowserTag).includes(browserTag)) {
+ return await resolveBuildIdForBrowserTag(browser, platform, browserTag);
+ }
+ switch (browser) {
+ case Browser.FIREFOX:
+ return tag;
+ case Browser.CHROME:
+ const chromeResult = await chrome.resolveBuildId(tag);
+ if (chromeResult) {
+ return chromeResult;
+ }
+ return tag;
+ case Browser.CHROMEDRIVER:
+ const chromeDriverResult = await chromedriver.resolveBuildId(tag);
+ if (chromeDriverResult) {
+ return chromeDriverResult;
+ }
+ return tag;
+ case Browser.CHROMEHEADLESSSHELL:
+ const chromeHeadlessShellResult = await chromeHeadlessShell.resolveBuildId(tag);
+ if (chromeHeadlessShellResult) {
+ return chromeHeadlessShellResult;
+ }
+ return tag;
+ case Browser.CHROMIUM:
+ return tag;
+ }
+}
+/**
+ * @public
+ */
+export async function createProfile(browser, opts) {
+ switch (browser) {
+ case Browser.FIREFOX:
+ return await firefox.createProfile(opts);
+ case Browser.CHROME:
+ case Browser.CHROMIUM:
+ throw new Error(`Profile creation is not support for ${browser} yet`);
+ }
+}
+/**
+ * @public
+ */
+export function resolveSystemExecutablePath(browser, platform, channel) {
+ switch (browser) {
+ case Browser.CHROMEDRIVER:
+ case Browser.CHROMEHEADLESSSHELL:
+ case Browser.FIREFOX:
+ case Browser.CHROMIUM:
+ throw new Error(`System browser detection is not supported for ${browser} yet.`);
+ case Browser.CHROME:
+ return chrome.resolveSystemExecutablePath(platform, channel);
+ }
+}
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export function getVersionComparator(browser) {
+ return versionComparators[browser];
+}
+//# sourceMappingURL=browser-data.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map
new file mode 100644
index 00000000..d36ade01
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"browser-data.js","sourceRoot":"","sources":["../../../src/browser-data/browser-data.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,oBAAoB,GAErB,MAAM,YAAY,CAAC;AAIpB,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB;IACvD,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,kBAAkB;IACrE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,kBAAkB;IAC3C,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,kBAAkB;IAC/C,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB;CAC9C,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC,mBAAmB;IACxD,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,mBAAmB;IACtE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,mBAAmB;IAC5C,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,mBAAmB;IAChD,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,mB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AChB,QAAyB,EACzB,OAA6B;IAE7B,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,OAAO,CAAC,YAAY,CAAC;QAC1B,KAAK,OAAO,CAAC,mBAAmB,CAAC;QACjC,KAAK,OAAO,CAAC,OAAO,CAAC;QACrB,KAAK,OAAO,CAAC,QAAQ;YACnB,MAAM,IAAI,KAAK,CACb,iDAAiD,OAAO,OAAO,CAChE,CAAC;QACJ,KAAK,OAAO,CAAC,MAAM;YACjB,OAAO,MAAM,CAAC,2BAA2B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAgB;IAEhB,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts
new file mode 100644
index 00000000..d21d11b1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts
@@ -0,0 +1,6 @@
+import { BrowserPlatform } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export { resolveBuildId, compareVersions } from './chrome.js';
+//# sourceMappingURL=chrome-headless-shell.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map
new file mode 100644
index 00000000..111c5111
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome-headless-shell.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAMV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAoBR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js
new file mode 100644
index 00000000..4c31584a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js
@@ -0,0 +1,45 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import path from 'path';
+import { BrowserPlatform } from './types.js';
+function folder(platform) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'linux64';
+ case BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case BrowserPlatform.MAC:
+ return 'mac-x64';
+ case BrowserPlatform.WIN32:
+ return 'win32';
+ case BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+export function resolveDownloadPath(platform, buildId) {
+ return [
+ buildId,
+ folder(platform),
+ `chrome-headless-shell-${folder(platform)}.zip`,
+ ];
+}
+export function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join('chrome-headless-shell-' + folder(platform), 'chrome-headless-shell');
+ case BrowserPlatform.LINUX:
+ return path.join('chrome-headless-shell-linux64', 'chrome-headless-shell');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chrome-headless-shell-' + folder(platform), 'chrome-headless-shell.exe');
+ }
+}
+export { resolveBuildId, compareVersions } from './chrome.js';
+//# sourceMappingURL=chrome-headless-shell.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map
new file mode 100644
index 00000000..ccfe09d6
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome-headless-shell.js","sourceRoot":"","sources":["../../../src/browser-data/chrome-headless-shell.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO;QACL,OAAO;QACP,MAAM,CAAC,QAAQ,CAAC;QAChB,yBAAyB,MAAM,CAAC,QAAQ,CAAC,MAAM;KAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,uBAAuB,CACxB,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CACd,+BAA+B,EAC/B,uBAAuB,CACxB,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CACd,wBAAwB,GAAG,MAAM,CAAC,QAAQ,CAAC,EAC3C,2BAA2B,CAC5B,CAAC;IACN,CAAC;AACH,CAAC;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts
new file mode 100644
index 00000000..da0c1e77
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts
@@ -0,0 +1,30 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform, ChromeReleaseChannel } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export declare function getLastKnownGoodReleaseForChannel(channel: ChromeReleaseChannel): Promise<{
+ version: string;
+ revision: string;
+}>;
+export declare function getLastKnownGoodReleaseForMilestone(milestone: string): Promise<{
+ version: string;
+ revision: string;
+} | undefined>;
+export declare function getLastKnownGoodReleaseForBuild(
+/**
+ * @example `112.0.23`,
+ */
+buildPrefix: string): Promise<{
+ version: string;
+ revision: string;
+} | undefined>;
+export declare function resolveBuildId(channel: ChromeReleaseChannel): Promise;
+export declare function resolveBuildId(channel: string): Promise;
+export declare function resolveSystemExecutablePath(platform: BrowserPlatform, channel: ChromeReleaseChannel): string;
+export declare function compareVersions(a: string, b: string): number;
+//# sourceMappingURL=chrome.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map
new file mode 100644
index 00000000..018fee92
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAiBjE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AAED,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAAC,CAqB9C;AAED,wBAAsB,mCAAmC,CACvD,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,+BAA+B;AACnD;;GAEG;AACH,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAG,SAAS,CAAC,CAW1D;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;AACnB,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAwB/B,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,oBAAoB,GAC5B,MAAM,CAwCR;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAc5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js
new file mode 100644
index 00000000..12ef15fd
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js
@@ -0,0 +1,131 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import path from 'path';
+import semver from 'semver';
+import { getJSON } from '../httpUtil.js';
+import { BrowserPlatform, ChromeReleaseChannel } from './types.js';
+function folder(platform) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'linux64';
+ case BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case BrowserPlatform.MAC:
+ return 'mac-x64';
+ case BrowserPlatform.WIN32:
+ return 'win32';
+ case BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+export function resolveDownloadPath(platform, buildId) {
+ return [buildId, folder(platform), `chrome-${folder(platform)}.zip`];
+}
+export function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join('chrome-' + folder(platform), 'Google Chrome for Testing.app', 'Contents', 'MacOS', 'Google Chrome for Testing');
+ case BrowserPlatform.LINUX:
+ return path.join('chrome-linux64', 'chrome');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chrome-' + folder(platform), 'chrome.exe');
+ }
+}
+export async function getLastKnownGoodReleaseForChannel(channel) {
+ const data = (await getJSON(new URL('https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json')));
+ for (const channel of Object.keys(data.channels)) {
+ data.channels[channel.toLowerCase()] = data.channels[channel];
+ delete data.channels[channel];
+ }
+ return data.channels[channel];
+}
+export async function getLastKnownGoodReleaseForMilestone(milestone) {
+ const data = (await getJSON(new URL('https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone.json')));
+ return data.milestones[milestone];
+}
+export async function getLastKnownGoodReleaseForBuild(
+/**
+ * @example `112.0.23`,
+ */
+buildPrefix) {
+ const data = (await getJSON(new URL('https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json')));
+ return data.builds[buildPrefix];
+}
+export async function resolveBuildId(channel) {
+ if (Object.values(ChromeReleaseChannel).includes(channel)) {
+ return (await getLastKnownGoodReleaseForChannel(channel)).version;
+ }
+ if (channel.match(/^\d+$/)) {
+ // Potentially a milestone.
+ return (await getLastKnownGoodReleaseForMilestone(channel))?.version;
+ }
+ if (channel.match(/^\d+\.\d+\.\d+$/)) {
+ // Potentially a build prefix without the patch version.
+ return (await getLastKnownGoodReleaseForBuild(channel))?.version;
+ }
+ return;
+}
+export function resolveSystemExecutablePath(platform, channel) {
+ switch (platform) {
+ case BrowserPlatform.WIN64:
+ case BrowserPlatform.WIN32:
+ switch (channel) {
+ case ChromeReleaseChannel.STABLE:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome\\Application\\chrome.exe`;
+ case ChromeReleaseChannel.BETA:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome Beta\\Application\\chrome.exe`;
+ case ChromeReleaseChannel.CANARY:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome SxS\\Application\\chrome.exe`;
+ case ChromeReleaseChannel.DEV:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome Dev\\Application\\chrome.exe`;
+ }
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ switch (channel) {
+ case ChromeReleaseChannel.STABLE:
+ return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
+ case ChromeReleaseChannel.BETA:
+ return '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta';
+ case ChromeReleaseChannel.CANARY:
+ return '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary';
+ case ChromeReleaseChannel.DEV:
+ return '/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev';
+ }
+ case BrowserPlatform.LINUX:
+ switch (channel) {
+ case ChromeReleaseChannel.STABLE:
+ return '/opt/google/chrome/chrome';
+ case ChromeReleaseChannel.BETA:
+ return '/opt/google/chrome-beta/chrome';
+ case ChromeReleaseChannel.DEV:
+ return '/opt/google/chrome-unstable/chrome';
+ }
+ }
+ throw new Error(`Unable to detect browser executable path for '${channel}' on ${platform}.`);
+}
+export function compareVersions(a, b) {
+ if (!semver.valid(a)) {
+ throw new Error(`Version ${a} is not a valid semver version`);
+ }
+ if (!semver.valid(b)) {
+ throw new Error(`Version ${b} is not a valid semver version`);
+ }
+ if (semver.gt(a, b)) {
+ return 1;
+ }
+ else if (semver.lt(a, b)) {
+ return -1;
+ }
+ else {
+ return 0;
+ }
+}
+//# sourceMappingURL=chrome.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map
new file mode 100644
index 00000000..3651ad8a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chrome.js","sourceRoot":"","sources":["../../../src/browser-data/chrome.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAEjE,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,O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CAAC,CAAC;IAChE,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACpB,OAAO,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts
new file mode 100644
index 00000000..5a26c3f9
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts
@@ -0,0 +1,6 @@
+import { BrowserPlatform } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export { resolveBuildId, compareVersions } from './chrome.js';
+//# sourceMappingURL=chromedriver.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map
new file mode 100644
index 00000000..6f59ef1b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromedriver.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAiB3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA6D,GACnE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAWR;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js
new file mode 100644
index 00000000..3e31d2f4
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js
@@ -0,0 +1,41 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import path from 'path';
+import { BrowserPlatform } from './types.js';
+function folder(platform) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'linux64';
+ case BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case BrowserPlatform.MAC:
+ return 'mac-x64';
+ case BrowserPlatform.WIN32:
+ return 'win32';
+ case BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+export function resolveDownloadPath(platform, buildId) {
+ return [buildId, folder(platform), `chromedriver-${folder(platform)}.zip`];
+}
+export function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join('chromedriver-' + folder(platform), 'chromedriver');
+ case BrowserPlatform.LINUX:
+ return path.join('chromedriver-linux64', 'chromedriver');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chromedriver-' + folder(platform), 'chromedriver.exe');
+ }
+}
+export { resolveBuildId, compareVersions } from './chrome.js';
+//# sourceMappingURL=chromedriver.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map
new file mode 100644
index 00000000..744536d3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromedriver.js","sourceRoot":"","sources":["../../../src/browser-data/chromedriver.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AAE3C,SAAS,MAAM,CAAC,QAAyB;IACvC,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,WAAW,CAAC;QACrB,KAAK,eAAe,CAAC,GAAG;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;QACjB,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,OAAO,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,QAAyB,EACzB,OAAe,EACf,OAAO,GAAG,0DAA0D;IAEpE,OAAO,GAAG,OAAO,IAAI,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,OAAe;IAEf,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,gBAAgB,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;QACvE,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC;QAC3D,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC;AAED,OAAO,EAAC,cAAc,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts
new file mode 100644
index 00000000..6bcb9366
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts
@@ -0,0 +1,12 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, _buildId: string): string;
+export declare function resolveBuildId(platform: BrowserPlatform): Promise;
+export declare function compareVersions(a: string, b: string): number;
+//# sourceMappingURL=chromium.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map
new file mode 100644
index 00000000..72e3a10b
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromium.d.ts","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAC,eAAe,EAAC,MAAM,YAAY,CAAC;AA+B3C,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,SAA8D,GACpE,MAAM,CAER;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,MAAM,GACf,MAAM,CAiBR;AACD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js
new file mode 100644
index 00000000..0e0228ae
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js
@@ -0,0 +1,60 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import path from 'path';
+import { getText } from '../httpUtil.js';
+import { BrowserPlatform } from './types.js';
+function archive(platform, buildId) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'chrome-linux';
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return 'chrome-mac';
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ // Windows archive name changed at r591479.
+ return parseInt(buildId, 10) > 591479 ? 'chrome-win' : 'chrome-win32';
+ }
+}
+function folder(platform) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'Linux_x64';
+ case BrowserPlatform.MAC_ARM:
+ return 'Mac_Arm';
+ case BrowserPlatform.MAC:
+ return 'Mac';
+ case BrowserPlatform.WIN32:
+ return 'Win';
+ case BrowserPlatform.WIN64:
+ return 'Win_x64';
+ }
+}
+export function resolveDownloadUrl(platform, buildId, baseUrl = 'https://storage.googleapis.com/chromium-browser-snapshots') {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+export function resolveDownloadPath(platform, buildId) {
+ return [folder(platform), buildId, `${archive(platform, buildId)}.zip`];
+}
+export function relativeExecutablePath(platform, _buildId) {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join('chrome-mac', 'Chromium.app', 'Contents', 'MacOS', 'Chromium');
+ case BrowserPlatform.LINUX:
+ return path.join('chrome-linux', 'chrome');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chrome-win', 'chrome.exe');
+ }
+}
+export async function resolveBuildId(platform) {
+ return await getText(new URL(`https://storage.googleapis.com/chromium-browser-snapshots/${folder(platform)}/LAST_CHANGE`));
+}
+export function compareVersions(a, b) {
+ return Number(a) - Number(b);
+}
+//# sourceMappingURL=chromium.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map
new file mode 100644
index 00000000..d3d64305
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"chromium.js","sourceRoot":"","sources":["../../../src/browser-data/chromium.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,I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AE,GAAG,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,QAAyB,EACzB,QAAgB;IAEhB,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,GAAG,CAAC;QACzB,KAAK,eAAe,CAAC,OAAO;YAC1B,OAAO,IAAI,CAAC,IAAI,CACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,OAAO,EACP,UAAU,CACX,CAAC;QACJ,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAC7C,KAAK,eAAe,CAAC,KAAK,CAAC;QAC3B,KAAK,eAAe,CAAC,KAAK;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;AACH,CAAC;AACD,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,QAAyB;IAEzB,OAAO,MAAM,OAAO,CAClB,IAAI,GAAG,CACL,6DAA6D,MAAM,CACjE,QAAQ,CACT,cAAc,CAChB,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,CAAS,EAAE,CAAS;IAClD,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts
new file mode 100644
index 00000000..447f91d7
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts
@@ -0,0 +1,20 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform, type ProfileOptions } from './types.js';
+export declare function resolveDownloadUrl(platform: BrowserPlatform, buildId: string, baseUrl?: string): string;
+export declare function resolveDownloadPath(platform: BrowserPlatform, buildId: string): string[];
+export declare function relativeExecutablePath(platform: BrowserPlatform, buildId: string): string;
+export declare enum FirefoxChannel {
+ STABLE = "stable",
+ ESR = "esr",
+ DEVEDITION = "devedition",
+ BETA = "beta",
+ NIGHTLY = "nightly"
+}
+export declare function resolveBuildId(channel?: FirefoxChannel): Promise;
+export declare function createProfile(options: ProfileOptions): Promise;
+export declare function compareVersions(a: string, b: string): number;
+//# sourceMappingURL=firefox.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map
new file mode 100644
index 00000000..1169d14f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"firefox.d.ts","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EAAC,eAAe,EAAE,KAAK,cAAc,EAAC,MAAM,YAAY,CAAC;AAoDhE,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,CAyBR;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,EAAE,CAEV;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,MAAM,GACd,MAAM,CAkCR;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,cAAuC,GAC/C,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E;AA8PD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG5D"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js
new file mode 100644
index 00000000..580d581e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js
@@ -0,0 +1,346 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import fs from 'fs';
+import path from 'path';
+import { getJSON } from '../httpUtil.js';
+import { BrowserPlatform } from './types.js';
+function archiveNightly(platform, buildId) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return `firefox-${buildId}.en-US.${platform}-x86_64.tar.bz2`;
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return `firefox-${buildId}.en-US.mac.dmg`;
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return `firefox-${buildId}.en-US.${platform}.zip`;
+ }
+}
+function archive(platform, buildId) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return `firefox-${buildId}.tar.bz2`;
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return `Firefox ${buildId}.dmg`;
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return `Firefox Setup ${buildId}.exe`;
+ }
+}
+function platformName(platform) {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return `linux-x86_64`;
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return `mac`;
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return platform;
+ }
+}
+function parseBuildId(buildId) {
+ for (const value of Object.values(FirefoxChannel)) {
+ if (buildId.startsWith(value + '_')) {
+ buildId = buildId.substring(value.length + 1);
+ return [value, buildId];
+ }
+ }
+ // Older versions do not have channel as the prefix.«
+ return [FirefoxChannel.NIGHTLY, buildId];
+}
+export function resolveDownloadUrl(platform, buildId, baseUrl) {
+ const [channel, resolvedBuildId] = parseBuildId(buildId);
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ baseUrl ??=
+ 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central';
+ break;
+ case FirefoxChannel.DEVEDITION:
+ baseUrl ??= 'https://archive.mozilla.org/pub/devedition/releases';
+ break;
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.STABLE:
+ case FirefoxChannel.ESR:
+ baseUrl ??= 'https://archive.mozilla.org/pub/firefox/releases';
+ break;
+ }
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ return `${baseUrl}/${resolveDownloadPath(platform, resolvedBuildId).join('/')}`;
+ case FirefoxChannel.DEVEDITION:
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.STABLE:
+ case FirefoxChannel.ESR:
+ return `${baseUrl}/${resolvedBuildId}/${platformName(platform)}/en-US/${archive(platform, resolvedBuildId)}`;
+ }
+}
+export function resolveDownloadPath(platform, buildId) {
+ return [archiveNightly(platform, buildId)];
+}
+export function relativeExecutablePath(platform, buildId) {
+ const [channel] = parseBuildId(buildId);
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ switch (platform) {
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return path.join('Firefox Nightly.app', 'Contents', 'MacOS', 'firefox');
+ case BrowserPlatform.LINUX:
+ return path.join('firefox', 'firefox');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('firefox', 'firefox.exe');
+ }
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.DEVEDITION:
+ case FirefoxChannel.ESR:
+ case FirefoxChannel.STABLE:
+ switch (platform) {
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return path.join('Firefox.app', 'Contents', 'MacOS', 'firefox');
+ case BrowserPlatform.LINUX:
+ return path.join('firefox', 'firefox');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('core', 'firefox.exe');
+ }
+ }
+}
+export var FirefoxChannel;
+(function (FirefoxChannel) {
+ FirefoxChannel["STABLE"] = "stable";
+ FirefoxChannel["ESR"] = "esr";
+ FirefoxChannel["DEVEDITION"] = "devedition";
+ FirefoxChannel["BETA"] = "beta";
+ FirefoxChannel["NIGHTLY"] = "nightly";
+})(FirefoxChannel || (FirefoxChannel = {}));
+export async function resolveBuildId(channel = FirefoxChannel.NIGHTLY) {
+ const channelToVersionKey = {
+ [FirefoxChannel.ESR]: 'FIREFOX_ESR',
+ [FirefoxChannel.STABLE]: 'LATEST_FIREFOX_VERSION',
+ [FirefoxChannel.DEVEDITION]: 'FIREFOX_DEVEDITION',
+ [FirefoxChannel.BETA]: 'FIREFOX_DEVEDITION',
+ [FirefoxChannel.NIGHTLY]: 'FIREFOX_NIGHTLY',
+ };
+ const versions = (await getJSON(new URL('https://product-details.mozilla.org/1.0/firefox_versions.json')));
+ const version = versions[channelToVersionKey[channel]];
+ if (!version) {
+ throw new Error(`Channel ${channel} is not found.`);
+ }
+ return channel + '_' + version;
+}
+export async function createProfile(options) {
+ if (!fs.existsSync(options.path)) {
+ await fs.promises.mkdir(options.path, {
+ recursive: true,
+ });
+ }
+ await writePreferences({
+ preferences: {
+ ...defaultProfilePreferences(options.preferences),
+ ...options.preferences,
+ },
+ path: options.path,
+ });
+}
+function defaultProfilePreferences(extraPrefs) {
+ const server = 'dummy.test';
+ const defaultPrefs = {
+ // Make sure Shield doesn't hit the network.
+ 'app.normandy.api_url': '',
+ // Disable Firefox old build background check
+ 'app.update.checkInstallTime': false,
+ // Disable automatically upgrading Firefox
+ 'app.update.disabledForTesting': true,
+ // Increase the APZ content response timeout to 1 minute
+ 'apz.content_response_timeout': 60000,
+ // Prevent various error message on the console
+ // jest-puppeteer asserts that no error message is emitted by the console
+ 'browser.contentblocking.features.standard': '-tp,tpPrivate,cookieBehavior0,-cm,-fp',
+ // Enable the dump function: which sends messages to the system
+ // console
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1543115
+ 'browser.dom.window.dump.enabled': true,
+ // Disable topstories
+ 'browser.newtabpage.activity-stream.feeds.system.topstories': false,
+ // Always display a blank page
+ 'browser.newtabpage.enabled': false,
+ // Background thumbnails in particular cause grief: and disabling
+ // thumbnails in general cannot hurt
+ 'browser.pagethumbnails.capturing_disabled': true,
+ // Disable safebrowsing components.
+ 'browser.safebrowsing.blockedURIs.enabled': false,
+ 'browser.safebrowsing.downloads.enabled': false,
+ 'browser.safebrowsing.malware.enabled': false,
+ 'browser.safebrowsing.phishing.enabled': false,
+ // Disable updates to search engines.
+ 'browser.search.update': false,
+ // Do not restore the last open set of tabs if the browser has crashed
+ 'browser.sessionstore.resume_from_crash': false,
+ // Skip check for default browser on startup
+ 'browser.shell.checkDefaultBrowser': false,
+ // Disable newtabpage
+ 'browser.startup.homepage': 'about:blank',
+ // Do not redirect user when a milstone upgrade of Firefox is detected
+ 'browser.startup.homepage_override.mstone': 'ignore',
+ // Start with a blank page about:blank
+ 'browser.startup.page': 0,
+ // Do not allow background tabs to be zombified on Android: otherwise for
+ // tests that open additional tabs: the test harness tab itself might get
+ // unloaded
+ 'browser.tabs.disableBackgroundZombification': false,
+ // Do not warn when closing all other open tabs
+ 'browser.tabs.warnOnCloseOtherTabs': false,
+ // Do not warn when multiple tabs will be opened
+ 'browser.tabs.warnOnOpen': false,
+ // Do not automatically offer translations, as tests do not expect this.
+ 'browser.translations.automaticallyPopup': false,
+ // Disable the UI tour.
+ 'browser.uitour.enabled': false,
+ // Turn off search suggestions in the location bar so as not to trigger
+ // network connections.
+ 'browser.urlbar.suggest.searches': false,
+ // Disable first run splash page on Windows 10
+ 'browser.usedOnWindows10.introURL': '',
+ // Do not warn on quitting Firefox
+ 'browser.warnOnQuit': false,
+ // Defensively disable data reporting systems
+ 'datareporting.healthreport.documentServerURI': `http://${server}/dummy/healthreport/`,
+ 'datareporting.healthreport.logging.consoleEnabled': false,
+ 'datareporting.healthreport.service.enabled': false,
+ 'datareporting.healthreport.service.firstRun': false,
+ 'datareporting.healthreport.uploadEnabled': false,
+ // Do not show datareporting policy notifications which can interfere with tests
+ 'datareporting.policy.dataSubmissionEnabled': false,
+ 'datareporting.policy.dataSubmissionPolicyBypassNotification': true,
+ // DevTools JSONViewer sometimes fails to load dependencies with its require.js.
+ // This doesn't affect Puppeteer but spams console (Bug 1424372)
+ 'devtools.jsonview.enabled': false,
+ // Disable popup-blocker
+ 'dom.disable_open_during_load': false,
+ // Enable the support for File object creation in the content process
+ // Required for |Page.setFileInputFiles| protocol method.
+ 'dom.file.createInChild': true,
+ // Disable the ProcessHangMonitor
+ 'dom.ipc.reportProcessHangs': false,
+ // Disable slow script dialogues
+ 'dom.max_chrome_script_run_time': 0,
+ 'dom.max_script_run_time': 0,
+ // Only load extensions from the application and user profile
+ // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION
+ 'extensions.autoDisableScopes': 0,
+ 'extensions.enabledScopes': 5,
+ // Disable metadata caching for installed add-ons by default
+ 'extensions.getAddons.cache.enabled': false,
+ // Disable installing any distribution extensions or add-ons.
+ 'extensions.installDistroAddons': false,
+ // Disabled screenshots extension
+ 'extensions.screenshots.disabled': true,
+ // Turn off extension updates so they do not bother tests
+ 'extensions.update.enabled': false,
+ // Turn off extension updates so they do not bother tests
+ 'extensions.update.notifyUser': false,
+ // Make sure opening about:addons will not hit the network
+ 'extensions.webservice.discoverURL': `http://${server}/dummy/discoveryURL`,
+ // Allow the application to have focus even it runs in the background
+ 'focusmanager.testmode': true,
+ // Disable useragent updates
+ 'general.useragent.updates.enabled': false,
+ // Always use network provider for geolocation tests so we bypass the
+ // macOS dialog raised by the corelocation provider
+ 'geo.provider.testing': true,
+ // Do not scan Wifi
+ 'geo.wifi.scan': false,
+ // No hang monitor
+ 'hangmonitor.timeout': 0,
+ // Show chrome errors and warnings in the error console
+ 'javascript.options.showInConsole': true,
+ // Disable download and usage of OpenH264: and Widevine plugins
+ 'media.gmp-manager.updateEnabled': false,
+ // Disable the GFX sanity window
+ 'media.sanity-test.disabled': true,
+ // Disable experimental feature that is only available in Nightly
+ 'network.cookie.sameSite.laxByDefault': false,
+ // Do not prompt for temporary redirects
+ 'network.http.prompt-temp-redirect': false,
+ // Disable speculative connections so they are not reported as leaking
+ // when they are hanging around
+ 'network.http.speculative-parallel-limit': 0,
+ // Do not automatically switch between offline and online
+ 'network.manage-offline-status': false,
+ // Make sure SNTP requests do not hit the network
+ 'network.sntp.pools': server,
+ // Disable Flash.
+ 'plugin.state.flash': 0,
+ 'privacy.trackingprotection.enabled': false,
+ // Can be removed once Firefox 89 is no longer supported
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1710839
+ 'remote.enabled': true,
+ // Don't do network connections for mitm priming
+ 'security.certerrors.mitm.priming.enabled': false,
+ // Local documents have access to all other local documents,
+ // including directory listings
+ 'security.fileuri.strict_origin_policy': false,
+ // Do not wait for the notification button security delay
+ 'security.notification_enable_delay': 0,
+ // Ensure blocklist updates do not hit the network
+ 'services.settings.server': `http://${server}/dummy/blocklist/`,
+ // Do not automatically fill sign-in forms with known usernames and
+ // passwords
+ 'signon.autofillForms': false,
+ // Disable password capture, so that tests that include forms are not
+ // influenced by the presence of the persistent doorhanger notification
+ 'signon.rememberSignons': false,
+ // Disable first-run welcome page
+ 'startup.homepage_welcome_url': 'about:blank',
+ // Disable first-run welcome page
+ 'startup.homepage_welcome_url.additional': '',
+ // Disable browser animations (tabs, fullscreen, sliding alerts)
+ 'toolkit.cosmeticAnimations.enabled': false,
+ // Prevent starting into safe mode after application crashes
+ 'toolkit.startup.max_resumed_crashes': -1,
+ };
+ return Object.assign(defaultPrefs, extraPrefs);
+}
+/**
+ * Populates the user.js file with custom preferences as needed to allow
+ * Firefox's CDP support to properly function. These preferences will be
+ * automatically copied over to prefs.js during startup of Firefox. To be
+ * able to restore the original values of preferences a backup of prefs.js
+ * will be created.
+ *
+ * @param prefs - List of preferences to add.
+ * @param profilePath - Firefox profile to write the preferences to.
+ */
+async function writePreferences(options) {
+ const prefsPath = path.join(options.path, 'prefs.js');
+ const lines = Object.entries(options.preferences).map(([key, value]) => {
+ return `user_pref(${JSON.stringify(key)}, ${JSON.stringify(value)});`;
+ });
+ // Use allSettled to prevent corruption
+ const result = await Promise.allSettled([
+ fs.promises.writeFile(path.join(options.path, 'user.js'), lines.join('\n')),
+ // Create a backup of the preferences file if it already exitsts.
+ fs.promises.access(prefsPath, fs.constants.F_OK).then(async () => {
+ await fs.promises.copyFile(prefsPath, path.join(options.path, 'prefs.js.puppeteer'));
+ },
+ // Swallow only if file does not exist
+ () => { }),
+ ]);
+ for (const command of result) {
+ if (command.status === 'rejected') {
+ throw command.reason;
+ }
+ }
+}
+export function compareVersions(a, b) {
+ // TODO: this is a not very reliable check.
+ return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16);
+}
+//# sourceMappingURL=firefox.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map
new file mode 100644
index 00000000..7afbcaa1
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"firefox.js","sourceRoot":"","sources":["../../../src/browser-data/firefox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,eAAe,EAAsB,MAAM,YAAY,CAAC;AAEhE,SAAS,cAAc,CAAC,QAAyB,EAAE,OAAe;IAChE,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,eAAe,CAAC,KA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,EAAE,CAAC,CAAC;AAC7E,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.d.ts b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.d.ts
new file mode 100644
index 00000000..652535ba
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.d.ts
@@ -0,0 +1,60 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * Supported browsers.
+ *
+ * @public
+ */
+export declare enum Browser {
+ CHROME = "chrome",
+ CHROMEHEADLESSSHELL = "chrome-headless-shell",
+ CHROMIUM = "chromium",
+ FIREFOX = "firefox",
+ CHROMEDRIVER = "chromedriver"
+}
+/**
+ * Platform names used to identify a OS platform x architecture combination in the way
+ * that is relevant for the browser download.
+ *
+ * @public
+ */
+export declare enum BrowserPlatform {
+ LINUX = "linux",
+ MAC = "mac",
+ MAC_ARM = "mac_arm",
+ WIN32 = "win32",
+ WIN64 = "win64"
+}
+/**
+ * @public
+ */
+export declare enum BrowserTag {
+ CANARY = "canary",
+ NIGHTLY = "nightly",
+ BETA = "beta",
+ DEV = "dev",
+ DEVEDITION = "devedition",
+ STABLE = "stable",
+ ESR = "esr",
+ LATEST = "latest"
+}
+/**
+ * @public
+ */
+export interface ProfileOptions {
+ preferences: Record;
+ path: string;
+}
+/**
+ * @public
+ */
+export declare enum ChromeReleaseChannel {
+ STABLE = "stable",
+ DEV = "dev",
+ CANARY = "canary",
+ BETA = "beta"
+}
+//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.d.ts.map
new file mode 100644
index 00000000..14cc749f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/browser-data/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,oBAAY,OAAO;IACjB,MAAM,WAAW;IACjB,mBAAmB,0BAA0B;IAC7C,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,YAAY,iBAAiB;CAC9B;AAED;;;;;GAKG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js
new file mode 100644
index 00000000..55219e5f
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js
@@ -0,0 +1,57 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * Supported browsers.
+ *
+ * @public
+ */
+export var Browser;
+(function (Browser) {
+ Browser["CHROME"] = "chrome";
+ Browser["CHROMEHEADLESSSHELL"] = "chrome-headless-shell";
+ Browser["CHROMIUM"] = "chromium";
+ Browser["FIREFOX"] = "firefox";
+ Browser["CHROMEDRIVER"] = "chromedriver";
+})(Browser || (Browser = {}));
+/**
+ * Platform names used to identify a OS platform x architecture combination in the way
+ * that is relevant for the browser download.
+ *
+ * @public
+ */
+export var BrowserPlatform;
+(function (BrowserPlatform) {
+ BrowserPlatform["LINUX"] = "linux";
+ BrowserPlatform["MAC"] = "mac";
+ BrowserPlatform["MAC_ARM"] = "mac_arm";
+ BrowserPlatform["WIN32"] = "win32";
+ BrowserPlatform["WIN64"] = "win64";
+})(BrowserPlatform || (BrowserPlatform = {}));
+/**
+ * @public
+ */
+export var BrowserTag;
+(function (BrowserTag) {
+ BrowserTag["CANARY"] = "canary";
+ BrowserTag["NIGHTLY"] = "nightly";
+ BrowserTag["BETA"] = "beta";
+ BrowserTag["DEV"] = "dev";
+ BrowserTag["DEVEDITION"] = "devedition";
+ BrowserTag["STABLE"] = "stable";
+ BrowserTag["ESR"] = "esr";
+ BrowserTag["LATEST"] = "latest";
+})(BrowserTag || (BrowserTag = {}));
+/**
+ * @public
+ */
+export var ChromeReleaseChannel;
+(function (ChromeReleaseChannel) {
+ ChromeReleaseChannel["STABLE"] = "stable";
+ ChromeReleaseChannel["DEV"] = "dev";
+ ChromeReleaseChannel["CANARY"] = "canary";
+ ChromeReleaseChannel["BETA"] = "beta";
+})(ChromeReleaseChannel || (ChromeReleaseChannel = {}));
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js.map b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js.map
new file mode 100644
index 00000000..684b6213
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/browser-data/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/browser-data/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,OAMX;AAND,WAAY,OAAO;IACjB,4BAAiB,CAAA;IACjB,wDAA6C,CAAA;IAC7C,gCAAqB,CAAA;IACrB,8BAAmB,CAAA;IACnB,wCAA6B,CAAA;AAC/B,CAAC,EANW,OAAO,KAAP,OAAO,QAMlB;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,8BAAW,CAAA;IACX,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,kCAAe,CAAA;AACjB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,uCAAyB,CAAA;IACzB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACnB,CAAC,EATW,UAAU,KAAV,UAAU,QASrB;AAUD;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,mCAAW,CAAA;IACX,yCAAiB,CAAA;IACjB,qCAAa,CAAA;AACf,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/debug.d.ts b/node_modules/@puppeteer/browsers/lib/esm/debug.d.ts
new file mode 100644
index 00000000..aa062da3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/debug.d.ts
@@ -0,0 +1,8 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import debug from 'debug';
+export { debug };
+//# sourceMappingURL=debug.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/debug.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/debug.d.ts.map
new file mode 100644
index 00000000..2f5f252d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/debug.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/debug.js b/node_modules/@puppeteer/browsers/lib/esm/debug.js
new file mode 100644
index 00000000..6d7db6aa
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/debug.js
@@ -0,0 +1,8 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import debug from 'debug';
+export { debug };
+//# sourceMappingURL=debug.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/debug.js.map b/node_modules/@puppeteer/browsers/lib/esm/debug.js.map
new file mode 100644
index 00000000..93513490
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/debug.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/debug.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,KAAK,EAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.d.ts b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.d.ts
new file mode 100644
index 00000000..3ed4758a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.d.ts
@@ -0,0 +1,11 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { BrowserPlatform } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export declare function detectBrowserPlatform(): BrowserPlatform | undefined;
+//# sourceMappingURL=detectPlatform.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.d.ts.map
new file mode 100644
index 00000000..d6643762
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"detectPlatform.d.ts","sourceRoot":"","sources":["../../src/detectPlatform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,eAAe,GAAG,SAAS,CAkBnE"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.js b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.js
new file mode 100644
index 00000000..e155989a
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.js
@@ -0,0 +1,46 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import os from 'os';
+import { BrowserPlatform } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export function detectBrowserPlatform() {
+ const platform = os.platform();
+ switch (platform) {
+ case 'darwin':
+ return os.arch() === 'arm64'
+ ? BrowserPlatform.MAC_ARM
+ : BrowserPlatform.MAC;
+ case 'linux':
+ return BrowserPlatform.LINUX;
+ case 'win32':
+ return os.arch() === 'x64' ||
+ // Windows 11 for ARM supports x64 emulation
+ (os.arch() === 'arm64' && isWindows11(os.release()))
+ ? BrowserPlatform.WIN64
+ : BrowserPlatform.WIN32;
+ default:
+ return undefined;
+ }
+}
+/**
+ * Windows 11 is identified by the version 10.0.22000 or greater
+ * @internal
+ */
+function isWindows11(version) {
+ const parts = version.split('.');
+ if (parts.length > 2) {
+ const major = parseInt(parts[0], 10);
+ const minor = parseInt(parts[1], 10);
+ const patch = parseInt(parts[2], 10);
+ return (major > 10 ||
+ (major === 10 && minor > 0) ||
+ (major === 10 && minor === 0 && patch >= 22000));
+ }
+ return false;
+}
+//# sourceMappingURL=detectPlatform.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.js.map b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.js.map
new file mode 100644
index 00000000..e34b7d4d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/detectPlatform.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"detectPlatform.js","sourceRoot":"","sources":["../../src/detectPlatform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAC,eAAe,EAAC,MAAM,gCAAgC,CAAC;AAE/D;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC/B,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,OAAO;gBAC1B,CAAC,CAAC,eAAe,CAAC,OAAO;gBACzB,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC;QAC1B,KAAK,OAAO;YACV,OAAO,eAAe,CAAC,KAAK,CAAC;QAC/B,KAAK,OAAO;YACV,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK;gBACxB,4CAA4C;gBAC5C,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,OAAO,IAAI,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;gBACpD,CAAC,CAAC,eAAe,CAAC,KAAK;gBACvB,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC;QAC5B;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,OAAe;IAClC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC;QAC/C,OAAO,CACL,KAAK,GAAG,EAAE;YACV,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC;YAC3B,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,CAChD,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/fileUtil.d.ts b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.d.ts
new file mode 100644
index 00000000..af56994c
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.d.ts
@@ -0,0 +1,10 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+/**
+ * @internal
+ */
+export declare function unpackArchive(archivePath: string, folderPath: string): Promise;
+//# sourceMappingURL=fileUtil.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/fileUtil.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.d.ts.map
new file mode 100644
index 00000000..1f20e1be
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"fileUtil.d.ts","sourceRoot":"","sources":["../../src/fileUtil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAcH;;GAEG;AACH,wBAAsB,aAAa,CACjC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js
new file mode 100644
index 00000000..213448c8
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js
@@ -0,0 +1,81 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { exec as execChildProcess, spawnSync } from 'child_process';
+import { createReadStream } from 'fs';
+import { mkdir, readdir } from 'fs/promises';
+import * as path from 'path';
+import { promisify } from 'util';
+import extractZip from 'extract-zip';
+import tar from 'tar-fs';
+import bzip from 'unbzip2-stream';
+const exec = promisify(execChildProcess);
+/**
+ * @internal
+ */
+export async function unpackArchive(archivePath, folderPath) {
+ if (archivePath.endsWith('.zip')) {
+ await extractZip(archivePath, { dir: folderPath });
+ }
+ else if (archivePath.endsWith('.tar.bz2')) {
+ await extractTar(archivePath, folderPath);
+ }
+ else if (archivePath.endsWith('.dmg')) {
+ await mkdir(folderPath);
+ await installDMG(archivePath, folderPath);
+ }
+ else if (archivePath.endsWith('.exe')) {
+ // Firefox on Windows.
+ const result = spawnSync(archivePath, [`/ExtractDir=${folderPath}`], {
+ env: {
+ __compat_layer: 'RunAsInvoker',
+ },
+ });
+ if (result.status !== 0) {
+ throw new Error(`Failed to extract ${archivePath} to ${folderPath}: ${result.output}`);
+ }
+ }
+ else {
+ throw new Error(`Unsupported archive format: ${archivePath}`);
+ }
+}
+/**
+ * @internal
+ */
+function extractTar(tarPath, folderPath) {
+ return new Promise((fulfill, reject) => {
+ const tarStream = tar.extract(folderPath);
+ tarStream.on('error', reject);
+ tarStream.on('finish', fulfill);
+ const readStream = createReadStream(tarPath);
+ readStream.pipe(bzip()).pipe(tarStream);
+ });
+}
+/**
+ * @internal
+ */
+async function installDMG(dmgPath, folderPath) {
+ const { stdout } = await exec(`hdiutil attach -nobrowse -noautoopen "${dmgPath}"`);
+ const volumes = stdout.match(/\/Volumes\/(.*)/m);
+ if (!volumes) {
+ throw new Error(`Could not find volume path in ${stdout}`);
+ }
+ const mountPath = volumes[0];
+ try {
+ const fileNames = await readdir(mountPath);
+ const appName = fileNames.find(item => {
+ return typeof item === 'string' && item.endsWith('.app');
+ });
+ if (!appName) {
+ throw new Error(`Cannot find app in ${mountPath}`);
+ }
+ const mountedPath = path.join(mountPath, appName);
+ await exec(`cp -R "${mountedPath}" "${folderPath}"`);
+ }
+ finally {
+ await exec(`hdiutil detach "${mountPath}" -quiet`);
+ }
+}
+//# sourceMappingURL=fileUtil.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js.map b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js.map
new file mode 100644
index 00000000..efca2636
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/fileUtil.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"fileUtil.js","sourceRoot":"","sources":["../../src/fileUtil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,IAAI,IAAI,gBAAgB,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AAClE,OAAO,EAAC,gBAAgB,EAAC,MAAM,IAAI,CAAC;AACpC,OAAO,EAAC,KAAK,EAAE,OAAO,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAC,SAAS,EAAC,MAAM,MAAM,CAAC;AAE/B,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,GAAG,MAAM,QAAQ,CAAC;AACzB,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,MAAM,IAAI,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,WAAmB,EACnB,UAAkB;IAElB,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACjC,MAAM,UAAU,CAAC,WAAW,EAAE,EAAC,GAAG,EAAE,UAA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,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,UAAU,CAAC,OAAe,EAAE,UAAkB;IAC3D,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,IAAI,CACzB,yCAAyC,OAAO,GAAG,CACpD,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC;IAE9B,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACpC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;QACrD,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAU,EAAE,OAAO,CAAC,CAAC;QAEnD,MAAM,IAAI,CAAC,UAAU,WAAW,MAAM,UAAU,GAAG,CAAC,CAAC;IACvD,CAAC;YAAS,CAAC;QACT,MAAM,IAAI,CAAC,mBAAmB,SAAS,UAAU,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/httpUtil.d.ts b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.d.ts
new file mode 100644
index 00000000..48bfd376
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.d.ts
@@ -0,0 +1,18 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+///
+///
+import * as http from 'http';
+import { URL } from 'url';
+export declare function headHttpRequest(url: URL): Promise;
+export declare function httpRequest(url: URL, method: string, response: (x: http.IncomingMessage) => void, keepAlive?: boolean): http.ClientRequest;
+/**
+ * @internal
+ */
+export declare function downloadFile(url: URL, destinationPath: string, progressCallback?: (downloadedBytes: number, totalBytes: number) => void): Promise;
+export declare function getJSON(url: URL): Promise;
+export declare function getText(url: URL): Promise;
+//# sourceMappingURL=httpUtil.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/httpUtil.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.d.ts.map
new file mode 100644
index 00000000..4182f826
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"httpUtil.d.ts","sourceRoot":"","sources":["../../src/httpUtil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAGH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAC,GAAG,EAAmB,MAAM,KAAK,CAAC;AAI1C,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAgB1D;AAED,wBAAgB,WAAW,CACzB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,KAAK,IAAI,EAC3C,SAAS,UAAO,GACf,IAAI,CAAC,aAAa,CAiCpB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,eAAe,EAAE,MAAM,EACvB,gBAAgB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,GACvE,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAOxD;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BjD"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js
new file mode 100644
index 00000000..a5710dd3
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js
@@ -0,0 +1,124 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { createWriteStream } from 'fs';
+import * as http from 'http';
+import * as https from 'https';
+import { URL, urlToHttpOptions } from 'url';
+import { ProxyAgent } from 'proxy-agent';
+export function headHttpRequest(url) {
+ return new Promise(resolve => {
+ const request = httpRequest(url, 'HEAD', response => {
+ // consume response data free node process
+ response.resume();
+ resolve(response.statusCode === 200);
+ }, false);
+ request.on('error', () => {
+ resolve(false);
+ });
+ });
+}
+export function httpRequest(url, method, response, keepAlive = true) {
+ const options = {
+ protocol: url.protocol,
+ hostname: url.hostname,
+ port: url.port,
+ path: url.pathname + url.search,
+ method,
+ headers: keepAlive ? { Connection: 'keep-alive' } : undefined,
+ auth: urlToHttpOptions(url).auth,
+ agent: new ProxyAgent(),
+ };
+ const requestCallback = (res) => {
+ if (res.statusCode &&
+ res.statusCode >= 300 &&
+ res.statusCode < 400 &&
+ res.headers.location) {
+ httpRequest(new URL(res.headers.location), method, response);
+ // consume response data to free up memory
+ // And prevents the connection from being kept alive
+ res.resume();
+ }
+ else {
+ response(res);
+ }
+ };
+ const request = options.protocol === 'https:'
+ ? https.request(options, requestCallback)
+ : http.request(options, requestCallback);
+ request.end();
+ return request;
+}
+/**
+ * @internal
+ */
+export function downloadFile(url, destinationPath, progressCallback) {
+ return new Promise((resolve, reject) => {
+ let downloadedBytes = 0;
+ let totalBytes = 0;
+ function onData(chunk) {
+ downloadedBytes += chunk.length;
+ progressCallback(downloadedBytes, totalBytes);
+ }
+ const request = httpRequest(url, 'GET', response => {
+ if (response.statusCode !== 200) {
+ const error = new Error(`Download failed: server returned code ${response.statusCode}. URL: ${url}`);
+ // consume response data to free up memory
+ response.resume();
+ reject(error);
+ return;
+ }
+ const file = createWriteStream(destinationPath);
+ file.on('finish', () => {
+ return resolve();
+ });
+ file.on('error', error => {
+ return reject(error);
+ });
+ response.pipe(file);
+ totalBytes = parseInt(response.headers['content-length'], 10);
+ if (progressCallback) {
+ response.on('data', onData);
+ }
+ });
+ request.on('error', error => {
+ return reject(error);
+ });
+ });
+}
+export async function getJSON(url) {
+ const text = await getText(url);
+ try {
+ return JSON.parse(text);
+ }
+ catch {
+ throw new Error('Could not parse JSON from ' + url.toString());
+ }
+}
+export function getText(url) {
+ return new Promise((resolve, reject) => {
+ const request = httpRequest(url, 'GET', response => {
+ let data = '';
+ if (response.statusCode && response.statusCode >= 400) {
+ return reject(new Error(`Got status code ${response.statusCode}`));
+ }
+ response.on('data', chunk => {
+ data += chunk;
+ });
+ response.on('end', () => {
+ try {
+ return resolve(String(data));
+ }
+ catch {
+ return reject(new Error('Chrome version not found'));
+ }
+ });
+ }, false);
+ request.on('error', err => {
+ reject(err);
+ });
+ });
+}
+//# sourceMappingURL=httpUtil.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js.map b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js.map
new file mode 100644
index 00000000..87695d62
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/httpUtil.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"httpUtil.js","sourceRoot":"","sources":["../../src/httpUtil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,IAAI,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,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E,EAAE;QACrC,MAAM,OAAO,GAAG,WAAW,CACzB,GAAG,EACH,KAAK,EACL,QAAQ,CAAC,EAAE;YACT,IAAI,IAAI,GAAG,EAAE,CAAC;YACd,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE,CAAC;gBACtD,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,mBAAmB,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;YACrE,CAAC;YACD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;gBAC1B,IAAI,IAAI,KAAK,CAAC;YAChB,CAAC,CAAC,CAAC;YACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACtB,IAAI,CAAC;oBACH,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC/B,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBACvD,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,EACD,KAAK,CACN,CAAC;QACF,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;YACxB,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.d.ts b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts
new file mode 100644
index 00000000..0f8068ae
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts
@@ -0,0 +1,123 @@
+/**
+ * @license
+ * Copyright 2017 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { Browser, BrowserPlatform } from './browser-data/browser-data.js';
+import { InstalledBrowser } from './Cache.js';
+/**
+ * @public
+ */
+export interface InstallOptions {
+ /**
+ * Determines the path to download browsers to.
+ */
+ cacheDir: string;
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to install.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+ /**
+ * An alias for the provided `buildId`. It will be used to maintain local
+ * metadata to support aliases in the `launch` command.
+ *
+ * @example 'canary'
+ */
+ buildIdAlias?: string;
+ /**
+ * Provides information about the progress of the download.
+ */
+ downloadProgressCallback?: (downloadedBytes: number, totalBytes: number) => void;
+ /**
+ * Determines the host that will be used for downloading.
+ *
+ * @defaultValue Either
+ *
+ * - https://storage.googleapis.com/chrome-for-testing-public or
+ * - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
+ *
+ */
+ baseUrl?: string;
+ /**
+ * Whether to unpack and install browser archives.
+ *
+ * @defaultValue `true`
+ */
+ unpack?: boolean;
+ /**
+ * @internal
+ * @defaultValue `false`
+ */
+ forceFallbackForTesting?: boolean;
+}
+/**
+ * @public
+ */
+export declare function install(options: InstallOptions & {
+ unpack?: true;
+}): Promise;
+/**
+ * @public
+ */
+export declare function install(options: InstallOptions & {
+ unpack: false;
+}): Promise;
+/**
+ * @public
+ */
+export interface UninstallOptions {
+ /**
+ * Determines the platform for the browser binary.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * The path to the root of the cache directory.
+ */
+ cacheDir: string;
+ /**
+ * Determines which browser to uninstall.
+ */
+ browser: Browser;
+ /**
+ * The browser build to uninstall
+ */
+ buildId: string;
+}
+/**
+ *
+ * @public
+ */
+export declare function uninstall(options: UninstallOptions): Promise;
+/**
+ * @public
+ */
+export interface GetInstalledBrowsersOptions {
+ /**
+ * The path to the root of the cache directory.
+ */
+ cacheDir: string;
+}
+/**
+ * Returns metadata about browsers installed in the cache directory.
+ *
+ * @public
+ */
+export declare function getInstalledBrowsers(options: GetInstalledBrowsersOptions): Promise;
+/**
+ * @public
+ */
+export declare function canDownload(options: InstallOptions): Promise;
+//# sourceMappingURL=install.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map
new file mode 100644
index 00000000..4340d76d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EACL,OAAO,EACP,eAAe,EAEhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAQ,gBAAgB,EAAC,MAAM,YAAY,CAAC;AAwBnD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,wBAAwB,CAAC,EAAE,CACzB,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,MAAM,KACf,IAAI,CAAC;IACV;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,cAAc,GAAG;IAAC,MAAM,CAAC,EAAE,IAAI,CAAA;CAAC,GACxC,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC7B;;GAEG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,cAAc,GAAG;IAAC,MAAM,EAAE,KAAK,CAAA;CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,CAAC;AA8JnB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAaxE;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAE7B;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAe3E"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.js b/node_modules/@puppeteer/browsers/lib/esm/install.js
new file mode 100644
index 00000000..af03a730
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.js
@@ -0,0 +1,179 @@
+/**
+ * @license
+ * Copyright 2017 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import assert from 'assert';
+import { existsSync } from 'fs';
+import { mkdir, unlink } from 'fs/promises';
+import os from 'os';
+import path from 'path';
+import { Browser, BrowserPlatform, downloadUrls, } from './browser-data/browser-data.js';
+import { Cache, InstalledBrowser } from './Cache.js';
+import { debug } from './debug.js';
+import { detectBrowserPlatform } from './detectPlatform.js';
+import { unpackArchive } from './fileUtil.js';
+import { downloadFile, getJSON, headHttpRequest } from './httpUtil.js';
+const debugInstall = debug('puppeteer:browsers:install');
+const times = new Map();
+function debugTime(label) {
+ times.set(label, process.hrtime());
+}
+function debugTimeEnd(label) {
+ const end = process.hrtime();
+ const start = times.get(label);
+ if (!start) {
+ return;
+ }
+ const duration = end[0] * 1000 + end[1] / 1e6 - (start[0] * 1000 + start[1] / 1e6); // calculate duration in milliseconds
+ debugInstall(`Duration for ${label}: ${duration}ms`);
+}
+export async function install(options) {
+ options.platform ??= detectBrowserPlatform();
+ options.unpack ??= true;
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
+ }
+ const url = getDownloadUrl(options.browser, options.platform, options.buildId, options.baseUrl);
+ try {
+ return await installUrl(url, options);
+ }
+ catch (err) {
+ // If custom baseUrl is provided, do not fall back to CfT dashboard.
+ if (options.baseUrl && !options.forceFallbackForTesting) {
+ throw err;
+ }
+ debugInstall(`Error downloading from ${url}.`);
+ switch (options.browser) {
+ case Browser.CHROME:
+ case Browser.CHROMEDRIVER:
+ case Browser.CHROMEHEADLESSSHELL: {
+ debugInstall(`Trying to find download URL via https://googlechromelabs.github.io/chrome-for-testing.`);
+ const version = (await getJSON(new URL(`https://googlechromelabs.github.io/chrome-for-testing/${options.buildId}.json`)));
+ let platform = '';
+ switch (options.platform) {
+ case BrowserPlatform.LINUX:
+ platform = 'linux64';
+ break;
+ case BrowserPlatform.MAC_ARM:
+ platform = 'mac-arm64';
+ break;
+ case BrowserPlatform.MAC:
+ platform = 'mac-x64';
+ break;
+ case BrowserPlatform.WIN32:
+ platform = 'win32';
+ break;
+ case BrowserPlatform.WIN64:
+ platform = 'win64';
+ break;
+ }
+ const url = version.downloads[options.browser]?.find(link => {
+ return link['platform'] === platform;
+ })?.url;
+ if (url) {
+ debugInstall(`Falling back to downloading from ${url}.`);
+ return await installUrl(new URL(url), options);
+ }
+ throw err;
+ }
+ default:
+ throw err;
+ }
+ }
+}
+async function installUrl(url, options) {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
+ }
+ const fileName = url.toString().split('/').pop();
+ assert(fileName, `A malformed download URL was found: ${url}.`);
+ const cache = new Cache(options.cacheDir);
+ const browserRoot = cache.browserRoot(options.browser);
+ const archivePath = path.join(browserRoot, `${options.buildId}-${fileName}`);
+ if (!existsSync(browserRoot)) {
+ await mkdir(browserRoot, { recursive: true });
+ }
+ if (!options.unpack) {
+ if (existsSync(archivePath)) {
+ return archivePath;
+ }
+ debugInstall(`Downloading binary from ${url}`);
+ debugTime('download');
+ await downloadFile(url, archivePath, options.downloadProgressCallback);
+ debugTimeEnd('download');
+ return archivePath;
+ }
+ const outputPath = cache.installationDir(options.browser, options.platform, options.buildId);
+ try {
+ if (existsSync(outputPath)) {
+ const installedBrowser = new InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (!existsSync(installedBrowser.executablePath)) {
+ throw new Error(`The browser folder (${outputPath}) exists but the executable (${installedBrowser.executablePath}) is missing`);
+ }
+ return installedBrowser;
+ }
+ debugInstall(`Downloading binary from ${url}`);
+ try {
+ debugTime('download');
+ await downloadFile(url, archivePath, options.downloadProgressCallback);
+ }
+ finally {
+ debugTimeEnd('download');
+ }
+ debugInstall(`Installing ${archivePath} to ${outputPath}`);
+ try {
+ debugTime('extract');
+ await unpackArchive(archivePath, outputPath);
+ }
+ finally {
+ debugTimeEnd('extract');
+ }
+ const installedBrowser = new InstalledBrowser(cache, options.browser, options.buildId, options.platform);
+ if (options.buildIdAlias) {
+ const metadata = installedBrowser.readMetadata();
+ metadata.aliases[options.buildIdAlias] = options.buildId;
+ installedBrowser.writeMetadata(metadata);
+ }
+ return installedBrowser;
+ }
+ finally {
+ if (existsSync(archivePath)) {
+ await unlink(archivePath);
+ }
+ }
+}
+/**
+ *
+ * @public
+ */
+export async function uninstall(options) {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(`Cannot detect the browser platform for: ${os.platform()} (${os.arch()})`);
+ }
+ new Cache(options.cacheDir).uninstall(options.browser, options.platform, options.buildId);
+}
+/**
+ * Returns metadata about browsers installed in the cache directory.
+ *
+ * @public
+ */
+export async function getInstalledBrowsers(options) {
+ return new Cache(options.cacheDir).getInstalledBrowsers();
+}
+/**
+ * @public
+ */
+export async function canDownload(options) {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
+ }
+ return await headHttpRequest(getDownloadUrl(options.browser, options.platform, options.buildId, options.baseUrl));
+}
+function getDownloadUrl(browser, platform, buildId, baseUrl) {
+ return new URL(downloadUrls[browser](platform, buildId, baseUrl));
+}
+//# sourceMappingURL=install.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/install.js.map b/node_modules/@puppeteer/browsers/lib/esm/install.js.map
new file mode 100644
index 00000000..580ac084
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/install.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,OAAO,EACP,eAAe,EACf,YAAY,GACb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAE,OAAO,EAAE,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,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,oBAAoB,EAAE,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAAuB;IACvD,OAAO,CAAC,QAAQ,KAAK,qBAAqB,EAAE,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,uDAAuD,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,CACtF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,eAAe,CAC1B,cAAc,CACZ,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QAAQ,EAChB,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,OAAO,CAChB,CACF,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CACrB,OAAgB,EAChB,QAAyB,EACzB,OAAe,EACf,OAAgB;IAEhB,OAAO,IAAI,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACpE,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/launch.d.ts b/node_modules/@puppeteer/browsers/lib/esm/launch.d.ts
new file mode 100644
index 00000000..54335f7d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/launch.d.ts
@@ -0,0 +1,124 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+///
+///
+import childProcess from 'child_process';
+import { type Browser, type BrowserPlatform, type ChromeReleaseChannel } from './browser-data/browser-data.js';
+/**
+ * @public
+ */
+export interface ComputeExecutablePathOptions {
+ /**
+ * Root path to the storage directory.
+ */
+ cacheDir: string;
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+}
+/**
+ * @public
+ */
+export declare function computeExecutablePath(options: ComputeExecutablePathOptions): string;
+/**
+ * @public
+ */
+export interface SystemOptions {
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Release channel to look for on the system.
+ */
+ channel: ChromeReleaseChannel;
+}
+/**
+ * @public
+ */
+export declare function computeSystemExecutablePath(options: SystemOptions): string;
+/**
+ * @public
+ */
+export interface LaunchOptions {
+ executablePath: string;
+ pipe?: boolean;
+ dumpio?: boolean;
+ args?: string[];
+ env?: Record;
+ handleSIGINT?: boolean;
+ handleSIGTERM?: boolean;
+ handleSIGHUP?: boolean;
+ detached?: boolean;
+ onExit?: () => Promise;
+}
+/**
+ * @public
+ */
+export declare function launch(opts: LaunchOptions): Process;
+/**
+ * @public
+ */
+export declare const CDP_WEBSOCKET_ENDPOINT_REGEX: RegExp;
+/**
+ * @public
+ */
+export declare const WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX: RegExp;
+/**
+ * @public
+ */
+export declare class Process {
+ #private;
+ constructor(opts: LaunchOptions);
+ get nodeProcess(): childProcess.ChildProcess;
+ close(): Promise;
+ hasClosed(): Promise;
+ kill(): void;
+ waitForLineOutput(regex: RegExp, timeout?: number): Promise;
+}
+/**
+ * @internal
+ */
+export interface ErrorLike extends Error {
+ name: string;
+ message: string;
+}
+/**
+ * @internal
+ */
+export declare function isErrorLike(obj: unknown): obj is ErrorLike;
+/**
+ * @internal
+ */
+export declare function isErrnoException(obj: unknown): obj is NodeJS.ErrnoException;
+/**
+ * @public
+ */
+export declare class TimeoutError extends Error {
+ /**
+ * @internal
+ */
+ constructor(message?: string);
+}
+//# sourceMappingURL=launch.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/launch.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/launch.d.ts.map
new file mode 100644
index 00000000..4615e251
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/launch.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/launch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AAKzC,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,eAAe,EAEpB,KAAK,oBAAoB,EAC1B,MAAM,gCAAgC,CAAC;AAOxC;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,MAAM,CAER;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAoB1E;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAEnD;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,QACF,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,uCAAuC,QACP,CAAC;AAuD9C;;GAEG;AACH,qBAAa,OAAO;;gBAYN,IAAI,EAAE,aAAa;IAwF/B,IAAI,WAAW,IAAI,YAAY,CAAC,YAAY,CAE3C;IA4CK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1B,IAAI,IAAI,IAAI;IAwDZ,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,OAAO,CAAC,MAAM,CAAC;CA+D/D;AAuBD;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAI1D;AACD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,cAAc,CAK3E;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC;;OAEG;gBACS,OAAO,CAAC,EAAE,MAAM;CAK7B"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/launch.js b/node_modules/@puppeteer/browsers/lib/esm/launch.js
new file mode 100644
index 00000000..d1d0b5bf
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/launch.js
@@ -0,0 +1,372 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import childProcess from 'child_process';
+import { accessSync } from 'fs';
+import os from 'os';
+import readline from 'readline';
+import { resolveSystemExecutablePath, } from './browser-data/browser-data.js';
+import { Cache } from './Cache.js';
+import { debug } from './debug.js';
+import { detectBrowserPlatform } from './detectPlatform.js';
+const debugLaunch = debug('puppeteer:browsers:launcher');
+/**
+ * @public
+ */
+export function computeExecutablePath(options) {
+ return new Cache(options.cacheDir).computeExecutablePath(options);
+}
+/**
+ * @public
+ */
+export function computeSystemExecutablePath(options) {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(`Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`);
+ }
+ const path = resolveSystemExecutablePath(options.browser, options.platform, options.channel);
+ try {
+ accessSync(path);
+ }
+ catch (error) {
+ throw new Error(`Could not find Google Chrome executable for channel '${options.channel}' at '${path}'.`);
+ }
+ return path;
+}
+/**
+ * @public
+ */
+export function launch(opts) {
+ return new Process(opts);
+}
+/**
+ * @public
+ */
+export const CDP_WEBSOCKET_ENDPOINT_REGEX = /^DevTools listening on (ws:\/\/.*)$/;
+/**
+ * @public
+ */
+export const WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX = /^WebDriver BiDi listening on (ws:\/\/.*)$/;
+const processListeners = new Map();
+const dispatchers = {
+ exit: (...args) => {
+ processListeners.get('exit')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGINT: (...args) => {
+ processListeners.get('SIGINT')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGHUP: (...args) => {
+ processListeners.get('SIGHUP')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGTERM: (...args) => {
+ processListeners.get('SIGTERM')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+};
+function subscribeToProcessEvent(event, handler) {
+ const listeners = processListeners.get(event) || [];
+ if (listeners.length === 0) {
+ process.on(event, dispatchers[event]);
+ }
+ listeners.push(handler);
+ processListeners.set(event, listeners);
+}
+function unsubscribeFromProcessEvent(event, handler) {
+ const listeners = processListeners.get(event) || [];
+ const existingListenerIdx = listeners.indexOf(handler);
+ if (existingListenerIdx === -1) {
+ return;
+ }
+ listeners.splice(existingListenerIdx, 1);
+ processListeners.set(event, listeners);
+ if (listeners.length === 0) {
+ process.off(event, dispatchers[event]);
+ }
+}
+/**
+ * @public
+ */
+export class Process {
+ #executablePath;
+ #args;
+ #browserProcess;
+ #exited = false;
+ // The browser process can be closed externally or from the driver process. We
+ // need to invoke the hooks only once though but we don't know how many times
+ // we will be invoked.
+ #hooksRan = false;
+ #onExitHook = async () => { };
+ #browserProcessExiting;
+ constructor(opts) {
+ this.#executablePath = opts.executablePath;
+ this.#args = opts.args ?? [];
+ opts.pipe ??= false;
+ opts.dumpio ??= false;
+ opts.handleSIGINT ??= true;
+ opts.handleSIGTERM ??= true;
+ opts.handleSIGHUP ??= true;
+ // On non-windows platforms, `detached: true` makes child process a
+ // leader of a new process group, making it possible to kill child
+ // process tree with `.kill(-pid)` command. @see
+ // https://nodejs.org/api/child_process.html#child_process_options_detached
+ opts.detached ??= process.platform !== 'win32';
+ const stdio = this.#configureStdio({
+ pipe: opts.pipe,
+ dumpio: opts.dumpio,
+ });
+ const env = opts.env || {};
+ debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(' ')}`, {
+ detached: opts.detached,
+ env: Object.keys(env).reduce((res, key) => {
+ if (key.toLowerCase().startsWith('puppeteer_')) {
+ res[key] = env[key];
+ }
+ return res;
+ }, {}),
+ stdio,
+ });
+ this.#browserProcess = childProcess.spawn(this.#executablePath, this.#args, {
+ detached: opts.detached,
+ env,
+ stdio,
+ });
+ debugLaunch(`Launched ${this.#browserProcess.pid}`);
+ if (opts.dumpio) {
+ this.#browserProcess.stderr?.pipe(process.stderr);
+ this.#browserProcess.stdout?.pipe(process.stdout);
+ }
+ subscribeToProcessEvent('exit', this.#onDriverProcessExit);
+ if (opts.handleSIGINT) {
+ subscribeToProcessEvent('SIGINT', this.#onDriverProcessSignal);
+ }
+ if (opts.handleSIGTERM) {
+ subscribeToProcessEvent('SIGTERM', this.#onDriverProcessSignal);
+ }
+ if (opts.handleSIGHUP) {
+ subscribeToProcessEvent('SIGHUP', this.#onDriverProcessSignal);
+ }
+ if (opts.onExit) {
+ this.#onExitHook = opts.onExit;
+ }
+ this.#browserProcessExiting = new Promise((resolve, reject) => {
+ this.#browserProcess.once('exit', async () => {
+ debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`);
+ this.#clearListeners();
+ this.#exited = true;
+ try {
+ await this.#runHooks();
+ }
+ catch (err) {
+ reject(err);
+ return;
+ }
+ resolve();
+ });
+ });
+ }
+ async #runHooks() {
+ if (this.#hooksRan) {
+ return;
+ }
+ this.#hooksRan = true;
+ await this.#onExitHook();
+ }
+ get nodeProcess() {
+ return this.#browserProcess;
+ }
+ #configureStdio(opts) {
+ if (opts.pipe) {
+ if (opts.dumpio) {
+ return ['ignore', 'pipe', 'pipe', 'pipe', 'pipe'];
+ }
+ else {
+ return ['ignore', 'ignore', 'ignore', 'pipe', 'pipe'];
+ }
+ }
+ else {
+ if (opts.dumpio) {
+ return ['pipe', 'pipe', 'pipe'];
+ }
+ else {
+ return ['pipe', 'ignore', 'pipe'];
+ }
+ }
+ }
+ #clearListeners() {
+ unsubscribeFromProcessEvent('exit', this.#onDriverProcessExit);
+ unsubscribeFromProcessEvent('SIGINT', this.#onDriverProcessSignal);
+ unsubscribeFromProcessEvent('SIGTERM', this.#onDriverProcessSignal);
+ unsubscribeFromProcessEvent('SIGHUP', this.#onDriverProcessSignal);
+ }
+ #onDriverProcessExit = (_code) => {
+ this.kill();
+ };
+ #onDriverProcessSignal = (signal) => {
+ switch (signal) {
+ case 'SIGINT':
+ this.kill();
+ process.exit(130);
+ case 'SIGTERM':
+ case 'SIGHUP':
+ void this.close();
+ break;
+ }
+ };
+ async close() {
+ await this.#runHooks();
+ if (!this.#exited) {
+ this.kill();
+ }
+ return await this.#browserProcessExiting;
+ }
+ hasClosed() {
+ return this.#browserProcessExiting;
+ }
+ kill() {
+ debugLaunch(`Trying to kill ${this.#browserProcess.pid}`);
+ // If the process failed to launch (for example if the browser executable path
+ // is invalid), then the process does not get a pid assigned. A call to
+ // `proc.kill` would error, as the `pid` to-be-killed can not be found.
+ if (this.#browserProcess &&
+ this.#browserProcess.pid &&
+ pidExists(this.#browserProcess.pid)) {
+ try {
+ debugLaunch(`Browser process ${this.#browserProcess.pid} exists`);
+ if (process.platform === 'win32') {
+ try {
+ childProcess.execSync(`taskkill /pid ${this.#browserProcess.pid} /T /F`);
+ }
+ catch (error) {
+ debugLaunch(`Killing ${this.#browserProcess.pid} using taskkill failed`, error);
+ // taskkill can fail to kill the process e.g. due to missing permissions.
+ // Let's kill the process via Node API. This delays killing of all child
+ // processes of `this.proc` until the main Node.js process dies.
+ this.#browserProcess.kill();
+ }
+ }
+ else {
+ // on linux the process group can be killed with the group id prefixed with
+ // a minus sign. The process group id is the group leader's pid.
+ const processGroupId = -this.#browserProcess.pid;
+ try {
+ process.kill(processGroupId, 'SIGKILL');
+ }
+ catch (error) {
+ debugLaunch(`Killing ${this.#browserProcess.pid} using process.kill failed`, error);
+ // Killing the process group can fail due e.g. to missing permissions.
+ // Let's kill the process via Node API. This delays killing of all child
+ // processes of `this.proc` until the main Node.js process dies.
+ this.#browserProcess.kill('SIGKILL');
+ }
+ }
+ }
+ catch (error) {
+ throw new Error(`${PROCESS_ERROR_EXPLANATION}\nError cause: ${isErrorLike(error) ? error.stack : error}`);
+ }
+ }
+ this.#clearListeners();
+ }
+ waitForLineOutput(regex, timeout = 0) {
+ if (!this.#browserProcess.stderr) {
+ throw new Error('`browserProcess` does not have stderr.');
+ }
+ const rl = readline.createInterface(this.#browserProcess.stderr);
+ let stderr = '';
+ return new Promise((resolve, reject) => {
+ rl.on('line', onLine);
+ rl.on('close', onClose);
+ this.#browserProcess.on('exit', onClose);
+ this.#browserProcess.on('error', onClose);
+ const timeoutId = timeout > 0 ? setTimeout(onTimeout, timeout) : undefined;
+ const cleanup = () => {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ rl.off('line', onLine);
+ rl.off('close', onClose);
+ this.#browserProcess.off('exit', onClose);
+ this.#browserProcess.off('error', onClose);
+ };
+ function onClose(error) {
+ cleanup();
+ reject(new Error([
+ `Failed to launch the browser process!${error ? ' ' + error.message : ''}`,
+ stderr,
+ '',
+ 'TROUBLESHOOTING: https://pptr.dev/troubleshooting',
+ '',
+ ].join('\n')));
+ }
+ function onTimeout() {
+ cleanup();
+ reject(new TimeoutError(`Timed out after ${timeout} ms while waiting for the WS endpoint URL to appear in stdout!`));
+ }
+ function onLine(line) {
+ stderr += line + '\n';
+ const match = line.match(regex);
+ if (!match) {
+ return;
+ }
+ cleanup();
+ // The RegExp matches, so this will obviously exist.
+ resolve(match[1]);
+ }
+ });
+ }
+}
+const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary.
+This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
+Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
+If you think this is a bug, please report it on the Puppeteer issue tracker.`;
+/**
+ * @internal
+ */
+function pidExists(pid) {
+ try {
+ return process.kill(pid, 0);
+ }
+ catch (error) {
+ if (isErrnoException(error)) {
+ if (error.code && error.code === 'ESRCH') {
+ return false;
+ }
+ }
+ throw error;
+ }
+}
+/**
+ * @internal
+ */
+export function isErrorLike(obj) {
+ return (typeof obj === 'object' && obj !== null && 'name' in obj && 'message' in obj);
+}
+/**
+ * @internal
+ */
+export function isErrnoException(obj) {
+ return (isErrorLike(obj) &&
+ ('errno' in obj || 'code' in obj || 'path' in obj || 'syscall' in obj));
+}
+/**
+ * @public
+ */
+export class TimeoutError extends Error {
+ /**
+ * @internal
+ */
+ constructor(message) {
+ super(message);
+ this.name = this.constructor.name;
+ Error.captureStackTrace(this, this.constructor);
+ }
+}
+//# sourceMappingURL=launch.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/launch.js.map b/node_modules/@puppeteer/browsers/lib/esm/launch.js.map
new file mode 100644
index 00000000..973d5417
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/launch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../src/launch.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,UAAU,EAAC,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,OAAO,EAGL,2BAA2B,GAE5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAE1D,MAAM,WAAW,GAAG,KAAK,CAAC,6BAA6B,CAAC,CAAC;AA2BzD;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAqC;IAErC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACpE,CAAC;AAsBD;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAAsB;IAChE,OAAO,CAAC,QAAQ,KAAK,qBAAqB,EAAE,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,uDAAuD,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,CACtF,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,2BAA2B,CACtC,OAAO,CAAC,OAAO,EACf,OAAO,CAAC,QA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WAAW,CAAC,GAAY;IACtC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAC7E,CAAC;AACJ,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,CACL,WAAW,CAAC,GAAG,CAAC;QAChB,CAAC,OAAO,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAAC,CACvE,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC;;OAEG;IACH,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main-cli.d.ts b/node_modules/@puppeteer/browsers/lib/esm/main-cli.d.ts
new file mode 100644
index 00000000..24f6aa59
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main-cli.d.ts
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+export {};
+//# sourceMappingURL=main-cli.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main-cli.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/main-cli.d.ts.map
new file mode 100644
index 00000000..97cfca76
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main-cli.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"main-cli.d.ts","sourceRoot":"","sources":["../../src/main-cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main-cli.js b/node_modules/@puppeteer/browsers/lib/esm/main-cli.js
new file mode 100755
index 00000000..7a9047ea
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main-cli.js
@@ -0,0 +1,9 @@
+#!/usr/bin/env node
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import { CLI } from './CLI.js';
+void new CLI().run(process.argv);
+//# sourceMappingURL=main-cli.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main-cli.js.map b/node_modules/@puppeteer/browsers/lib/esm/main-cli.js.map
new file mode 100644
index 00000000..d856a596
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main-cli.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"main-cli.js","sourceRoot":"","sources":["../../src/main-cli.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,UAAU,CAAC;AAE7B,KAAK,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.d.ts b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts
new file mode 100644
index 00000000..9ca6ab15
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts
@@ -0,0 +1,15 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+export type { LaunchOptions, ComputeExecutablePathOptions as Options, SystemOptions, } from './launch.js';
+export { launch, computeExecutablePath, computeSystemExecutablePath, TimeoutError, CDP_WEBSOCKET_ENDPOINT_REGEX, WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, Process, } from './launch.js';
+export type { InstallOptions, GetInstalledBrowsersOptions, UninstallOptions, } from './install.js';
+export { install, getInstalledBrowsers, canDownload, uninstall, } from './install.js';
+export { detectBrowserPlatform } from './detectPlatform.js';
+export type { ProfileOptions } from './browser-data/browser-data.js';
+export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, getVersionComparator, } from './browser-data/browser-data.js';
+export { CLI, makeProgressCallback } from './CLI.js';
+export { Cache, InstalledBrowser } from './Cache.js';
+//# sourceMappingURL=main.d.ts.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map
new file mode 100644
index 00000000..a6c0b8e2
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.d.ts.map
@@ -0,0 +1 @@
+{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,aAAa,EACb,4BAA4B,IAAI,OAAO,EACvC,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAC,cAAc,EAAC,MAAM,gCAAgC,CAAC;AACnE,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.js b/node_modules/@puppeteer/browsers/lib/esm/main.js
new file mode 100644
index 00000000..22f36eed
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.js
@@ -0,0 +1,12 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+export { launch, computeExecutablePath, computeSystemExecutablePath, TimeoutError, CDP_WEBSOCKET_ENDPOINT_REGEX, WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX, Process, } from './launch.js';
+export { install, getInstalledBrowsers, canDownload, uninstall, } from './install.js';
+export { detectBrowserPlatform } from './detectPlatform.js';
+export { resolveBuildId, Browser, BrowserPlatform, ChromeReleaseChannel, createProfile, getVersionComparator, } from './browser-data/browser-data.js';
+export { CLI, makeProgressCallback } from './CLI.js';
+export { Cache, InstalledBrowser } from './Cache.js';
+//# sourceMappingURL=main.js.map
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/main.js.map b/node_modules/@puppeteer/browsers/lib/esm/main.js.map
new file mode 100644
index 00000000..236001d4
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/main.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,EACL,MAAM,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,4BAA4B,EAC5B,uCAAuC,EACvC,OAAO,GACR,MAAM,aAAa,CAAC;AAMrB,OAAO,EACL,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,qBAAqB,EAAC,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EACL,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,GAAG,EAAE,oBAAoB,EAAC,MAAM,UAAU,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAC,MAAM,YAAY,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/lib/esm/package.json b/node_modules/@puppeteer/browsers/lib/esm/package.json
new file mode 100644
index 00000000..1632c2c4
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/lib/esm/package.json
@@ -0,0 +1 @@
+{"type": "module"}
\ No newline at end of file
diff --git a/node_modules/@puppeteer/browsers/package.json b/node_modules/@puppeteer/browsers/package.json
new file mode 100644
index 00000000..54856062
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/package.json
@@ -0,0 +1,114 @@
+{
+ "name": "@puppeteer/browsers",
+ "version": "2.2.3",
+ "description": "Download and launch browsers",
+ "scripts": {
+ "build:docs": "wireit",
+ "build": "wireit",
+ "build:test": "wireit",
+ "clean": "../../tools/clean.mjs",
+ "test": "wireit"
+ },
+ "type": "commonjs",
+ "bin": "lib/cjs/main-cli.js",
+ "main": "./lib/cjs/main.js",
+ "exports": {
+ "import": "./lib/esm/main.js",
+ "require": "./lib/cjs/main.js"
+ },
+ "wireit": {
+ "build": {
+ "command": "tsc -b && tsx ../../tools/chmod.ts 755 lib/cjs/main-cli.js lib/esm/main-cli.js",
+ "files": [
+ "src/**/*.ts",
+ "tsconfig.json"
+ ],
+ "clean": "if-file-deleted",
+ "output": [
+ "lib/**",
+ "!lib/esm/package.json"
+ ],
+ "dependencies": [
+ "generate:package-json"
+ ]
+ },
+ "generate:package-json": {
+ "command": "tsx ../../tools/generate_module_package_json.ts lib/esm/package.json",
+ "files": [
+ "../../tools/generate_module_package_json.ts"
+ ],
+ "output": [
+ "lib/esm/package.json"
+ ]
+ },
+ "build:docs": {
+ "command": "api-extractor run --local --config \"./api-extractor.docs.json\"",
+ "files": [
+ "api-extractor.docs.json",
+ "lib/esm/main.d.ts",
+ "tsconfig.json"
+ ],
+ "dependencies": [
+ "build"
+ ]
+ },
+ "build:test": {
+ "command": "tsc -b test/src/tsconfig.json",
+ "files": [
+ "test/**/*.ts",
+ "test/src/tsconfig.json"
+ ],
+ "output": [
+ "test/build/**"
+ ],
+ "dependencies": [
+ "build",
+ "../testserver:build"
+ ]
+ },
+ "test": {
+ "command": "node tools/downloadTestBrowsers.mjs && mocha",
+ "files": [
+ ".mocharc.cjs"
+ ],
+ "dependencies": [
+ "build:test"
+ ]
+ }
+ },
+ "keywords": [
+ "puppeteer",
+ "browsers"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/puppeteer/puppeteer/tree/main/packages/browsers"
+ },
+ "author": "The Chromium Authors",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=18"
+ },
+ "files": [
+ "lib",
+ "src",
+ "!*.tsbuildinfo"
+ ],
+ "dependencies": {
+ "debug": "4.3.4",
+ "extract-zip": "2.0.1",
+ "progress": "2.0.3",
+ "proxy-agent": "6.4.0",
+ "tar-fs": "3.0.5",
+ "unbzip2-stream": "1.4.3",
+ "yargs": "17.7.2",
+ "semver": "7.6.0"
+ },
+ "devDependencies": {
+ "@types/debug": "4.1.12",
+ "@types/progress": "2.0.7",
+ "@types/tar-fs": "2.0.4",
+ "@types/unbzip2-stream": "1.4.3",
+ "@types/yargs": "17.0.32"
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/src/CLI.ts b/node_modules/@puppeteer/browsers/src/CLI.ts
new file mode 100644
index 00000000..3bae584e
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/CLI.ts
@@ -0,0 +1,442 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {stdin as input, stdout as output} from 'process';
+import * as readline from 'readline';
+
+import ProgressBar from 'progress';
+import type * as Yargs from 'yargs';
+import {hideBin} from 'yargs/helpers';
+import yargs from 'yargs/yargs';
+
+import {
+ resolveBuildId,
+ type Browser,
+ BrowserPlatform,
+ type ChromeReleaseChannel,
+} from './browser-data/browser-data.js';
+import {Cache} from './Cache.js';
+import {detectBrowserPlatform} from './detectPlatform.js';
+import {install} from './install.js';
+import {
+ computeExecutablePath,
+ computeSystemExecutablePath,
+ launch,
+} from './launch.js';
+
+interface InstallArgs {
+ browser: {
+ name: Browser;
+ buildId: string;
+ };
+ path?: string;
+ platform?: BrowserPlatform;
+ baseUrl?: string;
+}
+
+interface LaunchArgs {
+ browser: {
+ name: Browser;
+ buildId: string;
+ };
+ path?: string;
+ platform?: BrowserPlatform;
+ detached: boolean;
+ system: boolean;
+}
+
+interface ClearArgs {
+ path?: string;
+}
+
+/**
+ * @public
+ */
+export class CLI {
+ #cachePath;
+ #rl?: readline.Interface;
+ #scriptName = '';
+ #allowCachePathOverride = true;
+ #pinnedBrowsers?: Partial<{[key in Browser]: string}>;
+ #prefixCommand?: {cmd: string; description: string};
+
+ constructor(
+ opts?:
+ | string
+ | {
+ cachePath?: string;
+ scriptName?: string;
+ prefixCommand?: {cmd: string; description: string};
+ allowCachePathOverride?: boolean;
+ pinnedBrowsers?: Partial<{[key in Browser]: string}>;
+ },
+ rl?: readline.Interface
+ ) {
+ if (!opts) {
+ opts = {};
+ }
+ if (typeof opts === 'string') {
+ opts = {
+ cachePath: opts,
+ };
+ }
+ this.#cachePath = opts.cachePath ?? process.cwd();
+ this.#rl = rl;
+ this.#scriptName = opts.scriptName ?? '@puppeteer/browsers';
+ this.#allowCachePathOverride = opts.allowCachePathOverride ?? true;
+ this.#pinnedBrowsers = opts.pinnedBrowsers;
+ this.#prefixCommand = opts.prefixCommand;
+ }
+
+ #defineBrowserParameter(yargs: Yargs.Argv): void {
+ yargs.positional('browser', {
+ description:
+ 'Which browser to install [@]. `latest` will try to find the latest available build. `buildId` is a browser-specific identifier such as a version or a revision.',
+ type: 'string',
+ coerce: (opt): InstallArgs['browser'] => {
+ return {
+ name: this.#parseBrowser(opt),
+ buildId: this.#parseBuildId(opt),
+ };
+ },
+ });
+ }
+
+ #definePlatformParameter(yargs: Yargs.Argv): void {
+ yargs.option('platform', {
+ type: 'string',
+ desc: 'Platform that the binary needs to be compatible with.',
+ choices: Object.values(BrowserPlatform),
+ defaultDescription: 'Auto-detected',
+ });
+ }
+
+ #definePathParameter(yargs: Yargs.Argv, required = false): void {
+ if (!this.#allowCachePathOverride) {
+ return;
+ }
+ yargs.option('path', {
+ type: 'string',
+ desc: 'Path to the root folder for the browser downloads and installation. The installation folder structure is compatible with the cache structure used by Puppeteer.',
+ defaultDescription: 'Current working directory',
+ ...(required ? {} : {default: process.cwd()}),
+ });
+ if (required) {
+ yargs.demandOption('path');
+ }
+ }
+
+ async run(argv: string[]): Promise {
+ const yargsInstance = yargs(hideBin(argv));
+ let target = yargsInstance.scriptName(this.#scriptName);
+ if (this.#prefixCommand) {
+ target = target.command(
+ this.#prefixCommand.cmd,
+ this.#prefixCommand.description,
+ yargs => {
+ return this.#build(yargs);
+ }
+ );
+ } else {
+ target = this.#build(target);
+ }
+ await target
+ .demandCommand(1)
+ .help()
+ .wrap(Math.min(120, yargsInstance.terminalWidth()))
+ .parse();
+ }
+
+ #build(yargs: Yargs.Argv): Yargs.Argv {
+ const latestOrPinned = this.#pinnedBrowsers ? 'pinned' : 'latest';
+ return yargs
+ .command(
+ 'install ',
+ 'Download and install the specified browser. If successful, the command outputs the actual browser buildId that was installed and the absolute path to the browser executable (format: @ ).',
+ yargs => {
+ this.#defineBrowserParameter(yargs);
+ this.#definePlatformParameter(yargs);
+ this.#definePathParameter(yargs);
+ yargs.option('base-url', {
+ type: 'string',
+ desc: 'Base URL to download from',
+ });
+ yargs.example(
+ '$0 install chrome',
+ `Install the ${latestOrPinned} available build of the Chrome browser.`
+ );
+ yargs.example(
+ '$0 install chrome@latest',
+ 'Install the latest available build for the Chrome browser.'
+ );
+ yargs.example(
+ '$0 install chrome@stable',
+ 'Install the latest available build for the Chrome browser from the stable channel.'
+ );
+ yargs.example(
+ '$0 install chrome@beta',
+ 'Install the latest available build for the Chrome browser from the beta channel.'
+ );
+ yargs.example(
+ '$0 install chrome@dev',
+ 'Install the latest available build for the Chrome browser from the dev channel.'
+ );
+ yargs.example(
+ '$0 install chrome@canary',
+ 'Install the latest available build for the Chrome Canary browser.'
+ );
+ yargs.example(
+ '$0 install chrome@115',
+ 'Install the latest available build for Chrome 115.'
+ );
+ yargs.example(
+ '$0 install chromedriver@canary',
+ 'Install the latest available build for ChromeDriver Canary.'
+ );
+ yargs.example(
+ '$0 install chromedriver@115',
+ 'Install the latest available build for ChromeDriver 115.'
+ );
+ yargs.example(
+ '$0 install chromedriver@115.0.5790',
+ 'Install the latest available patch (115.0.5790.X) build for ChromeDriver.'
+ );
+ yargs.example(
+ '$0 install chrome-headless-shell',
+ 'Install the latest available chrome-headless-shell build.'
+ );
+ yargs.example(
+ '$0 install chrome-headless-shell@beta',
+ 'Install the latest available chrome-headless-shell build corresponding to the Beta channel.'
+ );
+ yargs.example(
+ '$0 install chrome-headless-shell@118',
+ 'Install the latest available chrome-headless-shell 118 build.'
+ );
+ yargs.example(
+ '$0 install chromium@1083080',
+ 'Install the revision 1083080 of the Chromium browser.'
+ );
+ yargs.example(
+ '$0 install firefox',
+ 'Install the latest nightly available build of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox@stable',
+ 'Install the latest stable build of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox@beta',
+ 'Install the latest beta build of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox@devedition',
+ 'Install the latest devedition build of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox@esr',
+ 'Install the latest ESR build of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox@nightly',
+ 'Install the latest nightly build of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox@stable_111.0.1',
+ 'Install a specific version of the Firefox browser.'
+ );
+ yargs.example(
+ '$0 install firefox --platform mac',
+ 'Install the latest Mac (Intel) build of the Firefox browser.'
+ );
+ if (this.#allowCachePathOverride) {
+ yargs.example(
+ '$0 install firefox --path /tmp/my-browser-cache',
+ 'Install to the specified cache directory.'
+ );
+ }
+ },
+ async argv => {
+ const args = argv as unknown as InstallArgs;
+ args.platform ??= detectBrowserPlatform();
+ if (!args.platform) {
+ throw new Error(`Could not resolve the current platform`);
+ }
+ if (args.browser.buildId === 'pinned') {
+ const pinnedVersion = this.#pinnedBrowsers?.[args.browser.name];
+ if (!pinnedVersion) {
+ throw new Error(
+ `No pinned version found for ${args.browser.name}`
+ );
+ }
+ args.browser.buildId = pinnedVersion;
+ }
+ const originalBuildId = args.browser.buildId;
+ args.browser.buildId = await resolveBuildId(
+ args.browser.name,
+ args.platform,
+ args.browser.buildId
+ );
+ await install({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ platform: args.platform,
+ cacheDir: args.path ?? this.#cachePath,
+ downloadProgressCallback: makeProgressCallback(
+ args.browser.name,
+ args.browser.buildId
+ ),
+ baseUrl: args.baseUrl,
+ buildIdAlias:
+ originalBuildId !== args.browser.buildId
+ ? originalBuildId
+ : undefined,
+ });
+ console.log(
+ `${args.browser.name}@${
+ args.browser.buildId
+ } ${computeExecutablePath({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ cacheDir: args.path ?? this.#cachePath,
+ platform: args.platform,
+ })}`
+ );
+ }
+ )
+ .command(
+ 'launch ',
+ 'Launch the specified browser',
+ yargs => {
+ this.#defineBrowserParameter(yargs);
+ this.#definePlatformParameter(yargs);
+ this.#definePathParameter(yargs);
+ yargs.option('detached', {
+ type: 'boolean',
+ desc: 'Detach the child process.',
+ default: false,
+ });
+ yargs.option('system', {
+ type: 'boolean',
+ desc: 'Search for a browser installed on the system instead of the cache folder.',
+ default: false,
+ });
+ yargs.example(
+ '$0 launch chrome@115.0.5790.170',
+ 'Launch Chrome 115.0.5790.170'
+ );
+ yargs.example(
+ '$0 launch firefox@112.0a1',
+ 'Launch the Firefox browser identified by the milestone 112.0a1.'
+ );
+ yargs.example(
+ '$0 launch chrome@115.0.5790.170 --detached',
+ 'Launch the browser but detach the sub-processes.'
+ );
+ yargs.example(
+ '$0 launch chrome@canary --system',
+ 'Try to locate the Canary build of Chrome installed on the system and launch it.'
+ );
+ },
+ async argv => {
+ const args = argv as unknown as LaunchArgs;
+ const executablePath = args.system
+ ? computeSystemExecutablePath({
+ browser: args.browser.name,
+ // TODO: throw an error if not a ChromeReleaseChannel is provided.
+ channel: args.browser.buildId as ChromeReleaseChannel,
+ platform: args.platform,
+ })
+ : computeExecutablePath({
+ browser: args.browser.name,
+ buildId: args.browser.buildId,
+ cacheDir: args.path ?? this.#cachePath,
+ platform: args.platform,
+ });
+ launch({
+ executablePath,
+ detached: args.detached,
+ });
+ }
+ )
+ .command(
+ 'clear',
+ this.#allowCachePathOverride
+ ? 'Removes all installed browsers from the specified cache directory'
+ : `Removes all installed browsers from ${this.#cachePath}`,
+ yargs => {
+ this.#definePathParameter(yargs, true);
+ },
+ async argv => {
+ const args = argv as unknown as ClearArgs;
+ const cacheDir = args.path ?? this.#cachePath;
+ const rl = this.#rl ?? readline.createInterface({input, output});
+ rl.question(
+ `Do you want to permanently and recursively delete the content of ${cacheDir} (yes/No)? `,
+ answer => {
+ rl.close();
+ if (!['y', 'yes'].includes(answer.toLowerCase().trim())) {
+ console.log('Cancelled.');
+ return;
+ }
+ const cache = new Cache(cacheDir);
+ cache.clear();
+ console.log(`${cacheDir} cleared.`);
+ }
+ );
+ }
+ )
+ .demandCommand(1)
+ .help();
+ }
+
+ #parseBrowser(version: string): Browser {
+ return version.split('@').shift() as Browser;
+ }
+
+ #parseBuildId(version: string): string {
+ const parts = version.split('@');
+ return parts.length === 2
+ ? parts[1]!
+ : this.#pinnedBrowsers
+ ? 'pinned'
+ : 'latest';
+ }
+}
+
+/**
+ * @public
+ */
+export function makeProgressCallback(
+ browser: Browser,
+ buildId: string
+): (downloadedBytes: number, totalBytes: number) => void {
+ let progressBar: ProgressBar;
+ let lastDownloadedBytes = 0;
+ return (downloadedBytes: number, totalBytes: number) => {
+ if (!progressBar) {
+ progressBar = new ProgressBar(
+ `Downloading ${browser} ${buildId} - ${toMegabytes(
+ totalBytes
+ )} [:bar] :percent :etas `,
+ {
+ complete: '=',
+ incomplete: ' ',
+ width: 20,
+ total: totalBytes,
+ }
+ );
+ }
+ const delta = downloadedBytes - lastDownloadedBytes;
+ lastDownloadedBytes = downloadedBytes;
+ progressBar.tick(delta);
+ };
+}
+
+function toMegabytes(bytes: number) {
+ const mb = bytes / 1000 / 1000;
+ return `${Math.round(mb * 10) / 10} MB`;
+}
diff --git a/node_modules/@puppeteer/browsers/src/Cache.ts b/node_modules/@puppeteer/browsers/src/Cache.ts
new file mode 100644
index 00000000..e6b574d9
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/Cache.ts
@@ -0,0 +1,274 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import fs from 'fs';
+import os from 'os';
+import path from 'path';
+
+import debug from 'debug';
+
+import {
+ Browser,
+ type BrowserPlatform,
+ executablePathByBrowser,
+ getVersionComparator,
+} from './browser-data/browser-data.js';
+import {detectBrowserPlatform} from './detectPlatform.js';
+
+const debugCache = debug('puppeteer:browsers:cache');
+
+/**
+ * @public
+ */
+export class InstalledBrowser {
+ browser: Browser;
+ buildId: string;
+ platform: BrowserPlatform;
+ readonly executablePath: string;
+
+ #cache: Cache;
+
+ /**
+ * @internal
+ */
+ constructor(
+ cache: Cache,
+ browser: Browser,
+ buildId: string,
+ platform: BrowserPlatform
+ ) {
+ this.#cache = cache;
+ this.browser = browser;
+ this.buildId = buildId;
+ this.platform = platform;
+ this.executablePath = cache.computeExecutablePath({
+ browser,
+ buildId,
+ platform,
+ });
+ }
+
+ /**
+ * Path to the root of the installation folder. Use
+ * {@link computeExecutablePath} to get the path to the executable binary.
+ */
+ get path(): string {
+ return this.#cache.installationDir(
+ this.browser,
+ this.platform,
+ this.buildId
+ );
+ }
+
+ readMetadata(): Metadata {
+ return this.#cache.readMetadata(this.browser);
+ }
+
+ writeMetadata(metadata: Metadata): void {
+ this.#cache.writeMetadata(this.browser, metadata);
+ }
+}
+
+/**
+ * @internal
+ */
+export interface ComputeExecutablePathOptions {
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+}
+
+export interface Metadata {
+ // Maps an alias (canary/latest/dev/etc.) to a buildId.
+ aliases: Record;
+}
+
+/**
+ * The cache used by Puppeteer relies on the following structure:
+ *
+ * - rootDir
+ * -- | browserRoot(browser1)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * -- | browserRoot(browser2)
+ * ---- - | installationDir()
+ * ------ the browser-platform-buildId
+ * ------ specific structure.
+ * @internal
+ */
+export class Cache {
+ #rootDir: string;
+
+ constructor(rootDir: string) {
+ this.#rootDir = rootDir;
+ }
+
+ /**
+ * @internal
+ */
+ get rootDir(): string {
+ return this.#rootDir;
+ }
+
+ browserRoot(browser: Browser): string {
+ return path.join(this.#rootDir, browser);
+ }
+
+ metadataFile(browser: Browser): string {
+ return path.join(this.browserRoot(browser), '.metadata');
+ }
+
+ readMetadata(browser: Browser): Metadata {
+ const metatadaPath = this.metadataFile(browser);
+ if (!fs.existsSync(metatadaPath)) {
+ return {aliases: {}};
+ }
+ // TODO: add type-safe parsing.
+ const data = JSON.parse(fs.readFileSync(metatadaPath, 'utf8'));
+ if (typeof data !== 'object') {
+ throw new Error('.metadata is not an object');
+ }
+ return data;
+ }
+
+ writeMetadata(browser: Browser, metadata: Metadata): void {
+ const metatadaPath = this.metadataFile(browser);
+ fs.mkdirSync(path.dirname(metatadaPath), {recursive: true});
+ fs.writeFileSync(metatadaPath, JSON.stringify(metadata, null, 2));
+ }
+
+ resolveAlias(browser: Browser, alias: string): string | undefined {
+ const metadata = this.readMetadata(browser);
+ if (alias === 'latest') {
+ return Object.values(metadata.aliases || {})
+ .sort(getVersionComparator(browser))
+ .at(-1);
+ }
+ return metadata.aliases[alias];
+ }
+
+ installationDir(
+ browser: Browser,
+ platform: BrowserPlatform,
+ buildId: string
+ ): string {
+ return path.join(this.browserRoot(browser), `${platform}-${buildId}`);
+ }
+
+ clear(): void {
+ fs.rmSync(this.#rootDir, {
+ force: true,
+ recursive: true,
+ maxRetries: 10,
+ retryDelay: 500,
+ });
+ }
+
+ uninstall(
+ browser: Browser,
+ platform: BrowserPlatform,
+ buildId: string
+ ): void {
+ const metadata = this.readMetadata(browser);
+ for (const alias of Object.keys(metadata.aliases)) {
+ if (metadata.aliases[alias] === buildId) {
+ delete metadata.aliases[alias];
+ }
+ }
+ fs.rmSync(this.installationDir(browser, platform, buildId), {
+ force: true,
+ recursive: true,
+ maxRetries: 10,
+ retryDelay: 500,
+ });
+ }
+
+ getInstalledBrowsers(): InstalledBrowser[] {
+ if (!fs.existsSync(this.#rootDir)) {
+ return [];
+ }
+ const types = fs.readdirSync(this.#rootDir);
+ const browsers = types.filter((t): t is Browser => {
+ return (Object.values(Browser) as string[]).includes(t);
+ });
+ return browsers.flatMap(browser => {
+ const files = fs.readdirSync(this.browserRoot(browser));
+ return files
+ .map(file => {
+ const result = parseFolderPath(
+ path.join(this.browserRoot(browser), file)
+ );
+ if (!result) {
+ return null;
+ }
+ return new InstalledBrowser(
+ this,
+ browser,
+ result.buildId,
+ result.platform as BrowserPlatform
+ );
+ })
+ .filter((item: InstalledBrowser | null): item is InstalledBrowser => {
+ return item !== null;
+ });
+ });
+ }
+
+ computeExecutablePath(options: ComputeExecutablePathOptions): string {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(
+ `Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
+ );
+ }
+ try {
+ options.buildId =
+ this.resolveAlias(options.browser, options.buildId) ?? options.buildId;
+ } catch {
+ debugCache('could not read .metadata file for the browser');
+ }
+ const installationDir = this.installationDir(
+ options.browser,
+ options.platform,
+ options.buildId
+ );
+ return path.join(
+ installationDir,
+ executablePathByBrowser[options.browser](
+ options.platform,
+ options.buildId
+ )
+ );
+ }
+}
+
+function parseFolderPath(
+ folderPath: string
+): {platform: string; buildId: string} | undefined {
+ const name = path.basename(folderPath);
+ const splits = name.split('-');
+ if (splits.length !== 2) {
+ return;
+ }
+ const [platform, buildId] = splits;
+ if (!buildId || !platform) {
+ return;
+ }
+ return {platform, buildId};
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts b/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts
new file mode 100644
index 00000000..fa7ec9be
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts
@@ -0,0 +1,252 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import * as chromeHeadlessShell from './chrome-headless-shell.js';
+import * as chrome from './chrome.js';
+import * as chromedriver from './chromedriver.js';
+import * as chromium from './chromium.js';
+import * as firefox from './firefox.js';
+import {
+ Browser,
+ BrowserPlatform,
+ BrowserTag,
+ ChromeReleaseChannel,
+ type ProfileOptions,
+} from './types.js';
+
+export type {ProfileOptions};
+
+export const downloadUrls = {
+ [Browser.CHROMEDRIVER]: chromedriver.resolveDownloadUrl,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.resolveDownloadUrl,
+ [Browser.CHROME]: chrome.resolveDownloadUrl,
+ [Browser.CHROMIUM]: chromium.resolveDownloadUrl,
+ [Browser.FIREFOX]: firefox.resolveDownloadUrl,
+};
+
+export const downloadPaths = {
+ [Browser.CHROMEDRIVER]: chromedriver.resolveDownloadPath,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.resolveDownloadPath,
+ [Browser.CHROME]: chrome.resolveDownloadPath,
+ [Browser.CHROMIUM]: chromium.resolveDownloadPath,
+ [Browser.FIREFOX]: firefox.resolveDownloadPath,
+};
+
+export const executablePathByBrowser = {
+ [Browser.CHROMEDRIVER]: chromedriver.relativeExecutablePath,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.relativeExecutablePath,
+ [Browser.CHROME]: chrome.relativeExecutablePath,
+ [Browser.CHROMIUM]: chromium.relativeExecutablePath,
+ [Browser.FIREFOX]: firefox.relativeExecutablePath,
+};
+
+export const versionComparators = {
+ [Browser.CHROMEDRIVER]: chromedriver.compareVersions,
+ [Browser.CHROMEHEADLESSSHELL]: chromeHeadlessShell.compareVersions,
+ [Browser.CHROME]: chrome.compareVersions,
+ [Browser.CHROMIUM]: chromium.compareVersions,
+ [Browser.FIREFOX]: firefox.compareVersions,
+};
+
+export {Browser, BrowserPlatform, ChromeReleaseChannel};
+
+/**
+ * @internal
+ */
+async function resolveBuildIdForBrowserTag(
+ browser: Browser,
+ platform: BrowserPlatform,
+ tag: BrowserTag
+): Promise {
+ switch (browser) {
+ case Browser.FIREFOX:
+ switch (tag) {
+ case BrowserTag.LATEST:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.NIGHTLY);
+ case BrowserTag.BETA:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.BETA);
+ case BrowserTag.NIGHTLY:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.NIGHTLY);
+ case BrowserTag.DEVEDITION:
+ return await firefox.resolveBuildId(
+ firefox.FirefoxChannel.DEVEDITION
+ );
+ case BrowserTag.STABLE:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.STABLE);
+ case BrowserTag.ESR:
+ return await firefox.resolveBuildId(firefox.FirefoxChannel.ESR);
+ case BrowserTag.CANARY:
+ case BrowserTag.DEV:
+ throw new Error(`${tag.toUpperCase()} is not available for Firefox`);
+ }
+ case Browser.CHROME: {
+ switch (tag) {
+ case BrowserTag.LATEST:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.BETA:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.BETA);
+ case BrowserTag.CANARY:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.DEV:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.DEV);
+ case BrowserTag.STABLE:
+ return await chrome.resolveBuildId(ChromeReleaseChannel.STABLE);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.ESR:
+ throw new Error(`${tag.toUpperCase()} is not available for Chrome`);
+ }
+ }
+ case Browser.CHROMEDRIVER: {
+ switch (tag) {
+ case BrowserTag.LATEST:
+ case BrowserTag.CANARY:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.CANARY);
+ case BrowserTag.BETA:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.BETA);
+ case BrowserTag.DEV:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.DEV);
+ case BrowserTag.STABLE:
+ return await chromedriver.resolveBuildId(ChromeReleaseChannel.STABLE);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.ESR:
+ throw new Error(
+ `${tag.toUpperCase()} is not available for ChromeDriver`
+ );
+ }
+ }
+ case Browser.CHROMEHEADLESSSHELL: {
+ switch (tag) {
+ case BrowserTag.LATEST:
+ case BrowserTag.CANARY:
+ return await chromeHeadlessShell.resolveBuildId(
+ ChromeReleaseChannel.CANARY
+ );
+ case BrowserTag.BETA:
+ return await chromeHeadlessShell.resolveBuildId(
+ ChromeReleaseChannel.BETA
+ );
+ case BrowserTag.DEV:
+ return await chromeHeadlessShell.resolveBuildId(
+ ChromeReleaseChannel.DEV
+ );
+ case BrowserTag.STABLE:
+ return await chromeHeadlessShell.resolveBuildId(
+ ChromeReleaseChannel.STABLE
+ );
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.ESR:
+ throw new Error(`${tag} is not available for chrome-headless-shell`);
+ }
+ }
+ case Browser.CHROMIUM:
+ switch (tag) {
+ case BrowserTag.LATEST:
+ return await chromium.resolveBuildId(platform);
+ case BrowserTag.NIGHTLY:
+ case BrowserTag.CANARY:
+ case BrowserTag.DEV:
+ case BrowserTag.DEVEDITION:
+ case BrowserTag.BETA:
+ case BrowserTag.STABLE:
+ case BrowserTag.ESR:
+ throw new Error(
+ `${tag} is not supported for Chromium. Use 'latest' instead.`
+ );
+ }
+ }
+}
+
+/**
+ * @public
+ */
+export async function resolveBuildId(
+ browser: Browser,
+ platform: BrowserPlatform,
+ tag: string
+): Promise {
+ const browserTag = tag as BrowserTag;
+ if (Object.values(BrowserTag).includes(browserTag)) {
+ return await resolveBuildIdForBrowserTag(browser, platform, browserTag);
+ }
+
+ switch (browser) {
+ case Browser.FIREFOX:
+ return tag;
+ case Browser.CHROME:
+ const chromeResult = await chrome.resolveBuildId(tag);
+ if (chromeResult) {
+ return chromeResult;
+ }
+ return tag;
+ case Browser.CHROMEDRIVER:
+ const chromeDriverResult = await chromedriver.resolveBuildId(tag);
+ if (chromeDriverResult) {
+ return chromeDriverResult;
+ }
+ return tag;
+ case Browser.CHROMEHEADLESSSHELL:
+ const chromeHeadlessShellResult =
+ await chromeHeadlessShell.resolveBuildId(tag);
+ if (chromeHeadlessShellResult) {
+ return chromeHeadlessShellResult;
+ }
+ return tag;
+ case Browser.CHROMIUM:
+ return tag;
+ }
+}
+
+/**
+ * @public
+ */
+export async function createProfile(
+ browser: Browser,
+ opts: ProfileOptions
+): Promise {
+ switch (browser) {
+ case Browser.FIREFOX:
+ return await firefox.createProfile(opts);
+ case Browser.CHROME:
+ case Browser.CHROMIUM:
+ throw new Error(`Profile creation is not support for ${browser} yet`);
+ }
+}
+
+/**
+ * @public
+ */
+export function resolveSystemExecutablePath(
+ browser: Browser,
+ platform: BrowserPlatform,
+ channel: ChromeReleaseChannel
+): string {
+ switch (browser) {
+ case Browser.CHROMEDRIVER:
+ case Browser.CHROMEHEADLESSSHELL:
+ case Browser.FIREFOX:
+ case Browser.CHROMIUM:
+ throw new Error(
+ `System browser detection is not supported for ${browser} yet.`
+ );
+ case Browser.CHROME:
+ return chrome.resolveSystemExecutablePath(platform, channel);
+ }
+}
+
+/**
+ * Returns a version comparator for the given browser that can be used to sort
+ * browser versions.
+ *
+ * @public
+ */
+export function getVersionComparator(
+ browser: Browser
+): (a: string, b: string) => number {
+ return versionComparators[browser];
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts b/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts
new file mode 100644
index 00000000..f5f65cdb
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts
@@ -0,0 +1,69 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import path from 'path';
+
+import {BrowserPlatform} from './types.js';
+
+function folder(platform: BrowserPlatform): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'linux64';
+ case BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case BrowserPlatform.MAC:
+ return 'mac-x64';
+ case BrowserPlatform.WIN32:
+ return 'win32';
+ case BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+
+export function resolveDownloadUrl(
+ platform: BrowserPlatform,
+ buildId: string,
+ baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
+): string {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+
+export function resolveDownloadPath(
+ platform: BrowserPlatform,
+ buildId: string
+): string[] {
+ return [
+ buildId,
+ folder(platform),
+ `chrome-headless-shell-${folder(platform)}.zip`,
+ ];
+}
+
+export function relativeExecutablePath(
+ platform: BrowserPlatform,
+ _buildId: string
+): string {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join(
+ 'chrome-headless-shell-' + folder(platform),
+ 'chrome-headless-shell'
+ );
+ case BrowserPlatform.LINUX:
+ return path.join(
+ 'chrome-headless-shell-linux64',
+ 'chrome-headless-shell'
+ );
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join(
+ 'chrome-headless-shell-' + folder(platform),
+ 'chrome-headless-shell.exe'
+ );
+ }
+}
+
+export {resolveBuildId, compareVersions} from './chrome.js';
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts b/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts
new file mode 100644
index 00000000..c7975163
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts
@@ -0,0 +1,213 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import path from 'path';
+
+import semver from 'semver';
+
+import {getJSON} from '../httpUtil.js';
+
+import {BrowserPlatform, ChromeReleaseChannel} from './types.js';
+
+function folder(platform: BrowserPlatform): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'linux64';
+ case BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case BrowserPlatform.MAC:
+ return 'mac-x64';
+ case BrowserPlatform.WIN32:
+ return 'win32';
+ case BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+
+export function resolveDownloadUrl(
+ platform: BrowserPlatform,
+ buildId: string,
+ baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
+): string {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+
+export function resolveDownloadPath(
+ platform: BrowserPlatform,
+ buildId: string
+): string[] {
+ return [buildId, folder(platform), `chrome-${folder(platform)}.zip`];
+}
+
+export function relativeExecutablePath(
+ platform: BrowserPlatform,
+ _buildId: string
+): string {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join(
+ 'chrome-' + folder(platform),
+ 'Google Chrome for Testing.app',
+ 'Contents',
+ 'MacOS',
+ 'Google Chrome for Testing'
+ );
+ case BrowserPlatform.LINUX:
+ return path.join('chrome-linux64', 'chrome');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chrome-' + folder(platform), 'chrome.exe');
+ }
+}
+
+export async function getLastKnownGoodReleaseForChannel(
+ channel: ChromeReleaseChannel
+): Promise<{version: string; revision: string}> {
+ const data = (await getJSON(
+ new URL(
+ 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json'
+ )
+ )) as {
+ channels: Record;
+ };
+
+ for (const channel of Object.keys(data.channels)) {
+ data.channels[channel.toLowerCase()] = data.channels[channel]!;
+ delete data.channels[channel];
+ }
+
+ return (
+ data as {
+ channels: {
+ [channel in ChromeReleaseChannel]: {version: string; revision: string};
+ };
+ }
+ ).channels[channel];
+}
+
+export async function getLastKnownGoodReleaseForMilestone(
+ milestone: string
+): Promise<{version: string; revision: string} | undefined> {
+ const data = (await getJSON(
+ new URL(
+ 'https://googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone.json'
+ )
+ )) as {
+ milestones: Record;
+ };
+ return data.milestones[milestone] as
+ | {version: string; revision: string}
+ | undefined;
+}
+
+export async function getLastKnownGoodReleaseForBuild(
+ /**
+ * @example `112.0.23`,
+ */
+ buildPrefix: string
+): Promise<{version: string; revision: string} | undefined> {
+ const data = (await getJSON(
+ new URL(
+ 'https://googlechromelabs.github.io/chrome-for-testing/latest-patch-versions-per-build.json'
+ )
+ )) as {
+ builds: Record;
+ };
+ return data.builds[buildPrefix] as
+ | {version: string; revision: string}
+ | undefined;
+}
+
+export async function resolveBuildId(
+ channel: ChromeReleaseChannel
+): Promise;
+export async function resolveBuildId(
+ channel: string
+): Promise;
+export async function resolveBuildId(
+ channel: ChromeReleaseChannel | string
+): Promise {
+ if (
+ Object.values(ChromeReleaseChannel).includes(
+ channel as ChromeReleaseChannel
+ )
+ ) {
+ return (
+ await getLastKnownGoodReleaseForChannel(channel as ChromeReleaseChannel)
+ ).version;
+ }
+ if (channel.match(/^\d+$/)) {
+ // Potentially a milestone.
+ return (await getLastKnownGoodReleaseForMilestone(channel))?.version;
+ }
+ if (channel.match(/^\d+\.\d+\.\d+$/)) {
+ // Potentially a build prefix without the patch version.
+ return (await getLastKnownGoodReleaseForBuild(channel))?.version;
+ }
+ return;
+}
+
+export function resolveSystemExecutablePath(
+ platform: BrowserPlatform,
+ channel: ChromeReleaseChannel
+): string {
+ switch (platform) {
+ case BrowserPlatform.WIN64:
+ case BrowserPlatform.WIN32:
+ switch (channel) {
+ case ChromeReleaseChannel.STABLE:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome\\Application\\chrome.exe`;
+ case ChromeReleaseChannel.BETA:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome Beta\\Application\\chrome.exe`;
+ case ChromeReleaseChannel.CANARY:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome SxS\\Application\\chrome.exe`;
+ case ChromeReleaseChannel.DEV:
+ return `${process.env['PROGRAMFILES']}\\Google\\Chrome Dev\\Application\\chrome.exe`;
+ }
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ switch (channel) {
+ case ChromeReleaseChannel.STABLE:
+ return '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
+ case ChromeReleaseChannel.BETA:
+ return '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta';
+ case ChromeReleaseChannel.CANARY:
+ return '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary';
+ case ChromeReleaseChannel.DEV:
+ return '/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev';
+ }
+ case BrowserPlatform.LINUX:
+ switch (channel) {
+ case ChromeReleaseChannel.STABLE:
+ return '/opt/google/chrome/chrome';
+ case ChromeReleaseChannel.BETA:
+ return '/opt/google/chrome-beta/chrome';
+ case ChromeReleaseChannel.DEV:
+ return '/opt/google/chrome-unstable/chrome';
+ }
+ }
+
+ throw new Error(
+ `Unable to detect browser executable path for '${channel}' on ${platform}.`
+ );
+}
+
+export function compareVersions(a: string, b: string): number {
+ if (!semver.valid(a)) {
+ throw new Error(`Version ${a} is not a valid semver version`);
+ }
+ if (!semver.valid(b)) {
+ throw new Error(`Version ${b} is not a valid semver version`);
+ }
+ if (semver.gt(a, b)) {
+ return 1;
+ } else if (semver.lt(a, b)) {
+ return -1;
+ } else {
+ return 0;
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts b/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts
new file mode 100644
index 00000000..2f1242b2
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts
@@ -0,0 +1,56 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import path from 'path';
+
+import {BrowserPlatform} from './types.js';
+
+function folder(platform: BrowserPlatform): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'linux64';
+ case BrowserPlatform.MAC_ARM:
+ return 'mac-arm64';
+ case BrowserPlatform.MAC:
+ return 'mac-x64';
+ case BrowserPlatform.WIN32:
+ return 'win32';
+ case BrowserPlatform.WIN64:
+ return 'win64';
+ }
+}
+
+export function resolveDownloadUrl(
+ platform: BrowserPlatform,
+ buildId: string,
+ baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
+): string {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+
+export function resolveDownloadPath(
+ platform: BrowserPlatform,
+ buildId: string
+): string[] {
+ return [buildId, folder(platform), `chromedriver-${folder(platform)}.zip`];
+}
+
+export function relativeExecutablePath(
+ platform: BrowserPlatform,
+ _buildId: string
+): string {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join('chromedriver-' + folder(platform), 'chromedriver');
+ case BrowserPlatform.LINUX:
+ return path.join('chromedriver-linux64', 'chromedriver');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chromedriver-' + folder(platform), 'chromedriver.exe');
+ }
+}
+
+export {resolveBuildId, compareVersions} from './chrome.js';
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts b/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts
new file mode 100644
index 00000000..820e76d0
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts
@@ -0,0 +1,92 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import path from 'path';
+
+import {getText} from '../httpUtil.js';
+
+import {BrowserPlatform} from './types.js';
+
+function archive(platform: BrowserPlatform, buildId: string): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'chrome-linux';
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return 'chrome-mac';
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ // Windows archive name changed at r591479.
+ return parseInt(buildId, 10) > 591479 ? 'chrome-win' : 'chrome-win32';
+ }
+}
+
+function folder(platform: BrowserPlatform): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return 'Linux_x64';
+ case BrowserPlatform.MAC_ARM:
+ return 'Mac_Arm';
+ case BrowserPlatform.MAC:
+ return 'Mac';
+ case BrowserPlatform.WIN32:
+ return 'Win';
+ case BrowserPlatform.WIN64:
+ return 'Win_x64';
+ }
+}
+
+export function resolveDownloadUrl(
+ platform: BrowserPlatform,
+ buildId: string,
+ baseUrl = 'https://storage.googleapis.com/chromium-browser-snapshots'
+): string {
+ return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
+}
+
+export function resolveDownloadPath(
+ platform: BrowserPlatform,
+ buildId: string
+): string[] {
+ return [folder(platform), buildId, `${archive(platform, buildId)}.zip`];
+}
+
+export function relativeExecutablePath(
+ platform: BrowserPlatform,
+ _buildId: string
+): string {
+ switch (platform) {
+ case BrowserPlatform.MAC:
+ case BrowserPlatform.MAC_ARM:
+ return path.join(
+ 'chrome-mac',
+ 'Chromium.app',
+ 'Contents',
+ 'MacOS',
+ 'Chromium'
+ );
+ case BrowserPlatform.LINUX:
+ return path.join('chrome-linux', 'chrome');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('chrome-win', 'chrome.exe');
+ }
+}
+export async function resolveBuildId(
+ platform: BrowserPlatform
+): Promise {
+ return await getText(
+ new URL(
+ `https://storage.googleapis.com/chromium-browser-snapshots/${folder(
+ platform
+ )}/LAST_CHANGE`
+ )
+ );
+}
+
+export function compareVersions(a: string, b: string): number {
+ return Number(a) - Number(b);
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts b/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts
new file mode 100644
index 00000000..307ec5b5
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts
@@ -0,0 +1,439 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import fs from 'fs';
+import path from 'path';
+
+import {getJSON} from '../httpUtil.js';
+
+import {BrowserPlatform, type ProfileOptions} from './types.js';
+
+function archiveNightly(platform: BrowserPlatform, buildId: string): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return `firefox-${buildId}.en-US.${platform}-x86_64.tar.bz2`;
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return `firefox-${buildId}.en-US.mac.dmg`;
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return `firefox-${buildId}.en-US.${platform}.zip`;
+ }
+}
+
+function archive(platform: BrowserPlatform, buildId: string): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return `firefox-${buildId}.tar.bz2`;
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return `Firefox ${buildId}.dmg`;
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return `Firefox Setup ${buildId}.exe`;
+ }
+}
+
+function platformName(platform: BrowserPlatform): string {
+ switch (platform) {
+ case BrowserPlatform.LINUX:
+ return `linux-x86_64`;
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return `mac`;
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return platform;
+ }
+}
+
+function parseBuildId(buildId: string): [FirefoxChannel, string] {
+ for (const value of Object.values(FirefoxChannel)) {
+ if (buildId.startsWith(value + '_')) {
+ buildId = buildId.substring(value.length + 1);
+ return [value, buildId];
+ }
+ }
+ // Older versions do not have channel as the prefix.«
+ return [FirefoxChannel.NIGHTLY, buildId];
+}
+
+export function resolveDownloadUrl(
+ platform: BrowserPlatform,
+ buildId: string,
+ baseUrl?: string
+): string {
+ const [channel, resolvedBuildId] = parseBuildId(buildId);
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ baseUrl ??=
+ 'https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central';
+ break;
+ case FirefoxChannel.DEVEDITION:
+ baseUrl ??= 'https://archive.mozilla.org/pub/devedition/releases';
+ break;
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.STABLE:
+ case FirefoxChannel.ESR:
+ baseUrl ??= 'https://archive.mozilla.org/pub/firefox/releases';
+ break;
+ }
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ return `${baseUrl}/${resolveDownloadPath(platform, resolvedBuildId).join('/')}`;
+ case FirefoxChannel.DEVEDITION:
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.STABLE:
+ case FirefoxChannel.ESR:
+ return `${baseUrl}/${resolvedBuildId}/${platformName(platform)}/en-US/${archive(platform, resolvedBuildId)}`;
+ }
+}
+
+export function resolveDownloadPath(
+ platform: BrowserPlatform,
+ buildId: string
+): string[] {
+ return [archiveNightly(platform, buildId)];
+}
+
+export function relativeExecutablePath(
+ platform: BrowserPlatform,
+ buildId: string
+): string {
+ const [channel] = parseBuildId(buildId);
+ switch (channel) {
+ case FirefoxChannel.NIGHTLY:
+ switch (platform) {
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return path.join(
+ 'Firefox Nightly.app',
+ 'Contents',
+ 'MacOS',
+ 'firefox'
+ );
+ case BrowserPlatform.LINUX:
+ return path.join('firefox', 'firefox');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('firefox', 'firefox.exe');
+ }
+ case FirefoxChannel.BETA:
+ case FirefoxChannel.DEVEDITION:
+ case FirefoxChannel.ESR:
+ case FirefoxChannel.STABLE:
+ switch (platform) {
+ case BrowserPlatform.MAC_ARM:
+ case BrowserPlatform.MAC:
+ return path.join('Firefox.app', 'Contents', 'MacOS', 'firefox');
+ case BrowserPlatform.LINUX:
+ return path.join('firefox', 'firefox');
+ case BrowserPlatform.WIN32:
+ case BrowserPlatform.WIN64:
+ return path.join('core', 'firefox.exe');
+ }
+ }
+}
+
+export enum FirefoxChannel {
+ STABLE = 'stable',
+ ESR = 'esr',
+ DEVEDITION = 'devedition',
+ BETA = 'beta',
+ NIGHTLY = 'nightly',
+}
+
+export async function resolveBuildId(
+ channel: FirefoxChannel = FirefoxChannel.NIGHTLY
+): Promise {
+ const channelToVersionKey = {
+ [FirefoxChannel.ESR]: 'FIREFOX_ESR',
+ [FirefoxChannel.STABLE]: 'LATEST_FIREFOX_VERSION',
+ [FirefoxChannel.DEVEDITION]: 'FIREFOX_DEVEDITION',
+ [FirefoxChannel.BETA]: 'FIREFOX_DEVEDITION',
+ [FirefoxChannel.NIGHTLY]: 'FIREFOX_NIGHTLY',
+ };
+ const versions = (await getJSON(
+ new URL('https://product-details.mozilla.org/1.0/firefox_versions.json')
+ )) as Record;
+ const version = versions[channelToVersionKey[channel]];
+ if (!version) {
+ throw new Error(`Channel ${channel} is not found.`);
+ }
+ return channel + '_' + version;
+}
+
+export async function createProfile(options: ProfileOptions): Promise {
+ if (!fs.existsSync(options.path)) {
+ await fs.promises.mkdir(options.path, {
+ recursive: true,
+ });
+ }
+ await writePreferences({
+ preferences: {
+ ...defaultProfilePreferences(options.preferences),
+ ...options.preferences,
+ },
+ path: options.path,
+ });
+}
+
+function defaultProfilePreferences(
+ extraPrefs: Record
+): Record {
+ const server = 'dummy.test';
+
+ const defaultPrefs = {
+ // Make sure Shield doesn't hit the network.
+ 'app.normandy.api_url': '',
+ // Disable Firefox old build background check
+ 'app.update.checkInstallTime': false,
+ // Disable automatically upgrading Firefox
+ 'app.update.disabledForTesting': true,
+
+ // Increase the APZ content response timeout to 1 minute
+ 'apz.content_response_timeout': 60000,
+
+ // Prevent various error message on the console
+ // jest-puppeteer asserts that no error message is emitted by the console
+ 'browser.contentblocking.features.standard':
+ '-tp,tpPrivate,cookieBehavior0,-cm,-fp',
+
+ // Enable the dump function: which sends messages to the system
+ // console
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1543115
+ 'browser.dom.window.dump.enabled': true,
+ // Disable topstories
+ 'browser.newtabpage.activity-stream.feeds.system.topstories': false,
+ // Always display a blank page
+ 'browser.newtabpage.enabled': false,
+ // Background thumbnails in particular cause grief: and disabling
+ // thumbnails in general cannot hurt
+ 'browser.pagethumbnails.capturing_disabled': true,
+
+ // Disable safebrowsing components.
+ 'browser.safebrowsing.blockedURIs.enabled': false,
+ 'browser.safebrowsing.downloads.enabled': false,
+ 'browser.safebrowsing.malware.enabled': false,
+ 'browser.safebrowsing.phishing.enabled': false,
+
+ // Disable updates to search engines.
+ 'browser.search.update': false,
+ // Do not restore the last open set of tabs if the browser has crashed
+ 'browser.sessionstore.resume_from_crash': false,
+ // Skip check for default browser on startup
+ 'browser.shell.checkDefaultBrowser': false,
+
+ // Disable newtabpage
+ 'browser.startup.homepage': 'about:blank',
+ // Do not redirect user when a milstone upgrade of Firefox is detected
+ 'browser.startup.homepage_override.mstone': 'ignore',
+ // Start with a blank page about:blank
+ 'browser.startup.page': 0,
+
+ // Do not allow background tabs to be zombified on Android: otherwise for
+ // tests that open additional tabs: the test harness tab itself might get
+ // unloaded
+ 'browser.tabs.disableBackgroundZombification': false,
+ // Do not warn when closing all other open tabs
+ 'browser.tabs.warnOnCloseOtherTabs': false,
+ // Do not warn when multiple tabs will be opened
+ 'browser.tabs.warnOnOpen': false,
+
+ // Do not automatically offer translations, as tests do not expect this.
+ 'browser.translations.automaticallyPopup': false,
+
+ // Disable the UI tour.
+ 'browser.uitour.enabled': false,
+ // Turn off search suggestions in the location bar so as not to trigger
+ // network connections.
+ 'browser.urlbar.suggest.searches': false,
+ // Disable first run splash page on Windows 10
+ 'browser.usedOnWindows10.introURL': '',
+ // Do not warn on quitting Firefox
+ 'browser.warnOnQuit': false,
+
+ // Defensively disable data reporting systems
+ 'datareporting.healthreport.documentServerURI': `http://${server}/dummy/healthreport/`,
+ 'datareporting.healthreport.logging.consoleEnabled': false,
+ 'datareporting.healthreport.service.enabled': false,
+ 'datareporting.healthreport.service.firstRun': false,
+ 'datareporting.healthreport.uploadEnabled': false,
+
+ // Do not show datareporting policy notifications which can interfere with tests
+ 'datareporting.policy.dataSubmissionEnabled': false,
+ 'datareporting.policy.dataSubmissionPolicyBypassNotification': true,
+
+ // DevTools JSONViewer sometimes fails to load dependencies with its require.js.
+ // This doesn't affect Puppeteer but spams console (Bug 1424372)
+ 'devtools.jsonview.enabled': false,
+
+ // Disable popup-blocker
+ 'dom.disable_open_during_load': false,
+
+ // Enable the support for File object creation in the content process
+ // Required for |Page.setFileInputFiles| protocol method.
+ 'dom.file.createInChild': true,
+
+ // Disable the ProcessHangMonitor
+ 'dom.ipc.reportProcessHangs': false,
+
+ // Disable slow script dialogues
+ 'dom.max_chrome_script_run_time': 0,
+ 'dom.max_script_run_time': 0,
+
+ // Only load extensions from the application and user profile
+ // AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION
+ 'extensions.autoDisableScopes': 0,
+ 'extensions.enabledScopes': 5,
+
+ // Disable metadata caching for installed add-ons by default
+ 'extensions.getAddons.cache.enabled': false,
+
+ // Disable installing any distribution extensions or add-ons.
+ 'extensions.installDistroAddons': false,
+
+ // Disabled screenshots extension
+ 'extensions.screenshots.disabled': true,
+
+ // Turn off extension updates so they do not bother tests
+ 'extensions.update.enabled': false,
+
+ // Turn off extension updates so they do not bother tests
+ 'extensions.update.notifyUser': false,
+
+ // Make sure opening about:addons will not hit the network
+ 'extensions.webservice.discoverURL': `http://${server}/dummy/discoveryURL`,
+
+ // Allow the application to have focus even it runs in the background
+ 'focusmanager.testmode': true,
+
+ // Disable useragent updates
+ 'general.useragent.updates.enabled': false,
+
+ // Always use network provider for geolocation tests so we bypass the
+ // macOS dialog raised by the corelocation provider
+ 'geo.provider.testing': true,
+
+ // Do not scan Wifi
+ 'geo.wifi.scan': false,
+
+ // No hang monitor
+ 'hangmonitor.timeout': 0,
+
+ // Show chrome errors and warnings in the error console
+ 'javascript.options.showInConsole': true,
+
+ // Disable download and usage of OpenH264: and Widevine plugins
+ 'media.gmp-manager.updateEnabled': false,
+
+ // Disable the GFX sanity window
+ 'media.sanity-test.disabled': true,
+
+ // Disable experimental feature that is only available in Nightly
+ 'network.cookie.sameSite.laxByDefault': false,
+
+ // Do not prompt for temporary redirects
+ 'network.http.prompt-temp-redirect': false,
+
+ // Disable speculative connections so they are not reported as leaking
+ // when they are hanging around
+ 'network.http.speculative-parallel-limit': 0,
+
+ // Do not automatically switch between offline and online
+ 'network.manage-offline-status': false,
+
+ // Make sure SNTP requests do not hit the network
+ 'network.sntp.pools': server,
+
+ // Disable Flash.
+ 'plugin.state.flash': 0,
+
+ 'privacy.trackingprotection.enabled': false,
+
+ // Can be removed once Firefox 89 is no longer supported
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1710839
+ 'remote.enabled': true,
+
+ // Don't do network connections for mitm priming
+ 'security.certerrors.mitm.priming.enabled': false,
+
+ // Local documents have access to all other local documents,
+ // including directory listings
+ 'security.fileuri.strict_origin_policy': false,
+
+ // Do not wait for the notification button security delay
+ 'security.notification_enable_delay': 0,
+
+ // Ensure blocklist updates do not hit the network
+ 'services.settings.server': `http://${server}/dummy/blocklist/`,
+
+ // Do not automatically fill sign-in forms with known usernames and
+ // passwords
+ 'signon.autofillForms': false,
+
+ // Disable password capture, so that tests that include forms are not
+ // influenced by the presence of the persistent doorhanger notification
+ 'signon.rememberSignons': false,
+
+ // Disable first-run welcome page
+ 'startup.homepage_welcome_url': 'about:blank',
+
+ // Disable first-run welcome page
+ 'startup.homepage_welcome_url.additional': '',
+
+ // Disable browser animations (tabs, fullscreen, sliding alerts)
+ 'toolkit.cosmeticAnimations.enabled': false,
+
+ // Prevent starting into safe mode after application crashes
+ 'toolkit.startup.max_resumed_crashes': -1,
+ };
+
+ return Object.assign(defaultPrefs, extraPrefs);
+}
+
+/**
+ * Populates the user.js file with custom preferences as needed to allow
+ * Firefox's CDP support to properly function. These preferences will be
+ * automatically copied over to prefs.js during startup of Firefox. To be
+ * able to restore the original values of preferences a backup of prefs.js
+ * will be created.
+ *
+ * @param prefs - List of preferences to add.
+ * @param profilePath - Firefox profile to write the preferences to.
+ */
+async function writePreferences(options: ProfileOptions): Promise {
+ const prefsPath = path.join(options.path, 'prefs.js');
+ const lines = Object.entries(options.preferences).map(([key, value]) => {
+ return `user_pref(${JSON.stringify(key)}, ${JSON.stringify(value)});`;
+ });
+
+ // Use allSettled to prevent corruption
+ const result = await Promise.allSettled([
+ fs.promises.writeFile(path.join(options.path, 'user.js'), lines.join('\n')),
+ // Create a backup of the preferences file if it already exitsts.
+ fs.promises.access(prefsPath, fs.constants.F_OK).then(
+ async () => {
+ await fs.promises.copyFile(
+ prefsPath,
+ path.join(options.path, 'prefs.js.puppeteer')
+ );
+ },
+ // Swallow only if file does not exist
+ () => {}
+ ),
+ ]);
+ for (const command of result) {
+ if (command.status === 'rejected') {
+ throw command.reason;
+ }
+ }
+}
+
+export function compareVersions(a: string, b: string): number {
+ // TODO: this is a not very reliable check.
+ return parseInt(a.replace('.', ''), 16) - parseInt(b.replace('.', ''), 16);
+}
diff --git a/node_modules/@puppeteer/browsers/src/browser-data/types.ts b/node_modules/@puppeteer/browsers/src/browser-data/types.ts
new file mode 100644
index 00000000..49903506
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/browser-data/types.ts
@@ -0,0 +1,64 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+/**
+ * Supported browsers.
+ *
+ * @public
+ */
+export enum Browser {
+ CHROME = 'chrome',
+ CHROMEHEADLESSSHELL = 'chrome-headless-shell',
+ CHROMIUM = 'chromium',
+ FIREFOX = 'firefox',
+ CHROMEDRIVER = 'chromedriver',
+}
+
+/**
+ * Platform names used to identify a OS platform x architecture combination in the way
+ * that is relevant for the browser download.
+ *
+ * @public
+ */
+export enum BrowserPlatform {
+ LINUX = 'linux',
+ MAC = 'mac',
+ MAC_ARM = 'mac_arm',
+ WIN32 = 'win32',
+ WIN64 = 'win64',
+}
+
+/**
+ * @public
+ */
+export enum BrowserTag {
+ CANARY = 'canary',
+ NIGHTLY = 'nightly',
+ BETA = 'beta',
+ DEV = 'dev',
+ DEVEDITION = 'devedition',
+ STABLE = 'stable',
+ ESR = 'esr',
+ LATEST = 'latest',
+}
+
+/**
+ * @public
+ */
+export interface ProfileOptions {
+ preferences: Record;
+ path: string;
+}
+
+/**
+ * @public
+ */
+export enum ChromeReleaseChannel {
+ STABLE = 'stable',
+ DEV = 'dev',
+ CANARY = 'canary',
+ BETA = 'beta',
+}
diff --git a/node_modules/@puppeteer/browsers/src/debug.ts b/node_modules/@puppeteer/browsers/src/debug.ts
new file mode 100644
index 00000000..491097f4
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/debug.ts
@@ -0,0 +1,9 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import debug from 'debug';
+
+export {debug};
diff --git a/node_modules/@puppeteer/browsers/src/detectPlatform.ts b/node_modules/@puppeteer/browsers/src/detectPlatform.ts
new file mode 100644
index 00000000..df644c38
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/detectPlatform.ts
@@ -0,0 +1,51 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import os from 'os';
+
+import {BrowserPlatform} from './browser-data/browser-data.js';
+
+/**
+ * @public
+ */
+export function detectBrowserPlatform(): BrowserPlatform | undefined {
+ const platform = os.platform();
+ switch (platform) {
+ case 'darwin':
+ return os.arch() === 'arm64'
+ ? BrowserPlatform.MAC_ARM
+ : BrowserPlatform.MAC;
+ case 'linux':
+ return BrowserPlatform.LINUX;
+ case 'win32':
+ return os.arch() === 'x64' ||
+ // Windows 11 for ARM supports x64 emulation
+ (os.arch() === 'arm64' && isWindows11(os.release()))
+ ? BrowserPlatform.WIN64
+ : BrowserPlatform.WIN32;
+ default:
+ return undefined;
+ }
+}
+
+/**
+ * Windows 11 is identified by the version 10.0.22000 or greater
+ * @internal
+ */
+function isWindows11(version: string): boolean {
+ const parts = version.split('.');
+ if (parts.length > 2) {
+ const major = parseInt(parts[0] as string, 10);
+ const minor = parseInt(parts[1] as string, 10);
+ const patch = parseInt(parts[2] as string, 10);
+ return (
+ major > 10 ||
+ (major === 10 && minor > 0) ||
+ (major === 10 && minor === 0 && patch >= 22000)
+ );
+ }
+ return false;
+}
diff --git a/node_modules/@puppeteer/browsers/src/fileUtil.ts b/node_modules/@puppeteer/browsers/src/fileUtil.ts
new file mode 100644
index 00000000..28168afa
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/fileUtil.ts
@@ -0,0 +1,91 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {exec as execChildProcess, spawnSync} from 'child_process';
+import {createReadStream} from 'fs';
+import {mkdir, readdir} from 'fs/promises';
+import * as path from 'path';
+import {promisify} from 'util';
+
+import extractZip from 'extract-zip';
+import tar from 'tar-fs';
+import bzip from 'unbzip2-stream';
+
+const exec = promisify(execChildProcess);
+
+/**
+ * @internal
+ */
+export async function unpackArchive(
+ archivePath: string,
+ folderPath: string
+): Promise {
+ if (archivePath.endsWith('.zip')) {
+ await extractZip(archivePath, {dir: folderPath});
+ } else if (archivePath.endsWith('.tar.bz2')) {
+ await extractTar(archivePath, folderPath);
+ } else if (archivePath.endsWith('.dmg')) {
+ await mkdir(folderPath);
+ await installDMG(archivePath, folderPath);
+ } else if (archivePath.endsWith('.exe')) {
+ // Firefox on Windows.
+ const result = spawnSync(archivePath, [`/ExtractDir=${folderPath}`], {
+ env: {
+ __compat_layer: 'RunAsInvoker',
+ },
+ });
+ if (result.status !== 0) {
+ throw new Error(
+ `Failed to extract ${archivePath} to ${folderPath}: ${result.output}`
+ );
+ }
+ } else {
+ throw new Error(`Unsupported archive format: ${archivePath}`);
+ }
+}
+
+/**
+ * @internal
+ */
+function extractTar(tarPath: string, folderPath: string): Promise {
+ return new Promise((fulfill, reject) => {
+ const tarStream = tar.extract(folderPath);
+ tarStream.on('error', reject);
+ tarStream.on('finish', fulfill);
+ const readStream = createReadStream(tarPath);
+ readStream.pipe(bzip()).pipe(tarStream);
+ });
+}
+
+/**
+ * @internal
+ */
+async function installDMG(dmgPath: string, folderPath: string): Promise {
+ const {stdout} = await exec(
+ `hdiutil attach -nobrowse -noautoopen "${dmgPath}"`
+ );
+
+ const volumes = stdout.match(/\/Volumes\/(.*)/m);
+ if (!volumes) {
+ throw new Error(`Could not find volume path in ${stdout}`);
+ }
+ const mountPath = volumes[0]!;
+
+ try {
+ const fileNames = await readdir(mountPath);
+ const appName = fileNames.find(item => {
+ return typeof item === 'string' && item.endsWith('.app');
+ });
+ if (!appName) {
+ throw new Error(`Cannot find app in ${mountPath}`);
+ }
+ const mountedPath = path.join(mountPath!, appName);
+
+ await exec(`cp -R "${mountedPath}" "${folderPath}"`);
+ } finally {
+ await exec(`hdiutil detach "${mountPath}" -quiet`);
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/src/httpUtil.ts b/node_modules/@puppeteer/browsers/src/httpUtil.ts
new file mode 100644
index 00000000..084bae59
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/httpUtil.ts
@@ -0,0 +1,154 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {createWriteStream} from 'fs';
+import * as http from 'http';
+import * as https from 'https';
+import {URL, urlToHttpOptions} from 'url';
+
+import {ProxyAgent} from 'proxy-agent';
+
+export function headHttpRequest(url: URL): Promise {
+ return new Promise(resolve => {
+ const request = httpRequest(
+ url,
+ 'HEAD',
+ response => {
+ // consume response data free node process
+ response.resume();
+ resolve(response.statusCode === 200);
+ },
+ false
+ );
+ request.on('error', () => {
+ resolve(false);
+ });
+ });
+}
+
+export function httpRequest(
+ url: URL,
+ method: string,
+ response: (x: http.IncomingMessage) => void,
+ keepAlive = true
+): http.ClientRequest {
+ const options: http.RequestOptions = {
+ protocol: url.protocol,
+ hostname: url.hostname,
+ port: url.port,
+ path: url.pathname + url.search,
+ method,
+ headers: keepAlive ? {Connection: 'keep-alive'} : undefined,
+ auth: urlToHttpOptions(url).auth,
+ agent: new ProxyAgent(),
+ };
+
+ const requestCallback = (res: http.IncomingMessage): void => {
+ if (
+ res.statusCode &&
+ res.statusCode >= 300 &&
+ res.statusCode < 400 &&
+ res.headers.location
+ ) {
+ httpRequest(new URL(res.headers.location), method, response);
+ // consume response data to free up memory
+ // And prevents the connection from being kept alive
+ res.resume();
+ } else {
+ response(res);
+ }
+ };
+ const request =
+ options.protocol === 'https:'
+ ? https.request(options, requestCallback)
+ : http.request(options, requestCallback);
+ request.end();
+ return request;
+}
+
+/**
+ * @internal
+ */
+export function downloadFile(
+ url: URL,
+ destinationPath: string,
+ progressCallback?: (downloadedBytes: number, totalBytes: number) => void
+): Promise {
+ return new Promise((resolve, reject) => {
+ let downloadedBytes = 0;
+ let totalBytes = 0;
+
+ function onData(chunk: string): void {
+ downloadedBytes += chunk.length;
+ progressCallback!(downloadedBytes, totalBytes);
+ }
+
+ const request = httpRequest(url, 'GET', response => {
+ if (response.statusCode !== 200) {
+ const error = new Error(
+ `Download failed: server returned code ${response.statusCode}. URL: ${url}`
+ );
+ // consume response data to free up memory
+ response.resume();
+ reject(error);
+ return;
+ }
+ const file = createWriteStream(destinationPath);
+ file.on('finish', () => {
+ return resolve();
+ });
+ file.on('error', error => {
+ return reject(error);
+ });
+ response.pipe(file);
+ totalBytes = parseInt(response.headers['content-length']!, 10);
+ if (progressCallback) {
+ response.on('data', onData);
+ }
+ });
+ request.on('error', error => {
+ return reject(error);
+ });
+ });
+}
+
+export async function getJSON(url: URL): Promise {
+ const text = await getText(url);
+ try {
+ return JSON.parse(text);
+ } catch {
+ throw new Error('Could not parse JSON from ' + url.toString());
+ }
+}
+
+export function getText(url: URL): Promise {
+ return new Promise((resolve, reject) => {
+ const request = httpRequest(
+ url,
+ 'GET',
+ response => {
+ let data = '';
+ if (response.statusCode && response.statusCode >= 400) {
+ return reject(new Error(`Got status code ${response.statusCode}`));
+ }
+ response.on('data', chunk => {
+ data += chunk;
+ });
+ response.on('end', () => {
+ try {
+ return resolve(String(data));
+ } catch {
+ return reject(new Error('Chrome version not found'));
+ }
+ });
+ },
+ false
+ );
+ request.on('error', err => {
+ reject(err);
+ });
+ });
+}
diff --git a/node_modules/@puppeteer/browsers/src/install.ts b/node_modules/@puppeteer/browsers/src/install.ts
new file mode 100644
index 00000000..f585021d
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/install.ts
@@ -0,0 +1,362 @@
+/**
+ * @license
+ * Copyright 2017 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import assert from 'assert';
+import {existsSync} from 'fs';
+import {mkdir, unlink} from 'fs/promises';
+import os from 'os';
+import path from 'path';
+
+import {
+ Browser,
+ BrowserPlatform,
+ downloadUrls,
+} from './browser-data/browser-data.js';
+import {Cache, InstalledBrowser} from './Cache.js';
+import {debug} from './debug.js';
+import {detectBrowserPlatform} from './detectPlatform.js';
+import {unpackArchive} from './fileUtil.js';
+import {downloadFile, getJSON, headHttpRequest} from './httpUtil.js';
+
+const debugInstall = debug('puppeteer:browsers:install');
+
+const times = new Map();
+function debugTime(label: string) {
+ times.set(label, process.hrtime());
+}
+
+function debugTimeEnd(label: string) {
+ const end = process.hrtime();
+ const start = times.get(label);
+ if (!start) {
+ return;
+ }
+ const duration =
+ end[0] * 1000 + end[1] / 1e6 - (start[0] * 1000 + start[1] / 1e6); // calculate duration in milliseconds
+ debugInstall(`Duration for ${label}: ${duration}ms`);
+}
+
+/**
+ * @public
+ */
+export interface InstallOptions {
+ /**
+ * Determines the path to download browsers to.
+ */
+ cacheDir: string;
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to install.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+ /**
+ * An alias for the provided `buildId`. It will be used to maintain local
+ * metadata to support aliases in the `launch` command.
+ *
+ * @example 'canary'
+ */
+ buildIdAlias?: string;
+ /**
+ * Provides information about the progress of the download.
+ */
+ downloadProgressCallback?: (
+ downloadedBytes: number,
+ totalBytes: number
+ ) => void;
+ /**
+ * Determines the host that will be used for downloading.
+ *
+ * @defaultValue Either
+ *
+ * - https://storage.googleapis.com/chrome-for-testing-public or
+ * - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
+ *
+ */
+ baseUrl?: string;
+ /**
+ * Whether to unpack and install browser archives.
+ *
+ * @defaultValue `true`
+ */
+ unpack?: boolean;
+ /**
+ * @internal
+ * @defaultValue `false`
+ */
+ forceFallbackForTesting?: boolean;
+}
+
+/**
+ * @public
+ */
+export function install(
+ options: InstallOptions & {unpack?: true}
+): Promise;
+/**
+ * @public
+ */
+export function install(
+ options: InstallOptions & {unpack: false}
+): Promise;
+export async function install(
+ options: InstallOptions
+): Promise {
+ options.platform ??= detectBrowserPlatform();
+ options.unpack ??= true;
+ if (!options.platform) {
+ throw new Error(
+ `Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
+ );
+ }
+ const url = getDownloadUrl(
+ options.browser,
+ options.platform,
+ options.buildId,
+ options.baseUrl
+ );
+ try {
+ return await installUrl(url, options);
+ } catch (err) {
+ // If custom baseUrl is provided, do not fall back to CfT dashboard.
+ if (options.baseUrl && !options.forceFallbackForTesting) {
+ throw err;
+ }
+ debugInstall(`Error downloading from ${url}.`);
+ switch (options.browser) {
+ case Browser.CHROME:
+ case Browser.CHROMEDRIVER:
+ case Browser.CHROMEHEADLESSSHELL: {
+ debugInstall(
+ `Trying to find download URL via https://googlechromelabs.github.io/chrome-for-testing.`
+ );
+ interface Version {
+ downloads: Record>;
+ }
+ const version = (await getJSON(
+ new URL(
+ `https://googlechromelabs.github.io/chrome-for-testing/${options.buildId}.json`
+ )
+ )) as Version;
+ let platform = '';
+ switch (options.platform) {
+ case BrowserPlatform.LINUX:
+ platform = 'linux64';
+ break;
+ case BrowserPlatform.MAC_ARM:
+ platform = 'mac-arm64';
+ break;
+ case BrowserPlatform.MAC:
+ platform = 'mac-x64';
+ break;
+ case BrowserPlatform.WIN32:
+ platform = 'win32';
+ break;
+ case BrowserPlatform.WIN64:
+ platform = 'win64';
+ break;
+ }
+ const url = version.downloads[options.browser]?.find(link => {
+ return link['platform'] === platform;
+ })?.url;
+ if (url) {
+ debugInstall(`Falling back to downloading from ${url}.`);
+ return await installUrl(new URL(url), options);
+ }
+ throw err;
+ }
+ default:
+ throw err;
+ }
+ }
+}
+
+async function installUrl(
+ url: URL,
+ options: InstallOptions
+): Promise {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(
+ `Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
+ );
+ }
+ const fileName = url.toString().split('/').pop();
+ assert(fileName, `A malformed download URL was found: ${url}.`);
+ const cache = new Cache(options.cacheDir);
+ const browserRoot = cache.browserRoot(options.browser);
+ const archivePath = path.join(browserRoot, `${options.buildId}-${fileName}`);
+ if (!existsSync(browserRoot)) {
+ await mkdir(browserRoot, {recursive: true});
+ }
+
+ if (!options.unpack) {
+ if (existsSync(archivePath)) {
+ return archivePath;
+ }
+ debugInstall(`Downloading binary from ${url}`);
+ debugTime('download');
+ await downloadFile(url, archivePath, options.downloadProgressCallback);
+ debugTimeEnd('download');
+ return archivePath;
+ }
+
+ const outputPath = cache.installationDir(
+ options.browser,
+ options.platform,
+ options.buildId
+ );
+
+ try {
+ if (existsSync(outputPath)) {
+ const installedBrowser = new InstalledBrowser(
+ cache,
+ options.browser,
+ options.buildId,
+ options.platform
+ );
+ if (!existsSync(installedBrowser.executablePath)) {
+ throw new Error(
+ `The browser folder (${outputPath}) exists but the executable (${installedBrowser.executablePath}) is missing`
+ );
+ }
+ return installedBrowser;
+ }
+ debugInstall(`Downloading binary from ${url}`);
+ try {
+ debugTime('download');
+ await downloadFile(url, archivePath, options.downloadProgressCallback);
+ } finally {
+ debugTimeEnd('download');
+ }
+
+ debugInstall(`Installing ${archivePath} to ${outputPath}`);
+ try {
+ debugTime('extract');
+ await unpackArchive(archivePath, outputPath);
+ } finally {
+ debugTimeEnd('extract');
+ }
+ const installedBrowser = new InstalledBrowser(
+ cache,
+ options.browser,
+ options.buildId,
+ options.platform
+ );
+ if (options.buildIdAlias) {
+ const metadata = installedBrowser.readMetadata();
+ metadata.aliases[options.buildIdAlias] = options.buildId;
+ installedBrowser.writeMetadata(metadata);
+ }
+ return installedBrowser;
+ } finally {
+ if (existsSync(archivePath)) {
+ await unlink(archivePath);
+ }
+ }
+}
+
+/**
+ * @public
+ */
+export interface UninstallOptions {
+ /**
+ * Determines the platform for the browser binary.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * The path to the root of the cache directory.
+ */
+ cacheDir: string;
+ /**
+ * Determines which browser to uninstall.
+ */
+ browser: Browser;
+ /**
+ * The browser build to uninstall
+ */
+ buildId: string;
+}
+
+/**
+ *
+ * @public
+ */
+export async function uninstall(options: UninstallOptions): Promise {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(
+ `Cannot detect the browser platform for: ${os.platform()} (${os.arch()})`
+ );
+ }
+
+ new Cache(options.cacheDir).uninstall(
+ options.browser,
+ options.platform,
+ options.buildId
+ );
+}
+
+/**
+ * @public
+ */
+export interface GetInstalledBrowsersOptions {
+ /**
+ * The path to the root of the cache directory.
+ */
+ cacheDir: string;
+}
+
+/**
+ * Returns metadata about browsers installed in the cache directory.
+ *
+ * @public
+ */
+export async function getInstalledBrowsers(
+ options: GetInstalledBrowsersOptions
+): Promise {
+ return new Cache(options.cacheDir).getInstalledBrowsers();
+}
+
+/**
+ * @public
+ */
+export async function canDownload(options: InstallOptions): Promise {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(
+ `Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
+ );
+ }
+ return await headHttpRequest(
+ getDownloadUrl(
+ options.browser,
+ options.platform,
+ options.buildId,
+ options.baseUrl
+ )
+ );
+}
+
+function getDownloadUrl(
+ browser: Browser,
+ platform: BrowserPlatform,
+ buildId: string,
+ baseUrl?: string
+): URL {
+ return new URL(downloadUrls[browser](platform, buildId, baseUrl));
+}
diff --git a/node_modules/@puppeteer/browsers/src/launch.ts b/node_modules/@puppeteer/browsers/src/launch.ts
new file mode 100644
index 00000000..434f34c0
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/launch.ts
@@ -0,0 +1,532 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import childProcess from 'child_process';
+import {accessSync} from 'fs';
+import os from 'os';
+import readline from 'readline';
+
+import {
+ type Browser,
+ type BrowserPlatform,
+ resolveSystemExecutablePath,
+ type ChromeReleaseChannel,
+} from './browser-data/browser-data.js';
+import {Cache} from './Cache.js';
+import {debug} from './debug.js';
+import {detectBrowserPlatform} from './detectPlatform.js';
+
+const debugLaunch = debug('puppeteer:browsers:launcher');
+
+/**
+ * @public
+ */
+export interface ComputeExecutablePathOptions {
+ /**
+ * Root path to the storage directory.
+ */
+ cacheDir: string;
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Determines which buildId to download. BuildId should uniquely identify
+ * binaries and they are used for caching.
+ */
+ buildId: string;
+}
+
+/**
+ * @public
+ */
+export function computeExecutablePath(
+ options: ComputeExecutablePathOptions
+): string {
+ return new Cache(options.cacheDir).computeExecutablePath(options);
+}
+
+/**
+ * @public
+ */
+export interface SystemOptions {
+ /**
+ * Determines which platform the browser will be suited for.
+ *
+ * @defaultValue **Auto-detected.**
+ */
+ platform?: BrowserPlatform;
+ /**
+ * Determines which browser to launch.
+ */
+ browser: Browser;
+ /**
+ * Release channel to look for on the system.
+ */
+ channel: ChromeReleaseChannel;
+}
+
+/**
+ * @public
+ */
+export function computeSystemExecutablePath(options: SystemOptions): string {
+ options.platform ??= detectBrowserPlatform();
+ if (!options.platform) {
+ throw new Error(
+ `Cannot download a binary for the provided platform: ${os.platform()} (${os.arch()})`
+ );
+ }
+ const path = resolveSystemExecutablePath(
+ options.browser,
+ options.platform,
+ options.channel
+ );
+ try {
+ accessSync(path);
+ } catch (error) {
+ throw new Error(
+ `Could not find Google Chrome executable for channel '${options.channel}' at '${path}'.`
+ );
+ }
+ return path;
+}
+
+/**
+ * @public
+ */
+export interface LaunchOptions {
+ executablePath: string;
+ pipe?: boolean;
+ dumpio?: boolean;
+ args?: string[];
+ env?: Record;
+ handleSIGINT?: boolean;
+ handleSIGTERM?: boolean;
+ handleSIGHUP?: boolean;
+ detached?: boolean;
+ onExit?: () => Promise;
+}
+
+/**
+ * @public
+ */
+export function launch(opts: LaunchOptions): Process {
+ return new Process(opts);
+}
+
+/**
+ * @public
+ */
+export const CDP_WEBSOCKET_ENDPOINT_REGEX =
+ /^DevTools listening on (ws:\/\/.*)$/;
+
+/**
+ * @public
+ */
+export const WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX =
+ /^WebDriver BiDi listening on (ws:\/\/.*)$/;
+
+type EventHandler = (...args: any[]) => void;
+const processListeners = new Map();
+const dispatchers = {
+ exit: (...args: any[]) => {
+ processListeners.get('exit')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGINT: (...args: any[]) => {
+ processListeners.get('SIGINT')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGHUP: (...args: any[]) => {
+ processListeners.get('SIGHUP')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+ SIGTERM: (...args: any[]) => {
+ processListeners.get('SIGTERM')?.forEach(handler => {
+ return handler(...args);
+ });
+ },
+};
+
+function subscribeToProcessEvent(
+ event: 'exit' | 'SIGINT' | 'SIGHUP' | 'SIGTERM',
+ handler: EventHandler
+): void {
+ const listeners = processListeners.get(event) || [];
+ if (listeners.length === 0) {
+ process.on(event, dispatchers[event]);
+ }
+ listeners.push(handler);
+ processListeners.set(event, listeners);
+}
+
+function unsubscribeFromProcessEvent(
+ event: 'exit' | 'SIGINT' | 'SIGHUP' | 'SIGTERM',
+ handler: EventHandler
+): void {
+ const listeners = processListeners.get(event) || [];
+ const existingListenerIdx = listeners.indexOf(handler);
+ if (existingListenerIdx === -1) {
+ return;
+ }
+ listeners.splice(existingListenerIdx, 1);
+ processListeners.set(event, listeners);
+ if (listeners.length === 0) {
+ process.off(event, dispatchers[event]);
+ }
+}
+
+/**
+ * @public
+ */
+export class Process {
+ #executablePath;
+ #args: string[];
+ #browserProcess: childProcess.ChildProcess;
+ #exited = false;
+ // The browser process can be closed externally or from the driver process. We
+ // need to invoke the hooks only once though but we don't know how many times
+ // we will be invoked.
+ #hooksRan = false;
+ #onExitHook = async () => {};
+ #browserProcessExiting: Promise;
+
+ constructor(opts: LaunchOptions) {
+ this.#executablePath = opts.executablePath;
+ this.#args = opts.args ?? [];
+
+ opts.pipe ??= false;
+ opts.dumpio ??= false;
+ opts.handleSIGINT ??= true;
+ opts.handleSIGTERM ??= true;
+ opts.handleSIGHUP ??= true;
+ // On non-windows platforms, `detached: true` makes child process a
+ // leader of a new process group, making it possible to kill child
+ // process tree with `.kill(-pid)` command. @see
+ // https://nodejs.org/api/child_process.html#child_process_options_detached
+ opts.detached ??= process.platform !== 'win32';
+
+ const stdio = this.#configureStdio({
+ pipe: opts.pipe,
+ dumpio: opts.dumpio,
+ });
+
+ const env = opts.env || {};
+
+ debugLaunch(`Launching ${this.#executablePath} ${this.#args.join(' ')}`, {
+ detached: opts.detached,
+ env: Object.keys(env).reduce>(
+ (res, key) => {
+ if (key.toLowerCase().startsWith('puppeteer_')) {
+ res[key] = env[key];
+ }
+ return res;
+ },
+ {}
+ ),
+ stdio,
+ });
+
+ this.#browserProcess = childProcess.spawn(
+ this.#executablePath,
+ this.#args,
+ {
+ detached: opts.detached,
+ env,
+ stdio,
+ }
+ );
+
+ debugLaunch(`Launched ${this.#browserProcess.pid}`);
+ if (opts.dumpio) {
+ this.#browserProcess.stderr?.pipe(process.stderr);
+ this.#browserProcess.stdout?.pipe(process.stdout);
+ }
+ subscribeToProcessEvent('exit', this.#onDriverProcessExit);
+ if (opts.handleSIGINT) {
+ subscribeToProcessEvent('SIGINT', this.#onDriverProcessSignal);
+ }
+ if (opts.handleSIGTERM) {
+ subscribeToProcessEvent('SIGTERM', this.#onDriverProcessSignal);
+ }
+ if (opts.handleSIGHUP) {
+ subscribeToProcessEvent('SIGHUP', this.#onDriverProcessSignal);
+ }
+ if (opts.onExit) {
+ this.#onExitHook = opts.onExit;
+ }
+ this.#browserProcessExiting = new Promise((resolve, reject) => {
+ this.#browserProcess.once('exit', async () => {
+ debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`);
+ this.#clearListeners();
+ this.#exited = true;
+ try {
+ await this.#runHooks();
+ } catch (err) {
+ reject(err);
+ return;
+ }
+ resolve();
+ });
+ });
+ }
+
+ async #runHooks() {
+ if (this.#hooksRan) {
+ return;
+ }
+ this.#hooksRan = true;
+ await this.#onExitHook();
+ }
+
+ get nodeProcess(): childProcess.ChildProcess {
+ return this.#browserProcess;
+ }
+
+ #configureStdio(opts: {
+ pipe: boolean;
+ dumpio: boolean;
+ }): Array<'ignore' | 'pipe'> {
+ if (opts.pipe) {
+ if (opts.dumpio) {
+ return ['ignore', 'pipe', 'pipe', 'pipe', 'pipe'];
+ } else {
+ return ['ignore', 'ignore', 'ignore', 'pipe', 'pipe'];
+ }
+ } else {
+ if (opts.dumpio) {
+ return ['pipe', 'pipe', 'pipe'];
+ } else {
+ return ['pipe', 'ignore', 'pipe'];
+ }
+ }
+ }
+
+ #clearListeners(): void {
+ unsubscribeFromProcessEvent('exit', this.#onDriverProcessExit);
+ unsubscribeFromProcessEvent('SIGINT', this.#onDriverProcessSignal);
+ unsubscribeFromProcessEvent('SIGTERM', this.#onDriverProcessSignal);
+ unsubscribeFromProcessEvent('SIGHUP', this.#onDriverProcessSignal);
+ }
+
+ #onDriverProcessExit = (_code: number) => {
+ this.kill();
+ };
+
+ #onDriverProcessSignal = (signal: string): void => {
+ switch (signal) {
+ case 'SIGINT':
+ this.kill();
+ process.exit(130);
+ case 'SIGTERM':
+ case 'SIGHUP':
+ void this.close();
+ break;
+ }
+ };
+
+ async close(): Promise {
+ await this.#runHooks();
+ if (!this.#exited) {
+ this.kill();
+ }
+ return await this.#browserProcessExiting;
+ }
+
+ hasClosed(): Promise {
+ return this.#browserProcessExiting;
+ }
+
+ kill(): void {
+ debugLaunch(`Trying to kill ${this.#browserProcess.pid}`);
+ // If the process failed to launch (for example if the browser executable path
+ // is invalid), then the process does not get a pid assigned. A call to
+ // `proc.kill` would error, as the `pid` to-be-killed can not be found.
+ if (
+ this.#browserProcess &&
+ this.#browserProcess.pid &&
+ pidExists(this.#browserProcess.pid)
+ ) {
+ try {
+ debugLaunch(`Browser process ${this.#browserProcess.pid} exists`);
+ if (process.platform === 'win32') {
+ try {
+ childProcess.execSync(
+ `taskkill /pid ${this.#browserProcess.pid} /T /F`
+ );
+ } catch (error) {
+ debugLaunch(
+ `Killing ${this.#browserProcess.pid} using taskkill failed`,
+ error
+ );
+ // taskkill can fail to kill the process e.g. due to missing permissions.
+ // Let's kill the process via Node API. This delays killing of all child
+ // processes of `this.proc` until the main Node.js process dies.
+ this.#browserProcess.kill();
+ }
+ } else {
+ // on linux the process group can be killed with the group id prefixed with
+ // a minus sign. The process group id is the group leader's pid.
+ const processGroupId = -this.#browserProcess.pid;
+
+ try {
+ process.kill(processGroupId, 'SIGKILL');
+ } catch (error) {
+ debugLaunch(
+ `Killing ${this.#browserProcess.pid} using process.kill failed`,
+ error
+ );
+ // Killing the process group can fail due e.g. to missing permissions.
+ // Let's kill the process via Node API. This delays killing of all child
+ // processes of `this.proc` until the main Node.js process dies.
+ this.#browserProcess.kill('SIGKILL');
+ }
+ }
+ } catch (error) {
+ throw new Error(
+ `${PROCESS_ERROR_EXPLANATION}\nError cause: ${
+ isErrorLike(error) ? error.stack : error
+ }`
+ );
+ }
+ }
+ this.#clearListeners();
+ }
+
+ waitForLineOutput(regex: RegExp, timeout = 0): Promise {
+ if (!this.#browserProcess.stderr) {
+ throw new Error('`browserProcess` does not have stderr.');
+ }
+ const rl = readline.createInterface(this.#browserProcess.stderr);
+ let stderr = '';
+
+ return new Promise((resolve, reject) => {
+ rl.on('line', onLine);
+ rl.on('close', onClose);
+ this.#browserProcess.on('exit', onClose);
+ this.#browserProcess.on('error', onClose);
+ const timeoutId =
+ timeout > 0 ? setTimeout(onTimeout, timeout) : undefined;
+
+ const cleanup = (): void => {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ rl.off('line', onLine);
+ rl.off('close', onClose);
+ this.#browserProcess.off('exit', onClose);
+ this.#browserProcess.off('error', onClose);
+ };
+
+ function onClose(error?: Error): void {
+ cleanup();
+ reject(
+ new Error(
+ [
+ `Failed to launch the browser process!${
+ error ? ' ' + error.message : ''
+ }`,
+ stderr,
+ '',
+ 'TROUBLESHOOTING: https://pptr.dev/troubleshooting',
+ '',
+ ].join('\n')
+ )
+ );
+ }
+
+ function onTimeout(): void {
+ cleanup();
+ reject(
+ new TimeoutError(
+ `Timed out after ${timeout} ms while waiting for the WS endpoint URL to appear in stdout!`
+ )
+ );
+ }
+
+ function onLine(line: string): void {
+ stderr += line + '\n';
+ const match = line.match(regex);
+ if (!match) {
+ return;
+ }
+ cleanup();
+ // The RegExp matches, so this will obviously exist.
+ resolve(match[1]!);
+ }
+ });
+ }
+}
+
+const PROCESS_ERROR_EXPLANATION = `Puppeteer was unable to kill the process which ran the browser binary.
+This means that, on future Puppeteer launches, Puppeteer might not be able to launch the browser.
+Please check your open processes and ensure that the browser processes that Puppeteer launched have been killed.
+If you think this is a bug, please report it on the Puppeteer issue tracker.`;
+
+/**
+ * @internal
+ */
+function pidExists(pid: number): boolean {
+ try {
+ return process.kill(pid, 0);
+ } catch (error) {
+ if (isErrnoException(error)) {
+ if (error.code && error.code === 'ESRCH') {
+ return false;
+ }
+ }
+ throw error;
+ }
+}
+
+/**
+ * @internal
+ */
+export interface ErrorLike extends Error {
+ name: string;
+ message: string;
+}
+
+/**
+ * @internal
+ */
+export function isErrorLike(obj: unknown): obj is ErrorLike {
+ return (
+ typeof obj === 'object' && obj !== null && 'name' in obj && 'message' in obj
+ );
+}
+/**
+ * @internal
+ */
+export function isErrnoException(obj: unknown): obj is NodeJS.ErrnoException {
+ return (
+ isErrorLike(obj) &&
+ ('errno' in obj || 'code' in obj || 'path' in obj || 'syscall' in obj)
+ );
+}
+
+/**
+ * @public
+ */
+export class TimeoutError extends Error {
+ /**
+ * @internal
+ */
+ constructor(message?: string) {
+ super(message);
+ this.name = this.constructor.name;
+ Error.captureStackTrace(this, this.constructor);
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/src/main-cli.ts b/node_modules/@puppeteer/browsers/src/main-cli.ts
new file mode 100644
index 00000000..9919a4df
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/main-cli.ts
@@ -0,0 +1,11 @@
+#!/usr/bin/env node
+
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+import {CLI} from './CLI.js';
+
+void new CLI().run(process.argv);
diff --git a/node_modules/@puppeteer/browsers/src/main.ts b/node_modules/@puppeteer/browsers/src/main.ts
new file mode 100644
index 00000000..c03c0c00
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/main.ts
@@ -0,0 +1,43 @@
+/**
+ * @license
+ * Copyright 2023 Google Inc.
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+export type {
+ LaunchOptions,
+ ComputeExecutablePathOptions as Options,
+ SystemOptions,
+} from './launch.js';
+export {
+ launch,
+ computeExecutablePath,
+ computeSystemExecutablePath,
+ TimeoutError,
+ CDP_WEBSOCKET_ENDPOINT_REGEX,
+ WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX,
+ Process,
+} from './launch.js';
+export type {
+ InstallOptions,
+ GetInstalledBrowsersOptions,
+ UninstallOptions,
+} from './install.js';
+export {
+ install,
+ getInstalledBrowsers,
+ canDownload,
+ uninstall,
+} from './install.js';
+export {detectBrowserPlatform} from './detectPlatform.js';
+export type {ProfileOptions} from './browser-data/browser-data.js';
+export {
+ resolveBuildId,
+ Browser,
+ BrowserPlatform,
+ ChromeReleaseChannel,
+ createProfile,
+ getVersionComparator,
+} from './browser-data/browser-data.js';
+export {CLI, makeProgressCallback} from './CLI.js';
+export {Cache, InstalledBrowser} from './Cache.js';
diff --git a/node_modules/@puppeteer/browsers/src/tsconfig.cjs.json b/node_modules/@puppeteer/browsers/src/tsconfig.cjs.json
new file mode 100644
index 00000000..acb19688
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/tsconfig.cjs.json
@@ -0,0 +1,8 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "outDir": "../lib/cjs"
+ }
+}
diff --git a/node_modules/@puppeteer/browsers/src/tsconfig.esm.json b/node_modules/@puppeteer/browsers/src/tsconfig.esm.json
new file mode 100644
index 00000000..a824bc8c
--- /dev/null
+++ b/node_modules/@puppeteer/browsers/src/tsconfig.esm.json
@@ -0,0 +1,6 @@
+{
+ "extends": "../../../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "../lib/esm"
+ }
+}
diff --git a/node_modules/@tootallnate/quickjs-emscripten/LICENSE b/node_modules/@tootallnate/quickjs-emscripten/LICENSE
new file mode 100644
index 00000000..07499f66
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+quickjs-emscripten copyright (c) 2019 Jake Teton-Landis
+
+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/@tootallnate/quickjs-emscripten/README.md b/node_modules/@tootallnate/quickjs-emscripten/README.md
new file mode 100644
index 00000000..70658a55
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/README.md
@@ -0,0 +1,597 @@
+# quickjs-emscripten
+
+Javascript/Typescript bindings for QuickJS, a modern Javascript interpreter,
+compiled to WebAssembly.
+
+- Safely evaluate untrusted Javascript (up to ES2020).
+- Create and manipulate values inside the QuickJS runtime ([more][values]).
+- Expose host functions to the QuickJS runtime ([more][functions]).
+- Execute synchronous code that uses asynchronous functions, with [asyncify][asyncify].
+
+[Github] | [NPM] | [API Documentation][api] | [Examples][tests]
+
+```typescript
+import { getQuickJS } from "quickjs-emscripten"
+
+async function main() {
+ const QuickJS = await getQuickJS()
+ const vm = QuickJS.newContext()
+
+ const world = vm.newString("world")
+ vm.setProp(vm.global, "NAME", world)
+ world.dispose()
+
+ const result = vm.evalCode(`"Hello " + NAME + "!"`)
+ if (result.error) {
+ console.log("Execution failed:", vm.dump(result.error))
+ result.error.dispose()
+ } else {
+ console.log("Success:", vm.dump(result.value))
+ result.value.dispose()
+ }
+
+ vm.dispose()
+}
+
+main()
+```
+
+[github]: https://github.com/justjake/quickjs-emscripten
+[npm]: https://www.npmjs.com/package/quickjs-emscripten
+[api]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md
+[tests]: https://github.com/justjake/quickjs-emscripten/blob/main/ts/quickjs.test.ts
+[values]: #interfacing-with-the-interpreter
+[asyncify]: #asyncify
+[functions]: #exposing-apis
+
+## Usage
+
+Install from `npm`: `npm install --save quickjs-emscripten` or `yarn add quickjs-emscripten`.
+
+The root entrypoint of this library is the `getQuickJS` function, which returns
+a promise that resolves to a [QuickJS singleton](./doc/classes/quickjs.md) when
+the QuickJS WASM module is ready.
+
+Once `getQuickJS` has been awaited at least once, you also can use the `getQuickJSSync`
+function to directly access the singleton engine in your synchronous code.
+
+### Safely evaluate Javascript code
+
+See [QuickJS.evalCode](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/quickjs.md#evalcode)
+
+```typescript
+import { getQuickJS, shouldInterruptAfterDeadline } from "quickjs-emscripten"
+
+getQuickJS().then((QuickJS) => {
+ const result = QuickJS.evalCode("1 + 1", {
+ shouldInterrupt: shouldInterruptAfterDeadline(Date.now() + 1000),
+ memoryLimitBytes: 1024 * 1024,
+ })
+ console.log(result)
+})
+```
+
+### Interfacing with the interpreter
+
+You can use [QuickJSContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/QuickJSContext.md)
+to build a scripting environment by modifying globals and exposing functions
+into the QuickJS interpreter.
+
+Each `QuickJSContext` instance has its own environment -- globals, built-in
+classes -- and actions from one context won't leak into other contexts or
+runtimes (with one exception, see [Asyncify][asyncify]).
+
+Every context is created inside a
+[QuickJSRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/QuickJSRuntime.md).
+A runtime represents a Javascript heap, and you can even share values between
+contexts in the same runtime.
+
+```typescript
+const vm = QuickJS.newContext()
+let state = 0
+
+const fnHandle = vm.newFunction("nextId", () => {
+ return vm.newNumber(++state)
+})
+
+vm.setProp(vm.global, "nextId", fnHandle)
+fnHandle.dispose()
+
+const nextId = vm.unwrapResult(vm.evalCode(`nextId(); nextId(); nextId()`))
+console.log("vm result:", vm.getNumber(nextId), "native state:", state)
+
+nextId.dispose()
+vm.dispose()
+```
+
+When you create a context from a top-level API like in the example above,
+instead of by calling `runtime.newContext()`, a runtime is automatically created
+for the lifetime of the context, and disposed of when you dispose the context.
+
+#### Runtime
+
+The runtime has APIs for CPU and memory limits that apply to all contexts within
+the runtime in aggregate. You can also use the runtime to configure EcmaScript
+module loading.
+
+```typescript
+const runtime = QuickJS.newRuntime()
+// "Should be enough for everyone" -- attributed to B. Gates
+runtime.setMemoryLimit(1024 * 640)
+// Limit stack size
+runtime.setMaxStackSize(1024 * 320)
+// Interrupt computation after 1024 calls to the interrupt handler
+let interruptCycles = 0
+runtime.setInterruptHandler(() => ++interruptCycles > 1024)
+// Toy module system that always returns the module name
+// as the default export
+runtime.setModuleLoader((moduleName) => `export default '${moduleName}'`)
+const context = runtime.newContext()
+const ok = context.evalCode(`
+import fooName from './foo.js'
+globalThis.result = fooName
+`)
+context.unwrapResult(ok).dispose()
+// logs "foo.js"
+console.log(context.getProp(context.global, "result").consume(context.dump))
+context.dispose()
+runtime.dispose()
+```
+
+### Memory Management
+
+Many methods in this library return handles to memory allocated inside the
+WebAssembly heap. These types cannot be garbage-collected as usual in
+Javascript. Instead, you must manually manage their memory by calling a
+`.dispose()` method to free the underlying resources. Once a handle has been
+disposed, it cannot be used anymore. Note that in the example above, we call
+`.dispose()` on each handle once it is no longer needed.
+
+Calling `QuickJSContext.dispose()` will throw a RuntimeError if you've forgotten to
+dispose any handles associated with that VM, so it's good practice to create a
+new VM instance for each of your tests, and to call `vm.dispose()` at the end
+of every test.
+
+```typescript
+const vm = QuickJS.newContext()
+const numberHandle = vm.newNumber(42)
+// Note: numberHandle not disposed, so it leaks memory.
+vm.dispose()
+// throws RuntimeError: abort(Assertion failed: list_empty(&rt->gc_obj_list), at: quickjs/quickjs.c,1963,JS_FreeRuntime)
+```
+
+Here are some strategies to reduce the toil of calling `.dispose()` on each
+handle you create:
+
+#### Scope
+
+A
+[`Scope`](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/scope.md#class-scope)
+instance manages a set of disposables and calls their `.dispose()`
+method in the reverse order in which they're added to the scope. Here's the
+"Interfacing with the interpreter" example re-written using `Scope`:
+
+```typescript
+Scope.withScope((scope) => {
+ const vm = scope.manage(QuickJS.newContext())
+ let state = 0
+
+ const fnHandle = scope.manage(
+ vm.newFunction("nextId", () => {
+ return vm.newNumber(++state)
+ })
+ )
+
+ vm.setProp(vm.global, "nextId", fnHandle)
+
+ const nextId = scope.manage(vm.unwrapResult(vm.evalCode(`nextId(); nextId(); nextId()`)))
+ console.log("vm result:", vm.getNumber(nextId), "native state:", state)
+
+ // When the withScope block exits, it calls scope.dispose(), which in turn calls
+ // the .dispose() methods of all the disposables managed by the scope.
+})
+```
+
+You can also create `Scope` instances with `new Scope()` if you want to manage
+calling `scope.dispose()` yourself.
+
+#### `Lifetime.consume(fn)`
+
+[`Lifetime.consume`](https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/lifetime.md#consume)
+is sugar for the common pattern of using a handle and then
+immediately disposing of it. `Lifetime.consume` takes a `map` function that
+produces a result of any type. The `map` fuction is called with the handle,
+then the handle is disposed, then the result is returned.
+
+Here's the "Interfacing with interpreter" example re-written using `.consume()`:
+
+```typescript
+const vm = QuickJS.newContext()
+let state = 0
+
+vm.newFunction("nextId", () => {
+ return vm.newNumber(++state)
+}).consume((fnHandle) => vm.setProp(vm.global, "nextId", fnHandle))
+
+vm.unwrapResult(vm.evalCode(`nextId(); nextId(); nextId()`)).consume((nextId) =>
+ console.log("vm result:", vm.getNumber(nextId), "native state:", state)
+)
+
+vm.dispose()
+```
+
+Generally working with `Scope` leads to more straight-forward code, but
+`Lifetime.consume` can be handy sugar as part of a method call chain.
+
+### Exposing APIs
+
+To add APIs inside the QuickJS environment, you'll need to create objects to
+define the shape of your API, and add properties and functions to those objects
+to allow code inside QuickJS to call code on the host.
+
+By default, no host functionality is exposed to code running inside QuickJS.
+
+```typescript
+const vm = QuickJS.newContext()
+// `console.log`
+const logHandle = vm.newFunction("log", (...args) => {
+ const nativeArgs = args.map(vm.dump)
+ console.log("QuickJS:", ...nativeArgs)
+})
+// Partially implement `console` object
+const consoleHandle = vm.newObject()
+vm.setProp(consoleHandle, "log", logHandle)
+vm.setProp(vm.global, "console", consoleHandle)
+consoleHandle.dispose()
+logHandle.dispose()
+
+vm.unwrapResult(vm.evalCode(`console.log("Hello from QuickJS!")`)).dispose()
+```
+
+#### Promises
+
+To expose an asynchronous function that _returns a promise_ to callers within
+QuickJS, your function can return the handle of a `QuickJSDeferredPromise`
+created via `context.newPromise()`.
+
+When you resolve a `QuickJSDeferredPromise` -- and generally whenever async
+behavior completes for the VM -- pending listeners inside QuickJS may not
+execute immediately. Your code needs to explicitly call
+`runtime.executePendingJobs()` to resume execution inside QuickJS. This API
+gives your code maximum control to _schedule_ when QuickJS will block the host's
+event loop by resuming execution.
+
+To work with QuickJS handles that contain a promise inside the environment, you
+can convert the QuickJSHandle into a native promise using
+`context.resolvePromise()`. Take care with this API to avoid 'deadlocks' where
+the host awaits a guest promise, but the guest cannot make progress until the
+host calls `runtime.executePendingJobs()`. The simplest way to avoid this kind
+of deadlock is to always schedule `executePendingJobs` after any promise is
+settled.
+
+```typescript
+const vm = QuickJS.newContext()
+const fakeFileSystem = new Map([["example.txt", "Example file content"]])
+
+// Function that simulates reading data asynchronously
+const readFileHandle = vm.newFunction("readFile", (pathHandle) => {
+ const path = vm.getString(pathHandle)
+ const promise = vm.newPromise()
+ setTimeout(() => {
+ const content = fakeFileSystem.get(path)
+ promise.resolve(vm.newString(content || ""))
+ }, 100)
+ // IMPORTANT: Once you resolve an async action inside QuickJS,
+ // call runtime.executePendingJobs() to run any code that was
+ // waiting on the promise or callback.
+ promise.settled.then(vm.runtime.executePendingJobs)
+ return promise.handle
+})
+readFileHandle.consume((handle) => vm.setProp(vm.global, "readFile", handle))
+
+// Evaluate code that uses `readFile`, which returns a promise
+const result = vm.evalCode(`(async () => {
+ const content = await readFile('example.txt')
+ return content.toUpperCase()
+})()`)
+const promiseHandle = vm.unwrapResult(result)
+
+// Convert the promise handle into a native promise and await it.
+// If code like this deadlocks, make sure you are calling
+// runtime.executePendingJobs appropriately.
+const resolvedResult = await vm.resolvePromise(promiseHandle)
+promiseHandle.dispose()
+const resolvedHandle = vm.unwrapResult(resolvedResult)
+console.log("Result:", vm.getString(resolvedHandle))
+resolvedHandle.dispose()
+```
+
+#### Asyncify
+
+Sometimes, we want to create a function that's synchronous from the perspective
+of QuickJS, but prefer to implement that function _asynchronously_ in your host
+code. The most obvious use-case is for EcmaScript module loading. The underlying
+QuickJS C library expects the module loader function to return synchronously,
+but loading data synchronously in the browser or server is somewhere between "a
+bad idea" and "impossible". QuickJS also doesn't expose an API to "pause" the
+execution of a runtime, and adding such an API is tricky due to the VM's
+implementation.
+
+As a work-around, we provide an alternate build of QuickJS processed by
+Emscripten/Binaryen's [ASYNCIFY](https://emscripten.org/docs/porting/asyncify.html)
+compiler transform. Here's how Emscripten's documentation describes Asyncify:
+
+> Asyncify lets synchronous C or C++ code interact with asynchronous \[host] JavaScript. This allows things like:
+>
+> - A synchronous call in C that yields to the event loop, which allows browser events to be handled.
+>
+> - A synchronous call in C that waits for an asynchronous operation in \[host] JS to complete.
+>
+> Asyncify automatically transforms ... code into a form that can be paused and
+> resumed ..., so that it is asynchronous (hence the name “Asyncify”) even though
+> \[it is written] in a normal synchronous way.
+
+This means we can suspend an _entire WebAssembly module_ (which could contain
+multiple runtimes and contexts) while our host Javascript loads data
+asynchronously, and then resume execution once the data load completes. This is
+a very handy superpower, but it comes with a couple of major limitations:
+
+1. _An asyncified WebAssembly module can only suspend to wait for a single
+ asynchronous call at a time_. You may call back into a suspended WebAssembly
+ module eg. to create a QuickJS value to return a result, but the system will
+ crash if this call tries to suspend again. Take a look at Emscripten's documentation
+ on [reentrancy](https://emscripten.org/docs/porting/asyncify.html#reentrancy).
+
+2. _Asyncified code is bigger and runs slower_. The asyncified build of
+ Quickjs-emscripten library is 1M, 2x larger than the 500K of the default
+ version. There may be room for further
+ [optimization](https://emscripten.org/docs/porting/asyncify.html#optimizing)
+ Of our build in the future.
+
+To use asyncify features, use the following functions:
+
+- [newAsyncRuntime][]: create a runtime inside a new WebAssembly module.
+- [newAsyncContext][]: create runtime and context together inside a new
+ WebAssembly module.
+- [newQuickJSAsyncWASMModule][]: create an empty WebAssembly module.
+
+[newasyncruntime]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newasyncruntime
+[newasynccontext]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newasynccontext
+[newquickjsasyncwasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#newquickjsasyncwasmmodule
+
+These functions are asynchronous because they always create a new underlying
+WebAssembly module so that each instance can suspend and resume independently,
+and instantiating a WebAssembly module is an async operation. This also adds
+substantial overhead compared to creating a runtime or context inside an
+existing module; if you only need to wait for a single async action at a time,
+you can create a single top-level module and create runtimes or contexts inside
+of it.
+
+##### Async module loader
+
+Here's an example of valuating a script that loads React asynchronously as an ES
+module. In our example, we're loading from the filesystem for reproducibility,
+but you can use this technique to load using `fetch`.
+
+```typescript
+const module = await newQuickJSAsyncWASMModule()
+const runtime = module.newRuntime()
+const path = await import("path")
+const { promises: fs } = await import("fs")
+
+const importsPath = path.join(__dirname, "../examples/imports") + "/"
+// Module loaders can return promises.
+// Execution will suspend until the promise resolves.
+runtime.setModuleLoader((moduleName) => {
+ const modulePath = path.join(importsPath, moduleName)
+ if (!modulePath.startsWith(importsPath)) {
+ throw new Error("out of bounds")
+ }
+ console.log("loading", moduleName, "from", modulePath)
+ return fs.readFile(modulePath, "utf-8")
+})
+
+// evalCodeAsync is required when execution may suspend.
+const context = runtime.newContext()
+const result = await context.evalCodeAsync(`
+import * as React from 'esm.sh/react@17'
+import * as ReactDOMServer from 'esm.sh/react-dom@17/server'
+const e = React.createElement
+globalThis.html = ReactDOMServer.renderToStaticMarkup(
+ e('div', null, e('strong', null, 'Hello world!'))
+)
+`)
+context.unwrapResult(result).dispose()
+const html = context.getProp(context.global, "html").consume(context.getString)
+console.log(html) // Hello world!
+```
+
+##### Async on host, sync in QuickJS
+
+Here's an example of turning an async function into a sync function inside the
+VM.
+
+```typescript
+const context = await newAsyncContext()
+const path = await import("path")
+const { promises: fs } = await import("fs")
+
+const importsPath = path.join(__dirname, "../examples/imports") + "/"
+const readFileHandle = context.newAsyncifiedFunction("readFile", async (pathHandle) => {
+ const pathString = path.join(importsPath, context.getString(pathHandle))
+ if (!pathString.startsWith(importsPath)) {
+ throw new Error("out of bounds")
+ }
+ const data = await fs.readFile(pathString, "utf-8")
+ return context.newString(data)
+})
+readFileHandle.consume((fn) => context.setProp(context.global, "readFile", fn))
+
+// evalCodeAsync is required when execution may suspend.
+const result = await context.evalCodeAsync(`
+// Not a promise! Sync! vvvvvvvvvvvvvvvvvvvv
+const data = JSON.parse(readFile('data.json'))
+data.map(x => x.toUpperCase()).join(' ')
+`)
+const upperCaseData = context.unwrapResult(result).consume(context.getString)
+console.log(upperCaseData) // 'VERY USEFUL DATA'
+```
+
+### Testing your code
+
+This library is complicated to use, so please consider automated testing your
+implementation. We highly writing your test suite to run with both the "release"
+build variant of quickjs-emscripten, and also the [DEBUG_SYNC] build variant.
+The debug sync build variant has extra instrumentation code for detecting memory
+leaks.
+
+The class [TestQuickJSWASMModule] exposes the memory leak detection API, although
+this API is only accurate when using `DEBUG_SYNC` variant.
+
+```typescript
+// Define your test suite in a function, so that you can test against
+// different module loaders.
+function myTests(moduleLoader: () => Promise) {
+ let QuickJS: TestQuickJSWASMModule
+ beforeEach(async () => {
+ // Get a unique TestQuickJSWASMModule instance for each test.
+ const wasmModule = await moduleLoader()
+ QuickJS = new TestQuickJSWASMModule(wasmModule)
+ })
+ afterEach(() => {
+ // Assert that the test disposed all handles. The DEBUG_SYNC build
+ // variant will show detailed traces for each leak.
+ QuickJS.assertNoMemoryAllocated()
+ })
+
+ it("works well", () => {
+ // TODO: write a test using QuickJS
+ const context = QuickJS.newContext()
+ context.unwrapResult(context.evalCode("1 + 1")).dispose()
+ context.dispose()
+ })
+}
+
+// Run the test suite against a matrix of module loaders.
+describe("Check for memory leaks with QuickJS DEBUG build", () => {
+ const moduleLoader = memoizePromiseFactory(() => newQuickJSWASMModule(DEBUG_SYNC))
+ myTests(moduleLoader)
+})
+
+describe("Realistic test with QuickJS RELEASE build", () => {
+ myTests(getQuickJS)
+})
+```
+
+For more testing examples, please explore the typescript source of [quickjs-emscripten][ts] repository.
+
+[ts]: https://github.com/justjake/quickjs-emscripten/blob/main/ts
+[debug_sync]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/modules.md#debug_sync
+[testquickjswasmmodule]: https://github.com/justjake/quickjs-emscripten/blob/main/doc/classes/TestQuickJSWASMModule.md
+
+### Debugging
+
+- Switch to a DEBUG build variant of the WebAssembly module to see debug log messages from the C part of this library.
+- Set `process.env.QTS_DEBUG` to see debug log messages from the Javascript part of this library.
+
+### More Documentation
+
+[Github] | [NPM] | [API Documentation][api] | [Examples][tests]
+
+## Background
+
+This was inspired by seeing https://github.com/maple3142/duktape-eval
+[on Hacker News](https://news.ycombinator.com/item?id=21946565) and Figma's
+blogposts about using building a Javascript plugin runtime:
+
+- [How Figma built the Figma plugin system](https://www.figma.com/blog/how-we-built-the-figma-plugin-system/): Describes the LowLevelJavascriptVm interface.
+- [An update on plugin security](https://www.figma.com/blog/an-update-on-plugin-security/): Figma switches to QuickJS.
+
+## Status & Roadmap
+
+**Stability**: Because the version number of this project is below `1.0.0`,
+\*expect occasional breaking API changes.
+
+**Security**: This project makes every effort to be secure, but has not been
+audited. Please use with care in production settings.
+
+**Roadmap**: I work on this project in my free time, for fun. Here's I'm
+thinking comes next. Last updated 2022-03-18.
+
+1. Further work on module loading APIs:
+
+ - Create modules via Javascript, instead of source text.
+ - Scan source text for imports, for ahead of time or concurrent loading.
+ (This is possible with third-party tools, so lower priority.)
+
+2. Higher-level tools for reading QuickJS values:
+
+ - Type guard functions: `context.isArray(handle)`, `context.isPromise(handle)`, etc.
+ - Iteration utilities: `context.getIterable(handle)`, `context.iterateObjectEntries(handle)`.
+ This better supports user-level code to deserialize complex handle objects.
+
+3. Higher-level tools for creating QuickJS values:
+
+ - Devise a way to avoid needing to mess around with handles when setting up
+ the environment.
+ - Consider integrating
+ [quickjs-emscripten-sync](https://github.com/reearth/quickjs-emscripten-sync)
+ for automatic translation.
+ - Consider class-based or interface-type-based marshalling.
+
+4. EcmaScript Modules / WebAssembly files / Deno support. This requires me to
+ learn a lot of new things, but should be interesting for modern browser usage.
+
+5. SQLite integration.
+
+## Related
+
+- Duktape wrapped in Wasm: https://github.com/maple3142/duktape-eval/blob/main/src/Makefile
+- QuickJS wrapped in C++: https://github.com/ftk/quickjspp
+
+## Developing
+
+This library is implemented in two languages: C (compiled to WASM with
+Emscripten), and Typescript.
+
+### The C parts
+
+The ./c directory contains C code that wraps the QuickJS C library (in ./quickjs).
+Public functions (those starting with `QTS_`) in ./c/interface.c are
+automatically exported to native code (via a generated header) and to
+Typescript (via a generated FFI class). See ./generate.ts for how this works.
+
+The C code builds as both with `emscripten` (using `emcc`), to produce WASM (or
+ASM.js) and with `clang`. Build outputs are checked in, so you can iterate on
+the Javascript parts of the library without setting up the Emscripten toolchain.
+
+Intermediate object files from QuickJS end up in ./build/quickjs/.
+
+This project uses `emscripten 3.1.32`.
+
+- On ARM64, you should install `emscripten` on your machine. For example on macOS, `brew install emscripten`.
+- If _the correct version of emcc_ is not in your PATH, compilation falls back to using Docker.
+ On ARM64, this is 10-50x slower than native compilation, but it's just fine on x64.
+
+Related NPM scripts:
+
+- `yarn update-quickjs` will sync the ./quickjs folder with a
+ github repo tracking the upstream QuickJS.
+- `yarn make-debug` will rebuild C outputs into ./build/wrapper
+- `yarn make-release` will rebuild C outputs in release mode, which is the mode
+ that should be checked into the repo.
+
+### The Typescript parts
+
+The ./ts directory contains Typescript types and wraps the generated Emscripten
+FFI in a more usable interface.
+
+You'll need `node` and `yarn`. Install dependencies with `yarn install`.
+
+- `yarn build` produces ./dist.
+- `yarn test` runs the tests.
+- `yarn test --watch` watches for changes and re-runs the tests.
+
+### Yarn updates
+
+Just run `yarn set version from sources` to upgrade the Yarn release.
diff --git a/node_modules/@tootallnate/quickjs-emscripten/c/interface.c b/node_modules/@tootallnate/quickjs-emscripten/c/interface.c
new file mode 100644
index 00000000..0126cff2
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/c/interface.c
@@ -0,0 +1,819 @@
+/**
+ * interface.c
+ *
+ * We primarily use JSValue* (pointer to JSValue) when communicating with the
+ * host javascript environment, because pointers are trivial to use for calls
+ * into emscripten because they're just a number!
+ *
+ * As with the quickjs.h API, a JSValueConst* value is "borrowed" and should
+ * not be freed. A JSValue* is "owned" and should be freed by the owner.
+ *
+ * Functions starting with "QTS_" are exported by generate.ts to:
+ * - interface.h for native C code.
+ * - ffi.ts for emscripten.
+ *
+ * We support building the following build outputs:
+ *
+ * ## 1. Native machine code
+ * For internal development testing purposes.
+ *
+ * ## 2. WASM via Emscripten
+ * For general production use.
+ *
+ * ## 3. Experimental: Asyncified WASM via Emscripten with -s ASYNCIFY=1.
+ * This variant supports treating async host Javascript calls as synchronous
+ * from the perspective of the WASM c code.
+ *
+ * The way this works is described here:
+ * https://emscripten.org/docs/porting/asyncify.html
+ *
+ * In this variant, any call into our C code could return a promise if it ended
+ * up suspended. We mark the methods we suspect might suspend due to users' code
+ * as returning MaybeAsync(T). This information is ignored for the regular
+ * build.
+ */
+
+#ifdef __EMSCRIPTEN__
+#include
+#endif
+
+#include // For NAN
+#include
+#include
+#include
+#ifdef QTS_SANITIZE_LEAK
+#include
+#endif
+
+#include "../quickjs/cutils.h"
+#include "../quickjs/quickjs-libc.h"
+#include "../quickjs/quickjs.h"
+
+#define PKG "quickjs-emscripten: "
+
+#ifdef QTS_DEBUG_MODE
+#define QTS_DEBUG(msg) qts_log(msg);
+#define QTS_DUMP(value) qts_dump(ctx, value);
+#else
+#define QTS_DEBUG(msg) ;
+#define QTS_DUMP(value) ;
+#endif
+
+/**
+ * Signal to our FFI code generator that this string argument should be passed as a pointer
+ * allocated by the caller on the heap, not a JS string on the stack.
+ * https://github.com/emscripten-core/emscripten/issues/6860#issuecomment-405818401
+ */
+#define BorrowedHeapChar const char
+#define OwnedHeapChar char
+#define JSBorrowedChar const char
+
+/**
+ * Signal to our FFI code generator that this function should be called
+ * asynchronously when compiled with ASYNCIFY.
+ */
+#define MaybeAsync(T) T
+
+/**
+ * Signal to our FFI code generator that this function is only available in
+ * ASYNCIFY builds.
+ */
+#define AsyncifyOnly(T) T
+
+#define JSVoid void
+
+#define EvalFlags int
+#define EvalDetectModule int
+
+void qts_log(char *msg) {
+ fputs(PKG, stderr);
+ fputs(msg, stderr);
+ fputs("\n", stderr);
+}
+
+void qts_dump(JSContext *ctx, JSValueConst value) {
+ const char *str = JS_ToCString(ctx, value);
+ if (!str) {
+ QTS_DEBUG("QTS_DUMP: can't dump");
+ return;
+ }
+ fputs(str, stderr);
+ JS_FreeCString(ctx, str);
+ putchar('\n');
+}
+
+void copy_prop_if_needed(JSContext *ctx, JSValueConst dest, JSValueConst src, const char *prop_name) {
+ JSAtom prop_atom = JS_NewAtom(ctx, prop_name);
+ JSValue dest_prop = JS_GetProperty(ctx, dest, prop_atom);
+ if (JS_IsUndefined(dest_prop)) {
+ JSValue src_prop = JS_GetProperty(ctx, src, prop_atom);
+ if (!JS_IsUndefined(src_prop) && !JS_IsException(src_prop)) {
+ JS_SetProperty(ctx, dest, prop_atom, src_prop);
+ }
+ } else {
+ JS_FreeValue(ctx, dest_prop);
+ }
+ JS_FreeAtom(ctx, prop_atom);
+}
+
+JSValue *jsvalue_to_heap(JSValueConst value) {
+ JSValue *result = malloc(sizeof(JSValue));
+ if (result) {
+ // Could be better optimized, but at -0z / -ftlo, it
+ // appears to produce the same binary code as a memcpy.
+ *result = value;
+ }
+ return result;
+}
+
+JSValue *QTS_Throw(JSContext *ctx, JSValueConst *error) {
+ JSValue copy = JS_DupValue(ctx, *error);
+ return jsvalue_to_heap(JS_Throw(ctx, copy));
+}
+
+JSValue *QTS_NewError(JSContext *ctx) {
+ return jsvalue_to_heap(JS_NewError(ctx));
+}
+
+/**
+ * Limits.
+ */
+
+/**
+ * Memory limit. Set to -1 to disable.
+ */
+void QTS_RuntimeSetMemoryLimit(JSRuntime *rt, size_t limit) {
+ JS_SetMemoryLimit(rt, limit);
+}
+
+/**
+ * Memory diagnostics
+ */
+
+JSValue *QTS_RuntimeComputeMemoryUsage(JSRuntime *rt, JSContext *ctx) {
+ JSMemoryUsage s;
+ JS_ComputeMemoryUsage(rt, &s);
+
+ // Note that we're going to allocate more memory just to report the memory usage.
+ // A more sound approach would be to bind JSMemoryUsage struct directly - but that's
+ // a lot of work. This should be okay in the mean time.
+ JSValue result = JS_NewObject(ctx);
+
+ // Manually generated via editor-fu from JSMemoryUsage struct definition in quickjs.h
+ JS_SetPropertyStr(ctx, result, "malloc_limit", JS_NewInt64(ctx, s.malloc_limit));
+ JS_SetPropertyStr(ctx, result, "memory_used_size", JS_NewInt64(ctx, s.memory_used_size));
+ JS_SetPropertyStr(ctx, result, "malloc_count", JS_NewInt64(ctx, s.malloc_count));
+ JS_SetPropertyStr(ctx, result, "memory_used_count", JS_NewInt64(ctx, s.memory_used_count));
+ JS_SetPropertyStr(ctx, result, "atom_count", JS_NewInt64(ctx, s.atom_count));
+ JS_SetPropertyStr(ctx, result, "atom_size", JS_NewInt64(ctx, s.atom_size));
+ JS_SetPropertyStr(ctx, result, "str_count", JS_NewInt64(ctx, s.str_count));
+ JS_SetPropertyStr(ctx, result, "str_size", JS_NewInt64(ctx, s.str_size));
+ JS_SetPropertyStr(ctx, result, "obj_count", JS_NewInt64(ctx, s.obj_count));
+ JS_SetPropertyStr(ctx, result, "obj_size", JS_NewInt64(ctx, s.obj_size));
+ JS_SetPropertyStr(ctx, result, "prop_count", JS_NewInt64(ctx, s.prop_count));
+ JS_SetPropertyStr(ctx, result, "prop_size", JS_NewInt64(ctx, s.prop_size));
+ JS_SetPropertyStr(ctx, result, "shape_count", JS_NewInt64(ctx, s.shape_count));
+ JS_SetPropertyStr(ctx, result, "shape_size", JS_NewInt64(ctx, s.shape_size));
+ JS_SetPropertyStr(ctx, result, "js_func_count", JS_NewInt64(ctx, s.js_func_count));
+ JS_SetPropertyStr(ctx, result, "js_func_size", JS_NewInt64(ctx, s.js_func_size));
+ JS_SetPropertyStr(ctx, result, "js_func_code_size", JS_NewInt64(ctx, s.js_func_code_size));
+ JS_SetPropertyStr(ctx, result, "js_func_pc2line_count", JS_NewInt64(ctx, s.js_func_pc2line_count));
+ JS_SetPropertyStr(ctx, result, "js_func_pc2line_size", JS_NewInt64(ctx, s.js_func_pc2line_size));
+ JS_SetPropertyStr(ctx, result, "c_func_count", JS_NewInt64(ctx, s.c_func_count));
+ JS_SetPropertyStr(ctx, result, "array_count", JS_NewInt64(ctx, s.array_count));
+ JS_SetPropertyStr(ctx, result, "fast_array_count", JS_NewInt64(ctx, s.fast_array_count));
+ JS_SetPropertyStr(ctx, result, "fast_array_elements", JS_NewInt64(ctx, s.fast_array_elements));
+ JS_SetPropertyStr(ctx, result, "binary_object_count", JS_NewInt64(ctx, s.binary_object_count));
+ JS_SetPropertyStr(ctx, result, "binary_object_size", JS_NewInt64(ctx, s.binary_object_size));
+
+ return jsvalue_to_heap(result);
+}
+
+OwnedHeapChar *QTS_RuntimeDumpMemoryUsage(JSRuntime *rt) {
+ char *result = malloc(sizeof(char) * 1024);
+ FILE *memfile = fmemopen(result, 1024, "w");
+ JSMemoryUsage s;
+ JS_ComputeMemoryUsage(rt, &s);
+ JS_DumpMemoryUsage(memfile, &s, rt);
+ fclose(memfile);
+ return result;
+}
+
+int QTS_RecoverableLeakCheck() {
+#ifdef QTS_SANITIZE_LEAK
+ return __lsan_do_recoverable_leak_check();
+#else
+ return 0;
+#endif
+}
+
+int QTS_BuildIsSanitizeLeak() {
+#ifdef QTS_SANITIZE_LEAK
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+#ifdef QTS_ASYNCIFY
+EM_JS(void, set_asyncify_stack_size, (size_t size), {
+ Asyncify.StackSize = size || 81920;
+});
+#endif
+
+/**
+ * Set the stack size limit, in bytes. Set to 0 to disable.
+ */
+void QTS_RuntimeSetMaxStackSize(JSRuntime *rt, size_t stack_size) {
+#ifdef QTS_ASYNCIFY
+ set_asyncify_stack_size(stack_size);
+#endif
+ JS_SetMaxStackSize(rt, stack_size);
+}
+
+/**
+ * Constant pointers. Because we always use JSValue* from the host Javascript environment,
+ * we need helper fuctions to return pointers to these constants.
+ */
+
+JSValueConst QTS_Undefined = JS_UNDEFINED;
+JSValueConst *QTS_GetUndefined() {
+ return &QTS_Undefined;
+}
+
+JSValueConst QTS_Null = JS_NULL;
+JSValueConst *QTS_GetNull() {
+ return &QTS_Null;
+}
+
+JSValueConst QTS_False = JS_FALSE;
+JSValueConst *QTS_GetFalse() {
+ return &QTS_False;
+}
+
+JSValueConst QTS_True = JS_TRUE;
+JSValueConst *QTS_GetTrue() {
+ return &QTS_True;
+}
+
+/**
+ * Standard FFI functions
+ */
+
+JSRuntime *QTS_NewRuntime() {
+ return JS_NewRuntime();
+}
+
+void QTS_FreeRuntime(JSRuntime *rt) {
+ JS_FreeRuntime(rt);
+}
+
+JSContext *QTS_NewContext(JSRuntime *rt) {
+ return JS_NewContext(rt);
+}
+
+void QTS_FreeContext(JSContext *ctx) {
+ JS_FreeContext(ctx);
+}
+
+void QTS_FreeValuePointer(JSContext *ctx, JSValue *value) {
+ JS_FreeValue(ctx, *value);
+ free(value);
+}
+
+void QTS_FreeValuePointerRuntime(JSRuntime *rt, JSValue *value) {
+ JS_FreeValueRT(rt, *value);
+ free(value);
+}
+
+void QTS_FreeVoidPointer(JSContext *ctx, JSVoid *ptr) {
+ js_free(ctx, ptr);
+}
+
+void QTS_FreeCString(JSContext *ctx, JSBorrowedChar *str) {
+ JS_FreeCString(ctx, str);
+}
+
+JSValue *QTS_DupValuePointer(JSContext *ctx, JSValueConst *val) {
+ return jsvalue_to_heap(JS_DupValue(ctx, *val));
+}
+
+JSValue *QTS_NewObject(JSContext *ctx) {
+ return jsvalue_to_heap(JS_NewObject(ctx));
+}
+
+JSValue *QTS_NewObjectProto(JSContext *ctx, JSValueConst *proto) {
+ return jsvalue_to_heap(JS_NewObjectProto(ctx, *proto));
+}
+
+JSValue *QTS_NewArray(JSContext *ctx) {
+ return jsvalue_to_heap(JS_NewArray(ctx));
+}
+
+JSValue *QTS_NewFloat64(JSContext *ctx, double num) {
+ return jsvalue_to_heap(JS_NewFloat64(ctx, num));
+}
+
+double QTS_GetFloat64(JSContext *ctx, JSValueConst *value) {
+ double result = NAN;
+ JS_ToFloat64(ctx, &result, *value);
+ return result;
+}
+
+JSValue *QTS_NewString(JSContext *ctx, BorrowedHeapChar *string) {
+ return jsvalue_to_heap(JS_NewString(ctx, string));
+}
+
+JSBorrowedChar *QTS_GetString(JSContext *ctx, JSValueConst *value) {
+ return JS_ToCString(ctx, *value);
+}
+
+JSValue qts_get_symbol_key(JSContext *ctx, JSValueConst *value) {
+ JSValue global = JS_GetGlobalObject(ctx);
+ JSValue Symbol = JS_GetPropertyStr(ctx, global, "Symbol");
+ JS_FreeValue(ctx, global);
+
+ JSValue Symbol_keyFor = JS_GetPropertyStr(ctx, Symbol, "keyFor");
+ JSValue key = JS_Call(ctx, Symbol_keyFor, Symbol, 1, value);
+ JS_FreeValue(ctx, Symbol_keyFor);
+ JS_FreeValue(ctx, Symbol);
+ return key;
+}
+
+JSValue *QTS_NewSymbol(JSContext *ctx, BorrowedHeapChar *description, int isGlobal) {
+ JSValue global = JS_GetGlobalObject(ctx);
+ JSValue Symbol = JS_GetPropertyStr(ctx, global, "Symbol");
+ JS_FreeValue(ctx, global);
+ JSValue descriptionValue = JS_NewString(ctx, description);
+ JSValue symbol;
+
+ if (isGlobal != 0) {
+ JSValue Symbol_for = JS_GetPropertyStr(ctx, Symbol, "for");
+ symbol = JS_Call(ctx, Symbol_for, Symbol, 1, &descriptionValue);
+ JS_FreeValue(ctx, descriptionValue);
+ JS_FreeValue(ctx, Symbol_for);
+ JS_FreeValue(ctx, Symbol);
+ return jsvalue_to_heap(symbol);
+ }
+
+ symbol = JS_Call(ctx, Symbol, JS_UNDEFINED, 1, &descriptionValue);
+ JS_FreeValue(ctx, descriptionValue);
+ JS_FreeValue(ctx, Symbol);
+
+ return jsvalue_to_heap(symbol);
+}
+
+MaybeAsync(JSBorrowedChar *) QTS_GetSymbolDescriptionOrKey(JSContext *ctx, JSValueConst *value) {
+ JSBorrowedChar *result;
+
+ JSValue key = qts_get_symbol_key(ctx, value);
+ if (!JS_IsUndefined(key)) {
+ result = JS_ToCString(ctx, key);
+ JS_FreeValue(ctx, key);
+ return result;
+ }
+
+ JSValue description = JS_GetPropertyStr(ctx, *value, "description");
+ result = JS_ToCString(ctx, description);
+ JS_FreeValue(ctx, description);
+ return result;
+}
+
+int QTS_IsGlobalSymbol(JSContext *ctx, JSValueConst *value) {
+ JSValue key = qts_get_symbol_key(ctx, value);
+ int undefined = JS_IsUndefined(key);
+ JS_FreeValue(ctx, key);
+
+ if (undefined) {
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
+int QTS_IsJobPending(JSRuntime *rt) {
+ return JS_IsJobPending(rt);
+}
+
+/*
+ runs pending jobs (Promises/async functions) until it encounters
+ an exception or it executed the passed maxJobsToExecute jobs.
+
+ Passing a negative value will run the loop until there are no more
+ pending jobs or an exception happened
+
+ Returns the executed number of jobs or the exception encountered
+*/
+MaybeAsync(JSValue *) QTS_ExecutePendingJob(JSRuntime *rt, int maxJobsToExecute, JSContext **lastJobContext) {
+ JSContext *pctx;
+ int status = 1;
+ int executed = 0;
+ while (executed != maxJobsToExecute && status == 1) {
+ status = JS_ExecutePendingJob(rt, &pctx);
+ if (status == -1) {
+ *lastJobContext = pctx;
+ return jsvalue_to_heap(JS_GetException(pctx));
+ } else if (status == 1) {
+ *lastJobContext = pctx;
+ executed++;
+ }
+ }
+#ifdef QTS_DEBUG_MODE
+ char msg[500];
+ sprintf(msg, "QTS_ExecutePendingJob(executed: %d, pctx: %p, lastJobExecuted: %p)", executed, pctx, *lastJobContext);
+ QTS_DEBUG(msg)
+#endif
+ return jsvalue_to_heap(JS_NewFloat64(pctx, executed));
+}
+
+MaybeAsync(JSValue *) QTS_GetProp(JSContext *ctx, JSValueConst *this_val, JSValueConst *prop_name) {
+ JSAtom prop_atom = JS_ValueToAtom(ctx, *prop_name);
+ JSValue prop_val = JS_GetProperty(ctx, *this_val, prop_atom);
+ JS_FreeAtom(ctx, prop_atom);
+ return jsvalue_to_heap(prop_val);
+}
+
+MaybeAsync(void) QTS_SetProp(JSContext *ctx, JSValueConst *this_val, JSValueConst *prop_name, JSValueConst *prop_value) {
+ JSAtom prop_atom = JS_ValueToAtom(ctx, *prop_name);
+ JSValue extra_prop_value = JS_DupValue(ctx, *prop_value);
+ // TODO: should we use DefineProperty internally if this object doesn't have the property yet?
+ JS_SetProperty(ctx, *this_val, prop_atom, extra_prop_value); // consumes extra_prop_value
+ JS_FreeAtom(ctx, prop_atom);
+}
+
+void QTS_DefineProp(JSContext *ctx, JSValueConst *this_val, JSValueConst *prop_name, JSValueConst *prop_value, JSValueConst *get, JSValueConst *set, bool configurable, bool enumerable, bool has_value) {
+ JSAtom prop_atom = JS_ValueToAtom(ctx, *prop_name);
+
+ int flags = 0;
+ if (configurable) {
+ flags = flags | JS_PROP_CONFIGURABLE;
+ if (has_value) {
+ flags = flags | JS_PROP_HAS_CONFIGURABLE;
+ }
+ }
+ if (enumerable) {
+ flags = flags | JS_PROP_ENUMERABLE;
+ if (has_value) {
+ flags = flags | JS_PROP_HAS_ENUMERABLE;
+ }
+ }
+ if (!JS_IsUndefined(*get)) {
+ flags = flags | JS_PROP_HAS_GET;
+ }
+ if (!JS_IsUndefined(*set)) {
+ flags = flags | JS_PROP_HAS_SET;
+ }
+ if (has_value) {
+ flags = flags | JS_PROP_HAS_VALUE;
+ }
+
+ JS_DefineProperty(ctx, *this_val, prop_atom, *prop_value, *get, *set, flags);
+ JS_FreeAtom(ctx, prop_atom);
+}
+
+MaybeAsync(JSValue *) QTS_Call(JSContext *ctx, JSValueConst *func_obj, JSValueConst *this_obj, int argc, JSValueConst **argv_ptrs) {
+ // convert array of pointers to array of values
+ JSValueConst argv[argc];
+ int i;
+ for (i = 0; i < argc; i++) {
+ argv[i] = *(argv_ptrs[i]);
+ }
+
+ return jsvalue_to_heap(JS_Call(ctx, *func_obj, *this_obj, argc, argv));
+}
+
+/**
+ * If maybe_exception is an exception, get the error.
+ * Otherwise, return NULL.
+ */
+JSValue *QTS_ResolveException(JSContext *ctx, JSValue *maybe_exception) {
+ if (JS_IsException(*maybe_exception)) {
+ return jsvalue_to_heap(JS_GetException(ctx));
+ }
+
+ return NULL;
+}
+
+MaybeAsync(JSBorrowedChar *) QTS_Dump(JSContext *ctx, JSValueConst *obj) {
+ JSValue obj_json_value = JS_JSONStringify(ctx, *obj, JS_UNDEFINED, JS_UNDEFINED);
+ if (!JS_IsException(obj_json_value)) {
+ const char *obj_json_chars = JS_ToCString(ctx, obj_json_value);
+ JS_FreeValue(ctx, obj_json_value);
+ if (obj_json_chars != NULL) {
+ JSValue enumerable_props = JS_ParseJSON(ctx, obj_json_chars, strlen(obj_json_chars), "");
+ JS_FreeCString(ctx, obj_json_chars);
+ if (!JS_IsException(enumerable_props)) {
+ // Copy common non-enumerable props for different object types.
+ // Errors:
+ copy_prop_if_needed(ctx, enumerable_props, *obj, "name");
+ copy_prop_if_needed(ctx, enumerable_props, *obj, "message");
+ copy_prop_if_needed(ctx, enumerable_props, *obj, "stack");
+
+ // Serialize again.
+ JSValue enumerable_json = JS_JSONStringify(ctx, enumerable_props, JS_UNDEFINED, JS_UNDEFINED);
+ JS_FreeValue(ctx, enumerable_props);
+
+ JSBorrowedChar *result = QTS_GetString(ctx, &enumerable_json);
+ JS_FreeValue(ctx, enumerable_json);
+ return result;
+ }
+ }
+ }
+
+#ifdef QTS_DEBUG_MODE
+ qts_log("Error dumping JSON:");
+ js_std_dump_error(ctx);
+#endif
+
+ // Fallback: convert to string
+ return QTS_GetString(ctx, obj);
+}
+
+MaybeAsync(JSValue *) QTS_Eval(JSContext *ctx, BorrowedHeapChar *js_code, const char *filename, EvalDetectModule detectModule, EvalFlags evalFlags) {
+ size_t js_code_len = strlen(js_code);
+
+ if (detectModule) {
+ if (JS_DetectModule((const char *)js_code, js_code_len)) {
+ QTS_DEBUG("QTS_Eval: Detected module = true");
+ evalFlags |= JS_EVAL_TYPE_MODULE;
+ } else {
+ QTS_DEBUG("QTS_Eval: Detected module = false");
+ }
+ } else {
+ QTS_DEBUG("QTS_Eval: do not detect module");
+ }
+
+ return jsvalue_to_heap(JS_Eval(ctx, js_code, strlen(js_code), filename, evalFlags));
+}
+
+OwnedHeapChar *QTS_Typeof(JSContext *ctx, JSValueConst *value) {
+ const char *result = "unknown";
+ uint32_t tag = JS_VALUE_GET_TAG(*value);
+
+ if (JS_IsNumber(*value)) {
+ result = "number";
+ } else if (JS_IsBigInt(ctx, *value)) {
+ result = "bigint";
+ } else if (JS_IsBigFloat(*value)) {
+ result = "bigfloat";
+ } else if (JS_IsBigDecimal(*value)) {
+ result = "bigdecimal";
+ } else if (JS_IsFunction(ctx, *value)) {
+ result = "function";
+ } else if (JS_IsBool(*value)) {
+ result = "boolean";
+ } else if (JS_IsNull(*value)) {
+ result = "object";
+ } else if (JS_IsUndefined(*value)) {
+ result = "undefined";
+ } else if (JS_IsUninitialized(*value)) {
+ result = "undefined";
+ } else if (JS_IsString(*value)) {
+ result = "string";
+ } else if (JS_IsSymbol(*value)) {
+ result = "symbol";
+ } else if (JS_IsObject(*value)) {
+ result = "object";
+ }
+
+ char *out = strdup(result);
+ return out;
+}
+
+JSValue *QTS_GetGlobalObject(JSContext *ctx) {
+ return jsvalue_to_heap(JS_GetGlobalObject(ctx));
+}
+
+JSValue *QTS_NewPromiseCapability(JSContext *ctx, JSValue **resolve_funcs_out) {
+ JSValue resolve_funcs[2];
+ JSValue promise = JS_NewPromiseCapability(ctx, resolve_funcs);
+ resolve_funcs_out[0] = jsvalue_to_heap(resolve_funcs[0]);
+ resolve_funcs_out[1] = jsvalue_to_heap(resolve_funcs[1]);
+ return jsvalue_to_heap(promise);
+}
+
+void QTS_TestStringArg(const char *string) {
+ // pass
+}
+
+int QTS_BuildIsDebug() {
+#ifdef QTS_DEBUG_MODE
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+int QTS_BuildIsAsyncify() {
+#ifdef QTS_ASYNCIFY
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// Module loading helpers
+
+// ----------------------------------------------------------------------------
+// C -> Host Callbacks
+// Note: inside EM_JS, we need to use ['...'] subscript syntax for accessing JS
+// objects, because in optimized builds, Closure compiler will mangle all the
+// names.
+
+// -------------------
+// function: C -> Host
+#ifdef __EMSCRIPTEN__
+EM_JS(MaybeAsync(JSValue *), qts_host_call_function, (JSContext * ctx, JSValueConst *this_ptr, int argc, JSValueConst *argv, uint32_t magic_func_id), {
+#ifdef QTS_ASYNCIFY
+ const asyncify = {['handleSleep'] : Asyncify.handleSleep};
+#else
+ const asyncify = undefined;
+#endif
+ return Module['callbacks']['callFunction'](asyncify, ctx, this_ptr, argc, argv, magic_func_id);
+});
+#endif
+
+// Function: QuickJS -> C
+JSValue qts_call_function(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic) {
+ JSValue *result_ptr = qts_host_call_function(ctx, &this_val, argc, argv, magic);
+ if (result_ptr == NULL) {
+ return JS_UNDEFINED;
+ }
+ JSValue result = *result_ptr;
+ free(result_ptr);
+ return result;
+}
+
+// Function: Host -> QuickJS
+JSValue *QTS_NewFunction(JSContext *ctx, uint32_t func_id, const char *name) {
+#ifdef QTS_DEBUG_MODE
+ char msg[500];
+ sprintf(msg, "new_function(name: %s, magic: %d)", name, func_id);
+ QTS_DEBUG(msg)
+#endif
+ JSValue func_obj = JS_NewCFunctionMagic(
+ /* context */ ctx,
+ /* JSCFunctionMagic* */ &qts_call_function,
+ /* name */ name,
+ /* min argc */ 0,
+ /* function type */ JS_CFUNC_generic_magic,
+ /* magic: fn id */ func_id);
+ return jsvalue_to_heap(func_obj);
+}
+
+JSValueConst *QTS_ArgvGetJSValueConstPointer(JSValueConst *argv, int index) {
+ return &argv[index];
+}
+
+// --------------------
+// interrupt: C -> Host
+#ifdef __EMSCRIPTEN__
+EM_JS(int, qts_host_interrupt_handler, (JSRuntime * rt), {
+ // Async not supported here.
+ // #ifdef QTS_ASYNCIFY
+ // const asyncify = Asyncify;
+ // #else
+ const asyncify = undefined;
+ // #endif
+ return Module['callbacks']['shouldInterrupt'](asyncify, rt);
+});
+#endif
+
+// interrupt: QuickJS -> C
+int qts_interrupt_handler(JSRuntime *rt, void *_unused) {
+ return qts_host_interrupt_handler(rt);
+}
+
+// interrupt: Host -> QuickJS
+void QTS_RuntimeEnableInterruptHandler(JSRuntime *rt) {
+ JS_SetInterruptHandler(rt, &qts_interrupt_handler, NULL);
+}
+
+void QTS_RuntimeDisableInterruptHandler(JSRuntime *rt) {
+ JS_SetInterruptHandler(rt, NULL, NULL);
+}
+
+// --------------------
+// load module: C -> Host
+// TODO: a future version can support host returning JSModuleDef* directly;
+// for now we only support loading module source code.
+
+/*
+The module loading model under ASYNCIFY is convoluted. We need to make sure we
+never have an async request running concurrently for loading modules.
+
+The first implemenation looked like this:
+
+C HOST SUSPENDED
+qts_host_load_module(name) ------> false
+ call rt.loadModule(name) false
+ Start async load module false
+ Suspend C true
+ Async load complete true
+ < --------------- QTS_CompileModule(source) true
+QTS_Eval(source, COMPILE_ONLY) true
+Loaded module has import true
+qts_host_load_module(dep) -------> true
+ call rt.loadModule(dep) true
+ Start async load module true
+ ALREADY SUSPENDED, CRASH
+
+We can solve this in two different ways:
+
+1. Return to C as soon as we async load the module source.
+ That way, we unsuspend before calling QTS_CompileModule.
+2. Once we load the module, use a new API to detect and async
+ load the module's downstream dependencies. This way
+ they're loaded synchronously so we don't need to suspend "again".
+
+Probably we could optimize (2) to make it more performant, eg with parallel
+loading, but (1) seems much easier to implement in the sort run.
+*/
+
+JSModuleDef *qts_compile_module(JSContext *ctx, const char *module_name, BorrowedHeapChar *module_body) {
+#ifdef QTS_DEBUG_MODE
+ char msg[500];
+ sprintf(msg, "QTS_CompileModule(ctx: %p, name: %s, bodyLength: %lu)", ctx, module_name, strlen(module_body));
+ QTS_DEBUG(msg)
+#endif
+ JSValue func_val = JS_Eval(ctx, module_body, strlen(module_body), module_name, JS_EVAL_TYPE_MODULE | JS_EVAL_FLAG_COMPILE_ONLY);
+ if (JS_IsException(func_val)) {
+ return NULL;
+ }
+ // TODO: Is exception ok?
+ // TODO: set import.meta?
+ JSModuleDef *module = JS_VALUE_GET_PTR(func_val);
+ JS_FreeValue(ctx, func_val);
+ return module;
+}
+
+#ifdef __EMSCRIPTEN__
+EM_JS(MaybeAsync(char *), qts_host_load_module_source, (JSRuntime * rt, JSContext *ctx, const char *module_name), {
+#ifdef QTS_ASYNCIFY
+ const asyncify = {['handleSleep'] : Asyncify.handleSleep};
+#else
+ const asyncify = undefined;
+#endif
+ // https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString
+ const moduleNameString = UTF8ToString(module_name);
+ return Module['callbacks']['loadModuleSource'](asyncify, rt, ctx, moduleNameString);
+});
+
+EM_JS(MaybeAsync(char *), qts_host_normalize_module, (JSRuntime * rt, JSContext *ctx, const char *module_base_name, const char *module_name), {
+#ifdef QTS_ASYNCIFY
+ const asyncify = {['handleSleep'] : Asyncify.handleSleep};
+#else
+ const asyncify = undefined;
+#endif
+ // https://emscripten.org/docs/api_reference/preamble.js.html#UTF8ToString
+ const moduleBaseNameString = UTF8ToString(module_base_name);
+ const moduleNameString = UTF8ToString(module_name);
+ return Module['callbacks']['normalizeModule'](asyncify, rt, ctx, moduleBaseNameString, moduleNameString);
+});
+#endif
+
+// load module: QuickJS -> C
+// See js_module_loader in quickjs/quickjs-libc.c:567
+JSModuleDef *qts_load_module(JSContext *ctx, const char *module_name, void *_unused) {
+ JSRuntime *rt = JS_GetRuntime(ctx);
+#ifdef QTS_DEBUG_MODE
+ char msg[500];
+ sprintf(msg, "qts_load_module(rt: %p, ctx: %p, name: %s)", rt, ctx, module_name);
+ QTS_DEBUG(msg)
+#endif
+ char *module_source = qts_host_load_module_source(rt, ctx, module_name);
+ if (module_source == NULL) {
+ return NULL;
+ }
+
+ JSModuleDef *module = qts_compile_module(ctx, module_name, module_source);
+ free(module_source);
+ return module;
+}
+
+char *qts_normalize_module(JSContext *ctx, const char *module_base_name, const char *module_name, void *_unused) {
+ JSRuntime *rt = JS_GetRuntime(ctx);
+#ifdef QTS_DEBUG_MODE
+ char msg[500];
+ sprintf(msg, "qts_normalize_module(rt: %p, ctx: %p, base_name: %s, name: %s)", rt, ctx, module_base_name, module_name);
+ QTS_DEBUG(msg)
+#endif
+ char *em_module_name = qts_host_normalize_module(rt, ctx, module_base_name, module_name);
+ char *js_module_name = js_strdup(ctx, em_module_name);
+ free(em_module_name);
+ return js_module_name;
+}
+
+// Load module: Host -> QuickJS
+void QTS_RuntimeEnableModuleLoader(JSRuntime *rt, int use_custom_normalize) {
+ JSModuleNormalizeFunc *module_normalize = NULL; /* use default name normalizer */
+ if (use_custom_normalize) {
+ module_normalize = &qts_normalize_module;
+ }
+ JS_SetModuleLoaderFunc(rt, module_normalize, &qts_load_module, NULL);
+}
+
+void QTS_RuntimeDisableModuleLoader(JSRuntime *rt) {
+ JS_SetModuleLoaderFunc(rt, NULL, NULL, NULL);
+}
\ No newline at end of file
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.d.ts b/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.d.ts
new file mode 100644
index 00000000..f3bb5990
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.d.ts
@@ -0,0 +1,24 @@
+declare function awaitYield(value: T | Promise): Generator, T, T>;
+declare function awaitYieldOf(generator: Generator, T, Yielded>): Generator, T, T>;
+export type AwaitYield = typeof awaitYield & {
+ of: typeof awaitYieldOf;
+};
+/**
+ * Create a function that may or may not be async, using a generator
+ *
+ * Within the generator, call `yield* awaited(maybePromise)` to await a value
+ * that may or may not be a promise.
+ *
+ * If the inner function never yields a promise, it will return synchronously.
+ */
+export declare function maybeAsyncFn<
+/** Function arguments */
+Args extends any[], This,
+/** Function return type */
+Return,
+/** Yields to unwrap */
+Yielded>(that: This, fn: (this: This, awaited: AwaitYield, ...args: Args) => Generator, Return, Yielded>): (...args: Args) => Return | Promise;
+export type MaybeAsyncBlock = (this: This, awaited: AwaitYield, ...args: Args) => Generator, Return, Yielded>;
+export declare function maybeAsync(that: This, startGenerator: (this: This, await: AwaitYield) => Generator, Return, Yielded>): Return | Promise;
+export declare function awaitEachYieldedPromise(gen: Generator, Returned, Yielded>): Returned | Promise;
+export {};
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js b/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js
new file mode 100644
index 00000000..c140dded
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js
@@ -0,0 +1,53 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.awaitEachYieldedPromise = exports.maybeAsync = exports.maybeAsyncFn = void 0;
+function* awaitYield(value) {
+ return (yield value);
+}
+function awaitYieldOf(generator) {
+ return awaitYield(awaitEachYieldedPromise(generator));
+}
+const AwaitYield = awaitYield;
+AwaitYield.of = awaitYieldOf;
+/**
+ * Create a function that may or may not be async, using a generator
+ *
+ * Within the generator, call `yield* awaited(maybePromise)` to await a value
+ * that may or may not be a promise.
+ *
+ * If the inner function never yields a promise, it will return synchronously.
+ */
+function maybeAsyncFn(that, fn) {
+ return (...args) => {
+ const generator = fn.call(that, AwaitYield, ...args);
+ return awaitEachYieldedPromise(generator);
+ };
+}
+exports.maybeAsyncFn = maybeAsyncFn;
+class Example {
+ constructor() {
+ this.maybeAsyncMethod = maybeAsyncFn(this, function* (awaited, a) {
+ yield* awaited(new Promise((resolve) => setTimeout(resolve, a)));
+ return 5;
+ });
+ }
+}
+function maybeAsync(that, startGenerator) {
+ const generator = startGenerator.call(that, AwaitYield);
+ return awaitEachYieldedPromise(generator);
+}
+exports.maybeAsync = maybeAsync;
+function awaitEachYieldedPromise(gen) {
+ function handleNextStep(step) {
+ if (step.done) {
+ return step.value;
+ }
+ if (step.value instanceof Promise) {
+ return step.value.then((value) => handleNextStep(gen.next(value)), (error) => handleNextStep(gen.throw(error)));
+ }
+ return handleNextStep(gen.next(step.value));
+ }
+ return handleNextStep(gen.next());
+}
+exports.awaitEachYieldedPromise = awaitEachYieldedPromise;
+//# sourceMappingURL=asyncify-helpers.js.map
\ No newline at end of file
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js.map b/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js.map
new file mode 100644
index 00000000..10dcc46b
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/asyncify-helpers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"asyncify-helpers.js","sourceRoot":"","sources":["../ts/asyncify-helpers.ts"],"names":[],"mappings":";;;AAAA,QAAQ,CAAC,CAAC,UAAU,CAAI,KAAqB;IAC3C,OAAO,CAAC,MAAM,KAAK,CAAM,CAAA;AAC3B,CAAC;AAED,SAAS,YAAY,CACnB,SAA4D;IAE5D,OAAO,UAAU,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAA;AACvD,CAAC;AAMD,MAAM,UAAU,GAAe,UAAwB,CAAA;AACvD,UAAU,CAAC,EAAE,GAAG,YAAY,CAAA;AAE5B;;;;;;;GAOG;AACH,SAAgB,YAAY,CAS1B,IAAU,EACV,EAI2D;IAE3D,OAAO,CAAC,GAAG,IAAU,EAAE,EAAE;QACvB,MAAM,SAAS,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,CAAA;QACpD,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAA;IAC3C,CAAC,CAAA;AACH,CAAC;AApBD,oCAoBC;AAED,MAAM,OAAO;IAAb;QACU,qBAAgB,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAS;YACzE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YAChE,OAAO,CAAC,CAAA;QACV,CAAC,CAAC,CAAA;IACJ,CAAC;CAAA;AAQD,SAAgB,UAAU,CACxB,IAAU,EACV,cAG2D;IAE3D,MAAM,SAAS,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAA;IACvD,OAAO,uBAAuB,CAAC,SAAS,CAAC,CAAA;AAC3C,CAAC;AATD,gCASC;AAED,SAAgB,uBAAuB,CACrC,GAA6D;IAI7D,SAAS,cAAc,CAAC,IAAgB;QACtC,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,OAAO,IAAI,CAAC,KAAK,CAAA;SAClB;QAED,IAAI,IAAI,CAAC,KAAK,YAAY,OAAO,EAAE;YACjC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CACpB,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAC1C,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAC5C,CAAA;SACF;QAED,OAAO,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAC7C,CAAC;IAED,OAAO,cAAc,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;AACnC,CAAC;AArBD,0DAqBC","sourcesContent":["function* awaitYield(value: T | Promise) {\n return (yield value) as T\n}\n\nfunction awaitYieldOf(\n generator: Generator, T, Yielded>\n): Generator, T, T> {\n return awaitYield(awaitEachYieldedPromise(generator))\n}\n\nexport type AwaitYield = typeof awaitYield & {\n of: typeof awaitYieldOf\n}\n\nconst AwaitYield: AwaitYield = awaitYield as AwaitYield\nAwaitYield.of = awaitYieldOf\n\n/**\n * Create a function that may or may not be async, using a generator\n *\n * Within the generator, call `yield* awaited(maybePromise)` to await a value\n * that may or may not be a promise.\n *\n * If the inner function never yields a promise, it will return synchronously.\n */\nexport function maybeAsyncFn<\n /** Function arguments */\n Args extends any[],\n This,\n /** Function return type */\n Return,\n /** Yields to unwrap */\n Yielded\n>(\n that: This,\n fn: (\n this: This,\n awaited: AwaitYield,\n ...args: Args\n ) => Generator, Return, Yielded>\n): (...args: Args) => Return | Promise {\n return (...args: Args) => {\n const generator = fn.call(that, AwaitYield, ...args)\n return awaitEachYieldedPromise(generator)\n }\n}\n\nclass Example {\n private maybeAsyncMethod = maybeAsyncFn(this, function* (awaited, a: number) {\n yield* awaited(new Promise((resolve) => setTimeout(resolve, a)))\n return 5\n })\n}\n\nexport type MaybeAsyncBlock = (\n this: This,\n awaited: AwaitYield,\n ...args: Args\n) => Generator, Return, Yielded>\n\nexport function maybeAsync(\n that: This,\n startGenerator: (\n this: This,\n await: AwaitYield\n ) => Generator, Return, Yielded>\n): Return | Promise {\n const generator = startGenerator.call(that, AwaitYield)\n return awaitEachYieldedPromise(generator)\n}\n\nexport function awaitEachYieldedPromise(\n gen: Generator, Returned, Yielded>\n): Returned | Promise {\n type NextResult = ReturnType\n\n function handleNextStep(step: NextResult): Returned | Promise {\n if (step.done) {\n return step.value\n }\n\n if (step.value instanceof Promise) {\n return step.value.then(\n (value) => handleNextStep(gen.next(value)),\n (error) => handleNextStep(gen.throw(error))\n )\n }\n\n return handleNextStep(gen.next(step.value))\n }\n\n return handleNextStep(gen.next())\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.d.ts b/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.d.ts
new file mode 100644
index 00000000..290a9ec5
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.d.ts
@@ -0,0 +1,48 @@
+import { QuickJSContext } from "./context";
+import { QuickJSAsyncEmscriptenModule } from "./emscripten-types";
+import { QuickJSAsyncFFI } from "./variants";
+import { JSRuntimePointer } from "./types-ffi";
+import { Lifetime } from "./lifetime";
+import { QuickJSModuleCallbacks } from "./module";
+import { QuickJSAsyncRuntime } from "./runtime-asyncify";
+import { ContextEvalOptions, QuickJSHandle } from "./types";
+import { VmCallResult } from "./vm-interface";
+export type AsyncFunctionImplementation = (this: QuickJSHandle, ...args: QuickJSHandle[]) => Promise | void>;
+/**
+ * Asyncified version of [[QuickJSContext]].
+ *
+ * *Asyncify* allows normally synchronous code to wait for asynchronous Promises
+ * or callbacks. The asyncified version of QuickJSContext can wait for async
+ * host functions as though they were synchronous.
+ */
+export declare class QuickJSAsyncContext extends QuickJSContext {
+ runtime: QuickJSAsyncRuntime;
+ /** @private */
+ protected module: QuickJSAsyncEmscriptenModule;
+ /** @private */
+ protected ffi: QuickJSAsyncFFI;
+ /** @private */
+ protected rt: Lifetime;
+ /** @private */
+ protected callbacks: QuickJSModuleCallbacks;
+ /**
+ * Asyncified version of [[evalCode]].
+ */
+ evalCodeAsync(code: string, filename?: string,
+ /** See [[EvalFlags]] for number semantics */
+ options?: number | ContextEvalOptions): Promise>;
+ /**
+ * Similar to [[newFunction]].
+ * Convert an async host Javascript function into a synchronous QuickJS function value.
+ *
+ * Whenever QuickJS calls this function, the VM's stack will be unwound while
+ * waiting the async function to complete, and then restored when the returned
+ * promise resolves.
+ *
+ * Asyncified functions must never call other asyncified functions or
+ * `import`, even indirectly, because the stack cannot be unwound twice.
+ *
+ * See [Emscripten's docs on Asyncify](https://emscripten.org/docs/porting/asyncify.html).
+ */
+ newAsyncifiedFunction(name: string, fn: AsyncFunctionImplementation): QuickJSHandle;
+}
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js b/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js
new file mode 100644
index 00000000..7b3fe560
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js
@@ -0,0 +1,58 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.QuickJSAsyncContext = void 0;
+const context_1 = require("./context");
+const debug_1 = require("./debug");
+const types_1 = require("./types");
+/**
+ * Asyncified version of [[QuickJSContext]].
+ *
+ * *Asyncify* allows normally synchronous code to wait for asynchronous Promises
+ * or callbacks. The asyncified version of QuickJSContext can wait for async
+ * host functions as though they were synchronous.
+ */
+class QuickJSAsyncContext extends context_1.QuickJSContext {
+ /**
+ * Asyncified version of [[evalCode]].
+ */
+ async evalCodeAsync(code, filename = "eval.js",
+ /** See [[EvalFlags]] for number semantics */
+ options) {
+ const detectModule = (options === undefined ? 1 : 0);
+ const flags = (0, types_1.evalOptionsToFlags)(options);
+ let resultPtr = 0;
+ try {
+ resultPtr = await this.memory
+ .newHeapCharPointer(code)
+ .consume((charHandle) => this.ffi.QTS_Eval_MaybeAsync(this.ctx.value, charHandle.value, filename, detectModule, flags));
+ }
+ catch (error) {
+ (0, debug_1.debugLog)("QTS_Eval_MaybeAsync threw", error);
+ throw error;
+ }
+ const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
+ if (errorPtr) {
+ this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr);
+ return { error: this.memory.heapValueHandle(errorPtr) };
+ }
+ return { value: this.memory.heapValueHandle(resultPtr) };
+ }
+ /**
+ * Similar to [[newFunction]].
+ * Convert an async host Javascript function into a synchronous QuickJS function value.
+ *
+ * Whenever QuickJS calls this function, the VM's stack will be unwound while
+ * waiting the async function to complete, and then restored when the returned
+ * promise resolves.
+ *
+ * Asyncified functions must never call other asyncified functions or
+ * `import`, even indirectly, because the stack cannot be unwound twice.
+ *
+ * See [Emscripten's docs on Asyncify](https://emscripten.org/docs/porting/asyncify.html).
+ */
+ newAsyncifiedFunction(name, fn) {
+ return this.newFunction(name, fn);
+ }
+}
+exports.QuickJSAsyncContext = QuickJSAsyncContext;
+//# sourceMappingURL=context-asyncify.js.map
\ No newline at end of file
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js.map b/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js.map
new file mode 100644
index 00000000..93695e27
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/context-asyncify.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"context-asyncify.js","sourceRoot":"","sources":["../ts/context-asyncify.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,mCAAkC;AAOlC,mCAA+E;AAQ/E;;;;;;GAMG;AACH,M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EAA+B;QACjE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,EAAS,CAAC,CAAA;IAC1C,CAAC;CACF;AA/DD,kDA+DC","sourcesContent":["import { QuickJSContext } from \"./context\"\nimport { debugLog } from \"./debug\"\nimport { QuickJSAsyncEmscriptenModule } from \"./emscripten-types\"\nimport { QuickJSAsyncFFI } from \"./variants\"\nimport { EvalDetectModule, EvalFlags, JSRuntimePointer, JSValuePointer } from \"./types-ffi\"\nimport { Lifetime } from \"./lifetime\"\nimport { QuickJSModuleCallbacks } from \"./module\"\nimport { QuickJSAsyncRuntime } from \"./runtime-asyncify\"\nimport { ContextEvalOptions, evalOptionsToFlags, QuickJSHandle } from \"./types\"\nimport { VmCallResult } from \"./vm-interface\"\n\nexport type AsyncFunctionImplementation = (\n this: QuickJSHandle,\n ...args: QuickJSHandle[]\n) => Promise | void>\n\n/**\n * Asyncified version of [[QuickJSContext]].\n *\n * *Asyncify* allows normally synchronous code to wait for asynchronous Promises\n * or callbacks. The asyncified version of QuickJSContext can wait for async\n * host functions as though they were synchronous.\n */\nexport class QuickJSAsyncContext extends QuickJSContext {\n public declare runtime: QuickJSAsyncRuntime\n /** @private */\n protected declare module: QuickJSAsyncEmscriptenModule\n /** @private */\n protected declare ffi: QuickJSAsyncFFI\n /** @private */\n protected declare rt: Lifetime\n /** @private */\n protected declare callbacks: QuickJSModuleCallbacks\n\n /**\n * Asyncified version of [[evalCode]].\n */\n async evalCodeAsync(\n code: string,\n filename: string = \"eval.js\",\n /** See [[EvalFlags]] for number semantics */\n options?: number | ContextEvalOptions\n ): Promise> {\n const detectModule = (options === undefined ? 1 : 0) as EvalDetectModule\n const flags = evalOptionsToFlags(options) as EvalFlags\n let resultPtr = 0 as JSValuePointer\n try {\n resultPtr = await this.memory\n .newHeapCharPointer(code)\n .consume((charHandle) =>\n this.ffi.QTS_Eval_MaybeAsync(\n this.ctx.value,\n charHandle.value,\n filename,\n detectModule,\n flags\n )\n )\n } catch (error) {\n debugLog(\"QTS_Eval_MaybeAsync threw\", error)\n throw error\n }\n const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr)\n if (errorPtr) {\n this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr)\n return { error: this.memory.heapValueHandle(errorPtr) }\n }\n return { value: this.memory.heapValueHandle(resultPtr) }\n }\n\n /**\n * Similar to [[newFunction]].\n * Convert an async host Javascript function into a synchronous QuickJS function value.\n *\n * Whenever QuickJS calls this function, the VM's stack will be unwound while\n * waiting the async function to complete, and then restored when the returned\n * promise resolves.\n *\n * Asyncified functions must never call other asyncified functions or\n * `import`, even indirectly, because the stack cannot be unwound twice.\n *\n * See [Emscripten's docs on Asyncify](https://emscripten.org/docs/porting/asyncify.html).\n */\n newAsyncifiedFunction(name: string, fn: AsyncFunctionImplementation): QuickJSHandle {\n return this.newFunction(name, fn as any)\n }\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/context.d.ts b/node_modules/@tootallnate/quickjs-emscripten/dist/context.d.ts
new file mode 100644
index 00000000..d30d1999
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/context.d.ts
@@ -0,0 +1,371 @@
+import { QuickJSDeferredPromise } from "./deferred-promise";
+import type { EitherModule } from "./emscripten-types";
+import { JSBorrowedCharPointer, JSContextPointer, JSRuntimePointer, JSValueConstPointer, JSValuePointer } from "./types-ffi";
+import { Disposable, Lifetime, Scope } from "./lifetime";
+import { ModuleMemory } from "./memory";
+import { QuickJSModuleCallbacks } from "./module";
+import { QuickJSRuntime } from "./runtime";
+import { ContextEvalOptions, EitherFFI, JSValue, PromiseExecutor, QuickJSHandle } from "./types";
+import { LowLevelJavascriptVm, SuccessOrFail, VmCallResult, VmFunctionImplementation, VmPropertyDescriptor } from "./vm-interface";
+/**
+ * Property key for getting or setting a property on a handle with
+ * [[QuickJSContext.getProp]], [[QuickJSContext.setProp]], or [[QuickJSContext.defineProp]].
+ */
+export type QuickJSPropertyKey = number | string | QuickJSHandle;
+/**
+ * @private
+ */
+declare class ContextMemory extends ModuleMemory implements Disposable {
+ readonly owner: QuickJSRuntime;
+ readonly ctx: Lifetime;
+ readonly rt: Lifetime;
+ readonly module: EitherModule;
+ readonly ffi: EitherFFI;
+ readonly scope: Scope;
+ /** @private */
+ constructor(args: {
+ owner: QuickJSRuntime;
+ module: EitherModule;
+ ffi: EitherFFI;
+ ctx: Lifetime;
+ rt: Lifetime;
+ ownedLifetimes?: Disposable[];
+ });
+ get alive(): boolean;
+ dispose(): void;
+ /**
+ * Track `lifetime` so that it is disposed when this scope is disposed.
+ */
+ manage(lifetime: T): T;
+ copyJSValue: (ptr: JSValuePointer | JSValueConstPointer) => any;
+ freeJSValue: (ptr: JSValuePointer) => void;
+ consumeJSCharPointer(ptr: JSBorrowedCharPointer): string;
+ heapValueHandle(ptr: JSValuePointer): JSValue;
+}
+/**
+ * QuickJSContext wraps a QuickJS Javascript context (JSContext*) within a
+ * runtime. The contexts within the same runtime may exchange objects freely.
+ * You can think of separate runtimes like different domains in a browser, and
+ * the contexts within a runtime like the different windows open to the same
+ * domain. The {@link runtime} references the context's runtime.
+ *
+ * This class's methods return {@link QuickJSHandle}, which wrap C pointers (JSValue*).
+ * It's the caller's responsibility to call `.dispose()` on any
+ * handles you create to free memory once you're done with the handle.
+ *
+ * Use {@link QuickJSRuntime.newContext} or {@link QuickJSWASMModule.newContext}
+ * to create a new QuickJSContext.
+ *
+ * Create QuickJS values inside the interpreter with methods like
+ * [[newNumber]], [[newString]], [[newArray]], [[newObject]],
+ * [[newFunction]], and [[newPromise]].
+ *
+ * Call [[setProp]] or [[defineProp]] to customize objects. Use those methods
+ * with [[global]] to expose the values you create to the interior of the
+ * interpreter, so they can be used in [[evalCode]].
+ *
+ * Use [[evalCode]] or [[callFunction]] to execute Javascript inside the VM. If
+ * you're using asynchronous code inside the QuickJSContext, you may need to also
+ * call [[executePendingJobs]]. Executing code inside the runtime returns a
+ * result object representing successful execution or an error. You must dispose
+ * of any such results to avoid leaking memory inside the VM.
+ *
+ * Implement memory and CPU constraints at the runtime level, using [[runtime]].
+ * See {@link QuickJSRuntime} for more information.
+ *
+ */
+export declare class QuickJSContext implements LowLevelJavascriptVm, Disposable {
+ /**
+ * The runtime that created this context.
+ */
+ readonly runtime: QuickJSRuntime;
+ /** @private */
+ protected readonly ctx: Lifetime;
+ /** @private */
+ protected readonly rt: Lifetime;
+ /** @private */
+ protected readonly module: EitherModule;
+ /** @private */
+ protected readonly ffi: EitherFFI;
+ /** @private */
+ protected memory: ContextMemory;
+ /** @private */
+ protected _undefined: QuickJSHandle | undefined;
+ /** @private */
+ protected _null: QuickJSHandle | undefined;
+ /** @private */
+ protected _false: QuickJSHandle | undefined;
+ /** @private */
+ protected _true: QuickJSHandle | undefined;
+ /** @private */
+ protected _global: QuickJSHandle | undefined;
+ /** @private */
+ protected _BigInt: QuickJSHandle | undefined;
+ /**
+ * Use {@link QuickJS.createVm} to create a QuickJSContext instance.
+ */
+ constructor(args: {
+ module: EitherModule;
+ ffi: EitherFFI;
+ ctx: Lifetime;
+ rt: Lifetime;
+ runtime: QuickJSRuntime;
+ ownedLifetimes?: Disposable[];
+ callbacks: QuickJSModuleCallbacks;
+ });
+ get alive(): boolean;
+ /**
+ * Dispose of this VM's underlying resources.
+ *
+ * @throws Calling this method without disposing of all created handles
+ * will result in an error.
+ */
+ dispose(): void;
+ /**
+ * [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).
+ */
+ get undefined(): QuickJSHandle;
+ /**
+ * [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null).
+ */
+ get null(): QuickJSHandle;
+ /**
+ * [`true`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/true).
+ */
+ get true(): QuickJSHandle;
+ /**
+ * [`false`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/false).
+ */
+ get false(): QuickJSHandle;
+ /**
+ * [`global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects).
+ * A handle to the global object inside the interpreter.
+ * You can set properties to create global variables.
+ */
+ get global(): QuickJSHandle;
+ /**
+ * Converts a Javascript number into a QuickJS value.
+ */
+ newNumber(num: number): QuickJSHandle;
+ /**
+ * Create a QuickJS [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) value.
+ */
+ newString(str: string): QuickJSHandle;
+ /**
+ * Create a QuickJS [symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) value.
+ * No two symbols created with this function will be the same value.
+ */
+ newUniqueSymbol(description: string | symbol): QuickJSHandle;
+ /**
+ * Get a symbol from the [global registry](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) for the given key.
+ * All symbols created with the same key will be the same value.
+ */
+ newSymbolFor(key: string | symbol): QuickJSHandle;
+ /**
+ * Create a QuickJS [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) value.
+ */
+ newBigInt(num: bigint): QuickJSHandle;
+ /**
+ * `{}`.
+ * Create a new QuickJS [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer).
+ *
+ * @param prototype - Like [`Object.create`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create).
+ */
+ newObject(prototype?: QuickJSHandle): QuickJSHandle;
+ /**
+ * `[]`.
+ * Create a new QuickJS [array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
+ */
+ newArray(): QuickJSHandle;
+ /**
+ * Create a new [[QuickJSDeferredPromise]]. Use `deferred.resolve(handle)` and
+ * `deferred.reject(handle)` to fulfill the promise handle available at `deferred.handle`.
+ * Note that you are responsible for calling `deferred.dispose()` to free the underlying
+ * resources; see the documentation on [[QuickJSDeferredPromise]] for details.
+ */
+ newPromise(): QuickJSDeferredPromise;
+ /**
+ * Create a new [[QuickJSDeferredPromise]] that resolves when the
+ * given native Promise resolves. Rejections will be coerced
+ * to a QuickJS error.
+ *
+ * You can still resolve/reject the created promise "early" using its methods.
+ */
+ newPromise(promise: Promise): QuickJSDeferredPromise;
+ /**
+ * Construct a new native Promise, and then convert it into a
+ * [[QuickJSDeferredPromise]].
+ *
+ * You can still resolve/reject the created promise "early" using its methods.
+ */
+ newPromise(newPromiseFn: PromiseExecutor): QuickJSDeferredPromise;
+ /**
+ * Convert a Javascript function into a QuickJS function value.
+ * See [[VmFunctionImplementation]] for more details.
+ *
+ * A [[VmFunctionImplementation]] should not free its arguments or its return
+ * value. A VmFunctionImplementation should also not retain any references to
+ * its return value.
+ *
+ * To implement an async function, create a promise with [[newPromise]], then
+ * return the deferred promise handle from `deferred.handle` from your
+ * function implementation:
+ *
+ * ```
+ * const deferred = vm.newPromise()
+ * someNativeAsyncFunction().then(deferred.resolve)
+ * return deferred.handle
+ * ```
+ */
+ newFunction(name: string, fn: VmFunctionImplementation): QuickJSHandle;
+ newError(error: {
+ name: string;
+ message: string;
+ }): QuickJSHandle;
+ newError(message: string): QuickJSHandle;
+ newError(): QuickJSHandle;
+ /**
+ * `typeof` operator. **Not** [standards compliant](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof).
+ *
+ * @remarks
+ * Does not support BigInt values correctly.
+ */
+ typeof(handle: QuickJSHandle): string;
+ /**
+ * Converts `handle` into a Javascript number.
+ * @returns `NaN` on error, otherwise a `number`.
+ */
+ getNumber(handle: QuickJSHandle): number;
+ /**
+ * Converts `handle` to a Javascript string.
+ */
+ getString(handle: QuickJSHandle): string;
+ /**
+ * Converts `handle` into a Javascript symbol. If the symbol is in the global
+ * registry in the guest, it will be created with Symbol.for on the host.
+ */
+ getSymbol(handle: QuickJSHandle): symbol;
+ /**
+ * Converts `handle` to a Javascript bigint.
+ */
+ getBigInt(handle: QuickJSHandle): bigint;
+ /**
+ * `Promise.resolve(value)`.
+ * Convert a handle containing a Promise-like value inside the VM into an
+ * actual promise on the host.
+ *
+ * @remarks
+ * You may need to call [[executePendingJobs]] to ensure that the promise is resolved.
+ *
+ * @param promiseLikeHandle - A handle to a Promise-like value with a `.then(onSuccess, onError)` method.
+ */
+ resolvePromise(promiseLikeHandle: QuickJSHandle): Promise>;
+ /**
+ * `handle[key]`.
+ * Get a property from a JSValue.
+ *
+ * @param key - The property may be specified as a JSValue handle, or as a
+ * Javascript string (which will be converted automatically).
+ */
+ getProp(handle: QuickJSHandle, key: QuickJSPropertyKey): QuickJSHandle;
+ /**
+ * `handle[key] = value`.
+ * Set a property on a JSValue.
+ *
+ * @remarks
+ * Note that the QuickJS authors recommend using [[defineProp]] to define new
+ * properties.
+ *
+ * @param key - The property may be specified as a JSValue handle, or as a
+ * Javascript string or number (which will be converted automatically to a JSValue).
+ */
+ setProp(handle: QuickJSHandle, key: QuickJSPropertyKey, value: QuickJSHandle): void;
+ /**
+ * [`Object.defineProperty(handle, key, descriptor)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).
+ *
+ * @param key - The property may be specified as a JSValue handle, or as a
+ * Javascript string or number (which will be converted automatically to a JSValue).
+ */
+ defineProp(handle: QuickJSHandle, key: QuickJSPropertyKey, descriptor: VmPropertyDescriptor): void;
+ /**
+ * [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call).
+ * Call a JSValue as a function.
+ *
+ * See [[unwrapResult]], which will throw if the function returned an error, or
+ * return the result handle directly. If evaluation returned a handle containing
+ * a promise, use [[resolvePromise]] to convert it to a native promise and
+ * [[executePendingJobs]] to finish evaluating the promise.
+ *
+ * @returns A result. If the function threw synchronously, `result.error` be a
+ * handle to the exception. Otherwise `result.value` will be a handle to the
+ * value.
+ */
+ callFunction(func: QuickJSHandle, thisVal: QuickJSHandle, ...args: QuickJSHandle[]): VmCallResult;
+ /**
+ * Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description).
+ * Evaluates the Javascript source `code` in the global scope of this VM.
+ * When working with async code, you many need to call [[executePendingJobs]]
+ * to execute callbacks pending after synchronous evaluation returns.
+ *
+ * See [[unwrapResult]], which will throw if the function returned an error, or
+ * return the result handle directly. If evaluation returned a handle containing
+ * a promise, use [[resolvePromise]] to convert it to a native promise and
+ * [[executePendingJobs]] to finish evaluating the promise.
+ *
+ * *Note*: to protect against infinite loops, provide an interrupt handler to
+ * [[setInterruptHandler]]. You can use [[shouldInterruptAfterDeadline]] to
+ * create a time-based deadline.
+ *
+ * @returns The last statement's value. If the code threw synchronously,
+ * `result.error` will be a handle to the exception. If execution was
+ * interrupted, the error will have name `InternalError` and message
+ * `interrupted`.
+ */
+ evalCode(code: string, filename?: string,
+ /**
+ * If no options are passed, a heuristic will be used to detect if `code` is
+ * an ES module.
+ *
+ * See [[EvalFlags]] for number semantics.
+ */
+ options?: number | ContextEvalOptions): VmCallResult;
+ /**
+ * Throw an error in the VM, interrupted whatever current execution is in progress when execution resumes.
+ * @experimental
+ */
+ throw(error: Error | QuickJSHandle): any;
+ /**
+ * @private
+ */
+ protected borrowPropertyKey(key: QuickJSPropertyKey): QuickJSHandle;
+ /**
+ * @private
+ */
+ getMemory(rt: JSRuntimePointer): ContextMemory;
+ /**
+ * Dump a JSValue to Javascript in a best-effort fashion.
+ * Returns `handle.toString()` if it cannot be serialized to JSON.
+ */
+ dump(handle: QuickJSHandle): any;
+ /**
+ * Unwrap a SuccessOrFail result such as a [[VmCallResult]] or a
+ * [[ExecutePendingJobsResult]], where the fail branch contains a handle to a QuickJS error value.
+ * If the result is a success, returns the value.
+ * If the result is an error, converts the error to a native object and throws the error.
+ */
+ unwrapResult(result: SuccessOrFail): T;
+ /** @private */
+ protected fnNextId: number;
+ /** @private */
+ protected fnMaps: Map>>;
+ /** @private */
+ protected getFunction(fn_id: number): VmFunctionImplementation | undefined;
+ /** @private */
+ protected setFunction(fn_id: number, handle: VmFunctionImplementation): Map>;
+ /**
+ * @hidden
+ */
+ private cToHostCallbacks;
+ private errorToHandle;
+}
+export {};
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/context.js b/node_modules/@tootallnate/quickjs-emscripten/dist/context.js
new file mode 100644
index 00000000..e65258d2
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/context.js
@@ -0,0 +1,691 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.QuickJSContext = void 0;
+const debug_1 = require("./debug");
+const deferred_promise_1 = require("./deferred-promise");
+const errors_1 = require("./errors");
+const lifetime_1 = require("./lifetime");
+const memory_1 = require("./memory");
+const types_1 = require("./types");
+/**
+ * @private
+ */
+class ContextMemory extends memory_1.ModuleMemory {
+ /** @private */
+ constructor(args) {
+ super(args.module);
+ this.scope = new lifetime_1.Scope();
+ this.copyJSValue = (ptr) => {
+ return this.ffi.QTS_DupValuePointer(this.ctx.value, ptr);
+ };
+ this.freeJSValue = (ptr) => {
+ this.ffi.QTS_FreeValuePointer(this.ctx.value, ptr);
+ };
+ args.ownedLifetimes?.forEach((lifetime) => this.scope.manage(lifetime));
+ this.owner = args.owner;
+ this.module = args.module;
+ this.ffi = args.ffi;
+ this.rt = args.rt;
+ this.ctx = this.scope.manage(args.ctx);
+ }
+ get alive() {
+ return this.scope.alive;
+ }
+ dispose() {
+ return this.scope.dispose();
+ }
+ /**
+ * Track `lifetime` so that it is disposed when this scope is disposed.
+ */
+ manage(lifetime) {
+ return this.scope.manage(lifetime);
+ }
+ consumeJSCharPointer(ptr) {
+ const str = this.module.UTF8ToString(ptr);
+ this.ffi.QTS_FreeCString(this.ctx.value, ptr);
+ return str;
+ }
+ heapValueHandle(ptr) {
+ return new lifetime_1.Lifetime(ptr, this.copyJSValue, this.freeJSValue, this.owner);
+ }
+}
+/**
+ * QuickJSContext wraps a QuickJS Javascript context (JSContext*) within a
+ * runtime. The contexts within the same runtime may exchange objects freely.
+ * You can think of separate runtimes like different domains in a browser, and
+ * the contexts within a runtime like the different windows open to the same
+ * domain. The {@link runtime} references the context's runtime.
+ *
+ * This class's methods return {@link QuickJSHandle}, which wrap C pointers (JSValue*).
+ * It's the caller's responsibility to call `.dispose()` on any
+ * handles you create to free memory once you're done with the handle.
+ *
+ * Use {@link QuickJSRuntime.newContext} or {@link QuickJSWASMModule.newContext}
+ * to create a new QuickJSContext.
+ *
+ * Create QuickJS values inside the interpreter with methods like
+ * [[newNumber]], [[newString]], [[newArray]], [[newObject]],
+ * [[newFunction]], and [[newPromise]].
+ *
+ * Call [[setProp]] or [[defineProp]] to customize objects. Use those methods
+ * with [[global]] to expose the values you create to the interior of the
+ * interpreter, so they can be used in [[evalCode]].
+ *
+ * Use [[evalCode]] or [[callFunction]] to execute Javascript inside the VM. If
+ * you're using asynchronous code inside the QuickJSContext, you may need to also
+ * call [[executePendingJobs]]. Executing code inside the runtime returns a
+ * result object representing successful execution or an error. You must dispose
+ * of any such results to avoid leaking memory inside the VM.
+ *
+ * Implement memory and CPU constraints at the runtime level, using [[runtime]].
+ * See {@link QuickJSRuntime} for more information.
+ *
+ */
+// TODO: Manage own callback registration
+class QuickJSContext {
+ /**
+ * Use {@link QuickJS.createVm} to create a QuickJSContext instance.
+ */
+ constructor(args) {
+ /** @private */
+ this._undefined = undefined;
+ /** @private */
+ this._null = undefined;
+ /** @private */
+ this._false = undefined;
+ /** @private */
+ this._true = undefined;
+ /** @private */
+ this._global = undefined;
+ /** @private */
+ this._BigInt = undefined;
+ /** @private */
+ this.fnNextId = -32768; // min value of signed 16bit int used by Quickjs
+ /** @private */
+ this.fnMaps = new Map();
+ /**
+ * @hidden
+ */
+ this.cToHostCallbacks = {
+ callFunction: (ctx, this_ptr, argc, argv, fn_id) => {
+ if (ctx !== this.ctx.value) {
+ throw new Error("QuickJSContext instance received C -> JS call with mismatched ctx");
+ }
+ const fn = this.getFunction(fn_id);
+ if (!fn) {
+ // this "throw" is not catch-able from the TS side. could we somehow handle this higher up?
+ throw new Error(`QuickJSContext had no callback with id ${fn_id}`);
+ }
+ return lifetime_1.Scope.withScopeMaybeAsync(this, function* (awaited, scope) {
+ const thisHandle = scope.manage(new lifetime_1.WeakLifetime(this_ptr, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime));
+ const argHandles = new Array(argc);
+ for (let i = 0; i < argc; i++) {
+ const ptr = this.ffi.QTS_ArgvGetJSValueConstPointer(argv, i);
+ argHandles[i] = scope.manage(new lifetime_1.WeakLifetime(ptr, this.memory.copyJSValue, this.memory.freeJSValue, this.runtime));
+ }
+ try {
+ const result = yield* awaited(fn.apply(thisHandle, argHandles));
+ if (result) {
+ if ("error" in result && result.error) {
+ (0, debug_1.debugLog)("throw error", result.error);
+ throw result.error;
+ }
+ const handle = scope.manage(result instanceof lifetime_1.Lifetime ? result : result.value);
+ return this.ffi.QTS_DupValuePointer(this.ctx.value, handle.value);
+ }
+ return 0;
+ }
+ catch (error) {
+ return this.errorToHandle(error).consume((errorHandle) => this.ffi.QTS_Throw(this.ctx.value, errorHandle.value));
+ }
+ });
+ },
+ };
+ this.runtime = args.runtime;
+ this.module = args.module;
+ this.ffi = args.ffi;
+ this.rt = args.rt;
+ this.ctx = args.ctx;
+ this.memory = new ContextMemory({
+ ...args,
+ owner: this.runtime,
+ });
+ args.callbacks.setContextCallbacks(this.ctx.value, this.cToHostCallbacks);
+ this.dump = this.dump.bind(this);
+ this.getString = this.getString.bind(this);
+ this.getNumber = this.getNumber.bind(this);
+ this.resolvePromise = this.resolvePromise.bind(this);
+ }
+ // @implement Disposable ----------------------------------------------------
+ get alive() {
+ return this.memory.alive;
+ }
+ /**
+ * Dispose of this VM's underlying resources.
+ *
+ * @throws Calling this method without disposing of all created handles
+ * will result in an error.
+ */
+ dispose() {
+ this.memory.dispose();
+ }
+ // Globals ------------------------------------------------------------------
+ /**
+ * [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).
+ */
+ get undefined() {
+ if (this._undefined) {
+ return this._undefined;
+ }
+ // Undefined is a constant, immutable value in QuickJS.
+ const ptr = this.ffi.QTS_GetUndefined();
+ return (this._undefined = new lifetime_1.StaticLifetime(ptr));
+ }
+ /**
+ * [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null).
+ */
+ get null() {
+ if (this._null) {
+ return this._null;
+ }
+ // Null is a constant, immutable value in QuickJS.
+ const ptr = this.ffi.QTS_GetNull();
+ return (this._null = new lifetime_1.StaticLifetime(ptr));
+ }
+ /**
+ * [`true`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/true).
+ */
+ get true() {
+ if (this._true) {
+ return this._true;
+ }
+ // True is a constant, immutable value in QuickJS.
+ const ptr = this.ffi.QTS_GetTrue();
+ return (this._true = new lifetime_1.StaticLifetime(ptr));
+ }
+ /**
+ * [`false`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/false).
+ */
+ get false() {
+ if (this._false) {
+ return this._false;
+ }
+ // False is a constant, immutable value in QuickJS.
+ const ptr = this.ffi.QTS_GetFalse();
+ return (this._false = new lifetime_1.StaticLifetime(ptr));
+ }
+ /**
+ * [`global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects).
+ * A handle to the global object inside the interpreter.
+ * You can set properties to create global variables.
+ */
+ get global() {
+ if (this._global) {
+ return this._global;
+ }
+ // The global is a JSValue, but since it's lifetime is as long as the VM's,
+ // we should manage it.
+ const ptr = this.ffi.QTS_GetGlobalObject(this.ctx.value);
+ // Automatically clean up this reference when we dispose
+ this.memory.manage(this.memory.heapValueHandle(ptr));
+ // This isn't technically a static lifetime, but since it has the same
+ // lifetime as the VM, it's okay to fake one since when the VM is
+ // disposed, no other functions will accept the value.
+ this._global = new lifetime_1.StaticLifetime(ptr, this.runtime);
+ return this._global;
+ }
+ // New values ---------------------------------------------------------------
+ /**
+ * Converts a Javascript number into a QuickJS value.
+ */
+ newNumber(num) {
+ return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value, num));
+ }
+ /**
+ * Create a QuickJS [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) value.
+ */
+ newString(str) {
+ const ptr = this.memory
+ .newHeapCharPointer(str)
+ .consume((charHandle) => this.ffi.QTS_NewString(this.ctx.value, charHandle.value));
+ return this.memory.heapValueHandle(ptr);
+ }
+ /**
+ * Create a QuickJS [symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) value.
+ * No two symbols created with this function will be the same value.
+ */
+ newUniqueSymbol(description) {
+ const key = (typeof description === "symbol" ? description.description : description) ?? "";
+ const ptr = this.memory
+ .newHeapCharPointer(key)
+ .consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 0));
+ return this.memory.heapValueHandle(ptr);
+ }
+ /**
+ * Get a symbol from the [global registry](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) for the given key.
+ * All symbols created with the same key will be the same value.
+ */
+ newSymbolFor(key) {
+ const description = (typeof key === "symbol" ? key.description : key) ?? "";
+ const ptr = this.memory
+ .newHeapCharPointer(description)
+ .consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 1));
+ return this.memory.heapValueHandle(ptr);
+ }
+ /**
+ * Create a QuickJS [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) value.
+ */
+ newBigInt(num) {
+ if (!this._BigInt) {
+ const bigIntHandle = this.getProp(this.global, "BigInt");
+ this.memory.manage(bigIntHandle);
+ this._BigInt = new lifetime_1.StaticLifetime(bigIntHandle.value, this.runtime);
+ }
+ const bigIntHandle = this._BigInt;
+ const asString = String(num);
+ return this.newString(asString).consume((handle) => this.unwrapResult(this.callFunction(bigIntHandle, this.undefined, handle)));
+ }
+ /**
+ * `{}`.
+ * Create a new QuickJS [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer).
+ *
+ * @param prototype - Like [`Object.create`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create).
+ */
+ newObject(prototype) {
+ if (prototype) {
+ this.runtime.assertOwned(prototype);
+ }
+ const ptr = prototype
+ ? this.ffi.QTS_NewObjectProto(this.ctx.value, prototype.value)
+ : this.ffi.QTS_NewObject(this.ctx.value);
+ return this.memory.heapValueHandle(ptr);
+ }
+ /**
+ * `[]`.
+ * Create a new QuickJS [array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
+ */
+ newArray() {
+ const ptr = this.ffi.QTS_NewArray(this.ctx.value);
+ return this.memory.heapValueHandle(ptr);
+ }
+ newPromise(value) {
+ const deferredPromise = lifetime_1.Scope.withScope((scope) => {
+ const mutablePointerArray = scope.manage(this.memory.newMutablePointerArray(2));
+ const promisePtr = this.ffi.QTS_NewPromiseCapability(this.ctx.value, mutablePointerArray.value.ptr);
+ const promiseHandle = this.memory.heapValueHandle(promisePtr);
+ const [resolveHandle, rejectHandle] = Array.from(mutablePointerArray.value.typedArray).map((jsvaluePtr) => this.memory.heapValueHandle(jsvaluePtr));
+ return new deferred_promise_1.QuickJSDeferredPromise({
+ context: this,
+ promiseHandle,
+ resolveHandle,
+ rejectHandle,
+ });
+ });
+ if (value && typeof value === "function") {
+ value = new Promise(value);
+ }
+ if (value) {
+ Promise.resolve(value).then(deferredPromise.resolve, (error) => error instanceof lifetime_1.Lifetime
+ ? deferredPromise.reject(error)
+ : this.newError(error).consume(deferredPromise.reject));
+ }
+ return deferredPromise;
+ }
+ /**
+ * Convert a Javascript function into a QuickJS function value.
+ * See [[VmFunctionImplementation]] for more details.
+ *
+ * A [[VmFunctionImplementation]] should not free its arguments or its return
+ * value. A VmFunctionImplementation should also not retain any references to
+ * its return value.
+ *
+ * To implement an async function, create a promise with [[newPromise]], then
+ * return the deferred promise handle from `deferred.handle` from your
+ * function implementation:
+ *
+ * ```
+ * const deferred = vm.newPromise()
+ * someNativeAsyncFunction().then(deferred.resolve)
+ * return deferred.handle
+ * ```
+ */
+ newFunction(name, fn) {
+ const fnId = ++this.fnNextId;
+ this.setFunction(fnId, fn);
+ return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value, fnId, name));
+ }
+ newError(error) {
+ const errorHandle = this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value));
+ if (error && typeof error === "object") {
+ if (error.name !== undefined) {
+ this.newString(error.name).consume((handle) => this.setProp(errorHandle, "name", handle));
+ }
+ if (error.message !== undefined) {
+ this.newString(error.message).consume((handle) => this.setProp(errorHandle, "message", handle));
+ }
+ }
+ else if (typeof error === "string") {
+ this.newString(error).consume((handle) => this.setProp(errorHandle, "message", handle));
+ }
+ else if (error !== undefined) {
+ // This isn't supported in the type signature but maybe it will make life easier.
+ this.newString(String(error)).consume((handle) => this.setProp(errorHandle, "message", handle));
+ }
+ return errorHandle;
+ }
+ // Read values --------------------------------------------------------------
+ /**
+ * `typeof` operator. **Not** [standards compliant](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof).
+ *
+ * @remarks
+ * Does not support BigInt values correctly.
+ */
+ typeof(handle) {
+ this.runtime.assertOwned(handle);
+ return this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value, handle.value));
+ }
+ /**
+ * Converts `handle` into a Javascript number.
+ * @returns `NaN` on error, otherwise a `number`.
+ */
+ getNumber(handle) {
+ this.runtime.assertOwned(handle);
+ return this.ffi.QTS_GetFloat64(this.ctx.value, handle.value);
+ }
+ /**
+ * Converts `handle` to a Javascript string.
+ */
+ getString(handle) {
+ this.runtime.assertOwned(handle);
+ return this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value, handle.value));
+ }
+ /**
+ * Converts `handle` into a Javascript symbol. If the symbol is in the global
+ * registry in the guest, it will be created with Symbol.for on the host.
+ */
+ getSymbol(handle) {
+ this.runtime.assertOwned(handle);
+ const key = this.memory.consumeJSCharPointer(this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value, handle.value));
+ const isGlobal = this.ffi.QTS_IsGlobalSymbol(this.ctx.value, handle.value);
+ return isGlobal ? Symbol.for(key) : Symbol(key);
+ }
+ /**
+ * Converts `handle` to a Javascript bigint.
+ */
+ getBigInt(handle) {
+ this.runtime.assertOwned(handle);
+ const asString = this.getString(handle);
+ return BigInt(asString);
+ }
+ /**
+ * `Promise.resolve(value)`.
+ * Convert a handle containing a Promise-like value inside the VM into an
+ * actual promise on the host.
+ *
+ * @remarks
+ * You may need to call [[executePendingJobs]] to ensure that the promise is resolved.
+ *
+ * @param promiseLikeHandle - A handle to a Promise-like value with a `.then(onSuccess, onError)` method.
+ */
+ resolvePromise(promiseLikeHandle) {
+ this.runtime.assertOwned(promiseLikeHandle);
+ const vmResolveResult = lifetime_1.Scope.withScope((scope) => {
+ const vmPromise = scope.manage(this.getProp(this.global, "Promise"));
+ const vmPromiseResolve = scope.manage(this.getProp(vmPromise, "resolve"));
+ return this.callFunction(vmPromiseResolve, vmPromise, promiseLikeHandle);
+ });
+ if (vmResolveResult.error) {
+ return Promise.resolve(vmResolveResult);
+ }
+ return new Promise((resolve) => {
+ lifetime_1.Scope.withScope((scope) => {
+ const resolveHandle = scope.manage(this.newFunction("resolve", (value) => {
+ resolve({ value: value && value.dup() });
+ }));
+ const rejectHandle = scope.manage(this.newFunction("reject", (error) => {
+ resolve({ error: error && error.dup() });
+ }));
+ const promiseHandle = scope.manage(vmResolveResult.value);
+ const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then"));
+ this.unwrapResult(this.callFunction(promiseThenHandle, promiseHandle, resolveHandle, rejectHandle)).dispose();
+ });
+ });
+ }
+ // Properties ---------------------------------------------------------------
+ /**
+ * `handle[key]`.
+ * Get a property from a JSValue.
+ *
+ * @param key - The property may be specified as a JSValue handle, or as a
+ * Javascript string (which will be converted automatically).
+ */
+ getProp(handle, key) {
+ this.runtime.assertOwned(handle);
+ const ptr = this.borrowPropertyKey(key).consume((quickJSKey) => this.ffi.QTS_GetProp(this.ctx.value, handle.value, quickJSKey.value));
+ const result = this.memory.heapValueHandle(ptr);
+ return result;
+ }
+ /**
+ * `handle[key] = value`.
+ * Set a property on a JSValue.
+ *
+ * @remarks
+ * Note that the QuickJS authors recommend using [[defineProp]] to define new
+ * properties.
+ *
+ * @param key - The property may be specified as a JSValue handle, or as a
+ * Javascript string or number (which will be converted automatically to a JSValue).
+ */
+ setProp(handle, key, value) {
+ this.runtime.assertOwned(handle);
+ // free newly allocated value if key was a string or number. No-op if string was already
+ // a QuickJS handle.
+ this.borrowPropertyKey(key).consume((quickJSKey) => this.ffi.QTS_SetProp(this.ctx.value, handle.value, quickJSKey.value, value.value));
+ }
+ /**
+ * [`Object.defineProperty(handle, key, descriptor)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).
+ *
+ * @param key - The property may be specified as a JSValue handle, or as a
+ * Javascript string or number (which will be converted automatically to a JSValue).
+ */
+ defineProp(handle, key, descriptor) {
+ this.runtime.assertOwned(handle);
+ lifetime_1.Scope.withScope((scope) => {
+ const quickJSKey = scope.manage(this.borrowPropertyKey(key));
+ const value = descriptor.value || this.undefined;
+ const configurable = Boolean(descriptor.configurable);
+ const enumerable = Boolean(descriptor.enumerable);
+ const hasValue = Boolean(descriptor.value);
+ const get = descriptor.get
+ ? scope.manage(this.newFunction(descriptor.get.name, descriptor.get))
+ : this.undefined;
+ const set = descriptor.set
+ ? scope.manage(this.newFunction(descriptor.set.name, descriptor.set))
+ : this.undefined;
+ this.ffi.QTS_DefineProp(this.ctx.value, handle.value, quickJSKey.value, value.value, get.value, set.value, configurable, enumerable, hasValue);
+ });
+ }
+ // Evaluation ---------------------------------------------------------------
+ /**
+ * [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call).
+ * Call a JSValue as a function.
+ *
+ * See [[unwrapResult]], which will throw if the function returned an error, or
+ * return the result handle directly. If evaluation returned a handle containing
+ * a promise, use [[resolvePromise]] to convert it to a native promise and
+ * [[executePendingJobs]] to finish evaluating the promise.
+ *
+ * @returns A result. If the function threw synchronously, `result.error` be a
+ * handle to the exception. Otherwise `result.value` will be a handle to the
+ * value.
+ */
+ callFunction(func, thisVal, ...args) {
+ this.runtime.assertOwned(func);
+ const resultPtr = this.memory
+ .toPointerArray(args)
+ .consume((argsArrayPtr) => this.ffi.QTS_Call(this.ctx.value, func.value, thisVal.value, args.length, argsArrayPtr.value));
+ const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
+ if (errorPtr) {
+ this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr);
+ return { error: this.memory.heapValueHandle(errorPtr) };
+ }
+ return { value: this.memory.heapValueHandle(resultPtr) };
+ }
+ /**
+ * Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description).
+ * Evaluates the Javascript source `code` in the global scope of this VM.
+ * When working with async code, you many need to call [[executePendingJobs]]
+ * to execute callbacks pending after synchronous evaluation returns.
+ *
+ * See [[unwrapResult]], which will throw if the function returned an error, or
+ * return the result handle directly. If evaluation returned a handle containing
+ * a promise, use [[resolvePromise]] to convert it to a native promise and
+ * [[executePendingJobs]] to finish evaluating the promise.
+ *
+ * *Note*: to protect against infinite loops, provide an interrupt handler to
+ * [[setInterruptHandler]]. You can use [[shouldInterruptAfterDeadline]] to
+ * create a time-based deadline.
+ *
+ * @returns The last statement's value. If the code threw synchronously,
+ * `result.error` will be a handle to the exception. If execution was
+ * interrupted, the error will have name `InternalError` and message
+ * `interrupted`.
+ */
+ evalCode(code, filename = "eval.js",
+ /**
+ * If no options are passed, a heuristic will be used to detect if `code` is
+ * an ES module.
+ *
+ * See [[EvalFlags]] for number semantics.
+ */
+ options) {
+ const detectModule = (options === undefined ? 1 : 0);
+ const flags = (0, types_1.evalOptionsToFlags)(options);
+ const resultPtr = this.memory
+ .newHeapCharPointer(code)
+ .consume((charHandle) => this.ffi.QTS_Eval(this.ctx.value, charHandle.value, filename, detectModule, flags));
+ const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
+ if (errorPtr) {
+ this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr);
+ return { error: this.memory.heapValueHandle(errorPtr) };
+ }
+ return { value: this.memory.heapValueHandle(resultPtr) };
+ }
+ /**
+ * Throw an error in the VM, interrupted whatever current execution is in progress when execution resumes.
+ * @experimental
+ */
+ throw(error) {
+ return this.errorToHandle(error).consume((handle) => this.ffi.QTS_Throw(this.ctx.value, handle.value));
+ }
+ /**
+ * @private
+ */
+ borrowPropertyKey(key) {
+ if (typeof key === "number") {
+ return this.newNumber(key);
+ }
+ if (typeof key === "string") {
+ return this.newString(key);
+ }
+ // key is already a JSValue, but we're borrowing it. Return a static handle
+ // for internal use only.
+ return new lifetime_1.StaticLifetime(key.value, this.runtime);
+ }
+ /**
+ * @private
+ */
+ getMemory(rt) {
+ if (rt === this.rt.value) {
+ return this.memory;
+ }
+ else {
+ throw new Error("Private API. Cannot get memory from a different runtime");
+ }
+ }
+ // Utilities ----------------------------------------------------------------
+ /**
+ * Dump a JSValue to Javascript in a best-effort fashion.
+ * Returns `handle.toString()` if it cannot be serialized to JSON.
+ */
+ dump(handle) {
+ this.runtime.assertOwned(handle);
+ const type = this.typeof(handle);
+ if (type === "string") {
+ return this.getString(handle);
+ }
+ else if (type === "number") {
+ return this.getNumber(handle);
+ }
+ else if (type === "bigint") {
+ return this.getBigInt(handle);
+ }
+ else if (type === "undefined") {
+ return undefined;
+ }
+ else if (type === "symbol") {
+ return this.getSymbol(handle);
+ }
+ const str = this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value, handle.value));
+ try {
+ return JSON.parse(str);
+ }
+ catch (err) {
+ return str;
+ }
+ }
+ /**
+ * Unwrap a SuccessOrFail result such as a [[VmCallResult]] or a
+ * [[ExecutePendingJobsResult]], where the fail branch contains a handle to a QuickJS error value.
+ * If the result is a success, returns the value.
+ * If the result is an error, converts the error to a native object and throws the error.
+ */
+ unwrapResult(result) {
+ if (result.error) {
+ const context = "context" in result.error ? result.error.context : this;
+ const cause = result.error.consume((error) => this.dump(error));
+ if (cause && typeof cause === "object" && typeof cause.message === "string") {
+ const { message, name, stack } = cause;
+ const exception = new errors_1.QuickJSUnwrapError("");
+ const hostStack = exception.stack;
+ if (typeof name === "string") {
+ exception.name = cause.name;
+ }
+ if (typeof stack === "string") {
+ exception.stack = `${name}: ${message}\n${cause.stack}Host: ${hostStack}`;
+ }
+ Object.assign(exception, { cause, context, message });
+ throw exception;
+ }
+ throw new errors_1.QuickJSUnwrapError(cause, context);
+ }
+ return result.value;
+ }
+ /** @private */
+ getFunction(fn_id) {
+ const map_id = fn_id >> 8;
+ const fnMap = this.fnMaps.get(map_id);
+ if (!fnMap) {
+ return undefined;
+ }
+ return fnMap.get(fn_id);
+ }
+ /** @private */
+ setFunction(fn_id, handle) {
+ const map_id = fn_id >> 8;
+ let fnMap = this.fnMaps.get(map_id);
+ if (!fnMap) {
+ fnMap = new Map();
+ this.fnMaps.set(map_id, fnMap);
+ }
+ return fnMap.set(fn_id, handle);
+ }
+ errorToHandle(error) {
+ if (error instanceof lifetime_1.Lifetime) {
+ return error;
+ }
+ return this.newError(error);
+ }
+}
+exports.QuickJSContext = QuickJSContext;
+//# sourceMappingURL=context.js.map
\ No newline at end of file
diff --git a/node_modules/@tootallnate/quickjs-emscripten/dist/context.js.map b/node_modules/@tootallnate/quickjs-emscripten/dist/context.js.map
new file mode 100644
index 00000000..1398a539
--- /dev/null
+++ b/node_modules/@tootallnate/quickjs-emscripten/dist/context.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"context.js","sourceRoot":"","sources":["../ts/context.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAClC,yDAA2D;AAE3D,qCAA6C;AAa7C,yCAAsF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EAAE,MAAM,CAAC,CAAA;IACjC,CAAC;IAiDO,aAAa,CAAC,KAA4B;QAChD,IAAI,KAAK,YAAY,mBAAQ,EAAE;YAC7B,OAAO,KAAK,CAAA;SACb;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;CACF;AA5xBD,wCA4xBC","sourcesContent":["import { debugLog } from \"./debug\"\nimport { QuickJSDeferredPromise } from \"./deferred-promise\"\nimport type { EitherModule } from \"./emscripten-types\"\nimport { QuickJSUnwrapError } from \"./errors\"\nimport {\n EvalDetectModule,\n EvalFlags,\n JSBorrowedCharPointer,\n JSContextPointer,\n JSModuleDefPointer,\n JSRuntimePointer,\n JSValueConstPointer,\n JSValuePointer,\n JSValuePointerPointer,\n JSVoidPointer,\n} from \"./types-ffi\"\nimport { Disposable, Lifetime, Scope, StaticLifetime, WeakLifetime } from \"./lifetime\"\nimport { ModuleMemory } from \"./memory\"\nimport { ContextCallbacks, QuickJSModuleCallbacks } from \"./module\"\nimport { QuickJSRuntime } from \"./runtime\"\nimport {\n ContextEvalOptions,\n EitherFFI,\n evalOptionsToFlags,\n JSValue,\n PromiseExecutor,\n QuickJSHandle,\n} from \"./types\"\nimport {\n LowLevelJavascriptVm,\n SuccessOrFail,\n VmCallResult,\n VmFunctionImplementation,\n VmPropertyDescriptor,\n} from \"./vm-interface\"\n\n/**\n * Property key for getting or setting a property on a handle with\n * [[QuickJSContext.getProp]], [[QuickJSContext.setProp]], or [[QuickJSContext.defineProp]].\n */\nexport type QuickJSPropertyKey = number | string | QuickJSHandle\n\n/**\n * @private\n */\nclass ContextMemory extends ModuleMemory implements Disposable {\n readonly owner: QuickJSRuntime\n readonly ctx: Lifetime\n readonly rt: Lifetime\n readonly module: EitherModule\n readonly ffi: EitherFFI\n readonly scope = new Scope()\n\n /** @private */\n constructor(args: {\n owner: QuickJSRuntime\n module: EitherModule\n ffi: EitherFFI\n ctx: Lifetime\n rt: Lifetime\n ownedLifetimes?: Disposable[]\n }) {\n super(args.module)\n args.ownedLifetimes?.forEach((lifetime) => this.scope.manage(lifetime))\n this.owner = args.owner\n this.module = args.module\n this.ffi = args.ffi\n this.rt = args.rt\n this.ctx = this.scope.manage(args.ctx)\n }\n\n get alive() {\n return this.scope.alive\n }\n\n dispose() {\n return this.scope.dispose()\n }\n\n /**\n * Track `lifetime` so that it is disposed when this scope is disposed.\n */\n manage(lifetime: T): T {\n return this.scope.manage(lifetime)\n }\n\n copyJSValue = (ptr: JSValuePointer | JSValueConstPointer) => {\n return this.ffi.QTS_DupValuePointer(this.ctx.value, ptr)\n }\n\n freeJSValue = (ptr: JSValuePointer) => {\n this.ffi.QTS_FreeValuePointer(this.ctx.value, ptr)\n }\n\n consumeJSCharPointer(ptr: JSBorrowedCharPointer): string {\n const str = this.module.UTF8ToString(ptr)\n this.ffi.QTS_FreeCString(this.ctx.value, ptr)\n return str\n }\n\n heapValueHandle(ptr: JSValuePointer): JSValue {\n return new Lifetime(ptr, this.copyJSValue, this.freeJSValue, this.owner)\n }\n}\n\n/**\n * QuickJSContext wraps a QuickJS Javascript context (JSContext*) within a\n * runtime. The contexts within the same runtime may exchange objects freely.\n * You can think of separate runtimes like different domains in a browser, and\n * the contexts within a runtime like the different windows open to the same\n * domain. The {@link runtime} references the context's runtime.\n *\n * This class's methods return {@link QuickJSHandle}, which wrap C pointers (JSValue*).\n * It's the caller's responsibility to call `.dispose()` on any\n * handles you create to free memory once you're done with the handle.\n *\n * Use {@link QuickJSRuntime.newContext} or {@link QuickJSWASMModule.newContext}\n * to create a new QuickJSContext.\n *\n * Create QuickJS values inside the interpreter with methods like\n * [[newNumber]], [[newString]], [[newArray]], [[newObject]],\n * [[newFunction]], and [[newPromise]].\n *\n * Call [[setProp]] or [[defineProp]] to customize objects. Use those methods\n * with [[global]] to expose the values you create to the interior of the\n * interpreter, so they can be used in [[evalCode]].\n *\n * Use [[evalCode]] or [[callFunction]] to execute Javascript inside the VM. If\n * you're using asynchronous code inside the QuickJSContext, you may need to also\n * call [[executePendingJobs]]. Executing code inside the runtime returns a\n * result object representing successful execution or an error. You must dispose\n * of any such results to avoid leaking memory inside the VM.\n *\n * Implement memory and CPU constraints at the runtime level, using [[runtime]].\n * See {@link QuickJSRuntime} for more information.\n *\n */\n// TODO: Manage own callback registration\nexport class QuickJSContext implements LowLevelJavascriptVm, Disposable {\n /**\n * The runtime that created this context.\n */\n public readonly runtime: QuickJSRuntime\n\n /** @private */\n protected readonly ctx: Lifetime\n /** @private */\n protected readonly rt: Lifetime\n /** @private */\n protected readonly module: EitherModule\n /** @private */\n protected readonly ffi: EitherFFI\n /** @private */\n protected memory: ContextMemory\n\n /** @private */\n protected _undefined: QuickJSHandle | undefined = undefined\n /** @private */\n protected _null: QuickJSHandle | undefined = undefined\n /** @private */\n protected _false: QuickJSHandle | undefined = undefined\n /** @private */\n protected _true: QuickJSHandle | undefined = undefined\n /** @private */\n protected _global: QuickJSHandle | undefined = undefined\n /** @private */\n protected _BigInt: QuickJSHandle | undefined = undefined\n\n /**\n * Use {@link QuickJS.createVm} to create a QuickJSContext instance.\n */\n constructor(args: {\n module: EitherModule\n ffi: EitherFFI\n ctx: Lifetime\n rt: Lifetime\n runtime: QuickJSRuntime\n ownedLifetimes?: Disposable[]\n callbacks: QuickJSModuleCallbacks\n }) {\n this.runtime = args.runtime\n this.module = args.module\n this.ffi = args.ffi\n this.rt = args.rt\n this.ctx = args.ctx\n this.memory = new ContextMemory({\n ...args,\n owner: this.runtime,\n })\n args.callbacks.setContextCallbacks(this.ctx.value, this.cToHostCallbacks)\n this.dump = this.dump.bind(this)\n this.getString = this.getString.bind(this)\n this.getNumber = this.getNumber.bind(this)\n this.resolvePromise = this.resolvePromise.bind(this)\n }\n\n // @implement Disposable ----------------------------------------------------\n\n get alive() {\n return this.memory.alive\n }\n\n /**\n * Dispose of this VM's underlying resources.\n *\n * @throws Calling this method without disposing of all created handles\n * will result in an error.\n */\n dispose() {\n this.memory.dispose()\n }\n\n // Globals ------------------------------------------------------------------\n\n /**\n * [`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined).\n */\n get undefined(): QuickJSHandle {\n if (this._undefined) {\n return this._undefined\n }\n\n // Undefined is a constant, immutable value in QuickJS.\n const ptr = this.ffi.QTS_GetUndefined()\n return (this._undefined = new StaticLifetime(ptr))\n }\n\n /**\n * [`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null).\n */\n get null(): QuickJSHandle {\n if (this._null) {\n return this._null\n }\n\n // Null is a constant, immutable value in QuickJS.\n const ptr = this.ffi.QTS_GetNull()\n return (this._null = new StaticLifetime(ptr))\n }\n\n /**\n * [`true`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/true).\n */\n get true(): QuickJSHandle {\n if (this._true) {\n return this._true\n }\n\n // True is a constant, immutable value in QuickJS.\n const ptr = this.ffi.QTS_GetTrue()\n return (this._true = new StaticLifetime(ptr))\n }\n\n /**\n * [`false`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/false).\n */\n get false(): QuickJSHandle {\n if (this._false) {\n return this._false\n }\n\n // False is a constant, immutable value in QuickJS.\n const ptr = this.ffi.QTS_GetFalse()\n return (this._false = new StaticLifetime(ptr))\n }\n\n /**\n * [`global`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects).\n * A handle to the global object inside the interpreter.\n * You can set properties to create global variables.\n */\n get global(): QuickJSHandle {\n if (this._global) {\n return this._global\n }\n\n // The global is a JSValue, but since it's lifetime is as long as the VM's,\n // we should manage it.\n const ptr = this.ffi.QTS_GetGlobalObject(this.ctx.value)\n\n // Automatically clean up this reference when we dispose\n this.memory.manage(this.memory.heapValueHandle(ptr))\n\n // This isn't technically a static lifetime, but since it has the same\n // lifetime as the VM, it's okay to fake one since when the VM is\n // disposed, no other functions will accept the value.\n this._global = new StaticLifetime(ptr, this.runtime)\n return this._global\n }\n\n // New values ---------------------------------------------------------------\n\n /**\n * Converts a Javascript number into a QuickJS value.\n */\n newNumber(num: number): QuickJSHandle {\n return this.memory.heapValueHandle(this.ffi.QTS_NewFloat64(this.ctx.value, num))\n }\n\n /**\n * Create a QuickJS [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) value.\n */\n newString(str: string): QuickJSHandle {\n const ptr = this.memory\n .newHeapCharPointer(str)\n .consume((charHandle) => this.ffi.QTS_NewString(this.ctx.value, charHandle.value))\n return this.memory.heapValueHandle(ptr)\n }\n\n /**\n * Create a QuickJS [symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) value.\n * No two symbols created with this function will be the same value.\n */\n newUniqueSymbol(description: string | symbol): QuickJSHandle {\n const key = (typeof description === \"symbol\" ? description.description : description) ?? \"\"\n const ptr = this.memory\n .newHeapCharPointer(key)\n .consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 0))\n return this.memory.heapValueHandle(ptr)\n }\n\n /**\n * Get a symbol from the [global registry](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) for the given key.\n * All symbols created with the same key will be the same value.\n */\n newSymbolFor(key: string | symbol): QuickJSHandle {\n const description = (typeof key === \"symbol\" ? key.description : key) ?? \"\"\n const ptr = this.memory\n .newHeapCharPointer(description)\n .consume((charHandle) => this.ffi.QTS_NewSymbol(this.ctx.value, charHandle.value, 1))\n return this.memory.heapValueHandle(ptr)\n }\n\n /**\n * Create a QuickJS [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) value.\n */\n newBigInt(num: bigint): QuickJSHandle {\n if (!this._BigInt) {\n const bigIntHandle = this.getProp(this.global, \"BigInt\")\n this.memory.manage(bigIntHandle)\n this._BigInt = new StaticLifetime(bigIntHandle.value as JSValueConstPointer, this.runtime)\n }\n\n const bigIntHandle = this._BigInt\n const asString = String(num)\n return this.newString(asString).consume((handle) =>\n this.unwrapResult(this.callFunction(bigIntHandle, this.undefined, handle))\n )\n }\n\n /**\n * `{}`.\n * Create a new QuickJS [object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer).\n *\n * @param prototype - Like [`Object.create`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create).\n */\n newObject(prototype?: QuickJSHandle): QuickJSHandle {\n if (prototype) {\n this.runtime.assertOwned(prototype)\n }\n const ptr = prototype\n ? this.ffi.QTS_NewObjectProto(this.ctx.value, prototype.value)\n : this.ffi.QTS_NewObject(this.ctx.value)\n return this.memory.heapValueHandle(ptr)\n }\n\n /**\n * `[]`.\n * Create a new QuickJS [array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).\n */\n newArray(): QuickJSHandle {\n const ptr = this.ffi.QTS_NewArray(this.ctx.value)\n return this.memory.heapValueHandle(ptr)\n }\n\n /**\n * Create a new [[QuickJSDeferredPromise]]. Use `deferred.resolve(handle)` and\n * `deferred.reject(handle)` to fulfill the promise handle available at `deferred.handle`.\n * Note that you are responsible for calling `deferred.dispose()` to free the underlying\n * resources; see the documentation on [[QuickJSDeferredPromise]] for details.\n */\n newPromise(): QuickJSDeferredPromise\n /**\n * Create a new [[QuickJSDeferredPromise]] that resolves when the\n * given native Promise resolves. Rejections will be coerced\n * to a QuickJS error.\n *\n * You can still resolve/reject the created promise \"early\" using its methods.\n */\n newPromise(promise: Promise): QuickJSDeferredPromise\n /**\n * Construct a new native Promise, and then convert it into a\n * [[QuickJSDeferredPromise]].\n *\n * You can still resolve/reject the created promise \"early\" using its methods.\n */\n newPromise(\n newPromiseFn: PromiseExecutor\n ): QuickJSDeferredPromise\n newPromise(\n value?: PromiseExecutor | Promise\n ): QuickJSDeferredPromise {\n const deferredPromise = Scope.withScope((scope) => {\n const mutablePointerArray = scope.manage(\n this.memory.newMutablePointerArray(2)\n )\n const promisePtr = this.ffi.QTS_NewPromiseCapability(\n this.ctx.value,\n mutablePointerArray.value.ptr\n )\n const promiseHandle = this.memory.heapValueHandle(promisePtr)\n const [resolveHandle, rejectHandle] = Array.from(mutablePointerArray.value.typedArray).map(\n (jsvaluePtr) => this.memory.heapValueHandle(jsvaluePtr as any)\n )\n return new QuickJSDeferredPromise({\n context: this,\n promiseHandle,\n resolveHandle,\n rejectHandle,\n })\n })\n\n if (value && typeof value === \"function\") {\n value = new Promise(value)\n }\n\n if (value) {\n Promise.resolve(value).then(deferredPromise.resolve, (error) =>\n error instanceof Lifetime\n ? deferredPromise.reject(error)\n : this.newError(error).consume(deferredPromise.reject)\n )\n }\n\n return deferredPromise\n }\n\n /**\n * Convert a Javascript function into a QuickJS function value.\n * See [[VmFunctionImplementation]] for more details.\n *\n * A [[VmFunctionImplementation]] should not free its arguments or its return\n * value. A VmFunctionImplementation should also not retain any references to\n * its return value.\n *\n * To implement an async function, create a promise with [[newPromise]], then\n * return the deferred promise handle from `deferred.handle` from your\n * function implementation:\n *\n * ```\n * const deferred = vm.newPromise()\n * someNativeAsyncFunction().then(deferred.resolve)\n * return deferred.handle\n * ```\n */\n newFunction(name: string, fn: VmFunctionImplementation): QuickJSHandle {\n const fnId = ++this.fnNextId\n this.setFunction(fnId, fn)\n return this.memory.heapValueHandle(this.ffi.QTS_NewFunction(this.ctx.value, fnId, name))\n }\n\n newError(error: { name: string; message: string }): QuickJSHandle\n newError(message: string): QuickJSHandle\n newError(): QuickJSHandle\n newError(error?: string | { name: string; message: string }): QuickJSHandle {\n const errorHandle = this.memory.heapValueHandle(this.ffi.QTS_NewError(this.ctx.value))\n\n if (error && typeof error === \"object\") {\n if (error.name !== undefined) {\n this.newString(error.name).consume((handle) => this.setProp(errorHandle, \"name\", handle))\n }\n\n if (error.message !== undefined) {\n this.newString(error.message).consume((handle) =>\n this.setProp(errorHandle, \"message\", handle)\n )\n }\n } else if (typeof error === \"string\") {\n this.newString(error).consume((handle) => this.setProp(errorHandle, \"message\", handle))\n } else if (error !== undefined) {\n // This isn't supported in the type signature but maybe it will make life easier.\n this.newString(String(error)).consume((handle) =>\n this.setProp(errorHandle, \"message\", handle)\n )\n }\n\n return errorHandle\n }\n\n // Read values --------------------------------------------------------------\n\n /**\n * `typeof` operator. **Not** [standards compliant](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof).\n *\n * @remarks\n * Does not support BigInt values correctly.\n */\n typeof(handle: QuickJSHandle) {\n this.runtime.assertOwned(handle)\n return this.memory.consumeHeapCharPointer(this.ffi.QTS_Typeof(this.ctx.value, handle.value))\n }\n\n /**\n * Converts `handle` into a Javascript number.\n * @returns `NaN` on error, otherwise a `number`.\n */\n getNumber(handle: QuickJSHandle): number {\n this.runtime.assertOwned(handle)\n return this.ffi.QTS_GetFloat64(this.ctx.value, handle.value)\n }\n\n /**\n * Converts `handle` to a Javascript string.\n */\n getString(handle: QuickJSHandle): string {\n this.runtime.assertOwned(handle)\n return this.memory.consumeJSCharPointer(this.ffi.QTS_GetString(this.ctx.value, handle.value))\n }\n\n /**\n * Converts `handle` into a Javascript symbol. If the symbol is in the global\n * registry in the guest, it will be created with Symbol.for on the host.\n */\n getSymbol(handle: QuickJSHandle): symbol {\n this.runtime.assertOwned(handle)\n const key = this.memory.consumeJSCharPointer(\n this.ffi.QTS_GetSymbolDescriptionOrKey(this.ctx.value, handle.value)\n )\n const isGlobal = this.ffi.QTS_IsGlobalSymbol(this.ctx.value, handle.value)\n return isGlobal ? Symbol.for(key) : Symbol(key)\n }\n\n /**\n * Converts `handle` to a Javascript bigint.\n */\n getBigInt(handle: QuickJSHandle): bigint {\n this.runtime.assertOwned(handle)\n const asString = this.getString(handle)\n return BigInt(asString)\n }\n\n /**\n * `Promise.resolve(value)`.\n * Convert a handle containing a Promise-like value inside the VM into an\n * actual promise on the host.\n *\n * @remarks\n * You may need to call [[executePendingJobs]] to ensure that the promise is resolved.\n *\n * @param promiseLikeHandle - A handle to a Promise-like value with a `.then(onSuccess, onError)` method.\n */\n resolvePromise(promiseLikeHandle: QuickJSHandle): Promise> {\n this.runtime.assertOwned(promiseLikeHandle)\n const vmResolveResult = Scope.withScope((scope) => {\n const vmPromise = scope.manage(this.getProp(this.global, \"Promise\"))\n const vmPromiseResolve = scope.manage(this.getProp(vmPromise, \"resolve\"))\n return this.callFunction(vmPromiseResolve, vmPromise, promiseLikeHandle)\n })\n if (vmResolveResult.error) {\n return Promise.resolve(vmResolveResult)\n }\n\n return new Promise>((resolve) => {\n Scope.withScope((scope) => {\n const resolveHandle = scope.manage(\n this.newFunction(\"resolve\", (value) => {\n resolve({ value: value && value.dup() })\n })\n )\n\n const rejectHandle = scope.manage(\n this.newFunction(\"reject\", (error) => {\n resolve({ error: error && error.dup() })\n })\n )\n\n const promiseHandle = scope.manage(vmResolveResult.value)\n const promiseThenHandle = scope.manage(this.getProp(promiseHandle, \"then\"))\n this.unwrapResult(\n this.callFunction(promiseThenHandle, promiseHandle, resolveHandle, rejectHandle)\n ).dispose()\n })\n })\n }\n\n // Properties ---------------------------------------------------------------\n\n /**\n * `handle[key]`.\n * Get a property from a JSValue.\n *\n * @param key - The property may be specified as a JSValue handle, or as a\n * Javascript string (which will be converted automatically).\n */\n getProp(handle: QuickJSHandle, key: QuickJSPropertyKey): QuickJSHandle {\n this.runtime.assertOwned(handle)\n const ptr = this.borrowPropertyKey(key).consume((quickJSKey) =>\n this.ffi.QTS_GetProp(this.ctx.value, handle.value, quickJSKey.value)\n )\n const result = this.memory.heapValueHandle(ptr)\n\n return result\n }\n\n /**\n * `handle[key] = value`.\n * Set a property on a JSValue.\n *\n * @remarks\n * Note that the QuickJS authors recommend using [[defineProp]] to define new\n * properties.\n *\n * @param key - The property may be specified as a JSValue handle, or as a\n * Javascript string or number (which will be converted automatically to a JSValue).\n */\n setProp(handle: QuickJSHandle, key: QuickJSPropertyKey, value: QuickJSHandle) {\n this.runtime.assertOwned(handle)\n // free newly allocated value if key was a string or number. No-op if string was already\n // a QuickJS handle.\n this.borrowPropertyKey(key).consume((quickJSKey) =>\n this.ffi.QTS_SetProp(this.ctx.value, handle.value, quickJSKey.value, value.value)\n )\n }\n\n /**\n * [`Object.defineProperty(handle, key, descriptor)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty).\n *\n * @param key - The property may be specified as a JSValue handle, or as a\n * Javascript string or number (which will be converted automatically to a JSValue).\n */\n defineProp(\n handle: QuickJSHandle,\n key: QuickJSPropertyKey,\n descriptor: VmPropertyDescriptor\n ): void {\n this.runtime.assertOwned(handle)\n Scope.withScope((scope) => {\n const quickJSKey = scope.manage(this.borrowPropertyKey(key))\n\n const value = descriptor.value || this.undefined\n const configurable = Boolean(descriptor.configurable)\n const enumerable = Boolean(descriptor.enumerable)\n const hasValue = Boolean(descriptor.value)\n const get = descriptor.get\n ? scope.manage(this.newFunction(descriptor.get.name, descriptor.get))\n : this.undefined\n const set = descriptor.set\n ? scope.manage(this.newFunction(descriptor.set.name, descriptor.set))\n : this.undefined\n\n this.ffi.QTS_DefineProp(\n this.ctx.value,\n handle.value,\n quickJSKey.value,\n value.value,\n get.value,\n set.value,\n configurable,\n enumerable,\n hasValue\n )\n })\n }\n\n // Evaluation ---------------------------------------------------------------\n\n /**\n * [`func.call(thisVal, ...args)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call).\n * Call a JSValue as a function.\n *\n * See [[unwrapResult]], which will throw if the function returned an error, or\n * return the result handle directly. If evaluation returned a handle containing\n * a promise, use [[resolvePromise]] to convert it to a native promise and\n * [[executePendingJobs]] to finish evaluating the promise.\n *\n * @returns A result. If the function threw synchronously, `result.error` be a\n * handle to the exception. Otherwise `result.value` will be a handle to the\n * value.\n */\n callFunction(\n func: QuickJSHandle,\n thisVal: QuickJSHandle,\n ...args: QuickJSHandle[]\n ): VmCallResult {\n this.runtime.assertOwned(func)\n const resultPtr = this.memory\n .toPointerArray(args)\n .consume((argsArrayPtr) =>\n this.ffi.QTS_Call(\n this.ctx.value,\n func.value,\n thisVal.value,\n args.length,\n argsArrayPtr.value\n )\n )\n\n const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr)\n if (errorPtr) {\n this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr)\n return { error: this.memory.heapValueHandle(errorPtr) }\n }\n\n return { value: this.memory.heapValueHandle(resultPtr) }\n }\n\n /**\n * Like [`eval(code)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Description).\n * Evaluates the Javascript source `code` in the global scope of this VM.\n * When working with async code, you many need to call [[executePendingJobs]]\n * to execute callbacks pending after synchronous evaluation returns.\n *\n * See [[unwrapResult]], which will throw if the function returned an error, or\n * return the result handle directly. If evaluation returned a handle containing\n * a promise, use [[resolvePromise]] to convert it to a native promise and\n * [[executePendingJobs]] to finish evaluating the promise.\n *\n * *Note*: to protect against infinite loops, provide an interrupt handler to\n * [[setInterruptHandler]]. You can use [[shouldInterruptAfterDeadline]] to\n * create a time-based deadline.\n *\n * @returns The last statement's value. If the code threw synchronously,\n * `result.error` will be a handle to the exception. If execution was\n * interrupted, the error will have name `InternalError` and message\n * `interrupted`.\n */\n evalCode(\n code: string,\n filename: string = \"eval.js\",\n /**\n * If no options are passed, a heuristic will be used to detect if `code` is\n * an ES module.\n *\n * See [[EvalFlags]] for number semantics.\n */\n options?: number | ContextEvalOptions\n ): VmCallResult {\n const detectModule = (options === undefined ? 1 : 0) as EvalDetectModule\n const flags = evalOptionsToFlags(options) as EvalFlags\n const resultPtr = this.memory\n .newHeapCharPointer(code)\n .consume((charHandle) =>\n this.ffi.QTS_Eval(this.ctx.value, charHandle.value, filename, detectModule, flags)\n )\n const errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr)\n if (errorPtr) {\n this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr)\n return { error: this.memory.heapValueHandle(errorPtr) }\n }\n return { value: this.memory.heapValueHandle(resultPtr) }\n }\n\n /**\n * Throw an error in the VM, interrupted whatever current execution is in progress when execution resumes.\n * @experimental\n */\n throw(error: Error | QuickJSHandle) {\n return this.errorToHandle(error).consume((handle) =>\n this.ffi.QTS_Throw(this.ctx.value, handle.value)\n )\n }\n\n /**\n * @private\n */\n protected borrowPropertyKey(key: QuickJSPropertyKey): QuickJSHandle {\n if (typeof key === \"number\") {\n return this.newNumber(key)\n }\n\n if (typeof key === \"string\") {\n return this.newString(key)\n }\n\n // key is already a JSValue, but we're borrowing it. Return a static handle\n // for internal use only.\n return new StaticLifetime(key.value as JSValueConstPointer, this.runtime)\n }\n\n /**\n * @private\n */\n getMemory(rt: JSRuntimePointer): ContextMemory {\n if (rt === this.rt.value) {\n return this.memory\n } else {\n throw new Error(\"Private API. Cannot get memory from a different runtime\")\n }\n }\n\n // Utilities ----------------------------------------------------------------\n\n /**\n * Dump a JSValue to Javascript in a best-effort fashion.\n * Returns `handle.toString()` if it cannot be serialized to JSON.\n */\n dump(handle: QuickJSHandle) {\n this.runtime.assertOwned(handle)\n const type = this.typeof(handle)\n if (type === \"string\") {\n return this.getString(handle)\n } else if (type === \"number\") {\n return this.getNumber(handle)\n } else if (type === \"bigint\") {\n return this.getBigInt(handle)\n } else if (type === \"undefined\") {\n return undefined\n } else if (type === \"symbol\") {\n return this.getSymbol(handle)\n }\n\n const str = this.memory.consumeJSCharPointer(this.ffi.QTS_Dump(this.ctx.value, handle.value))\n try {\n return JSON.parse(str)\n } catch (err) {\n return str\n }\n }\n\n /**\n * Unwrap a SuccessOrFail result such as a [[VmCallResult]] or a\n * [[ExecutePendingJobsResult]], where the fail branch contains a handle to a QuickJS error value.\n * If the result is a success, returns the value.\n * If the result is an error, converts the error to a native object and throws the error.\n */\n unwrapResult(result: SuccessOrFail): T {\n if (result.error) {\n const context: QuickJSContext =\n \"context\" in result.error ? (result.error as { context: QuickJSContext }).context : this\n const cause = result.error.consume((error) => this.dump(error))\n\n if (cause && typeof cause === \"object\" && typeof cause.message === \"string\") {\n const { message, name, stack } = cause\n const exception = new QuickJSUnwrapError(\"\")\n const hostStack = exception.stack\n\n if (typeof name === \"string\") {\n exception.name = cause.name\n }\n\n if (typeof stack === \"string\") {\n exception.stack = `${name}: ${message}\\n${cause.stack}Host: ${hostStack}`\n }\n\n Object.assign(exception, { cause, context, message })\n throw exception\n }\n\n throw new QuickJSUnwrapError(cause, context)\n }\n\n return result.value\n }\n\n /** @private */\n protected fnNextId = -32768 // min value of signed 16bit int used by Quickjs\n /** @private */\n protected fnMaps = new Map