diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7b7a539..37e916b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -41,7 +41,7 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: ${{ secrets.DOCKER_USERNAME }}/filecodebox:latest + tags: ${{ secrets.DOCKER_USERNAME }}/filecodebox:beta cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - name: Move cache diff --git a/.gitignore b/.gitignore index f40e9ef..db3620d 100644 --- a/.gitignore +++ b/.gitignore @@ -154,3 +154,6 @@ for_test.py data/.env .backup/ /cloc-1.64.exe + +# Ignore node_modules +node_modules/ \ No newline at end of file diff --git a/apps/base/migrations/migrations_002.py b/apps/base/migrations/migrations_002.py new file mode 100644 index 0000000..a12069c --- /dev/null +++ b/apps/base/migrations/migrations_002.py @@ -0,0 +1,28 @@ +from tortoise import connections + + +async def create_upload_chunk_and_update_file_codes_table(): + conn = connections.get("default") + await conn.execute_script( + """ + ALTER TABLE "filecodes" ADD "file_hash" VARCHAR(128); + ALTER TABLE "filecodes" ADD "is_chunked" BOOL NOT NULL DEFAULT False; + ALTER TABLE "filecodes" ADD "upload_id" VARCHAR(128); + CREATE TABLE "uploadchunk" ( + id INTEGER not null primary key autoincrement, + "upload_id" VARCHAR(36) NOT NULL, + "chunk_index" INT NOT NULL, + "chunk_hash" VARCHAR(128) NOT NULL, + "total_chunks" INT NOT NULL, + "file_size" BIGINT NOT NULL, + "chunk_size" INT NOT NULL, + "created_at" TIMESTAMPTZ NOT NULL, + "file_name" VARCHAR(255) NOT NULL, + "completed" BOOL NOT NULL + ); + """ + ) + + +async def migrate(): + await create_upload_chunk_and_update_file_codes_table() diff --git a/apps/base/models.py b/apps/base/models.py index ecbdd86..e45c964 100644 --- a/apps/base/models.py +++ b/apps/base/models.py @@ -2,119 +2,55 @@ # @Author : Lan # @File : models.py # @Software: PyCharm -from datetime import datetime from typing import Optional -from tortoise import fields from tortoise.models import Model from tortoise.contrib.pydantic import pydantic_model_creator +from tortoise import fields, models +from datetime import datetime from core.utils import get_now -class FileCodes(Model): - id: Optional[int] = fields.IntField(pk=True) - code: Optional[int] = fields.CharField( - description="分享码", max_length=255, index=True, unique=True - ) - prefix: Optional[str] = fields.CharField( - max_length=255, description="前缀", default="" - ) - suffix: Optional[str] = fields.CharField( - max_length=255, description="后缀", default="" - ) - uuid_file_name: Optional[str] = fields.CharField( - max_length=255, description="uuid文件名", null=True - ) - file_path: Optional[str] = fields.CharField( - max_length=255, description="文件路径", null=True - ) - size: Optional[int] = fields.IntField(description="文件大小", default=0) - text: Optional[str] = fields.TextField(description="文本内容", null=True) - expired_at: Optional[datetime] = fields.DatetimeField( - null=True, description="过期时间" - ) - expired_count: Optional[int] = fields.IntField(description="可用次数", default=0) - used_count: Optional[int] = fields.IntField(description="已用次数", default=0) - created_at: Optional[datetime] = fields.DatetimeField( - auto_now_add=True, description="创建时间" - ) - # - # file_hash = fields.CharField( - # max_length=128, # SHA-256需要64字符,这里预留扩展空间 - # description="文件哈希值", - # unique=True, - # null=True # 允许旧数据为空 - # ) - # hash_algorithm = fields.CharField( - # max_length=20, - # description="哈希算法类型", - # null=True, - # default="sha256" - # ) - - # # 新增分片字段 - # chunk_size = fields.IntField( - # description="分片大小(字节)", - # default=0 - # ) - # total_chunks = fields.IntField( - # description="总分片数", - # default=0 - # ) - # uploaded_chunks = fields.IntField( - # description="已上传分片数", - # default=0 - # ) - # upload_status = fields.CharField( - # max_length=20, - # description="上传状态", - # default="pending", # pending/in_progress/completed - # choices=["pending", "in_progress", "completed"] - # ) - # is_chunked = fields.BooleanField( - # description="是否分片上传", - # default=False - # ) +class FileCodes(models.Model): + id = fields.IntField(pk=True) + code = fields.CharField(max_length=255, unique=True, index=True) + prefix = fields.CharField(max_length=255, default="") + suffix = fields.CharField(max_length=255, default="") + uuid_file_name = fields.CharField(max_length=255, null=True) + file_path = fields.CharField(max_length=255, null=True) + size = fields.IntField(default=0) + text = fields.TextField(null=True) + expired_at = fields.DatetimeField(null=True) + expired_count = fields.IntField(default=0) + used_count = fields.IntField(default=0) + created_at = fields.DatetimeField(auto_now_add=True) + file_hash = fields.CharField(max_length=64, null=True) + is_chunked = fields.BooleanField(default=False) + upload_id = fields.CharField(max_length=36, null=True) async def is_expired(self): - # 按时间 if self.expired_at is None: return False if self.expired_at and self.expired_count < 0: return self.expired_at < await get_now() - # 按次数 - else: - return self.expired_count <= 0 + return self.expired_count <= 0 async def get_file_path(self): return f"{self.file_path}/{self.uuid_file_name}" -# -# class FileChunks(Model): -# id = fields.IntField(pk=True) -# file_code = fields.ForeignKeyField( -# "models.FileCodes", -# related_name="chunks", -# on_delete=fields.CASCADE -# ) -# chunk_number = fields.IntField(description="分片序号") -# chunk_hash = fields.CharField( -# max_length=128, -# description="分片哈希校验值" -# ) -# chunk_path = fields.CharField( -# max_length=255, -# description="分片存储路径" -# ) -# created_at = fields.DatetimeField( -# auto_now_add=True, -# description="上传时间" -# ) -# -# class Meta: -# unique_together = [("file_code", "chunk_number")] +class UploadChunk(models.Model): + id = fields.IntField(pk=True) + upload_id = fields.CharField(max_length=36, index=True) + chunk_index = fields.IntField() + chunk_hash = fields.CharField(max_length=64) + total_chunks = fields.IntField() + file_size = fields.BigIntField() + chunk_size = fields.IntField() + file_name = fields.CharField(max_length=255) + created_at = fields.DatetimeField(auto_now_add=True) + completed = fields.BooleanField(default=False) class KeyValue(Model): @@ -129,3 +65,5 @@ class KeyValue(Model): file_codes_pydantic = pydantic_model_creator(FileCodes, name="FileCodes") +upload_chunk_pydantic = pydantic_model_creator(UploadChunk, name="UploadChunk") +key_value_pydantic = pydantic_model_creator(KeyValue, name="KeyValue") diff --git a/apps/base/schemas.py b/apps/base/schemas.py index b5d677d..807d6c2 100644 --- a/apps/base/schemas.py +++ b/apps/base/schemas.py @@ -3,3 +3,15 @@ from pydantic import BaseModel class SelectFileModel(BaseModel): code: str + + +class InitChunkUploadModel(BaseModel): + file_name: str + chunk_size: int = 5 * 1024 * 1024 + file_size: int + file_hash: str + + +class CompleteUploadModel(BaseModel): + expire_value: int + expire_style: str diff --git a/apps/base/utils.py b/apps/base/utils.py index c375f97..6c6f7ac 100644 --- a/apps/base/utils.py +++ b/apps/base/utils.py @@ -1,4 +1,5 @@ import datetime +import hashlib import os import uuid @@ -29,8 +30,19 @@ async def get_file_path_name(file: UploadFile) -> Tuple[str, str, str, str, str] return path, suffix, prefix, file.filename, save_path +async def get_chunk_file_path_name(file_name: str, upload_id: str) -> Tuple[str, str, str, str, str]: + """获取切片文件的路径和文件名""" + today = datetime.datetime.now() + storage_path = settings.storage_path.strip("/") # 移除开头和结尾的斜杠 + base_path = f"share/data/{today.strftime('%Y/%m/%d')}/{upload_id}" + path = f"{storage_path}/{base_path}" if storage_path else base_path + prefix, suffix = os.path.splitext(file_name) + save_path = f"{path}/{prefix}{suffix}" + return path, suffix, prefix, file_name, save_path + + async def get_expire_info( - expire_value: int, expire_style: str + expire_value: int, expire_style: str ) -> Tuple[Optional[datetime.datetime], int, int, str]: """获取过期信息""" expired_count, used_count = -1, 0 @@ -86,6 +98,18 @@ async def get_random_code(style="num") -> str: return code +async def calculate_file_hash(file: UploadFile, chunk_size=1024 * 1024) -> str: + sha = hashlib.sha256() + await file.seek(0) + while True: + chunk = await file.read(chunk_size) + if not chunk: + break + sha.update(chunk) + await file.seek(0) + return sha.hexdigest() + + ip_limit = { "error": IPRateLimit(count=settings.uploadCount, minutes=settings.errorMinute), "upload": IPRateLimit(count=settings.errorCount, minutes=settings.errorMinute), diff --git a/apps/base/views.py b/apps/base/views.py index 863ecb6..89dfe78 100644 --- a/apps/base/views.py +++ b/apps/base/views.py @@ -1,8 +1,13 @@ +import hashlib +import uuid + from fastapi import APIRouter, Form, UploadFile, File, Depends, HTTPException +from starlette import status + from apps.admin.dependencies import admin_required -from apps.base.models import FileCodes -from apps.base.schemas import SelectFileModel -from apps.base.utils import get_expire_info, get_file_path_name, ip_limit +from apps.base.models import FileCodes, UploadChunk +from apps.base.schemas import SelectFileModel, InitChunkUploadModel, CompleteUploadModel +from apps.base.utils import get_expire_info, get_file_path_name, ip_limit, get_chunk_file_path_name from core.response import APIResponse from core.settings import settings from core.storage import storages, FileStorageInterface @@ -25,10 +30,10 @@ async def create_file_code(code, **kwargs): @share_api.post("/text/", dependencies=[Depends(admin_required)]) async def share_text( - text: str = Form(...), - expire_value: int = Form(default=1, gt=0), - expire_style: str = Form(default="day"), - ip: str = Depends(ip_limit["upload"]), + text: str = Form(...), + expire_value: int = Form(default=1, gt=0), + expire_style: str = Form(default="day"), + ip: str = Depends(ip_limit["upload"]), ): text_size = len(text.encode("utf-8")) max_txt_size = 222 * 1024 @@ -53,10 +58,10 @@ async def share_text( @share_api.post("/file/", dependencies=[Depends(admin_required)]) async def share_file( - expire_value: int = Form(default=1, gt=0), - expire_style: str = Form(default="day"), - file: UploadFile = File(...), - ip: str = Depends(ip_limit["upload"]), + expire_value: int = Form(default=1, gt=0), + expire_style: str = Form(default="day"), + file: UploadFile = File(...), + ip: str = Depends(ip_limit["upload"]), ): await validate_file_size(file, settings.uploadSize) @@ -142,13 +147,137 @@ async def download_file(key: str, code: str, ip: str = Depends(ip_limit["error"] file_storage: FileStorageInterface = storages[settings.file_storage]() if await get_select_token(code) != key: ip_limit["error"].add_ip(ip) - has, file_code = await get_code_file_by_code(code, False) if not has: return APIResponse(code=404, detail="文件不存在") - return ( APIResponse(detail=file_code.text) if file_code.text else await file_storage.get_file_response(file_code) ) + + +chunk_api = APIRouter(prefix="/chunk", tags=["切片"]) + + +@chunk_api.post("/upload/init/") +async def init_chunk_upload(data: InitChunkUploadModel): + # 秒传检查 + existing = await FileCodes.filter(file_hash=data.file_hash).first() + if existing: + if await existing.is_expired(): + file_storage: FileStorageInterface = storages[settings.file_storage]( + ) + await file_storage.delete_file(existing) + await existing.delete() + else: + return APIResponse(detail={ + "code": existing.code, + "existed": True, + "name": f'{existing.prefix}{existing.suffix}' + }) + + # 创建上传会话 + upload_id = uuid.uuid4().hex + total_chunks = (data.file_size + data.chunk_size - 1) // data.chunk_size + await UploadChunk.create( + upload_id=upload_id, + chunk_index=-1, + total_chunks=total_chunks, + file_size=data.file_size, + chunk_size=data.chunk_size, + chunk_hash=data.file_hash, + file_name=data.file_name, + ) + # 获取已上传的分片列表 + uploaded_chunks = await UploadChunk.filter( + upload_id=upload_id, + completed=True + ).values_list('chunk_index', flat=True) + return APIResponse(detail={ + "existed": False, + "upload_id": upload_id, + "chunk_size": data.chunk_size, + "total_chunks": total_chunks, + "uploaded_chunks": uploaded_chunks + }) + + +@chunk_api.post("/upload/chunk/{upload_id}/{chunk_index}") +async def upload_chunk( + upload_id: str, + chunk_index: int, + chunk: UploadFile = File(...), +): + # 获取上传会话信息 + chunk_info = await UploadChunk.filter(upload_id=upload_id, chunk_index=-1).first() + if not chunk_info: + raise HTTPException(status.HTTP_404_NOT_FOUND, detail="上传会话不存在") + + # 检查分片索引有效性 + if chunk_index < 0 or chunk_index >= chunk_info.total_chunks: + raise HTTPException(status.HTTP_400_BAD_REQUEST, detail="无效的分片索引") + + # 读取分片数据并计算哈希 + chunk_data = await chunk.read() + chunk_hash = hashlib.sha256(chunk_data).hexdigest() + + # 更新或创建分片记录 + await UploadChunk.update_or_create( + upload_id=upload_id, + chunk_index=chunk_index, + defaults={ + 'chunk_hash': chunk_hash, + 'completed': True, + 'file_size': chunk_info.file_size, + 'total_chunks': chunk_info.total_chunks, + 'chunk_size': chunk_info.chunk_size, + 'file_name': chunk_info.file_name + } + ) + # 获取文件路径 + _, _, _, _, save_path = await get_chunk_file_path_name(chunk_info.file_name, upload_id) + # 保存分片到存储 + storage = storages[settings.file_storage]() + await storage.save_chunk(upload_id, chunk_index, chunk_data, chunk_hash, save_path) + return APIResponse(detail={"chunk_hash": chunk_hash}) + + +@chunk_api.post("/upload/complete/{upload_id}") +async def complete_upload(upload_id: str, data: CompleteUploadModel, ip: str = Depends(ip_limit["upload"])): + # 获取上传基本信息 + chunk_info = await UploadChunk.filter(upload_id=upload_id, chunk_index=-1).first() + if not chunk_info: + raise HTTPException(status.HTTP_404_NOT_FOUND, detail="上传会话不存在") + + storage = storages[settings.file_storage]() + # 验证所有分片 + completed_chunks = await UploadChunk.filter( + upload_id=upload_id, + completed=True + ).count() + if completed_chunks != chunk_info.total_chunks: + raise HTTPException(status.HTTP_400_BAD_REQUEST, detail="分片不完整") + # 获取文件路径 + path, suffix, prefix, _, save_path = await get_chunk_file_path_name(chunk_info.file_name, upload_id) + # 合并文件并计算哈希 + await storage.merge_chunks(upload_id, chunk_info, save_path) + # 创建文件记录 + expired_at, expired_count, used_count, code = await get_expire_info(data.expire_value, data.expire_style) + await FileCodes.create( + code=code, + file_hash=chunk_info.chunk_hash, + is_chunked=True, + upload_id=upload_id, + size=chunk_info.file_size, + expired_at=expired_at, + expired_count=expired_count, + used_count=used_count, + file_path=path, + uuid_file_name=f"{prefix}{suffix}", + prefix=prefix, + suffix=suffix + ) + # 清理临时文件 + await storage.clean_chunks(upload_id, save_path) + return APIResponse(detail={"code": code, "name": chunk_info.file_name}) diff --git a/core/database.py b/core/database.py index d574359..4421bf6 100644 --- a/core/database.py +++ b/core/database.py @@ -4,6 +4,7 @@ import os from tortoise import Tortoise +from core.logger import logger from core.settings import data_root @@ -32,7 +33,7 @@ async def init_db(): await execute_migrations() except Exception as e: - print(f"数据库初始化失败: {str(e)}") + logger.error(f"数据库初始化失败: {str(e)}") raise @@ -58,7 +59,7 @@ async def execute_migrations(): ) if not executed[1]: - print(f"执行迁移: {file_name}") + logger.info(f"执行迁移: {file_name}") # 导入并执行migration module_path = migration_file.replace("/", ".").replace("\\", ".").replace(".py", "") try: @@ -70,11 +71,11 @@ async def execute_migrations(): "INSERT INTO migrates (migration_file) VALUES (?)", [file_name] ) - print(f"迁移完成: {file_name}") + logger.info(f"迁移完成: {file_name}") except Exception as e: - print(f"迁移 {file_name} 执行失败: {str(e)}") + logger.error(f"迁移 {file_name} 执行失败: {str(e)}") raise except Exception as e: - print(f"迁移过程发生错误: {str(e)}") + logger.error(f"迁移过程发生错误: {str(e)}") raise diff --git a/core/logger.py b/core/logger.py new file mode 100644 index 0000000..101413b --- /dev/null +++ b/core/logger.py @@ -0,0 +1,28 @@ +import logging +import sys + + +def setup_logger(): + # 创建logger对象 + _logger = logging.getLogger('FileCodeBox') + _logger.setLevel(logging.INFO) + + # 创建控制台处理器 + console_handler = logging.StreamHandler(sys.stdout) + console_handler.setLevel(logging.INFO) + + # 设置日志格式 + formatter = logging.Formatter( + '%(asctime)s - %(name)s - %(levelname)s - %(message)s', + datefmt='%Y-%m-%d %H:%M:%S' + ) + console_handler.setFormatter(formatter) + + # 添加处理器到logger + _logger.addHandler(console_handler) + + return _logger + + +# 创建全局logger实例 +logger = setup_logger() diff --git a/core/settings.py b/core/settings.py index f05eaf5..7190bd5 100644 --- a/core/settings.py +++ b/core/settings.py @@ -43,6 +43,7 @@ DEFAULT_CONFIG = { "uploadSize": 1024 * 1024 * 10, "expireStyle": ["day", "hour", "minute", "forever", "count"], "uploadMinute": 1, + "enableChunk": 0, "webdav_url": "", "webdav_password": "", "webdav_username": "", diff --git a/core/storage.py b/core/storage.py index b7eea14..d4f508a 100644 --- a/core/storage.py +++ b/core/storage.py @@ -2,21 +2,25 @@ # @Author : Lan # @File : storage.py # @Software: PyCharm +import hashlib +from core.logger import logger +import shutil from typing import Optional from urllib.parse import quote, unquote + +import aiofiles import aiohttp import asyncio from pathlib import Path import datetime import io import re -import sys import aioboto3 from botocore.config import Config from fastapi import HTTPException, Response, UploadFile from core.response import APIResponse from core.settings import data_root, settings -from apps.base.models import FileCodes +from apps.base.models import FileCodes, UploadChunk from core.utils import get_file_url from fastapi.responses import FileResponse @@ -61,6 +65,35 @@ class FileStorageInterface: """ raise NotImplementedError + async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str): + """ + 保存分片文件 + :param upload_id: 上传会话ID + :param chunk_index: 分片索引 + :param chunk_data: 分片数据 + :param chunk_hash: 分片哈希值 + :param save_path: 文件保存路径 + """ + raise NotImplementedError + + async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]: + """ + 合并分片文件并返回文件路径和完整哈希值 + :param upload_id: 上传会话ID + :param chunk_info: 分片信息 + :param save_path: 文件保存路径 + :return: (文件路径, 文件哈希值) + """ + raise NotImplementedError + + async def clean_chunks(self, upload_id: str, save_path: str): + """ + 清理临时分片文件 + :param upload_id: 上传会话ID + :param save_path: 文件保存路径 + """ + raise NotImplementedError + class SystemFileStorage(FileStorageInterface): def __init__(self): @@ -101,6 +134,57 @@ class SystemFileStorage(FileStorageInterface): filename=filename # 保留原始文件名以备某些场景使用 ) + async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str): + """ + 保存分片文件到本地文件系统 + :param upload_id: 上传会话ID + :param chunk_index: 分片索引 + :param chunk_data: 分片数据 + :param chunk_hash: 分片哈希值 + :param save_path: 文件保存路径 + """ + chunk_dir = self.root_path / save_path + chunk_path = chunk_dir.parent / 'chunks' / f"{chunk_index}.part" + if not chunk_path.parent.exists(): + chunk_path.parent.mkdir(parents=True) + async with aiofiles.open(chunk_path, "wb") as f: + await f.write(chunk_data) + + async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]: + """ + 合并本地文件系统的分片文件并返回文件路径和完整哈希值 + :param upload_id: 上传会话ID + :param chunk_info: 分片信息 + :param save_path: 文件保存路径 + :return: (文件路径, 文件哈希值) + """ + output_dir = self.root_path / save_path + output_dir.parent.mkdir(parents=True, exist_ok=True) + file_sha256 = hashlib.sha256() + async with aiofiles.open(output_dir, "wb") as out_file: + for i in range(chunk_info.total_chunks): + # 获取分片记录 + chunk_record = await UploadChunk.get(upload_id=upload_id, chunk_index=i) + chunk_path = output_dir.parent / 'chunks' / f"{i}.part" + async with aiofiles.open(chunk_path, "rb") as in_file: + chunk_data = await in_file.read() + current_hash = hashlib.sha256(chunk_data).hexdigest() + if current_hash != chunk_record.chunk_hash: + raise ValueError(f"分片{i}哈希不匹配") + file_sha256.update(chunk_data) + await out_file.write(chunk_data) + return output_dir, file_sha256.hexdigest() + + async def clean_chunks(self, upload_id: str, save_path: str): + """ + 清理本地文件系统的临时分片文件 + :param upload_id: 上传会话ID + :param save_path: 文件保存路径 + """ + chunk_dir = (self.root_path / save_path).parent / 'chunks' + if chunk_dir.exists(): + shutil.rmtree(chunk_dir) + class S3FileStorage(FileStorageInterface): def __init__(self): @@ -205,6 +289,99 @@ class S3FileStorage(FileStorageInterface): ) return result + async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str): + chunk_key = str(Path(save_path).parent / "chunks" / + upload_id / f"{chunk_index}.part") + async with self.session.client('s3') as s3: + response = await s3.upload_part( + Bucket=self.bucket_name, + Key=chunk_key, + PartNumber=chunk_index + 1, + UploadId=upload_id, + Body=chunk_data + ) + await s3.put_object_tagging( + Bucket=self.bucket_name, + Key=chunk_key, + Tagging={ + 'TagSet': [ + {'Key': 'ChunkHash', 'Value': chunk_hash}, + {'Key': 'ETag', 'Value': response['ETag']} + ] + } + ) + + async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]: + file_sha256 = hashlib.sha256() + chunk_dir = str(Path(save_path).parent / "chunks" / upload_id) + async with self.session.client('s3') as s3: + # 获取所有分片 + parts = await s3.list_parts( + Bucket=self.bucket_name, + Key=chunk_dir, + UploadId=upload_id + ) + part_list = [] + for part in parts['Parts']: + part_number = part['PartNumber'] + chunk_index = part_number - 1 + chunk_record = await UploadChunk.get(upload_id=upload_id, chunk_index=chunk_index) + response = await s3.get_object( + Bucket=self.bucket_name, + Key=f"{chunk_dir}/{chunk_index}.part", + PartNumber=part_number + ) + chunk_data = await response['Body'].read() + current_hash = hashlib.sha256(chunk_data).hexdigest() + if current_hash != chunk_record.chunk_hash: + raise Exception(f"分片{chunk_index}哈希不匹配") + file_sha256.update(chunk_data) + part_list.append( + {'PartNumber': part_number, 'ETag': part['ETag']}) + # 完成合并 + await s3.complete_multipart_upload( + Bucket=self.bucket_name, + Key=save_path, + UploadId=upload_id, + MultipartUpload={'Parts': part_list} + ) + return save_path, file_sha256.hexdigest() + + async def clean_chunks(self, upload_id: str, save_path: str): + """ + 清理 S3 上的临时分片文件 + :param upload_id: 上传会话ID + :param save_path: 文件保存路径 + """ + chunk_dir = str(Path(save_path).parent / "chunks" / upload_id) + async with self.session.client('s3') as s3: + try: + # 终止未完成的分片上传会话 + await s3.abort_multipart_upload( + Bucket=self.bucket_name, + Key=chunk_dir, + UploadId=upload_id + ) + except Exception as e: + # 如果上传会话不存在或其他错误,忽略 + logger.info(f"清理 S3 分片时出错: {e}") + + try: + # 清理已上传的分片数据 + parts = await s3.list_parts( + Bucket=self.bucket_name, + Key=chunk_dir, + UploadId=upload_id + ) + for part in parts.get('Parts', []): + await s3.delete_object( + Bucket=self.bucket_name, + Key=f"{chunk_dir}/{part['PartNumber'] - 1}.part" + ) + except Exception as e: + # 如果分片数据不存在或其他错误,忽略 + logger.info(f"清理 S3 分片数据时出错: {e}") + class OneDriveFileStorage(FileStorageInterface): def __init__(self): @@ -235,7 +412,8 @@ class OneDriveFileStorage(FileStorageInterface): if e.code == "itemNotFound": client.me.drive.root.create_folder(settings.onedrive_root_path) self.root_path = ( - client.me.drive.root.get_by_path(settings.onedrive_root_path) + client.me.drive.root.get_by_path( + settings.onedrive_root_path) .get() .execute_query() ) @@ -289,9 +467,9 @@ class OneDriveFileStorage(FileStorageInterface): await asyncio.to_thread(self._delete, await file_code.get_file_path()) def _convert_link_to_download_link(self, link): - p1 = re.search(r"https:\/\/(.+)\.sharepoint\.com", link).group(1) - p2 = re.search(r"personal\/(.+)\/", link).group(1) - p3 = re.search(rf"{p2}\/(.+)", link).group(1) + p1 = re.search(r"https://(.+)\.sharepoint\.com", link).group(1) + p2 = re.search(r"personal/(.+)/", link).group(1) + p3 = re.search(rf"{p2}/(.+)", link).group(1) return f"https://{p1}.sharepoint.com/personal/{p2}/_layouts/52/download.aspx?share={p3}" def _get_file_url(self, save_path, name): @@ -300,11 +478,12 @@ class OneDriveFileStorage(FileStorageInterface): expiration_datetime = datetime.datetime.now( tz=datetime.timezone.utc ) + datetime.timedelta(hours=1) - expiration_datetime = expiration_datetime.strftime("%Y-%m-%dT%H:%M:%SZ") - premission = remote_file.create_link( + expiration_datetime = expiration_datetime.strftime( + "%Y-%m-%dT%H:%M:%SZ") + permission = remote_file.create_link( "view", "anonymous", expiration_datetime=expiration_datetime ).execute_query() - return self._convert_link_to_download_link(premission.link.webUrl) + return self._convert_link_to_download_link(permission.link.webUrl) async def get_file_response(self, file_code: FileCodes): try: @@ -369,12 +548,13 @@ class OpenDALFileStorage(FileStorageInterface): try: filename = file_code.prefix + file_code.suffix content = await self.operator.read(await file_code.get_file_path()) - headers = {"Content-Disposition": f'attachment; filename="{filename}"'} + headers = { + "Content-Disposition": f'attachment; filename="{filename}"'} return Response( content, headers=headers, media_type="application/octet-stream" ) except Exception as e: - print(e, file=sys.stderr) + logger.info(e) raise HTTPException(status_code=404, detail="文件已过期删除") @@ -459,7 +639,8 @@ class WebDAVFileStorage(FileStorageInterface): async with aiohttp.ClientSession(auth=self.auth) as session: content = await file.read() # 注意:大文件需要分块读取 async with session.put( - url, data=content, headers={"Content-Type": file.content_type} + url, data=content, headers={ + "Content-Type": file.content_type} ) as resp: if resp.status not in (200, 201, 204): content = await resp.text() @@ -468,7 +649,8 @@ class WebDAVFileStorage(FileStorageInterface): detail=f"文件上传失败: {content[:200]}", ) except aiohttp.ClientError as e: - raise HTTPException(status_code=503, detail=f"WebDAV连接异常: {str(e)}") + raise HTTPException( + status_code=503, detail=f"WebDAV连接异常: {str(e)}") async def delete_file(self, file_code: FileCodes): """删除WebDAV文件及空目录""" @@ -490,7 +672,8 @@ class WebDAVFileStorage(FileStorageInterface): await self._delete_empty_dirs(file_path, session) except aiohttp.ClientError as e: - raise HTTPException(status_code=503, detail=f"WebDAV连接异常: {str(e)}") + raise HTTPException( + status_code=503, detail=f"WebDAV连接异常: {str(e)}") async def get_file_url(self, file_code: FileCodes): return await get_file_url(file_code.code) @@ -519,7 +702,95 @@ class WebDAVFileStorage(FileStorageInterface): }, ) except aiohttp.ClientError as e: - raise HTTPException(status_code=503, detail=f"WebDAV连接异常: {str(e)}") + raise HTTPException( + status_code=503, detail=f"WebDAV连接异常: {str(e)}") + + async def save_chunk(self, upload_id: str, chunk_index: int, chunk_data: bytes, chunk_hash: str, save_path: str): + chunk_path = str(Path(save_path).parent / "chunks" / + upload_id / f"{chunk_index}.part") + chunk_url = self._build_url(chunk_path) + async with aiohttp.ClientSession(auth=self.auth) as session: + await session.put(chunk_url, data=chunk_data) + propfind_url = self._build_url(chunk_path) + headers = { + 'Content-Type': 'application/xml; charset=utf-8', 'Depth': '0'} + body = f""" + + + + {chunk_hash} + + + + """ + await session.request('PROPPATCH', propfind_url, headers=headers, data=body) + + async def merge_chunks(self, upload_id: str, chunk_info: UploadChunk, save_path: str) -> tuple[str, str]: + file_sha256 = hashlib.sha256() + output_url = self._build_url(save_path) + chunk_dir = str(Path(save_path).parent / "chunks" / upload_id) + async with aiohttp.ClientSession(auth=self.auth) as session: + await session.put(output_url, headers={'Content-Length': '0'}) + for i in range(chunk_info.total_chunks): + chunk_path = f"{chunk_dir}/{i}.part" + chunk_url = self._build_url(chunk_path) + propfind_url = self._build_url(chunk_path) + headers = { + 'Content-Type': 'application/xml; charset=utf-8', 'Depth': '0'} + body = """ + + + + + + """ + async with session.request('PROPFIND', propfind_url, headers=headers, data=body) as resp: + xml_data = await resp.text() + chunk_hash = re.search( + r']*>([^<]+)', xml_data).group(1) + file_sha256.update(bytes.fromhex(chunk_hash)) + async with session.get(chunk_url) as resp: + chunk_data = await resp.read() + await session.request('PATCH', output_url, headers={ + 'Content-Type': 'application/octet-stream', + 'Content-Length': str(len(chunk_data)), + 'Content-Range': f'bytes */{chunk_info.file_size}' + }, data=chunk_data) + return save_path, file_sha256.hexdigest() + + async def clean_chunks(self, upload_id: str, save_path: str): + """ + 清理 WebDAV 上的临时分片文件 + :param upload_id: 上传会话ID + :param save_path: 文件保存路径 + """ + chunk_dir = str(Path(save_path).parent / "chunks" / upload_id) + chunk_dir_url = self._build_url(chunk_dir) + async with aiohttp.ClientSession(auth=self.auth) as session: + try: + # 检查分片目录是否存在 + async with session.request("PROPFIND", chunk_dir_url, headers={"Depth": "1"}) as resp: + if resp.status == 207: # 207 表示 Multi-Status + # 获取目录下的所有分片文件 + xml_data = await resp.text() + file_paths = re.findall( + r'(.*?)', xml_data) + for file_path in file_paths: + if file_path.endswith(".part"): + # 删除分片文件 + file_url = self._build_url(file_path) + async with session.delete(file_url) as delete_resp: + if delete_resp.status not in (200, 204, 404): + logger.info(f"删除分片文件失败: {file_path}") + + # 删除分片目录 + async with session.delete(chunk_dir_url) as delete_resp: + if delete_resp.status not in (200, 204, 404): + logger.info(f"删除分片目录失败: {chunk_dir_url}") + else: + logger.info(f"分片目录不存在: {chunk_dir_url}") + except Exception as e: + logger.info(f"清理 WebDAV 分片时出错: {e}") storages = { diff --git a/core/tasks.py b/core/tasks.py index 726723a..f3da5a6 100644 --- a/core/tasks.py +++ b/core/tasks.py @@ -3,6 +3,7 @@ # @File : tasks.py # @Software: PyCharm import asyncio +import logging import os from tortoise.expressions import Q @@ -32,6 +33,6 @@ async def delete_expire_files(): await file_storage.delete_file(exp) await exp.delete() except Exception as e: - print(e) + logging.error(e) finally: await asyncio.sleep(600) diff --git a/main.py b/main.py index 5de22da..5b33502 100644 --- a/main.py +++ b/main.py @@ -14,12 +14,13 @@ from tortoise.contrib.fastapi import register_tortoise from apps.base.models import KeyValue from apps.base.utils import ip_limit -from apps.base.views import share_api +from apps.base.views import share_api, chunk_api from apps.admin.views import admin_api from core.database import init_db from core.response import APIResponse from core.settings import data_root, settings, BASE_DIR, DEFAULT_CONFIG from core.tasks import delete_expire_files +from core.logger import logger from contextlib import asynccontextmanager from tortoise import Tortoise @@ -27,6 +28,7 @@ from tortoise import Tortoise @asynccontextmanager async def lifespan(app: FastAPI): + logger.info("正在初始化应用...") # 初始化数据库 await init_db() @@ -40,14 +42,17 @@ async def lifespan(app: FastAPI): # 启动后台任务 task = asyncio.create_task(delete_expire_files()) + logger.info("应用初始化完成") try: yield finally: # 清理操作 + logger.info("正在关闭应用...") task.cancel() await asyncio.gather(task, return_exceptions=True) await Tortoise.close_connections() + logger.info("应用已关闭") async def load_config(): @@ -92,6 +97,7 @@ register_tortoise( ) app.include_router(share_api) +app.include_router(chunk_api) app.include_router(admin_api) @@ -128,6 +134,7 @@ async def get_config(): "explain": settings.page_explain, "uploadSize": settings.uploadSize, "expireStyle": settings.expireStyle, + "enableChunk": settings.enableChunk if settings.file_storage == "local" and settings.enableChunk else 0, "openUpload": settings.openUpload, "notify_title": settings.notify_title, "notify_content": settings.notify_content, diff --git a/themes/2024/assets/AdminLayout-YzQVrzCC.js b/themes/2024/assets/AdminLayout-BNAb0GsN.js similarity index 98% rename from themes/2024/assets/AdminLayout-YzQVrzCC.js rename to themes/2024/assets/AdminLayout-BNAb0GsN.js index 8491318..494e056 100644 --- a/themes/2024/assets/AdminLayout-YzQVrzCC.js +++ b/themes/2024/assets/AdminLayout-BNAb0GsN.js @@ -1,4 +1,4 @@ -import{c as i,d as k,r as h,o as u,I as v,a as d,b as x,e as t,n as o,g as e,i as n,X as w,F as _,p as M,A as C,x as z,z as L,J as B,K as D,q as F,t as I}from"./index-EADe6V-l.js";import{B as j}from"./box-brjUM9cP.js";/** +import{c as i,d as k,r as h,o as u,I as v,a as d,b as x,e as t,n as o,g as e,i as n,X as w,F as _,p as M,A as C,x as z,z as L,J as B,K as D,q as F,t as I}from"./index-CBPNirpK.js";import{B as j}from"./box-BGTnNORf.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/DashboardView-CbXKruLh.js b/themes/2024/assets/DashboardView-c0fCgIGI.js similarity index 98% rename from themes/2024/assets/DashboardView-CbXKruLh.js rename to themes/2024/assets/DashboardView-c0fCgIGI.js index 7054c27..8237d6a 100644 --- a/themes/2024/assets/DashboardView-CbXKruLh.js +++ b/themes/2024/assets/DashboardView-c0fCgIGI.js @@ -1,4 +1,4 @@ -import{c as g,d as v,H as w,o as _,a as p,b as u,e as t,n as a,g as e,t as i,i as y,F as k,p as U,x as F,y as M,J as C,K as z}from"./index-EADe6V-l.js";import{F as m}from"./file-CTH8PUKS.js";import{H as D,T as S}from"./trash-COYxyedR.js";/** +import{c as g,d as v,H as w,o as _,a as p,b as u,e as t,n as a,g as e,t as i,i as y,F as k,p as U,x as F,y as M,J as C,K as z}from"./index-CBPNirpK.js";import{F as m}from"./file-CNpWcMOu.js";import{H as D,T as S}from"./trash-DAq3m0gp.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/FileManageView-DkZZCgUb.js b/themes/2024/assets/FileManageView-wjy4eTuY.js similarity index 98% rename from themes/2024/assets/FileManageView-DkZZCgUb.js rename to themes/2024/assets/FileManageView-wjy4eTuY.js index 0b5acba..b10e8b3 100644 --- a/themes/2024/assets/FileManageView-DkZZCgUb.js +++ b/themes/2024/assets/FileManageView-wjy4eTuY.js @@ -1,4 +1,4 @@ -import{c as B,d as T,u as q,r as _,f as k,a as c,b as g,e as t,n as o,g as a,l as P,v as A,i as m,q as H,F as v,p as w,t as d,x as I,y as S}from"./index-EADe6V-l.js";import{F as L}from"./file-CTH8PUKS.js";/** +import{c as B,d as T,u as q,r as _,f as k,a as c,b as g,e as t,n as o,g as a,l as P,v as A,i as m,q as H,F as v,p as w,t as d,x as I,y as S}from"./index-CBPNirpK.js";import{F as L}from"./file-CNpWcMOu.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/LoginView-BbCZ9FM4.js b/themes/2024/assets/LoginView-DG9YPvp9.js similarity index 96% rename from themes/2024/assets/LoginView-BbCZ9FM4.js rename to themes/2024/assets/LoginView-DG9YPvp9.js index 25c2be0..13034a0 100644 --- a/themes/2024/assets/LoginView-BbCZ9FM4.js +++ b/themes/2024/assets/LoginView-DG9YPvp9.js @@ -1 +1 @@ -import{G as y,r as u,d as b,u as v,a as w,b as x,e,n as l,g as o,i as h,h as k,l as S,v as A,q as V,t as D,x as B,A as P,y as _,_ as j}from"./index-EADe6V-l.js";import{B as M}from"./box-brjUM9cP.js";const z=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),a=u(""),i=u(!1),s=B("isDarkMode"),c=z(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=P(),f=async()=>{if(p()){_.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(w(),x("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(M),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,a.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; +import{G as y,r as u,d as b,u as v,a as w,b as x,e,n as l,g as o,i as h,h as k,l as S,v as A,q as V,t as D,x as B,A as P,y as _,_ as j}from"./index-CBPNirpK.js";import{B as M}from"./box-BGTnNORf.js";const z=y("adminData",()=>{const d=u(localStorage.getItem("adminPassword")||"");function n(a){d.value=a,localStorage.setItem("token",a)}return{adminPassword:d,updateAdminPwd:n}}),I={class:"mx-auto h-16 w-16 relative"},L={class:"rounded-md shadow-sm -space-y-px"},N=["disabled"],T=b({__name:"LoginView",setup(d){const n=v(),a=u(""),i=u(!1),s=B("isDarkMode"),c=z(),p=()=>{let r=!0;return a.value?a.value.length<6&&(n.showAlert("密码长度至少为6位","error"),r=!1):(n.showAlert("无效的密码","error"),r=!1),r},m=P(),f=async()=>{if(p()){_.post("/admin/login",{password:a.value}).then(r=>{c.updateAdminPwd(r.detail.token),m.push("/admin")}).catch(r=>{n.showAlert(r.response.data.detail,"error")}),i.value=!0;try{await new Promise(r=>setTimeout(r,2e3))}catch{}finally{i.value=!1}}};return(r,t)=>(w(),x("div",{class:l(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",o(s)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:l(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[o(s)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",I,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:l(["absolute inset-1 rounded-full flex items-center justify-center",o(s)?"bg-gray-800":"bg-white"])},[h(o(M),{class:l(["h-8 w-8",o(s)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:l(["mt-6 text-center text-3xl font-extrabold",o(s)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:k(f,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",L,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),S(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=g=>a.value=g),class:l(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",o(s)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[A,a.value]])])]),e("div",null,[e("button",{type:"submit",class:l(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",o(s)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",i.value?"opacity-75 cursor-not-allowed":""]),disabled:i.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),V(" "+D(i.value?"登录中...":"登录"),1)],10,N)])],32)],2)],2))}}),E=j(T,[["__scopeId","data-v-66eb7914"]]);export{E as default}; diff --git a/themes/2024/assets/RetrievewFileView-BBntrsQr.js b/themes/2024/assets/RetrievewFileView-Ds0F15RV.js similarity index 87% rename from themes/2024/assets/RetrievewFileView-BBntrsQr.js rename to themes/2024/assets/RetrievewFileView-Ds0F15RV.js index b598b3e..c22f26d 100644 --- a/themes/2024/assets/RetrievewFileView-BBntrsQr.js +++ b/themes/2024/assets/RetrievewFileView-Ds0F15RV.js @@ -1,4 +1,4 @@ -var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>Pe(d,typeof e!="symbol"?e+"":e,t);import{c as _e,_ as Fe,u as Ze,B as Oe,r as D,o as Ue,w as Qe,f as He,b as L,e as p,n as b,g as f,i as $,t as j,h as Ne,l as Ve,v as Ge,k as ee,j as Q,q as Z,T as le,C as We,z as Xe,a as C,X as xe,s as Ke,F as Je,p as Ye,A as et,x as tt,y as nt}from"./index-EADe6V-l.js";import{c as H,u as st,S as it,C as rt,a as ot,Q as lt,E as at}from"./fileData-B92rnDh4.js";import{B as ct}from"./box-brjUM9cP.js";import{F as ke}from"./file-CTH8PUKS.js";import{H as ut,T as pt}from"./trash-COYxyedR.js";/** +var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var v=(d,e,t)=>Pe(d,typeof e!="symbol"?e+"":e,t);import{c as _e,_ as Fe,u as Ze,B as Oe,r as D,o as Ue,w as Qe,f as He,b as L,e as p,n as b,g as f,i as $,t as j,h as Ne,l as Ve,v as Ge,k as ee,j as Q,q as Z,T as le,C as We,z as Xe,a as C,X as xe,s as Ke,F as Je,p as Ye,A as et,x as tt,y as nt}from"./index-CBPNirpK.js";import{u as st,S as it,C as rt,a as ot,Q as lt,E as at}from"./fileData-BCZGMzij.js";import{B as ct}from"./box-BGTnNORf.js";import{F as ke}from"./file-CNpWcMOu.js";import{H as ut,T as pt}from"./trash-DAq3m0gp.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. @@ -8,7 +8,7 @@ var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,config * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const be=_e("DownloadIcon",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var Re={exports:{}};(function(d,e){(function(t,n){n()})(H,function(){function t(c,l){return typeof l>"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,l,u){var h=new XMLHttpRequest;h.open("GET",c),h.responseType="blob",h.onload=function(){a(h.response,l,u)},h.onerror=function(){console.error("could not download file")},h.send()}function s(c){var l=new XMLHttpRequest;l.open("HEAD",c,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(l)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof H=="object"&&H.global===H?H:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,l,u){var h=r.URL||r.webkitURL,g=document.createElement("a");l=l||c.name||"download",g.download=l,g.rel="noopener",typeof c=="string"?(g.href=c,g.origin===location.origin?i(g):s(g.href)?n(c,l,u):i(g,g.target="_blank")):(g.href=h.createObjectURL(c),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(c,l,u){if(l=l||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,u),l);else if(s(c))n(c,l,u);else{var h=document.createElement("a");h.href=c,h.target="_blank",setTimeout(function(){i(h)})}}:function(c,l,u,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof c=="string")return n(c,l,u);var g=c.type==="application/octet-stream",w=/constructor/i.test(r.HTMLElement)||r.safari,R=/CriOS\/[\d]+/.test(navigator.userAgent);if((R||g&&w||o)&&typeof FileReader<"u"){var T=new FileReader;T.onloadend=function(){var E=T.result;E=R?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=E:location=E,h=null},T.readAsDataURL(c)}else{var B=r.URL||r.webkitURL,M=B.createObjectURL(c);h?h.location=M:location.href=M,h=null,setTimeout(function(){B.revokeObjectURL(M)},4e4)}});r.saveAs=a.saveAs=a,d.exports=a})})(Re);var dt=Re.exports;function ce(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let F=ce();function Te(d){F=d}const ze=/[&<>"']/,ft=new RegExp(ze.source,"g"),Se=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,gt=new RegExp(Se.source,"g"),xt={"&":"&","<":"<",">":">",'"':""","'":"'"},we=d=>xt[d];function z(d,e){if(e){if(ze.test(d))return d.replace(ft,we)}else if(Se.test(d))return d.replace(gt,we);return d}const kt=/(^|[^\[])\^/g;function y(d,e){let t=typeof d=="string"?d:d.source;e=e||"";const n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(kt,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function me(d){try{d=encodeURI(d).replace(/%25/g,"%")}catch{return null}return d}const G={exec:()=>null};function ye(d,e){const t=d.replace(/\|/g,(i,r,o)=>{let a=!1,c=r;for(;--c>=0&&o[c]==="\\";)a=!a;return a?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length"u"?l={autoBom:!1}:typeof l!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function n(c,l,u){var h=new XMLHttpRequest;h.open("GET",c),h.responseType="blob",h.onload=function(){a(h.response,l,u)},h.onerror=function(){console.error("could not download file")},h.send()}function s(c){var l=new XMLHttpRequest;l.open("HEAD",c,!1);try{l.send()}catch{}return 200<=l.status&&299>=l.status}function i(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var l=document.createEvent("MouseEvents");l.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(l)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof H=="object"&&H.global===H?H:void 0,o=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(c,l,u){var h=r.URL||r.webkitURL,g=document.createElement("a");l=l||c.name||"download",g.download=l,g.rel="noopener",typeof c=="string"?(g.href=c,g.origin===location.origin?i(g):s(g.href)?n(c,l,u):i(g,g.target="_blank")):(g.href=h.createObjectURL(c),setTimeout(function(){h.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(c,l,u){if(l=l||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(t(c,u),l);else if(s(c))n(c,l,u);else{var h=document.createElement("a");h.href=c,h.target="_blank",setTimeout(function(){i(h)})}}:function(c,l,u,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof c=="string")return n(c,l,u);var g=c.type==="application/octet-stream",w=/constructor/i.test(r.HTMLElement)||r.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&w||o)&&typeof FileReader<"u"){var R=new FileReader;R.onloadend=function(){var E=R.result;E=T?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=E:location=E,h=null},R.readAsDataURL(c)}else{var B=r.URL||r.webkitURL,M=B.createObjectURL(c);h?h.location=M:location.href=M,h=null,setTimeout(function(){B.revokeObjectURL(M)},4e4)}});r.saveAs=a.saveAs=a,d.exports=a})})(Te);var dt=Te.exports;function ce(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let F=ce();function Re(d){F=d}const ze=/[&<>"']/,ft=new RegExp(ze.source,"g"),Se=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,gt=new RegExp(Se.source,"g"),xt={"&":"&","<":"<",">":">",'"':""","'":"'"},we=d=>xt[d];function z(d,e){if(e){if(ze.test(d))return d.replace(ft,we)}else if(Se.test(d))return d.replace(gt,we);return d}const kt=/(^|[^\[])\^/g;function y(d,e){let t=typeof d=="string"?d:d.source;e=e||"";const n={replace:(s,i)=>{let r=typeof i=="string"?i:i.source;return r=r.replace(kt,"$1"),t=t.replace(s,r),n},getRegex:()=>new RegExp(t,e)};return n}function me(d){try{d=encodeURI(d).replace(/%25/g,"%")}catch{return null}return d}const G={exec:()=>null};function ye(d,e){const t=d.replace(/\|/g,(i,r,o)=>{let a=!1,c=r;for(;--c>=0&&o[c]==="\\";)a=!a;return a?"|":" |"}),n=t.split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const i=s.match(/^\s+/);if(i===null)return s;const[r]=i;return r.length>=n.length?s.slice(n.length):s}).join(` `)}class ne{constructor(e){v(this,"options");v(this,"rules");v(this,"lexer");this.options=e||F}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(/^(?: {1,4}| {0,3}\t)/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:N(n,` `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=wt(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(/#$/.test(n)){const s=N(n,"#");(this.options.pedantic||!s||/ $/.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:N(t[0],` @@ -18,11 +18,11 @@ var De=Object.defineProperty;var Pe=(d,e,t)=>e in d?De(d,e,{enumerable:!0,config `),u=l.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` $1`).replace(/^ {0,3}>[ \t]?/gm,"");s=s?`${s} ${l}`:l,i=i?`${i} -${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=h,n.length===0)break;const g=r[r.length-1];if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const w=g,R=w.raw+` +${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,r,!0),this.lexer.state.top=h,n.length===0)break;const g=r[r.length-1];if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const w=g,T=w.raw+` `+n.join(` -`),T=this.blockquote(R);r[r.length-1]=T,s=s.substring(0,s.length-w.raw.length)+T.raw,i=i.substring(0,i.length-w.text.length)+T.text;break}else if((g==null?void 0:g.type)==="list"){const w=g,R=w.raw+` +`),R=this.blockquote(T);r[r.length-1]=R,s=s.substring(0,s.length-w.raw.length)+R.raw,i=i.substring(0,i.length-w.text.length)+R.text;break}else if((g==null?void 0:g.type)==="list"){const w=g,T=w.raw+` `+n.join(` -`),T=this.list(R);r[r.length-1]=T,s=s.substring(0,s.length-g.raw.length)+T.raw,i=i.substring(0,i.length-w.raw.length)+T.raw,n=R.substring(r[r.length-1].raw.length).split(` +`),R=this.list(T);r[r.length-1]=R,s=s.substring(0,s.length-g.raw.length)+R.raw,i=i.substring(0,i.length-w.raw.length)+R.raw,n=T.substring(r[r.length-1].raw.length).split(` `);continue}}return{type:"blockquote",raw:s,tokens:r,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,i={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const r=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let o=!1;for(;e;){let a=!1,c="",l="";if(!(t=r.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let u=t[2].split(` `,1)[0].replace(/^\t+/,B=>" ".repeat(3*B.length)),h=e.split(` `,1)[0],g=!u.trim(),w=0;if(this.options.pedantic?(w=2,l=u.trimStart()):g?w=t[1].length+1:(w=t[2].search(/[^ ]/),w=w>4?1:w,l=u.slice(w),w+=t[1].length),g&&/^[ \t]*$/.test(h)&&(c+=h+` @@ -30,9 +30,9 @@ ${u}`:u;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.block `,1)[0];let q;if(h=U,this.options.pedantic?(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," "),q=h):q=h.replace(/\t/g," "),E.test(h)||O.test(h)||oe.test(h)||B.test(h)||M.test(h))break;if(q.search(/[^ ]/)>=w||!h.trim())l+=` `+q.slice(w);else{if(g||u.replace(/\t/g," ").search(/[^ ]/)>=4||E.test(u)||O.test(u)||M.test(u))break;l+=` `+h}!g&&!h.trim()&&(g=!0),c+=U+` -`,e=e.substring(U.length+1),u=q.slice(w)}}i.loose||(o?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(c)&&(o=!0));let R=null,T;this.options.gfm&&(R=/^\[[ xX]\] /.exec(l),R&&(T=R[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:c,task:!!R,checked:T,loose:!1,text:l,tokens:[]}),i.raw+=c}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let a=0;au.type==="space"),l=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));i.loose=l}if(i.loose)for(let a=0;a$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=ye(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` +`,e=e.substring(U.length+1),u=q.slice(w)}}i.loose||(o?i.loose=!0:/\n[ \t]*\n[ \t]*$/.test(c)&&(o=!0));let T=null,R;this.options.gfm&&(T=/^\[[ xX]\] /.exec(l),T&&(R=T[0]!=="[ ] ",l=l.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:c,task:!!T,checked:R,loose:!1,text:l,tokens:[]}),i.raw+=c}i.items[i.items.length-1].raw=i.items[i.items.length-1].raw.trimEnd(),i.items[i.items.length-1].text=i.items[i.items.length-1].text.trimEnd(),i.raw=i.raw.trimEnd();for(let a=0;au.type==="space"),l=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));i.loose=l}if(i.loose)for(let a=0;a$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:i}}}table(e){const t=this.rules.block.table.exec(e);if(!t||!/[:|]/.test(t[2]))return;const n=ye(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` `):[],r={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const o of s)/^ *-+: *$/.test(o)?r.align.push("right"):/^ *:-+: *$/.test(o)?r.align.push("center"):/^ *:-+ *$/.test(o)?r.align.push("left"):r.align.push(null);for(let o=0;o({text:a,tokens:this.lexer.inline(a),header:!1,align:r.align[c]})));return r}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:z(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const r=N(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=bt(t[2],"()");if(r>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],i=r[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),ve(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),i=t[s.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return ve(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...s[0]].length-1;let o,a,c=r,l=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(s=u.exec(t))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){l+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+l);const h=[...s[0]][0].length,g=e.slice(0,r+s.index+h+a);if(Math.min(r,a)%2){const R=g.slice(1,-1);return{type:"em",raw:g,text:R,tokens:this.lexer.inlineTokens(R)}}const w=g.slice(2,-2);return{type:"strong",raw:g,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return s&&i&&(n=n.substring(1,n.length-1)),n=z(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=z(t[1]),s="mailto:"+n):(n=z(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,i;if(t[2]==="@")s=z(t[0]),i="mailto:"+s;else{let r;do r=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(r!==t[0]);s=z(t[0]),t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=z(t[0]),{type:"text",raw:t[0],text:n}}}}const mt=/^(?:[ \t]*(?:\n|$))+/,yt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,X=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ae=/(?:[*+-]|\d{1,9}[.)])/,Ee=y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ue=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_t=/^[^\n]+/,pe=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Rt=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tt=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ae).getRegex(),re="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",he=/|$))/,zt=y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",he).replace("tag",re).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ie=y(ue).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),St=y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ie).getRegex(),de={blockquote:St,code:yt,def:Rt,fences:vt,heading:$t,hr:X,html:zt,lheading:Ee,list:Tt,newline:mt,paragraph:Ie,table:G,text:_t},$e=y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),At={...de,table:$e,paragraph:y(ue).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex()},Et={...de,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:G,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(ue).replace("hr",X).replace("heading",` *#{1,6} *[^ +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:z(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;const r=N(n.slice(0,-1),"\\");if((n.length-r.length)%2===0)return}else{const r=bt(t[2],"()");if(r>-1){const a=(t[0].indexOf("!")===0?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],i="";if(this.options.pedantic){const r=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);r&&(s=r[1],i=r[3])}else i=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(n)?s=s.slice(1):s=s.slice(1,-1)),ve(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const s=(n[2]||n[1]).replace(/\s+/g," "),i=t[s.toLowerCase()];if(!i){const r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return ve(n,i,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const r=[...s[0]].length-1;let o,a,c=r,l=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+r);(s=u.exec(t))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){c+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){l+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+l);const h=[...s[0]][0].length,g=e.slice(0,r+s.index+h+a);if(Math.min(r,a)%2){const T=g.slice(1,-1);return{type:"em",raw:g,text:T,tokens:this.lexer.inlineTokens(T)}}const w=g.slice(2,-2);return{type:"strong",raw:g,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(/\n/g," ");const s=/[^ ]/.test(n),i=/^ /.test(n)&&/ $/.test(n);return s&&i&&(n=n.substring(1,n.length-1)),n=z(n,!0),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=z(t[1]),s="mailto:"+n):(n=z(t[1]),s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,i;if(t[2]==="@")s=z(t[0]),i="mailto:"+s;else{let r;do r=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(r!==t[0]);s=z(t[0]),t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let n;return this.lexer.state.inRawBlock?n=t[0]:n=z(t[0]),{type:"text",raw:t[0],text:n}}}}const mt=/^(?:[ \t]*(?:\n|$))+/,yt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,X=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ae=/(?:[*+-]|\d{1,9}[.)])/,Ee=y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ue=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_t=/^[^\n]+/,pe=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Tt=y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rt=y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ae).getRegex(),re="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",he=/|$))/,zt=y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",he).replace("tag",re).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ie=y(ue).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),St=y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ie).getRegex(),de={blockquote:St,code:yt,def:Tt,fences:vt,heading:$t,hr:X,html:zt,lheading:Ee,list:Rt,newline:mt,paragraph:Ie,table:G,text:_t},$e=y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex(),At={...de,table:$e,paragraph:y(ue).replace("hr",X).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",$e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",re).getRegex()},Et={...de,html:y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",he).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:G,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:y(ue).replace("hr",X).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",Ee).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Le=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,It=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ce=/^( {2,}|\\)\n(?!\s*$)/,Lt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Mt=y(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,K).getRegex(),jt=y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,K).getRegex(),qt=y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,K).getRegex(),Dt=y(/\\([punct])/,"gu").replace(/punct/g,K).getRegex(),Pt=y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ft=y(he).replace("(?:-->|$)","-->").getRegex(),Zt=y("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ft).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),se=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ot=y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",se).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Be=y(/^!?\[(label)\]\[(ref)\]/).replace("label",se).replace("ref",pe).getRegex(),Me=y(/^!?\[(ref)\](?:\[\])?/).replace("ref",pe).getRegex(),Ut=y("reflink|nolink(?!\\()","g").replace("reflink",Be).replace("nolink",Me).getRegex(),fe={_backpedal:G,anyPunctuation:Dt,autolink:Pt,blockSkip:Bt,br:Ce,code:It,del:G,emStrongLDelim:Mt,emStrongRDelimAst:jt,emStrongRDelimUnd:qt,escape:Le,link:Ot,nolink:Me,punctuation:Ct,reflink:Be,reflinkSearch:Ut,tag:Zt,text:Lt,url:G},Qt={...fe,link:y(/^!?\[(label)\]\((.*?)\)/).replace("label",se).getRegex(),reflink:y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",se).getRegex()},ae={...fe,escape:y(Le).replace("])","~|])").getRegex(),url:y(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\(s=o.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))){if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length),s.raw.length===1&&t.length>0?t[t.length-1].raw+=` `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length),i=t[t.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` @@ -63,4 +63,4 @@ ${e} `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${e}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),i=me(e);if(i===null)return s;e=i;let r='
",r}image({href:e,title:t,text:n}){const s=me(e);if(s===null)return n;e=s;let i=`${n}{const c=o[a].flat(1/0);n=n.concat(this.walkTokens(c,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const r=t.renderers[i.name];r?t.renderers[i.name]=function(...o){let a=i.renderer.apply(this,o);return a===!1&&(a=r.apply(this,o)),a}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const r=t[i.level];r?r.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),s.extensions=t),n.renderer){const i=this.defaults.renderer||new ie(this.defaults);for(const r in n.renderer){if(!(r in i))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const o=r,a=n.renderer[o],c=i[o];i[o]=(...l)=>{let u=a.apply(i,l);return u===!1&&(u=c.apply(i,l)),u||""}}s.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new ne(this.defaults);for(const r in n.tokenizer){if(!(r in i))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const o=r,a=n.tokenizer[o],c=i[o];i[o]=(...l)=>{let u=a.apply(i,l);return u===!1&&(u=c.apply(i,l)),u}}s.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new W;for(const r in n.hooks){if(!(r in i))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;const o=r,a=n.hooks[o],c=i[o];W.passThroughHooks.has(r)?i[o]=l=>{if(this.defaults.async)return Promise.resolve(a.call(i,l)).then(h=>c.call(i,h));const u=a.call(i,l);return c.call(i,u)}:i[o]=(...l)=>{let u=a.apply(i,l);return u===!1&&(u=c.apply(i,l)),u}}s.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,r=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(r.call(this,o)),i&&(a=a.concat(i.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return S.lex(e,t??this.defaults)}parser(e,t){return A.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{const i={...s},r={...this.defaults,...i},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const a=r.hooks?r.hooks.provideLexer():e?S.lex:S.lexInline,c=r.hooks?r.hooks.provideParser():e?A.parse:A.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>a(l,r)).then(l=>r.hooks?r.hooks.processAllTokens(l):l).then(l=>r.walkTokens?Promise.all(this.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>c(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(o);try{r.hooks&&(n=r.hooks.preprocess(n));let l=a(n,r);r.hooks&&(l=r.hooks.processAllTokens(l)),r.walkTokens&&this.walkTokens(l,r.walkTokens);let u=c(l,r);return r.hooks&&(u=r.hooks.postprocess(u)),u}catch(l){return o(l)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){const s="

