Versión 3 Backend - Endpoints finales corregidos
This commit is contained in:
-50
@@ -1,50 +0,0 @@
|
||||
# --- GLOBAL ---
|
||||
.env
|
||||
*.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# --- PYTHON BACKEND ---
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.sqlite3
|
||||
*.db
|
||||
*.log
|
||||
|
||||
# Virtual environments
|
||||
venv/
|
||||
.venv/
|
||||
env/
|
||||
ENV/
|
||||
|
||||
# FastAPI / Uvicorn
|
||||
*.pid
|
||||
|
||||
# --- NODE FRONTEND ---
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Vite cache
|
||||
.vite/
|
||||
vite.config.ts.timestamp*
|
||||
vite.config.js.timestamp*
|
||||
|
||||
# --- DOCKER ---
|
||||
# Avoid local volumes or generated files
|
||||
docker-data/
|
||||
postgres_data/
|
||||
redis_data/
|
||||
|
||||
# --- OS / EDITOR ---
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
@@ -0,0 +1,101 @@
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from fastapi.responses import Response
|
||||
from sqlalchemy.orm import Session
|
||||
from uuid import UUID
|
||||
|
||||
from app.db.session import get_db
|
||||
from app.db.models import Publication, Researcher
|
||||
from app.security.api_key import get_api_key
|
||||
from app.services.sword_generator import SWORDGenerator
|
||||
from app.services.zip_generator import ZIPGenerator
|
||||
|
||||
router = APIRouter(prefix="/export")
|
||||
|
||||
|
||||
def validate_uuid_list(pub_ids: list[str]) -> list[UUID]:
|
||||
valid_ids = []
|
||||
for pid in pub_ids:
|
||||
try:
|
||||
valid_ids.append(UUID(pid))
|
||||
except Exception:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"Invalid publication ID (not UUID): {pid}"
|
||||
)
|
||||
return valid_ids
|
||||
|
||||
|
||||
@router.post("/sword/publications")
|
||||
async def export_multiple_sword(
|
||||
pub_ids: list[str],
|
||||
db: Session = Depends(get_db),
|
||||
api_key: str = Depends(get_api_key)
|
||||
):
|
||||
validate_uuid_list(pub_ids)
|
||||
|
||||
pubs = db.query(Publication).filter(Publication.id.in_(pub_ids)).all()
|
||||
|
||||
if not pubs:
|
||||
raise HTTPException(status_code=404, detail="No publications found")
|
||||
|
||||
researcher = db.query(Researcher).filter_by(id=pubs[0].researcher_id).first()
|
||||
|
||||
xml_bytes = SWORDGenerator.generate_feed_xml(researcher, pubs)
|
||||
return Response(content=xml_bytes, media_type="application/xml")
|
||||
|
||||
|
||||
@router.get("/sword/researcher/{orcid_id}")
|
||||
async def export_researcher_sword(
|
||||
orcid_id: str,
|
||||
db: Session = Depends(get_db),
|
||||
api_key: str = Depends(get_api_key)
|
||||
):
|
||||
researcher = db.query(Researcher).filter_by(orcid_id=orcid_id).first()
|
||||
if not researcher:
|
||||
raise HTTPException(status_code=404, detail="Researcher not found")
|
||||
|
||||
pubs = db.query(Publication).filter_by(researcher_id=researcher.id).all()
|
||||
|
||||
if not pubs:
|
||||
raise HTTPException(status_code=404, detail="No publications found for this researcher")
|
||||
|
||||
xml_bytes = SWORDGenerator.generate_feed_xml(researcher, pubs)
|
||||
return Response(content=xml_bytes, media_type="application/xml")
|
||||
|
||||
|
||||
@router.post("/zip/publications")
|
||||
async def export_multiple_zip(
|
||||
pub_ids: list[str],
|
||||
db: Session = Depends(get_db),
|
||||
api_key: str = Depends(get_api_key)
|
||||
):
|
||||
validate_uuid_list(pub_ids)
|
||||
|
||||
pubs = db.query(Publication).filter(Publication.id.in_(pub_ids)).all()
|
||||
|
||||
if not pubs:
|
||||
raise HTTPException(status_code=404, detail="No publications found")
|
||||
|
||||
researcher = db.query(Researcher).filter_by(id=pubs[0].researcher_id).first()
|
||||
|
||||
zip_bytes = ZIPGenerator.generate_zip(researcher, pubs)
|
||||
return Response(content=zip_bytes, media_type="application/zip")
|
||||
|
||||
|
||||
@router.get("/zip/researcher/{orcid_id}")
|
||||
async def export_researcher_zip(
|
||||
orcid_id: str,
|
||||
db: Session = Depends(get_db),
|
||||
api_key: str = Depends(get_api_key)
|
||||
):
|
||||
researcher = db.query(Researcher).filter_by(orcid_id=orcid_id).first()
|
||||
if not researcher:
|
||||
raise HTTPException(status_code=404, detail="Researcher not found")
|
||||
|
||||
pubs = db.query(Publication).filter_by(researcher_id=researcher.id).all()
|
||||
|
||||
if not pubs:
|
||||
raise HTTPException(status_code=404, detail="No publications found for this researcher")
|
||||
|
||||
zip_bytes = ZIPGenerator.generate_zip(researcher, pubs)
|
||||
return Response(content=zip_bytes, media_type="application/zip")
|
||||
+189
-101
@@ -1,120 +1,208 @@
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from fastapi.responses import Response
|
||||
from sqlalchemy.orm import Session
|
||||
from app.schema.publication import PublicationSchema
|
||||
|
||||
from app.db.models import Publication, Researcher
|
||||
from app.db.session import get_db
|
||||
from app.repositories.researcher_repository import ResearcherRepository
|
||||
from app.repositories.publication_repository import PublicationRepository
|
||||
from app.services.sync_service import SyncService
|
||||
from app.services.sword_exporter import SWORDExporter
|
||||
from app.utils.orcid_validator import is_valid_orcid
|
||||
from app.schema.researcher import ResearcherWithPublicationsSchema
|
||||
from app.services.normalizer import PublicationNormalizer
|
||||
from app.services.orcid_client import get_works_summary, get_work_detail
|
||||
|
||||
router = APIRouter(prefix="/researchers", tags=["researchers"])
|
||||
|
||||
|
||||
def validate_orcid_or_400(orcid_id: str):
|
||||
if not is_valid_orcid(orcid_id):
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail=f"ORCID ID '{orcid_id}' no es válido según el formato y dígito de control."
|
||||
# ---------------------------------------------------------
|
||||
# Función auxiliar: detectar si una publicación ha cambiado
|
||||
# ---------------------------------------------------------
|
||||
def publication_changed(existing: Publication, data: dict) -> bool:
|
||||
fields = [
|
||||
"title", "subtitle", "type", "journal",
|
||||
"pub_year", "pub_month", "pub_day",
|
||||
"doi", "url", "short_description",
|
||||
"citation_type", "citation_value",
|
||||
"language_code", "country",
|
||||
"external_ids", "contributors"
|
||||
]
|
||||
|
||||
for f in fields:
|
||||
if getattr(existing, f) != data[f]:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# ENDPOINT 1: SEARCH + SYNC (sin contadores)
|
||||
# ---------------------------------------------------------
|
||||
@router.get("/search/{orcid_id}", response_model=ResearcherWithPublicationsSchema)
|
||||
def search_and_sync_researcher(orcid_id: str, db: Session = Depends(get_db)):
|
||||
# Buscar o crear Researcher
|
||||
researcher = db.query(Researcher).filter(Researcher.orcid_id == orcid_id).first()
|
||||
if not researcher:
|
||||
researcher = Researcher(
|
||||
orcid_id=orcid_id,
|
||||
name=None,
|
||||
authenticated=False,
|
||||
last_sync_at=None,
|
||||
)
|
||||
db.add(researcher)
|
||||
db.flush()
|
||||
|
||||
# Obtener works summary desde ORCID
|
||||
works = get_works_summary(orcid_id)
|
||||
groups = works.get("group", [])
|
||||
|
||||
publications: List[Publication] = []
|
||||
|
||||
for g in groups:
|
||||
summaries = g.get("work-summary") or []
|
||||
if not summaries:
|
||||
continue
|
||||
|
||||
summary = summaries[0]
|
||||
put_code = summary.get("put-code")
|
||||
if put_code is None:
|
||||
continue
|
||||
|
||||
# Obtener detalle del work
|
||||
try:
|
||||
detail = get_work_detail(orcid_id, put_code)
|
||||
except Exception:
|
||||
detail = None
|
||||
|
||||
# Normalizar datos
|
||||
data = PublicationNormalizer.normalize(summary, detail)
|
||||
|
||||
# Ver si ya existe la publicación
|
||||
existing = (
|
||||
db.query(Publication)
|
||||
.filter(
|
||||
Publication.researcher_id == researcher.id,
|
||||
Publication.put_code == data["put_code"],
|
||||
)
|
||||
.first()
|
||||
)
|
||||
|
||||
if existing:
|
||||
for field in [
|
||||
"title", "subtitle", "type", "journal",
|
||||
"pub_year", "pub_month", "pub_day",
|
||||
"doi", "url", "short_description",
|
||||
"citation_type", "citation_value",
|
||||
"language_code", "country",
|
||||
"external_ids", "contributors"
|
||||
]:
|
||||
setattr(existing, field, data[field])
|
||||
existing.last_modified = datetime.utcnow()
|
||||
existing.status = None
|
||||
publications.append(existing)
|
||||
else:
|
||||
pub = Publication(
|
||||
researcher_id=researcher.id,
|
||||
**data,
|
||||
last_modified=datetime.utcnow(),
|
||||
)
|
||||
pub.status = None
|
||||
db.add(pub)
|
||||
publications.append(pub)
|
||||
|
||||
@router.post("/", response_model=dict)
|
||||
def create_researcher(orcid_id: str, db: Session = Depends(get_db)):
|
||||
validate_orcid_or_400(orcid_id)
|
||||
researcher.last_sync_at = datetime.utcnow()
|
||||
db.commit()
|
||||
db.refresh(researcher)
|
||||
|
||||
existing = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
if existing:
|
||||
return {
|
||||
"status": "ok",
|
||||
"message": "Researcher ya existe.",
|
||||
"orcid_id": existing.orcid_id,
|
||||
"id": existing.id
|
||||
}
|
||||
|
||||
# Aquí podrías opcionalmente validar que el ORCID existe en ORCID API
|
||||
researcher = ResearcherRepository.create(db, orcid_id, name=None)
|
||||
|
||||
return {
|
||||
"status": "ok",
|
||||
"message": "Researcher creado correctamente.",
|
||||
"orcid_id": researcher.orcid_id,
|
||||
"id": researcher.id
|
||||
}
|
||||
return ResearcherWithPublicationsSchema(
|
||||
researcher=researcher,
|
||||
publications=publications,
|
||||
new_records=0,
|
||||
updated_records=0,
|
||||
unchanged_records=0,
|
||||
total_records=len(publications),
|
||||
)
|
||||
|
||||
|
||||
@router.get("/{orcid_id}", response_model=dict)
|
||||
def get_researcher(orcid_id: str, db: Session = Depends(get_db)):
|
||||
validate_orcid_or_400(orcid_id)
|
||||
|
||||
researcher = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
if not researcher:
|
||||
raise HTTPException(status_code=404, detail="Researcher not found")
|
||||
|
||||
return {
|
||||
"orcid_id": researcher.orcid_id,
|
||||
"name": researcher.name,
|
||||
"authenticated": researcher.authenticated,
|
||||
"access_token": researcher.access_token,
|
||||
"id": researcher.id,
|
||||
"last_sync_at": researcher.last_sync_at,
|
||||
}
|
||||
|
||||
|
||||
@router.post("/{orcid_id}/sync", response_model=dict)
|
||||
# ---------------------------------------------------------
|
||||
# ENDPOINT 2: SYNC COMPLETO (con contadores + status)
|
||||
# ---------------------------------------------------------
|
||||
@router.post("/{orcid_id}/sync", response_model=ResearcherWithPublicationsSchema)
|
||||
def sync_researcher(orcid_id: str, db: Session = Depends(get_db)):
|
||||
validate_orcid_or_400(orcid_id)
|
||||
|
||||
service = SyncService()
|
||||
result = service.sync_researcher(db, orcid_id)
|
||||
return result
|
||||
|
||||
|
||||
@router.get("/{orcid_id}/publications", response_model=list[PublicationSchema], tags=["researchers"])
|
||||
def get_publications(orcid_id: str, db: Session = Depends(get_db)):
|
||||
researcher = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
if not researcher:
|
||||
raise HTTPException(status_code=404, detail="Researcher not found")
|
||||
return researcher.publications
|
||||
|
||||
|
||||
|
||||
@router.get("/{orcid_id}/export/sword.xml")
|
||||
def export_sword_xml(orcid_id: str, db: Session = Depends(get_db)):
|
||||
validate_orcid_or_400(orcid_id)
|
||||
|
||||
researcher = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
researcher = db.query(Researcher).filter_by(orcid_id=orcid_id).first()
|
||||
if not researcher:
|
||||
raise HTTPException(status_code=404, detail="Researcher not found")
|
||||
|
||||
pubs = PublicationRepository.list_by_researcher(db, researcher.id)
|
||||
xml_bytes = SWORDExporter.export_feed_xml(researcher, pubs)
|
||||
works = get_works_summary(orcid_id)
|
||||
groups = works.get("group", [])
|
||||
|
||||
return Response(
|
||||
content=xml_bytes,
|
||||
media_type="application/xml",
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="sword_{orcid_id}.xml"'
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@router.get("/{orcid_id}/export/sword.zip")
|
||||
def export_sword_zip(orcid_id: str, db: Session = Depends(get_db)):
|
||||
validate_orcid_or_400(orcid_id)
|
||||
|
||||
researcher = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
if not researcher:
|
||||
raise HTTPException(status_code=404, detail="Researcher not found")
|
||||
|
||||
pubs = PublicationRepository.list_by_researcher(db, researcher.id)
|
||||
zip_bytes = SWORDExporter.export_zip(researcher, pubs)
|
||||
|
||||
return Response(
|
||||
content=zip_bytes,
|
||||
media_type="application/zip",
|
||||
headers={
|
||||
"Content-Disposition": f'attachment; filename="sword_{orcid_id}.zip"'
|
||||
}
|
||||
publications_output = []
|
||||
|
||||
new_count = 0
|
||||
updated_count = 0
|
||||
unchanged_count = 0
|
||||
|
||||
for g in groups:
|
||||
summaries = g.get("work-summary") or []
|
||||
if not summaries:
|
||||
continue
|
||||
|
||||
summary = summaries[0]
|
||||
put_code = summary.get("put-code")
|
||||
if put_code is None:
|
||||
continue
|
||||
|
||||
try:
|
||||
detail = get_work_detail(orcid_id, put_code)
|
||||
except Exception:
|
||||
detail = None
|
||||
|
||||
data = PublicationNormalizer.normalize(summary, detail)
|
||||
|
||||
existing = (
|
||||
db.query(Publication)
|
||||
.filter(
|
||||
Publication.researcher_id == researcher.id,
|
||||
Publication.put_code == data["put_code"],
|
||||
)
|
||||
.first()
|
||||
)
|
||||
|
||||
if existing:
|
||||
if publication_changed(existing, data):
|
||||
# updated
|
||||
for field in data:
|
||||
setattr(existing, field, data[field])
|
||||
existing.last_modified = datetime.utcnow()
|
||||
existing.status = "updated"
|
||||
updated_count += 1
|
||||
else:
|
||||
# unchanged
|
||||
existing.status = "unchanged"
|
||||
unchanged_count += 1
|
||||
|
||||
pub = existing
|
||||
|
||||
else:
|
||||
# new
|
||||
pub = Publication(
|
||||
researcher_id=researcher.id,
|
||||
**data,
|
||||
last_modified=datetime.utcnow(),
|
||||
)
|
||||
pub.status = "new"
|
||||
db.add(pub)
|
||||
new_count += 1
|
||||
|
||||
db.flush()
|
||||
publications_output.append(pub)
|
||||
|
||||
researcher.last_sync_at = datetime.utcnow()
|
||||
db.commit()
|
||||
db.refresh(researcher)
|
||||
|
||||
return ResearcherWithPublicationsSchema(
|
||||
researcher=researcher,
|
||||
publications=publications_output,
|
||||
new_records=new_count,
|
||||
updated_records=updated_count,
|
||||
unchanged_records=unchanged_count,
|
||||
total_records=new_count + updated_count + unchanged_count,
|
||||
)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from sqlalchemy.orm import declarative_base
|
||||
|
||||
Base = declarative_base()
|
||||
+41
-38
@@ -1,60 +1,63 @@
|
||||
from sqlalchemy import Column, String, Boolean, Integer, DateTime, Text, ForeignKey
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.sql import func
|
||||
from sqlalchemy import Column, String, Integer, Boolean, DateTime, ForeignKey
|
||||
from sqlalchemy.dialects.postgresql import UUID, JSONB
|
||||
from sqlalchemy.orm import relationship
|
||||
from .session import Base
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from app.db.session import Base
|
||||
|
||||
|
||||
class Researcher(Base):
|
||||
__tablename__ = "researchers"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
orcid_id = Column(String(19), unique=True, nullable=False)
|
||||
name = Column(Text)
|
||||
orcid_id = Column(String, unique=True, index=True, nullable=False)
|
||||
name = Column(String, nullable=True)
|
||||
authenticated = Column(Boolean, default=False)
|
||||
access_token = Column(Text, nullable=True)
|
||||
last_sync_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
last_sync_at = Column(DateTime, nullable=True)
|
||||
|
||||
publications = relationship(
|
||||
"Publication",
|
||||
back_populates="researcher",
|
||||
cascade="all, delete-orphan"
|
||||
)
|
||||
|
||||
sync_jobs = relationship(
|
||||
"SyncJob",
|
||||
back_populates="researcher",
|
||||
cascade="all, delete-orphan"
|
||||
)
|
||||
publications = relationship("Publication", back_populates="researcher", cascade="all, delete-orphan")
|
||||
|
||||
|
||||
class Publication(Base):
|
||||
__tablename__ = "publications"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
researcher_id = Column(UUID(as_uuid=True), ForeignKey("researchers.id"))
|
||||
put_code = Column(Integer)
|
||||
title = Column(Text)
|
||||
journal = Column(Text)
|
||||
doi = Column(Text)
|
||||
pub_year = Column(Integer)
|
||||
type = Column(Text)
|
||||
hash_fingerprint = Column(Text)
|
||||
last_modified = Column(DateTime(timezone=True))
|
||||
|
||||
researcher_id = Column(UUID(as_uuid=True), ForeignKey("researchers.id"), nullable=False)
|
||||
researcher = relationship("Researcher", back_populates="publications")
|
||||
|
||||
# ORCID core
|
||||
put_code = Column(Integer, index=True, nullable=False)
|
||||
title = Column(String, nullable=True)
|
||||
subtitle = Column(String, nullable=True)
|
||||
type = Column(String, nullable=True)
|
||||
|
||||
class SyncJob(Base):
|
||||
__tablename__ = "sync_jobs"
|
||||
# Journal / container
|
||||
journal = Column(String, nullable=True)
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
researcher_id = Column(UUID(as_uuid=True), ForeignKey("researchers.id"))
|
||||
status = Column(String(20))
|
||||
new_records = Column(Integer, default=0)
|
||||
updated_records = Column(Integer, default=0)
|
||||
started_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
finished_at = Column(DateTime(timezone=True))
|
||||
# Dates
|
||||
pub_year = Column(Integer, nullable=True)
|
||||
pub_month = Column(Integer, nullable=True)
|
||||
pub_day = Column(Integer, nullable=True)
|
||||
|
||||
researcher = relationship("Researcher", back_populates="sync_jobs")
|
||||
# Identifiers / links
|
||||
doi = Column(String, nullable=True)
|
||||
url = Column(String, nullable=True)
|
||||
|
||||
# Description / citation
|
||||
short_description = Column(String, nullable=True)
|
||||
citation_type = Column(String, nullable=True)
|
||||
citation_value = Column(String, nullable=True)
|
||||
|
||||
# Language / country
|
||||
language_code = Column(String, nullable=True)
|
||||
country = Column(String, nullable=True)
|
||||
|
||||
# Extra structured data
|
||||
external_ids = Column(JSONB, nullable=True) # lista de external-id normalizados
|
||||
contributors = Column(JSONB, nullable=True) # lista de autores/roles
|
||||
|
||||
# Tu campo existente
|
||||
hash_fingerprint = Column(String, nullable=True)
|
||||
last_modified = Column(DateTime, nullable=True, default=None)
|
||||
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
from sqlalchemy.orm import Session
|
||||
from app.db.models import Publication
|
||||
|
||||
|
||||
class PublicationRepository:
|
||||
|
||||
@staticmethod
|
||||
@@ -2,6 +2,9 @@ from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker, declarative_base
|
||||
import os
|
||||
|
||||
# -----------------------------
|
||||
# DATABASE URL
|
||||
# -----------------------------
|
||||
DATABASE_URL = os.getenv("DATABASE_URL")
|
||||
|
||||
engine = create_engine(
|
||||
@@ -18,9 +21,24 @@ SessionLocal = sessionmaker(
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
|
||||
# -----------------------------
|
||||
# DB SESSION DEPENDENCY
|
||||
# -----------------------------
|
||||
def get_db():
|
||||
db = SessionLocal()
|
||||
try:
|
||||
yield db
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
|
||||
# -----------------------------
|
||||
# INIT DB (CREA TABLAS)
|
||||
# -----------------------------
|
||||
def init_db():
|
||||
# Importa modelos para que SQLAlchemy los registre
|
||||
import app.db.models # noqa
|
||||
|
||||
# Crea todas las tablas si no existen
|
||||
Base.metadata.create_all(bind=engine)
|
||||
|
||||
+24
-3
@@ -1,8 +1,15 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from app.db.session import init_db
|
||||
from app.api.researchers import router as researchers_router
|
||||
from app.db.session import Base, engine
|
||||
from app.api.export import router as export_router
|
||||
from app.scheduler.sync_scheduler import start_scheduler
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Crear instancia principal de FastAPI
|
||||
# ---------------------------------------------------------
|
||||
app = FastAPI(
|
||||
title="ORCID SWORD Backend",
|
||||
description="Backend para sincronización ORCID y exportación SWORD",
|
||||
@@ -15,7 +22,8 @@ app = FastAPI(
|
||||
# ---------------------------------------------------------
|
||||
@app.on_event("startup")
|
||||
def startup_event():
|
||||
Base.metadata.create_all(bind=engine)
|
||||
init_db() # 🔥 CREA TABLAS
|
||||
start_scheduler() # 🔥 INICIA SCHEDULER
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
@@ -29,4 +37,17 @@ def health():
|
||||
# ---------------------------------------------------------
|
||||
# Registrar routers
|
||||
# ---------------------------------------------------------
|
||||
app.include_router(researchers_router)
|
||||
app.include_router(researchers_router, prefix="/api")
|
||||
app.include_router(export_router, prefix="/api")
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# CORS
|
||||
# ---------------------------------------------------------
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"], # en producción limitar
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import requests
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from app.db.session import SessionLocal
|
||||
from app.db.repositories.researcher_repository import ResearcherRepository
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
|
||||
|
||||
# Cargar variables del .env
|
||||
load_dotenv()
|
||||
|
||||
API_KEY = os.getenv("API_KEY_VALUE")
|
||||
BASE_URL = os.getenv("BASE_URL")
|
||||
|
||||
|
||||
def run_monthly_sync():
|
||||
db = SessionLocal()
|
||||
|
||||
researchers = ResearcherRepository.get_all(db)
|
||||
|
||||
for r in researchers:
|
||||
try:
|
||||
url = f"{BASE_URL}/researchers/{r.orcid_id}/sync"
|
||||
response = requests.post(
|
||||
url,
|
||||
headers={"X-API-Key": API_KEY}
|
||||
)
|
||||
|
||||
if response.status_code != 200:
|
||||
print(f"[ERROR] Sync failed for {r.orcid_id}: {response.text}")
|
||||
else:
|
||||
print(f"[OK] Synced {r.orcid_id}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"[EXCEPTION] Error syncing {r.orcid_id}: {e}")
|
||||
|
||||
db.close()
|
||||
|
||||
|
||||
def start_scheduler():
|
||||
scheduler = BackgroundScheduler()
|
||||
scheduler.add_job(run_monthly_sync, "cron", day=1, hour=3) # día 1 a las 03:00
|
||||
scheduler.start()
|
||||
@@ -1,16 +1,30 @@
|
||||
from pydantic import BaseModel
|
||||
from uuid import UUID
|
||||
from typing import Optional, List, Any
|
||||
from datetime import datetime
|
||||
|
||||
class PublicationSchema(BaseModel):
|
||||
id: UUID
|
||||
put_code: int | None = None
|
||||
title: str
|
||||
title: str | None = None
|
||||
subtitle: str | None = None
|
||||
journal: str | None = None
|
||||
doi: str | None = None
|
||||
pub_year: int | None = None
|
||||
pub_month: int | None = None
|
||||
pub_day: int | None = None
|
||||
type: str | None = None
|
||||
url: str | None = None
|
||||
short_description: str | None = None
|
||||
citation_type: str | None = None
|
||||
citation_value: str | None = None
|
||||
language_code: str | None = None
|
||||
country: str | None = None
|
||||
external_ids: List[Any] | None = None
|
||||
contributors: List[Any] | None = None
|
||||
hash_fingerprint: str | None = None
|
||||
last_modified: str | None = None
|
||||
last_modified: datetime | None = None
|
||||
status: str | None = None
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
from pydantic import BaseModel
|
||||
from uuid import UUID
|
||||
from typing import Optional, List
|
||||
from datetime import datetime
|
||||
from app.schema.publication import PublicationSchema
|
||||
|
||||
class ResearcherSchema(BaseModel):
|
||||
id: UUID
|
||||
orcid_id: str
|
||||
name: Optional[str]
|
||||
authenticated: bool
|
||||
last_sync_at: Optional[datetime]
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class ResearcherWithPublicationsSchema(BaseModel):
|
||||
researcher: ResearcherSchema
|
||||
publications: List[PublicationSchema]
|
||||
|
||||
# NUEVOS CAMPOS
|
||||
new_records: int
|
||||
updated_records: int
|
||||
unchanged_records: int
|
||||
total_records: int
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from fastapi import Depends, HTTPException, status
|
||||
from fastapi.security import APIKeyHeader
|
||||
|
||||
# Cargar variables del .env
|
||||
load_dotenv()
|
||||
|
||||
API_KEY_NAME = os.getenv("API_KEY_NAME")
|
||||
API_KEY_VALUE = os.getenv("API_KEY_VALUE")
|
||||
|
||||
if not API_KEY_NAME:
|
||||
raise RuntimeError("ERROR: La variable API_KEY_NAME no está definida en el .env")
|
||||
|
||||
if not API_KEY_VALUE:
|
||||
raise RuntimeError("ERROR: La variable API_KEY_VALUE no está definida en el .env")
|
||||
|
||||
api_key_header = APIKeyHeader(name=API_KEY_NAME, auto_error=False)
|
||||
|
||||
|
||||
def get_api_key(api_key: str = Depends(api_key_header)):
|
||||
if api_key != API_KEY_VALUE:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="API key inválida o ausente."
|
||||
)
|
||||
return api_key
|
||||
@@ -1,74 +1,111 @@
|
||||
from typing import List
|
||||
|
||||
|
||||
def _get(d: dict | None, *keys, default=None):
|
||||
cur = d or {}
|
||||
for k in keys:
|
||||
if not isinstance(cur, dict):
|
||||
return default
|
||||
cur = cur.get(k)
|
||||
if cur is None:
|
||||
return default
|
||||
return cur
|
||||
|
||||
|
||||
class PublicationNormalizer:
|
||||
|
||||
@staticmethod
|
||||
def safe_get_title(summary):
|
||||
t = summary.get("title")
|
||||
def normalize(summary: dict, detail: dict | None = None) -> dict:
|
||||
"""
|
||||
summary: work-summary de ORCID
|
||||
detail: work completo (puede ser None si la llamada falla)
|
||||
"""
|
||||
|
||||
if t is None:
|
||||
return None
|
||||
# --- Core desde summary ---
|
||||
put_code = summary.get("put-code")
|
||||
|
||||
# Caso 1: {"title": {"value": "..."}}
|
||||
if isinstance(t, dict) and "title" in t and isinstance(t["title"], dict):
|
||||
return t["title"].get("value")
|
||||
title = _get(summary, "title", "title", "value")
|
||||
type_ = summary.get("type")
|
||||
|
||||
# Caso 2: {"title": {"title": "..."}} (muy común en /works)
|
||||
if isinstance(t, dict) and "title" in t and isinstance(t["title"], str):
|
||||
return t["title"]
|
||||
journal = _get(summary, "journal-title", "value")
|
||||
|
||||
# Caso 3: {"title": "string"}
|
||||
if isinstance(t, str):
|
||||
return t
|
||||
year = _get(summary, "publication-date", "year", "value")
|
||||
month = _get(summary, "publication-date", "month", "value")
|
||||
day = _get(summary, "publication-date", "day", "value")
|
||||
|
||||
# Caso 4: {"value": "..."}
|
||||
if isinstance(t, dict) and "value" in t:
|
||||
return t["value"]
|
||||
url = _get(summary, "url", "value")
|
||||
short_description = summary.get("short-description")
|
||||
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def normalize_work(summary: dict) -> dict:
|
||||
|
||||
title = PublicationNormalizer.safe_get_title(summary)
|
||||
|
||||
# Journal title
|
||||
journal_raw = summary.get("journal-title")
|
||||
if isinstance(journal_raw, dict):
|
||||
journal = journal_raw.get("value") or journal_raw.get("title")
|
||||
else:
|
||||
journal = journal_raw
|
||||
|
||||
# DOI
|
||||
# DOI desde summary (external-ids)
|
||||
doi = None
|
||||
ext_ids = summary.get("external-ids", {}).get("external-id", [])
|
||||
for ext in ext_ids:
|
||||
external_ids_list: List[dict] = _get(
|
||||
summary, "external-ids", "external-id", default=[]
|
||||
) or []
|
||||
for ext in external_ids_list:
|
||||
if ext.get("external-id-type") == "doi":
|
||||
doi = ext.get("external-id-value")
|
||||
break
|
||||
|
||||
# Publication year
|
||||
pub_year = (
|
||||
summary.get("publication-date", {})
|
||||
.get("year", {})
|
||||
.get("value")
|
||||
)
|
||||
# --- Si tenemos detail, enriquecemos ---
|
||||
subtitle = None
|
||||
citation_type = None
|
||||
citation_value = None
|
||||
language_code = None
|
||||
country = None
|
||||
external_ids_full: List[dict] | None = None
|
||||
contributors: List[dict] | None = None
|
||||
|
||||
# Type
|
||||
work_type = summary.get("type")
|
||||
if detail:
|
||||
# Subtitle
|
||||
subtitle = _get(detail, "title", "subtitle", "value") or subtitle
|
||||
|
||||
# put-code
|
||||
put_code = summary.get("put-code")
|
||||
# Citation
|
||||
citation_type = _get(detail, "citation", "citation-type")
|
||||
citation_value = _get(detail, "citation", "citation-value")
|
||||
|
||||
# Fingerprint
|
||||
fingerprint = f"{title}-{doi}-{pub_year}-{work_type}"
|
||||
if fingerprint:
|
||||
fingerprint = fingerprint.lower().replace(" ", "")
|
||||
# Language
|
||||
language_code = detail.get("language-code")
|
||||
|
||||
# Country
|
||||
country = _get(detail, "country", "value")
|
||||
|
||||
# External IDs completos
|
||||
external_ids_full = _get(
|
||||
detail, "external-ids", "external-id", default=[]
|
||||
) or []
|
||||
|
||||
# Contributors
|
||||
raw_contributors = _get(
|
||||
detail, "contributors", "contributor", default=[]
|
||||
) or []
|
||||
contributors = []
|
||||
for c in raw_contributors:
|
||||
contributors.append(
|
||||
{
|
||||
"name": _get(c, "credit-name", "value"),
|
||||
"orcid": _get(c, "contributor-orcid", "path"),
|
||||
"role": _get(
|
||||
c, "contributor-attributes", "contributor-role"
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
return {
|
||||
"put_code": put_code,
|
||||
"title": title or "Untitled",
|
||||
"title": title,
|
||||
"subtitle": subtitle,
|
||||
"type": type_,
|
||||
"journal": journal,
|
||||
"pub_year": int(year) if year is not None else None,
|
||||
"pub_month": int(month) if month is not None else None,
|
||||
"pub_day": int(day) if day is not None else None,
|
||||
"doi": doi,
|
||||
"pub_year": pub_year,
|
||||
"type": work_type,
|
||||
"hash_fingerprint": fingerprint
|
||||
"url": url,
|
||||
"short_description": short_description,
|
||||
"citation_type": citation_type,
|
||||
"citation_value": citation_value,
|
||||
"language_code": language_code,
|
||||
"country": country,
|
||||
"external_ids": external_ids_full,
|
||||
"contributors": contributors,
|
||||
"hash_fingerprint": None,
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import httpx
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import httpx
|
||||
|
||||
TOKEN_URL_SANDBOX = "https://sandbox.orcid.org/oauth/token"
|
||||
BASE_URL_SANDBOX = "https://pub.sandbox.orcid.org/v3.0"
|
||||
|
||||
# Si en algún momento pasas a producción, cambiarías a:
|
||||
# TOKEN_URL_PROD = "https://orcid.org/oauth/token"
|
||||
# BASE_URL_PROD = "https://pub.orcid.org/v3.0"
|
||||
|
||||
|
||||
class ORCIDClient:
|
||||
|
||||
TOKEN_URL = "https://sandbox.orcid.org/oauth/token"
|
||||
BASE_URL = "https://pub.sandbox.orcid.org/v3.0"
|
||||
|
||||
# TOKEN_URL = "https://orcid.org/oauth/token"
|
||||
# BASE_URL = "https://pub.orcid.org/v3.0"
|
||||
|
||||
def __init__(self):
|
||||
self.client_id = os.getenv("ORCID_CLIENT_ID")
|
||||
self.client_secret = os.getenv("ORCID_CLIENT_SECRET")
|
||||
self._token_cache: Optional[str] = None
|
||||
self.token_url = TOKEN_URL_SANDBOX
|
||||
self.base_url = BASE_URL_SANDBOX
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 1. Obtener token público
|
||||
# ---------------------------------------------------------
|
||||
def get_public_token(self) -> str:
|
||||
"""
|
||||
Obtiene un token público de ORCID (scope: /read-public).
|
||||
Se cachea en memoria para evitar pedirlo cada vez.
|
||||
"""
|
||||
if self._token_cache:
|
||||
return self._token_cache
|
||||
|
||||
@@ -30,11 +30,11 @@ class ORCIDClient:
|
||||
"client_id": self.client_id,
|
||||
"client_secret": self.client_secret,
|
||||
"grant_type": "client_credentials",
|
||||
"scope": "/read-public"
|
||||
"scope": "/read-public",
|
||||
}
|
||||
|
||||
with httpx.Client(timeout=20.0) as client:
|
||||
response = client.post(self.TOKEN_URL, data=data)
|
||||
response = client.post(self.token_url, data=data)
|
||||
response.raise_for_status()
|
||||
token = response.json()["access_token"]
|
||||
self._token_cache = token
|
||||
@@ -43,29 +43,53 @@ class ORCIDClient:
|
||||
# ---------------------------------------------------------
|
||||
# Headers comunes
|
||||
# ---------------------------------------------------------
|
||||
def _headers(self):
|
||||
def _headers(self) -> dict:
|
||||
token = self.get_public_token()
|
||||
return {
|
||||
"Accept": "application/json",
|
||||
"Authorization": f"Bearer {token}"
|
||||
"Authorization": f"Bearer {token}",
|
||||
}
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 2. Consultar /record
|
||||
# ---------------------------------------------------------
|
||||
def fetch_record(self, orcid_id: str) -> dict:
|
||||
url = f"{self.BASE_URL}/{orcid_id}/record"
|
||||
url = f"{self.base_url}/{orcid_id}/record"
|
||||
with httpx.Client(timeout=20.0) as client:
|
||||
response = client.get(url, headers=self._headers())
|
||||
response.raise_for_status()
|
||||
return response.json()
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 3. Consultar /works
|
||||
# 3. Consultar /works (summary)
|
||||
# ---------------------------------------------------------
|
||||
def fetch_works(self, orcid_id: str) -> dict:
|
||||
url = f"{self.BASE_URL}/{orcid_id}/works"
|
||||
url = f"{self.base_url}/{orcid_id}/works"
|
||||
with httpx.Client(timeout=20.0) as client:
|
||||
response = client.get(url, headers=self._headers())
|
||||
response.raise_for_status()
|
||||
return response.json()
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 4. Consultar /work/{put_code} (detalle)
|
||||
# ---------------------------------------------------------
|
||||
def fetch_work_detail(self, orcid_id: str, put_code: int) -> dict | None:
|
||||
url = f"{self.base_url}/{orcid_id}/work/{put_code}"
|
||||
with httpx.Client(timeout=20.0) as client:
|
||||
response = client.get(url, headers=self._headers())
|
||||
if response.status_code != 200:
|
||||
return None
|
||||
return response.json()
|
||||
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Funciones de módulo usadas en researchers.py
|
||||
# -------------------------------------------------------------------
|
||||
def get_works_summary(orcid_id: str) -> dict:
|
||||
client = ORCIDClient()
|
||||
return client.fetch_works(orcid_id)
|
||||
|
||||
|
||||
def get_work_detail(orcid_id: str, put_code: int) -> dict | None:
|
||||
client = ORCIDClient()
|
||||
return client.fetch_work_detail(orcid_id, put_code)
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
from datetime import datetime
|
||||
from xml.etree.ElementTree import Element, SubElement, tostring
|
||||
from io import BytesIO
|
||||
import zipfile
|
||||
import json
|
||||
|
||||
|
||||
class SWORDExporter:
|
||||
|
||||
ATOM_NS = "http://www.w3.org/2005/Atom"
|
||||
DC_NS = "http://purl.org/dc/elements/1.1/"
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 1) XML PRINCIPAL (sword.xml)
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def export_feed_xml(researcher, publications) -> bytes:
|
||||
feed = Element("feed", xmlns=SWORDExporter.ATOM_NS)
|
||||
|
||||
title = SubElement(feed, "title")
|
||||
title.text = f"Publications for {researcher.orcid_id}"
|
||||
|
||||
author = SubElement(feed, "author")
|
||||
name = SubElement(author, "name")
|
||||
name.text = researcher.name or "Unknown"
|
||||
|
||||
updated = SubElement(feed, "updated")
|
||||
updated.text = datetime.utcnow().isoformat() + "Z"
|
||||
|
||||
feed_id = SubElement(feed, "id")
|
||||
feed_id.text = f"urn:uuid:{researcher.id}"
|
||||
|
||||
for pub in publications:
|
||||
entry = SubElement(feed, "entry")
|
||||
|
||||
entry_id = SubElement(entry, "id")
|
||||
entry_id.text = f"urn:uuid:{pub.id}"
|
||||
|
||||
entry_updated = SubElement(entry, "updated")
|
||||
entry_updated.text = datetime.utcnow().isoformat() + "Z"
|
||||
|
||||
dc_title = SubElement(entry, f"{{{SWORDExporter.DC_NS}}}title")
|
||||
dc_title.text = pub.title
|
||||
|
||||
if pub.doi:
|
||||
dc_identifier = SubElement(entry, f"{{{SWORDExporter.DC_NS}}}identifier")
|
||||
dc_identifier.text = f"doi:{pub.doi}"
|
||||
|
||||
if pub.pub_year:
|
||||
dc_date = SubElement(entry, f"{{{SWORDExporter.DC_NS}}}date")
|
||||
dc_date.text = str(pub.pub_year)
|
||||
|
||||
if pub.type:
|
||||
dc_type = SubElement(entry, f"{{{SWORDExporter.DC_NS}}}type")
|
||||
dc_type.text = pub.type
|
||||
|
||||
if pub.journal:
|
||||
dc_source = SubElement(entry, f"{{{SWORDExporter.DC_NS}}}source")
|
||||
dc_source.text = pub.journal
|
||||
|
||||
xml_bytes = tostring(feed, encoding="utf-8", xml_declaration=True)
|
||||
return xml_bytes
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 2) manifest.txt
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_manifest(researcher, publications) -> str:
|
||||
lines = [
|
||||
"SWORD Deposit Package",
|
||||
"----------------------",
|
||||
f"Researcher ORCID: {researcher.orcid_id}",
|
||||
f"Researcher Name: {researcher.name or 'Unknown'}",
|
||||
f"Total Publications: {len(publications)}",
|
||||
f"Generated At: {datetime.utcnow().isoformat()}Z",
|
||||
"",
|
||||
"Publications:",
|
||||
]
|
||||
|
||||
for pub in publications:
|
||||
lines.append(f"- {pub.title} ({pub.pub_year}) DOI={pub.doi}")
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 3) metadata.json
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_metadata_json(researcher, publications) -> str:
|
||||
data = {
|
||||
"researcher": {
|
||||
"orcid_id": researcher.orcid_id,
|
||||
"name": researcher.name,
|
||||
"id": str(researcher.id),
|
||||
},
|
||||
"generated_at": datetime.utcnow().isoformat() + "Z",
|
||||
"publications": [
|
||||
{
|
||||
"id": str(pub.id),
|
||||
"title": pub.title,
|
||||
"doi": pub.doi,
|
||||
"year": pub.pub_year,
|
||||
"type": pub.type,
|
||||
"journal": pub.journal,
|
||||
}
|
||||
for pub in publications
|
||||
],
|
||||
}
|
||||
return json.dumps(data, indent=4)
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 4) mets.xml (versión simple)
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_mets_xml(researcher, publications) -> bytes:
|
||||
mets = Element("mets", xmlns="http://www.loc.gov/METS/")
|
||||
|
||||
header = SubElement(mets, "metsHdr")
|
||||
agent = SubElement(header, "agent", ROLE="CREATOR", TYPE="OTHER")
|
||||
name = SubElement(agent, "name")
|
||||
name.text = "ORCID Exporter System"
|
||||
|
||||
dmd_sec = SubElement(mets, "dmdSec", ID="dmd1")
|
||||
md_wrap = SubElement(dmd_sec, "mdWrap", MDTYPE="DC")
|
||||
xml_data = SubElement(md_wrap, "xmlData")
|
||||
|
||||
for pub in publications:
|
||||
dc_title = SubElement(xml_data, f"{{{SWORDExporter.DC_NS}}}title")
|
||||
dc_title.text = pub.title
|
||||
|
||||
if pub.doi:
|
||||
dc_id = SubElement(xml_data, f"{{{SWORDExporter.DC_NS}}}identifier")
|
||||
dc_id.text = f"doi:{pub.doi}"
|
||||
|
||||
return tostring(mets, encoding="utf-8", xml_declaration=True)
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# 5) ZIP FINAL
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def export_zip(researcher, publications) -> bytes:
|
||||
xml_bytes = SWORDExporter.export_feed_xml(researcher, publications)
|
||||
manifest = SWORDExporter.generate_manifest(researcher, publications)
|
||||
metadata_json = SWORDExporter.generate_metadata_json(researcher, publications)
|
||||
mets_xml = SWORDExporter.generate_mets_xml(researcher, publications)
|
||||
|
||||
mem_file = BytesIO()
|
||||
with zipfile.ZipFile(mem_file, mode="w", compression=zipfile.ZIP_DEFLATED) as zf:
|
||||
zf.writestr("sword.xml", xml_bytes)
|
||||
zf.writestr("manifest.txt", manifest)
|
||||
zf.writestr("metadata.json", metadata_json)
|
||||
zf.writestr("mets.xml", mets_xml)
|
||||
|
||||
mem_file.seek(0)
|
||||
return mem_file.read()
|
||||
@@ -0,0 +1,112 @@
|
||||
from datetime import datetime
|
||||
from xml.etree.ElementTree import Element, SubElement, tostring
|
||||
from app.db.models import Publication, Researcher
|
||||
|
||||
ATOM_NS = "http://www.w3.org/2005/Atom"
|
||||
DC_NS = "http://purl.org/dc/elements/1.1/"
|
||||
EXTRA_NS = "http://example.org/orcid-extra" # namespace para campos extendidos
|
||||
|
||||
|
||||
class SWORDGenerator:
|
||||
|
||||
@staticmethod
|
||||
def generate_feed_xml(researcher: Researcher, publications: list[Publication]) -> bytes:
|
||||
feed = Element("feed", {
|
||||
"xmlns": ATOM_NS,
|
||||
"xmlns:dc": DC_NS,
|
||||
"xmlns:extra": EXTRA_NS
|
||||
})
|
||||
|
||||
SubElement(feed, "title").text = f"Publications for {researcher.orcid_id}"
|
||||
|
||||
author = SubElement(feed, "author")
|
||||
SubElement(author, "name").text = researcher.name or "Unknown"
|
||||
|
||||
SubElement(feed, "updated").text = datetime.utcnow().isoformat() + "Z"
|
||||
SubElement(feed, "id").text = f"urn:uuid:{researcher.id}"
|
||||
|
||||
for pub in publications:
|
||||
entry = SubElement(feed, "entry")
|
||||
|
||||
SubElement(entry, "id").text = f"urn:uuid:{pub.id}"
|
||||
SubElement(entry, "updated").text = datetime.utcnow().isoformat() + "Z"
|
||||
|
||||
# Title
|
||||
SubElement(entry, f"{{{DC_NS}}}title").text = pub.title or "Untitled"
|
||||
|
||||
# Subtitle
|
||||
if pub.subtitle:
|
||||
SubElement(entry, f"{{{EXTRA_NS}}}subtitle").text = pub.subtitle
|
||||
|
||||
# DOI
|
||||
if pub.doi:
|
||||
SubElement(entry, f"{{{DC_NS}}}identifier").text = f"doi:{pub.doi}"
|
||||
|
||||
# Journal
|
||||
if pub.journal:
|
||||
SubElement(entry, f"{{{DC_NS}}}source").text = pub.journal
|
||||
|
||||
# URL
|
||||
if pub.url:
|
||||
SubElement(entry, f"{{{DC_NS}}}relation").text = pub.url
|
||||
|
||||
# Short description
|
||||
if pub.short_description:
|
||||
SubElement(entry, f"{{{DC_NS}}}description").text = pub.short_description
|
||||
|
||||
# Citation
|
||||
if pub.citation_value:
|
||||
cit = SubElement(entry, f"{{{EXTRA_NS}}}citation")
|
||||
SubElement(cit, "type").text = pub.citation_type or "unknown"
|
||||
SubElement(cit, "value").text = pub.citation_value
|
||||
|
||||
# Language
|
||||
if pub.language_code:
|
||||
SubElement(entry, f"{{{DC_NS}}}language").text = pub.language_code
|
||||
|
||||
# Country
|
||||
if pub.country:
|
||||
SubElement(entry, f"{{{EXTRA_NS}}}country").text = pub.country
|
||||
|
||||
# External IDs
|
||||
if pub.external_ids:
|
||||
ext_ids_el = SubElement(entry, f"{{{EXTRA_NS}}}external_ids")
|
||||
for ext in pub.external_ids:
|
||||
ext_el = SubElement(ext_ids_el, "external_id")
|
||||
for k, v in ext.items():
|
||||
if isinstance(v, dict) and "value" in v:
|
||||
SubElement(ext_el, k).text = v["value"]
|
||||
else:
|
||||
SubElement(ext_el, k).text = str(v)
|
||||
|
||||
# Contributors
|
||||
if pub.contributors:
|
||||
contribs_el = SubElement(entry, f"{{{EXTRA_NS}}}contributors")
|
||||
for c in pub.contributors:
|
||||
c_el = SubElement(contribs_el, "contributor")
|
||||
SubElement(c_el, "name").text = c.get("name")
|
||||
SubElement(c_el, "orcid").text = c.get("orcid")
|
||||
SubElement(c_el, "role").text = c.get("role")
|
||||
|
||||
# Date
|
||||
if pub.pub_year:
|
||||
date_str = str(pub.pub_year)
|
||||
if pub.pub_month:
|
||||
date_str += f"-{pub.pub_month:02d}"
|
||||
if pub.pub_day:
|
||||
date_str += f"-{pub.pub_day:02d}"
|
||||
SubElement(entry, f"{{{DC_NS}}}date").text = date_str
|
||||
|
||||
# Type
|
||||
if pub.type:
|
||||
SubElement(entry, f"{{{DC_NS}}}type").text = pub.type
|
||||
|
||||
# Status (new / updated / unchanged)
|
||||
if hasattr(pub, "status") and pub.status:
|
||||
SubElement(entry, f"{{{EXTRA_NS}}}status").text = pub.status
|
||||
|
||||
# Last modified
|
||||
if pub.last_modified:
|
||||
SubElement(entry, f"{{{EXTRA_NS}}}last_modified").text = pub.last_modified.isoformat()
|
||||
|
||||
return tostring(feed, encoding="utf-8", xml_declaration=True)
|
||||
@@ -1,10 +1,12 @@
|
||||
from sqlalchemy.orm import Session
|
||||
import httpx
|
||||
|
||||
from app.services.orcid_client import ORCIDClient
|
||||
from app.services.normalizer import PublicationNormalizer
|
||||
from app.repositories.researcher_repository import ResearcherRepository
|
||||
from app.repositories.publication_repository import PublicationRepository
|
||||
from app.repositories.syncjob_repository import SyncJobRepository
|
||||
import httpx
|
||||
|
||||
from app.db.repositories.researcher_repository import ResearcherRepository
|
||||
from app.db.repositories.publication_repository import PublicationRepository
|
||||
from app.db.repositories.syncjob_repository import SyncJobRepository
|
||||
|
||||
|
||||
class SyncService:
|
||||
@@ -16,8 +18,6 @@ class SyncService:
|
||||
"""
|
||||
Sincroniza las publicaciones de un investigador con manejo robusto de errores.
|
||||
"""
|
||||
|
||||
# 1. Obtener o crear investigador
|
||||
try:
|
||||
researcher = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
|
||||
@@ -35,14 +35,23 @@ class SyncService:
|
||||
if e.response.status_code == 404:
|
||||
return {
|
||||
"status": "error",
|
||||
"message": f"El ORCID {orcid_id} no existe en Sandbox."
|
||||
"code": 404,
|
||||
"message": f"El ORCID {orcid_id} no existe en ORCID."
|
||||
}
|
||||
return {"status": "error", "message": str(e)}
|
||||
return {
|
||||
"status": "error",
|
||||
"code": e.response.status_code,
|
||||
"message": f"Error al consultar ORCID: {str(e)}"
|
||||
}
|
||||
except Exception as e:
|
||||
return {
|
||||
"status": "error",
|
||||
"code": 500,
|
||||
"message": f"Error interno durante la sincronización: {str(e)}"
|
||||
}
|
||||
|
||||
# 2. Crear SyncJob
|
||||
job = SyncJobRepository.start_job(db, researcher.id)
|
||||
|
||||
# 3. Obtener works
|
||||
try:
|
||||
works_raw = self.orcid_client.fetch_works(orcid_id)
|
||||
except httpx.HTTPStatusError as e:
|
||||
@@ -56,19 +65,27 @@ class SyncService:
|
||||
"updated_records": 0,
|
||||
"total": 0
|
||||
}
|
||||
return {"status": "error", "message": str(e)}
|
||||
return {
|
||||
"status": "error",
|
||||
"code": e.response.status_code,
|
||||
"message": f"Error al obtener works de ORCID: {str(e)}"
|
||||
}
|
||||
except Exception as e:
|
||||
return {
|
||||
"status": "error",
|
||||
"code": 500,
|
||||
"message": f"Error interno al obtener works: {str(e)}"
|
||||
}
|
||||
|
||||
groups = works_raw.get("group", [])
|
||||
|
||||
new_records = 0
|
||||
updated_records = 0
|
||||
|
||||
# 4. Procesar works
|
||||
for group in groups:
|
||||
summary = group["work-summary"][0]
|
||||
normalized = PublicationNormalizer.normalize_work(summary)
|
||||
|
||||
# 🔥 AHORA SE DETECTAN DUPLICADOS POR put_code
|
||||
existing = PublicationRepository.get_by_put_code(
|
||||
db, researcher.id, normalized["put_code"]
|
||||
)
|
||||
@@ -80,17 +97,40 @@ class SyncService:
|
||||
PublicationRepository.create(db, researcher.id, normalized)
|
||||
new_records += 1
|
||||
|
||||
# 5. Finalizar SyncJob
|
||||
SyncJobRepository.finish_job(db, job, new_records, updated_records)
|
||||
|
||||
# 6. Actualizar last_sync_at
|
||||
ResearcherRepository.update_last_sync(db, researcher)
|
||||
|
||||
return {
|
||||
"status": "ok",
|
||||
"message": "Sincronización completada correctamente.",
|
||||
"researcher": researcher.orcid_id,
|
||||
"researcher_id": researcher.id,
|
||||
"new_records": new_records,
|
||||
"updated_records": updated_records,
|
||||
"total": new_records + updated_records
|
||||
}
|
||||
|
||||
def sync_and_get_full(self, db: Session, orcid_id: str):
|
||||
"""
|
||||
Sincroniza (si es necesario) y devuelve investigador + publicaciones.
|
||||
Pensado para el buscador: una sola petición.
|
||||
"""
|
||||
sync_result = self.sync_researcher(db, orcid_id)
|
||||
|
||||
if sync_result.get("status") == "error":
|
||||
return sync_result
|
||||
|
||||
researcher = ResearcherRepository.get_by_orcid(db, orcid_id)
|
||||
if not researcher:
|
||||
return {
|
||||
"status": "error",
|
||||
"code": 500,
|
||||
"message": "Error interno: investigador no encontrado tras sincronización."
|
||||
}
|
||||
|
||||
publications = PublicationRepository.list_by_researcher(db, researcher.id)
|
||||
|
||||
return {
|
||||
"status": "ok",
|
||||
"researcher": researcher,
|
||||
"publications": publications
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
import io
|
||||
import zipfile
|
||||
import json
|
||||
from datetime import datetime
|
||||
from xml.etree.ElementTree import Element, SubElement, tostring
|
||||
|
||||
from app.db.models import Publication, Researcher
|
||||
from app.services.sword_generator import SWORDGenerator
|
||||
|
||||
|
||||
class ZIPGenerator:
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# MANIFEST.TXT — más completo
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_manifest(researcher, publications):
|
||||
lines = [
|
||||
"SWORD Deposit Package",
|
||||
"----------------------",
|
||||
f"Researcher ORCID: {researcher.orcid_id}",
|
||||
f"Researcher Name: {researcher.name}",
|
||||
f"Researcher UUID: {researcher.id}",
|
||||
f"Total Publications: {len(publications)}",
|
||||
f"Generated At: {datetime.utcnow().isoformat()}Z",
|
||||
"",
|
||||
"Publications:",
|
||||
]
|
||||
|
||||
for pub in publications:
|
||||
year = pub.pub_year or "Unknown"
|
||||
lines.append(
|
||||
f"- {pub.title} ({year}) | DOI={pub.doi} | TYPE={pub.type}"
|
||||
)
|
||||
|
||||
return "\n".join(lines)
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# METADATA.JSON — ahora con TODOS los campos
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_metadata_json(researcher, publications):
|
||||
data = {
|
||||
"researcher": {
|
||||
"orcid_id": researcher.orcid_id,
|
||||
"name": researcher.name,
|
||||
"id": str(researcher.id),
|
||||
"last_sync_at": researcher.last_sync_at.isoformat() if researcher.last_sync_at else None,
|
||||
},
|
||||
"generated_at": datetime.utcnow().isoformat() + "Z",
|
||||
"publications": [],
|
||||
}
|
||||
|
||||
for pub in publications:
|
||||
data["publications"].append({
|
||||
"id": str(pub.id),
|
||||
"put_code": pub.put_code,
|
||||
"title": pub.title,
|
||||
"subtitle": pub.subtitle,
|
||||
"doi": pub.doi,
|
||||
"journal": pub.journal,
|
||||
"type": pub.type,
|
||||
"url": pub.url,
|
||||
"short_description": pub.short_description,
|
||||
"citation_type": pub.citation_type,
|
||||
"citation_value": pub.citation_value,
|
||||
"language_code": pub.language_code,
|
||||
"country": pub.country,
|
||||
"pub_year": pub.pub_year,
|
||||
"pub_month": pub.pub_month,
|
||||
"pub_day": pub.pub_day,
|
||||
"external_ids": pub.external_ids,
|
||||
"contributors": pub.contributors,
|
||||
"hash_fingerprint": pub.hash_fingerprint,
|
||||
"last_modified": pub.last_modified.isoformat() if pub.last_modified else None,
|
||||
"status": getattr(pub, "status", None),
|
||||
})
|
||||
|
||||
return json.dumps(data, indent=4)
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# METS.XML — ampliado con más metadatos
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_mets_xml(researcher, publications):
|
||||
mets = Element("mets", xmlns="http://www.loc.gov/METS/")
|
||||
|
||||
header = SubElement(mets, "metsHdr")
|
||||
agent = SubElement(header, "agent", ROLE="CREATOR", TYPE="OTHER")
|
||||
SubElement(agent, "name").text = "ORCID Exporter System"
|
||||
|
||||
dmd_sec = SubElement(mets, "dmdSec", ID="dmd1")
|
||||
md_wrap = SubElement(dmd_sec, "mdWrap", MDTYPE="DC")
|
||||
xml_data = SubElement(md_wrap, "xmlData")
|
||||
|
||||
for pub in publications:
|
||||
# Title
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}title").text = pub.title
|
||||
|
||||
# Subtitle
|
||||
if pub.subtitle:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}description").text = pub.subtitle
|
||||
|
||||
# DOI
|
||||
if pub.doi:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}identifier").text = f"doi:{pub.doi}"
|
||||
|
||||
# Journal
|
||||
if pub.journal:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}source").text = pub.journal
|
||||
|
||||
# URL
|
||||
if pub.url:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}relation").text = pub.url
|
||||
|
||||
# Description
|
||||
if pub.short_description:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}description").text = pub.short_description
|
||||
|
||||
# Citation
|
||||
if pub.citation_value:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}bibliographicCitation").text = pub.citation_value
|
||||
|
||||
# Language
|
||||
if pub.language_code:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}language").text = pub.language_code
|
||||
|
||||
# Country
|
||||
if pub.country:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}coverage").text = pub.country
|
||||
|
||||
# Date
|
||||
if pub.pub_year:
|
||||
date_str = str(pub.pub_year)
|
||||
if pub.pub_month:
|
||||
date_str += f"-{pub.pub_month:02d}"
|
||||
if pub.pub_day:
|
||||
date_str += f"-{pub.pub_day:02d}"
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}date").text = date_str
|
||||
|
||||
# Type
|
||||
if pub.type:
|
||||
SubElement(xml_data, "{http://purl.org/dc/elements/1.1/}type").text = pub.type
|
||||
|
||||
return tostring(mets, encoding="utf-8", xml_declaration=True)
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# ZIP FINAL
|
||||
# ---------------------------------------------------------
|
||||
@staticmethod
|
||||
def generate_zip(researcher, publications):
|
||||
xml_bytes = SWORDGenerator.generate_feed_xml(researcher, publications)
|
||||
manifest = ZIPGenerator.generate_manifest(researcher, publications)
|
||||
metadata_json = ZIPGenerator.generate_metadata_json(researcher, publications)
|
||||
mets_xml = ZIPGenerator.generate_mets_xml(researcher, publications)
|
||||
|
||||
mem_file = io.BytesIO()
|
||||
with zipfile.ZipFile(mem_file, "w", zipfile.ZIP_DEFLATED) as zf:
|
||||
zf.writestr("sword.xml", xml_bytes)
|
||||
zf.writestr("manifest.txt", manifest)
|
||||
zf.writestr("metadata.json", metadata_json)
|
||||
zf.writestr("mets.xml", mets_xml)
|
||||
|
||||
mem_file.seek(0)
|
||||
return mem_file.read()
|
||||
@@ -9,3 +9,5 @@ lxml
|
||||
apscheduler
|
||||
authlib
|
||||
redis
|
||||
APScheduler==3.10.4
|
||||
requests
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ services:
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
DATABASE_URL: postgresql://postgres:postgres@db:5432/orcid_db
|
||||
ORCID_CLIENT_ID: ${ORCID_CLIENT_ID}
|
||||
ORCID_CLIENT_SECRET: ${ORCID_CLIENT_SECRET}
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
|
||||
else
|
||||
exec node "$basedir/../acorn/bin/acorn" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../acorn/bin/acorn" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@"
|
||||
else
|
||||
exec node "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\baseline-browser-mapping\dist\cli.cjs" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../browserslist/cli.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../browserslist/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../eslint/bin/eslint.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../eslint/bin/eslint.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@"
|
||||
else
|
||||
exec node "$basedir/../jsesc/bin/jsesc" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../jsesc/bin/jsesc" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../json5/lib/cli.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../json5/lib/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
else
|
||||
exec node "$basedir/../nanoid/bin/nanoid.cjs" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nanoid\bin\nanoid.cjs" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../nanoid/bin/nanoid.cjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../which/bin/node-which" "$@"
|
||||
else
|
||||
exec node "$basedir/../which/bin/node-which" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\which\bin\node-which" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../which/bin/node-which" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../which/bin/node-which" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../which/bin/node-which" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@babel\parser\bin\babel-parser.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../@babel/parser/bin/babel-parser.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../rolldown/bin/cli.mjs" "$@"
|
||||
else
|
||||
exec node "$basedir/../rolldown/bin/cli.mjs" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rolldown\bin\cli.mjs" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../rolldown/bin/cli.mjs" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../rolldown/bin/cli.mjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../rolldown/bin/cli.mjs" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../rolldown/bin/cli.mjs" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../semver/bin/semver.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../semver/bin/semver.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../update-browserslist-db/cli.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../update-browserslist-db/cli.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\update-browserslist-db\cli.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../update-browserslist-db/cli.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||
|
||||
case `uname` in
|
||||
*CYGWIN*|*MINGW*|*MSYS*)
|
||||
if command -v cygpath > /dev/null 2>&1; then
|
||||
basedir=`cygpath -w "$basedir"`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x "$basedir/node" ]; then
|
||||
exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
|
||||
else
|
||||
exec node "$basedir/../vite/bin/vite.js" "$@"
|
||||
fi
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@ECHO off
|
||||
GOTO start
|
||||
:find_dp0
|
||||
SET dp0=%~dp0
|
||||
EXIT /b
|
||||
:start
|
||||
SETLOCAL
|
||||
CALL :find_dp0
|
||||
|
||||
IF EXIST "%dp0%\node.exe" (
|
||||
SET "_prog=%dp0%\node.exe"
|
||||
) ELSE (
|
||||
SET "_prog=node"
|
||||
SET PATHEXT=%PATHEXT:;.JS;=;%
|
||||
)
|
||||
|
||||
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\vite\bin\vite.js" %*
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env pwsh
|
||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||
|
||||
$exe=""
|
||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
||||
# Fix case when both the Windows and Linux builds of Node
|
||||
# are installed in the same directory
|
||||
$exe=".exe"
|
||||
}
|
||||
$ret=0
|
||||
if (Test-Path "$basedir/node$exe") {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
} else {
|
||||
& "$basedir/node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
} else {
|
||||
# Support pipeline input
|
||||
if ($MyInvocation.ExpectingInput) {
|
||||
$input | & "node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
} else {
|
||||
& "node$exe" "$basedir/../vite/bin/vite.js" $args
|
||||
}
|
||||
$ret=$LASTEXITCODE
|
||||
}
|
||||
exit $ret
|
||||
+2047
File diff suppressed because it is too large
Load Diff
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"hash": "e38e4032",
|
||||
"configHash": "6f8c0788",
|
||||
"lockfileHash": "4626cdc7",
|
||||
"browserHash": "5fd63fe8",
|
||||
"optimized": {
|
||||
"react-dom": {
|
||||
"src": "../../react-dom/index.js",
|
||||
"file": "react-dom.js",
|
||||
"fileHash": "1b0c3aff",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "2ba2936e",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "6a98495e",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "2882610e",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "1e6e7774",
|
||||
"needsInterop": true
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"react-FLDBkK74": {
|
||||
"file": "react-FLDBkK74.js",
|
||||
"isDynamicEntry": false
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
+770
@@ -0,0 +1,770 @@
|
||||
//#region \0rolldown/runtime.js
|
||||
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
||||
//#endregion
|
||||
//#region node_modules/react/cjs/react.development.js
|
||||
/**
|
||||
* @license React
|
||||
* react.development.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
(function() {
|
||||
function defineDeprecationWarning(methodName, info) {
|
||||
Object.defineProperty(Component.prototype, methodName, { get: function() {
|
||||
console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
|
||||
} });
|
||||
}
|
||||
function getIteratorFn(maybeIterable) {
|
||||
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
||||
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
||||
return "function" === typeof maybeIterable ? maybeIterable : null;
|
||||
}
|
||||
function warnNoop(publicInstance, callerName) {
|
||||
publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass";
|
||||
var warningKey = publicInstance + "." + callerName;
|
||||
didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = !0);
|
||||
}
|
||||
function Component(props, context, updater) {
|
||||
this.props = props;
|
||||
this.context = context;
|
||||
this.refs = emptyObject;
|
||||
this.updater = updater || ReactNoopUpdateQueue;
|
||||
}
|
||||
function ComponentDummy() {}
|
||||
function PureComponent(props, context, updater) {
|
||||
this.props = props;
|
||||
this.context = context;
|
||||
this.refs = emptyObject;
|
||||
this.updater = updater || ReactNoopUpdateQueue;
|
||||
}
|
||||
function noop() {}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
var JSCompiler_inline_result = !1;
|
||||
} catch (e) {
|
||||
JSCompiler_inline_result = !0;
|
||||
}
|
||||
if (JSCompiler_inline_result) {
|
||||
JSCompiler_inline_result = console;
|
||||
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
||||
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
function getComponentNameFromType(type) {
|
||||
if (null == type) return null;
|
||||
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
||||
if ("string" === typeof type) return type;
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE: return "Fragment";
|
||||
case REACT_PROFILER_TYPE: return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE: return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE: return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
|
||||
case REACT_ACTIVITY_TYPE: return "Activity";
|
||||
}
|
||||
if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
||||
case REACT_PORTAL_TYPE: return "Portal";
|
||||
case REACT_CONTEXT_TYPE: return type.displayName || "Context";
|
||||
case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
||||
return type;
|
||||
case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE:
|
||||
innerType = type._payload;
|
||||
type = type._init;
|
||||
try {
|
||||
return getComponentNameFromType(type(innerType));
|
||||
} catch (x) {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getTaskName(type) {
|
||||
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
||||
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
||||
try {
|
||||
var name = getComponentNameFromType(type);
|
||||
return name ? "<" + name + ">" : "<...>";
|
||||
} catch (x) {
|
||||
return "<...>";
|
||||
}
|
||||
}
|
||||
function getOwner() {
|
||||
var dispatcher = ReactSharedInternals.A;
|
||||
return null === dispatcher ? null : dispatcher.getOwner();
|
||||
}
|
||||
function UnknownOwner() {
|
||||
return Error("react-stack-top-frame");
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) return !1;
|
||||
}
|
||||
return void 0 !== config.key;
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
function warnAboutAccessingKey() {
|
||||
specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
||||
}
|
||||
warnAboutAccessingKey.isReactWarning = !0;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: !0
|
||||
});
|
||||
}
|
||||
function elementRefGetterWithDeprecationWarning() {
|
||||
var componentName = getComponentNameFromType(this.type);
|
||||
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
||||
componentName = this.props.ref;
|
||||
return void 0 !== componentName ? componentName : null;
|
||||
}
|
||||
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
||||
var refProp = props.ref;
|
||||
type = {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type,
|
||||
key,
|
||||
props,
|
||||
_owner: owner
|
||||
};
|
||||
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
||||
enumerable: !1,
|
||||
get: elementRefGetterWithDeprecationWarning
|
||||
}) : Object.defineProperty(type, "ref", {
|
||||
enumerable: !1,
|
||||
value: null
|
||||
});
|
||||
type._store = {};
|
||||
Object.defineProperty(type._store, "validated", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: 0
|
||||
});
|
||||
Object.defineProperty(type, "_debugInfo", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: null
|
||||
});
|
||||
Object.defineProperty(type, "_debugStack", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: debugStack
|
||||
});
|
||||
Object.defineProperty(type, "_debugTask", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: debugTask
|
||||
});
|
||||
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
||||
return type;
|
||||
}
|
||||
function cloneAndReplaceKey(oldElement, newKey) {
|
||||
newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask);
|
||||
oldElement._store && (newKey._store.validated = oldElement._store.validated);
|
||||
return newKey;
|
||||
}
|
||||
function validateChildKeys(node) {
|
||||
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
||||
}
|
||||
function isValidElement(object) {
|
||||
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
function escape(key) {
|
||||
var escaperLookup = {
|
||||
"=": "=0",
|
||||
":": "=2"
|
||||
};
|
||||
return "$" + key.replace(/[=:]/g, function(match) {
|
||||
return escaperLookup[match];
|
||||
});
|
||||
}
|
||||
function getElementKey(element, index) {
|
||||
return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36);
|
||||
}
|
||||
function resolveThenable(thenable) {
|
||||
switch (thenable.status) {
|
||||
case "fulfilled": return thenable.value;
|
||||
case "rejected": throw thenable.reason;
|
||||
default: switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) {
|
||||
"pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue);
|
||||
}, function(error) {
|
||||
"pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
||||
})), thenable.status) {
|
||||
case "fulfilled": return thenable.value;
|
||||
case "rejected": throw thenable.reason;
|
||||
}
|
||||
}
|
||||
throw thenable;
|
||||
}
|
||||
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
||||
var type = typeof children;
|
||||
if ("undefined" === type || "boolean" === type) children = null;
|
||||
var invokeCallback = !1;
|
||||
if (null === children) invokeCallback = !0;
|
||||
else switch (type) {
|
||||
case "bigint":
|
||||
case "string":
|
||||
case "number":
|
||||
invokeCallback = !0;
|
||||
break;
|
||||
case "object": switch (children.$$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
case REACT_PORTAL_TYPE:
|
||||
invokeCallback = !0;
|
||||
break;
|
||||
case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback);
|
||||
}
|
||||
}
|
||||
if (invokeCallback) {
|
||||
invokeCallback = children;
|
||||
callback = callback(invokeCallback);
|
||||
var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
|
||||
isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) {
|
||||
return c;
|
||||
})) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback));
|
||||
return 1;
|
||||
}
|
||||
invokeCallback = 0;
|
||||
childKey = "" === nameSoFar ? "." : nameSoFar + ":";
|
||||
if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
||||
else if (i = getIteratorFn(children), "function" === typeof i) for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback);
|
||||
else if ("object" === type) {
|
||||
if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback);
|
||||
array = String(children);
|
||||
throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead.");
|
||||
}
|
||||
return invokeCallback;
|
||||
}
|
||||
function mapChildren(children, func, context) {
|
||||
if (null == children) return children;
|
||||
var result = [], count = 0;
|
||||
mapIntoArray(children, result, "", "", function(child) {
|
||||
return func.call(context, child, count++);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
function lazyInitializer(payload) {
|
||||
if (-1 === payload._status) {
|
||||
var ioInfo = payload._ioInfo;
|
||||
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
|
||||
ioInfo = payload._result;
|
||||
var thenable = ioInfo();
|
||||
thenable.then(function(moduleObject) {
|
||||
if (0 === payload._status || -1 === payload._status) {
|
||||
payload._status = 1;
|
||||
payload._result = moduleObject;
|
||||
var _ioInfo = payload._ioInfo;
|
||||
null != _ioInfo && (_ioInfo.end = performance.now());
|
||||
void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject);
|
||||
}
|
||||
}, function(error) {
|
||||
if (0 === payload._status || -1 === payload._status) {
|
||||
payload._status = 2;
|
||||
payload._result = error;
|
||||
var _ioInfo2 = payload._ioInfo;
|
||||
null != _ioInfo2 && (_ioInfo2.end = performance.now());
|
||||
void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error);
|
||||
}
|
||||
});
|
||||
ioInfo = payload._ioInfo;
|
||||
if (null != ioInfo) {
|
||||
ioInfo.value = thenable;
|
||||
var displayName = thenable.displayName;
|
||||
"string" === typeof displayName && (ioInfo.name = displayName);
|
||||
}
|
||||
-1 === payload._status && (payload._status = 0, payload._result = thenable);
|
||||
}
|
||||
if (1 === payload._status) return ioInfo = payload._result, void 0 === ioInfo && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ioInfo), "default" in ioInfo || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ioInfo), ioInfo.default;
|
||||
throw payload._result;
|
||||
}
|
||||
function resolveDispatcher() {
|
||||
var dispatcher = ReactSharedInternals.H;
|
||||
null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.");
|
||||
return dispatcher;
|
||||
}
|
||||
function releaseAsyncTransition() {
|
||||
ReactSharedInternals.asyncTransitions--;
|
||||
}
|
||||
function enqueueTask(task) {
|
||||
if (null === enqueueTaskImpl) try {
|
||||
var requireString = ("require" + Math.random()).slice(0, 7);
|
||||
enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate;
|
||||
} catch (_err) {
|
||||
enqueueTaskImpl = function(callback) {
|
||||
!1 === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = !0, "undefined" === typeof MessageChannel && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
||||
var channel = new MessageChannel();
|
||||
channel.port1.onmessage = callback;
|
||||
channel.port2.postMessage(void 0);
|
||||
};
|
||||
}
|
||||
return enqueueTaskImpl(task);
|
||||
}
|
||||
function aggregateErrors(errors) {
|
||||
return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0];
|
||||
}
|
||||
function popActScope(prevActQueue, prevActScopeDepth) {
|
||||
prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
|
||||
actScopeDepth = prevActScopeDepth;
|
||||
}
|
||||
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
||||
var queue = ReactSharedInternals.actQueue;
|
||||
if (null !== queue) if (0 !== queue.length) try {
|
||||
flushActQueue(queue);
|
||||
enqueueTask(function() {
|
||||
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
||||
});
|
||||
return;
|
||||
} catch (error) {
|
||||
ReactSharedInternals.thrownErrors.push(error);
|
||||
}
|
||||
else ReactSharedInternals.actQueue = null;
|
||||
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue);
|
||||
}
|
||||
function flushActQueue(queue) {
|
||||
if (!isFlushing) {
|
||||
isFlushing = !0;
|
||||
var i = 0;
|
||||
try {
|
||||
for (; i < queue.length; i++) {
|
||||
var callback = queue[i];
|
||||
do {
|
||||
ReactSharedInternals.didUsePromise = !1;
|
||||
var continuation = callback(!1);
|
||||
if (null !== continuation) {
|
||||
if (ReactSharedInternals.didUsePromise) {
|
||||
queue[i] = callback;
|
||||
queue.splice(0, i);
|
||||
return;
|
||||
}
|
||||
callback = continuation;
|
||||
} else break;
|
||||
} while (1);
|
||||
}
|
||||
queue.length = 0;
|
||||
} catch (error) {
|
||||
queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
|
||||
} finally {
|
||||
isFlushing = !1;
|
||||
}
|
||||
}
|
||||
}
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
||||
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = {
|
||||
isMounted: function() {
|
||||
return !1;
|
||||
},
|
||||
enqueueForceUpdate: function(publicInstance) {
|
||||
warnNoop(publicInstance, "forceUpdate");
|
||||
},
|
||||
enqueueReplaceState: function(publicInstance) {
|
||||
warnNoop(publicInstance, "replaceState");
|
||||
},
|
||||
enqueueSetState: function(publicInstance) {
|
||||
warnNoop(publicInstance, "setState");
|
||||
}
|
||||
}, assign = Object.assign, emptyObject = {};
|
||||
Object.freeze(emptyObject);
|
||||
Component.prototype.isReactComponent = {};
|
||||
Component.prototype.setState = function(partialState, callback) {
|
||||
if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
|
||||
this.updater.enqueueSetState(this, partialState, callback, "setState");
|
||||
};
|
||||
Component.prototype.forceUpdate = function(callback) {
|
||||
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
|
||||
};
|
||||
var deprecatedAPIs = {
|
||||
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
||||
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
||||
};
|
||||
for (fnName in deprecatedAPIs) deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
||||
ComponentDummy.prototype = Component.prototype;
|
||||
deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
|
||||
deprecatedAPIs.constructor = PureComponent;
|
||||
assign(deprecatedAPIs, Component.prototype);
|
||||
deprecatedAPIs.isPureReactComponent = !0;
|
||||
var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = {
|
||||
H: null,
|
||||
A: null,
|
||||
T: null,
|
||||
S: null,
|
||||
actQueue: null,
|
||||
asyncTransitions: 0,
|
||||
isBatchingLegacy: !1,
|
||||
didScheduleLegacyUpdate: !1,
|
||||
didUsePromise: !1,
|
||||
thrownErrors: [],
|
||||
getCurrentStack: null,
|
||||
recentlyCreatedOwnerStacks: 0
|
||||
}, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() {
|
||||
return null;
|
||||
};
|
||||
deprecatedAPIs = { react_stack_bottom_frame: function(callStackForError) {
|
||||
return callStackForError();
|
||||
} };
|
||||
var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
|
||||
var didWarnAboutElementRef = {};
|
||||
var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)();
|
||||
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
||||
var didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
|
||||
if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
|
||||
var event = new window.ErrorEvent("error", {
|
||||
bubbles: !0,
|
||||
cancelable: !0,
|
||||
message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
|
||||
error
|
||||
});
|
||||
if (!window.dispatchEvent(event)) return;
|
||||
} else if ("object" === typeof process && "function" === typeof process.emit) {
|
||||
process.emit("uncaughtException", error);
|
||||
return;
|
||||
}
|
||||
console.error(error);
|
||||
}, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) {
|
||||
queueMicrotask(function() {
|
||||
return queueMicrotask(callback);
|
||||
});
|
||||
} : enqueueTask;
|
||||
deprecatedAPIs = Object.freeze({
|
||||
__proto__: null,
|
||||
c: function(size) {
|
||||
return resolveDispatcher().useMemoCache(size);
|
||||
}
|
||||
});
|
||||
var fnName = {
|
||||
map: mapChildren,
|
||||
forEach: function(children, forEachFunc, forEachContext) {
|
||||
mapChildren(children, function() {
|
||||
forEachFunc.apply(this, arguments);
|
||||
}, forEachContext);
|
||||
},
|
||||
count: function(children) {
|
||||
var n = 0;
|
||||
mapChildren(children, function() {
|
||||
n++;
|
||||
});
|
||||
return n;
|
||||
},
|
||||
toArray: function(children) {
|
||||
return mapChildren(children, function(child) {
|
||||
return child;
|
||||
}) || [];
|
||||
},
|
||||
only: function(children) {
|
||||
if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child.");
|
||||
return children;
|
||||
}
|
||||
};
|
||||
exports.Activity = REACT_ACTIVITY_TYPE;
|
||||
exports.Children = fnName;
|
||||
exports.Component = Component;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.Profiler = REACT_PROFILER_TYPE;
|
||||
exports.PureComponent = PureComponent;
|
||||
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
exports.Suspense = REACT_SUSPENSE_TYPE;
|
||||
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals;
|
||||
exports.__COMPILER_RUNTIME = deprecatedAPIs;
|
||||
exports.act = function(callback) {
|
||||
var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth;
|
||||
actScopeDepth++;
|
||||
var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = !1;
|
||||
try {
|
||||
var result = callback();
|
||||
} catch (error) {
|
||||
ReactSharedInternals.thrownErrors.push(error);
|
||||
}
|
||||
if (0 < ReactSharedInternals.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
||||
if (null !== result && "object" === typeof result && "function" === typeof result.then) {
|
||||
var thenable = result;
|
||||
queueSeveralMicrotasks(function() {
|
||||
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
||||
});
|
||||
return { then: function(resolve, reject) {
|
||||
didAwaitActCall = !0;
|
||||
thenable.then(function(returnValue) {
|
||||
popActScope(prevActQueue, prevActScopeDepth);
|
||||
if (0 === prevActScopeDepth) {
|
||||
try {
|
||||
flushActQueue(queue), enqueueTask(function() {
|
||||
return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
||||
});
|
||||
} catch (error$0) {
|
||||
ReactSharedInternals.thrownErrors.push(error$0);
|
||||
}
|
||||
if (0 < ReactSharedInternals.thrownErrors.length) {
|
||||
var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors);
|
||||
ReactSharedInternals.thrownErrors.length = 0;
|
||||
reject(_thrownError);
|
||||
}
|
||||
} else resolve(returnValue);
|
||||
}, function(error) {
|
||||
popActScope(prevActQueue, prevActScopeDepth);
|
||||
0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error);
|
||||
});
|
||||
} };
|
||||
}
|
||||
var returnValue$jscomp$0 = result;
|
||||
popActScope(prevActQueue, prevActScopeDepth);
|
||||
0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() {
|
||||
didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"));
|
||||
}), ReactSharedInternals.actQueue = null);
|
||||
if (0 < ReactSharedInternals.thrownErrors.length) throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
||||
return { then: function(resolve, reject) {
|
||||
didAwaitActCall = !0;
|
||||
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
||||
return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve, reject);
|
||||
})) : resolve(returnValue$jscomp$0);
|
||||
} };
|
||||
};
|
||||
exports.cache = function(fn) {
|
||||
return function() {
|
||||
return fn.apply(null, arguments);
|
||||
};
|
||||
};
|
||||
exports.cacheSignal = function() {
|
||||
return null;
|
||||
};
|
||||
exports.captureOwnerStack = function() {
|
||||
var getCurrentStack = ReactSharedInternals.getCurrentStack;
|
||||
return null === getCurrentStack ? null : getCurrentStack();
|
||||
};
|
||||
exports.cloneElement = function(element, config, children) {
|
||||
if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + ".");
|
||||
var props = assign({}, element.props), key = element.key, owner = element._owner;
|
||||
if (null != config) {
|
||||
var JSCompiler_inline_result;
|
||||
a: {
|
||||
if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) {
|
||||
JSCompiler_inline_result = !1;
|
||||
break a;
|
||||
}
|
||||
JSCompiler_inline_result = void 0 !== config.ref;
|
||||
}
|
||||
JSCompiler_inline_result && (owner = getOwner());
|
||||
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
||||
for (propName in config) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
||||
}
|
||||
var propName = arguments.length - 2;
|
||||
if (1 === propName) props.children = children;
|
||||
else if (1 < propName) {
|
||||
JSCompiler_inline_result = Array(propName);
|
||||
for (var i = 0; i < propName; i++) JSCompiler_inline_result[i] = arguments[i + 2];
|
||||
props.children = JSCompiler_inline_result;
|
||||
}
|
||||
props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask);
|
||||
for (key = 2; key < arguments.length; key++) validateChildKeys(arguments[key]);
|
||||
return props;
|
||||
};
|
||||
exports.createContext = function(defaultValue) {
|
||||
defaultValue = {
|
||||
$$typeof: REACT_CONTEXT_TYPE,
|
||||
_currentValue: defaultValue,
|
||||
_currentValue2: defaultValue,
|
||||
_threadCount: 0,
|
||||
Provider: null,
|
||||
Consumer: null
|
||||
};
|
||||
defaultValue.Provider = defaultValue;
|
||||
defaultValue.Consumer = {
|
||||
$$typeof: REACT_CONSUMER_TYPE,
|
||||
_context: defaultValue
|
||||
};
|
||||
defaultValue._currentRenderer = null;
|
||||
defaultValue._currentRenderer2 = null;
|
||||
return defaultValue;
|
||||
};
|
||||
exports.createElement = function(type, config, children) {
|
||||
for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i]);
|
||||
i = {};
|
||||
var key = null;
|
||||
if (null != config) for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]);
|
||||
var childrenLength = arguments.length - 2;
|
||||
if (1 === childrenLength) i.children = children;
|
||||
else if (1 < childrenLength) {
|
||||
for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++) childArray[_i] = arguments[_i + 2];
|
||||
Object.freeze && Object.freeze(childArray);
|
||||
i.children = childArray;
|
||||
}
|
||||
if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) void 0 === i[propName] && (i[propName] = childrenLength[propName]);
|
||||
key && defineKeyPropWarningGetter(i, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
|
||||
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
||||
return ReactElement(type, key, i, getOwner(), propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
||||
};
|
||||
exports.createRef = function() {
|
||||
var refObject = { current: null };
|
||||
Object.seal(refObject);
|
||||
return refObject;
|
||||
};
|
||||
exports.forwardRef = function(render) {
|
||||
null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : "function" !== typeof render ? console.error("forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render) : 0 !== render.length && 2 !== render.length && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
|
||||
null != render && null != render.defaultProps && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");
|
||||
var elementType = {
|
||||
$$typeof: REACT_FORWARD_REF_TYPE,
|
||||
render
|
||||
}, ownName;
|
||||
Object.defineProperty(elementType, "displayName", {
|
||||
enumerable: !1,
|
||||
configurable: !0,
|
||||
get: function() {
|
||||
return ownName;
|
||||
},
|
||||
set: function(name) {
|
||||
ownName = name;
|
||||
render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name);
|
||||
}
|
||||
});
|
||||
return elementType;
|
||||
};
|
||||
exports.isValidElement = isValidElement;
|
||||
exports.lazy = function(ctor) {
|
||||
ctor = {
|
||||
_status: -1,
|
||||
_result: ctor
|
||||
};
|
||||
var lazyType = {
|
||||
$$typeof: REACT_LAZY_TYPE,
|
||||
_payload: ctor,
|
||||
_init: lazyInitializer
|
||||
}, ioInfo = {
|
||||
name: "lazy",
|
||||
start: -1,
|
||||
end: -1,
|
||||
value: null,
|
||||
owner: null,
|
||||
debugStack: Error("react-stack-top-frame"),
|
||||
debugTask: console.createTask ? console.createTask("lazy()") : null
|
||||
};
|
||||
ctor._ioInfo = ioInfo;
|
||||
lazyType._debugInfo = [{ awaited: ioInfo }];
|
||||
return lazyType;
|
||||
};
|
||||
exports.memo = function(type, compare) {
|
||||
type ?? console.error("memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type);
|
||||
compare = {
|
||||
$$typeof: REACT_MEMO_TYPE,
|
||||
type,
|
||||
compare: void 0 === compare ? null : compare
|
||||
};
|
||||
var ownName;
|
||||
Object.defineProperty(compare, "displayName", {
|
||||
enumerable: !1,
|
||||
configurable: !0,
|
||||
get: function() {
|
||||
return ownName;
|
||||
},
|
||||
set: function(name) {
|
||||
ownName = name;
|
||||
type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name);
|
||||
}
|
||||
});
|
||||
return compare;
|
||||
};
|
||||
exports.startTransition = function(scope) {
|
||||
var prevTransition = ReactSharedInternals.T, currentTransition = {};
|
||||
currentTransition._updatedFibers = /* @__PURE__ */ new Set();
|
||||
ReactSharedInternals.T = currentTransition;
|
||||
try {
|
||||
var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S;
|
||||
null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
|
||||
"object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError));
|
||||
} catch (error) {
|
||||
reportGlobalError(error);
|
||||
} finally {
|
||||
null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition;
|
||||
}
|
||||
};
|
||||
exports.unstable_useCacheRefresh = function() {
|
||||
return resolveDispatcher().useCacheRefresh();
|
||||
};
|
||||
exports.use = function(usable) {
|
||||
return resolveDispatcher().use(usable);
|
||||
};
|
||||
exports.useActionState = function(action, initialState, permalink) {
|
||||
return resolveDispatcher().useActionState(action, initialState, permalink);
|
||||
};
|
||||
exports.useCallback = function(callback, deps) {
|
||||
return resolveDispatcher().useCallback(callback, deps);
|
||||
};
|
||||
exports.useContext = function(Context) {
|
||||
var dispatcher = resolveDispatcher();
|
||||
Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?");
|
||||
return dispatcher.useContext(Context);
|
||||
};
|
||||
exports.useDebugValue = function(value, formatterFn) {
|
||||
return resolveDispatcher().useDebugValue(value, formatterFn);
|
||||
};
|
||||
exports.useDeferredValue = function(value, initialValue) {
|
||||
return resolveDispatcher().useDeferredValue(value, initialValue);
|
||||
};
|
||||
exports.useEffect = function(create, deps) {
|
||||
create ?? console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
||||
return resolveDispatcher().useEffect(create, deps);
|
||||
};
|
||||
exports.useEffectEvent = function(callback) {
|
||||
return resolveDispatcher().useEffectEvent(callback);
|
||||
};
|
||||
exports.useId = function() {
|
||||
return resolveDispatcher().useId();
|
||||
};
|
||||
exports.useImperativeHandle = function(ref, create, deps) {
|
||||
return resolveDispatcher().useImperativeHandle(ref, create, deps);
|
||||
};
|
||||
exports.useInsertionEffect = function(create, deps) {
|
||||
create ?? console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
||||
return resolveDispatcher().useInsertionEffect(create, deps);
|
||||
};
|
||||
exports.useLayoutEffect = function(create, deps) {
|
||||
create ?? console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?");
|
||||
return resolveDispatcher().useLayoutEffect(create, deps);
|
||||
};
|
||||
exports.useMemo = function(create, deps) {
|
||||
return resolveDispatcher().useMemo(create, deps);
|
||||
};
|
||||
exports.useOptimistic = function(passthrough, reducer) {
|
||||
return resolveDispatcher().useOptimistic(passthrough, reducer);
|
||||
};
|
||||
exports.useReducer = function(reducer, initialArg, init) {
|
||||
return resolveDispatcher().useReducer(reducer, initialArg, init);
|
||||
};
|
||||
exports.useRef = function(initialValue) {
|
||||
return resolveDispatcher().useRef(initialValue);
|
||||
};
|
||||
exports.useState = function(initialState) {
|
||||
return resolveDispatcher().useState(initialState);
|
||||
};
|
||||
exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) {
|
||||
return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
||||
};
|
||||
exports.useTransition = function() {
|
||||
return resolveDispatcher().useTransition();
|
||||
};
|
||||
exports.version = "19.2.5";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
||||
})();
|
||||
}));
|
||||
//#endregion
|
||||
//#region node_modules/react/index.js
|
||||
var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = require_react_development();
|
||||
}));
|
||||
//#endregion
|
||||
export { __commonJSMin as n, require_react as t };
|
||||
|
||||
//# sourceMappingURL=react-FLDBkK74.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+185
@@ -0,0 +1,185 @@
|
||||
import { n as __commonJSMin, t as require_react } from "./react-FLDBkK74.js";
|
||||
//#region node_modules/react-dom/cjs/react-dom.development.js
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.development.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
var require_react_dom_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
||||
(function() {
|
||||
function noop() {}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function createPortal$1(children, containerInfo, implementation) {
|
||||
var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
|
||||
try {
|
||||
testStringCoercion(key);
|
||||
var JSCompiler_inline_result = !1;
|
||||
} catch (e) {
|
||||
JSCompiler_inline_result = !0;
|
||||
}
|
||||
JSCompiler_inline_result && (console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"), testStringCoercion(key));
|
||||
return {
|
||||
$$typeof: REACT_PORTAL_TYPE,
|
||||
key: null == key ? null : "" + key,
|
||||
children,
|
||||
containerInfo,
|
||||
implementation
|
||||
};
|
||||
}
|
||||
function getCrossOriginStringAs(as, input) {
|
||||
if ("font" === as) return "";
|
||||
if ("string" === typeof input) return "use-credentials" === input ? input : "";
|
||||
}
|
||||
function getValueDescriptorExpectingObjectForWarning(thing) {
|
||||
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "something with type \"" + typeof thing + "\"";
|
||||
}
|
||||
function getValueDescriptorExpectingEnumForWarning(thing) {
|
||||
return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : "something with type \"" + typeof thing + "\"";
|
||||
}
|
||||
function resolveDispatcher() {
|
||||
var dispatcher = ReactSharedInternals.H;
|
||||
null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.");
|
||||
return dispatcher;
|
||||
}
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
||||
var React = require_react(), Internals = {
|
||||
d: {
|
||||
f: noop,
|
||||
r: function() {
|
||||
throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.");
|
||||
},
|
||||
D: noop,
|
||||
C: noop,
|
||||
L: noop,
|
||||
m: noop,
|
||||
X: noop,
|
||||
S: noop,
|
||||
M: noop
|
||||
},
|
||||
p: 0,
|
||||
findDOMNode: null
|
||||
}, REACT_PORTAL_TYPE = Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
||||
"function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");
|
||||
exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
|
||||
exports.createPortal = function(children, container) {
|
||||
var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
|
||||
if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) throw Error("Target container is not a DOM element.");
|
||||
return createPortal$1(children, container, null, key);
|
||||
};
|
||||
exports.flushSync = function(fn) {
|
||||
var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
|
||||
try {
|
||||
if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn();
|
||||
} finally {
|
||||
ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");
|
||||
}
|
||||
};
|
||||
exports.preconnect = function(href, options) {
|
||||
"string" === typeof href && href ? null != options && "object" !== typeof options ? console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", getValueDescriptorExpectingEnumForWarning(options)) : null != options && "string" !== typeof options.crossOrigin && console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", getValueDescriptorExpectingObjectForWarning(options.crossOrigin)) : console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href));
|
||||
"string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
|
||||
};
|
||||
exports.prefetchDNS = function(href) {
|
||||
if ("string" !== typeof href || !href) console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href));
|
||||
else if (1 < arguments.length) {
|
||||
var options = arguments[1];
|
||||
"object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", getValueDescriptorExpectingEnumForWarning(options)) : console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", getValueDescriptorExpectingEnumForWarning(options));
|
||||
}
|
||||
"string" === typeof href && Internals.d.D(href);
|
||||
};
|
||||
exports.preinit = function(href, options) {
|
||||
"string" === typeof href && href ? null == options || "object" !== typeof options ? console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", getValueDescriptorExpectingEnumForWarning(options)) : "style" !== options.as && "script" !== options.as && console.error("ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".", getValueDescriptorExpectingEnumForWarning(options.as)) : console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href));
|
||||
if ("string" === typeof href && options && "string" === typeof options.as) {
|
||||
var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0;
|
||||
"style" === as ? Internals.d.S(href, "string" === typeof options.precedence ? options.precedence : void 0, {
|
||||
crossOrigin,
|
||||
integrity,
|
||||
fetchPriority
|
||||
}) : "script" === as && Internals.d.X(href, {
|
||||
crossOrigin,
|
||||
integrity,
|
||||
fetchPriority,
|
||||
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.preinitModule = function(href, options) {
|
||||
var encountered = "";
|
||||
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
|
||||
void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".");
|
||||
if (encountered) console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", encountered);
|
||||
else switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
|
||||
case "script": break;
|
||||
default: encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error("ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)", encountered, href);
|
||||
}
|
||||
if ("string" === typeof href) if ("object" === typeof options && null !== options) {
|
||||
if (null == options.as || "script" === options.as) encountered = getCrossOriginStringAs(options.as, options.crossOrigin), Internals.d.M(href, {
|
||||
crossOrigin: encountered,
|
||||
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
|
||||
nonce: "string" === typeof options.nonce ? options.nonce : void 0
|
||||
});
|
||||
} else options ?? Internals.d.M(href);
|
||||
};
|
||||
exports.preload = function(href, options) {
|
||||
var encountered = "";
|
||||
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
|
||||
null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
|
||||
encountered && console.error("ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel=\"preload\" as=\"...\" />` tag.%s", encountered);
|
||||
if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
|
||||
encountered = options.as;
|
||||
var crossOrigin = getCrossOriginStringAs(encountered, options.crossOrigin);
|
||||
Internals.d.L(href, encountered, {
|
||||
crossOrigin,
|
||||
integrity: "string" === typeof options.integrity ? options.integrity : void 0,
|
||||
nonce: "string" === typeof options.nonce ? options.nonce : void 0,
|
||||
type: "string" === typeof options.type ? options.type : void 0,
|
||||
fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
|
||||
referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
|
||||
imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
|
||||
imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
|
||||
media: "string" === typeof options.media ? options.media : void 0
|
||||
});
|
||||
}
|
||||
};
|
||||
exports.preloadModule = function(href, options) {
|
||||
var encountered = "";
|
||||
"string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
|
||||
void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".");
|
||||
encountered && console.error("ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel=\"modulepreload\" as=\"...\" />` tag.%s", encountered);
|
||||
"string" === typeof href && (options ? (encountered = getCrossOriginStringAs(options.as, options.crossOrigin), Internals.d.m(href, {
|
||||
as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
|
||||
crossOrigin: encountered,
|
||||
integrity: "string" === typeof options.integrity ? options.integrity : void 0
|
||||
})) : Internals.d.m(href));
|
||||
};
|
||||
exports.requestFormReset = function(form) {
|
||||
Internals.d.r(form);
|
||||
};
|
||||
exports.unstable_batchedUpdates = function(fn, a) {
|
||||
return fn(a);
|
||||
};
|
||||
exports.useFormState = function(action, initialState, permalink) {
|
||||
return resolveDispatcher().useFormState(action, initialState, permalink);
|
||||
};
|
||||
exports.useFormStatus = function() {
|
||||
return resolveDispatcher().useHostTransitionStatus();
|
||||
};
|
||||
exports.version = "19.2.5";
|
||||
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
||||
})();
|
||||
}));
|
||||
//#endregion
|
||||
//#region node_modules/react-dom/index.js
|
||||
var require_react_dom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = require_react_dom_development();
|
||||
}));
|
||||
//#endregion
|
||||
export default require_react_dom();
|
||||
export { require_react_dom as t };
|
||||
|
||||
//# sourceMappingURL=react-dom.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+14384
File diff suppressed because it is too large
Load Diff
+1
File diff suppressed because one or more lines are too long
+2
@@ -0,0 +1,2 @@
|
||||
import { t as require_react } from "./react-FLDBkK74.js";
|
||||
export default require_react();
|
||||
+204
@@ -0,0 +1,204 @@
|
||||
import { n as __commonJSMin, t as require_react } from "./react-FLDBkK74.js";
|
||||
//#region node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-dev-runtime.development.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
var require_react_jsx_dev_runtime_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
||||
(function() {
|
||||
function getComponentNameFromType(type) {
|
||||
if (null == type) return null;
|
||||
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
||||
if ("string" === typeof type) return type;
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE: return "Fragment";
|
||||
case REACT_PROFILER_TYPE: return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE: return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE: return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
|
||||
case REACT_ACTIVITY_TYPE: return "Activity";
|
||||
}
|
||||
if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
||||
case REACT_PORTAL_TYPE: return "Portal";
|
||||
case REACT_CONTEXT_TYPE: return type.displayName || "Context";
|
||||
case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
||||
return type;
|
||||
case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE:
|
||||
innerType = type._payload;
|
||||
type = type._init;
|
||||
try {
|
||||
return getComponentNameFromType(type(innerType));
|
||||
} catch (x) {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
var JSCompiler_inline_result = !1;
|
||||
} catch (e) {
|
||||
JSCompiler_inline_result = !0;
|
||||
}
|
||||
if (JSCompiler_inline_result) {
|
||||
JSCompiler_inline_result = console;
|
||||
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
||||
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
function getTaskName(type) {
|
||||
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
||||
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
||||
try {
|
||||
var name = getComponentNameFromType(type);
|
||||
return name ? "<" + name + ">" : "<...>";
|
||||
} catch (x) {
|
||||
return "<...>";
|
||||
}
|
||||
}
|
||||
function getOwner() {
|
||||
var dispatcher = ReactSharedInternals.A;
|
||||
return null === dispatcher ? null : dispatcher.getOwner();
|
||||
}
|
||||
function UnknownOwner() {
|
||||
return Error("react-stack-top-frame");
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) return !1;
|
||||
}
|
||||
return void 0 !== config.key;
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
function warnAboutAccessingKey() {
|
||||
specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
||||
}
|
||||
warnAboutAccessingKey.isReactWarning = !0;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: !0
|
||||
});
|
||||
}
|
||||
function elementRefGetterWithDeprecationWarning() {
|
||||
var componentName = getComponentNameFromType(this.type);
|
||||
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
||||
componentName = this.props.ref;
|
||||
return void 0 !== componentName ? componentName : null;
|
||||
}
|
||||
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
||||
var refProp = props.ref;
|
||||
type = {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type,
|
||||
key,
|
||||
props,
|
||||
_owner: owner
|
||||
};
|
||||
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
||||
enumerable: !1,
|
||||
get: elementRefGetterWithDeprecationWarning
|
||||
}) : Object.defineProperty(type, "ref", {
|
||||
enumerable: !1,
|
||||
value: null
|
||||
});
|
||||
type._store = {};
|
||||
Object.defineProperty(type._store, "validated", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: 0
|
||||
});
|
||||
Object.defineProperty(type, "_debugInfo", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: null
|
||||
});
|
||||
Object.defineProperty(type, "_debugStack", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: debugStack
|
||||
});
|
||||
Object.defineProperty(type, "_debugTask", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: debugTask
|
||||
});
|
||||
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
||||
return type;
|
||||
}
|
||||
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
||||
var children = config.children;
|
||||
if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
|
||||
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
|
||||
Object.freeze && Object.freeze(children);
|
||||
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
||||
else validateChildKeys(children);
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
children = getComponentNameFromType(type);
|
||||
var keys = Object.keys(config).filter(function(k) {
|
||||
return "key" !== k;
|
||||
});
|
||||
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
||||
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
|
||||
}
|
||||
children = null;
|
||||
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
||||
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
||||
if ("key" in config) {
|
||||
maybeKey = {};
|
||||
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
||||
} else maybeKey = config;
|
||||
children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
|
||||
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
||||
}
|
||||
function validateChildKeys(node) {
|
||||
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
||||
}
|
||||
function isValidElement(object) {
|
||||
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
||||
return null;
|
||||
};
|
||||
React = { react_stack_bottom_frame: function(callStackForError) {
|
||||
return callStackForError();
|
||||
} };
|
||||
var specialPropKeyWarningShown;
|
||||
var didWarnAboutElementRef = {};
|
||||
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
||||
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
||||
var didWarnAboutKeySpread = {};
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsxDEV = function(type, config, maybeKey, isStaticChildren) {
|
||||
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
||||
return jsxDEVImpl(type, config, maybeKey, isStaticChildren, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
||||
};
|
||||
})();
|
||||
}));
|
||||
//#endregion
|
||||
//#region node_modules/react/jsx-dev-runtime.js
|
||||
var require_jsx_dev_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = require_react_jsx_dev_runtime_development();
|
||||
}));
|
||||
//#endregion
|
||||
export default require_jsx_dev_runtime();
|
||||
|
||||
//# sourceMappingURL=react_jsx-dev-runtime.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+208
@@ -0,0 +1,208 @@
|
||||
import { n as __commonJSMin, t as require_react } from "./react-FLDBkK74.js";
|
||||
//#region node_modules/react/cjs/react-jsx-runtime.development.js
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.development.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
var require_react_jsx_runtime_development = /* @__PURE__ */ __commonJSMin(((exports) => {
|
||||
(function() {
|
||||
function getComponentNameFromType(type) {
|
||||
if (null == type) return null;
|
||||
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
||||
if ("string" === typeof type) return type;
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE: return "Fragment";
|
||||
case REACT_PROFILER_TYPE: return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE: return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE: return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList";
|
||||
case REACT_ACTIVITY_TYPE: return "Activity";
|
||||
}
|
||||
if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
||||
case REACT_PORTAL_TYPE: return "Portal";
|
||||
case REACT_CONTEXT_TYPE: return type.displayName || "Context";
|
||||
case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
var innerType = type.render;
|
||||
type = type.displayName;
|
||||
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
||||
return type;
|
||||
case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE:
|
||||
innerType = type._payload;
|
||||
type = type._init;
|
||||
try {
|
||||
return getComponentNameFromType(type(innerType));
|
||||
} catch (x) {}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
var JSCompiler_inline_result = !1;
|
||||
} catch (e) {
|
||||
JSCompiler_inline_result = !0;
|
||||
}
|
||||
if (JSCompiler_inline_result) {
|
||||
JSCompiler_inline_result = console;
|
||||
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
||||
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
function getTaskName(type) {
|
||||
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
||||
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
||||
try {
|
||||
var name = getComponentNameFromType(type);
|
||||
return name ? "<" + name + ">" : "<...>";
|
||||
} catch (x) {
|
||||
return "<...>";
|
||||
}
|
||||
}
|
||||
function getOwner() {
|
||||
var dispatcher = ReactSharedInternals.A;
|
||||
return null === dispatcher ? null : dispatcher.getOwner();
|
||||
}
|
||||
function UnknownOwner() {
|
||||
return Error("react-stack-top-frame");
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) return !1;
|
||||
}
|
||||
return void 0 !== config.key;
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
function warnAboutAccessingKey() {
|
||||
specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
||||
}
|
||||
warnAboutAccessingKey.isReactWarning = !0;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: !0
|
||||
});
|
||||
}
|
||||
function elementRefGetterWithDeprecationWarning() {
|
||||
var componentName = getComponentNameFromType(this.type);
|
||||
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
||||
componentName = this.props.ref;
|
||||
return void 0 !== componentName ? componentName : null;
|
||||
}
|
||||
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
||||
var refProp = props.ref;
|
||||
type = {
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
type,
|
||||
key,
|
||||
props,
|
||||
_owner: owner
|
||||
};
|
||||
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
||||
enumerable: !1,
|
||||
get: elementRefGetterWithDeprecationWarning
|
||||
}) : Object.defineProperty(type, "ref", {
|
||||
enumerable: !1,
|
||||
value: null
|
||||
});
|
||||
type._store = {};
|
||||
Object.defineProperty(type._store, "validated", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: 0
|
||||
});
|
||||
Object.defineProperty(type, "_debugInfo", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: null
|
||||
});
|
||||
Object.defineProperty(type, "_debugStack", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: debugStack
|
||||
});
|
||||
Object.defineProperty(type, "_debugTask", {
|
||||
configurable: !1,
|
||||
enumerable: !1,
|
||||
writable: !0,
|
||||
value: debugTask
|
||||
});
|
||||
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
||||
return type;
|
||||
}
|
||||
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
||||
var children = config.children;
|
||||
if (void 0 !== children) if (isStaticChildren) if (isArrayImpl(children)) {
|
||||
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
|
||||
Object.freeze && Object.freeze(children);
|
||||
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
||||
else validateChildKeys(children);
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
children = getComponentNameFromType(type);
|
||||
var keys = Object.keys(config).filter(function(k) {
|
||||
return "key" !== k;
|
||||
});
|
||||
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
||||
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = !0);
|
||||
}
|
||||
children = null;
|
||||
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
||||
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
||||
if ("key" in config) {
|
||||
maybeKey = {};
|
||||
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
||||
} else maybeKey = config;
|
||||
children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
|
||||
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
||||
}
|
||||
function validateChildKeys(node) {
|
||||
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
||||
}
|
||||
function isValidElement(object) {
|
||||
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
|
||||
return null;
|
||||
};
|
||||
React = { react_stack_bottom_frame: function(callStackForError) {
|
||||
return callStackForError();
|
||||
} };
|
||||
var specialPropKeyWarningShown;
|
||||
var didWarnAboutElementRef = {};
|
||||
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
||||
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
||||
var didWarnAboutKeySpread = {};
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsx = function(type, config, maybeKey) {
|
||||
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
||||
return jsxDEVImpl(type, config, maybeKey, !1, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
||||
};
|
||||
exports.jsxs = function(type, config, maybeKey) {
|
||||
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
||||
return jsxDEVImpl(type, config, maybeKey, !0, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
||||
};
|
||||
})();
|
||||
}));
|
||||
//#endregion
|
||||
//#region node_modules/react/jsx-runtime.js
|
||||
var require_jsx_runtime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
||||
module.exports = require_react_jsx_runtime_development();
|
||||
}));
|
||||
//#endregion
|
||||
export default require_jsx_runtime();
|
||||
|
||||
//# sourceMappingURL=react_jsx-runtime.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+22
@@ -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.
|
||||
+19
@@ -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
|
||||
```
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var picocolors = require('picocolors');
|
||||
var jsTokens = require('js-tokens');
|
||||
var helperValidatorIdentifier = require('@babel/helper-validator-identifier');
|
||||
|
||||
function isColorSupported() {
|
||||
return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported
|
||||
);
|
||||
}
|
||||
const compose = (f, g) => v => f(g(v));
|
||||
function buildDefs(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),
|
||||
gutter: colors.gray,
|
||||
marker: compose(colors.red, colors.bold),
|
||||
message: compose(colors.red, colors.bold),
|
||||
reset: colors.reset
|
||||
};
|
||||
}
|
||||
const defsOn = buildDefs(picocolors.createColors(true));
|
||||
const defsOff = buildDefs(picocolors.createColors(false));
|
||||
function getDefs(enabled) {
|
||||
return enabled ? defsOn : defsOff;
|
||||
}
|
||||
|
||||
const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
|
||||
const NEWLINE$1 = /\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") {
|
||||
const tokenValue = token.value;
|
||||
if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) {
|
||||
return "keyword";
|
||||
}
|
||||
if (JSX_TAG.test(tokenValue) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) {
|
||||
return "jsxIdentifier";
|
||||
}
|
||||
const firstChar = String.fromCodePoint(tokenValue.codePointAt(0));
|
||||
if (firstChar !== firstChar.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 highlight(text) {
|
||||
if (text === "") return "";
|
||||
const defs = getDefs(true);
|
||||
let highlighted = "";
|
||||
for (const {
|
||||
type,
|
||||
value
|
||||
} of tokenize(text)) {
|
||||
if (type in defs) {
|
||||
highlighted += value.split(NEWLINE$1).map(str => defs[type](str)).join("\n");
|
||||
} else {
|
||||
highlighted += value;
|
||||
}
|
||||
}
|
||||
return highlighted;
|
||||
}
|
||||
|
||||
let deprecationWarningShown = false;
|
||||
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
||||
function getMarkerLines(loc, source, opts, startLineBaseZero) {
|
||||
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 - startLineBaseZero;
|
||||
const startColumn = startLoc.column;
|
||||
const endLine = endLoc.line - startLineBaseZero;
|
||||
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 shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
|
||||
const startLineBaseZero = (opts.startLine || 1) - 1;
|
||||
const defs = getDefs(shouldHighlight);
|
||||
const lines = rawLines.split(NEWLINE);
|
||||
const {
|
||||
start,
|
||||
end,
|
||||
markerLines
|
||||
} = getMarkerLines(loc, lines, opts, startLineBaseZero);
|
||||
const hasColumns = loc.start && typeof loc.start.column === "number";
|
||||
const numberMaxWidth = String(end + startLineBaseZero).length;
|
||||
const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
|
||||
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
|
||||
const number = start + 1 + index;
|
||||
const paddedNumber = ` ${number + startLineBaseZero}`.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 ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join("");
|
||||
if (lastMarkerLine && opts.message) {
|
||||
markerLine += " " + defs.message(opts.message);
|
||||
}
|
||||
}
|
||||
return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
|
||||
} else {
|
||||
return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
|
||||
}
|
||||
}).join("\n");
|
||||
if (opts.message && !hasColumns) {
|
||||
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
|
||||
}
|
||||
if (shouldHighlight) {
|
||||
return defs.reset(frame);
|
||||
} else {
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
function index (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);
|
||||
}
|
||||
|
||||
exports.codeFrameColumns = codeFrameColumns;
|
||||
exports.default = index;
|
||||
exports.highlight = highlight;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
+32
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "@babel/code-frame",
|
||||
"version": "7.29.0",
|
||||
"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/helper-validator-identifier": "^7.28.5",
|
||||
"js-tokens": "^4.0.0",
|
||||
"picocolors": "^1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"charcodes": "^0.2.0",
|
||||
"import-meta-resolve": "^4.1.0",
|
||||
"strip-ansi": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"type": "commonjs"
|
||||
}
|
||||
+22
@@ -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.
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
# @babel/compat-data
|
||||
|
||||
> The compat-data to determine required Babel plugins
|
||||
|
||||
See our website [@babel/compat-data](https://babeljs.io/docs/babel-compat-data) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/compat-data
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/compat-data
|
||||
```
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file as Babel 8 drop support of core-js 2
|
||||
module.exports = require("./data/corejs2-built-ins.json");
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file now that it is included in babel-plugin-polyfill-corejs3
|
||||
module.exports = require("./data/corejs3-shipped-proposals.json");
|
||||
+2106
File diff suppressed because it is too large
Load Diff
+5
@@ -0,0 +1,5 @@
|
||||
[
|
||||
"esnext.promise.all-settled",
|
||||
"esnext.string.match-all",
|
||||
"esnext.global-this"
|
||||
]
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"es6.module": {
|
||||
"chrome": "61",
|
||||
"and_chr": "61",
|
||||
"edge": "16",
|
||||
"firefox": "60",
|
||||
"and_ff": "60",
|
||||
"node": "13.2.0",
|
||||
"opera": "48",
|
||||
"op_mob": "45",
|
||||
"safari": "10.1",
|
||||
"ios": "10.3",
|
||||
"samsung": "8.2",
|
||||
"android": "61",
|
||||
"electron": "2.0",
|
||||
"ios_saf": "10.3"
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"transform-async-to-generator": [
|
||||
"bugfix/transform-async-arrows-in-class"
|
||||
],
|
||||
"transform-parameters": [
|
||||
"bugfix/transform-edge-default-parameters",
|
||||
"bugfix/transform-safari-id-destructuring-collision-in-function-expression"
|
||||
],
|
||||
"transform-function-name": [
|
||||
"bugfix/transform-edge-function-name"
|
||||
],
|
||||
"transform-block-scoping": [
|
||||
"bugfix/transform-safari-block-shadowing",
|
||||
"bugfix/transform-safari-for-shadowing"
|
||||
],
|
||||
"transform-template-literals": [
|
||||
"bugfix/transform-tagged-template-caching"
|
||||
],
|
||||
"transform-optional-chaining": [
|
||||
"bugfix/transform-v8-spread-parameters-in-optional-chaining"
|
||||
],
|
||||
"proposal-optional-chaining": [
|
||||
"bugfix/transform-v8-spread-parameters-in-optional-chaining"
|
||||
],
|
||||
"transform-class-properties": [
|
||||
"bugfix/transform-v8-static-class-fields-redefine-readonly",
|
||||
"bugfix/transform-firefox-class-in-computed-class-key",
|
||||
"bugfix/transform-safari-class-field-initializer-scope"
|
||||
],
|
||||
"proposal-class-properties": [
|
||||
"bugfix/transform-v8-static-class-fields-redefine-readonly",
|
||||
"bugfix/transform-firefox-class-in-computed-class-key",
|
||||
"bugfix/transform-safari-class-field-initializer-scope"
|
||||
]
|
||||
}
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
{
|
||||
"bugfix/transform-async-arrows-in-class": {
|
||||
"chrome": "55",
|
||||
"opera": "42",
|
||||
"edge": "15",
|
||||
"firefox": "52",
|
||||
"safari": "11",
|
||||
"node": "7.6",
|
||||
"deno": "1",
|
||||
"ios": "11",
|
||||
"samsung": "6",
|
||||
"opera_mobile": "42",
|
||||
"electron": "1.6"
|
||||
},
|
||||
"bugfix/transform-edge-default-parameters": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "18",
|
||||
"firefox": "52",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"bugfix/transform-edge-function-name": {
|
||||
"chrome": "51",
|
||||
"opera": "38",
|
||||
"edge": "79",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "41",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"bugfix/transform-safari-block-shadowing": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "12",
|
||||
"firefox": "44",
|
||||
"safari": "11",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ie": "11",
|
||||
"ios": "11",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"bugfix/transform-safari-for-shadowing": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "12",
|
||||
"firefox": "4",
|
||||
"safari": "11",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ie": "11",
|
||||
"ios": "11",
|
||||
"samsung": "5",
|
||||
"rhino": "1.7.13",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "14",
|
||||
"firefox": "2",
|
||||
"safari": "16.3",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "16.3",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"bugfix/transform-tagged-template-caching": {
|
||||
"chrome": "41",
|
||||
"opera": "28",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "13",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "13",
|
||||
"samsung": "3.4",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "28",
|
||||
"electron": "0.21"
|
||||
},
|
||||
"bugfix/transform-v8-spread-parameters-in-optional-chaining": {
|
||||
"chrome": "91",
|
||||
"opera": "77",
|
||||
"edge": "91",
|
||||
"firefox": "74",
|
||||
"safari": "13.1",
|
||||
"node": "16.9",
|
||||
"deno": "1.9",
|
||||
"ios": "13.4",
|
||||
"samsung": "16",
|
||||
"opera_mobile": "64",
|
||||
"electron": "13.0"
|
||||
},
|
||||
"transform-optional-chaining": {
|
||||
"chrome": "80",
|
||||
"opera": "67",
|
||||
"edge": "80",
|
||||
"firefox": "74",
|
||||
"safari": "13.1",
|
||||
"node": "14",
|
||||
"deno": "1",
|
||||
"ios": "13.4",
|
||||
"samsung": "13",
|
||||
"rhino": "1.8",
|
||||
"opera_mobile": "57",
|
||||
"electron": "8.0"
|
||||
},
|
||||
"proposal-optional-chaining": {
|
||||
"chrome": "80",
|
||||
"opera": "67",
|
||||
"edge": "80",
|
||||
"firefox": "74",
|
||||
"safari": "13.1",
|
||||
"node": "14",
|
||||
"deno": "1",
|
||||
"ios": "13.4",
|
||||
"samsung": "13",
|
||||
"rhino": "1.8",
|
||||
"opera_mobile": "57",
|
||||
"electron": "8.0"
|
||||
},
|
||||
"transform-parameters": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "15",
|
||||
"firefox": "52",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"transform-async-to-generator": {
|
||||
"chrome": "55",
|
||||
"opera": "42",
|
||||
"edge": "15",
|
||||
"firefox": "52",
|
||||
"safari": "10.1",
|
||||
"node": "7.6",
|
||||
"deno": "1",
|
||||
"ios": "10.3",
|
||||
"samsung": "6",
|
||||
"opera_mobile": "42",
|
||||
"electron": "1.6"
|
||||
},
|
||||
"transform-template-literals": {
|
||||
"chrome": "41",
|
||||
"opera": "28",
|
||||
"edge": "13",
|
||||
"firefox": "34",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "9",
|
||||
"samsung": "3.4",
|
||||
"opera_mobile": "28",
|
||||
"electron": "0.21"
|
||||
},
|
||||
"transform-function-name": {
|
||||
"chrome": "51",
|
||||
"opera": "38",
|
||||
"edge": "14",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "41",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-block-scoping": {
|
||||
"chrome": "50",
|
||||
"opera": "37",
|
||||
"edge": "14",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "37",
|
||||
"electron": "1.1"
|
||||
}
|
||||
}
|
||||
+838
@@ -0,0 +1,838 @@
|
||||
{
|
||||
"transform-explicit-resource-management": {
|
||||
"chrome": "134",
|
||||
"edge": "134",
|
||||
"firefox": "141",
|
||||
"node": "24",
|
||||
"electron": "35.0"
|
||||
},
|
||||
"transform-duplicate-named-capturing-groups-regex": {
|
||||
"chrome": "126",
|
||||
"opera": "112",
|
||||
"edge": "126",
|
||||
"firefox": "129",
|
||||
"safari": "17.4",
|
||||
"node": "23",
|
||||
"ios": "17.4",
|
||||
"electron": "31.0"
|
||||
},
|
||||
"transform-regexp-modifiers": {
|
||||
"chrome": "125",
|
||||
"opera": "111",
|
||||
"edge": "125",
|
||||
"firefox": "132",
|
||||
"node": "23",
|
||||
"samsung": "27",
|
||||
"electron": "31.0"
|
||||
},
|
||||
"transform-unicode-sets-regex": {
|
||||
"chrome": "112",
|
||||
"opera": "98",
|
||||
"edge": "112",
|
||||
"firefox": "116",
|
||||
"safari": "17",
|
||||
"node": "20",
|
||||
"deno": "1.32",
|
||||
"ios": "17",
|
||||
"samsung": "23",
|
||||
"opera_mobile": "75",
|
||||
"electron": "24.0"
|
||||
},
|
||||
"bugfix/transform-v8-static-class-fields-redefine-readonly": {
|
||||
"chrome": "98",
|
||||
"opera": "84",
|
||||
"edge": "98",
|
||||
"firefox": "75",
|
||||
"safari": "15",
|
||||
"node": "12",
|
||||
"deno": "1.18",
|
||||
"ios": "15",
|
||||
"samsung": "11",
|
||||
"opera_mobile": "52",
|
||||
"electron": "17.0"
|
||||
},
|
||||
"bugfix/transform-firefox-class-in-computed-class-key": {
|
||||
"chrome": "74",
|
||||
"opera": "62",
|
||||
"edge": "79",
|
||||
"firefox": "126",
|
||||
"safari": "16",
|
||||
"node": "12",
|
||||
"deno": "1",
|
||||
"ios": "16",
|
||||
"samsung": "11",
|
||||
"opera_mobile": "53",
|
||||
"electron": "6.0"
|
||||
},
|
||||
"bugfix/transform-safari-class-field-initializer-scope": {
|
||||
"chrome": "74",
|
||||
"opera": "62",
|
||||
"edge": "79",
|
||||
"firefox": "69",
|
||||
"safari": "16",
|
||||
"node": "12",
|
||||
"deno": "1",
|
||||
"ios": "16",
|
||||
"samsung": "11",
|
||||
"opera_mobile": "53",
|
||||
"electron": "6.0"
|
||||
},
|
||||
"transform-class-static-block": {
|
||||
"chrome": "94",
|
||||
"opera": "80",
|
||||
"edge": "94",
|
||||
"firefox": "93",
|
||||
"safari": "16.4",
|
||||
"node": "16.11",
|
||||
"deno": "1.14",
|
||||
"ios": "16.4",
|
||||
"samsung": "17",
|
||||
"opera_mobile": "66",
|
||||
"electron": "15.0"
|
||||
},
|
||||
"proposal-class-static-block": {
|
||||
"chrome": "94",
|
||||
"opera": "80",
|
||||
"edge": "94",
|
||||
"firefox": "93",
|
||||
"safari": "16.4",
|
||||
"node": "16.11",
|
||||
"deno": "1.14",
|
||||
"ios": "16.4",
|
||||
"samsung": "17",
|
||||
"opera_mobile": "66",
|
||||
"electron": "15.0"
|
||||
},
|
||||
"transform-private-property-in-object": {
|
||||
"chrome": "91",
|
||||
"opera": "77",
|
||||
"edge": "91",
|
||||
"firefox": "90",
|
||||
"safari": "15",
|
||||
"node": "16.9",
|
||||
"deno": "1.9",
|
||||
"ios": "15",
|
||||
"samsung": "16",
|
||||
"opera_mobile": "64",
|
||||
"electron": "13.0"
|
||||
},
|
||||
"proposal-private-property-in-object": {
|
||||
"chrome": "91",
|
||||
"opera": "77",
|
||||
"edge": "91",
|
||||
"firefox": "90",
|
||||
"safari": "15",
|
||||
"node": "16.9",
|
||||
"deno": "1.9",
|
||||
"ios": "15",
|
||||
"samsung": "16",
|
||||
"opera_mobile": "64",
|
||||
"electron": "13.0"
|
||||
},
|
||||
"transform-class-properties": {
|
||||
"chrome": "74",
|
||||
"opera": "62",
|
||||
"edge": "79",
|
||||
"firefox": "90",
|
||||
"safari": "14.1",
|
||||
"node": "12",
|
||||
"deno": "1",
|
||||
"ios": "14.5",
|
||||
"samsung": "11",
|
||||
"opera_mobile": "53",
|
||||
"electron": "6.0"
|
||||
},
|
||||
"proposal-class-properties": {
|
||||
"chrome": "74",
|
||||
"opera": "62",
|
||||
"edge": "79",
|
||||
"firefox": "90",
|
||||
"safari": "14.1",
|
||||
"node": "12",
|
||||
"deno": "1",
|
||||
"ios": "14.5",
|
||||
"samsung": "11",
|
||||
"opera_mobile": "53",
|
||||
"electron": "6.0"
|
||||
},
|
||||
"transform-private-methods": {
|
||||
"chrome": "84",
|
||||
"opera": "70",
|
||||
"edge": "84",
|
||||
"firefox": "90",
|
||||
"safari": "15",
|
||||
"node": "14.6",
|
||||
"deno": "1",
|
||||
"ios": "15",
|
||||
"samsung": "14",
|
||||
"opera_mobile": "60",
|
||||
"electron": "10.0"
|
||||
},
|
||||
"proposal-private-methods": {
|
||||
"chrome": "84",
|
||||
"opera": "70",
|
||||
"edge": "84",
|
||||
"firefox": "90",
|
||||
"safari": "15",
|
||||
"node": "14.6",
|
||||
"deno": "1",
|
||||
"ios": "15",
|
||||
"samsung": "14",
|
||||
"opera_mobile": "60",
|
||||
"electron": "10.0"
|
||||
},
|
||||
"transform-numeric-separator": {
|
||||
"chrome": "75",
|
||||
"opera": "62",
|
||||
"edge": "79",
|
||||
"firefox": "70",
|
||||
"safari": "13",
|
||||
"node": "12.5",
|
||||
"deno": "1",
|
||||
"ios": "13",
|
||||
"samsung": "11",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "54",
|
||||
"electron": "6.0"
|
||||
},
|
||||
"proposal-numeric-separator": {
|
||||
"chrome": "75",
|
||||
"opera": "62",
|
||||
"edge": "79",
|
||||
"firefox": "70",
|
||||
"safari": "13",
|
||||
"node": "12.5",
|
||||
"deno": "1",
|
||||
"ios": "13",
|
||||
"samsung": "11",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "54",
|
||||
"electron": "6.0"
|
||||
},
|
||||
"transform-logical-assignment-operators": {
|
||||
"chrome": "85",
|
||||
"opera": "71",
|
||||
"edge": "85",
|
||||
"firefox": "79",
|
||||
"safari": "14",
|
||||
"node": "15",
|
||||
"deno": "1.2",
|
||||
"ios": "14",
|
||||
"samsung": "14",
|
||||
"opera_mobile": "60",
|
||||
"electron": "10.0"
|
||||
},
|
||||
"proposal-logical-assignment-operators": {
|
||||
"chrome": "85",
|
||||
"opera": "71",
|
||||
"edge": "85",
|
||||
"firefox": "79",
|
||||
"safari": "14",
|
||||
"node": "15",
|
||||
"deno": "1.2",
|
||||
"ios": "14",
|
||||
"samsung": "14",
|
||||
"opera_mobile": "60",
|
||||
"electron": "10.0"
|
||||
},
|
||||
"transform-nullish-coalescing-operator": {
|
||||
"chrome": "80",
|
||||
"opera": "67",
|
||||
"edge": "80",
|
||||
"firefox": "72",
|
||||
"safari": "13.1",
|
||||
"node": "14",
|
||||
"deno": "1",
|
||||
"ios": "13.4",
|
||||
"samsung": "13",
|
||||
"rhino": "1.8",
|
||||
"opera_mobile": "57",
|
||||
"electron": "8.0"
|
||||
},
|
||||
"proposal-nullish-coalescing-operator": {
|
||||
"chrome": "80",
|
||||
"opera": "67",
|
||||
"edge": "80",
|
||||
"firefox": "72",
|
||||
"safari": "13.1",
|
||||
"node": "14",
|
||||
"deno": "1",
|
||||
"ios": "13.4",
|
||||
"samsung": "13",
|
||||
"rhino": "1.8",
|
||||
"opera_mobile": "57",
|
||||
"electron": "8.0"
|
||||
},
|
||||
"transform-optional-chaining": {
|
||||
"chrome": "91",
|
||||
"opera": "77",
|
||||
"edge": "91",
|
||||
"firefox": "74",
|
||||
"safari": "13.1",
|
||||
"node": "16.9",
|
||||
"deno": "1.9",
|
||||
"ios": "13.4",
|
||||
"samsung": "16",
|
||||
"opera_mobile": "64",
|
||||
"electron": "13.0"
|
||||
},
|
||||
"proposal-optional-chaining": {
|
||||
"chrome": "91",
|
||||
"opera": "77",
|
||||
"edge": "91",
|
||||
"firefox": "74",
|
||||
"safari": "13.1",
|
||||
"node": "16.9",
|
||||
"deno": "1.9",
|
||||
"ios": "13.4",
|
||||
"samsung": "16",
|
||||
"opera_mobile": "64",
|
||||
"electron": "13.0"
|
||||
},
|
||||
"transform-json-strings": {
|
||||
"chrome": "66",
|
||||
"opera": "53",
|
||||
"edge": "79",
|
||||
"firefox": "62",
|
||||
"safari": "12",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "12",
|
||||
"samsung": "9",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"proposal-json-strings": {
|
||||
"chrome": "66",
|
||||
"opera": "53",
|
||||
"edge": "79",
|
||||
"firefox": "62",
|
||||
"safari": "12",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "12",
|
||||
"samsung": "9",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"transform-optional-catch-binding": {
|
||||
"chrome": "66",
|
||||
"opera": "53",
|
||||
"edge": "79",
|
||||
"firefox": "58",
|
||||
"safari": "11.1",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "9",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"proposal-optional-catch-binding": {
|
||||
"chrome": "66",
|
||||
"opera": "53",
|
||||
"edge": "79",
|
||||
"firefox": "58",
|
||||
"safari": "11.1",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "9",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"transform-parameters": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "18",
|
||||
"firefox": "52",
|
||||
"safari": "16.3",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "16.3",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"transform-async-generator-functions": {
|
||||
"chrome": "63",
|
||||
"opera": "50",
|
||||
"edge": "79",
|
||||
"firefox": "57",
|
||||
"safari": "12",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "12",
|
||||
"samsung": "8",
|
||||
"opera_mobile": "46",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"proposal-async-generator-functions": {
|
||||
"chrome": "63",
|
||||
"opera": "50",
|
||||
"edge": "79",
|
||||
"firefox": "57",
|
||||
"safari": "12",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "12",
|
||||
"samsung": "8",
|
||||
"opera_mobile": "46",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"transform-object-rest-spread": {
|
||||
"chrome": "60",
|
||||
"opera": "47",
|
||||
"edge": "79",
|
||||
"firefox": "55",
|
||||
"safari": "11.1",
|
||||
"node": "8.3",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "8",
|
||||
"opera_mobile": "44",
|
||||
"electron": "2.0"
|
||||
},
|
||||
"proposal-object-rest-spread": {
|
||||
"chrome": "60",
|
||||
"opera": "47",
|
||||
"edge": "79",
|
||||
"firefox": "55",
|
||||
"safari": "11.1",
|
||||
"node": "8.3",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "8",
|
||||
"opera_mobile": "44",
|
||||
"electron": "2.0"
|
||||
},
|
||||
"transform-dotall-regex": {
|
||||
"chrome": "62",
|
||||
"opera": "49",
|
||||
"edge": "79",
|
||||
"firefox": "78",
|
||||
"safari": "11.1",
|
||||
"node": "8.10",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "8",
|
||||
"rhino": "1.7.15",
|
||||
"opera_mobile": "46",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"transform-unicode-property-regex": {
|
||||
"chrome": "64",
|
||||
"opera": "51",
|
||||
"edge": "79",
|
||||
"firefox": "78",
|
||||
"safari": "11.1",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "9",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"proposal-unicode-property-regex": {
|
||||
"chrome": "64",
|
||||
"opera": "51",
|
||||
"edge": "79",
|
||||
"firefox": "78",
|
||||
"safari": "11.1",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "9",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"transform-named-capturing-groups-regex": {
|
||||
"chrome": "64",
|
||||
"opera": "51",
|
||||
"edge": "79",
|
||||
"firefox": "78",
|
||||
"safari": "11.1",
|
||||
"node": "10",
|
||||
"deno": "1",
|
||||
"ios": "11.3",
|
||||
"samsung": "9",
|
||||
"opera_mobile": "47",
|
||||
"electron": "3.0"
|
||||
},
|
||||
"transform-async-to-generator": {
|
||||
"chrome": "55",
|
||||
"opera": "42",
|
||||
"edge": "15",
|
||||
"firefox": "52",
|
||||
"safari": "11",
|
||||
"node": "7.6",
|
||||
"deno": "1",
|
||||
"ios": "11",
|
||||
"samsung": "6",
|
||||
"opera_mobile": "42",
|
||||
"electron": "1.6"
|
||||
},
|
||||
"transform-exponentiation-operator": {
|
||||
"chrome": "52",
|
||||
"opera": "39",
|
||||
"edge": "14",
|
||||
"firefox": "52",
|
||||
"safari": "10.1",
|
||||
"node": "7",
|
||||
"deno": "1",
|
||||
"ios": "10.3",
|
||||
"samsung": "6",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "41",
|
||||
"electron": "1.3"
|
||||
},
|
||||
"transform-template-literals": {
|
||||
"chrome": "41",
|
||||
"opera": "28",
|
||||
"edge": "13",
|
||||
"firefox": "34",
|
||||
"safari": "13",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "13",
|
||||
"samsung": "3.4",
|
||||
"opera_mobile": "28",
|
||||
"electron": "0.21"
|
||||
},
|
||||
"transform-literals": {
|
||||
"chrome": "44",
|
||||
"opera": "31",
|
||||
"edge": "12",
|
||||
"firefox": "53",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "9",
|
||||
"samsung": "4",
|
||||
"rhino": "1.7.15",
|
||||
"opera_mobile": "32",
|
||||
"electron": "0.30"
|
||||
},
|
||||
"transform-function-name": {
|
||||
"chrome": "51",
|
||||
"opera": "38",
|
||||
"edge": "79",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "41",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-arrow-functions": {
|
||||
"chrome": "47",
|
||||
"opera": "34",
|
||||
"edge": "13",
|
||||
"firefox": "43",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"rhino": "1.7.13",
|
||||
"opera_mobile": "34",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-block-scoped-functions": {
|
||||
"chrome": "41",
|
||||
"opera": "28",
|
||||
"edge": "12",
|
||||
"firefox": "46",
|
||||
"safari": "10",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ie": "11",
|
||||
"ios": "10",
|
||||
"samsung": "3.4",
|
||||
"opera_mobile": "28",
|
||||
"electron": "0.21"
|
||||
},
|
||||
"transform-classes": {
|
||||
"chrome": "46",
|
||||
"opera": "33",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-object-super": {
|
||||
"chrome": "46",
|
||||
"opera": "33",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-shorthand-properties": {
|
||||
"chrome": "43",
|
||||
"opera": "30",
|
||||
"edge": "12",
|
||||
"firefox": "33",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "9",
|
||||
"samsung": "4",
|
||||
"rhino": "1.7.14",
|
||||
"opera_mobile": "30",
|
||||
"electron": "0.27"
|
||||
},
|
||||
"transform-duplicate-keys": {
|
||||
"chrome": "42",
|
||||
"opera": "29",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "9",
|
||||
"samsung": "3.4",
|
||||
"opera_mobile": "29",
|
||||
"electron": "0.25"
|
||||
},
|
||||
"transform-computed-properties": {
|
||||
"chrome": "44",
|
||||
"opera": "31",
|
||||
"edge": "12",
|
||||
"firefox": "34",
|
||||
"safari": "7.1",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "8",
|
||||
"samsung": "4",
|
||||
"rhino": "1.8",
|
||||
"opera_mobile": "32",
|
||||
"electron": "0.30"
|
||||
},
|
||||
"transform-for-of": {
|
||||
"chrome": "51",
|
||||
"opera": "38",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "41",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-sticky-regex": {
|
||||
"chrome": "49",
|
||||
"opera": "36",
|
||||
"edge": "13",
|
||||
"firefox": "3",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"rhino": "1.7.15",
|
||||
"opera_mobile": "36",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"transform-unicode-escapes": {
|
||||
"chrome": "44",
|
||||
"opera": "31",
|
||||
"edge": "12",
|
||||
"firefox": "53",
|
||||
"safari": "9",
|
||||
"node": "4",
|
||||
"deno": "1",
|
||||
"ios": "9",
|
||||
"samsung": "4",
|
||||
"rhino": "1.7.15",
|
||||
"opera_mobile": "32",
|
||||
"electron": "0.30"
|
||||
},
|
||||
"transform-unicode-regex": {
|
||||
"chrome": "50",
|
||||
"opera": "37",
|
||||
"edge": "13",
|
||||
"firefox": "46",
|
||||
"safari": "12",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "12",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"transform-spread": {
|
||||
"chrome": "46",
|
||||
"opera": "33",
|
||||
"edge": "13",
|
||||
"firefox": "45",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-destructuring": {
|
||||
"chrome": "51",
|
||||
"opera": "38",
|
||||
"edge": "15",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6.5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "41",
|
||||
"electron": "1.2"
|
||||
},
|
||||
"transform-block-scoping": {
|
||||
"chrome": "50",
|
||||
"opera": "37",
|
||||
"edge": "14",
|
||||
"firefox": "53",
|
||||
"safari": "11",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "11",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"transform-typeof-symbol": {
|
||||
"chrome": "48",
|
||||
"opera": "35",
|
||||
"edge": "12",
|
||||
"firefox": "36",
|
||||
"safari": "9",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "9",
|
||||
"samsung": "5",
|
||||
"rhino": "1.8",
|
||||
"opera_mobile": "35",
|
||||
"electron": "0.37"
|
||||
},
|
||||
"transform-new-target": {
|
||||
"chrome": "46",
|
||||
"opera": "33",
|
||||
"edge": "14",
|
||||
"firefox": "41",
|
||||
"safari": "10",
|
||||
"node": "5",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "33",
|
||||
"electron": "0.36"
|
||||
},
|
||||
"transform-regenerator": {
|
||||
"chrome": "50",
|
||||
"opera": "37",
|
||||
"edge": "13",
|
||||
"firefox": "53",
|
||||
"safari": "10",
|
||||
"node": "6",
|
||||
"deno": "1",
|
||||
"ios": "10",
|
||||
"samsung": "5",
|
||||
"opera_mobile": "37",
|
||||
"electron": "1.1"
|
||||
},
|
||||
"transform-member-expression-literals": {
|
||||
"chrome": "7",
|
||||
"opera": "12",
|
||||
"edge": "12",
|
||||
"firefox": "2",
|
||||
"safari": "5.1",
|
||||
"node": "0.4",
|
||||
"deno": "1",
|
||||
"ie": "9",
|
||||
"android": "4",
|
||||
"ios": "6",
|
||||
"phantom": "1.9",
|
||||
"samsung": "1",
|
||||
"rhino": "1.7.13",
|
||||
"opera_mobile": "12",
|
||||
"electron": "0.20"
|
||||
},
|
||||
"transform-property-literals": {
|
||||
"chrome": "7",
|
||||
"opera": "12",
|
||||
"edge": "12",
|
||||
"firefox": "2",
|
||||
"safari": "5.1",
|
||||
"node": "0.4",
|
||||
"deno": "1",
|
||||
"ie": "9",
|
||||
"android": "4",
|
||||
"ios": "6",
|
||||
"phantom": "1.9",
|
||||
"samsung": "1",
|
||||
"rhino": "1.7.13",
|
||||
"opera_mobile": "12",
|
||||
"electron": "0.20"
|
||||
},
|
||||
"transform-reserved-words": {
|
||||
"chrome": "13",
|
||||
"opera": "10.50",
|
||||
"edge": "12",
|
||||
"firefox": "2",
|
||||
"safari": "3.1",
|
||||
"node": "0.6",
|
||||
"deno": "1",
|
||||
"ie": "9",
|
||||
"android": "4.4",
|
||||
"ios": "6",
|
||||
"phantom": "1.9",
|
||||
"samsung": "1",
|
||||
"rhino": "1.7.13",
|
||||
"opera_mobile": "10.1",
|
||||
"electron": "0.20"
|
||||
},
|
||||
"transform-export-namespace-from": {
|
||||
"chrome": "72",
|
||||
"deno": "1.0",
|
||||
"edge": "79",
|
||||
"firefox": "80",
|
||||
"node": "13.2.0",
|
||||
"opera": "60",
|
||||
"opera_mobile": "51",
|
||||
"safari": "14.1",
|
||||
"ios": "14.5",
|
||||
"samsung": "11.0",
|
||||
"android": "72",
|
||||
"electron": "5.0"
|
||||
},
|
||||
"proposal-export-namespace-from": {
|
||||
"chrome": "72",
|
||||
"deno": "1.0",
|
||||
"edge": "79",
|
||||
"firefox": "80",
|
||||
"node": "13.2.0",
|
||||
"opera": "60",
|
||||
"opera_mobile": "51",
|
||||
"safari": "14.1",
|
||||
"ios": "14.5",
|
||||
"samsung": "11.0",
|
||||
"android": "72",
|
||||
"electron": "5.0"
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
||||
module.exports = require("./data/native-modules.json");
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
||||
module.exports = require("./data/overlapping-plugins.json");
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "@babel/compat-data",
|
||||
"version": "7.29.0",
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"license": "MIT",
|
||||
"description": "The compat-data to determine required Babel plugins",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-compat-data"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"exports": {
|
||||
"./plugins": "./plugins.js",
|
||||
"./native-modules": "./native-modules.js",
|
||||
"./corejs2-built-ins": "./corejs2-built-ins.js",
|
||||
"./corejs3-shipped-proposals": "./corejs3-shipped-proposals.js",
|
||||
"./overlapping-plugins": "./overlapping-plugins.js",
|
||||
"./plugin-bugfixes": "./plugin-bugfixes.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.mjs && node ./scripts/build-modules-support.mjs && node ./scripts/build-bugfixes-targets.mjs"
|
||||
},
|
||||
"keywords": [
|
||||
"babel",
|
||||
"compat-table",
|
||||
"compat-data"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@mdn/browser-compat-data": "^6.0.8",
|
||||
"core-js-compat": "^3.48.0",
|
||||
"electron-to-chromium": "^1.5.278"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"type": "commonjs"
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
||||
module.exports = require("./data/plugin-bugfixes.json");
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
// Todo (Babel 8): remove this file, in Babel 8 users import the .json directly
|
||||
module.exports = require("./data/plugins.json");
|
||||
+22
@@ -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.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user