An error occurred:

"+z(n.message+"",!0)+"
";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const P=new Nt;function m(d,e){return P.parse(d,e)}m.options=m.setOptions=function(d){return P.setOptions(d),m.defaults=P.defaults,Te(m.defaults),m};m.getDefaults=ce;m.defaults=F;m.use=function(...d){return P.use(...d),m.defaults=P.defaults,Te(m.defaults),m};m.walkTokens=function(d,e){return P.walkTokens(d,e)};m.parseInline=P.parseInline;m.Parser=A;m.parser=A.parse;m.Renderer=ie;m.TextRenderer=ge;m.Lexer=S;m.lexer=S.lex;m.Tokenizer=ne;m.Hooks=W;m.parse=m;m.options;m.setOptions;m.use;m.walkTokens;m.parseInline;A.parse;S.lex;const Vt={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Gt={class:"w-full max-w-md relative z-10"},Wt={class:"p-8"},Xt={class:"flex justify-center mb-8"},Kt={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},Jt={class:"rounded-full bg-gray-900 p-2"},Yt={class:"mb-6 relative"},en={class:"relative"},tn=["readonly"],nn={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-3"},sn=["disabled"],rn={class:"flex items-center justify-center relative z-10"},on={class:"mt-6 text-center"},ln={class:"flex-grow overflow-y-auto p-6"},an={class:"flex-shrink-0 mr-4"},cn={class:"flex-grow min-w-0 mr-4"},un={class:"flex-shrink-0 flex space-x-2"},pn=["onClick"],hn=["onClick"],dn=["onClick"],fn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gn={class:"space-y-4"},xn={class:"flex items-center"},kn={class:"flex items-center"},bn={class:"flex items-center"},wn={class:"flex items-center"},mn={key:0,class:"ml-2"},yn={key:1},vn=["href"],$n={class:"mt-6 flex flex-col items-center"},_n={class:"bg-white p-2 rounded-lg shadow-md"},Rn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Tn={class:"flex justify-between items-center mb-4"},zn=["innerHTML"],Sn={__name:"RetrievewFileView",setup(d){const e=Ze(),t=window.location.origin,n=et(),s=tt("isDarkMode"),i=st(),{receiveData:r}=Oe(i),o=D(""),a=D({readonly:!1,loading:!1}),c=D(!1),l=D(""),u=D(null),h=D(!1),g=We(),w=r,R=JSON.parse(localStorage.getItem("config")||"{}");Ue(()=>{const k=g.query.code;k&&(o.value=k)}),Qe(o,k=>{k.length===5&&T()});const T=async()=>{if(o.value.length!==5){e.showAlert("请输入5位取件码","error");return}a.value.readonly=!0,a.value.loading=!0;try{const k=await nt.post("/share/select/",{code:o.value});if(k.code===200)if(k.detail){const x=k.detail.text.startsWith("/share/download")||k.detail.name!=="Text",I={id:Date.now(),code:k.detail.code,filename:k.detail.name,size:B(k.detail.size),downloadUrl:x?k.detail.text:null,content:x?null:k.detail.text,date:new Date().toLocaleString()};let _=!0;i.receiveData.forEach(Y=>{if(Y.code===I.code){_=!1;return}}),_&&i.addReceiveData(I),x?h.value=!0:(J.value=!0,u.value=I),e.showAlert("文件获取成功","success")}else e.showAlert("无效的取件码","error");else e.showAlert(k.detail||"获取文件失败","error")}catch(k){console.error("取件失败:",k),e.showAlert("取件失败,请稍后重试","error")}finally{a.value.readonly=!1,a.value.loading=!1,o.value=""}},B=k=>{if(k===0)return"0 Bytes";const x=1024,I=["Bytes","KB","MB","GB","TB"],_=Math.floor(Math.log(k)/Math.log(x));return parseFloat((k/Math.pow(x,_)).toFixed(2))+" "+I[_]},M=k=>{u.value=k},E=k=>{const x=w.value.findIndex(I=>I.id===k);x!==-1&&i.deleteReceiveData(x)},O=()=>{h.value=!h.value},oe=()=>{n.push("/send")},U=k=>k.downloadUrl?`${t}${k.downloadUrl}`:`${t}?code=${k.code}`,q=k=>{if(console.log(k),k.downloadUrl)window.open(`${k.downloadUrl.startsWith("http")?"":t}${k.downloadUrl}`,"_blank");else if(k.content){const x=new Blob([k.content],{type:"text/plain;charset=utf-8"});dt.saveAs(x,`${k.filename}.txt`)}},J=D(!1),je=He(()=>u.value&&u.value.content?m(u.value.content):""),qe=()=>{J.value=!0};return(k,x)=>{const I=Xe("router-link");return C(),L("div",Vt,[p("div",Gt,[p("div",{class:b(["rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300",[f(s)?"bg-gray-800 bg-opacity-50 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[p("div",Wt,[p("div",Xt,[p("div",Kt,[p("div",Jt,[$(f(ct),{class:"w-8 h-8 text-white"})])])]),p("h2",{onClick:oe,class:b(["text-3xl cursor-pointer font-extrabold text-center mb-6",[f(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]])},j(f(R).name),3),p("form",{onSubmit:Ne(T,["prevent"])},[p("div",Yt,[p("label",{for:"code",class:b(["block text-sm font-medium mb-2",[f(s)?"text-gray-300":"text-gray-800"]])},"取件码",2),p("div",en,[Ve(p("input",{id:"code","onUpdate:modelValue":x[0]||(x[0]=_=>o.value=_),type:"text",class:b(["w-full px-4 py-3 rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10",[f(s)?"bg-gray-700 bg-opacity-50":"bg-gray-100",{"ring-2 ring-red-500":l.value},f(s)?"text-gray-300":"text-gray-800"]]),placeholder:"请输入5位取件码",required:"",readonly:a.value.readonly,maxlength:"5",onFocus:x[1]||(x[1]=_=>c.value=!0),onBlur:x[2]||(x[2]=_=>c.value=!1)},null,42,tn),[[Ge,o.value]]),a.value.loading?(C(),L("div",nn,x[5]||(x[5]=[p("span",{class:"animate-spin rounded-full h-5 w-5 border-b-2 border-indigo-500"},null,-1)]))):ee("",!0)]),p("div",{class:b(["absolute -bottom-0.5 left-2 h-0.5 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 transition-all duration-300 ease-in-out",{"w-97-100":c.value,"w-0":!c.value}])},null,2)]),p("button",{type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-3 px-4 rounded-lg hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group",disabled:a.value.loading},[p("span",rn,[p("span",null,j(a.value.loading?"处理中...":"提取文件"),1),$(f(ht),{class:"w-5 h-5 ml-2 transition-transform duration-300 transform group-hover:translate-x-1"})]),x[6]||(x[6]=p("span",{class:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},null,-1))],8,sn)],32),p("div",on,[$(I,{to:"/send",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:Q(()=>x[7]||(x[7]=[Z(" 需要发送文件?点击这里 ")])),_:1})])]),p("div",{class:b(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[f(s)?"bg-gray-800":"bg-gray-100"]])},[p("span",{class:b(["text-sm flex items-center",[f(s)?"text-gray-300":"text-gray-800"]])},[$(f(it),{class:"w-4 h-4 mr-1 text-green-400"}),x[8]||(x[8]=Z(" 安全加密 "))],2),p("button",{onClick:O,class:b(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[f(s)?"text-indigo-400":"text-indigo-600"]])},[x[9]||(x[9]=Z(" 取件记录 ")),$(f(rt),{class:"w-4 h-4 ml-1"})],2)],2)],2)]),$(le,{name:"drawer"},{default:Q(()=>[h.value?(C(),L("div",{key:0,class:b(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[f(s)?"bg-gray-900":"bg-white"]])},[p("div",{class:b(["flex justify-between items-center p-6 border-b",[f(s)?"border-gray-700":"border-gray-200"]])},[p("h3",{class:b(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 取件记录 ",2),p("button",{onClick:O,class:b(["hover:text-white transition duration-300",[f(s)?"text-gray-400":"text-gray-800"]])},[$(f(xe),{class:"w-6 h-6"})],2)],2),p("div",ln,[$(Ke,{name:"list",tag:"div",class:"space-y-4"},{default:Q(()=>[(C(!0),L(Je,null,Ye(f(w),_=>(C(),L("div",{key:_.id,class:b(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[f(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[p("div",an,[$(f(ke),{class:b(["w-10 h-10",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),p("div",cn,[p("p",{class:b(["font-medium text-lg truncate",[f(s)?"text-white":"text-gray-800"]])},j(_.filename),3),p("p",{class:b(["text-sm truncate",[f(s)?"text-gray-400":"text-gray-600"]])},j(_.date)+" · "+j(_.size),3)]),p("div",un,[p("button",{onClick:Y=>M(_),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-indigo-400 text-indigo-400":"hover:bg-indigo-100 text-indigo-600"]])},[$(f(at),{class:"w-5 h-5"})],10,pn),p("button",{onClick:Y=>q(_),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[$(f(be),{class:"w-5 h-5"})],10,hn),p("button",{onClick:Y=>E(_.id),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[$(f(pt),{class:"w-5 h-5"})],10,dn)])],2))),128))]),_:1})])],2)):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[u.value?(C(),L("div",fn,[p("div",{class:b(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 overflow-hidden",[f(s)?"bg-gray-800":"bg-white"]])},[p("h3",{class:b(["text-2xl font-bold mb-6 truncate",[f(s)?"text-white":"text-gray-800"]])}," 文件详情 ",2),p("div",gn,[p("div",xn,[$(f(ke),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[10]||(x[10]=p("span",{class:"font-medium"},"文件名:",-1)),Z(j(u.value.filename),1)],2)]),p("div",kn,[$(f(ot),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[11]||(x[11]=p("span",{class:"font-medium"},"取件日期:",-1)),Z(j(u.value.date),1)],2)]),p("div",bn,[$(f(ut),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[12]||(x[12]=p("span",{class:"font-medium"},"文件大小:",-1)),Z(j(u.value.size),1)],2)]),p("div",wn,[$(f(be),{class:b(["w-6 h-6 mr-3",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([f(s)?"text-gray-300":"text-gray-800"])},x[13]||(x[13]=[p("span",{class:"font-medium"},"文件内容:",-1)]),2),u.value.filename=="Text"?(C(),L("div",mn,[p("button",{onClick:qe,class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 预览内容 ")])):(C(),L("div",yn,[p("a",{href:`${f(t)}${u.value.downloadUrl}`,target:"_blank",rel:"noopener noreferrer",class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 点击下载 ",8,vn)]))])]),p("div",$n,[p("h4",{class:b(["text-lg font-semibold mb-3",[f(s)?"text-white":"text-gray-800"]])}," 取件二维码 ",2),p("div",_n,[$(lt,{value:U(u.value),size:128,level:"M"},null,8,["value"])]),p("p",{class:b(["mt-2 text-sm",[f(s)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)]),p("button",{onClick:x[3]||(x[3]=_=>u.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[J.value?(C(),L("div",Rn,[p("div",{class:b(["p-8 rounded-2xl max-w-3xl w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 max-h-[80vh] overflow-y-auto",[f(s)?"bg-gray-800":"bg-white"]])},[p("div",Tn,[p("h3",{class:b(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 内容预览 ",2),p("button",{onClick:x[4]||(x[4]=_=>J.value=!1),class:"text-gray-500 hover:text-gray-700"},[$(f(xe),{class:"w-6 h-6"})])]),p("div",{class:b(["prose max-w-none",[f(s)?"prose-invert":""]]),innerHTML:je.value},null,10,zn)],2)])):ee("",!0)]),_:1})])}}},Mn=Fe(Sn,[["__scopeId","data-v-f8bcace2"]]);export{Mn as default}; +Please report this to https://github.com/markedjs/marked.`,e){const s="

An error occurred:

"+z(n.message+"",!0)+"
";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}}const P=new Nt;function m(d,e){return P.parse(d,e)}m.options=m.setOptions=function(d){return P.setOptions(d),m.defaults=P.defaults,Re(m.defaults),m};m.getDefaults=ce;m.defaults=F;m.use=function(...d){return P.use(...d),m.defaults=P.defaults,Re(m.defaults),m};m.walkTokens=function(d,e){return P.walkTokens(d,e)};m.parseInline=P.parseInline;m.Parser=A;m.parser=A.parse;m.Renderer=ie;m.TextRenderer=ge;m.Lexer=S;m.lexer=S.lex;m.Tokenizer=ne;m.Hooks=W;m.parse=m;m.options;m.setOptions;m.use;m.walkTokens;m.parseInline;A.parse;S.lex;const Vt={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},Gt={class:"w-full max-w-md relative z-10"},Wt={class:"p-8"},Xt={class:"flex justify-center mb-8"},Kt={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},Jt={class:"rounded-full bg-gray-900 p-2"},Yt={class:"mb-6 relative"},en={class:"relative"},tn=["readonly"],nn={key:0,class:"absolute inset-y-0 right-0 flex items-center pr-3"},sn=["disabled"],rn={class:"flex items-center justify-center relative z-10"},on={class:"mt-6 text-center"},ln={class:"flex-grow overflow-y-auto p-6"},an={class:"flex-shrink-0 mr-4"},cn={class:"flex-grow min-w-0 mr-4"},un={class:"flex-shrink-0 flex space-x-2"},pn=["onClick"],hn=["onClick"],dn=["onClick"],fn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gn={class:"space-y-4"},xn={class:"flex items-center"},kn={class:"flex items-center"},bn={class:"flex items-center"},wn={class:"flex items-center"},mn={key:0,class:"ml-2"},yn={key:1},vn=["href"],$n={class:"mt-6 flex flex-col items-center"},_n={class:"bg-white p-2 rounded-lg shadow-md"},Tn={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},Rn={class:"flex justify-between items-center mb-4"},zn=["innerHTML"],Sn={__name:"RetrievewFileView",setup(d){const e=Ze(),t=window.location.origin,n=et(),s=tt("isDarkMode"),i=st(),{receiveData:r}=Oe(i),o=D(""),a=D({readonly:!1,loading:!1}),c=D(!1),l=D(""),u=D(null),h=D(!1),g=We(),w=r,T=JSON.parse(localStorage.getItem("config")||"{}");Ue(()=>{const k=g.query.code;k&&(o.value=k)}),Qe(o,k=>{k.length===5&&R()});const R=async()=>{if(o.value.length!==5){e.showAlert("请输入5位取件码","error");return}a.value.readonly=!0,a.value.loading=!0;try{const k=await nt.post("/share/select/",{code:o.value});if(k.code===200)if(k.detail){const x=k.detail.text.startsWith("/share/download")||k.detail.name!=="Text",I={id:Date.now(),code:k.detail.code,filename:k.detail.name,size:B(k.detail.size),downloadUrl:x?k.detail.text:null,content:x?null:k.detail.text,date:new Date().toLocaleString()};let _=!0;i.receiveData.forEach(Y=>{if(Y.code===I.code){_=!1;return}}),_&&i.addReceiveData(I),x?h.value=!0:(J.value=!0,u.value=I),e.showAlert("文件获取成功","success")}else e.showAlert("无效的取件码","error");else e.showAlert(k.detail||"获取文件失败","error")}catch(k){console.error("取件失败:",k),e.showAlert("取件失败,请稍后重试","error")}finally{a.value.readonly=!1,a.value.loading=!1,o.value=""}},B=k=>{if(k===0)return"0 Bytes";const x=1024,I=["Bytes","KB","MB","GB","TB"],_=Math.floor(Math.log(k)/Math.log(x));return parseFloat((k/Math.pow(x,_)).toFixed(2))+" "+I[_]},M=k=>{u.value=k},E=k=>{const x=w.value.findIndex(I=>I.id===k);x!==-1&&i.deleteReceiveData(x)},O=()=>{h.value=!h.value},oe=()=>{n.push("/send")},U=k=>k.downloadUrl?`${t}${k.downloadUrl}`:`${t}?code=${k.code}`,q=k=>{if(console.log(k),k.downloadUrl)window.open(`${k.downloadUrl.startsWith("http")?"":t}${k.downloadUrl}`,"_blank");else if(k.content){const x=new Blob([k.content],{type:"text/plain;charset=utf-8"});dt.saveAs(x,`${k.filename}.txt`)}},J=D(!1),je=He(()=>u.value&&u.value.content?m(u.value.content):""),qe=()=>{J.value=!0};return(k,x)=>{const I=Xe("router-link");return C(),L("div",Vt,[p("div",Gt,[p("div",{class:b(["rounded-3xl shadow-2xl overflow-hidden border transform transition-all duration-300",[f(s)?"bg-gray-800 bg-opacity-50 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[p("div",Wt,[p("div",Xt,[p("div",Kt,[p("div",Jt,[$(f(ct),{class:"w-8 h-8 text-white"})])])]),p("h2",{onClick:oe,class:b(["text-3xl cursor-pointer font-extrabold text-center mb-6",[f(s)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]])},j(f(T).name),3),p("form",{onSubmit:Ne(R,["prevent"])},[p("div",Yt,[p("label",{for:"code",class:b(["block text-sm font-medium mb-2",[f(s)?"text-gray-300":"text-gray-800"]])},"取件码",2),p("div",en,[Ve(p("input",{id:"code","onUpdate:modelValue":x[0]||(x[0]=_=>o.value=_),type:"text",class:b(["w-full px-4 py-3 rounded-lg placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 pr-10",[f(s)?"bg-gray-700 bg-opacity-50":"bg-gray-100",{"ring-2 ring-red-500":l.value},f(s)?"text-gray-300":"text-gray-800"]]),placeholder:"请输入5位取件码",required:"",readonly:a.value.readonly,maxlength:"5",onFocus:x[1]||(x[1]=_=>c.value=!0),onBlur:x[2]||(x[2]=_=>c.value=!1)},null,42,tn),[[Ge,o.value]]),a.value.loading?(C(),L("div",nn,x[5]||(x[5]=[p("span",{class:"animate-spin rounded-full h-5 w-5 border-b-2 border-indigo-500"},null,-1)]))):ee("",!0)]),p("div",{class:b(["absolute -bottom-0.5 left-2 h-0.5 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 transition-all duration-300 ease-in-out",{"w-97-100":c.value,"w-0":!c.value}])},null,2)]),p("button",{type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-3 px-4 rounded-lg hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group",disabled:a.value.loading},[p("span",rn,[p("span",null,j(a.value.loading?"处理中...":"提取文件"),1),$(f(ht),{class:"w-5 h-5 ml-2 transition-transform duration-300 transform group-hover:translate-x-1"})]),x[6]||(x[6]=p("span",{class:"absolute top-0 left-0 w-full h-full bg-gradient-to-r from-pink-500 via-purple-500 to-indigo-500 opacity-0 group-hover:opacity-100 transition-opacity duration-300"},null,-1))],8,sn)],32),p("div",on,[$(I,{to:"/send",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:Q(()=>x[7]||(x[7]=[Z(" 需要发送文件?点击这里 ")])),_:1})])]),p("div",{class:b(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[f(s)?"bg-gray-800":"bg-gray-100"]])},[p("span",{class:b(["text-sm flex items-center",[f(s)?"text-gray-300":"text-gray-800"]])},[$(f(it),{class:"w-4 h-4 mr-1 text-green-400"}),x[8]||(x[8]=Z(" 安全加密 "))],2),p("button",{onClick:O,class:b(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[f(s)?"text-indigo-400":"text-indigo-600"]])},[x[9]||(x[9]=Z(" 取件记录 ")),$(f(rt),{class:"w-4 h-4 ml-1"})],2)],2)],2)]),$(le,{name:"drawer"},{default:Q(()=>[h.value?(C(),L("div",{key:0,class:b(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[f(s)?"bg-gray-900":"bg-white"]])},[p("div",{class:b(["flex justify-between items-center p-6 border-b",[f(s)?"border-gray-700":"border-gray-200"]])},[p("h3",{class:b(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 取件记录 ",2),p("button",{onClick:O,class:b(["hover:text-white transition duration-300",[f(s)?"text-gray-400":"text-gray-800"]])},[$(f(xe),{class:"w-6 h-6"})],2)],2),p("div",ln,[$(Ke,{name:"list",tag:"div",class:"space-y-4"},{default:Q(()=>[(C(!0),L(Je,null,Ye(f(w),_=>(C(),L("div",{key:_.id,class:b(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[f(s)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[p("div",an,[$(f(ke),{class:b(["w-10 h-10",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),p("div",cn,[p("p",{class:b(["font-medium text-lg truncate",[f(s)?"text-white":"text-gray-800"]])},j(_.filename),3),p("p",{class:b(["text-sm truncate",[f(s)?"text-gray-400":"text-gray-600"]])},j(_.date)+" · "+j(_.size),3)]),p("div",un,[p("button",{onClick:Y=>M(_),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-indigo-400 text-indigo-400":"hover:bg-indigo-100 text-indigo-600"]])},[$(f(at),{class:"w-5 h-5"})],10,pn),p("button",{onClick:Y=>q(_),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[$(f(be),{class:"w-5 h-5"})],10,hn),p("button",{onClick:Y=>E(_.id),class:b(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[f(s)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[$(f(pt),{class:"w-5 h-5"})],10,dn)])],2))),128))]),_:1})])],2)):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[u.value?(C(),L("div",fn,[p("div",{class:b(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 overflow-hidden",[f(s)?"bg-gray-800":"bg-white"]])},[p("h3",{class:b(["text-2xl font-bold mb-6 truncate",[f(s)?"text-white":"text-gray-800"]])}," 文件详情 ",2),p("div",gn,[p("div",xn,[$(f(ke),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[10]||(x[10]=p("span",{class:"font-medium"},"文件名:",-1)),Z(j(u.value.filename),1)],2)]),p("div",kn,[$(f(ot),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[11]||(x[11]=p("span",{class:"font-medium"},"取件日期:",-1)),Z(j(u.value.date),1)],2)]),p("div",bn,[$(f(ut),{class:b(["w-6 h-6 mr-3 flex-shrink-0",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([[f(s)?"text-gray-300":"text-gray-800"],"truncate flex-grow"])},[x[12]||(x[12]=p("span",{class:"font-medium"},"文件大小:",-1)),Z(j(u.value.size),1)],2)]),p("div",wn,[$(f(be),{class:b(["w-6 h-6 mr-3",[f(s)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),p("p",{class:b([f(s)?"text-gray-300":"text-gray-800"])},x[13]||(x[13]=[p("span",{class:"font-medium"},"文件内容:",-1)]),2),u.value.filename=="Text"?(C(),L("div",mn,[p("button",{onClick:qe,class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 预览内容 ")])):(C(),L("div",yn,[p("a",{href:`${f(t)}${u.value.downloadUrl}`,target:"_blank",rel:"noopener noreferrer",class:"px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition duration-300"}," 点击下载 ",8,vn)]))])]),p("div",$n,[p("h4",{class:b(["text-lg font-semibold mb-3",[f(s)?"text-white":"text-gray-800"]])}," 取件二维码 ",2),p("div",_n,[$(lt,{value:U(u.value),size:128,level:"M"},null,8,["value"])]),p("p",{class:b(["mt-2 text-sm",[f(s)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)]),p("button",{onClick:x[3]||(x[3]=_=>u.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):ee("",!0)]),_:1}),$(le,{name:"fade"},{default:Q(()=>[J.value?(C(),L("div",Tn,[p("div",{class:b(["p-8 rounded-2xl max-w-3xl w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70 max-h-[80vh] overflow-y-auto",[f(s)?"bg-gray-800":"bg-white"]])},[p("div",Rn,[p("h3",{class:b(["text-2xl font-bold",[f(s)?"text-white":"text-gray-800"]])}," 内容预览 ",2),p("button",{onClick:x[4]||(x[4]=_=>J.value=!1),class:"text-gray-500 hover:text-gray-700"},[$(f(xe),{class:"w-6 h-6"})])]),p("div",{class:b(["prose max-w-none",[f(s)?"prose-invert":""]]),innerHTML:je.value},null,10,zn)],2)])):ee("",!0)]),_:1})])}}},Mn=Fe(Sn,[["__scopeId","data-v-f8bcace2"]]);export{Mn as default}; diff --git a/themes/2024/assets/SendFileView-CZhlKHE_.js b/themes/2024/assets/SendFileView-CZhlKHE_.js deleted file mode 100644 index a1bd640..0000000 --- a/themes/2024/assets/SendFileView-CZhlKHE_.js +++ /dev/null @@ -1,21 +0,0 @@ -import{c as W,d as oe,r as P,o as ne,w as he,a as F,b as D,e as a,_ as se,u as ae,f as ge,n as f,g as i,t as U,h as Q,i as M,j as E,k as N,l as J,v as X,T as K,m as pe,F as Y,p as Z,q as V,X as ye,s as ve,x as be,y as ee,z as xe,A as me}from"./index-EADe6V-l.js";import{g as we,u as _e,S as Ce,C as Ae,a as Me,Q as Se,E as Be}from"./fileData-B92rnDh4.js";import{F as te}from"./file-CTH8PUKS.js";import{H as Ie,T as Te}from"./trash-COYxyedR.js";/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ue=W("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fe=W("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const De=W("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** - * @license lucide-vue-next v0.445.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ze=W("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Pe=oe({__name:"BorderProgressBar",props:{progress:{}},setup(S){const k=S,T=P(null),u=P(null);let d=null;const C=()=>{if(!d||!u.value||!T.value)return;const v=T.value.clientWidth,x=T.value.clientHeight;u.value.width=v,u.value.height=x;const p=4,c=8;d.lineWidth=p;const A=d.createLinearGradient(0,0,v,x);A.addColorStop(0,"#4f46e5"),A.addColorStop(.5,"#7c3aed"),A.addColorStop(1,"#db2777"),d.strokeStyle="rgba(229, 231, 235, 0.2)",w(d,p/2,p/2,v-p,x-p,c),d.stroke();const I=((v+x)*2-8*c+2*Math.PI*c)*k.progress/100;d.strokeStyle=A,d.lineCap="round",d.lineJoin="round",d.beginPath();let y=I;const m=p/2,h=v-p,s=x-p;if(y>0){const n=Math.min(h-2*c,y);d.moveTo(c+m,m),d.lineTo(n+c+m,m),y-=n}if(y>0){const n=Math.min(Math.PI/2,y/c);d.arc(h-c+m,c+m,c,-Math.PI/2,n-Math.PI/2,!1),y-=n*c}if(y>0){const n=Math.min(s-2*c,y);d.lineTo(h+m,n+c+m),y-=n}if(y>0){const n=Math.min(Math.PI/2,y/c);d.arc(h-c+m,s-c+m,c,0,n,!1),y-=n*c}if(y>0){const n=Math.min(h-2*c,y);d.lineTo(h-n-c+m,s+m),y-=n}if(y>0){const n=Math.min(Math.PI/2,y/c);d.arc(c+m,s-c+m,c,Math.PI/2,Math.PI/2+n,!1),y-=n*c}if(y>0){const n=Math.min(s-2*c,y);d.lineTo(m,s-n-c+m),y-=n}if(y>0){const n=Math.min(Math.PI/2,y/c);d.arc(c+m,c+m,c,Math.PI,Math.PI+n,!1)}d.stroke()};function w(v,x,p,c,A,_){v.beginPath(),v.moveTo(x+_,p),v.lineTo(x+c-_,p),v.arcTo(x+c,p,x+c,p+_,_),v.lineTo(x+c,p+A-_),v.arcTo(x+c,p+A,x+c-_,p+A,_),v.lineTo(x+_,p+A),v.arcTo(x,p+A,x,p+A-_,_),v.lineTo(x,p+_),v.arcTo(x,p,x+_,p,_),v.closePath()}return ne(()=>{u.value&&(d=u.value.getContext("2d"),C())}),he(()=>k.progress,C),(v,x)=>(F(),D("div",{class:"border-progress-container",ref_key:"container",ref:T},[a("canvas",{ref_key:"canvas",ref:u,class:"border-progress-canvas"},null,512)],512))}}),ke=se(Pe,[["__scopeId","data-v-2fbf5085"]]);var ie={exports:{}};(function(S,k){(function(T){S.exports=T()})(function(T){var u=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function d(s,n){var t=s[0],e=s[1],o=s[2],r=s[3];t+=(e&o|~e&r)+n[0]-680876936|0,t=(t<<7|t>>>25)+e|0,r+=(t&e|~t&o)+n[1]-389564586|0,r=(r<<12|r>>>20)+t|0,o+=(r&t|~r&e)+n[2]+606105819|0,o=(o<<17|o>>>15)+r|0,e+=(o&r|~o&t)+n[3]-1044525330|0,e=(e<<22|e>>>10)+o|0,t+=(e&o|~e&r)+n[4]-176418897|0,t=(t<<7|t>>>25)+e|0,r+=(t&e|~t&o)+n[5]+1200080426|0,r=(r<<12|r>>>20)+t|0,o+=(r&t|~r&e)+n[6]-1473231341|0,o=(o<<17|o>>>15)+r|0,e+=(o&r|~o&t)+n[7]-45705983|0,e=(e<<22|e>>>10)+o|0,t+=(e&o|~e&r)+n[8]+1770035416|0,t=(t<<7|t>>>25)+e|0,r+=(t&e|~t&o)+n[9]-1958414417|0,r=(r<<12|r>>>20)+t|0,o+=(r&t|~r&e)+n[10]-42063|0,o=(o<<17|o>>>15)+r|0,e+=(o&r|~o&t)+n[11]-1990404162|0,e=(e<<22|e>>>10)+o|0,t+=(e&o|~e&r)+n[12]+1804603682|0,t=(t<<7|t>>>25)+e|0,r+=(t&e|~t&o)+n[13]-40341101|0,r=(r<<12|r>>>20)+t|0,o+=(r&t|~r&e)+n[14]-1502002290|0,o=(o<<17|o>>>15)+r|0,e+=(o&r|~o&t)+n[15]+1236535329|0,e=(e<<22|e>>>10)+o|0,t+=(e&r|o&~r)+n[1]-165796510|0,t=(t<<5|t>>>27)+e|0,r+=(t&o|e&~o)+n[6]-1069501632|0,r=(r<<9|r>>>23)+t|0,o+=(r&e|t&~e)+n[11]+643717713|0,o=(o<<14|o>>>18)+r|0,e+=(o&t|r&~t)+n[0]-373897302|0,e=(e<<20|e>>>12)+o|0,t+=(e&r|o&~r)+n[5]-701558691|0,t=(t<<5|t>>>27)+e|0,r+=(t&o|e&~o)+n[10]+38016083|0,r=(r<<9|r>>>23)+t|0,o+=(r&e|t&~e)+n[15]-660478335|0,o=(o<<14|o>>>18)+r|0,e+=(o&t|r&~t)+n[4]-405537848|0,e=(e<<20|e>>>12)+o|0,t+=(e&r|o&~r)+n[9]+568446438|0,t=(t<<5|t>>>27)+e|0,r+=(t&o|e&~o)+n[14]-1019803690|0,r=(r<<9|r>>>23)+t|0,o+=(r&e|t&~e)+n[3]-187363961|0,o=(o<<14|o>>>18)+r|0,e+=(o&t|r&~t)+n[8]+1163531501|0,e=(e<<20|e>>>12)+o|0,t+=(e&r|o&~r)+n[13]-1444681467|0,t=(t<<5|t>>>27)+e|0,r+=(t&o|e&~o)+n[2]-51403784|0,r=(r<<9|r>>>23)+t|0,o+=(r&e|t&~e)+n[7]+1735328473|0,o=(o<<14|o>>>18)+r|0,e+=(o&t|r&~t)+n[12]-1926607734|0,e=(e<<20|e>>>12)+o|0,t+=(e^o^r)+n[5]-378558|0,t=(t<<4|t>>>28)+e|0,r+=(t^e^o)+n[8]-2022574463|0,r=(r<<11|r>>>21)+t|0,o+=(r^t^e)+n[11]+1839030562|0,o=(o<<16|o>>>16)+r|0,e+=(o^r^t)+n[14]-35309556|0,e=(e<<23|e>>>9)+o|0,t+=(e^o^r)+n[1]-1530992060|0,t=(t<<4|t>>>28)+e|0,r+=(t^e^o)+n[4]+1272893353|0,r=(r<<11|r>>>21)+t|0,o+=(r^t^e)+n[7]-155497632|0,o=(o<<16|o>>>16)+r|0,e+=(o^r^t)+n[10]-1094730640|0,e=(e<<23|e>>>9)+o|0,t+=(e^o^r)+n[13]+681279174|0,t=(t<<4|t>>>28)+e|0,r+=(t^e^o)+n[0]-358537222|0,r=(r<<11|r>>>21)+t|0,o+=(r^t^e)+n[3]-722521979|0,o=(o<<16|o>>>16)+r|0,e+=(o^r^t)+n[6]+76029189|0,e=(e<<23|e>>>9)+o|0,t+=(e^o^r)+n[9]-640364487|0,t=(t<<4|t>>>28)+e|0,r+=(t^e^o)+n[12]-421815835|0,r=(r<<11|r>>>21)+t|0,o+=(r^t^e)+n[15]+530742520|0,o=(o<<16|o>>>16)+r|0,e+=(o^r^t)+n[2]-995338651|0,e=(e<<23|e>>>9)+o|0,t+=(o^(e|~r))+n[0]-198630844|0,t=(t<<6|t>>>26)+e|0,r+=(e^(t|~o))+n[7]+1126891415|0,r=(r<<10|r>>>22)+t|0,o+=(t^(r|~e))+n[14]-1416354905|0,o=(o<<15|o>>>17)+r|0,e+=(r^(o|~t))+n[5]-57434055|0,e=(e<<21|e>>>11)+o|0,t+=(o^(e|~r))+n[12]+1700485571|0,t=(t<<6|t>>>26)+e|0,r+=(e^(t|~o))+n[3]-1894986606|0,r=(r<<10|r>>>22)+t|0,o+=(t^(r|~e))+n[10]-1051523|0,o=(o<<15|o>>>17)+r|0,e+=(r^(o|~t))+n[1]-2054922799|0,e=(e<<21|e>>>11)+o|0,t+=(o^(e|~r))+n[8]+1873313359|0,t=(t<<6|t>>>26)+e|0,r+=(e^(t|~o))+n[15]-30611744|0,r=(r<<10|r>>>22)+t|0,o+=(t^(r|~e))+n[6]-1560198380|0,o=(o<<15|o>>>17)+r|0,e+=(r^(o|~t))+n[13]+1309151649|0,e=(e<<21|e>>>11)+o|0,t+=(o^(e|~r))+n[4]-145523070|0,t=(t<<6|t>>>26)+e|0,r+=(e^(t|~o))+n[11]-1120210379|0,r=(r<<10|r>>>22)+t|0,o+=(t^(r|~e))+n[2]+718787259|0,o=(o<<15|o>>>17)+r|0,e+=(r^(o|~t))+n[9]-343485551|0,e=(e<<21|e>>>11)+o|0,s[0]=t+s[0]|0,s[1]=e+s[1]|0,s[2]=o+s[2]|0,s[3]=r+s[3]|0}function C(s){var n=[],t;for(t=0;t<64;t+=4)n[t>>2]=s.charCodeAt(t)+(s.charCodeAt(t+1)<<8)+(s.charCodeAt(t+2)<<16)+(s.charCodeAt(t+3)<<24);return n}function w(s){var n=[],t;for(t=0;t<64;t+=4)n[t>>2]=s[t]+(s[t+1]<<8)+(s[t+2]<<16)+(s[t+3]<<24);return n}function v(s){var n=s.length,t=[1732584193,-271733879,-1732584194,271733878],e,o,r,B,$,L;for(e=64;e<=n;e+=64)d(t,C(s.substring(e-64,e)));for(s=s.substring(e-64),o=s.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e>2]|=s.charCodeAt(e)<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(d(t,r),e=0;e<16;e+=1)r[e]=0;return B=n*8,B=B.toString(16).match(/(.*?)(.{0,8})$/),$=parseInt(B[2],16),L=parseInt(B[1],16)||0,r[14]=$,r[15]=L,d(t,r),t}function x(s){var n=s.length,t=[1732584193,-271733879,-1732584194,271733878],e,o,r,B,$,L;for(e=64;e<=n;e+=64)d(t,w(s.subarray(e-64,e)));for(s=e-64>2]|=s[e]<<(e%4<<3);if(r[e>>2]|=128<<(e%4<<3),e>55)for(d(t,r),e=0;e<16;e+=1)r[e]=0;return B=n*8,B=B.toString(16).match(/(.*?)(.{0,8})$/),$=parseInt(B[2],16),L=parseInt(B[1],16)||0,r[14]=$,r[15]=L,d(t,r),t}function p(s){var n="",t;for(t=0;t<4;t+=1)n+=u[s>>t*8+4&15]+u[s>>t*8&15];return n}function c(s){var n;for(n=0;nr?new ArrayBuffer(0):(B=r-o,$=new ArrayBuffer(B),L=new Uint8Array($),q=new Uint8Array(this,o,B),L.set(q),$)}}();function A(s){return/[\u0080-\uFFFF]/.test(s)&&(s=unescape(encodeURIComponent(s))),s}function _(s,n){var t=s.length,e=new ArrayBuffer(t),o=new Uint8Array(e),r;for(r=0;r>2]|=n.charCodeAt(e)<<(e%4<<3);return this._finish(o,t),r=c(this._hash),s&&(r=m(r)),this.reset(),r},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(s){return this._buff=s.buff,this._length=s.length,this._hash=s.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(s,n){var t=n,e,o,r;if(s[t>>2]|=128<<(t%4<<3),t>55)for(d(this._hash,s),t=0;t<16;t+=1)s[t]=0;e=this._length*8,e=e.toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(e[2],16),r=parseInt(e[1],16)||0,s[14]=o,s[15]=r,d(this._hash,s)},h.hash=function(s,n){return h.hashBinary(A(s),n)},h.hashBinary=function(s,n){var t=v(s),e=c(t);return n?m(e):e},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(s){var n=y(this._buff.buffer,s),t=n.length,e;for(this._length+=s.byteLength,e=64;e<=t;e+=64)d(this._hash,w(n.subarray(e-64,e)));return this._buff=e-64>2]|=n[o]<<(o%4<<3);return this._finish(e,t),r=c(this._hash),s&&(r=m(r)),this.reset(),r},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var s=h.prototype.getState.call(this);return s.buff=I(s.buff),s},h.ArrayBuffer.prototype.setState=function(s){return s.buff=_(s.buff,!0),h.prototype.setState.call(this,s)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(s,n){var t=x(new Uint8Array(s)),e=c(t);return n?m(e):e},h})})(ie);var $e=ie.exports;const Le=we($e),le=async(S,k={})=>{const{successMsg:T="复制成功",errorMsg:u="复制失败,请手动复制",showMsg:d=!0}=k,C=ae();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(S),d&&C.showAlert(T,"success"),!0;const w=document.createElement("textarea");w.value=S,w.style.position="fixed",w.style.opacity="0",document.body.appendChild(w),w.select();const v=document.execCommand("copy");if(document.body.removeChild(w),v)return d&&C.showAlert(T,"success"),!0;throw new Error("execCommand copy failed")}catch(w){return console.error("复制失败:",w),d&&C.showAlert(u,"error"),!1}},re=async S=>{const k=`${window.location.origin}/#/?code=${S}`;return le(k,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},je=async S=>le(S,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),Re=S=>S>=1024*1024*1024?Math.round(S/(1024*1024*1024))+"GB":S>=1024*1024?Math.round(S/(1024*1024))+"MB":Math.round(S/1024)+"KB",Ve={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},He={class:"p-8"},Ee={class:"flex justify-center space-x-4 mb-6"},Ne={key:"file",class:"grid grid-cols-1 gap-8"},qe={key:0,class:"absolute inset-0 w-full h-full"},We={class:"block truncate"},Ge={key:"text",class:"grid grid-cols-1 gap-8"},Qe={key:0,class:"flex flex-col"},Je={class:"flex flex-col space-y-4"},Ke=["value"],Oe={key:0,class:"flex items-center space-x-2"},Xe={class:"relative flex-grow"},Ye=["placeholder"],Ze={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},et={class:"relative z-10 flex items-center justify-center text-lg"},tt={class:"mt-6 text-center"},rt={class:"flex-grow overflow-y-auto p-6"},ot={class:"flex-shrink-0 mr-4"},nt={class:"flex-grow min-w-0 mr-4"},st={class:"flex-shrink-0 flex space-x-2"},at=["onClick"],it=["onClick"],lt=["onClick"],ut={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},ct={class:"space-y-4"},dt={class:"flex items-center"},ft={class:"flex items-center"},ht={class:"flex items-center"},gt={class:"flex items-center"},pt={class:"mt-6 flex justify-between items-center"},yt={class:"flex flex-col items-center w-1/2 pr-2"},vt={class:"text-2xl font-bold text-indigo-600"},bt={class:"flex flex-col items-center w-1/2 pl-2"},xt={class:"bg-white p-2 rounded-lg shadow-md"},mt=oe({__name:"SendFileView",setup(S){const k=JSON.parse(localStorage.getItem("config")||"{}"),T=me(),u=be("isDarkMode"),d=_e(),C=P("file"),w=P(null),v=P(""),x=P(null),p=P("day"),c=P("1"),A=P(0),_=P(!1),I=P(null),y=ae(),m=ge(()=>d.shareData),h=P(""),s=()=>{var g;(g=x.value)==null||g.click()},n=async g=>{const l=g.target;l.files&&l.files.length>0&&(w.value=l.files[0],h.value=await e(w.value))},t=async g=>{var l;(l=g.dataTransfer)!=null&&l.files&&g.dataTransfer.files.length>0&&(w.value=g.dataTransfer.files[0],h.value=await e(w.value))},e=async g=>new Promise(l=>{const b=new Le.ArrayBuffer,z=new FileReader;let R=0;const G=Math.ceil(g.size/2097152);z.onload=H=>{b.append(H.target.result),R++,R{const H=R*2097152,fe=H+2097152>=g.size?g.size:H+2097152;z.readAsArrayBuffer(g.slice(H,fe))};O()}),o=(g=p.value)=>{switch(g){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},r=(g=p.value)=>{switch(g){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},B=async()=>{if(C.value==="file"&&!w.value){y.showAlert("请选择要上传的文件","error");return}if(C.value==="text"&&!v.value.trim()){y.showAlert("请输入要发送的文本","error");return}if(p.value!=="forever"&&!c.value){y.showAlert("请输入过期值","error");return}try{let g;const l=new FormData,j=C.value==="file";j?l.append("file",w.value):l.append("text",v.value),p.value!=="forever"&&l.append("expire_value",c.value),l.append("expire_style",p.value);const b={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:z=>{const R=Math.round(z.loaded*100/z.total);A.value=R}};if(j?g=await ee.post("/share/file/",l,b):g=await ee.post("/share/text/",l,b),g&&g.code===200){const z=g.detail.code,R=g.detail.name,G={id:Date.now(),filename:R,date:new Date().toISOString().split("T")[0],size:C.value==="text"?`${(v.value.length/1024).toFixed(2)} KB`:`${(w.value.size/(1024*1024)).toFixed(1)} MB`,expiration:p.value==="forever"?"永久":`${c.value}${r()}后过期`,retrieveCode:z};d.addShareData(G),y.showAlert(`文件发送成功!取件码:${z}`,"success"),w.value=null,v.value="",c.value="",A.value=0,_.value=!0,await re(z)}else throw new Error("服务器响应异常")}catch(g){console.error("发送失败:",g),g.response.data.detail?y.showAlert(g.response.data.detail,"error"):y.showAlert("发送失败,请稍后重试","error")}finally{A.value=0}},$=()=>{T.push("/")},L=()=>{_.value=!_.value},q=g=>{I.value=g},ue=g=>{const l=d.shareData.findIndex(j=>j.id===g);l!==-1&&d.deleteShareData(l)},ce=window.location.origin+"/#/",de=g=>`${ce}?code=${g.retrieveCode}`;return ne(()=>{console.log("SendFileView mounted")}),(g,l)=>{const j=xe("router-link");return F(),D("div",Ve,[a("div",{class:f(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[i(u)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[a("div",He,[a("h2",{class:f(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[i(u)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:$},U(i(k).name),3),a("form",{onSubmit:Q(B,["prevent"]),class:"space-y-8"},[a("div",Ee,[a("button",{type:"button",onClick:l[0]||(l[0]=b=>C.value="file"),class:f(["px-4 py-2 rounded-lg",C.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),a("button",{type:"button",onClick:l[1]||(l[1]=b=>C.value="text"),class:f(["px-4 py-2 rounded-lg",C.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),M(K,{name:"fade",mode:"out-in"},{default:E(()=>[C.value==="file"?(F(),D("div",Ne,[a("div",{class:f(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[i(u)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:s,onDragover:l[2]||(l[2]=Q(()=>{},["prevent"])),onDrop:Q(t,["prevent"])},[a("input",{id:"file-upload",type:"file",class:"hidden",onChange:n,ref_key:"fileInput",ref:x},null,544),A.value>0?(F(),D("div",qe,[M(ke,{progress:A.value},null,8,["progress"])])):N("",!0),M(i(De),{class:f(["w-16 h-16 transition-colors duration-300",i(u)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),a("p",{class:f(["mt-4 text-sm transition-colors duration-300 w-full text-center",i(u)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[a("span",We,U(w.value?w.value.name:"点击或拖放文件到此处上传"),1)],2),a("p",{class:f(["mt-2 text-xs",i(u)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+U(i(Re)(i(k).uploadSize)),3)],34)])):(F(),D("div",Ge,[C.value==="text"?(F(),D("div",Qe,[J(a("textarea",{id:"text-content","onUpdate:modelValue":l[3]||(l[3]=b=>v.value=b),rows:"7",class:f(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",i(u)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[X,v.value]])])):N("",!0)]))]),_:1}),a("div",Je,[a("label",{class:f(["text-sm font-medium",i(u)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),J(a("select",{"onUpdate:modelValue":l[4]||(l[4]=b=>p.value=b),class:f(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",i(u)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(F(!0),D(Y,null,Z(i(k).expireStyle,b=>(F(),D("option",{value:b,key:b},U(r(b)),9,Ke))),128))],2),[[pe,p.value]]),p.value!=="forever"?(F(),D("div",Oe,[a("div",Xe,[J(a("input",{"onUpdate:modelValue":l[5]||(l[5]=b=>c.value=b),type:"number",placeholder:o(),class:f(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",i(u)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,Ye),[[X,c.value]]),a("span",{class:f(["absolute right-3 top-1/2 transform -translate-y-1/2",i(u)?"text-gray-300":"text-gray-700"])},U(r()),3)])])):N("",!0)]),a("button",Ze,[l[9]||(l[9]=a("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),a("span",et,[M(i(ze),{class:"w-6 h-6 mr-2"}),l[8]||(l[8]=a("span",null,"安全寄送",-1))])])],32),a("div",tt,[M(j,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:E(()=>l[10]||(l[10]=[V(" 需要取件?点击这里 ")])),_:1})])]),a("div",{class:f(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[i(u)?"bg-gray-800":"bg-gray-100"]])},[a("span",{class:f(["text-sm flex items-center",[i(u)?"text-gray-300":"text-gray-800"]])},[M(i(Ce),{class:"w-4 h-4 mr-1 text-green-400"}),l[11]||(l[11]=V(" 安全加密 "))],2),a("button",{onClick:L,class:f(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[i(u)?"text-indigo-400":"text-indigo-600"]])},[l[12]||(l[12]=V(" 发件记录 ")),M(i(Ae),{class:"w-4 h-4 ml-1"})],2)],2)],2),M(K,{name:"drawer"},{default:E(()=>[_.value?(F(),D("div",{key:0,class:f(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[i(u)?"bg-gray-900":"bg-white"]])},[a("div",{class:f(["flex justify-between items-center p-6 border-b",[i(u)?"border-gray-700":"border-gray-200"]])},[a("h3",{class:f(["text-2xl font-bold",[i(u)?"text-white":"text-gray-800"]])}," 发件记录 ",2),a("button",{onClick:L,class:f(["hover:text-white transition duration-300",[i(u)?"text-gray-400":"text-gray-800"]])},[M(i(ye),{class:"w-6 h-6"})],2)],2),a("div",rt,[M(ve,{name:"list",tag:"div",class:"space-y-4"},{default:E(()=>[(F(!0),D(Y,null,Z(m.value,b=>(F(),D("div",{key:b.id,class:f(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[i(u)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[a("div",ot,[M(i(te),{class:f(["w-10 h-10",[i(u)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),a("div",nt,[a("p",{class:f(["font-medium text-lg truncate",[i(u)?"text-white":"text-gray-800"]])},U(b.filename?b.filename:"Text"),3),a("p",{class:f(["text-sm truncate",[i(u)?"text-gray-400":"text-gray-600"]])},U(b.date)+" · "+U(b.size),3)]),a("div",st,[a("button",{onClick:z=>i(re)(b.retrieveCode),class:f(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[i(u)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[M(i(Ue),{class:"w-5 h-5"})],10,at),a("button",{onClick:z=>q(b),class:f(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[i(u)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[M(i(Be),{class:"w-5 h-5"})],10,it),a("button",{onClick:z=>ue(b.id),class:f(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[i(u)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[M(i(Te),{class:"w-5 h-5"})],10,lt)])],2))),128))]),_:1})])],2)):N("",!0)]),_:1}),M(K,{name:"fade"},{default:E(()=>[I.value?(F(),D("div",ut,[a("div",{class:f(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70",[i(u)?"bg-gray-800":"bg-white"]])},[a("h3",{class:f(["text-2xl font-bold mb-6",[i(u)?"text-white":"text-gray-800"]])}," 文件详情 ",2),a("div",ct,[a("div",dt,[M(i(te),{class:f(["w-6 h-6 mr-3",[i(u)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),a("p",{class:f([i(u)?"text-gray-300":"text-gray-800"])},[l[13]||(l[13]=a("span",{class:"font-medium"},"文件名:",-1)),V(U(I.value.filename),1)],2)]),a("div",ft,[M(i(Me),{class:f(["w-6 h-6 mr-3",[i(u)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),a("p",{class:f([i(u)?"text-gray-300":"text-gray-800"])},[l[14]||(l[14]=a("span",{class:"font-medium"},"发送日期:",-1)),V(U(I.value.date),1)],2)]),a("div",ht,[M(i(Ie),{class:f(["w-6 h-6 mr-3",[i(u)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),a("p",{class:f([i(u)?"text-gray-300":"text-gray-800"])},[l[15]||(l[15]=a("span",{class:"font-medium"},"文件大小:",-1)),V(U(I.value.size),1)],2)]),a("div",gt,[M(i(Fe),{class:f(["w-6 h-6 mr-3",[i(u)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),a("p",{class:f([i(u)?"text-gray-300":"text-gray-800"])},[l[16]||(l[16]=a("span",{class:"font-medium"},"过期时间:",-1)),V(U(I.value.expiration),1)],2)])]),a("div",pt,[a("div",yt,[a("h4",{class:f(["text-lg font-semibold mb-3",[i(u)?"text-white":"text-gray-800"]])}," 取件码 ",2),a("div",{class:"bg-gray-100 p-3 rounded-lg shadow-md cursor-pointer hover:bg-gray-200 transition-colors duration-300 w-full text-center",onClick:l[6]||(l[6]=b=>i(je)(I.value.retrieveCode))},[a("p",vt,U(I.value.retrieveCode),1)]),a("p",{class:f(["mt-2 text-sm",[i(u)?"text-gray-400":"text-gray-600"]])}," 点击复制取件码 ",2)]),a("div",bt,[a("h4",{class:f(["text-lg font-semibold mb-3",[i(u)?"text-white":"text-gray-800"]])}," 二维码 ",2),a("div",xt,[M(Se,{value:de(I.value),size:128,level:"M"},null,8,["value"])]),a("p",{class:f(["mt-2 text-sm",[i(u)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)])]),a("button",{onClick:l[7]||(l[7]=b=>I.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):N("",!0)]),_:1})])}}}),Mt=se(mt,[["__scopeId","data-v-3a0327b0"]]);export{Mt as default}; diff --git a/themes/2024/assets/SendFileView-DNzTr7zG.js b/themes/2024/assets/SendFileView-DNzTr7zG.js new file mode 100644 index 0000000..b24957d --- /dev/null +++ b/themes/2024/assets/SendFileView-DNzTr7zG.js @@ -0,0 +1,21 @@ +import{c as E,d as oe,r as z,o as re,w as me,a as C,b as M,e,_ as se,u as ae,f as be,n,g as t,t as _,h as W,i as x,j as U,k as j,l as G,v as X,T as Q,m as we,F as Y,p as Z,q as R,X as ke,s as _e,x as Ce,y as L,z as Me,A as Se}from"./index-CBPNirpK.js";import{u as ze,S as Te,C as De,a as Ie,Q as Ae,E as Pe}from"./fileData-BCZGMzij.js";import{F as ee}from"./file-CNpWcMOu.js";import{H as Fe,T as $e}from"./trash-DAq3m0gp.js";/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Re=E("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Be=E("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ue=E("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/** + * @license lucide-vue-next v0.445.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const je=E("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Le=oe({__name:"BorderProgressBar",props:{progress:{}},setup(w){const T=w,P=z(null),r=z(null);let d=null;const b=()=>{if(!d||!r.value||!P.value)return;const u=P.value.clientWidth,g=P.value.clientHeight;r.value.width=u,r.value.height=g;const i=4,s=8;d.lineWidth=i;const m=d.createLinearGradient(0,0,u,g);m.addColorStop(0,"#4f46e5"),m.addColorStop(.5,"#7c3aed"),m.addColorStop(1,"#db2777"),d.strokeStyle="rgba(229, 231, 235, 0.2)",h(d,i/2,i/2,u-i,g-i,s),d.stroke();const S=((u+g)*2-8*s+2*Math.PI*s)*T.progress/100;d.strokeStyle=m,d.lineCap="round",d.lineJoin="round",d.beginPath();let c=S;const v=i/2,D=u-i,F=g-i;if(c>0){const p=Math.min(D-2*s,c);d.moveTo(s+v,v),d.lineTo(p+s+v,v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(D-s+v,s+v,s,-Math.PI/2,p-Math.PI/2,!1),c-=p*s}if(c>0){const p=Math.min(F-2*s,c);d.lineTo(D+v,p+s+v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(D-s+v,F-s+v,s,0,p,!1),c-=p*s}if(c>0){const p=Math.min(D-2*s,c);d.lineTo(D-p-s+v,F+v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(s+v,F-s+v,s,Math.PI/2,Math.PI/2+p,!1),c-=p*s}if(c>0){const p=Math.min(F-2*s,c);d.lineTo(v,F-p-s+v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(s+v,s+v,s,Math.PI,Math.PI+p,!1)}d.stroke()};function h(u,g,i,s,m,y){u.beginPath(),u.moveTo(g+y,i),u.lineTo(g+s-y,i),u.arcTo(g+s,i,g+s,i+y,y),u.lineTo(g+s,i+m-y),u.arcTo(g+s,i+m,g+s-y,i+m,y),u.lineTo(g+y,i+m),u.arcTo(g,i+m,g,i+m-y,y),u.lineTo(g,i+y),u.arcTo(g,i,g+y,i,y),u.closePath()}return re(()=>{r.value&&(d=r.value.getContext("2d"),b())}),me(()=>T.progress,b),(u,g)=>(C(),M("div",{class:"border-progress-container",ref_key:"container",ref:P},[e("canvas",{ref_key:"canvas",ref:r,class:"border-progress-canvas"},null,512)],512))}}),Ve=se(Le,[["__scopeId","data-v-2fbf5085"]]),ne=async(w,T={})=>{const{successMsg:P="复制成功",errorMsg:r="复制失败,请手动复制",showMsg:d=!0}=T,b=ae();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(w),d&&b.showAlert(P,"success"),!0;const h=document.createElement("textarea");h.value=w,h.style.position="fixed",h.style.opacity="0",document.body.appendChild(h),h.select();const u=document.execCommand("copy");if(document.body.removeChild(h),u)return d&&b.showAlert(P,"success"),!0;throw new Error("execCommand copy failed")}catch(h){return console.error("复制失败:",h),d&&b.showAlert(r,"error"),!1}},te=async w=>{const T=`${window.location.origin}/#/?code=${w}`;return ne(T,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},He=async w=>ne(w,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),Ee=w=>w>=1024*1024*1024?Math.round(w/(1024*1024*1024))+"GB":w>=1024*1024?Math.round(w/(1024*1024))+"MB":Math.round(w/1024)+"KB",Ne={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},qe={class:"p-8"},We={class:"flex justify-center space-x-4 mb-6"},Ge={key:"file",class:"grid grid-cols-1 gap-8"},Qe={key:0,class:"absolute inset-0 w-full h-full"},Je={class:"block truncate"},Ke={key:"text",class:"grid grid-cols-1 gap-8"},Oe={key:0,class:"flex flex-col"},Xe={class:"flex flex-col space-y-4"},Ye=["value"],Ze={key:0,class:"flex items-center space-x-2"},et={class:"relative flex-grow"},tt=["placeholder"],ot={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},rt={class:"relative z-10 flex items-center justify-center text-lg"},st={class:"mt-6 text-center"},at={class:"flex-grow overflow-y-auto p-6"},nt={class:"flex-shrink-0 mr-4"},lt={class:"flex-grow min-w-0 mr-4"},it={class:"flex-shrink-0 flex space-x-2"},ct=["onClick"],dt=["onClick"],ut=["onClick"],pt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gt={class:"space-y-4"},ht={class:"flex items-center"},ft={class:"flex items-center"},vt={class:"flex items-center"},xt={class:"flex items-center"},yt={class:"mt-6 flex justify-between items-center"},mt={class:"flex flex-col items-center w-1/2 pr-2"},bt={class:"text-2xl font-bold text-indigo-600"},wt={class:"flex flex-col items-center w-1/2 pl-2"},kt={class:"bg-white p-2 rounded-lg shadow-md"},_t=oe({__name:"SendFileView",setup(w){const T=JSON.parse(localStorage.getItem("config")||"{}"),P=Se(),r=Ce("isDarkMode"),d=ze(),b=z("file"),h=z(null),u=z(""),g=z(null),i=z("day"),s=z("1"),m=z(0),y=z(!1),S=z(null),c=ae(),v=be(()=>d.shareData),D=z(""),F=()=>{var l;(l=g.value)==null||l.click()},p=async l=>{const o=l.target;o.files&&o.files.length>0&&(h.value=o.files[0],D.value=await J(h.value),console.log(D.value))},le=async l=>{var o;(o=l.dataTransfer)!=null&&o.files&&l.dataTransfer.files.length>0&&(h.value=l.dataTransfer.files[0],D.value=await J(h.value))},J=async l=>new Promise(o=>{const a=new FileReader;let k=0;const I=Math.ceil(l.size/2097152);a.onload=async $=>{const A=new Uint8Array($.target.result),V=await crypto.subtle.digest("SHA-256",A),q=Array.from(new Uint8Array(V)).map(H=>H.toString(16).padStart(2,"0")).join("");k++,k{const $=k*2097152,A=$+2097152>=l.size?l.size:$+2097152;a.readAsArrayBuffer(l.slice($,A))};B()}),ie=(l=i.value)=>{switch(l){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},N=(l=i.value)=>{switch(l){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},ce=async l=>{var o,f;try{const k=Math.ceil(l.size/5242880),I=await L.post("/chunk/upload/init/",{file_name:l.name,file_size:l.size,chunk_size:5242880,file_hash:D.value});if(I.code!==200)throw new Error("初始化切片上传失败");if(I.detail.existed)return I;const B=I.detail.upload_id;for(let A=0;A{const ye=Math.round((A*5242880+xe.loaded)*100/l.size);m.value=ye}})).code!==200)throw new Error(`切片 ${A} 上传失败`)}const $=await L.post(`/chunk/upload/complete/${B}`,{expire_value:s.value?parseInt(s.value):1,expire_style:i.value});if($.code!==200)throw new Error("完成上传失败");return $}catch(a){throw console.error("切片上传失败:",a),(f=(o=a.response)==null?void 0:o.data)!=null&&f.detail?c.showAlert(a.response.data.detail,"error"):c.showAlert("上传失败,请稍后重试","error"),a}},de=async l=>{const o=new FormData,f={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:k=>{const I=Math.round(k.loaded*100/k.total);m.value=I}};return o.append("file",l),o.append("expire_value",s.value),o.append("expire_style",i.value),await L.post("/share/file/",o,f)},ue=async()=>{var l,o;if(b.value==="file"&&!h.value){c.showAlert("请选择要上传的文件","error");return}if(b.value==="text"&&!u.value.trim()){c.showAlert("请输入要发送的文本","error");return}if(i.value!=="forever"&&!s.value){c.showAlert("请输入过期值","error");return}try{let f;if(b.value==="file")T.enableChunk?f=await ce(h.value):f=await de(h.value);else{const a=new FormData;a.append("text",u.value),a.append("expire_value",s.value),a.append("expire_style",i.value),f=await L.post("/share/text/",a)}if(f&&f.code===200){const a=f.detail.code,k=f.detail.name,I={id:Date.now(),filename:k,date:new Date().toISOString().split("T")[0],size:b.value==="text"?`${(u.value.length/1024).toFixed(2)} KB`:`${(h.value.size/(1024*1024)).toFixed(1)} MB`,expiration:i.value==="forever"?"永久":`${s.value}${N()}后过期`,retrieveCode:a};d.addShareData(I),c.showAlert(`文件发送成功!取件码:${a}`,"success"),h.value=null,u.value="",s.value="",m.value=0,y.value=!0,await te(a)}else throw new Error("服务器响应异常")}catch(f){console.error("发送失败:",f),(o=(l=f.response)==null?void 0:l.data)!=null&&o.detail?c.showAlert(f.response.data.detail,"error"):c.showAlert("发送失败,请稍后重试","error")}finally{m.value=0}},pe=()=>{P.push("/")},K=()=>{y.value=!y.value},ge=l=>{S.value=l},he=l=>{const o=d.shareData.findIndex(f=>f.id===l);o!==-1&&d.deleteShareData(o)},fe=window.location.origin+"/#/",ve=l=>`${fe}?code=${l.retrieveCode}`;return re(()=>{console.log("SendFileView mounted")}),(l,o)=>{const f=Me("router-link");return C(),M("div",Ne,[e("div",{class:n(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[t(r)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[e("div",qe,[e("h2",{class:n(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[t(r)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:pe},_(t(T).name),3),e("form",{onSubmit:W(ue,["prevent"]),class:"space-y-8"},[e("div",We,[e("button",{type:"button",onClick:o[0]||(o[0]=a=>b.value="file"),class:n(["px-4 py-2 rounded-lg",b.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:o[1]||(o[1]=a=>b.value="text"),class:n(["px-4 py-2 rounded-lg",b.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),x(Q,{name:"fade",mode:"out-in"},{default:U(()=>[b.value==="file"?(C(),M("div",Ge,[e("div",{class:n(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[t(r)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:F,onDragover:o[2]||(o[2]=W(()=>{},["prevent"])),onDrop:W(le,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:p,ref_key:"fileInput",ref:g},null,544),m.value>0?(C(),M("div",Qe,[x(Ve,{progress:m.value},null,8,["progress"])])):j("",!0),x(t(Ue),{class:n(["w-16 h-16 transition-colors duration-300",t(r)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),e("p",{class:n(["mt-4 text-sm transition-colors duration-300 w-full text-center",t(r)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Je,_(h.value?h.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:n(["mt-2 text-xs",t(r)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+_(t(Ee)(t(T).uploadSize)),3)],34)])):(C(),M("div",Ke,[b.value==="text"?(C(),M("div",Oe,[G(e("textarea",{id:"text-content","onUpdate:modelValue":o[3]||(o[3]=a=>u.value=a),rows:"7",class:n(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",t(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[X,u.value]])])):j("",!0)]))]),_:1}),e("div",Xe,[e("label",{class:n(["text-sm font-medium",t(r)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),G(e("select",{"onUpdate:modelValue":o[4]||(o[4]=a=>i.value=a),class:n(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",t(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(C(!0),M(Y,null,Z(t(T).expireStyle,a=>(C(),M("option",{value:a,key:a},_(N(a)),9,Ye))),128))],2),[[we,i.value]]),i.value!=="forever"?(C(),M("div",Ze,[e("div",et,[G(e("input",{"onUpdate:modelValue":o[5]||(o[5]=a=>s.value=a),type:"number",placeholder:ie(),class:n(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",t(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,tt),[[X,s.value]]),e("span",{class:n(["absolute right-3 top-1/2 transform -translate-y-1/2",t(r)?"text-gray-300":"text-gray-700"])},_(N()),3)])])):j("",!0)]),e("button",ot,[o[9]||(o[9]=e("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),e("span",rt,[x(t(je),{class:"w-6 h-6 mr-2"}),o[8]||(o[8]=e("span",null,"安全寄送",-1))])])],32),e("div",st,[x(f,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:U(()=>o[10]||(o[10]=[R(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:n(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[t(r)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:n(["text-sm flex items-center",[t(r)?"text-gray-300":"text-gray-800"]])},[x(t(Te),{class:"w-4 h-4 mr-1 text-green-400"}),o[11]||(o[11]=R(" 安全加密 "))],2),e("button",{onClick:K,class:n(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[t(r)?"text-indigo-400":"text-indigo-600"]])},[o[12]||(o[12]=R(" 发件记录 ")),x(t(De),{class:"w-4 h-4 ml-1"})],2)],2)],2),x(Q,{name:"drawer"},{default:U(()=>[y.value?(C(),M("div",{key:0,class:n(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[t(r)?"bg-gray-900":"bg-white"]])},[e("div",{class:n(["flex justify-between items-center p-6 border-b",[t(r)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:n(["text-2xl font-bold",[t(r)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:K,class:n(["hover:text-white transition duration-300",[t(r)?"text-gray-400":"text-gray-800"]])},[x(t(ke),{class:"w-6 h-6"})],2)],2),e("div",at,[x(_e,{name:"list",tag:"div",class:"space-y-4"},{default:U(()=>[(C(!0),M(Y,null,Z(v.value,a=>(C(),M("div",{key:a.id,class:n(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[t(r)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",nt,[x(t(ee),{class:n(["w-10 h-10",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",lt,[e("p",{class:n(["font-medium text-lg truncate",[t(r)?"text-white":"text-gray-800"]])},_(a.filename?a.filename:"Text"),3),e("p",{class:n(["text-sm truncate",[t(r)?"text-gray-400":"text-gray-600"]])},_(a.date)+" · "+_(a.size),3)]),e("div",it,[e("button",{onClick:k=>t(te)(a.retrieveCode),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(r)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[x(t(Re),{class:"w-5 h-5"})],10,ct),e("button",{onClick:k=>ge(a),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(r)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[x(t(Pe),{class:"w-5 h-5"})],10,dt),e("button",{onClick:k=>he(a.id),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(r)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[x(t($e),{class:"w-5 h-5"})],10,ut)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),x(Q,{name:"fade"},{default:U(()=>[S.value?(C(),M("div",pt,[e("div",{class:n(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70",[t(r)?"bg-gray-800":"bg-white"]])},[e("h3",{class:n(["text-2xl font-bold mb-6",[t(r)?"text-white":"text-gray-800"]])}," 文件详情 ",2),e("div",gt,[e("div",ht,[x(t(ee),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[13]||(o[13]=e("span",{class:"font-medium"},"文件名:",-1)),R(_(S.value.filename),1)],2)]),e("div",ft,[x(t(Ie),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[14]||(o[14]=e("span",{class:"font-medium"},"发送日期:",-1)),R(_(S.value.date),1)],2)]),e("div",vt,[x(t(Fe),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[15]||(o[15]=e("span",{class:"font-medium"},"文件大小:",-1)),R(_(S.value.size),1)],2)]),e("div",xt,[x(t(Be),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[16]||(o[16]=e("span",{class:"font-medium"},"过期时间:",-1)),R(_(S.value.expiration),1)],2)])]),e("div",yt,[e("div",mt,[e("h4",{class:n(["text-lg font-semibold mb-3",[t(r)?"text-white":"text-gray-800"]])}," 取件码 ",2),e("div",{class:"bg-gray-100 p-3 rounded-lg shadow-md cursor-pointer hover:bg-gray-200 transition-colors duration-300 w-full text-center",onClick:o[6]||(o[6]=a=>t(He)(S.value.retrieveCode))},[e("p",bt,_(S.value.retrieveCode),1)]),e("p",{class:n(["mt-2 text-sm",[t(r)?"text-gray-400":"text-gray-600"]])}," 点击复制取件码 ",2)]),e("div",wt,[e("h4",{class:n(["text-lg font-semibold mb-3",[t(r)?"text-white":"text-gray-800"]])}," 二维码 ",2),e("div",kt,[x(Ae,{value:ve(S.value),size:128,level:"M"},null,8,["value"])]),e("p",{class:n(["mt-2 text-sm",[t(r)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)])]),e("button",{onClick:o[7]||(o[7]=a=>S.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):j("",!0)]),_:1})])}}}),Dt=se(_t,[["__scopeId","data-v-1a2712ba"]]);export{Dt as default}; diff --git a/themes/2024/assets/SendFileView-DrjwZo4C.css b/themes/2024/assets/SendFileView-DrjwZo4C.css new file mode 100644 index 0000000..8dfd538 --- /dev/null +++ b/themes/2024/assets/SendFileView-DrjwZo4C.css @@ -0,0 +1 @@ +.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-1a2712ba],.fade-leave-active[data-v-1a2712ba]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-1a2712ba],.fade-leave-to[data-v-1a2712ba]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-1a2712ba]{width:30rem}}.fade-enter-to[data-v-1a2712ba],.fade-leave-from[data-v-1a2712ba]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-1a2712ba],.drawer-leave-active[data-v-1a2712ba]{transition:transform .3s ease}.drawer-enter-from[data-v-1a2712ba],.drawer-leave-to[data-v-1a2712ba]{transform:translate(100%)}.list-enter-active[data-v-1a2712ba],.list-leave-active[data-v-1a2712ba]{transition:all .5s ease}.list-enter-from[data-v-1a2712ba],.list-leave-to[data-v-1a2712ba]{opacity:0;transform:translate(30px)} diff --git a/themes/2024/assets/SendFileView-P_iibHN1.css b/themes/2024/assets/SendFileView-P_iibHN1.css deleted file mode 100644 index 0d031b5..0000000 --- a/themes/2024/assets/SendFileView-P_iibHN1.css +++ /dev/null @@ -1 +0,0 @@ -.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.fade-enter-active[data-v-3a0327b0],.fade-leave-active[data-v-3a0327b0]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-3a0327b0],.fade-leave-to[data-v-3a0327b0]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-3a0327b0]{width:30rem}}.fade-enter-to[data-v-3a0327b0],.fade-leave-from[data-v-3a0327b0]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-3a0327b0],.drawer-leave-active[data-v-3a0327b0]{transition:transform .3s ease}.drawer-enter-from[data-v-3a0327b0],.drawer-leave-to[data-v-3a0327b0]{transform:translate(100%)}.list-enter-active[data-v-3a0327b0],.list-leave-active[data-v-3a0327b0]{transition:all .5s ease}.list-enter-from[data-v-3a0327b0],.list-leave-to[data-v-3a0327b0]{opacity:0;transform:translate(30px)} diff --git a/themes/2024/assets/SystemSettingsView-2Nlw7j_o.js b/themes/2024/assets/SystemSettingsView-2Nlw7j_o.js new file mode 100644 index 0000000..c4c5ba1 --- /dev/null +++ b/themes/2024/assets/SystemSettingsView-2Nlw7j_o.js @@ -0,0 +1 @@ +import{d as B,r as m,u as M,a as c,b as y,e,n as a,g as l,l as n,v as d,m as x,F as w,p as _,t as b,k as h,x as F,y as k,L as A}from"./index-CBPNirpK.js";const z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},E={class:"space-y-4"},T={class:"grid grid-cols-1 gap-6"},W={class:"space-y-2"},K={class:"space-y-2"},I={class:"space-y-2"},j={class:"relative"},G={class:"space-y-2"},L={class:"space-y-2"},N=["value"],R={class:"space-y-2"},$={class:"grid grid-cols-1 gap-6 mt-8"},P={class:"space-y-2"},H={class:"space-y-2"},q={class:"space-y-4"},J={class:"space-y-2"},O={class:"space-y-4"},Q={class:"space-y-2"},X={key:0,class:"space-y-2"},Y={class:"flex items-center"},Z=["aria-checked"],ee={key:1,class:"space-y-4"},oe={class:"space-y-2"},re={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},te={class:"space-y-2"},ae={class:"space-y-2"},se={key:2,class:"space-y-4"},le={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ne={class:"space-y-2"},de={class:"space-y-2"},ie={class:"space-y-2"},ue={class:"space-y-2"},ge={class:"space-y-2"},ce={class:"space-y-2"},ye={class:"space-y-2"},be={class:"space-y-2"},pe={class:"flex items-center"},ve=["aria-checked"],me={class:"mt-8"},xe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},he={class:"space-y-2"},fe={class:"flex items-center space-x-2"},we={class:"space-y-2"},_e={class:"flex items-center space-x-2"},ke={class:"space-y-2"},Ue={class:"flex items-center space-x-2"},Se={class:"space-y-2"},Ve={class:"flex flex-wrap gap-3"},Ce=["value"],De={class:"space-y-2"},Be={class:"flex items-center space-x-2"},Me={class:"space-y-2"},Fe={class:"flex items-center"},Ae=["aria-checked"],ze={class:"mt-8"},Ee={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Te={class:"space-y-2"},We={class:"flex items-center space-x-2"},Ke={class:"space-y-2"},Ie={class:"flex items-center space-x-2"},Le=B({__name:"SystemSettingsView",setup(je){const s=F("isDarkMode"),t=m({name:"",description:"",file_storage:"",webdav_url:"",webdav_username:"",webdav_password:"",themesChoices:[],expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",storage_path:"",notify_content:"",openUpload:1,uploadSize:1,enableChunk:0,uploadMinute:1,max_save_seconds:0,opacity:.9,s3_access_key_id:"",background:"",showAdminAddr:0,page_explain:"",s3_secret_access_key:"",aws_session_token:"",s3_signature_version:"",s3_region_name:"",s3_bucket_name:"",s3_endpoint_url:"",s3_hostname:"",uploadCount:1,errorMinute:1,errorCount:1,s3_proxy:0,themesSelect:""}),p=m(1),v=m("MB"),u=m(1),g=m("天"),U=(i,o)=>i*{秒:1,分:60,时:3600,天:86400}[o],S=()=>{k({url:"/admin/config/get",method:"get"}).then(i=>{t.value=i.detail;let o=t.value.uploadSize;o>=1024*1024*1024?(p.value=Math.round(o/(1024*1024*1024)),v.value="GB"):o>=1024*1024?(p.value=Math.round(o/(1024*1024)),v.value="MB"):(p.value=Math.round(o/1024),v.value="KB");let r=t.value.max_save_seconds;r===0?(u.value=7,g.value="天"):r%86400===0&&r>=86400?(u.value=r/86400,g.value="天"):r%3600===0&&r>=3600?(u.value=r/3600,g.value="时"):r%60===0&&r>=60?(u.value=r/60,g.value="分"):(u.value=r,g.value="秒")})},f=M(),V=(i,o)=>i*{KB:1024,MB:1048576,GB:1073741824}[o],C=()=>{const i={...t.value};i.uploadSize=V(p.value,v.value),u.value===0?i.max_save_seconds=7*86400:i.max_save_seconds=U(u.value,g.value),k({url:"/admin/config/update",method:"patch",data:i}).then(o=>{o.code==200?f.showAlert("保存成功","success"):f.showAlert(o.message,"error")})};return S(),(i,o)=>(c(),y("div",z,[e("h2",{class:a(["text-2xl font-bold mb-6",[l(s)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:a(["space-y-6 rounded-lg shadow-md p-6",[l(s)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",E,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",T,[e("div",W,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>t.value.name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.name]])]),e("div",K,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>t.value.description=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.description]])]),e("div",I,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>t.value.admin_token=r),placeholder:"留空则不修改密码",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.admin_token]]),e("div",{class:a(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[l(s)?"text-gray-500":"text-gray-400"]])},o[32]||(o[32]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",G,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>t.value.keywords=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.keywords]])]),e("div",L,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 主题选择 ",2),n(e("select",{"onUpdate:modelValue":o[4]||(o[4]=r=>t.value.themesSelect=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},[(c(!0),y(w,null,_(t.value.themesChoices,r=>(c(),y("option",{value:r.key,key:r.key},b(r.name)+" (by "+b(r.author)+" V"+b(r.version)+") ",9,N))),128))],2),[[x,t.value.themesSelect]])]),e("div",R,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[5]||(o[5]=r=>t.value.robotsText=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.robotsText]])])]),e("div",$,[e("div",P,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[6]||(o[6]=r=>t.value.notify_title=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.notify_title]])]),e("div",H,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=r=>t.value.notify_content=r),rows:"3",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.notify_content]])])]),e("div",q,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储路径 ",2),n(e("input",{type:"text",placeholder:"留空则使用默认路径,可不填写","onUpdate:modelValue":o[8]||(o[8]=r=>t.value.storage_path=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.storage_path]])]),e("div",O,[e("div",Q,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[9]||(o[9]=r=>t.value.file_storage=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},o[33]||(o[33]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1),e("option",{value:"webdav"},"Webdav 存储",-1)]),2),[[x,t.value.file_storage]])]),t.value.file_storage==="local"?(c(),y("div",X,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 开启切片上传(实验性功能,还在开发中,目前仅本地存储可用,可能会出现未知问题) ",2),e("div",Y,[e("button",{type:"button",onClick:o[10]||(o[10]=r=>t.value.enableChunk=t.value.enableChunk===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.enableChunk===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.enableChunk===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.enableChunk===1?"translate-x-5":"translate-x-0",l(s)&&t.value.enableChunk!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Z),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.enableChunk===1?"已开启":"已关闭"),3)])])):h("",!0),t.value.file_storage==="webdav"?(c(),y("div",ee,[e("div",oe,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav URL ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav URL","onUpdate:modelValue":o[11]||(o[11]=r=>t.value.webdav_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_url]])]),e("div",re,[e("div",te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Username ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav Username","onUpdate:modelValue":o[12]||(o[12]=r=>t.value.webdav_username=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_username]])]),e("div",ae,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," Webdav Password ",2),n(e("input",{type:"password",placeholder:"请输入 Webdav Password","onUpdate:modelValue":o[13]||(o[13]=r=>t.value.webdav_password=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.webdav_password]])])])])):h("",!0),t.value.file_storage==="s3"?(c(),y("div",se,[e("div",le,[e("div",ne,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[14]||(o[14]=r=>t.value.s3_access_key_id=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_access_key_id]])]),e("div",de,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[15]||(o[15]=r=>t.value.s3_secret_access_key=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_secret_access_key]])]),e("div",ie,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[16]||(o[16]=r=>t.value.s3_bucket_name=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_bucket_name]])]),e("div",ue,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[17]||(o[17]=r=>t.value.s3_endpoint_url=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_endpoint_url]])]),e("div",ge,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),n(e("input",{type:"text","onUpdate:modelValue":o[18]||(o[18]=r=>t.value.s3_region_name=r),placeholder:"auto",class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_region_name]])]),e("div",ce,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),n(e("select",{"onUpdate:modelValue":o[19]||(o[19]=r=>t.value.s3_signature_version=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[34]||(o[34]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[x,t.value.s3_signature_version]])]),e("div",ye,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),n(e("input",{type:"text","onUpdate:modelValue":o[20]||(o[20]=r=>t.value.s3_hostname=r),class:a(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.s3_hostname]])]),e("div",be,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",pe,[e("button",{type:"button",onClick:o[21]||(o[21]=r=>t.value.s3_proxy=t.value.s3_proxy===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.s3_proxy===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.s3_proxy===1?"translate-x-5":"translate-x-0",l(s)&&t.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,ve),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):h("",!0)])]),e("div",me,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",xe,[e("div",he,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",fe,[n(e("input",{type:"number","onUpdate:modelValue":o[22]||(o[22]=r=>t.value.uploadMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.uploadMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",we,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",_e,[n(e("input",{type:"number","onUpdate:modelValue":o[23]||(o[23]=r=>t.value.uploadCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.uploadCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",Ue,[n(e("input",{type:"number","onUpdate:modelValue":o[24]||(o[24]=r=>p.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,p.value]]),n(e("select",{"onUpdate:modelValue":o[25]||(o[25]=r=>v.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[35]||(o[35]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[x,v.value]])])]),e("div",Se,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",Ve,[(c(),y(w,null,_(["day","hour","minute","forever","count"],r=>e("label",{key:r,class:"relative inline-flex items-center group cursor-pointer"},[n(e("input",{type:"checkbox",value:r,"onUpdate:modelValue":o[26]||(o[26]=D=>t.value.expireStyle=D),class:"peer sr-only"},null,8,Ce),[[A,t.value.expireStyle]]),e("div",{class:a(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[t.value.expireStyle.includes(r)?(l(s),"bg-indigo-600 border-indigo-600 text-white"):l(s)?"bg-gray-700 border-gray-600 text-gray-300 hover:border-indigo-500":"bg-white border-gray-300 text-gray-700 hover:border-indigo-500"]])},b({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",De,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",Be,[n(e("input",{type:"number","onUpdate:modelValue":o[27]||(o[27]=r=>u.value=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,u.value]]),n(e("select",{"onUpdate:modelValue":o[28]||(o[28]=r=>g.value=r),class:a(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[36]||(o[36]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[x,g.value]])])]),e("div",Me,[e("label",{class:a(["block text-sm font-medium mb-2",[l(s)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",Fe,[e("button",{type:"button",onClick:o[29]||(o[29]=r=>t.value.openUpload=t.value.openUpload===1?0:1),class:a(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[t.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":t.value.openUpload===1},[e("span",{class:a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[t.value.openUpload===1?"translate-x-5":"translate-x-0",l(s)&&t.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Ae),e("span",{class:a(["ml-3 text-sm",[l(s)?"text-gray-300":"text-gray-700"]])},b(t.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",ze,[e("h3",{class:a(["text-lg font-medium mb-4",[l(s)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",Ee,[e("div",Te,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",We,[n(e("input",{type:"number","onUpdate:modelValue":o[30]||(o[30]=r=>t.value.errorMinute=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.errorMinute]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ke,[e("label",{class:a(["block text-sm font-medium",[l(s)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Ie,[n(e("input",{type:"number","onUpdate:modelValue":o[31]||(o[31]=r=>t.value.errorCount=r),class:a(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[l(s)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,t.value.errorCount]]),e("span",{class:a([l(s)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:C,class:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200"}," 保存设置 ")])])],2)]))}});export{Le as default}; diff --git a/themes/2024/assets/SystemSettingsView-C6xa-QB6.js b/themes/2024/assets/SystemSettingsView-C6xa-QB6.js deleted file mode 100644 index a5abebc..0000000 --- a/themes/2024/assets/SystemSettingsView-C6xa-QB6.js +++ /dev/null @@ -1 +0,0 @@ -import{d as B,r as m,u as M,a as p,b,e,n as t,g as s,l as n,v as d,m as x,F as f,p as w,k as _,t as v,x as F,y as k,L as A}from"./index-EADe6V-l.js";const z={class:"p-6 h-screen overflow-y-auto custom-scrollbar"},E={class:"space-y-4"},T={class:"grid grid-cols-1 gap-6"},W={class:"space-y-2"},K={class:"space-y-2"},I={class:"space-y-2"},j={class:"relative"},G={class:"space-y-2"},L={class:"space-y-2"},N=["value"],R={class:"space-y-2"},P={class:"grid grid-cols-1 gap-6 mt-8"},$={class:"space-y-2"},H={class:"space-y-2"},q={class:"space-y-4"},J={class:"space-y-2"},O={class:"space-y-4"},Q={class:"space-y-2"},X={key:0,class:"space-y-4"},Y={class:"space-y-2"},Z={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ee={class:"space-y-2"},oe={class:"space-y-2"},re={key:1,class:"space-y-4"},te={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ae={class:"space-y-2"},se={class:"space-y-2"},le={class:"space-y-2"},ne={class:"space-y-2"},de={class:"space-y-2"},ie={class:"space-y-2"},ue={class:"space-y-2"},ge={class:"space-y-2"},ce={class:"flex items-center"},ye=["aria-checked"],pe={class:"mt-8"},be={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ve={class:"space-y-2"},me={class:"flex items-center space-x-2"},xe={class:"space-y-2"},he={class:"flex items-center space-x-2"},fe={class:"space-y-2"},we={class:"flex items-center space-x-2"},_e={class:"space-y-2"},ke={class:"flex flex-wrap gap-3"},Ue=["value"],Se={class:"space-y-2"},Ve={class:"flex items-center space-x-2"},De={class:"space-y-2"},Ce={class:"flex items-center"},Be=["aria-checked"],Me={class:"mt-8"},Fe={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},Ae={class:"space-y-2"},ze={class:"flex items-center space-x-2"},Ee={class:"space-y-2"},Te={class:"flex items-center space-x-2"},Ie=B({__name:"SystemSettingsView",setup(We){const a=F("isDarkMode"),l=m({name:"",description:"",file_storage:"",webdav_url:"",webdav_username:"",webdav_password:"",themesChoices:[],expireStyle:[],admin_token:"",robotsText:"",keywords:"",notify_title:"",storage_path:"",notify_content:"",openUpload:1,uploadSize:1,uploadMinute:1,max_save_seconds:0,opacity:.9,s3_access_key_id:"",background:"",showAdminAddr:0,page_explain:"",s3_secret_access_key:"",aws_session_token:"",s3_signature_version:"",s3_region_name:"",s3_bucket_name:"",s3_endpoint_url:"",s3_hostname:"",uploadCount:1,errorMinute:1,errorCount:1,s3_proxy:0,themesSelect:""}),c=m(1),y=m("MB"),u=m(1),g=m("天"),U=(i,o)=>i*{秒:1,分:60,时:3600,天:86400}[o],S=()=>{k({url:"/admin/config/get",method:"get"}).then(i=>{l.value=i.detail;let o=l.value.uploadSize;o>=1024*1024*1024?(c.value=Math.round(o/(1024*1024*1024)),y.value="GB"):o>=1024*1024?(c.value=Math.round(o/(1024*1024)),y.value="MB"):(c.value=Math.round(o/1024),y.value="KB");let r=l.value.max_save_seconds;r===0?(u.value=7,g.value="天"):r%86400===0&&r>=86400?(u.value=r/86400,g.value="天"):r%3600===0&&r>=3600?(u.value=r/3600,g.value="时"):r%60===0&&r>=60?(u.value=r/60,g.value="分"):(u.value=r,g.value="秒")})},h=M(),V=(i,o)=>i*{KB:1024,MB:1048576,GB:1073741824}[o],D=()=>{const i={...l.value};i.uploadSize=V(c.value,y.value),u.value===0?i.max_save_seconds=7*86400:i.max_save_seconds=U(u.value,g.value),k({url:"/admin/config/update",method:"patch",data:i}).then(o=>{o.code==200?h.showAlert("保存成功","success"):h.showAlert(o.message,"error")})};return S(),(i,o)=>(p(),b("div",z,[e("h2",{class:t(["text-2xl font-bold mb-6",[s(a)?"text-white":"text-gray-800"]])}," 系统设置 ",2),e("div",{class:t(["space-y-6 rounded-lg shadow-md p-6",[s(a)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[e("section",E,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 基本设置 ",2),e("div",T,[e("div",W,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 网站名称 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[0]||(o[0]=r=>l.value.name=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.name]])]),e("div",K,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 网站描述 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=r=>l.value.description=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.description]])]),e("div",I,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 管理员密码 ",2),e("div",j,[n(e("input",{type:"password","onUpdate:modelValue":o[2]||(o[2]=r=>l.value.admin_token=r),placeholder:"留空则不修改密码",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.admin_token]]),e("div",{class:t(["absolute inset-y-0 right-0 flex items-center pr-3 text-sm text-gray-400",[s(a)?"text-gray-500":"text-gray-400"]])},o[31]||(o[31]=[e("span",{class:"text-xs"},"留空则不修改",-1)]),2)])]),e("div",G,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 关键词 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=r=>l.value.keywords=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.keywords]])]),e("div",L,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 主题选择 ",2),n(e("select",{"onUpdate:modelValue":o[4]||(o[4]=r=>l.value.themesSelect=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},[(p(!0),b(f,null,w(l.value.themesChoices,r=>(p(),b("option",{value:r.key,key:r.key},v(r.name)+" (by "+v(r.author)+" V"+v(r.version)+") ",9,N))),128))],2),[[x,l.value.themesSelect]])]),e("div",R,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," Robots.txt ",2),n(e("textarea",{"onUpdate:modelValue":o[5]||(o[5]=r=>l.value.robotsText=r),rows:"3",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.robotsText]])])]),e("div",P,[e("div",$,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 通知标题 ",2),n(e("input",{type:"text","onUpdate:modelValue":o[6]||(o[6]=r=>l.value.notify_title=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.notify_title]])]),e("div",H,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 通知内容 ",2),n(e("textarea",{"onUpdate:modelValue":o[7]||(o[7]=r=>l.value.notify_content=r),rows:"3",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border resize-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.notify_content]])])]),e("div",q,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 存储设置 ",2),e("div",J,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 存储路径 ",2),n(e("input",{type:"text",placeholder:"留空则使用默认路径,可不填写","onUpdate:modelValue":o[8]||(o[8]=r=>l.value.storage_path=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.storage_path]])]),e("div",O,[e("div",Q,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 存储方式 ",2),n(e("select",{"onUpdate:modelValue":o[9]||(o[9]=r=>l.value.file_storage=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border appearance-none bg-no-repeat bg-right focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none cursor-pointer",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]]),style:{"background-image":"url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M7%208l3%203%203-3%22%20stroke%3D%22%236B7280%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')"}},o[32]||(o[32]=[e("option",{value:"local"},"本地存储",-1),e("option",{value:"s3"},"S3 存储",-1),e("option",{value:"webdav"},"Webdav 存储",-1)]),2),[[x,l.value.file_storage]])]),l.value.file_storage==="webdav"?(p(),b("div",X,[e("div",Y,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," Webdav URL ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav URL","onUpdate:modelValue":o[10]||(o[10]=r=>l.value.webdav_url=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.webdav_url]])]),e("div",Z,[e("div",ee,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," Webdav Username ",2),n(e("input",{type:"text",placeholder:"请输入 Webdav Username","onUpdate:modelValue":o[11]||(o[11]=r=>l.value.webdav_username=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.webdav_username]])]),e("div",oe,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," Webdav Password ",2),n(e("input",{type:"password",placeholder:"请输入 Webdav Password","onUpdate:modelValue":o[12]||(o[12]=r=>l.value.webdav_password=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.webdav_password]])])])])):_("",!0),l.value.file_storage==="s3"?(p(),b("div",re,[e("div",te,[e("div",ae,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 AccessKeyId ",2),n(e("input",{type:"text","onUpdate:modelValue":o[13]||(o[13]=r=>l.value.s3_access_key_id=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.s3_access_key_id]])]),e("div",se,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 SecretAccessKey ",2),n(e("input",{type:"password","onUpdate:modelValue":o[14]||(o[14]=r=>l.value.s3_secret_access_key=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.s3_secret_access_key]])]),e("div",le,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 BucketName ",2),n(e("input",{type:"text","onUpdate:modelValue":o[15]||(o[15]=r=>l.value.s3_bucket_name=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.s3_bucket_name]])]),e("div",ne,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 EndpointUrl ",2),n(e("input",{type:"text","onUpdate:modelValue":o[16]||(o[16]=r=>l.value.s3_endpoint_url=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.s3_endpoint_url]])]),e("div",de,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 Region Name ",2),n(e("input",{type:"text","onUpdate:modelValue":o[17]||(o[17]=r=>l.value.s3_region_name=r),placeholder:"auto",class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.s3_region_name]])]),e("div",ie,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 Signature Version ",2),n(e("select",{"onUpdate:modelValue":o[18]||(o[18]=r=>l.value.s3_signature_version=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[33]||(o[33]=[e("option",{value:"s3v2"},"S3v2",-1),e("option",{value:"s3v4"},"S3v4",-1)]),2),[[x,l.value.s3_signature_version]])]),e("div",ue,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," S3 Hostname ",2),n(e("input",{type:"text","onUpdate:modelValue":o[19]||(o[19]=r=>l.value.s3_hostname=r),class:t(["w-full rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.s3_hostname]])]),e("div",ge,[e("label",{class:t(["block text-sm font-medium mb-2",[s(a)?"text-gray-300":"text-gray-700"]])}," 启用代理 ",2),e("div",ce,[e("button",{type:"button",onClick:o[20]||(o[20]=r=>l.value.s3_proxy=l.value.s3_proxy===1?0:1),class:t(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[l.value.s3_proxy===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":l.value.s3_proxy===1},[e("span",{class:t(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[l.value.s3_proxy===1?"translate-x-5":"translate-x-0",s(a)&&l.value.s3_proxy!==1?"bg-gray-100":"bg-white"]])},null,2)],10,ye),e("span",{class:t(["ml-3 text-sm",[s(a)?"text-gray-300":"text-gray-700"]])},v(l.value.s3_proxy===1?"已开启":"已关闭"),3)])])])])):_("",!0)])]),e("div",pe,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 上传限制 ",2),e("div",be,[e("div",ve,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 每分钟上传限制 ",2),e("div",me,[n(e("input",{type:"number","onUpdate:modelValue":o[21]||(o[21]=r=>l.value.uploadMinute=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.uploadMinute]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",xe,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 上传数量限制 ",2),e("div",he,[n(e("input",{type:"number","onUpdate:modelValue":o[22]||(o[22]=r=>l.value.uploadCount=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.uploadCount]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"个文件",2)])]),e("div",fe,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 文件大小限制 ",2),e("div",we,[n(e("input",{type:"number","onUpdate:modelValue":o[23]||(o[23]=r=>c.value=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,c.value]]),n(e("select",{"onUpdate:modelValue":o[24]||(o[24]=r=>y.value=r),class:t(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[34]||(o[34]=[e("option",{value:"KB"},"KB",-1),e("option",{value:"MB"},"MB",-1),e("option",{value:"GB"},"GB",-1)]),2),[[x,y.value]])])]),e("div",_e,[e("label",{class:t(["block text-sm font-medium mb-2",[s(a)?"text-gray-300":"text-gray-700"]])}," 过期方式 ",2),e("div",ke,[(p(),b(f,null,w(["day","hour","minute","forever","count"],r=>e("label",{key:r,class:"relative inline-flex items-center group cursor-pointer"},[n(e("input",{type:"checkbox",value:r,"onUpdate:modelValue":o[25]||(o[25]=C=>l.value.expireStyle=C),class:"peer sr-only"},null,8,Ue),[[A,l.value.expireStyle]]),e("div",{class:t(["px-4 py-2 rounded-full border-2 transition-all duration-200 select-none",[l.value.expireStyle.includes(r)?(s(a),"bg-indigo-600 border-indigo-600 text-white"):s(a)?"bg-gray-700 border-gray-600 text-gray-300 hover:border-indigo-500":"bg-white border-gray-300 text-gray-700 hover:border-indigo-500"]])},v({day:"按天",hour:"按小时",minute:"按分钟",forever:"永久",count:"按次数"}[r]),3)])),64))])]),e("div",Se,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 最长保存时间 ",2),e("div",Ve,[n(e("input",{type:"number","onUpdate:modelValue":o[26]||(o[26]=r=>u.value=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,u.value]]),n(e("select",{"onUpdate:modelValue":o[27]||(o[27]=r=>g.value=r),class:t(["rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white hover:border-gray-500":"border-gray-300 hover:border-gray-400"]])},o[35]||(o[35]=[e("option",{value:"秒"},"秒",-1),e("option",{value:"分"},"分",-1),e("option",{value:"时"},"时",-1),e("option",{value:"天"},"天",-1)]),2),[[x,g.value]])])]),e("div",De,[e("label",{class:t(["block text-sm font-medium mb-2",[s(a)?"text-gray-300":"text-gray-700"]])}," 游客上传 ",2),e("div",Ce,[e("button",{type:"button",onClick:o[28]||(o[28]=r=>l.value.openUpload=l.value.openUpload===1?0:1),class:t(["relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",[l.value.openUpload===1?"bg-indigo-600":"bg-gray-200"]]),role:"switch","aria-checked":l.value.openUpload===1},[e("span",{class:t(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",[l.value.openUpload===1?"translate-x-5":"translate-x-0",s(a)&&l.value.openUpload!==1?"bg-gray-100":"bg-white"]])},null,2)],10,Be),e("span",{class:t(["ml-3 text-sm",[s(a)?"text-gray-300":"text-gray-700"]])},v(l.value.openUpload===1?"已开启":"已关闭"),3)])])])]),e("div",Me,[e("h3",{class:t(["text-lg font-medium mb-4",[s(a)?"text-white":"text-gray-800"]])}," 错误限制 ",2),e("div",Fe,[e("div",Ae,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 每分钟错误限制 ",2),e("div",ze,[n(e("input",{type:"number","onUpdate:modelValue":o[29]||(o[29]=r=>l.value.errorMinute=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.errorMinute]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"分钟",2)])]),e("div",Ee,[e("label",{class:t(["block text-sm font-medium",[s(a)?"text-gray-300":"text-gray-700"]])}," 错误次数限制 ",2),e("div",Te,[n(e("input",{type:"number","onUpdate:modelValue":o[30]||(o[30]=r=>l.value.errorCount=r),class:t(["w-24 rounded-md shadow-sm px-4 py-2.5 transition-all duration-200 ease-in-out border focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 outline-none",[s(a)?"bg-gray-700 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"border-gray-300 hover:border-gray-400 placeholder-gray-500"]])},null,2),[[d,l.value.errorCount]]),e("span",{class:t([s(a)?"text-gray-300":"text-gray-700"])},"次",2)])])])]),e("div",{class:"flex justify-end mt-8"},[e("button",{onClick:D,class:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors duration-200"}," 保存设置 ")])])],2)]))}});export{Ie as default}; diff --git a/themes/2024/assets/box-brjUM9cP.js b/themes/2024/assets/box-BGTnNORf.js similarity index 90% rename from themes/2024/assets/box-brjUM9cP.js rename to themes/2024/assets/box-BGTnNORf.js index 60ed632..138ecd7 100644 --- a/themes/2024/assets/box-brjUM9cP.js +++ b/themes/2024/assets/box-BGTnNORf.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-EADe6V-l.js";/** +import{c as a}from"./index-CBPNirpK.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/file-CTH8PUKS.js b/themes/2024/assets/file-CNpWcMOu.js similarity index 88% rename from themes/2024/assets/file-CTH8PUKS.js rename to themes/2024/assets/file-CNpWcMOu.js index 6c62810..60c4b01 100644 --- a/themes/2024/assets/file-CTH8PUKS.js +++ b/themes/2024/assets/file-CNpWcMOu.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-EADe6V-l.js";/** +import{c as a}from"./index-CBPNirpK.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/assets/fileData-B92rnDh4.js b/themes/2024/assets/fileData-BCZGMzij.js similarity index 62% rename from themes/2024/assets/fileData-B92rnDh4.js rename to themes/2024/assets/fileData-BCZGMzij.js index 533d623..93647f1 100644 --- a/themes/2024/assets/fileData-B92rnDh4.js +++ b/themes/2024/assets/fileData-BCZGMzij.js @@ -1,26 +1,26 @@ -import{c as D,d as _,D as I,r as k,E as U,o as W,G as $,H as Q}from"./index-EADe6V-l.js";/** +import{c as b,d as L,D as I,r as k,E as U,o as W,G as $,H as Q}from"./index-CBPNirpK.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x=D("CalendarIcon",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const x=b("CalendarIcon",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ee=D("ClipboardListIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** + */const ee=b("ClipboardListIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const te=D("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const te=b("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const re=D("ShieldCheckIcon",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/*! + */const re=b("ShieldCheckIcon",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/*! * qrcode.vue v3.4.1 * A Vue.js component to generate QRCode. * © 2017-2023 @scopewu(https://github.com/scopewu) * MIT License. - */var b=function(){return b=Object.assign||function(f){for(var l,u=1,c=arguments.length;un.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var o=[],i=0;i7)throw new RangeError("Invalid value");var h,v;for(h=r;;h++){var E=n.getNumDataCodewords(h,t)*8,m=d.getTotalBits(e,h);if(m<=E){v=m;break}if(h>=a)throw new RangeError("Data too long")}for(var p=0,C=[n.Ecc.MEDIUM,n.Ecc.QUARTILE,n.Ecc.HIGH];p>>3]|=J<<7-(F&7)}),new n(h,t,z,o)},n.prototype.getModule=function(e,t){return 0<=e&&e>>9)*1335;var o=(t<<10|r)^21522;c(o>>>15==0);for(var a=0;a<=5;a++)this.setFunctionModule(8,a,u(o,a));this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8));for(var a=9;a<15;a++)this.setFunctionModule(14-a,8,u(o,a));for(var a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,u(o,a));for(var a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,u(o,a));this.setFunctionModule(8,this.size-8,!0)},n.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;c(r>>>18==0);for(var t=0;t<18;t++){var a=u(r,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,a),this.setFunctionModule(i,o,a)}}},n.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var a=-4;a<=4;a++){var o=Math.max(Math.abs(a),Math.abs(r)),i=e+a,h=t+r;0<=i&&i=h)&&w.push(P[R])})},p=0;p=1;r-=2){r==6&&(r=5);for(var a=0;a>>3],7-(t&7)),t++)}}c(t==e.length*8)},n.prototype.applyMask=function(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(var t=0;t5&&e++):(this.finderPenaltyAddHistory(a,o),r||(e+=this.finderPenaltyCountPatterns(o)*n.PENALTY_N3),r=this.modules[t][i],a=1);e+=this.finderPenaltyTerminateAndCount(r,a,o)*n.PENALTY_N3}for(var i=0;i5&&e++):(this.finderPenaltyAddHistory(h,o),r||(e+=this.finderPenaltyCountPatterns(o)*n.PENALTY_N3),r=this.modules[t][i],h=1);e+=this.finderPenaltyTerminateAndCount(r,h,o)*n.PENALTY_N3}for(var t=0;tn.MAX_VERSION)throw new RangeError("Version number out of range");var t=(16*e+128)*e+64;if(e>=2){var r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return c(208<=t&&t<=29648),t},n.getNumDataCodewords=function(e,t){return Math.floor(n.getNumRawDataModules(e)/8)-n.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e]*n.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e]},n.reedSolomonComputeDivisor=function(e){if(e<1||e>255)throw new RangeError("Degree out of range");for(var t=[],r=0;r>>8||t>>>8)throw new RangeError("Byte out of range");for(var r=0,a=7;a>=0;a--)r=r<<1^(r>>>7)*285,r^=(t>>>a&1)*e;return c(r>>>8==0),r},n.prototype.finderPenaltyCountPatterns=function(e){var t=e[1];c(t<=this.size*3);var r=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(r&&e[0]>=t*4&&e[6]>=t?1:0)+(r&&e[6]>=t*4&&e[0]>=t?1:0)},n.prototype.finderPenaltyTerminateAndCount=function(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)},n.prototype.finderPenaltyAddHistory=function(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)},n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],n}();s.QrCode=f;function l(n,e,t){if(e<0||e>31||n>>>e)throw new RangeError("Value out of range");for(var r=e-1;r>=0;r--)t.push(n>>>r&1)}function u(n,e){return(n>>>e&1)!=0}function c(n){if(!n)throw new Error("Assertion error")}var d=function(){function n(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}return n.makeBytes=function(e){for(var t=[],r=0,a=e;r=1<-1}}}),Z=_({name:"QRCodeSvg",props:B,setup:function(s){var f=k(0),l=k(""),u=function(){var c=s.value,d=s.level,n=s.margin,e=A.QrCode.encodeText(c,L[d]).getModules();f.value=e.length+n*2,l.value=Y(e,n)};return u(),U(u),function(){return I("svg",{width:s.size,height:s.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(f.value," ").concat(f.value)},[I("path",{fill:s.background,d:"M0,0 h".concat(f.value,"v").concat(f.value,"H0z")}),I("path",{fill:s.foreground,d:l.value})])}}}),q=_({name:"QRCodeCanvas",props:B,setup:function(s){var f=k(null),l=function(){var u=s.value,c=s.level,d=s.size,n=s.margin,e=s.background,t=s.foreground,r=f.value;if(r){var a=r.getContext("2d");if(a){var o=A.QrCode.encodeText(u,L[c]).getModules(),i=o.length+n*2,h=window.devicePixelRatio||1,v=d/i*h;r.height=r.width=d*h,a.scale(v,v),a.fillStyle=e,a.fillRect(0,0,i,i),a.fillStyle=t,V?a.fill(new Path2D(Y(o,n))):o.forEach(function(E,m){E.forEach(function(p,C){p&&a.fillRect(C+n,m+n,1,1)})})}}};return W(l),U(l),function(){return I("canvas",{ref:f,style:{width:"".concat(s.size,"px"),height:"".concat(s.size,"px")}})}}}),ne=_({name:"Qrcode",render:function(){var s=this.$props,f=s.renderAs,l=s.value,u=s.size,c=s.margin,d=s.level,n=s.background,e=s.foreground,t=u>>>0,r=c>>>0,a=G(d)?d:H;return I(f==="svg"?Z:q,{value:l,size:t,margin:r,level:a,background:n,foreground:e})},props:X}),ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oe(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}const ie=$("fileData",()=>{const s=Q(JSON.parse(localStorage.getItem("receiveData")||"[]")||[]),f=Q(JSON.parse(localStorage.getItem("shareData")||"[]")||[]);function l(){localStorage.setItem("receiveData",JSON.stringify(s)),localStorage.setItem("shareData",JSON.stringify(f))}function u(e){s.unshift(e),l()}function c(e){f.unshift(e),l()}function d(e){s.splice(e,1),l()}function n(e){f.splice(e,1),l()}return{receiveData:s,shareData:f,save:l,addShareData:c,addReceiveData:u,deleteReceiveData:d,deleteShareData:n}});export{ee as C,te as E,ne as Q,re as S,x as a,ae as c,oe as g,ie as u}; + */var D=function(){return D=Object.assign||function(f){for(var h,u=1,c=arguments.length;un.MAX_VERSION)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var o=[],i=0;i7)throw new RangeError("Invalid value");var l,d;for(l=r;;l++){var p=n.getNumDataCodewords(l,t)*8,m=v.getTotalBits(e,l);if(m<=p){d=m;break}if(l>=a)throw new RangeError("Data too long")}for(var E=0,C=[n.Ecc.MEDIUM,n.Ecc.QUARTILE,n.Ecc.HIGH];E>>3]|=J<<7-(F&7)}),new n(l,t,y,o)},n.prototype.getModule=function(e,t){return 0<=e&&e>>9)*1335;var o=(t<<10|r)^21522;c(o>>>15==0);for(var a=0;a<=5;a++)this.setFunctionModule(8,a,u(o,a));this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8));for(var a=9;a<15;a++)this.setFunctionModule(14-a,8,u(o,a));for(var a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,u(o,a));for(var a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,u(o,a));this.setFunctionModule(8,this.size-8,!0)},n.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;c(r>>>18==0);for(var t=0;t<18;t++){var a=u(r,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,a),this.setFunctionModule(i,o,a)}}},n.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var a=-4;a<=4;a++){var o=Math.max(Math.abs(a),Math.abs(r)),i=e+a,l=t+r;0<=i&&i=l)&&w.push(P[R])})},E=0;E=1;r-=2){r==6&&(r=5);for(var a=0;a>>3],7-(t&7)),t++)}}c(t==e.length*8)},n.prototype.applyMask=function(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(var t=0;t5&&e++):(this.finderPenaltyAddHistory(a,o),r||(e+=this.finderPenaltyCountPatterns(o)*n.PENALTY_N3),r=this.modules[t][i],a=1);e+=this.finderPenaltyTerminateAndCount(r,a,o)*n.PENALTY_N3}for(var i=0;i5&&e++):(this.finderPenaltyAddHistory(l,o),r||(e+=this.finderPenaltyCountPatterns(o)*n.PENALTY_N3),r=this.modules[t][i],l=1);e+=this.finderPenaltyTerminateAndCount(r,l,o)*n.PENALTY_N3}for(var t=0;tn.MAX_VERSION)throw new RangeError("Version number out of range");var t=(16*e+128)*e+64;if(e>=2){var r=Math.floor(e/7)+2;t-=(25*r-10)*r-55,e>=7&&(t-=36)}return c(208<=t&&t<=29648),t},n.getNumDataCodewords=function(e,t){return Math.floor(n.getNumRawDataModules(e)/8)-n.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e]*n.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e]},n.reedSolomonComputeDivisor=function(e){if(e<1||e>255)throw new RangeError("Degree out of range");for(var t=[],r=0;r>>8||t>>>8)throw new RangeError("Byte out of range");for(var r=0,a=7;a>=0;a--)r=r<<1^(r>>>7)*285,r^=(t>>>a&1)*e;return c(r>>>8==0),r},n.prototype.finderPenaltyCountPatterns=function(e){var t=e[1];c(t<=this.size*3);var r=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(r&&e[0]>=t*4&&e[6]>=t?1:0)+(r&&e[6]>=t*4&&e[0]>=t?1:0)},n.prototype.finderPenaltyTerminateAndCount=function(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)},n.prototype.finderPenaltyAddHistory=function(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)},n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],n}();s.QrCode=f;function h(n,e,t){if(e<0||e>31||n>>>e)throw new RangeError("Value out of range");for(var r=e-1;r>=0;r--)t.push(n>>>r&1)}function u(n,e){return(n>>>e&1)!=0}function c(n){if(!n)throw new Error("Assertion error")}var v=function(){function n(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}return n.makeBytes=function(e){for(var t=[],r=0,a=e;r=1<-1}}}),Z=L({name:"QRCodeSvg",props:B,setup:function(s){var f=k(0),h=k(""),u=function(){var c=s.value,v=s.level,n=s.margin,e=A.QrCode.encodeText(c,_[v]).getModules();f.value=e.length+n*2,h.value=G(e,n)};return u(),U(u),function(){return I("svg",{width:s.size,height:s.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(f.value," ").concat(f.value)},[I("path",{fill:s.background,d:"M0,0 h".concat(f.value,"v").concat(f.value,"H0z")}),I("path",{fill:s.foreground,d:h.value})])}}}),q=L({name:"QRCodeCanvas",props:B,setup:function(s){var f=k(null),h=function(){var u=s.value,c=s.level,v=s.size,n=s.margin,e=s.background,t=s.foreground,r=f.value;if(r){var a=r.getContext("2d");if(a){var o=A.QrCode.encodeText(u,_[c]).getModules(),i=o.length+n*2,l=window.devicePixelRatio||1,d=v/i*l;r.height=r.width=v*l,a.scale(d,d),a.fillStyle=e,a.fillRect(0,0,i,i),a.fillStyle=t,V?a.fill(new Path2D(G(o,n))):o.forEach(function(p,m){p.forEach(function(E,C){E&&a.fillRect(C+n,m+n,1,1)})})}}};return W(h),U(h),function(){return I("canvas",{ref:f,style:{width:"".concat(s.size,"px"),height:"".concat(s.size,"px")}})}}}),ne=L({name:"Qrcode",render:function(){var s=this.$props,f=s.renderAs,h=s.value,u=s.size,c=s.margin,v=s.level,n=s.background,e=s.foreground,t=u>>>0,r=c>>>0,a=Y(v)?v:H;return I(f==="svg"?Z:q,{value:h,size:t,margin:r,level:a,background:n,foreground:e})},props:X});const ae=$("fileData",()=>{const s=Q(JSON.parse(localStorage.getItem("receiveData")||"[]")||[]),f=Q(JSON.parse(localStorage.getItem("shareData")||"[]")||[]);function h(){localStorage.setItem("receiveData",JSON.stringify(s)),localStorage.setItem("shareData",JSON.stringify(f))}function u(e){s.unshift(e),h()}function c(e){f.unshift(e),h()}function v(e){s.splice(e,1),h()}function n(e){f.splice(e,1),h()}return{receiveData:s,shareData:f,save:h,addShareData:c,addReceiveData:u,deleteReceiveData:v,deleteShareData:n}});export{ee as C,te as E,ne as Q,re as S,x as a,ae as u}; diff --git a/themes/2024/assets/index-EADe6V-l.js b/themes/2024/assets/index-CBPNirpK.js similarity index 99% rename from themes/2024/assets/index-EADe6V-l.js rename to themes/2024/assets/index-CBPNirpK.js index ce9e392..df4eab6 100644 --- a/themes/2024/assets/index-EADe6V-l.js +++ b/themes/2024/assets/index-CBPNirpK.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-CZhlKHE_.js","assets/fileData-B92rnDh4.js","assets/file-CTH8PUKS.js","assets/trash-COYxyedR.js","assets/SendFileView-P_iibHN1.css","assets/RetrievewFileView-BBntrsQr.js","assets/box-brjUM9cP.js","assets/RetrievewFileView-DY-ZjGgr.css","assets/AdminLayout-YzQVrzCC.js","assets/AdminLayout-N15TxCCO.css","assets/DashboardView-CbXKruLh.js","assets/FileManageView-DkZZCgUb.js","assets/LoginView-BbCZ9FM4.js","assets/LoginView-DegRNfFa.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-DNzTr7zG.js","assets/fileData-BCZGMzij.js","assets/file-CNpWcMOu.js","assets/trash-DAq3m0gp.js","assets/SendFileView-DrjwZo4C.css","assets/RetrievewFileView-Ds0F15RV.js","assets/box-BGTnNORf.js","assets/RetrievewFileView-DY-ZjGgr.css","assets/AdminLayout-BNAb0GsN.js","assets/AdminLayout-N15TxCCO.css","assets/DashboardView-c0fCgIGI.js","assets/FileManageView-wjy4eTuY.js","assets/LoginView-DG9YPvp9.js","assets/LoginView-DegRNfFa.css"])))=>i.map(i=>d[i]); (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/** * @vue/shared v3.5.8 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -83,4 +83,4 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SendFileView-CZ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[xi]=this[xi]={accessors:{}}).accessors,r=this.prototype;function o(i){const l=bn(i);s[l]||(ap(r,i),s[l]=!0)}return b.isArray(t)?t.forEach(o):o(t),this}}Ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ie.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});b.freezeMethods(Ie);function ir(e,t){const n=this||Gn,s=t||n,r=Ie.from(s.headers);let o=s.data;return b.forEach(e,function(l){o=l.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Dc(e){return!!(e&&e.__CANCEL__)}function hn(e,t,n){G.call(this,e??"canceled",G.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(hn,G,{__CANCEL__:!0});function jc(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function up(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fp(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),a=s[o];i||(i=u),n[r]=c,s[r]=u;let f=o,p=0;for(;f!==r;)p+=n[f++],f=f%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),u-i{n=a,r=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const a=Date.now(),f=a-n;f>=s?i(u,a):(r=u,o||(o=setTimeout(()=>{o=null,i(r)},s-f)))},()=>r&&i(r)]}const gs=(e,t,n=3)=>{let s=0;const r=fp(50,250);return dp(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,c=i-s,u=r(c),a=i<=l;s=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&a?(l-i)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Ri=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Ci=e=>(...t)=>b.asap(()=>e(...t)),hp=Pe.hasStandardBrowserEnv?function(){const t=Pe.navigator&&/(msie|trident)/i.test(Pe.navigator.userAgent),n=document.createElement("a");let s;function r(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(i){const l=b.isString(i)?r(i):i;return l.protocol===s.protocol&&l.host===s.host}}():function(){return function(){return!0}}(),pp=Pe.hasStandardBrowserEnv?{write(e,t,n,s,r,o){const i=[e+"="+encodeURIComponent(t)];b.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),b.isString(s)&&i.push("path="+s),b.isString(r)&&i.push("domain="+r),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mp(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bc(e,t){return e&&!mp(t)?gp(e,t):t}const Ai=e=>e instanceof Ie?{...e}:e;function qt(e,t){t=t||{};const n={};function s(u,a,f){return b.isPlainObject(u)&&b.isPlainObject(a)?b.merge.call({caseless:f},u,a):b.isPlainObject(a)?b.merge({},a):b.isArray(a)?a.slice():a}function r(u,a,f){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u,f)}else return s(u,a,f)}function o(u,a){if(!b.isUndefined(a))return s(void 0,a)}function i(u,a){if(b.isUndefined(a)){if(!b.isUndefined(u))return s(void 0,u)}else return s(void 0,a)}function l(u,a,f){if(f in t)return s(u,a);if(f in e)return s(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,a)=>r(Ai(u),Ai(a),!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(a){const f=c[a]||r,p=f(e[a],t[a],a);b.isUndefined(p)&&f!==l||(n[a]=p)}),n}const Hc=e=>{const t=qt({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=Ie.from(i),t.url=Mc(Bc(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(b.isFormData(n)){if(Pe.hasStandardBrowserEnv||Pe.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[u,...a]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...a].join("; "))}}if(Pe.hasStandardBrowserEnv&&(s&&b.isFunction(s)&&(s=s(t)),s||s!==!1&&hp(t.url))){const u=r&&o&&pp.read(o);u&&i.set(r,u)}return t},yp=typeof XMLHttpRequest<"u",bp=yp&&function(e){return new Promise(function(n,s){const r=Hc(e);let o=r.data;const i=Ie.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,a,f,p,m,y;function w(){m&&m(),y&&y(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function T(){if(!E)return;const P=Ie.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),j={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:P,config:e,request:E};jc(function(z){n(z),w()},function(z){s(z),w()},j),E=null}"onloadend"in E?E.onloadend=T:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(T)},E.onabort=function(){E&&(s(new G("Request aborted",G.ECONNABORTED,e,E)),E=null)},E.onerror=function(){s(new G("Network Error",G.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){let I=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const j=r.transitional||kc;r.timeoutErrorMessage&&(I=r.timeoutErrorMessage),s(new G(I,j.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,E)),E=null},o===void 0&&i.setContentType(null),"setRequestHeader"in E&&b.forEach(i.toJSON(),function(I,j){E.setRequestHeader(j,I)}),b.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),u&&([p,y]=gs(u,!0),E.addEventListener("progress",p)),c&&E.upload&&([f,m]=gs(c),E.upload.addEventListener("progress",f),E.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(a=P=>{E&&(s(!P||P.type?new hn(null,e,E):P),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const C=up(r.url);if(C&&Pe.protocols.indexOf(C)===-1){s(new G("Unsupported protocol "+C+":",G.ERR_BAD_REQUEST,e));return}E.send(o||null)})},_p=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const o=function(u){if(!r){r=!0,l();const a=u instanceof Error?u:this.reason;s.abort(a instanceof G?a:new hn(a instanceof Error?a.message:a))}};let i=t&&setTimeout(()=>{i=null,o(new G(`timeout ${t} of ms exceeded`,G.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=s;return c.unsubscribe=()=>b.asap(l),c}},vp=function*(e,t){let n=e.byteLength;if(n{const r=wp(e,t);let o=0,i,l=c=>{i||(i=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:a}=await r.next();if(u){l(),c.close();return}let f=a.byteLength;if(n){let p=o+=f;n(p)}c.enqueue(new Uint8Array(a))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},Hs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$c=Hs&&typeof ReadableStream=="function",Sp=Hs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Uc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xp=$c&&Uc(()=>{let e=!1;const t=new Request(Pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Oi=64*1024,Ar=$c&&Uc(()=>b.isReadableStream(new Response("").body)),ys={stream:Ar&&(e=>e.body)};Hs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ys[t]&&(ys[t]=b.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new G(`Response type '${t}' is not supported`,G.ERR_NOT_SUPPORT,s)})})})(new Response);const Rp=async e=>{if(e==null)return 0;if(b.isBlob(e))return e.size;if(b.isSpecCompliantForm(e))return(await new Request(Pe.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(b.isArrayBufferView(e)||b.isArrayBuffer(e))return e.byteLength;if(b.isURLSearchParams(e)&&(e=e+""),b.isString(e))return(await Sp(e)).byteLength},Cp=async(e,t)=>{const n=b.toFiniteNumber(e.getContentLength());return n??Rp(t)},Ap=Hs&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:a,withCredentials:f="same-origin",fetchOptions:p}=Hc(e);u=u?(u+"").toLowerCase():"text";let m=_p([r,o&&o.toAbortSignal()],i),y;const w=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let E;try{if(c&&xp&&n!=="get"&&n!=="head"&&(E=await Cp(a,s))!==0){let j=new Request(t,{method:"POST",body:s,duplex:"half"}),X;if(b.isFormData(s)&&(X=j.headers.get("content-type"))&&a.setContentType(X),j.body){const[z,V]=Ri(E,gs(Ci(c)));s=Ti(j.body,Oi,z,V)}}b.isString(f)||(f=f?"include":"omit");const T="credentials"in Request.prototype;y=new Request(t,{...p,signal:m,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:s,duplex:"half",credentials:T?f:void 0});let C=await fetch(y);const P=Ar&&(u==="stream"||u==="response");if(Ar&&(l||P&&w)){const j={};["status","statusText","headers"].forEach(N=>{j[N]=C[N]});const X=b.toFiniteNumber(C.headers.get("content-length")),[z,V]=l&&Ri(X,gs(Ci(l),!0))||[];C=new Response(Ti(C.body,Oi,z,()=>{V&&V(),w&&w()}),j)}u=u||"text";let I=await ys[b.findKey(ys,u)||"text"](C,e);return!P&&w&&w(),await new Promise((j,X)=>{jc(j,X,{data:I,headers:Ie.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:y})})}catch(T){throw w&&w(),T&&T.name==="TypeError"&&/fetch/i.test(T.message)?Object.assign(new G("Network Error",G.ERR_NETWORK,e,y),{cause:T.cause||T}):G.from(T,T&&T.code,e,y)}}),Tr={http:Uh,xhr:bp,fetch:Ap};b.forEach(Tr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Pi=e=>`- ${e}`,Tp=e=>b.isFunction(e)||e===null||e===!1,Vc={getAdapter:e=>{e=b.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(Pi).join(` `):" "+Pi(o[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return s},adapters:Tr};function lr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hn(null,e)}function Ii(e){return lr(e),e.headers=Ie.from(e.headers),e.data=ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vc.getAdapter(e.adapter||Gn.adapter)(e).then(function(s){return lr(e),s.data=ir.call(e,e.transformResponse,s),s.headers=Ie.from(s.headers),s},function(s){return Dc(s)||(lr(e),s&&s.response&&(s.response.data=ir.call(e,e.transformResponse,s.response),s.response.headers=Ie.from(s.response.headers))),Promise.reject(s)})}const qc="1.7.7",oo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oo[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Li={};oo.transitional=function(t,n,s){function r(o,i){return"[Axios v"+qc+"] Transitional option '"+o+"'"+i+(s?". "+s:"")}return(o,i,l)=>{if(t===!1)throw new G(r(i," has been removed"+(n?" in "+n:"")),G.ERR_DEPRECATED);return n&&!Li[i]&&(Li[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function Op(e,t,n){if(typeof e!="object")throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],i=t[o];if(i){const l=e[o],c=l===void 0||i(l,o,e);if(c!==!0)throw new G("option "+o+" must be "+c,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G("Unknown option "+o,G.ERR_BAD_OPTION)}}const Or={assertOptions:Op,validators:oo},_t=Or.validators;class $t{constructor(t){this.defaults=t,this.interceptors={request:new Si,response:new Si}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=` -`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Or.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:_t.function,serialize:_t.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ie.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,l.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let a,f=0,p;if(!c){const y=[Ii.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,a=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new hn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new io(function(r){t=r}),cancel:t}}}function Pp(e){return function(n){return e.apply(null,n)}}function Ip(e){return b.isObject(e)&&e.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pr).forEach(([e,t])=>{Pr[t]=e});function Kc(e){const t=new $t(e),n=Ec($t.prototype.request,t);return b.extend(n,$t.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Kc(qt(e,r))},n}const ge=Kc(Gn);ge.Axios=$t;ge.CanceledError=hn;ge.CancelToken=io;ge.isCancel=Dc;ge.VERSION=qc;ge.toFormData=Bs;ge.AxiosError=G;ge.Cancel=ge.CanceledError;ge.all=function(t){return Promise.all(t)};ge.spread=Pp;ge.isAxiosError=Ip;ge.mergeConfig=qt;ge.AxiosHeaders=Ie;ge.formToJSON=e=>Fc(b.isHTMLForm(e)?new FormData(e):e);ge.getAdapter=Vc.getAdapter;ge.HttpStatusCode=Pr;ge.default=ge;const Lp="",Wc=Lp,lo=ge.create({baseURL:Wc,timeout:1e15,headers:{"Content-Type":"application/json"}});lo.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${Wc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));lo.interceptors.response.use(e=>e.data,e=>{if(e.response)switch(e.response.status){case 401:console.error("未授权,请重新登录"),localStorage.clear(),window.location.href="/#/login";break;case 403:console.error("禁止访问");break;case 404:console.error("请求的资源不存在");break;default:console.error("发生错误:",e.response.data)}else e.request?console.error("未收到响应:",e.request):console.error("请求配置错误:",e.message);return Promise.reject(e)});const zc=Uf("alert",{state:()=>({alerts:[]}),actions:{showAlert(e,t="info",n=5e3){const s=Date.now(),r=Date.now();this.alerts.push({id:s,message:e,type:t,progress:100,duration:n,startTime:r}),setTimeout(()=>this.removeAlert(s),n)},removeAlert(e){const t=this.alerts.findIndex(n=>n.id===e);t>-1&&this.alerts.splice(t,1)},updateAlertProgress(e){const t=this.alerts.find(n=>n.id===e);if(t){const s=100-(Date.now()-t.startTime)/t.duration*100;t.progress=Math.max(0,s),t.progress<=0&&this.removeAlert(e)}}}}),Np={class:"p-4"},Mp={class:"flex items-start"},kp={class:"flex-shrink-0"},Fp={class:"ml-3 flex-1 pt-0.5"},Dp=["innerHTML"],jp={class:"ml-4 flex-shrink-0 flex"},Bp=["onClick"],Hp={class:"h-1 bg-white bg-opacity-25"},$p=Kn({__name:"AlertComponent",setup(e){const t=zc(),{alerts:n}=Vf(t),{removeAlert:s,updateAlertProgress:r}=t,o={success:"from-green-500 to-green-600",error:"from-red-500 to-red-600",warning:"from-yellow-500 to-yellow-600",info:"from-blue-500 to-blue-600"},i={success:Xd,error:eh,warning:Jd,info:Qd};let l;return Ts(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),Jr(()=>{clearInterval(l)}),(c,u)=>(We(),sn(Ef,{name:"alert-fade",tag:"div",class:"fixed top-4 left-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:ds(()=>[(We(!0),Fn(Ue,null,su(Te(n),a=>(We(),Fn("div",{key:a.id,class:fn(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[De("div",Np,[De("div",Mp,[De("div",kp,[(We(),sn(Al(i[a.type]),{class:"h-6 w-6 text-white"}))]),De("div",Fp,[De("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,Dp)]),De("div",jp,[De("button",{onClick:f=>Te(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=De("span",{class:"sr-only"},"关闭",-1)),ye(Te(th),{class:"h-5 w-5"})],8,Bp)])])]),De("div",Hp,[De("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:ws({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Up=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Vp=Up($p,[["__scopeId","data-v-6fdbaa84"]]),qp={key:0,class:"loading-overlay"},Kp=Kn({__name:"App",setup(e){const t=nn(!1),n=nn(!1),s=Wd(),r=zc(),o=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=()=>{const c=localStorage.getItem("colorMode");return c?c==="dark":null},l=c=>{t.value=c,localStorage.setItem("colorMode",c?"dark":"light")};return Ts(()=>{const c=i();l(c!==null?c:o()),lo.post("/",{}).then(u=>{u.code===200&&(localStorage.setItem("config",JSON.stringify(u.detail)),u.detail.notify_title&&u.detail.notify_content&&localStorage.getItem("notify")!==u.detail.notify_title+u.detail.notify_content&&(localStorage.setItem("notify",u.detail.notify_title+u.detail.notify_content),r.showAlert(u.detail.notify_title+": "+u.detail.notify_content,"success")))})}),Ru(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),Ht("isDarkMode",t),Ht("setColorMode",l),Ht("isLoading",n),(c,u)=>(We(),Fn("div",{class:fn(["app-container",t.value?"dark":"light"])},[ye(nh,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(We(),Fn("div",qp,u[1]||(u[1]=[De("div",{class:"loading-spinner"},null,-1)]))):ju("",!0),ye(Te(wc),null,{default:ds(({Component:a})=>[ye(ef,{name:"fade",mode:"out-in"},{default:ds(()=>[(We(),sn(Al(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),ye(Vp)],2))}}),Wp="modulepreload",zp=function(e){return"/"+e},Ni={},kt=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=zp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),a=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Wp,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Gp=()=>kt(()=>import("./SendFileView-CZhlKHE_.js"),__vite__mapDeps([0,1,2,3,4])),Jp=qd({history:wd("/"),routes:[{path:"/",name:"Retrieve",component:()=>kt(()=>import("./RetrievewFileView-BBntrsQr.js"),__vite__mapDeps([5,1,6,2,3,7]))},{path:"/send",name:"Send",component:Gp},{path:"/admin",name:"Manage",component:()=>kt(()=>import("./AdminLayout-YzQVrzCC.js"),__vite__mapDeps([8,6,9])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>kt(()=>import("./DashboardView-CbXKruLh.js"),__vite__mapDeps([10,2,3]))},{path:"/admin/files",name:"FileManage",component:()=>kt(()=>import("./FileManageView-DkZZCgUb.js"),__vite__mapDeps([11,2]))},{path:"/admin/settings",name:"Settings",component:()=>kt(()=>import("./SystemSettingsView-C6xa-QB6.js"),[])}]},{path:"/login",name:"Login",component:()=>kt(()=>import("./LoginView-BbCZ9FM4.js"),__vite__mapDeps([12,6,13]))}]}),co=Lf(Kp);co.use(Ff());co.use(Jp);co.mount("#app");export{Wd as A,Vf as B,nm as C,rn as D,Sl as E,Ue as F,Uf as G,Vn as H,Jr as I,sn as J,Al as K,Zp as L,ef as T,th as X,Up as _,We as a,Fn as b,Wt as c,Kn as d,De as e,Ve as f,Te as g,tm as h,ye as i,ds as j,ju as k,Xp as l,em as m,fn as n,Ts as o,su as p,Du as q,nn as r,Ef as s,la as t,zc as u,Yp as v,xn as w,Oe as x,lo as y,Qp as z}; +`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qt(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&Or.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean)},!1),r!=null&&(b.isFunction(r)?n.paramsSerializer={serialize:r}:Or.assertOptions(r,{encode:_t.function,serialize:_t.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Ie.concat(i,o);const l=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,l.unshift(w.fulfilled,w.rejected))});const u=[];this.interceptors.response.forEach(function(w){u.push(w.fulfilled,w.rejected)});let a,f=0,p;if(!c){const y=[Ii.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,u),p=y.length,a=Promise.resolve(n);f{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const i=new Promise(l=>{s.subscribe(l),o=l}).then(r);return i.cancel=function(){s.unsubscribe(o)},i},t(function(o,i,l){s.reason||(s.reason=new hn(o,i,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new io(function(r){t=r}),cancel:t}}}function Pp(e){return function(n){return e.apply(null,n)}}function Ip(e){return b.isObject(e)&&e.isAxiosError===!0}const Pr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pr).forEach(([e,t])=>{Pr[t]=e});function Kc(e){const t=new $t(e),n=Ec($t.prototype.request,t);return b.extend(n,$t.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Kc(qt(e,r))},n}const ge=Kc(Gn);ge.Axios=$t;ge.CanceledError=hn;ge.CancelToken=io;ge.isCancel=Dc;ge.VERSION=qc;ge.toFormData=Bs;ge.AxiosError=G;ge.Cancel=ge.CanceledError;ge.all=function(t){return Promise.all(t)};ge.spread=Pp;ge.isAxiosError=Ip;ge.mergeConfig=qt;ge.AxiosHeaders=Ie;ge.formToJSON=e=>Fc(b.isHTMLForm(e)?new FormData(e):e);ge.getAdapter=Vc.getAdapter;ge.HttpStatusCode=Pr;ge.default=ge;const Lp="",Wc=Lp,lo=ge.create({baseURL:Wc,timeout:1e15,headers:{"Content-Type":"application/json"}});lo.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e.url&&!e.url.startsWith("http")&&(e.url=`${Wc}/${e.url.replace(/^\//,"")}`),e},e=>Promise.reject(e));lo.interceptors.response.use(e=>e.data,e=>{if(e.response)switch(e.response.status){case 401:console.error("未授权,请重新登录"),localStorage.clear(),window.location.href="/#/login";break;case 403:console.error("禁止访问");break;case 404:console.error("请求的资源不存在");break;default:console.error("发生错误:",e.response.data)}else e.request?console.error("未收到响应:",e.request):console.error("请求配置错误:",e.message);return Promise.reject(e)});const zc=Uf("alert",{state:()=>({alerts:[]}),actions:{showAlert(e,t="info",n=5e3){const s=Date.now(),r=Date.now();this.alerts.push({id:s,message:e,type:t,progress:100,duration:n,startTime:r}),setTimeout(()=>this.removeAlert(s),n)},removeAlert(e){const t=this.alerts.findIndex(n=>n.id===e);t>-1&&this.alerts.splice(t,1)},updateAlertProgress(e){const t=this.alerts.find(n=>n.id===e);if(t){const s=100-(Date.now()-t.startTime)/t.duration*100;t.progress=Math.max(0,s),t.progress<=0&&this.removeAlert(e)}}}}),Np={class:"p-4"},Mp={class:"flex items-start"},kp={class:"flex-shrink-0"},Fp={class:"ml-3 flex-1 pt-0.5"},Dp=["innerHTML"],jp={class:"ml-4 flex-shrink-0 flex"},Bp=["onClick"],Hp={class:"h-1 bg-white bg-opacity-25"},$p=Kn({__name:"AlertComponent",setup(e){const t=zc(),{alerts:n}=Vf(t),{removeAlert:s,updateAlertProgress:r}=t,o={success:"from-green-500 to-green-600",error:"from-red-500 to-red-600",warning:"from-yellow-500 to-yellow-600",info:"from-blue-500 to-blue-600"},i={success:Xd,error:eh,warning:Jd,info:Qd};let l;return Ts(()=>{l=setInterval(()=>{n.value.forEach(c=>{r(c.id)})},100)}),Jr(()=>{clearInterval(l)}),(c,u)=>(We(),sn(Ef,{name:"alert-fade",tag:"div",class:"fixed top-4 left-4 z-50 w-full sm:max-w-sm md:max-w-md space-y-4 px-4 sm:px-0"},{default:ds(()=>[(We(!0),Fn(Ue,null,su(Te(n),a=>(We(),Fn("div",{key:a.id,class:fn(["w-full rounded-lg shadow-xl overflow-hidden","bg-gradient-to-r",o[a.type]])},[De("div",Np,[De("div",Mp,[De("div",kp,[(We(),sn(Al(i[a.type]),{class:"h-6 w-6 text-white"}))]),De("div",Fp,[De("p",{class:"text-sm font-medium text-white",innerHTML:a.message},null,8,Dp)]),De("div",jp,[De("button",{onClick:f=>Te(s)(a.id),class:"inline-flex text-white hover:text-gray-200 focus:outline-none transition-colors duration-200"},[u[0]||(u[0]=De("span",{class:"sr-only"},"关闭",-1)),ye(Te(th),{class:"h-5 w-5"})],8,Bp)])])]),De("div",Hp,[De("div",{class:"h-full bg-white transition-all duration-100 ease-out",style:ws({width:`${a.progress}%`})},null,4)])],2))),128))]),_:1}))}}),Up=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Vp=Up($p,[["__scopeId","data-v-6fdbaa84"]]),qp={key:0,class:"loading-overlay"},Kp=Kn({__name:"App",setup(e){const t=nn(!1),n=nn(!1),s=Wd(),r=zc(),o=()=>window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,i=()=>{const c=localStorage.getItem("colorMode");return c?c==="dark":null},l=c=>{t.value=c,localStorage.setItem("colorMode",c?"dark":"light")};return Ts(()=>{const c=i();l(c!==null?c:o()),lo.post("/",{}).then(u=>{u.code===200&&(localStorage.setItem("config",JSON.stringify(u.detail)),u.detail.notify_title&&u.detail.notify_content&&localStorage.getItem("notify")!==u.detail.notify_title+u.detail.notify_content&&(localStorage.setItem("notify",u.detail.notify_title+u.detail.notify_content),r.showAlert(u.detail.notify_title+": "+u.detail.notify_content,"success")))})}),Ru(()=>{document.documentElement.classList.toggle("dark",t.value)}),s.beforeEach((c,u,a)=>{n.value=!0,a()}),s.afterEach(()=>{setTimeout(()=>{n.value=!1},200)}),Ht("isDarkMode",t),Ht("setColorMode",l),Ht("isLoading",n),(c,u)=>(We(),Fn("div",{class:fn(["app-container",t.value?"dark":"light"])},[ye(nh,{modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=a=>t.value=a)},null,8,["modelValue"]),n.value?(We(),Fn("div",qp,u[1]||(u[1]=[De("div",{class:"loading-spinner"},null,-1)]))):ju("",!0),ye(Te(wc),null,{default:ds(({Component:a})=>[ye(ef,{name:"fade",mode:"out-in"},{default:ds(()=>[(We(),sn(Al(a),{key:c.$route.fullPath}))]),_:2},1024)]),_:1}),ye(Vp)],2))}}),Wp="modulepreload",zp=function(e){return"/"+e},Ni={},kt=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=zp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),a=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Wp,u||(f.as="script"),f.crossOrigin="",f.href=c,l&&f.setAttribute("nonce",l),document.head.appendChild(f),u)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},Gp=()=>kt(()=>import("./SendFileView-DNzTr7zG.js"),__vite__mapDeps([0,1,2,3,4])),Jp=qd({history:wd("/"),routes:[{path:"/",name:"Retrieve",component:()=>kt(()=>import("./RetrievewFileView-Ds0F15RV.js"),__vite__mapDeps([5,1,6,2,3,7]))},{path:"/send",name:"Send",component:Gp},{path:"/admin",name:"Manage",component:()=>kt(()=>import("./AdminLayout-BNAb0GsN.js"),__vite__mapDeps([8,6,9])),redirect:"/admin/dashboard",children:[{path:"/admin/dashboard",name:"Dashboard",component:()=>kt(()=>import("./DashboardView-c0fCgIGI.js"),__vite__mapDeps([10,2,3]))},{path:"/admin/files",name:"FileManage",component:()=>kt(()=>import("./FileManageView-wjy4eTuY.js"),__vite__mapDeps([11,2]))},{path:"/admin/settings",name:"Settings",component:()=>kt(()=>import("./SystemSettingsView-2Nlw7j_o.js"),[])}]},{path:"/login",name:"Login",component:()=>kt(()=>import("./LoginView-DG9YPvp9.js"),__vite__mapDeps([12,6,13]))}]}),co=Lf(Kp);co.use(Ff());co.use(Jp);co.mount("#app");export{Wd as A,Vf as B,nm as C,rn as D,Sl as E,Ue as F,Uf as G,Vn as H,Jr as I,sn as J,Al as K,Zp as L,ef as T,th as X,Up as _,We as a,Fn as b,Wt as c,Kn as d,De as e,Ve as f,Te as g,tm as h,ye as i,ds as j,ju as k,Xp as l,em as m,fn as n,Ts as o,su as p,Du as q,nn as r,Ef as s,la as t,zc as u,Yp as v,xn as w,Oe as x,lo as y,Qp as z}; diff --git a/themes/2024/assets/trash-COYxyedR.js b/themes/2024/assets/trash-DAq3m0gp.js similarity index 95% rename from themes/2024/assets/trash-COYxyedR.js rename to themes/2024/assets/trash-DAq3m0gp.js index a849cde..4657d90 100644 --- a/themes/2024/assets/trash-COYxyedR.js +++ b/themes/2024/assets/trash-DAq3m0gp.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-EADe6V-l.js";/** +import{c as a}from"./index-CBPNirpK.js";/** * @license lucide-vue-next v0.445.0 - ISC * * This source code is licensed under the ISC license. diff --git a/themes/2024/index.html b/themes/2024/index.html index e4b6b71..454e6e3 100644 --- a/themes/2024/index.html +++ b/themes/2024/index.html @@ -10,8 +10,9 @@ + {{title}} - +